Human face liveness detection method and device

By acquiring and processing multiple face images with large differences, the facial live detection technology is improved, and the problems of insufficient security and user experience in the existing technology are solved, and the accuracy of detection results is achieved. and credibility.

CN113505756BActive Publication Date: 2024-12-24ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110966357.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-23
Publication Date
2024-12-24
Estimated Expiration
2041-08-23

AI Technical Summary

Technical Problem

The existing facial live detection technology has shortcomings in improving security and user experience, especially the security of the detection algorithm and the credibility of the detection results.

Method used

By obtaining multiple face images continuously captured by the user, selecting image pairs with the difference degree reaching the predetermined standard using the pre-set image attributes, inputting the pre-trained face live detection model to obtain detection results, hiding user interaction actions, and improving detection The security and accuracy of the algorithm.

Benefits of technology

Effectively hide the face image interaction information in the algorithm, improve the security of the detection algorithm, and improve the accuracy and usability of the detection results through images with large attribute differences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113505756B_ABST
    Figure CN113505756B_ABST
Patent Text Reader

Abstract

The embodiment of the present specification provides a face liveness detection method, comprising: first, obtaining multiple face images captured continuously for a first user; then, for any target attribute among a plurality of pre-set image attributes, selecting two face images from the multiple face images, the difference between two attribute values ​​of the two face images corresponding to the target attribute reaching a predetermined standard; then, inputting the two face images together into a pre-trained face liveness detection model corresponding to the target attribute to obtain a detection result corresponding to the target attribute.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of machine learning technology, and more particularly, to a method and device for detecting liveness of a face. Background Art

[0002] Liveness detection is a technology that determines the real physiological characteristics of an object in some identity authentication scenarios. Face liveness detection is usually used in face recognition applications to verify whether the user is actually alive, thereby resisting attacks such as photos, face-swapping synthesis, masks, occlusions, etc., thereby preventing user identity theft, identifying fraud, and protecting user interests.

[0003] However, with the widespread application of face liveness detection technology, higher requirements are put forward for this application, such as the enhancement of security and user experience. Therefore, a face liveness detection solution is needed to ensure the security of the detection algorithm and improve the user experience when using related services. Summary of the invention

[0004] One or more embodiments of this specification describe a method and device for face liveness detection. During the detection process, the interaction between the shooting terminal and the user can be hidden, thereby effectively resisting attacks on the detection algorithm and effectively improving the user experience.

[0005] According to a first aspect, a face liveness detection method is provided, comprising: acquiring multiple face images captured continuously for a first user; selecting two face images from the multiple face images for any target attribute among a plurality of pre-set image attributes, wherein the difference between two attribute values ​​of the two face images corresponding to the target attribute reaches a predetermined standard; and inputting the two face images together into a pre-trained face liveness detection model corresponding to the target attribute to obtain a detection result corresponding to the target attribute.

[0006] In one embodiment, obtaining multiple facial images continuously captured for a first user includes: based on a user terminal of the first user, prompting the first user to adjust the shooting method to improve the quality of the facial image; during the prompting process, continuously shooting the multiple facial images through the user terminal.

[0007] In a specific embodiment, the prompting to adjust the shooting mode includes: prompting to adjust the position of the face relative to the user terminal; and / or prompting to adjust the light intensity of the shooting environment.

[0008] In one embodiment, for any target attribute among several preset image attributes, two facial images are selected from the multiple facial images, including: determining multiple attribute values ​​of the multiple facial images corresponding to the target attribute; based on the multiple attribute values, selecting two facial images from the multiple facial images whose differences between corresponding attribute values ​​meet a predetermined standard.

[0009] In a specific embodiment, when the target attribute is face size, determining multiple attribute values ​​of the multiple face images corresponding to the target attribute includes: inputting the multiple face images into a trained face detection model respectively to obtain multiple face regions corresponding to the multiple face images; and determining the areas of multiple face regions corresponding to the multiple face regions.

[0010] In another specific embodiment, when the target attribute is the size of facial organs, determining multiple attribute values ​​of the multiple facial images corresponding to the target attribute includes: inputting the multiple facial images into a trained facial organ detection model respectively to obtain multiple facial organ regions corresponding to the multiple facial images; and determining multiple organ region areas corresponding to the multiple facial organ regions.

