The application is that the application date is 2015, 01 and 12, and the application number is: 201510015237.1, a divisional application of a patent application entitled "a face living body detection method and apparatus".
Detailed Description
The invention discloses a face living body detection method and a face living body detection device, which can adjust a face living body detection strategy according to different application scenes so as to improve or reduce the difficulty of face living body detection, and have strong flexibility and strong adaptability.
In order to make the technical solution of the present invention better understood by those skilled in the art, the technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
Referring to fig. 1, a flow chart of a face living body detection method provided by an embodiment of the present invention is shown, where the method may include the following steps:
s101, acquiring user behaviors.
In one possible implementation, the user behavior is a behavior resulting from the user performing a first face-in-vivo detection policy. Before the user performs the face living body detection, the system randomly generates a face living body detection strategy, the user performs the corresponding face living body detection strategy according to the prompt information of the system, the action or the behavior corresponding to the face living body detection strategy is made, and the system acquires images through a camera, wherein the images can be a series of video frames. For example, the user may randomly generate a first face living detection policy, where the face living detection policy is a smiling policy, and the user performs a smiling action according to prompt information of the system, where the system collects user behaviors and obtains a series of video frames corresponding to the user behaviors. The human face living body detection strategy randomly generated by the system can comprise one or more strategies, and the user behavior acquired by the system at least comprises a first user behavior, wherein the first user behavior corresponds to the first human face living body detection strategy, and particularly is a behavior formed by executing the first human face living body detection strategy by a user. Accordingly, acquiring the user behavior may further include acquiring a first user behavior and a second user behavior, wherein the first user behavior is a behavior formed by executing a first face living detection policy for the user; the second user behavior is a behavior formed by executing a second face living body detection strategy by the user; the first face in-vivo detection strategy and the second face in-vivo detection strategy are different.
In another possible implementation, the user behavior acquired by the system is a user history behavior, including but not limited to a user's history face biopsy behavior or other operational behavior. For example, the user history behavior may be a face living detection behavior of a user history, such as whether there is an abnormal detection record in the user history, etc., for evaluating whether the risk level of the user is a high risk user or a low risk user, so as to determine how to adjust the policy to increase or decrease the difficulty of face living detection. Other operation behaviors can be, but are not limited to, historical login behaviors of the user, password modification behaviors, transaction failure behaviors, mobile phone binding replacement, mobile phone binding removal and the like.
In another possible implementation, the user behavior acquired by the system is a data operation performed by the user before the face live detection is performed. For example, in some typical application scenarios, a login user account operation or other data operation is typically performed before a user performs face biopsy.
S102, when the user behavior is determined to belong to abnormal user behavior, determining an adjustment strategy; the adjustment strategy is used for improving or reducing the difficulty of human face living body detection.
When the user behavior is a behavior formed by the user executing the face living body detection strategy, the determining that the user behavior belongs to abnormal user behavior comprises: when the user behavior is determined to be not in accordance with the passing condition of the first face living body detection strategy, determining that the user behavior belongs to abnormal user behavior; or,
and when the user behaviors conforming to the passing conditions of the first face living body detection strategy are not collected in the preset time, determining that the user behaviors belong to abnormal user behaviors. Specifically, the passing condition of the face living body detection strategy can be preset, and when the acquired user behavior is determined to be not in accordance with the passing condition of the face living body detection strategy, the user behavior is determined to belong to abnormal user behavior. In addition, a time condition, for example, 30S, may be preset, and when the system does not collect the user behavior of the condition that the first face living body detection policy passes in a predetermined time, for example, 30S, it is determined that the user behavior belongs to an abnormal user behavior. At this time, when the user detects that the preset time is not passed because of executing a certain face living body detection strategy, it is indicated that the system is likely to be attacked by the picture or the video. At this point, the detection of abnormal user behavior is used as a condition to trigger the adjustment strategy. The adjustment strategy is used for improving or reducing the difficulty of human face living body detection.
In another possible implementation manner, when the obtained user behavior is a user history behavior, the determining that the user behavior belongs to an abnormal user behavior includes: and when the user belongs to the high-risk user according to the historical user behavior, determining that the user behavior belongs to the abnormal user behavior. For example, when the user fails to log in a plurality of times or does not pass or times out in face biopsy, it is determined that the user belongs to a high risk user.
In another possible implementation manner, when the obtained user behavior is a data operation performed by the user before the face live detection, the determining that the user behavior belongs to an abnormal user behavior includes: and when the type of the data operation is determined to be the same as the preset abnormal user behavior type, determining that the user behavior belongs to the abnormal user behavior. The preset abnormal user behavior types comprise: the present invention is not limited in this regard as to failed login, password modification, verification operation, un-binding of the phone, better binding of the phone, deletion of the record, etc., login using a device from a different place, login using a different device, etc. When the data operation executed by the user before the face living body detection is judged to be the same as the preset abnormal user behavior type, the user is determined to have higher safety risk, and the user behavior is determined to belong to the abnormal user behavior.
When it is determined that the user behavior belongs to an abnormal user behavior, the determination of the adjustment policy has different implementations. In one possible implementation manner, the method and the device are implemented according to the preset adjustment strategy of the system, so that the difficulty of human face living body detection is improved or reduced. Specifically, the preset adjustment policy includes at least one of a first policy and a second policy; when the preset adjustment strategy is the first strategy, the weight of the first face living body detection strategy is increased; when the preset adjustment strategy is the second strategy, the weight of the first face living body detection strategy is reduced; the weight is used for representing the probability of the first face living detection strategy in the face living detection strategy set.
For example, when the security requirement is high, a preset adjustment policy may be set as a first policy, and when it is determined that the user behavior belongs to an abnormal user behavior, the weight of the face living detection policy corresponding to the abnormal user behavior may be increased, so as to increase the probability of occurrence of the face living detection policy in the face living detection policy set, so that the policy has a high occurrence probability when the face living detection policy is regenerated later, thereby improving the difficulty of face living detection and further improving the security of face living detection.
When the security requirement is not high but the user experience requirement is high, a preset adjustment strategy can be set as a second strategy, and when the user behavior is determined to belong to abnormal user behavior, the weight of the face living detection strategy corresponding to the abnormal user behavior can be reduced, so that the probability of occurrence of the face living detection strategy in a face living detection strategy set is reduced, the strategy has lower occurrence probability when the face living detection strategy is regenerated later, the difficulty of face living detection is reduced, the user can pass through easily, and the user experience is improved.
Further, when the acquired user behavior includes a first user behavior and a second user behavior, and the first user behavior and the second user behavior correspond to different face living detection strategies, when one of the first user behavior and the second user behavior is determined to be a normal user behavior and the other is determined to be an abnormal user behavior, determining that the adjustment strategy is specifically: when the preset adjustment strategy is the first strategy, the weight of the face living body detection strategy corresponding to the normal user behavior is reduced, and the weight of the abnormal face living body detection strategy is improved. And when the preset adjustment strategy is the second strategy, increasing the weight of the face living body detection strategy corresponding to the normal user behavior, and reducing the weight of the abnormal face living body detection strategy.
For example, when the first user behavior is a behavior formed by executing a first face living detection policy for a user, the second user behavior is a behavior formed by executing a second face living detection policy for a user, and when it is determined that the first user behavior belongs to a normal user behavior and it is determined that the second user behavior belongs to an abnormal user behavior, a preset adjustment policy is acquired. When the safety requirement is high, a preset adjustment strategy can be set as a first strategy, the weight of the first face living body detection strategy is reduced, and the weight of the second face living body detection strategy is improved, so that the probability of occurrence of the second face living body detection strategy corresponding to abnormal user behaviors in a face living body detection strategy set can be increased, the strategy has high occurrence probability in the process of regenerating the face living body detection strategy later, and the difficulty of face living body detection is improved, and the safety of face living body detection is improved. Meanwhile, the probability of occurrence of a first face living body detection strategy corresponding to normal user behaviors in a face living body detection strategy set is reduced, so that the strategy has lower occurrence probability in the process of regenerating the face living body detection strategy in the follow-up process, the difficulty of face living body detection is improved, and the safety of face living body detection is further improved. When the security requirement is not high but the user experience requirement is high, a preset adjustment strategy can be set as a second strategy, the weight of the first face living body detection strategy is improved, and the weight of the second face living body detection strategy is reduced, so that the probability of occurrence of the first face living body detection strategy corresponding to normal user behaviors in a face living body detection strategy set can be increased, the strategy has high occurrence probability when the face living body detection strategy is regenerated later, the difficulty of face living body detection is reduced, the user can pass through easily, and the user experience is improved. Meanwhile, the probability of occurrence of a second face living detection strategy corresponding to abnormal user behaviors in a face living detection strategy set is reduced, so that the strategy has lower occurrence probability in the process of regenerating the face living detection strategy later, the difficulty of face living detection is reduced, the user can pass through easily, and the user experience is improved.
In another possible implementation manner, when the user behavior is a behavior formed by executing the corresponding face living body detection policy, the basis for determining the adjustment policy may not be a preset adjustment policy, but other judgment conditions may be introduced. For example, determining the adjustment policy includes at least one of:
acquiring user historical behavior data, and when the user belongs to a high-risk user according to the user historical behavior data, increasing the weight of a face living detection strategy corresponding to the abnormal user behavior;
acquiring user historical behavior data, and reducing the weight of a face living detection strategy corresponding to the abnormal user behavior when the user belongs to a low-risk user according to the user historical behavior data;
and acquiring data operation of the user before the face living body detection, and when the type of the data operation is determined to be the same as the preset abnormal user behavior type, increasing the weight of the face living body detection strategy corresponding to the abnormal user behavior.
It should be noted that, in another possible implementation manner, when it is determined that the user belongs to a high risk user according to the user history behavior or it is determined that the user behavior belongs to an abnormal user behavior according to the same type of data operation performed by the user before performing the face biopsy as a preset abnormal user behavior type, the determining and adjusting policy includes: and adjusting the weight of each strategy in the human face living body detection strategy set so as to improve the difficulty of human face living body detection.
S103, generating a face living body detection strategy according to the adjustment strategy.
And randomly generating one or more face living body detection strategies according to the adjustment strategies for carrying out face living body detection. The face living body detection strategy is a strategy selected from a face living body detection strategy set. The set of face biopsy policies includes one or more face biopsy policies.
S104, performing the face living body detection according to the face living body detection strategy.
In the specific implementation of the present invention, after the face biopsy strategy is determined, implementation of face biopsy may be the same as the prior art, and will not be described in detail herein.
Referring to fig. 2, a flowchart of another face living body detection method according to an embodiment of the present invention is shown.
In the method shown in fig. 2, two types of face living body detection strategies are randomly generated, and the adjustment strategy is determined according to a preset adjustment strategy. Of course, the above method can also be applied to the case of randomly generating 3, 4 or more face living body detection strategies. Other ways of obtaining this result without the exercise of inventive faculty are within the scope of the invention.
S201, face living body detection is started.
S202, detecting whether the physical conditions of the equipment meet preset conditions, and if so, entering S203; if the device is not matched with the device, the user is prompted to exit and the device is replaced.
The preset conditions may include whether the device has a camera, whether a pixel of the camera is greater than a set threshold, whether an environmental condition of the device satisfies a condition, whether the intensity of light is greater than a set threshold, and the like.
S203, two face living body detection strategies are randomly generated.
The face living body detection strategy can comprise one or more of eye closing, head lifting, mouth opening, head shaking and smiling strategies. Closing the eyes may in turn include closing both eyes, closing the right eye, closing the left eye, etc. Shaking may include shaking right, shaking left, etc. The specific face living body detection strategy can be set according to the requirement. In the specific implementation of the invention, two types of face living detection strategies are randomly generated and are determined according to the weight of each face living detection strategy in a face living detection set, wherein the weight is used for representing the occurrence probability of the corresponding face living detection strategy in the face living detection strategy set. The higher the weight, the higher the probability of occurrence thereof, and the higher the probability of being selected when generating a face living body detection strategy.
Specifically, taking a default face living body detection strategy as an example, the weight of 5 strategies is consistent when the system is initialized, for example, 20 can be set, and when the face living body detection strategy is randomly generated, the probability ratio of 5 strategies to be selected is 1:1:1:1:1. Each policy may correspond to a corresponding range of values, e.g., policy 1 corresponds to a range of values of
[0, 20), policy 2 corresponds to a range of values of [20, 40), policy 3 corresponds to a range of values of [40, 60), policy 4 corresponds to a range of values of [60, 80), for example policy 5 corresponds to a range of values of [80, 100). When randomly generating the face living body detection strategy, integers can be randomly generated, and the value range of the integers is [0,100 ]. For example, when the randomly generated integer is 15, the corresponding face living body detection strategy is strategy 1; when the randomly generated integer is 60, the corresponding face living body detection strategy is strategy 4.
When the adjustment strategy is determined, the weight of each face living body detection strategy in the face living body detection strategy set is correspondingly changed, and the numerical value range is changed when a random integer is generated. At this time, integers are randomly generated in the adjusted numerical range, and the corresponding face living body detection strategy is determined. For example, assume that the adjusted range of values is: the range of values corresponding to strategy 1 is [0,20 ], the range of values corresponding to strategy 2 is [20,40 ], and the range of values corresponding to strategy 3 is
[40,65) for policy 4 a value range of [65, 85) for example for policy 5 a value range of [85,105 ]. In randomly generating the face living body detection strategy, integers can be randomly generated, and the value range of the integers is [0,105 ]. When the number 60 is randomly generated, the corresponding policy is policy 3, and so on.
S204, executing the generated human face living body detection strategy.
At this point, the system or device may prompt the user to perform an action corresponding to the generated face biopsy strategy. And the user makes corresponding actions according to the system prompt.
S205, collecting video frames corresponding to user behaviors.
S206, judging whether the user behavior is abnormal user behavior.
Wherein, the judging whether the user behavior is abnormal user behavior may include: judging whether the user behavior is a human face or not; if yes, it is determined whether the user behavior is a living body motion conforming to the face living body detection policy, and when the determination results are all yes, it is determined that the user behavior is a normal user behavior, and S210 is executed. And when one of the judgment results is negative, determining that the user behavior is abnormal. S207 is performed to determine an adjustment policy.
Wherein, the judging whether the user behavior is abnormal user behavior may further include: judging whether the user behavior is not collected within a preset time, if so, executing S207; if not, S210 is entered.
Of course, after judging whether the face is collected in the video frame corresponding to the user behavior and whether the face is a living body action conforming to the face living body detection strategy, if one of the judgment results is negative, further judging whether the time-out is performed, and if the time-out is performed, determining that the user behavior is abnormal.
S207, determining an adjustment strategy.
And S208, when the preset adjustment strategy is to improve the security strategy, the weight of the face living body detection strategy corresponding to the abnormal user behavior is improved, and the process goes to S203.
Taking the face living body detection strategy as an example, which includes 5 strategies, it is assumed that the randomly generated face living body detection strategy is strategy 3 and strategy 5, wherein when the user executes strategy 3, the corresponding user behavior is judged to be abnormal behavior, if the preset adjustment strategy is to improve the security strategy, the weight of strategy 3 is improved, for example, the weight of strategy 3 is changed to 25. At this time, the corresponding numerical range is also adjusted accordingly, and the adjusted numerical range is: policy 1 corresponds to a range of values of [0, 20), policy 2 corresponds to a range of values of [20,40 ], policy 3 corresponds to a range of values of [40,65 ], policy 4 corresponds to a range of values of [65, 85), for example policy 5 corresponds to a range of values of [85,105). In randomly generating the face living body detection strategy, integers can be randomly generated, and the value range of the integers is [0,105 ]. Thus, as the weight of the strategy 3 is increased, the probability of being selected when the face living body detection strategy is randomly generated is also increased, so that the difficulty of face living body detection is improved, and the safety is improved. When the weight of the face living body detection strategy corresponding to the abnormal user behavior is increased, the system can preset the adjustment amplitude and the adjustment value range. And the threshold of times of executing the face living body detection strategy by the user can be set, and when the threshold of times is exceeded, the face living body detection cannot be performed by the user on the same day, so that the safety of the system is improved.
Further, in another implementation, assuming that the policy 5 is executed in advance before the policy 3 is executed and the user behavior of the user execution policy 5 is determined to be the normal user behavior, when the preset adjustment policy is to increase the security policy, the weight of the face living detection policy corresponding to the normal user behavior may be reduced in addition to the weight of the face living detection policy corresponding to the abnormal user behavior. Because abnormal behaviors appear, the system is proved to have larger attack risk, so that for the strategy 5 which is easier to pass, the weight of the strategy is reduced, and the probability of being selected can be reduced, thereby improving the difficulty of human face living body detection and improving the safety of the system.
S209, when the preset adjustment strategy is to improve the user experience strategy, the weight of the face living body detection strategy corresponding to the abnormal user behavior is reduced, and S203 is entered.
Taking the face living detection strategy as an example, which includes 5 strategies, assuming that the randomly generated face living detection strategy is strategy 3 and strategy 5, when the user executes strategy 3, the corresponding user behavior is judged to be abnormal behavior, if the preset adjustment strategy is to improve the user experience strategy, the weight of strategy 3 is reduced, for example, the weight of strategy 3 is changed from 20 to 15. At this time, the corresponding numerical range is also adjusted accordingly, and the adjusted numerical range is: policy 1 corresponds to a range of values of [0, 20), policy 2 corresponds to a range of values of [20,40 ], policy 3 corresponds to a range of values of [40, 55), policy 4 corresponds to a range of values of [55,75), for example policy 5 corresponds to a range of values of [75, 95). In randomly generating the face living body detection strategy, integers can be randomly generated, and the value range of the integers is [0,95 ]. In this way, the weight of the strategy 3 is reduced, so that the probability of being selected when the face living body detection strategy is randomly generated is also reduced, the difficulty of face living body detection is improved, and the user experience is improved.
Further, in another implementation, assuming that the policy 5 is executed in advance before the policy 3 is executed, and the user behavior of the user executing the policy 5 is determined to be the normal user behavior, when the preset adjustment policy is to improve the user experience policy, the weight of the face living detection policy corresponding to the normal user behavior may be improved in addition to the weight of the face living detection policy corresponding to the abnormal user behavior. Because of abnormal behaviors, the corresponding strategy users are indicated to have larger difficulty in execution, in order to improve user experience, the weight of the strategy 5 which is more difficult to pass can be improved besides the weight of the face living body detection strategy which is more difficult to pass, so that the probability of the strategy 5 being selected is improved, the difficulty of face living body detection is reduced, and the user experience is improved.
S210, judging whether a non-executed face living body detection strategy exists, if so, entering S204; if not, the process advances to S211.
S211, finishing the detection of the human face living body and ending the procedure.
It should be noted that, when the embodiment of the present invention is specifically implemented and the user behavior is determined to be an abnormal user behavior, in determining the adjustment policy, other manners may be adopted to determine the adjustment policy in addition to the manner of determining the adjustment policy according to the preset adjustment policy in the embodiment shown in fig. 2.
For example, in one possible implementation, user historical behavior data is obtained, and when it is determined that the user belongs to a high risk user according to the user historical behavior data, the weight of the face living detection policy corresponding to the abnormal user behavior is increased. Then, the process proceeds to S203, and the face living body detection policy is generated again at random. For example, when the user fails to log in for many times or fails or times out in the face biopsy, it is determined that the user belongs to a high risk user, and then the weight of the face biopsy strategy corresponding to the abnormal user behavior is increased, and the difficulty of face biopsy is increased.
In another possible implementation manner, instead of S208 and S209, user history behavior data may be acquired, and when it is determined that the user belongs to a low risk user according to the user history behavior data, the weight of the face living detection policy corresponding to the abnormal user behavior is reduced. In this way, the user experience may be improved.
In another implementation manner, instead of S208 and S209, a data operation of the user before performing the face living detection may be obtained, and when it is determined that the type of the data operation is the same as a preset abnormal user behavior type, the weight of the face living detection policy corresponding to the abnormal user behavior is increased. The preset abnormal user behavior types comprise: the present invention is not limited in this regard as to failed login, password modification, verification operation, un-binding of the phone, better binding of the phone, deletion of the record, etc., login using a device from a different place, login using a different device, etc. When the data operation executed by the user before the face living body detection is judged to be the same as the preset abnormal user behavior type, the user is determined to have higher safety risk, and in order to improve the safety of the system, the difficulty of the face living body detection can be improved by improving the weight of the face living body detection strategy corresponding to the abnormal user behavior.
Of course, those skilled in the art will appreciate that modifications and variations may be made to the embodiment of fig. 2, which fall within the scope of the present invention.
Referring to fig. 3, a flowchart of another face living body detection method according to an embodiment of the present invention is shown.
S301, acquiring historical user behaviors of a user.
S302, when the user belongs to the high-risk user according to the user historical behaviors, determining that the user behaviors belong to abnormal user behaviors.
S303, adjusting the weight of each strategy in the face living body detection strategy set so as to improve the difficulty of face living body detection.
In this case, the policy for adjusting the weight may be a default policy of the system, or may be a policy which is empirically determined and is difficult to be executed by the user, i.e., a policy corresponding to the abnormal behavior.
S304, randomly generating the face living body detection strategy according to the weight of each adjusted face living body detection strategy.
S305, performing face living body detection according to the face living body detection strategy.
In this embodiment, the history of the user may be obtained in advance before performing the face biopsy, thereby determining whether to increase or decrease the difficulty of the face biopsy to increase the security of the system.
Referring to fig. 4, a flowchart of another face detection method according to an embodiment of the present invention is provided.
S401, acquiring data operation executed by a user before face living body detection.
And S402, when the type of the data operation is determined to be the same as the preset abnormal user behavior type, determining that the user behavior belongs to the abnormal user behavior.
The preset abnormal user behavior types comprise: the present invention is not limited in this regard as to failed login, password modification, verification operation, un-binding of the phone, better binding of the phone, deletion of the record, etc., login using a device from a different place, login using a different device, etc. When the data operation executed by the user before the face living body detection is judged to be the same as the preset abnormal user behavior type, the user is determined to have higher safety risk, and the user behavior is determined to belong to the abnormal user behavior.
S403, adjusting the weight of each strategy in the face living body detection strategy set so as to improve the difficulty of face living body detection.
In this case, the policy for adjusting the weight may be a default policy of the system, or may be a policy which is empirically determined and is difficult to be executed by the user, i.e., a policy corresponding to the abnormal behavior.
S404, randomly generating the face living body detection strategy according to the weight of each adjusted face living body detection strategy.
S405, performing face living body detection according to the face living body detection strategy.
In this embodiment, the data operation performed by the user before the face biopsy is performed may be acquired in advance before the face biopsy is performed, so as to determine whether to increase or decrease the difficulty of the face biopsy, so as to increase the security of the system.
Referring to fig. 5, a schematic diagram of a face living body detection apparatus according to an embodiment of the present invention is provided.
A face in-vivo detection apparatus 500, the apparatus comprising:
an obtaining unit 501, configured to obtain a user behavior.
An adjustment unit 502, configured to determine an adjustment policy when it is determined that the user behavior acquired by the acquisition unit belongs to an abnormal user behavior; the adjustment strategy is used for improving or reducing the difficulty of human face living body detection.
A policy generating unit 503, configured to generate a face living body detection policy according to the adjustment policy determined by the adjustment unit.
And a detection unit 504, configured to perform face living body detection according to the face living body detection policy generated by the policy generation unit.
Further, the user behavior obtained by the obtaining unit is a behavior formed by executing a first face living body detection strategy by the user;
The adjusting unit is specifically configured to:
when the user behavior is determined to be not in accordance with the passing condition of the first face living body detection strategy, determining that the user behavior belongs to abnormal user behavior; or,
and when the user behaviors conforming to the passing conditions of the first face living body detection strategy are not collected in the preset time, determining that the user behaviors belong to abnormal user behaviors.
Further, the adjusting unit is specifically configured to:
acquiring a preset adjustment strategy, wherein the preset adjustment strategy comprises at least one of a first strategy and a second strategy;
when the preset adjustment strategy is the first strategy, the weight of the first face living body detection strategy is increased;
when the preset adjustment strategy is the second strategy, the weight of the first face living body detection strategy is reduced;
the weight is used for representing the probability of the first face living detection strategy in the face living detection strategy set.
Further, the acquiring unit is specifically configured to:
acquiring a first user behavior and a second user behavior; the first user behavior is a behavior formed by executing a first face living body detection strategy by a user; the second user behavior is a behavior formed by executing a second face living body detection strategy by the user; the first face in-vivo detection strategy and the second face in-vivo detection strategy are different.
Further, the adjusting unit is specifically configured to:
when the first user behavior is determined to belong to a normal user behavior and the second user behavior is determined to belong to an abnormal user behavior, a preset adjustment strategy is obtained; the preset adjustment strategy comprises at least one of a first strategy and a second strategy;
when the preset adjustment strategy is the first strategy, the weight of the first face living body detection strategy is reduced, and the weight of the second face living body detection strategy is improved;
when the preset adjustment strategy is the second strategy, the weight of the first face living body detection strategy is increased, and the weight of the second face living body detection strategy is reduced;
the weight is used for representing the probability that the first face living body detection strategy or the second face living body detection strategy appears in a face living body detection strategy set.
Further, the adjusting unit is specifically configured to perform at least one of the following:
acquiring user historical behavior data, and when the user belongs to a high-risk user according to the user historical behavior data, increasing the weight of a face living detection strategy corresponding to the abnormal user behavior;
Acquiring user historical behavior data, and reducing the weight of a face living detection strategy corresponding to the abnormal user behavior when the user belongs to a low-risk user according to the user historical behavior data;
acquiring data operation of a user before face living detection, and when the type of the data operation is determined to be the same as the preset abnormal user behavior type, increasing the weight of a face living detection strategy corresponding to the abnormal user behavior;
the weight is used for representing the probability of the face living detection strategy in the face living detection strategy set.
Further, the user behavior acquired by the acquisition unit is a user history behavior;
the adjusting unit is specifically configured to:
and when the user belongs to the high-risk user according to the historical user behavior, determining that the user behavior belongs to the abnormal user behavior.
Further, the user behavior acquired by the acquisition unit is a data operation executed by a user before the face living body detection is performed;
the adjusting unit is specifically configured to:
and when the type of the data operation is determined to be the same as the preset abnormal user behavior type, determining that the user behavior belongs to the abnormal user behavior.
Further, the adjusting unit is specifically configured to:
and adjusting the weight of each strategy in the human face living body detection strategy set so as to improve the difficulty of human face living body detection.
Further, the face living body detection strategy comprises one or more of eye closing, head raising, mouth opening, head shaking and smiling strategies.
The functions of the above units may correspond to the processing steps of the above method described in detail in fig. 1 to 4, and will not be repeated here. It should be noted that, since the method embodiments are explained in detail, the description of the apparatus embodiments is relatively simple, and those skilled in the art will appreciate that the apparatus embodiments of the present invention may be constructed with reference to the method embodiments. Other implementations, which are not inventive, are within the scope of the present invention.
It will be appreciated by those skilled in the art that the foregoing has been provided by way of example for the purpose of illustrating embodiments of the method and apparatus, and that the foregoing is not to be construed as limiting the invention, and that other implementations may be practiced by those skilled in the art without the benefit of the teachings herein.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden. The foregoing is merely illustrative of the embodiments of this invention and it will be appreciated by those skilled in the art that variations and modifications may be made without departing from the principles of the invention, and it is intended to cover all modifications and variations as fall within the scope of the invention.