Identity verification method and device

By collecting and calculating the attitude data of the verification device, the consistency between the attitude change amount and the instruction mode is judged, and identity verification is carried out based on image data, which solves the problems of inaccurate identity verification and poor user experience in the prior art, and improves the accuracy and reliability of identity verification.

CN119622691APending Publication Date: 2025-03-14BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411676451.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The existing face anti-counterfeiting technology has problems such as difficulty in defending against attacks, poor user experience, light irritation of eyes, limited scope of application, and too small posture change, resulting in inaccurate identity verification.

Method used

By collecting the first posture data and the second posture data of the verification device, the attitude change amount is calculated, and whether it is consistent with the mode indicated by the attitude change instruction. If it is consistent, identity verification is performed based on the image data.

Benefits of technology

It improves the accuracy and reliability of identity verification, improves the user experience, and avoids the problem of incomplete collection of attack clues caused by too small pose change.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622691A_ABST
    Figure CN119622691A_ABST
Patent Text Reader

Abstract

The invention discloses an identity verification method and device, and relates to the technical field of face anti-counterfeiting. The specific embodiment of the method comprises the following steps: in response to alignment of verification equipment and a verified object, collecting first attitude data of the verification equipment; sending a posture change instruction to the verification equipment, and collecting second posture data of the verification equipment; according to the first attitude data and the second attitude data, calculating an attitude change amount of the verification equipment, and judging whether the attitude change amount is consistent with an attitude change mode indicated by the attitude change instruction; and performing identity verification on the verified object based on the image data collected by the verification equipment in response to the consistency of the posture change quantity and the posture change mode. According to the embodiment, the situation that attack clues cannot be collected due to the fact that the posture change amplitude of verification equipment is too small is avoided, and the accuracy and reliability of identity verification are improved; and the condition that the user needs to make a specified action for matching verification is avoided, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of face anti-counterfeiting, and in particular to an identity verification method and device. Background Art

[0002] Currently, the following methods are usually used in the field of facial anti-counterfeiting to identify the face of the object being detected: 1. Identify the image being detected in a silent state; 2. Instruct the object being detected to make specific actions, such as opening the mouth, blinking, etc.; 3. Project specific light onto the face of the object being detected, and detect the reaction of the face of the object being detected to the specific light; 4. Move the detection device back and forth.

[0003] However, in the process of using the above method for facial recognition, the inventors found that the above method has the following problems: it is difficult to defend against attacks; the user experience is poor; the light will irritate the eyes of the detected object, and the scope of application is limited; when the moving distance is large, it can better defend against attacks, but it will cause distortion of the facial image taken by the camera; when the moving distance is small, it cannot achieve the purpose of better defense against attacks. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides an identity authentication method and device, including: in response to the alignment of the verification device and the object to be authenticated, collecting the first posture data of the verification device; issuing a posture change instruction to the verification device, and collecting the second posture data of the verification device; calculating the posture change amount of the verification device according to the first posture data and the second posture data, and judging whether the posture change amount is consistent with the posture change mode indicated by the posture change instruction; in response to the posture change amount being consistent with the posture change mode, performing identity authentication on the object to be authenticated based on the image data collected by the verification device. Thus, by collecting the posture data before and after the posture change of the verification device, calculating the amplitude and direction of the posture change, when it is determined that the amplitude and direction of the posture change of the verification device meet the preset requirements, performing identity authentication on the object to be authenticated based on the image data collected by the verification device, thereby avoiding the situation where the posture change amplitude of the verification device is too small to collect the attack clues, improving the accuracy and reliability of identity authentication; and also avoiding the situation where the user needs to make a specified action to cooperate with the authentication, improving the user experience.

[0005] To achieve the above objective, according to one aspect of an embodiment of the present invention, an identity authentication method is provided.

[0006] An identity authentication method according to an embodiment of the present invention includes: in response to alignment of a verification device with an object to be authenticated, collecting first posture data of the verification device; issuing a posture change instruction to the verification device, and collecting second posture data of the verification device; calculating a posture change amount of the verification device based on the first posture data and the second posture data, and determining whether the posture change amount is consistent with a posture change mode indicated by the posture change instruction; in response to the posture change amount being consistent with the posture change mode, authenticating the object to be authenticated based on the image data collected by the verification device.

[0007] Optionally, the posture change mode includes a target direction and a target angle of rotation of the verification device; the target direction includes one or more of the following directions: a first rotation direction corresponding to rotating the verification device with the horizontal center line of the front end face of the verification device as the rotation axis; a second rotation direction corresponding to rotating the verification device with the vertical center line of the front end face of the verification device as the rotation axis; a third rotation direction corresponding to rotating the verification device with a straight line perpendicular to the front end face of the verification device and passing through the center point of the front end face as the rotation axis.