[0011] In another specific embodiment, when the target attribute is light intensity, determining multiple attribute values ​​of the multiple facial images corresponding to the target attribute includes: inputting the multiple facial images into a trained light intensity assessment model respectively to obtain multiple light intensities.

[0012] On the other hand, in a specific embodiment, based on the multiple attribute values, two facial images whose corresponding attribute value differences meet a predetermined standard are selected from the multiple facial images, including: determining the maximum and minimum values ​​among the multiple attribute values ​​to obtain the corresponding two facial images.

[0013] In a specific embodiment, based on the multiple attribute values, two facial images whose corresponding attribute values ​​have a difference that meets a predetermined standard are selected from the multiple facial images, including: selecting two facial images whose corresponding attribute values ​​have a difference that is greater than a preset threshold value from the multiple facial images.

[0014] In one embodiment, the several image attributes are multiple image attributes; wherein, after obtaining the detection result corresponding to the target attribute, the method further includes: determining a final detection result for the first user based on multiple detection results corresponding to the multiple image attributes.

[0015] In a specific embodiment, based on multiple detection results corresponding to the multiple image attributes, determining the final detection result for the first user includes: when the multiple detection results all indicate that the first user has passed the face liveness detection, determining the final detection result as having passed the face liveness detection.

[0016] According to the second aspect, a face liveness detection device is provided, comprising: an image acquisition unit, configured to acquire multiple face images continuously captured for a first user; an image selection unit, configured to select two face images from the multiple face images for any target attribute among several preset image attributes, and the difference between two attribute values ​​of the two face images corresponding to the target attribute reaches a predetermined standard; a liveness detection unit, configured to input the two face images together into a pre-trained face liveness detection model corresponding to the target attribute, to obtain a detection result corresponding to the target attribute.

[0017] According to a third aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the method provided in the first aspect above.

[0018] According to a fourth aspect, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method provided in the above-mentioned first aspect is implemented.

[0019] By adopting the method and device provided in the embodiments of this specification, user interaction information related to facial images actually used in the algorithm can be effectively hidden, thereby improving the security of the face liveness detection algorithm. In addition, by using face images with large attribute differences to perform face liveness detection, the accuracy and usability of the detection results can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0021] Figure 1 A schematic diagram of an implementation architecture of face liveness detection according to an embodiment is shown;

[0022] Figure 2 A schematic diagram showing a flow chart of a method for face liveness detection according to an embodiment;

[0023] Figure 3A schematic structural diagram of a face liveness detection device according to an embodiment is shown. DETAILED DESCRIPTION

[0024] The solution provided in this specification is described below in conjunction with the accompanying drawings.

[0025] At present, face liveness detection technology is widely used. In one detection scheme, by asking the user to perform combined actions such as blinking, opening the mouth, shaking the head, and nodding, the facial key point positioning and face tracking technologies are used to verify whether the user is a real live person. However, this scheme exposes the user interaction actions in the detection algorithm, which can be easily exploited by attackers and attacked. In another detection scheme, there is no interaction with the user. However, this scheme makes it difficult to collect facial images with large changes, making the credibility of the detection results low.

[0026] Based on the above observations and analysis, the inventors proposed a new face liveness detection method, which can effectively hide the face motion images actually used in the algorithm, thereby improving the security of the detection algorithm, and can effectively improve the accuracy and usability of the detection results. Figure 1 A schematic diagram of an implementation architecture of face liveness detection according to an embodiment is shown. Figure 1 As shown, multiple facial images captured continuously for the first user are obtained, and N facial image pairs corresponding to N (a positive integer) image attributes are constructed based on the multiple facial images, and each pair of images has sufficient differences for the image attributes corresponding to them; then, any i-th facial image pair is input into the i-th face liveness detection model corresponding to the i-th image attribute to obtain the i-th detection result; then, the final detection result of face liveness detection for the first user can be determined based on the obtained N detection results. In this way, accurate face detection results can be obtained safely and efficiently.

[0027] The specific implementation steps of the above method are described below in conjunction with specific embodiments. Figure 2 A schematic diagram of a flow chart of a method for face liveness detection according to an embodiment is shown. The execution subject of the method may be any server, device or equipment cluster with computing and processing capabilities. Figure 2 As shown, the method comprises the following steps:

[0028] Step S210, obtaining multiple facial images continuously captured for the first user; Step S220, selecting two facial images from the multiple facial images for any target attribute among several pre-set image attributes, and the difference between two attribute values ​​of the two facial images corresponding to the target attribute reaches a predetermined standard; Step S230, inputting the two facial images together into a pre-trained face liveness detection model corresponding to the target attribute to obtain a detection result corresponding to the target attribute.

[0029] The above steps are expanded as follows:

[0030] First, in step S210, a plurality of facial images continuously captured of a first user are acquired.

[0031] In one implementation, the user can be made to feel that the image quality is being adjusted when recording a facial image, thereby achieving the capture of facial images with large differences. In this way, it is possible to avoid requiring the user to perform a specific combination of actions, such as blinking, opening the mouth, etc., which would reduce the user experience and the security of the detection algorithm. At the same time, it is possible to obtain enough facial images with large changes (including the user's shooting angle, the light of the shooting environment, etc.).

[0032] In one embodiment, this step may include: based on the user terminal of the first user, from the perspective of improving the quality of the face image, prompting the first user to adjust the shooting mode, and in this prompting process, continuously shooting the above-mentioned multiple face images through the user terminal. In a specific embodiment, prompting the first user to adjust the shooting mode may include: prompting the first user to adjust the position of his face relative to his user terminal. In one example, prompting the first user to keep his face at the center of the screen image. In one example, prompting the user to move away from or close to the user terminal to control the size of the face captured, or to capture his complete face. In another specific embodiment, prompting the first user to adjust the shooting mode may include: prompting the first user to adjust the light intensity of the shooting environment, for example, prompting the current environment light is too strong, asking the first user to move to a darker area for shooting, and for another example, prompting the current shooting environment is dark, asking the first user to increase the environment brightness. In this way, the user will make some adjustments according to the prompts, so that there will usually be photos with significant differences in the multiple face images captured continuously during the adjustment process.

[0033] On the other hand, in a specific embodiment, continuously photographing the plurality of facial images through the user terminal may include: continuously photographing the plurality of facial images at predetermined time intervals. In another specific embodiment, continuously photographing the plurality of facial images through the user terminal may include: continuously photographing a plurality of times until a predetermined number of facial images are obtained as the plurality of facial images.

[0034] In another implementation, the user may not be prompted to take a photo, but the user terminal may respond to the start trigger of the shooting function and take photos quickly and continuously to obtain the above-mentioned multiple facial images.

[0035] Thus, multiple facial images taken for the first user can be obtained. Then, in step S220, for any target attribute among the preset multiple image attributes, two facial images are selected from the multiple facial images, and the difference between the two attribute values ​​of the two facial images corresponding to the target attribute meets a predetermined standard.

[0036] It should be understood that the term "several" in the text refers to one or more, and the several image attributes may be preset by the staff according to actual experience. For example, the several image attributes may include the size or area of ​​the face region in the image, the size or area of ​​facial organs (such as nose, eyes, forehead, etc.), light intensity, etc. Each of the several image attributes may be used as a target attribute.

[0037] In one embodiment, this step may include: first determining multiple attribute values ​​corresponding to the target attribute of the above-mentioned multiple facial images, and then based on the multiple attribute values, selecting two facial images from the above-mentioned multiple facial images whose corresponding attribute value differences meet a predetermined standard.

[0038] In one embodiment, when the target attribute is the size of the face in the image, the determination of the corresponding multiple attribute values ​​may include: inputting the above multiple face images into a pre-trained face detection model respectively, obtaining multiple face regions corresponding to the multiple face images, and determining the multiple face region areas corresponding to the multiple face regions as multiple attribute values ​​corresponding to the face size attribute. In a specific embodiment, the face detection model can be implemented based on a convolutional neural network (CNN) or a deep neural network (DNN). In a specific embodiment, the face detection model can be implemented based on a target detection algorithm, specifically, a target detection model is trained with the face as the target object as the face detection model. Thus, by inputting any face image into the trained face detection model, a regression frame that selects the face position in the any face image can be obtained, and then the area surrounded by the regression frame is used as the corresponding face region.

[0039] In another embodiment, when the target attribute is the size of facial organs in an image, determining the corresponding multiple attribute values ​​may include: inputting the above-mentioned multiple face images into a pre-trained facial organ detection model, respectively, obtaining multiple facial organ regions corresponding to the multiple face images, and determining the multiple organ region areas corresponding to the multiple facial organ regions as multiple attribute values ​​corresponding to the facial organ size attribute. In a specific embodiment, facial organs may include glasses, nose, forehead, mouth, ears, etc., and the above-mentioned facial organ size may be the size of a certain facial organ, or the total size of several facial organs. In a specific embodiment, the facial organ detection model may be implemented based on a CNN network or a DNN network.

[0040] In a specific embodiment, the facial organ detection model can be implemented based on a target detection algorithm. Specifically, a target detection model is trained with facial organs as target objects as a facial organ detection model. Thus, by inputting any facial image into the trained facial organ detection model, a regression frame that selects the position of the facial organs in the any facial image can be obtained, and then the area surrounded by the regression frame is used as the corresponding facial organ area. According to an example, the above-mentioned facial organ size corresponds to the total size of multiple facial organs. Accordingly, the above-mentioned facial organ detection model may include multiple sub-models for correspondingly calibrating multiple sub-areas of multiple facial organs in any facial image, so that the sum of the areas of the multiple sub-areas is determined as the facial organ size corresponding to the any facial image.

[0041] In another embodiment, when the target attribute is the ambient light intensity in the image, determining the corresponding multiple attribute values ​​may include: inputting the above multiple face images into a pre-trained light intensity evaluation model to obtain multiple light intensities. In a specific embodiment, the light intensity evaluation model can be implemented based on a CNN network or a DNN network.

[0042] In the above, the target attributes are face size, facial organ size and ambient light intensity in the image, and the determination of multiple attribute values ​​corresponding to the target attributes of multiple face images is introduced. In fact, the target attribute can also be other image attributes, such as image color temperature, image saturation, etc.

[0043] Further, based on the determined multiple attribute values, two face images whose attribute values ​​corresponding to the target attribute have a difference that meets a predetermined standard are selected from the multiple face images. In one embodiment, the maximum value and the minimum value of the multiple attribute values ​​can be determined, and then the face image corresponding to the maximum value and the face image corresponding to the minimum value are used as the two face images corresponding to the target attribute. In another embodiment, two face images whose corresponding attribute values ​​have a difference greater than a preset threshold (denoted as k) can be selected from the multiple face images. In a specific embodiment, an attribute value (denoted as x) can be randomly selected from the multiple attribute values. a ), and then select a value greater than x from other attribute values a +k's attribute value x b , thus, the attribute value x a Corresponding face image and attribute value x b In another specific embodiment, the difference between any two attribute values ​​among the plurality of attribute values ​​can be calculated to obtain a plurality of difference values, and then a difference value is randomly selected from a plurality of difference values ​​greater than a predetermined threshold value among the plurality of difference values, and then the two face images corresponding to the difference value are used as the two face images corresponding to the target attribute.

