# US 2021/0241012 A1 · Illegal attack prevention

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0241012 A1
- Document ID: US20210241012A1
- Status: Published application
- Kind: A1
- Application number: 17/049,873
- Filed: 2019-01-25
- Published: 2021-08-05
- Earliest claimed: 2018-05-09
- Assignees: Hangzhou Hikvision Digital Technology Co., Ltd.
- Applicants: Hangzhou Hikvision Digital Technology Co., Ltd.
- Inventors: Fan Wei; Shaojie Ding; Congyi Hua; Weichang Kang; Chuan Shen
- Web page: https://patentgrep.com/patent/US20210241012A1

## CPC

- G07C 9/257: {electronically (G07C9/26 takes precedence)}
- G06V 40/165: {using facial parts and geometric relationships}
- G06V 40/169: {Holistic features and representations, i.e. based on the facial image taken as a whole}
- G06V 40/40: Spoof detection, e.g. liveness detection
- G06V 40/45: {Detection of the body part being alive}
- G07C: TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

Provided are a method and apparatus for preventing an illegal attack, and an electronic device. According to one embodiment, the method comprises: when a user feature of a user is identified successfully, determining whether a living body detection result for the user feature indicates failure; if the living body detection result for the user feature indicates failure, locking a feature ID when the feature ID of the user feature is not locked and a locking condition of the feature ID is satisfied currently; and if the living body detection result for the user feature indicates success, unlocking the feature ID when the feature ID of the user feature is locked and an unlocking condition of the locked feature ID is satisfied currently.

## Claims

### Claim 1

A method of preventing illegal attack, comprising:
when a user feature of a user is successfully identified, determining whether a living body detection result for the user feature indicates a failure or not;
in a case where the living body detection result for the user feature indicates failure,
when a feature ID of the user feature is not locked and a locking condition of the feature ID is satisfied currently, locking the feature ID; and
in a case where the living-body detection result for the user feature indicates success,
when the feature ID of the user feature is locked and an unlocking condition of the locked feature ID is satisfied currently, unlocking the locked feature ID.

### Claim 2 (depends on 1)

The method according to claim 1, wherein determining whether the locking condition of the feature ID is satisfied currently comprises:
determining whether the feature ID is the same as a second feature ID of a second user feature for which a latest locally recorded living body detection indicates failure;
when the feature ID is different from the second feature ID, determining that the locking condition of the feature ID is not satisfied;
when the feature ID is the same as the second feature ID,
updating a count of a locally existing living-body-detection failure counter corresponding to the feature ID by increasing it with a first set value;
when the updated count is greater than or equal to a first preset threshold, determining that the locking condition of the feature ID is satisfied currently;
when the updated count is less than the first preset threshold, determining that the locking condition of the feature ID is not satisfied currently.

### Claim 3 (depends on 2)

The method according to claim 2, when the feature ID is different from the second feature ID of the second user feature for which a latest locally recorded living body detection indicates failure, further comprising:
detecting whether a living-body-detection failure counter corresponding to the feature ID locally exists;
when the living-body-detection failure counter does not locally exist,
establishing locally the living-body-detection failure counter corresponding to the feature ID, and
setting a count of the living-body-detection failure counter to a second set value;
when the living-body-detection failure counter locally exists, setting the count of the living-body-detection failure counter corresponding to the feature ID to the second set value.

### Claim 4 (depends on 1)

The method according to claim 1, wherein detecting whether the unlocking condition of the feature ID is satisfied currently comprises:
determining whether the feature ID is the same as a third feature ID of a third user feature for which a latest locally recorded living body detection indicates success;
when the feature ID is different from the third feature ID, determining that the unlocking condition of the feature ID is not satisfied;
when the feature ID is the same as the third feature ID,
updating a count of a locally existing living-body-detection success counter corresponding to the feature ID by increasing it with a first set value;
when the updated count is greater than or equal to a second preset threshold, determining that the unlocking condition of the feature ID is satisfied currently;
when the updated count is less than the second preset threshold, determining that the unlocking condition of the feature ID is not satisfied currently.

### Claim 5 (depends on 4)

The method according to claim 4, when the feature ID is different from the third feature ID of the third user feature for which a latest locally recorded living body detection indicates success, further comprising:
detecting whether a living-body-detection success counter corresponding to the feature ID locally exists;
when the living-body-detection success counter does not locally exist,
establishing locally the living-body-detection success counter corresponding to the feature ID, and
setting a count of the living-body-detection failure counter to a second set value;
when the living-body-detection success counter locally exists, setting the count of the living-body-detection success counter corresponding to the feature ID to the second set value.