[0008] Optionally, the posture change amount of the verification device is calculated based on the first posture data and the second posture data, including: calculating the actual rotation direction and actual rotation angle corresponding to the rotation of the verification device from the first posture to the second posture based on the acceleration and angular velocity included in the first posture data, and the acceleration and angular velocity included in the second posture data.

[0009] Optionally, determining whether the posture change amount is consistent with the posture change mode indicated by the posture change instruction includes: comparing the actual rotation direction with the target direction to determine whether the actual rotation direction is consistent with the target direction; comparing the actual rotation angle with the target angle to determine whether the actual rotation angle is consistent with the target angle; in response to the actual rotation direction being consistent with the target direction and the actual rotation angle being consistent with the target angle, determining that the posture change amount of the verification device is consistent with the posture change mode.

[0010] Optionally, identity verification of the object to be verified is performed based on the image data collected by the verification device, including: extracting background features in the image data and a first biometric feature of the object to be verified; judging whether the image data includes preset attack clues based on the background features and / or the first biometric feature; the attack clues include one or more of the following situations: image resolution is lower than a resolution threshold, reflectivity is higher than a reflectivity threshold, artifacts, moiré patterns, borders, and distortions; and identity verification of the object to be verified is performed based on the judgment result.

[0011] Optionally, judging whether the image data includes preset attack clues based on the first biometric feature includes: constructing a three-dimensional model corresponding to the object to be verified based on the first biometric feature; determining whether the captured image of the object to be verified is distorted based on the three-dimensional model; wherein, in the case where the object to be verified is a part of a 2D object, the attack clues included in the image data are distortions.

[0012] Optionally, based on the judgment result, the identity of the object to be verified is performed, including: in response to the image data not including attack clues, determining that the object to be verified is a living object; comparing the first biometric feature with a second biometric feature collected in advance for the object to be verified; in response to the first biometric feature being consistent with the second biometric feature, determining that the object to be verified has passed the identity authentication.

[0013] Optionally, in response to one or more of the following situations being included in the image data: image resolution being lower than a resolution threshold, reflectivity being higher than a reflectivity threshold, artifacts, moiré, borders, distortion, it is determined that the object being verified is a non-living object.

[0014] To achieve the above objective, according to another aspect of an embodiment of the present invention, an identity authentication device is provided.

[0015] An identity authentication device according to an embodiment of the present invention comprises: a data acquisition module for collecting first posture data of the verification device in response to the verification device being aligned with the object to be authenticated; and issuing a posture change instruction to the verification device and collecting second posture data of the verification device; a posture detection module for calculating the posture change amount of the verification device based on the first posture data and the second posture data, and judging whether the posture change amount is consistent with the posture change mode indicated by the posture change instruction; and an identity authentication module for authenticating the object to be authenticated based on the image data collected by the verification device in response to the posture change amount being consistent with the posture change mode.

[0016] To achieve the above objective, according to another aspect of an embodiment of the present invention, an electronic device for identity authentication is provided.

[0017] An electronic device for identity authentication according to an embodiment of the present invention comprises: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement an identity authentication method according to an embodiment of the present invention.

[0018] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided.

[0019] A computer-readable storage medium according to an embodiment of the present invention stores a computer program, and when the program is executed by a processor, an identity authentication method according to an embodiment of the present invention is implemented.

[0020] One embodiment of the above invention has the following advantages or beneficial effects: by responding to the alignment of the verification device with the object to be verified, the first posture data of the verification device is collected; a posture change instruction is issued to the verification device, and the second posture data of the verification device is collected; based on the first posture data and the second posture data, the posture change amount of the verification device is calculated, and it is determined whether the posture change amount is consistent with the posture change mode indicated by the posture change instruction; in response to the consistency of the posture change amount and the posture change mode, the identity of the object to be verified is performed based on the image data collected by the verification device. Thus, by collecting the posture data before and after the posture change of the verification device, the amplitude and direction of the posture change are calculated, and when it is determined that the amplitude and direction of the posture change of the verification device meet the preset requirements, the identity of the object to be verified is performed based on the image data collected by the verification device, thereby avoiding the situation where the posture change amplitude of the verification device is too small to collect attack clues, and improving the accuracy and reliability of identity authentication; it also avoids the situation where the user needs to make a specified action to cooperate with the verification, and improves the user experience.

[0021] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0023] Figure 1 is a schematic diagram of main steps of an identity authentication method according to an embodiment of the present invention;

[0024] Figure 2 is a schematic diagram of a posture change mode of a verification device according to an embodiment of the present invention;

[0025] Figure 3 is a schematic diagram of main steps of another identity authentication method according to an embodiment of the present invention;

[0026] Figure 4 is a schematic diagram of main steps of another identity authentication method according to an embodiment of the present invention;

[0027] Figure 5 is a schematic diagram of main modules of an identity authentication device according to an embodiment of the present invention;