[0044] As described above, two face images corresponding to the target attribute may be determined based on a plurality of attribute values ​​of the target attribute corresponding to a plurality of face images.

[0045] In another embodiment, based on multiple face images, the attribute value of a face image corresponding to the target attribute is first determined (denoted as x1), and then the attribute values ​​of other face images are determined one by one until the attribute value x1 determined for the jth time is j If the difference between the attribute value x1 and the attribute value x2 is greater than a predetermined threshold, the determination of the attribute value of the target attribute corresponding to the remaining face image is stopped, and the face image corresponding to the attribute value x1 and the attribute value x1 are combined. j The corresponding face images are used as two face images corresponding to the target attributes.

[0046] From the above, two face images corresponding to the target attribute can be selected from the acquired multiple face images to form a face image pair with significant difference under the target attribute. Then, in step S230, the face image pair is input into a pre-trained face liveness detection model corresponding to the above target attribute to obtain a detection result corresponding to the target attribute.

[0047] In one embodiment, the face liveness detection model can be implemented based on a DNN network, a CNN network, a Fast CNN or a Faster CNN. In one embodiment, the face liveness detection model can be implemented as a learning to compare model. In one embodiment, the face liveness detection model and the machine learning model (or attribute value prediction model for short) for determining the attribute value of the target attribute can be trained separately. For example, the attribute value prediction model corresponding to the target attribute is first trained, and then the face liveness detection model corresponding to the target attribute is trained based on the trained attribute value prediction model and the obtained multiple training image samples. In another embodiment, the face liveness detection model and the attribute value prediction model corresponding to the target attribute can be jointly trained.