### Claim 6 (depends on 1)

The method according to claim 1, further comprising:
after locking the feature ID, starting a timer corresponding to the feature ID; and
unlocking the feature ID when the timer reaches a set time threshold.

### Claim 7 (depends on 6)

The method according to claim 6, further comprising:
resetting the timer corresponding to the feature ID, when the user feature of the user is successfully identified, the living body detection result for the user feature indicates failure, and the feature ID of the user feature is locked.

### Claim 8

An electronic device comprising:
a processor,
a memory configured to store machine executable instructions executable by the processor,
an internal bus, and
a communication interface;
wherein the processor, the communication interface and the memory communicate with each other via the internal bus,
upon execution of the instructions, the processor is configured to;
identify a user feature of a user;
perform a living body detection on the user feature; and
in a case where the user feature of the user is successfully identified, and a living body detection result for the user feature indicates failure, when a feature ID of the user feature is not locked and a locking condition of the feature ID is satisfied currently, lock the feature ID; and
in a case where the user feature of the user is successfully identified, and a living body detection result for the user feature indicates success, when the feature ID of the user feature is locked and an unlocking condition of the locked feature ID is satisfied currently, unlock the locked feature ID.

### Claim 9 (depends on 8)

The device according to claim 8, wherein the processor is further configured to:
determine whether the feature ID is the same as a second feature ID of a second user feature for which a latest locally recorded living body detection indicates failure;
when the feature ID is different from the second feature ID, determine that the locking condition of the feature ID is not satisfied;
when the feature ID is the same as the second feature ID,
update a count of a locally existing living-body-detection failure counter corresponding to the feature ID by increasing the count with a first set value;
when the updated count is greater than or equal to a first preset threshold, determine that the locking condition of the feature ID is satisfied currently; and
when the updated count is less than the first preset threshold, determine that the locking condition of the feature ID is not satisfied currently.

### Claim 10 (depends on 9)

The device according to claim 9, wherein the processor is further configured to:
detect whether a living-body-detection failure counter corresponding to the feature ID locally exists, when the feature ID is different from the second feature ID of the second user feature for which a latest locally recorded living body detection indicates failure,
when the living-body-detection failure counter does not locally exist,
establish locally the living-body-detection failure counter corresponding to the feature ID, and
set a count of the living-body-detection failure counter to a second set value; and
when the living-body-detection failure counter locally exists, set the count of the living-body-detection failure counter corresponding to the feature ID to the second set value.

### Claim 11 (depends on 8)

The device according to claim 8, wherein the processor is further configured to:
determine whether the feature ID is the same as a third feature ID of a third user feature for which a latest locally recorded living body detection indicates success;
when the feature ID is different from the third feature ID, determine that the unlocking condition of the feature ID is not satisfied;
when the feature ID is the same as the third feature ID,
update a count of a locally existing living-body-detection success counter corresponding to the feature ID by increasing it with a first set value;
when the updated count is greater than or equal to a second preset threshold, determine that the unlocking condition of the feature ID is satisfied currently; and
when the updated count is less than the second preset threshold, determine that the unlocking condition of the feature ID is not satisfied currently.

### Claim 12 (depends on 11)

The device according to claim 11, wherein the processor is further configured to:
when the feature ID is different from the third feature ID of the third user feature for which a latest locally recorded living body detection indicates success, detect whether a living-body-detection success counter corresponding to the feature ID locally exists,
when the living-body-detection success counter does not locally exist,
establish locally the living-body-detection success counter corresponding to the feature ID, and
set a count of the living-body-detection failure counter to a second set value; and
when the living-body-detection success counter locally exists, set the count of the living-body-detection success counter corresponding to the feature ID to the second set value.

### Claim 13 (depends on 8)

The device according to claim 8, wherein, the processor is further configured to:
start a timer corresponding to the feature ID after locking the feature ID, and
unlock the feature ID when the timer reaches a set time threshold.

### Claim 14 (depends on 13)

The device according to claim 13, wherein, the processor is further configured to:
reset the timer corresponding to the feature ID when the feature identifying module successfully identifies the user feature of the user, the living body detection of the living body detecting module indicates failure, and the feature ID of the user feature is locked.

### Claim 15

(canceled)