[0028] Figure 6 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0029] Figure 7 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0030] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0031] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.

[0032] It should be pointed out that the embodiments of the present invention and the technical features therein may be combined with each other without conflict.

[0033] Figure 1 is a schematic diagram of main steps of an identity authentication method according to an embodiment of the present invention.

[0034] like Figure 1 As shown, the identity authentication method of the embodiment of the present invention mainly includes steps S101-S104.

[0035] Step S101: In response to the verification device being aligned with the object to be verified, first posture data of the verification device is collected. The execution subject of the identity authentication method of the embodiment of the present invention is the server. The server can be deployed remotely or on the verification device. The verification device is a device that collects image information of the object to be verified, such as a camera, a device with a camera, such as a mobile phone, a camera and other image acquisition devices.

[0036] The object to be verified is the whole body (whole body) of a living organism (such as a person) or a part of a living organism (such as a face, a hand, an eye, etc.). In the embodiment of the present invention, the verification device is a mobile phone as an example, and the identity authentication method provided by the embodiment of the present invention is described in detail. When performing identity authentication, it is necessary to start the verification device, such as the camera of a mobile phone, and align the image acquisition frame with the object to be verified. Among them, alignment refers to the whole body, face, hand or eye of the object to be verified, etc., within the image acquisition frame. Further, alignment can also refer to the whole body, face, hand or eye of the object to be verified, etc., in the center position of the image acquisition frame. To determine whether the verification device is aligned with the object to be verified, the camera can be used to try to collect data to determine whether the collected data includes the complete part to be verified, such as determining whether the collected data includes the complete whole body, whether it includes the complete face, hand, and eye, etc., and when it is determined that the verification device can collect the complete part to be verified, it is determined that the verification device and the object to be verified are aligned.

[0037] After determining that the verification device and the verified device are aligned, the first posture data of the verification device is collected. The first posture data refers to the inertial data of the verification device. The inertial data refers to the data measured by the inertial sensors such as the gyroscope, accelerometer, and magnetometer equipped by the verification device itself. After the first posture data is collected, a posture change instruction is sent to the verification device through the server to instruct the verification device to change its posture according to the posture change instruction. The verification device can automatically change its posture according to the posture change instruction, or the user can change the posture of the verification device according to the posture change instruction. The posture change instruction can be displayed on the display screen of the verification device, and the user sees the prompt of the posture change instruction on the display screen, and changes the posture of the verification device, such as rotating the verification device according to the target direction and target angle indicated by the posture change instruction.

[0038] Step S102: Send a posture change instruction to the verification device, and collect the second posture data of the verification device. Start collecting the posture data of the verification device from the time the posture change instruction is sent to the verification device, and start timing at the same time. When the timing reaches a preset time, stop collecting the posture data of the verification device, that is, the inertia data of the verification device, and use the posture data of the verification device collected within the preset time as the second posture data. The preset time is determined based on historical experience in anti-attack.

[0039] Step S103: Calculate the posture change amount of the verification device according to the first posture data and the second posture data, and determine whether the posture change amount is consistent with the posture change mode indicated by the posture change instruction. By comparing the inertial data of the verification device before the posture change with the inertial data of the verification device after the posture change, the direction and angle corresponding to the posture change of the verification device can be determined, that is, the direction and angle of rotation of the verification device are determined. Further, determine whether the direction and angle of rotation of the verification device reach the target direction and target angle indicated by the posture change instruction. In the case where the direction and angle of rotation of the verification device reach the target direction and target angle indicated by the posture change instruction, it is determined that the posture change of the verification device meets the requirements of identity authentication. Among them, the target direction and target angle are determined according to the actual identity authentication requirements, such as according to the requirements of excluding injection attacks and presentation attacks in identity authentication, and according to the attack defense effect to be achieved, determine which direction or directions the target direction is and how many degrees the target angle is. It can be understood that the more target directions and the larger the target angle, the better the effect of its defense attack; but the effect of image acquisition and the complexity of operation should also be considered. In practical applications, it is necessary to compromise based on the above multiple factors to determine a reasonable target direction and target angle.

[0040] In an optional embodiment of the present invention, the posture change mode includes verifying the target direction and target angle of the device rotation; Figure 2 As shown, the target direction includes one or more of the following directions: the first rotation direction A corresponding to the rotation axis when the verification device is rotated with the horizontal center line of the front end face of the verification device as the rotation axis; the second rotation direction B corresponding to the rotation axis when the verification device is rotated with the vertical center line of the front end face of the verification device as the rotation axis; the third rotation direction C corresponding to the rotation axis when the verification device is rotated with a straight line perpendicular to the front end face of the verification device and passing through the center point of the front end face as the rotation axis. In order to ensure that the object to be verified is in the image acquisition frame of the verification device and the image acquisition effect can meet the needs of identity authentication, the rotation direction and rotation angle of the verification device should not be too large.