[0048] It should be understood that the detection result corresponding to the target attribute indicates the face liveness detection result obtained based on the difference picture under the target attribute. For example, if the detection is passed, it is determined that the captured face image is from a real living user; or, if the detection is failed, it is determined that the captured face image is not from a real living user, and may actually be a re-shot of a color-printed face image.

[0049] From the above, the detection result corresponding to the target attribute can be obtained. Further, in one implementation, if the above-mentioned several image attributes are one, the detection result corresponding to this image attribute can be directly used as the final detection result. In another implementation, the above-mentioned several image attributes are multiple image attributes. Accordingly, by using these multiple image attributes as target attributes respectively, multiple detection results corresponding to the multiple image attributes can be obtained, and then, after the above-mentioned step S230, the final detection result for the first user can be determined based on the multiple detection results. In one embodiment, when the results indicating that the detection has passed reach a predetermined proportion (such as 70% or 100%) in multiple detection results, the final detection result is determined as the first user passing the face liveness detection, otherwise it is determined as failing. In another embodiment, each of the above-mentioned detection results includes a probability indicating a passed detection. Based on this, in a specific embodiment, these probabilities can be averaged, and when the average value is greater than a preset threshold (such as 80% or 90%), the final detection result is determined as the first user passing the face liveness detection, otherwise it is determined as failed; in another specific embodiment, different weights can be assigned to the above-mentioned multiple image attributes, and then the multiple probabilities contained in the multiple detection results are weighted and summed. When the weighted probability is greater than a preset threshold (such as 60% or 70%), the final detection result is determined as the first user passing the face liveness detection, otherwise it is determined as failed.

[0050] From the above, the final face liveness detection result of the first user can be determined. According to another aspect of the embodiment, the execution of the above method can be executed by a system that provides face liveness detection services. In one execution scenario, it can be executed by a system server; in another execution scenario, it can be executed jointly by a client and a server in the system. Specifically, the above-mentioned first user triggers the face liveness detection function through his client, and then the client processes multiple human images taken by the user terminal, selects the face image pairs corresponding to each of the above-mentioned several image attributes, and uploads the several face image pairs corresponding to the several image attributes to the server. After that, the server uses the several face liveness detection models corresponding to the several image attributes to process the several face image pairs accordingly, obtains several detection results, and then determines the final face liveness detection result for the first user based on the several detection results.

[0051] In summary, the face liveness detection method disclosed in the embodiments of this specification does not require the user to perform specific combined actions, can effectively hide the face images actually used in the algorithm, thereby improving the security of the detection algorithm, and, by using image pairs with large attribute differences for face liveness detection, the accuracy and usability of the detection results can be effectively improved.

[0052] Corresponding to the above detection method, the embodiments of this specification also disclose a detection device. Figure 3 FIG. 1 is a schematic diagram showing the structure of a face liveness detection device according to an embodiment, and the device can be implemented as any server or device cluster with computing and processing capabilities. Figure 3 As shown, the device 300 includes the following units:

[0053] The image acquisition unit 310 is configured to acquire multiple facial images continuously captured for the first user; the image selection unit 320 is configured to select two facial images from the multiple facial images for any target attribute among several pre-set image attributes, and the difference between two attribute values ​​of the two facial images corresponding to the target attribute meets a predetermined standard; the liveness detection unit 330 is configured to input the two facial images together into a pre-trained face liveness detection model corresponding to the target attribute to obtain a detection result corresponding to the target attribute.

[0054] In one embodiment, the image acquisition unit 310 is specifically configured to: based on the user terminal of the first user, prompt the first user to adjust the shooting method to improve the quality of the facial image; during the prompting process, continuously shoot the multiple facial images through the user terminal.

[0055] In a specific embodiment, the prompting to adjust the shooting mode includes: prompting to adjust the position of the face relative to the user terminal; and / or prompting to adjust the light intensity of the shooting environment.

[0056] In one embodiment, the image selection unit 320 includes: an attribute value determination subunit 321, configured to determine multiple attribute values ​​of the multiple facial images corresponding to the target attribute; an image selection subunit 322, configured to select two facial images whose corresponding attribute values ​​have a difference that meets a predetermined standard from the multiple facial images based on the multiple attribute values.