[0041] Taking the verification device as a mobile phone as an example, the rotation direction of the verification device is described. The mobile phone can rotate around the horizontal center line of the mobile phone screen, with the upper part of the mobile phone close to the object to be verified and the lower part of the mobile phone away from the object to be verified, or around the horizontal center line of the mobile phone screen, with the upper part of the mobile phone away from the object to be verified and the lower part of the mobile phone close to the object to be verified. Figure 2 The mobile phone can also rotate around the vertical center line of the mobile phone screen, with the left part of the mobile phone close to the object to be authenticated and the right part of the mobile phone away from the object to be authenticated, or around the vertical center line of the mobile phone screen, with the left part of the mobile phone away from the object to be authenticated and the right part of the mobile phone close to the object to be authenticated, as shown in FIG. Figure 2The mobile phone can also rotate about a straight line perpendicular to the mobile phone screen and passing through the center point of the mobile phone screen, with the upper part of the mobile phone turning left and the lower part of the mobile phone turning right, or about a straight line perpendicular to the mobile phone screen and passing through the center point of the mobile phone screen, with the lower part of the mobile phone turning left and the upper part of the mobile phone turning right, as shown in FIG. Figure 2 As shown in C in FIG. One or more of the above rotation directions can be selected as the target direction for changing the posture of the verification device. In addition, the target angle of rotation of the verification device is also determined by taking into account factors such as the attack defense effect and the image acquisition effect. The target angle can be 10°, 15° or 20°, etc. It can be understood that the target direction and target angle are not limited to the directions and angles listed above.

[0042] In an optional embodiment of the present invention, the posture change amount of the verification device is calculated according to the first posture data and the second posture data, including: according to the acceleration and angular velocity included in the first posture data, and the acceleration and angular velocity included in the second posture data, the actual rotation direction and actual rotation angle corresponding to the rotation of the verification device from the first posture to the second posture are calculated. Specifically, according to the acceleration and angular velocity included in the inertial data of the verification device before the posture change, the direction and angle of the verification device before the posture change are determined, and the direction and angle of the verification device after the posture change are determined according to the acceleration included in the inertial data after the posture change of the verification device. The direction before the posture change and the direction after the posture change are compared to determine the rotation direction of the verification device; the angle before the posture change and the angle after the posture change are compared to determine the rotation angle of the verification device, thereby obtaining the actual rotation direction and rotation angle of the verification device for this posture change. What is described here is the case of one rotation, wherein completing one rotation means that the verification device rotates from the initial state and then returns to the initial state. For each rotation, the second posture data is collected once. If there are multiple rotations, it is the superposition of multiple single rotations. For multiple rotations, it is necessary to collect multiple second posture data, and compare the multiple second posture data with the first posture data respectively to determine whether each rotation meets the direction and angle requirements indicated by the posture change instruction.

[0043] In order to prevent the situation that the rotation amplitude of the verification device is not enough and the attack clues in the background cannot be collected, in an optional embodiment of the present invention, it is determined whether the posture change amount is consistent with the posture change mode indicated by the posture change instruction, including: comparing the actual rotation direction with the target direction to determine whether the actual rotation direction is consistent with the target direction; comparing the actual rotation angle with the target angle to determine whether the actual rotation angle is consistent with the target angle; in response to the actual rotation direction being consistent with the target direction and the actual rotation angle being consistent with the target angle, it is determined that the posture change amount of the verification device is consistent with the posture change mode. Specifically, for example, if the target direction is to rotate around the horizontal center line of the mobile phone screen, and the upper part of the mobile phone is close to the object to be verified, and the lower part of the mobile phone is away from the object to be verified, it is determined whether the actual rotation direction of the mobile phone is to rotate around the horizontal center line of the mobile phone screen, the upper part of the mobile phone is close to the object to be verified, and the lower part of the mobile phone is away from the object to be verified. If so, it is determined that the actual rotation direction is consistent with the target direction; then the actual rotation angle, such as 15°, is equal to the target angle, such as 15°, and the actual rotation angle is determined to be consistent with the target angle. In addition, the actual rotation angle is 16°, which is greater than the target angle, and it can also be considered that the actual rotation angle is consistent with the target angle. When the actual rotation direction and the actual rotation angle are consistent with the target direction and the target angle, it is determined that the posture change meets the preset requirements, that is, the posture change meets the identity verification requirements. In this case, the image data collected by the verification device can be used for further identity verification.

[0044] Step S104: in response to the posture change amount being consistent with the posture change pattern, performing identity authentication on the object to be authenticated based on the image data collected by the authentication device.

[0045] In an optional embodiment of the present invention, the identity of the object to be verified is performed based on the image data collected by the verification device, including: extracting background features in the image data and the first biometric features of the object to be verified; judging whether the image data includes preset attack clues according to the background features and / or the first biometric features; the attack clues include one or more of the following situations: the image resolution is lower than the resolution threshold, the reflectivity is higher than the reflectivity threshold, artifacts, moiré, borders, distortion; according to the judgment result, the identity of the object to be verified is performed. The types of attacks that the identity verification method of this embodiment can defend against are injection attacks and presentation attacks, wherein the injection attack refers to a face video prepared in advance by the attacker. After hijacking the verification device, the image data collected by the image data acquisition program comes from this face video. For example, some black and gray industries have developed some ROMs, and after flashing the mobile phone, the mobile phone camera can obtain data from the specified video file. In addition, the presentation attack is to display a 2D object (paper, screen photos, videos on the screen, etc.) in front of the mobile phone camera, and the image data acquisition program still collects through the camera of the verification device, but the collected data comes from these 2D objects. Both injection attacks and presentation attacks are non-live attacks.

[0046] Based on the injection attack and presentation attack described above, the collected image data usually has the following conditions: image resolution is lower than the resolution threshold, reflectivity is higher than the reflectivity threshold, artifacts, moiré, borders, and distortion. Therefore, according to the background features and biometric features included in the image data, determine whether the image corresponding to the image data includes one or more of the following conditions: image resolution is lower than the resolution threshold, reflectivity is higher than the reflectivity threshold, artifacts, moiré, borders, and distortion, so as to determine whether the object to be verified is a non-living attack, i.e., an injection attack or a presentation attack. After determining that the object to be verified is a non-living attack, end this verification and issue a prompt message indicating that the object to be verified is a non-living object; when determining that the object to be verified is a living object, further feature comparison is performed based on the collected image data to determine whether the object to be verified is the target object.

[0047] In an optional embodiment of the present invention, judging whether the image data includes a preset attack clue according to the first biometric feature includes: constructing a three-dimensional model corresponding to the object to be verified according to the first biometric feature; determining whether the collected image of the object to be verified is distorted according to the three-dimensional model; wherein, in the case where the object to be verified is a part of a 2D object, the attack clue included in the image data is distortion. In the case where the image data including image resolution lower than a resolution threshold, reflectivity higher than a reflectivity threshold, artifacts, moiré, borders, etc. is not detected, it is also possible to determine whether the object to be verified is a non-living object by constructing a three-dimensional model. That is to say, in the case where the attacker hides the picture border or the screen border well, or adjusts the screen brightness, clarity, etc. so that the attack cannot be discovered, a three-dimensional model is constructed by the biometric features in the image data, and it is determined whether the facial features presented by the three-dimensional model are distorted. If so, it is determined that the object to be verified is a non-living object, that is, a part of a 2D object, and the 2D object can be a paper picture, a screen picture, etc.

[0048] Determining that the verified object is a live object does not determine that the verified object has passed the identity authentication. For example, the purpose of this verification is to verify whether the verified object is the target object, Zhang San. Determining that the verified object is a live object does not determine whether the live object is Zhang San, so it is necessary to further determine whether the live object is Zhang San. In an optional embodiment of the present invention, according to the judgment result, the identity authentication of the verified object includes: in response to the image data not including the attack clue, determining that the verified object is a live object; comparing the first biometric feature with the second biometric feature pre-collected from the verified object; in response to the first biometric feature being consistent with the second biometric feature, determining that the verified object has passed the identity authentication. Before the verification, the biometric features of the target object, such as facial features, iris features, etc., have been collected and saved. Therefore, after determining that the verified object is a live object, the biometric features included in the image data are compared with the pre-collected biometric features. If the comparison result indicates that the biometric features collected this time are consistent with the pre-collected biometric features, it is determined that the verified object is the target object, it is determined that the verified object has passed the identity authentication, and this verification is ended.

[0049] In an optional embodiment of the present invention, in response to one or more of the following conditions included in the image data: image resolution is lower than a resolution threshold, reflectivity is higher than a reflectivity threshold, artifacts, moiré, borders, distortion, etc., the object to be verified is determined to be a non-living object. In the case where the image data includes attack clues, the object to be verified is determined to be a non-living object, and a prompt message is sent to the verification device to inform the user that the object to be verified is at risk.

[0050] The identity authentication method of this embodiment is further illustrated below with a specific embodiment. The identity authentication method of this embodiment mainly includes the following steps S301-S307, such as Figure 3 As shown:

[0051] Step S301: In response to the verification device being aligned with the object to be verified, first posture data of the verification device is collected.

[0052] Step S302: sending a posture change instruction to the verification device, and collecting second posture data of the verification device.

[0053] Step S303: Calculate the actual rotation direction and actual rotation angle of the verification device from the first posture to the second posture according to the acceleration and angular velocity included in the first posture data and the second posture data.