[0057] In a specific embodiment, when the target attribute is face size, the attribute value determination subunit 321 is specifically configured as follows: inputting the multiple face images into a trained face detection model respectively to obtain multiple face regions corresponding to the multiple face images; and determining the areas of multiple face regions corresponding to the multiple face regions.

[0058] In another specific embodiment, when the target attribute is the size of facial organs, the attribute value determination subunit 321 is specifically configured as follows: respectively inputting the multiple face images into a trained facial organ detection model to obtain multiple facial organ regions corresponding to the multiple face images; and determining the areas of multiple organ regions corresponding to the multiple facial organ regions.

[0059] In yet another specific embodiment, when the target attribute is light intensity, the attribute value determination subunit 321 is specifically configured as follows: inputting the multiple face images into the trained light intensity evaluation model respectively to obtain multiple light intensities.

[0060] On the other hand, in a specific embodiment, the image selection subunit 322 is specifically configured to: determine the maximum value and the minimum value of the multiple attribute values ​​to obtain the corresponding two face images.

[0061] In a specific embodiment, the image selection subunit 322 is specifically configured to select two face images whose corresponding attribute values ​​have a difference greater than a preset threshold from the multiple face images.

[0062] In a specific embodiment, the several image attributes are multiple image attributes; the device 300 also includes: a final result determination unit 340, configured to determine a final detection result for the first user based on multiple detection results corresponding to the multiple image attributes.

[0063] In a more specific embodiment, the final result determination unit 340 is specifically configured to: when the multiple detection results all indicate that the first user has passed the face liveness detection, determine the final detection result as having passed the face liveness detection.

[0064] In summary, the face liveness detection device disclosed in the embodiments of this specification does not require the user to perform specific combined actions, and can effectively hide the user interaction information related to the face image actually used in the algorithm, thereby improving the security of the detection algorithm. In addition, by using image pairs with large attribute differences to perform face liveness detection, the accuracy and usability of the detection results can be effectively improved.

[0065] According to another embodiment, there is also provided a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute a combination of Figure 2 The method described.

[0066] According to another embodiment of the present invention, a computing device is provided, including a memory and a processor, wherein an executable code is stored in the memory, and when the processor executes the executable code, the Figure 2 The method described.

[0067] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, firmware or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.

[0068] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for detecting liveness of a face, comprising: Acquire a plurality of facial images continuously captured for the first user, where the plurality of facial images are obtained by continuously shooting by the user terminal in response to a start trigger of a shooting function; For any target attribute among a plurality of preset image attributes, two face images are selected from the plurality of face images, and the difference between two attribute values ​​of the two face images corresponding to the target attribute meets a predetermined standard; Inputting the two face images together into a pre-trained face liveness detection model corresponding to the target attribute to obtain a detection result corresponding to the target attribute; Based on a plurality of detection results corresponding to the plurality of image attributes, a final detection result for the first user is determined.

2. The method according to claim 1, wherein: Acquiring multiple facial images continuously captured for a first user, including: Based on the user terminal of the first user, prompting the first user to adjust the shooting mode to improve the quality of the face image; During the prompting process, the plurality of face images are continuously photographed by the user terminal.

3. The method according to claim 2, wherein: The prompting to adjust the shooting mode includes: Prompt to adjust the position of the face relative to the user terminal; and / or, Tip: Adjust the light intensity of the shooting environment.

4. The method according to claim 1, wherein: For any target attribute of a plurality of preset image attributes, two face images are selected from the plurality of face images, including: Determining multiple attribute values ​​of the multiple facial images corresponding to the target attribute; Based on the multiple attribute values, two face images whose corresponding attribute values ​​have a difference that meets a predetermined standard are selected from the multiple face images.

5. The method according to claim 4, when the target attribute is face size, determining multiple attribute values ​​of the multiple face images corresponding to the target attribute comprises: Inputting the plurality of face images into the trained face detection model respectively to obtain a plurality of face regions corresponding to the plurality of face images; Determine the areas of multiple face regions corresponding to the multiple face regions.