[0054] Step S304: Determine whether the actual rotation direction is consistent with the target direction, if yes, execute step S305; if not, execute step S302.

[0055] Step S305: Determine whether the actual rotation angle is consistent with the target angle, if yes, execute step S306; if not, execute step S302.

[0056] Step S306: Determine whether the posture change amount of the verification device is consistent with the posture change mode.

[0057] Step S307: Authentication of the identity of the object to be authenticated is performed based on the image data collected by the authentication device.

[0058] The identity authentication method of this embodiment is further illustrated below with another specific embodiment. The identity authentication method of this embodiment mainly includes the following steps S401-S408, such as Figure 4 As shown:

[0059] Step S401: extracting background features and first biometric features of the object to be authenticated from the image data.

[0060] Step S402: Based on the background features and / or the first biometric features, determine whether the image data includes one or more of the following: image resolution lower than a resolution threshold, reflectivity higher than a reflectivity threshold, artifacts, moiré patterns, and borders; if so, execute step S407; if not, execute step S403.

[0061] Step S403: constructing a three-dimensional model corresponding to the object to be verified according to the first biological feature.

[0062] Step S404: Determine whether the acquired image of the object to be verified is distorted according to the three-dimensional model. If so, execute step S407; if not, execute step S405.

[0063] Step S405: Determine whether the first biometric feature is consistent with the second biometric feature collected in advance from the object to be verified. If yes, execute step S406; if not, execute step S408.

[0064] Step S406: Determine whether the authenticated object has passed the identity authentication.

[0065] Step S407: Determine that the object to be authenticated is a non-living object.

[0066] Step S408: Determine whether the authenticated object has not passed identity authentication.

[0067] The identity authentication method of the embodiment of the present invention collects the first posture data of the verification device in response to the alignment of the verification device with the object to be authenticated; issues a posture change instruction to the verification device and collects the second posture data of the verification device; calculates the posture change amount of the verification device based on the first posture data and the second posture data, and determines whether the posture change amount is consistent with the posture change mode indicated by the posture change instruction; in response to the consistency between the posture change amount and the posture change mode, authenticates the object to be authenticated based on the image data collected by the verification device. Thus, by collecting the posture data before and after the posture change of the verification device, the amplitude and direction of the posture change are calculated, and when it is determined that the amplitude and direction of the posture change of the verification device meet the preset requirements, the object to be authenticated is authenticated based on the image data collected by the verification device, thereby avoiding the situation where the posture change amplitude of the verification device is too small to collect attack clues, improving the accuracy and reliability of identity authentication; and also avoiding the situation where the user needs to make a specified action to cooperate with the authentication, improving the user experience.

[0068] Figure 5 Schematic diagram of main modules of an identity authentication device according to an embodiment of the present invention.

[0069] like Figure 5 As shown, the identity authentication device 500 of the embodiment of the present invention includes:

[0070] The data collection module 501 is used to collect first posture data of the verification device in response to the verification device being aligned with the object to be verified; and to send a posture change instruction to the verification device and collect second posture data of the verification device;

[0071] The posture detection module 502 is used to calculate the posture change amount of the verification device according to the first posture data and the second posture data, and determine whether the posture change amount is consistent with the posture change mode indicated by the posture change instruction;

[0072] The identity verification module 503 is configured to verify the identity of the verified object based on the image data collected by the verification device in response to the consistency between the posture change amount and the posture change mode.

[0073] In an optional embodiment of the present invention, the posture change mode includes a target direction and a target angle of rotation of the verification device; the target direction includes one or more of the following directions: a first rotation direction corresponding to rotating the verification device with the horizontal center line of the front end face of the verification device as the rotation axis; a second rotation direction corresponding to rotating the verification device with the vertical center line of the front end face of the verification device as the rotation axis; a third rotation direction corresponding to rotating the verification device with a straight line perpendicular to the front end face of the verification device and passing through the center point of the front end face as the rotation axis.

[0074] In an optional embodiment of the present invention, the posture detection module 502 is also used to calculate the actual rotation direction and actual rotation angle corresponding to the rotation of the verification device from the first posture to the second posture based on the acceleration and angular velocity included in the first posture data and the acceleration and angular velocity included in the second posture data.

[0075] In an optional embodiment of the present invention, the posture detection module 502 is also used to compare the actual rotation direction with the target direction to determine whether the actual rotation direction is consistent with the target direction; compare the actual rotation angle with the target angle to determine whether the actual rotation angle is consistent with the target angle; in response to the actual rotation direction being consistent with the target direction and the actual rotation angle being consistent with the target angle, determine that the posture change amount of the verification device is consistent with the posture change pattern.

[0076] In an optional embodiment of the present invention, the identity authentication module 503 is used to extract background features in the image data and the first biometric features of the object to be authenticated; based on the background features and / or the first biometric features, determine whether the image data includes preset attack clues; the attack clues include one or more of the following situations: image resolution is lower than the resolution threshold, reflectivity is higher than the reflectivity threshold, artifacts, moiré patterns, borders, distortion; based on the judgment result, authenticate the identity of the object to be authenticated.

[0077] In an optional embodiment of the present invention, the identity authentication module 503 is further used to construct a three-dimensional model corresponding to the object to be authenticated based on the first biometric feature; and determine whether the collected image of the object to be authenticated is distorted based on the three-dimensional model; wherein, when the object to be authenticated is a part of a 2D object, the attack clue included in the image data is distortion.

[0078] In an optional embodiment of the present invention, the identity authentication module 503 is further used to determine that the object to be authenticated is a living object in response to the image data not including attack clues; compare the first biometric feature with the second biometric feature collected in advance for the object to be authenticated; and determine that the object to be authenticated has passed the identity authentication in response to the first biometric feature being consistent with the second biometric feature.

[0079] In an optional embodiment of the present invention, the identity authentication module 503 is also used to determine that the object being authenticated is a non-living object in response to one or more of the following situations in the image data: image resolution is lower than a resolution threshold, reflectivity is higher than a reflectivity threshold, artifacts, moiré patterns, borders, distortion, etc.

[0080] The identity authentication device of the embodiment of the present invention collects the first posture data of the verification device in response to the alignment of the verification device with the object to be authenticated; sends a posture change instruction to the verification device and collects the second posture data of the verification device; calculates the posture change amount of the verification device based on the first posture data and the second posture data, and determines whether the posture change amount is consistent with the posture change mode indicated by the posture change instruction; in response to the consistency between the posture change amount and the posture change mode, authenticates the object to be authenticated based on the image data collected by the verification device. Thus, by collecting the posture data before and after the posture change of the verification device, the amplitude and direction of the posture change are calculated, and when it is determined that the amplitude and direction of the posture change of the verification device meet the preset requirements, the identity authentication of the object to be authenticated is performed based on the image data collected by the verification device, thereby avoiding the situation where the posture change amplitude of the verification device is too small to collect attack clues, improving the accuracy and reliability of identity authentication; and also avoiding the situation where the user needs to make a specified action to cooperate with the authentication, improving the user experience.

[0081] Figure 6 An exemplary system architecture 600 is shown to which the identity authentication method or the identity authentication device according to the embodiment of the present invention can be applied.

[0082] like Figure 6 As shown, system architecture 600 may include verification device 601, network 602, and server 603. Network 602 is a medium for providing a communication link between verification device 601 and server 603. Network 602 may include various connection types, such as wired, wireless communication links or fiber optic cables, etc.

[0083] The verification device 601 interacts with the server 603 through the network 602 to receive or send messages, etc. The verification device 601 is a device that collects image data of the object to be verified and performs identity authentication based on the image data, such as a mobile phone. The server 603 obtains posture data and image data from the verification device 601, analyzes the posture data and image data, obtains identity authentication results, and sends the identity authentication results to the verification device 601.

[0084] The server 603 may be a server that provides various services, for example, the server 603 is a background management server that obtains posture data and image data from the verification device 601 and provides support for analyzing and processing the posture data and image data. The background management server may analyze and process the acquired posture data and image data, and send the processing results, such as identity authentication results, to the verification device 601.

[0085] It should be noted that the identity authentication method provided in the embodiment of the present invention is generally executed by the server 603 , and accordingly, the identity authentication device is generally disposed in the server 603 .

[0086] It should be understood that Figure 6 The number of servers, networks, and verification devices in the figure is only for illustration purposes. Any number of servers, networks, and verification devices may be provided as required.

[0087] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of an electronic device suitable for implementing an embodiment of the present invention. Figure 7 The platform end shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0088] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the computer system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0089] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.

[0090] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.

[0091] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0092] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0093] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be arranged in a processor, for example, it may be described as: a processor includes a data acquisition module, a posture detection module and an identity authentication module. The names of these modules do not constitute a limitation on the modules themselves in some cases, for example, the identity authentication module may also be described as a "module for authenticating the authenticated object".

[0094] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: in response to the verification device being aligned with the object to be verified, collecting the first posture data of the verification device; issuing a posture change instruction to the verification device, and collecting the second posture data of the verification device; calculating the posture change amount of the verification device based on the first posture data and the second posture data, and judging whether the posture change amount is consistent with the posture change mode indicated by the posture change instruction; in response to the posture change amount being consistent with the posture change mode, performing identity authentication on the object to be verified based on the image data collected by the verification device.