6. The method according to claim 4, when the target attribute is the size of facial organs, determining multiple attribute values ​​of the multiple face images corresponding to the target attribute comprises: Inputting the plurality of face images into the trained facial organ detection model respectively to obtain a plurality of facial organ regions corresponding to the plurality of face images; A plurality of organ region areas corresponding to the plurality of facial organ regions are determined.

7. The method according to claim 4, when the target attribute is light intensity, determining multiple attribute values ​​of the multiple face images corresponding to the target attribute comprises: The multiple face images are respectively input into the trained light intensity evaluation model to obtain multiple light intensities.

8. The method according to claim 4, wherein: Based on the multiple attribute values, selecting two face images whose corresponding attribute values ​​have a difference that meets a predetermined standard from the multiple face images comprises: The maximum value and the minimum value of the multiple attribute values ​​are determined to obtain two corresponding face images.

9. The method according to claim 4, wherein: Based on the multiple attribute values, selecting two face images whose corresponding attribute values ​​have a difference that meets a predetermined standard from the multiple face images comprises: Two face images whose corresponding attribute values ​​have a difference greater than a preset threshold are selected from the multiple face images.

10. The method according to claim 1, wherein: Determining a final detection result for the first user based on a plurality of detection results corresponding to the plurality of image attributes includes: When the multiple detection results all indicate that the first user has passed the face liveness detection, the final detection result is determined as having passed the face liveness detection.

11. A face liveness detection device, comprising: An image acquisition unit, configured to acquire a plurality of facial images continuously captured for a first user, wherein the plurality of facial images are obtained by continuously photographing the user terminal in response to a start trigger of a photographing function; An image selection unit, configured to select two face images from the plurality of face images for any target attribute among a plurality of preset image attributes, wherein the difference between two attribute values ​​of the two face images corresponding to the target attribute meets a predetermined standard; A liveness detection unit configured to input the two face images together into a pre-trained face liveness detection model corresponding to the target attribute to obtain a detection result corresponding to the target attribute; The final result determining unit is configured to determine a final detection result for the first user based on a plurality of detection results corresponding to the plurality of image attributes.

12. The device according to claim 11, wherein The image acquisition unit is specifically configured as follows: Based on the user terminal of the first user, prompting the first user to adjust the shooting mode to improve the quality of the face image; During the prompting process, the plurality of face images are continuously photographed by the user terminal.

13. The device according to claim 12, wherein: The prompting to adjust the shooting mode includes: Prompt to adjust the position of the face relative to the user terminal; and / or, Tip: Adjust the light intensity of the shooting environment.

14. The device according to claim 11, wherein: The image selection unit comprises: an attribute value determination subunit, configured to determine a plurality of attribute values ​​corresponding to the target attribute of the plurality of face images; The image selection subunit is configured to select, based on the multiple attribute values, two face images whose corresponding attribute values ​​have a difference that meets a predetermined standard from the multiple face images.

15. The device according to claim 14, when the target attribute is face size, the attribute value determination subunit is specifically configured as follows: Inputting the plurality of face images into the trained face detection model respectively to obtain a plurality of face regions corresponding to the plurality of face images; Determine the areas of multiple face regions corresponding to the multiple face regions.

16. The device according to claim 14, when the target attribute is the size of facial organs, the attribute value determination subunit is specifically configured as follows: Inputting the plurality of face images into the trained facial organ detection model respectively to obtain a plurality of facial organ regions corresponding to the plurality of face images; A plurality of organ region areas corresponding to the plurality of facial organ regions are determined.

17. The device according to claim 14, when the target attribute is light intensity, the attribute value determination subunit is specifically configured as follows: The multiple face images are respectively input into the trained light intensity evaluation model to obtain multiple light intensities.

18. The device according to claim 14, wherein: The image selection subunit is specifically configured as follows: The maximum value and the minimum value of the multiple attribute values ​​are determined to obtain two corresponding face images.

19. The device according to claim 14, wherein: The image selection subunit is specifically configured as follows: Two face images whose corresponding attribute values ​​have a difference greater than a preset threshold are selected from the multiple face images.

20. The device according to claim 11, wherein The final result determination unit is specifically configured as follows: When the multiple detection results all indicate that the first user has passed the face liveness detection, the final detection result is determined as having passed the face liveness detection.

21. A computer-readable storage medium having a computer program stored thereon, wherein: When the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 10.

22. A computing device comprising a memory and a processor, wherein: The memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 10 is implemented.