[0095] According to the technical solution of the embodiment of the present invention, in response to the alignment of the verification device with the object to be verified, the first posture data of the verification device is collected; a posture change instruction is issued to the verification device, and the second posture data of the verification device is collected; based on the first posture data and the second posture data, the posture change amount of the verification device is calculated, and it is determined whether the posture change amount is consistent with the posture change mode indicated by the posture change instruction; in response to the consistency between the posture change amount and the posture change mode, the identity of the object to be verified is performed based on the image data collected by the verification device. Thus, by collecting the posture data before and after the posture change of the verification device, the amplitude and direction of the posture change are calculated, and when it is determined that the amplitude and direction of the posture change of the verification device meet the preset requirements, the identity of the object to be verified is performed based on the image data collected by the verification device, thereby avoiding the situation where the posture change amplitude of the verification device is too small to collect attack clues, and improving the accuracy and reliability of identity authentication; it also avoids the situation where the user needs to make a specified action to cooperate with the verification, and improves the user experience.

[0096] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. An identity authentication method, characterized in that: include: In response to the verification device being aligned with the object to be verified, collecting first posture data of the verification device; Sending a posture change instruction to the verification device and collecting second posture data of the verification device; Calculating a posture change amount of the verification device according to the first posture data and the second posture data, and determining whether the posture change amount is consistent with a posture change mode indicated by the posture change instruction; In response to the posture change amount being consistent with the posture change pattern, identity verification is performed on the object to be verified based on the image data collected by the verification device.

2. The method according to claim 1, characterized in that The posture change mode includes a target direction and a target angle of rotation of the verification device; The target direction includes one or more of the following directions: A first rotation direction corresponding to rotating the verification device with the transverse center line of the front end surface of the verification device as the rotation axis; A second rotation direction corresponding to rotating the verification device with the vertical center line of the front end surface of the verification device as the rotation axis; The third rotation direction corresponds to rotating the verification device with a straight line passing through the center point of the front end face in a direction perpendicular to the front end face of the verification device as the rotation axis.

3. The method according to claim 2, characterized in that The step of calculating the posture change amount of the verification device according to the first posture data and the second posture data includes: According to the acceleration and angular velocity included in the first posture data and the acceleration and angular velocity included in the second posture data, the actual rotation direction and actual rotation angle corresponding to the rotation of the verification device from the first posture to the second posture are calculated.

4. The method according to claim 3, characterized in that: The determining whether the posture change amount is consistent with the posture change mode indicated by the posture change instruction includes: Comparing the actual rotation direction with the target direction to determine whether the actual rotation direction is consistent with the target direction; Comparing the actual rotation angle with the target angle to determine whether the actual rotation angle is consistent with the target angle; In response to the actual rotation direction being consistent with the target direction and the actual rotation angle being consistent with the target angle, it is determined that the posture change amount of the verification device is consistent with the posture change pattern.

5. The method according to claim 1, characterized in that The performing identity authentication on the object to be authenticated based on the image data collected by the authentication device includes: Extracting background features and a first biometric feature of a verified object from the image data; According to the background feature and / or the first biometric feature, determining whether the image data includes a preset attack clue; the attack clue includes one or more of the following situations: image resolution is lower than a resolution threshold, reflectivity is higher than a reflectivity threshold, artifacts, moiré, borders, distortion; According to the judgment result, the identity of the object to be authenticated is performed.

6. The method according to claim 5, characterized in that The determining, based on the first biometric feature, whether the image data includes a preset attack clue includes: constructing a three-dimensional model corresponding to the object to be verified according to the first biometric feature; According to the three-dimensional model, it is determined whether the collected image of the object to be verified is distorted; wherein, in the case that the object to be verified is a part of a 2D object, the attack clue included in the image data is distortion.

7. The method according to claim 5, characterized in that The step of performing identity authentication on the object to be authenticated according to the judgment result includes: In response to the image data not including the attack clue, determining that the authenticated object is a living object; Comparing the first biometric feature with a second biometric feature collected in advance from the object to be authenticated; In response to the first biometric feature being consistent with the second biometric feature, it is determined that the authenticated object has passed the identity authentication.

8. The method according to claim 5, characterized in that Also includes: In response to one or more of the following conditions being included in the image data: image resolution being lower than a resolution threshold, reflectivity being higher than a reflectivity threshold, artifacts, moiré patterns, borders, and distortion, it is determined that the object being verified is a non-living object.

9. An identity verification device, characterized in that: include: A data collection module, configured to collect first posture data of the verification device in response to the verification device being aligned with the object to be verified; and issuing a posture change instruction to the verification device, and collecting second posture data of the verification device; A posture detection module, used to calculate the posture change amount of the verification device according to the first posture data and the second posture data, and determine whether the posture change amount is consistent with the posture change mode indicated by the posture change instruction; The identity authentication module is used for, in response to the posture change amount being consistent with the posture change pattern, to authenticate the identity of the object to be authenticated based on the image data collected by the authentication device.

10. An electronic device for identity authentication, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.

11. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

12. A computer program product, comprising a computer program, characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.