Face feature hash-based identity authentication method and device

CN119720162BActive Publication Date: 2026-09-11SHANGHAI JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411539634.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2026-09-11
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

[0006]本发明提供一种基于人脸特征哈希的身份认证方法及装置,用以解决现有技术中人脸认证方法存在人脸数据泄露风险并且受光线等环境影响导致识别准确度低的缺陷,实现安全、快捷、准确、不受光线等环境影响的身份认证

Benefits of technology

[0048]本发明提供的基于人脸特征哈希的身份认证方法及装置,通过获取当前登录的第一用户的第一人脸图像和第一用户信息,其中,所述第一用户信息至少包括第一用户身份信息和第一文本口令;提取所述第一人脸图像的第一人脸特征,并对所述第一人脸特征进行量化处理,得到第一人脸特征向量;将所述第一人脸特征向量进行哈希运算得到所述第一用户对应的第一人脸特征哈希值;验证所述第一人脸特征哈希值与预先存储的目标用户的目标人脸特征哈希值是否一致;若是,则验证所述第一用户信息中的第一用户身份信息与预先存储的所述目标用户的目标用户身份信息是否一致;若是,则确定所述当前登录的第一用户的身份认证通过。相比于现有技术中人脸信息的传输和储存可能导致个人信息泄露、人脸识别技术在识别过程中可能受到光线、角度、遮挡等因素的影响,导致准确性不足,容易出现误识别或拒绝识别的问题,由本方案,通过人脸特征向量的量化生成哈希值作为用户口令的一部分进行身份认证,实现安全、快捷、准确、不受角度、光照等条件约束的身份认证,提升用户体验。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119720162B_ABST
    Figure CN119720162B_ABST
Patent Text Reader

Abstract

The embodiment of the present application relates to the technical field of data processing and identity authentication, and provides an identity authentication method and device based on face feature hashing, which comprises the following steps: obtaining a first face image of a first user currently logged in and first user information, wherein the first user information at least comprises first user identity information and a first text password; extracting a first face feature of the first face image, and performing quantization processing on the first face feature to obtain a first face feature vector and perform a hash operation to obtain a first face feature hash value; verifying whether the first face feature hash value is consistent with a target face feature hash value of a target user stored in advance; if yes, verifying whether the first user identity information is consistent with target user identity information stored in advance; if yes, determining that the identity authentication of the first user currently logged in is passed. Thus, the identity authentication is safe, fast, accurate and not restricted by illumination conditions, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of data processing and identity authentication technology, and in particular to an identity authentication method and apparatus based on facial feature hashing. Background Technology

[0002] Facial recognition authentication technology is a method of verifying the identity of an operator by recognizing the user's facial features to confirm their authenticity. In devices such as smartphones, facial recognition technology can replace traditional password input methods, improving the convenience and security of identity verification. By analyzing facial features such as the eyes, nose, and mouth, the system can determine whether the user is a real person and thus unlock the device or perform other operations. Compared to traditional password methods, facial recognition technology eliminates the need for users to remember complex passwords, while also reducing the risk of password leakage.

[0003] Facial feature extraction is the core component of facial recognition authentication technology. It is responsible for accurately extracting key information for identity verification from captured facial images. This process relies heavily on advanced technologies in computer vision and image processing, including but not limited to image preprocessing, feature point localization, texture analysis, and deep learning algorithms.

[0004] Existing face authentication schemes, during the registration phase, first acquire the face image to be registered, then extract features from the face image to obtain feature vectors, and obtain the master public key and master private key through an initialization algorithm. The feature vectors are then standardized and orthogonalized to obtain the inner product function of the registered face. This inner product function is then encrypted using the master private key to obtain the encrypted registered face. During the login authentication phase, after acquiring user information and the face image to be authenticated, the feature vector extracted from the face image to be authenticated is encrypted using the master private key to obtain the encrypted face to be authenticated. The encrypted registered face is then retrieved based on the user information, and the face authentication result is obtained after comparison.

[0005] With the widespread application of facial recognition technology, its security issues have also attracted widespread attention. One major risk is the potential leakage of personal information during the transmission and storage of facial data. If users' facial data is not properly protected, it could lead to privacy breaches and misuse of personal information if it falls into the hands of hackers or criminals. Furthermore, facial recognition technology can be affected by factors such as lighting, angle, and occlusion during the recognition process, resulting in insufficient accuracy and a tendency for false recognition or rejection. Summary of the Invention

[0006] This invention provides an identity authentication method and apparatus based on facial feature hashing, which solves the defects of existing facial authentication methods, such as the risk of facial data leakage and low recognition accuracy due to environmental factors such as lighting, and achieves secure, fast, accurate identity authentication that is unaffected by lighting or other environmental factors.

[0007] This invention provides an identity authentication method based on facial feature hashing, comprising the following steps.

[0008] Obtain the first facial image and first user information of the currently logged-in first user, wherein the first user information includes at least the first user identity information and the first text password;

[0009] Extract the first facial features from the first facial image and quantize the first facial features to obtain the first facial feature vector;

[0010] The hash value of the first face feature corresponding to the first user is obtained by performing a hash operation on the first face feature vector;

[0011] Verify whether the first face feature hash value is consistent with the pre-stored target face feature hash value of the target user;

[0012] If so, then verify whether the first user identity information in the first user information is consistent with the target user identity information of the pre-stored target user;

[0013] If so, then the identity authentication of the currently logged-in first user is confirmed to be successful.

[0014] In one possible implementation, the method further includes:

[0015] The first user information also includes a first backup password;

[0016] When the first face image of the first user cannot be collected, a hash operation is performed on the first backup password and the hash value of the first face feature to obtain the current backup verification hash value.

[0017] Verify whether the current backup verification hash value is consistent with the pre-stored salted password hash value of the target user;

[0018] If so, then the identity authentication of the currently logged-in first user is confirmed to be successful.

[0019] In one possible implementation, the method further includes:

[0020] The system acquires multiple target face images and target user information input by the target user, wherein the target user information includes at least target user identity information, target text password, and target backup password;

[0021] Calculate the facial feature descriptors corresponding to the multiple target face images respectively;

[0022] The average value of the target face features is obtained by averaging the face feature descriptors corresponding to the multiple target face images.

[0023] The mean value of the target face features is quantized to obtain the target face feature vector;

[0024] The target facial feature vector is hashed to obtain the target facial feature hash value corresponding to the target user, and the target facial feature hash value is hashed with the target backup password to obtain the salted password hash value.

[0025] In one possible implementation, the method further includes:

[0026] Acquire multiple facial images from different angles and under different lighting conditions input by the target user;

[0027] Face detection is performed on the multiple face images to determine the face location, face bounding box, and face probability in each face image;

[0028] Multiple target face images are obtained by taking a face image whose face position is within a preset range of the face image, whose face bounding box is complete, and whose face probability is greater than a preset face probability threshold.

[0029] In one possible implementation, the method further includes:

[0030] Extract the target face features from the multiple target face images;

[0031] The facial feature descriptors corresponding to the target facial features of the multiple target facial images are calculated using a deep residual network.

[0032] In one possible implementation, the method further includes:

[0033] Based on the feature vectors corresponding to the facial feature descriptors of the multiple target face images, the feature mean is calculated using a first formula to obtain the feature mean of the target face. The first formula is:

[0034] Among them, F m F represents the mean of the features of the target face. i is the feature vector corresponding to the face feature descriptor, and z is the number of target face images.

[0035] In one possible implementation, the method further includes:

[0036] A two-dimensional quantization method is used to quantize the mean value of the target face features using a second formula to obtain the target face feature vector. The second formula is:

[0037] f iq =n if(n-1)φ≤f im ≤nφ;

[0038] Among them, f iq Let f be the target face feature vector, n be a positive integer in the quantization interval, and f be the quantization interval. im φ represents the mean of the target face features, and φ is the quantization interval.

[0039] During the quantization process, the auxiliary information generated corresponding to the mean of the target face features is concatenated to obtain the perturbation vector.

[0040] The present invention also provides an identity authentication device based on facial feature hashing, comprising the following modules:

[0041] The acquisition module is used to acquire the first face image and first user information of the currently logged-in first user, wherein the first user information includes at least the first user identity information and the first text password;

[0042] The quantization module is used to extract the first facial features from the first facial image and quantize the first facial features to obtain the first facial feature vector.

[0043] The calculation module is used to perform a hash operation on the first face feature vector to obtain the first face feature hash value corresponding to the first user;

[0044] The authentication module is used to verify whether the first facial feature hash value is consistent with the pre-stored target facial feature hash value of the target user; if so, it verifies whether the first user identity information in the first user information is consistent with the pre-stored target user identity information of the target user; if so, it determines that the identity authentication of the currently logged-in first user is successful.

[0045] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the identity authentication method based on facial feature hashing as described above.

[0046] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the identity authentication method based on facial feature hashing as described above.

[0047] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the identity authentication method based on facial feature hashing as described above.

[0048] The present invention provides an identity authentication method and apparatus based on facial feature hashing. This method acquires a first facial image and first user information of the currently logged-in first user, wherein the first user information includes at least first user identity information and a first text password. It extracts first facial features from the first facial image and quantizes these features to obtain a first facial feature vector. The first facial feature vector is then hashed to obtain a first facial feature hash value corresponding to the first user. The method verifies whether the first facial feature hash value matches a pre-stored target facial feature hash value for a target user. If so, it verifies whether the first user identity information in the first user information matches the pre-stored target user identity information for the target user. If so, it determines that the identity authentication of the currently logged-in first user is successful. Compared to existing technologies where the transmission and storage of facial information may lead to personal information leakage, and facial recognition technology may be affected by factors such as light, angle, and occlusion during the recognition process, resulting in insufficient accuracy and prone to misidentification or rejection, this solution uses the quantization of facial feature vectors to generate hash values ​​as part of the user password for identity authentication. This achieves secure, fast, accurate identity authentication that is not constrained by angle, lighting, or other conditions, thus improving the user experience. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0050] Figure 1 This is one of the flowcharts of the identity authentication method based on facial feature hashing provided by the present invention.

[0051] Figure 2 This is the second flowchart of the identity authentication method based on facial feature hashing provided by the present invention.

[0052] Figure 3 This is the third flowchart of the identity authentication method based on facial feature hashing provided by the present invention.

[0053] Figure 4 This is a schematic diagram of the residual network provided by the present invention.

[0054] Figure 5This is a schematic diagram of face detection provided by the present invention.

[0055] Figure 6 This is a schematic diagram of the two-dimensional quantization process provided by the present invention.

[0056] Figure 7 This is a schematic diagram of the structure of the identity authentication device based on facial feature hashing provided by the present invention.

[0057] Figure 8 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0059] To facilitate understanding of the embodiments of the present invention, further explanations and descriptions will be provided below with reference to the accompanying drawings and specific embodiments. These embodiments do not constitute a limitation on the embodiments of the present invention.

[0060] Figure 1 This is one of the flowcharts illustrating the identity authentication method based on facial feature hashing provided by this invention, such as... Figure 1 As shown, the method specifically includes:

[0061] S11. Obtain the first face image and first user information of the currently logged-in first user.

[0062] The embodiments of the present invention are combined with Figure 3 The flowchart shown illustrates how a hash value is generated from a facial image during application and used as part of the user's password. This requires less knowledge from the user; they only need to remember the text password or a backup password, effectively reducing the user's memory burden and encouraging them to create more complex and secure passwords.

[0063] This invention is divided into a registration phase and a login phase. Considering that users may be unable to use the facial recognition function under certain conditions (no light or low light, no camera, etc.), this invention includes a backup password. During the registration phase, the system prompts the user to enter a backup password as an alternative. The backup password also has certain rules and restrictions; if the user chooses to log in using the backup password, its security and usability are consistent with the text password. After the user generates a facial hash and sets a backup password, the system generates multiple final salted password hash values ​​for the user based on the facial hash and the backup password. During the login phase, the user can log in by correctly entering facial information, a text password, or a backup password, because the system matches the entered password with hash values ​​stored in multiple databases; authentication is successful if any match is found.

[0064] During the login phase, the system obtains the first facial image of the currently logged-in user; alternatively, if there are issues such as angle, lighting, or the absence of a camera, only the first user's information can be obtained. This first user information includes at least the first user's identity information and a first text password or a first backup password.

[0065] Furthermore, if the first face image of the currently logged-in first user is obtained, a series of processes such as face detection, feature extraction, feature quantization, and calculation of quantization results are performed to obtain the first face feature vector of the currently logged-in first user.

[0066] S12. Extract the first facial features from the first facial image and quantize the first facial features to obtain the first facial feature vector.

[0067] A ResNet-34-like architecture is used to compute the face feature descriptor for any given first face image. The face feature descriptor is a feature vector F with 128 values, used to describe the features of the face. After computing the face feature descriptor on the first face image, the first face feature vector is obtained. The main structure of ResNet-34 consists of multiple residual blocks, each containing two convolutional layers and introducing skip connections. Skip connections allow the input to bypass parts of the layers and be added to the output of subsequent layers, thus forming the residual structure, as shown below. Figure 4 As shown, the network input goes through a series of convolution, batch normalization and activation function layers, then features are extracted through stacking residual blocks, and finally classification is achieved through a global average pooling layer and a fully connected layer.

[0068] S13. Perform a hash operation on the first face feature vector to obtain the first face feature hash value corresponding to the first user.

[0069] The first facial feature vector is hashed using SHA256, and the first text password is added to obtain the first facial feature hash value corresponding to the first user.

[0070] Optionally, after the user generates the first facial feature hash value and enters the backup password, the system will generate multiple final salted password hash values ​​for the user based on the first facial feature hash value and the first backup password.

[0071] S14. Verify whether the first face feature hash value is consistent with the pre-stored target face feature hash value of the target user.

[0072] S15. If yes, then verify whether the first user identity information in the first user information is consistent with the target user identity information of the target user that has been stored in advance.

[0073] S16. If so, then the identity authentication of the currently logged-in first user is confirmed to be successful.

[0074] The following provides a unified explanation of S14-S16:

[0075] In this embodiment of the invention, multiple target facial feature hash values ​​of different target users can be pre-stored. The generation method of the target facial feature hash values ​​is as follows: Figure 2 The corresponding embodiments are described in detail, and will not be elaborated here. The target facial feature hash value is used to verify whether the first facial feature hash value corresponding to the first user to be logged in exists, that is, whether the current first user is a legitimate user. If the target facial feature hash value of the pre-stored target user is found to contain the first facial feature hash value, then the verification continues to verify whether the first user identity information in the first user information corresponding to the current first user to be logged in is consistent with the pre-stored target user identity information. If so, the identity authentication of the current first user to be logged in is determined to be successful.

[0076] Optionally, if the first face image of the first user cannot be captured, a hash operation is performed on the first backup password and the hash value of the first face feature to obtain the current backup verification hash value; the current backup verification hash value is verified to be consistent with the pre-stored salted password hash value of the target user; if so, the identity authentication of the currently logged-in first user is determined to be successful.

[0077] The present invention provides an identity authentication method based on facial feature hashing, which involves obtaining a first facial image and first user information of the currently logged-in first user, wherein the first user information includes at least first user identity information and a first text password; extracting first facial features from the first facial image and quantizing the first facial features to obtain a first facial feature vector; performing a hash operation on the first facial feature vector to obtain a first facial feature hash value corresponding to the first user; verifying whether the first facial feature hash value is consistent with the pre-stored target facial feature hash value of the target user; if so, verifying whether the first user identity information in the first user information is consistent with the pre-stored target user identity information of the target user; if so, determining that the identity authentication of the currently logged-in first user is successful. Compared to existing technologies where the transmission and storage of facial information may lead to personal information leakage, and where facial recognition technology may be affected by factors such as lighting, angle, and occlusion during the recognition process, resulting in insufficient accuracy and easy misidentification or rejection, this method uses the quantization of facial feature vectors to generate hash values ​​as part of the user's password for identity authentication. It uses biometric hashes based on facial features as key identifiers, and does not store information related to matching facial features in the database, thus achieving a lightweight model and reducing the risk of leakage. The quantization method generates the same hash value under different lighting and angles, reducing feature size, improving security, and enhancing robustness. Using hash values ​​as part of the text password input effectively reduces the user's memory burden and encourages the creation of more complex and secure passwords.

[0078] Figure 2 This is the second flowchart of the identity authentication method based on facial feature hashing provided by the present invention, as shown below. Figure 2 As shown, the method specifically includes:

[0079] S21. Obtain multiple target face images and target user information input by the target user.

[0080] The embodiments of the present invention are combined with Figure 3 The flowchart shown illustrates how a hash value is generated from a facial image during application and used as part of the user's password. This requires less knowledge from the user; they only need to remember the text password or a backup password, effectively reducing the user's memory burden and encouraging them to create more complex and secure passwords.

[0081] This invention is divided into a registration phase and a login phase. Considering that users may be unable to use the facial recognition function under certain conditions (no light or low light, no camera, etc.), this invention includes a backup password. During the registration phase, the system prompts the user to enter a backup password as an alternative. The backup password also has certain rules and restrictions; if the user chooses to log in using the backup password, its security and usability are consistent with the text password. After the user generates a facial hash and sets a backup password, the system generates multiple final salted password hash values ​​for the user based on the facial hash and the backup password. During the login phase, the user can log in by correctly entering facial information, a text password, or a backup password, because the system matches the entered password with hash values ​​stored in multiple databases; authentication is successful if any match is found.

[0082] Specifically, the registration phase first acquires multiple face images from different angles and under different lighting conditions, along with target user information. The target user information includes at least the target user's identity information, target text password, and target backup password. Face detection is then performed on the multiple face images to determine the face location, face bounding box, and face probability in each image. Face images whose face location is within a preset range, whose face bounding box is complete, and whose face probability is greater than a preset face probability threshold are selected as target face images, resulting in multiple target face images.

[0083] like Figure 5 As shown, a single-shot multi-box detector based on MobileNetV1 is used for face detection. The position of each face in multiple face images is calculated, and the bounding box of the face detection and the probability of each detected face are returned.

[0084] In reality, the face image input by the user may include multiple faces, but there will be a target user's face that occupies a larger area in the face image than other faces, and it will be clearer.

[0085] In this embodiment of the invention, the selection conditions for the target face image can be preset, such as the face being in the middle range of the face image, the bounding box of the face detection based on the MobileNetV1 single-shot multi-box detector being complete and without missing parts, and the calculated probability threshold for each face being the owner's face.

[0086] Furthermore, based on the above selection criteria, face images whose face location is within a preset range of the face image, whose face bounding box is complete, and whose face probability is greater than a preset face probability threshold can be used as target face images to obtain multiple target face images.

[0087] S22. Calculate the facial feature descriptors corresponding to the multiple target face images respectively.

[0088] Extract target face features from multiple target face images; calculate face feature descriptors corresponding to the target face features of each target face image using a deep residual network.

[0089] A ResNet-34-like architecture is used to compute the facial feature descriptor for any given target face image. The facial feature descriptor is a feature vector F with 128 values, used to describe the features of the face. The main structure of ResNet-34 consists of multiple residual blocks, each containing two convolutional layers and introducing skip connections. Skip connections allow the input to bypass parts of the layers directly, adding them to the output of subsequent layers, thus forming the residual structure, as shown below. Figure 4 As shown, the network input goes through a series of convolution, batch normalization and activation function layers, then features are extracted through stacking residual blocks, and finally classification is achieved through a global average pooling layer and a fully connected layer.

[0090] S23. Perform feature averaging on the facial feature descriptors corresponding to the multiple target facial images to obtain the target facial feature average.

[0091] When calculating the mean of features, each target face image contributes to the average only if its difference is less than a specified threshold of the reference face; otherwise, the corresponding feature value is discarded. Finally, the feature mean F is calculated. m Perform feature quantization to generate the final quantization result F. q The final result is then hashed and stored. This step also generates a perturbation vector P, which is used in the login algorithm to calculate quantization features, as follows:

[0092] Based on the feature vectors corresponding to the facial feature descriptors of multiple target face images, the feature mean of the target face is obtained by averaging the features using the first formula:

[0093] Among them, F m F represents the mean of the features of the target face. i is the feature vector corresponding to the face feature descriptor, and z is the number of target face images.

[0094] S24. Quantize the mean value of the target face features to obtain the target face feature vector.

[0095] S25. Perform a hash operation on the target face feature vector to obtain the target face feature hash value corresponding to the target user, and perform a hash operation on the target face feature hash value and the target backup password to obtain the salted password hash value.

[0096] A two-dimensional quantization method is used to quantize the mean value of the target face features using the second formula, resulting in the target face feature vector. The second formula is:

[0097] f iq =n if(n-1)φ≤f im ≤nφ

[0098] Among them, f iq Let f be the target face feature vector, n be a positive integer in the quantization interval, and f be the quantization interval. im φ represents the mean of the target face features, and φ is the quantization interval.

[0099] During the quantization process, the auxiliary information generated corresponding to the mean of the target face features is concatenated to obtain the perturbation vector.

[0100] Through quantization, an additional two bits of auxiliary data are also recorded, for each quantized f. im Each will produce a vector ρ i =[ρ i1 ρ i2 Specifically, it means:

[0101] [ρ i1 ρ i2 ]=(f iq -1)mod 4

[0102] Auxiliary information ρ recorded for each feature i These are concatenated one by one to form a perturbation vector P, which is used to assist in the quantization value E during login. q .

[0103] During the login phase, the user's facial input is obtained. After the input face is detected and located, it is handed over to the feature extraction module. The extracted features are combined with the perturbation vector P generated during registration for quantization. If the user is a legitimate user, the quantization result F generated at this time is... q If the result matches the registration information, the user can successfully complete the identity verification process. Otherwise, the generated quantitative result will differ significantly from that of a legitimate user during registration, resulting in verification failure, as detailed below:

[0104] During the login phase, the process of extracting and equalizing features is the same as that during the registration phase. Let f′ im As for the characteristics after equilibrium, f′ can be calculated based on the above description. iq and ρ′ i ;

[0105] Feature f′ im The values ​​extracted during login may be distorted due to changes such as lighting, angle, facial expression, etc. To account for these changes, the features f′ extracted during login are perturbed by a perturbation vector P. im Revised to Specifically, it is expressed as follows:

[0106]

[0107] Modified eigenvalues The final quantization result is obtained based on the second formula. Thus, if f′ im Within the error tolerance window, the generated data can still be guaranteed. with f iq equal.

[0108] The quantized vector F q Perform hashing to obtain the final text password: Password = SHA256(F q This allows long numbers to be converted into text passwords for use.

[0109] In the above steps, the two-dimensional quantization of facial features, compared with existing technologies, records additional information (such as lighting, angle, expression, etc.) as a perturbation vector through quantization, which is then used during login. This additional information is related to the system's security; the more information recorded, the higher the system's security. Furthermore, the quantization process applied in this invention can also be applied to other biometrics, such as iris patterns, fingerprints, and handwritten signatures, to accommodate variations caused by different versions of the same biometric feature.

[0110] Compared to existing technologies, this invention achieves the same success rate in testing without storing facial information, and demonstrates strong robustness for facial recognition under different angles and lighting conditions, reducing the burden of remembering passwords for users. This invention abandons the traditional method of directly storing facial features in a database, instead using biometric hashes based on facial features as unique identifiers, achieving a dual upgrade in both technology lightweighting and data protection. This not only significantly reduces the risk of information leakage but also enhances the system's robustness through quantization strategies, enabling stable operation under different lighting and angles. Furthermore, the high-accuracy, lightweight model design of this invention, at only 6.2MB, is compatible with multiple terminals, providing users with a more convenient and secure experience.

[0111] Lightweight means that the entire process of extracting and hashing facial features is completed off-server. Facial features do not interact with the server; only the hash results are uploaded to the server.

[0112] High efficiency means that face hash generation is completed on the terminal, and only the quantized facial feature hash value is sent to the server, which reduces the server load and enables lightweight deployment and multi-type terminal adaptation.

[0113] Stability refers to strong robustness. Based on the extracted facial feature vector, a quantization scheme is adopted, which can still generate the same hash value under different lighting and angles.

[0114] The present invention provides an identity authentication method based on facial feature hashing, which involves obtaining a first facial image and first user information of the currently logged-in first user, wherein the first user information includes at least first user identity information and a first text password; extracting first facial features from the first facial image and quantizing the first facial features to obtain a first facial feature vector; performing a hash operation on the first facial feature vector to obtain a first facial feature hash value corresponding to the first user; verifying whether the first facial feature hash value is consistent with the pre-stored target facial feature hash value of the target user; if so, verifying whether the first user identity information in the first user information is consistent with the pre-stored target user identity information of the target user; if so, determining that the identity authentication of the currently logged-in first user is successful. This method uses the quantization of facial feature vectors to generate hash values, which are then used as part of the user's password for identity authentication. It uses biometric hashes based on facial features as key identifiers, eliminating the need to store matching facial feature information in the database. This achieves a lightweight model and reduces the risk of data leakage. The quantization method generates the same hash value under different lighting and angles, reducing feature size, improving security, and enhancing robustness. Using hash values ​​as part of the text password input effectively reduces the user's memory burden and encourages the creation of more complex and secure passwords.

[0115] The following describes the identity authentication device based on facial feature hashing provided by the present invention. The identity authentication device based on facial feature hashing described below can be referred to in correspondence with the identity authentication method based on facial feature hashing described above.

[0116] Figure 7 This is a schematic diagram of the structure of the identity authentication device based on facial feature hashing provided by the present invention, specifically including:

[0117] The acquisition module 701 is used to acquire the first face image and first user information of the currently logged-in first user, wherein the first user information includes at least the first user identity information and the first text password;

[0118] The quantization module 702 is used to extract the first facial features of the first facial image and quantize the first facial features to obtain the first facial feature vector.

[0119] The calculation module 703 is used to perform a hash operation on the first face feature vector to obtain the first face feature hash value corresponding to the first user;

[0120] The authentication module 704 is used to verify whether the first face feature hash value is consistent with the target face feature hash value of the target user stored in advance; if so, it verifies whether the first user identity information in the first user information is consistent with the target user identity information of the target user stored in advance; if so, it determines that the identity authentication of the currently logged-in first user is successful.

[0121] Figure 8 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 8 As shown, the electronic device may include: a processor 810, a communications interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communications interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute an identity authentication method based on facial feature hashing. This method includes: acquiring a first facial image and first user information of the currently logged-in first user, wherein the first user information includes at least first user identity information and a first text password; extracting first facial features from the first facial image and quantizing the first facial features to obtain a first facial feature vector; performing a hash operation on the first facial feature vector to obtain a first facial feature hash value corresponding to the first user; verifying whether the first facial feature hash value is consistent with a pre-stored target facial feature hash value of a target user; if so, verifying whether the first user identity information in the first user information is consistent with the pre-stored target user identity information of the target user; if so, determining that the identity authentication of the currently logged-in first user is successful.

[0122] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0123] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the identity authentication method based on face feature hashing provided by the above methods. The method includes: obtaining a first face image and first user information of a currently logged-in first user, wherein the first user information includes at least first user identity information and a first text password; extracting a first face feature from the first face image and quantizing the first face feature to obtain a first face feature vector; performing a hash operation on the first face feature vector to obtain a first face feature hash value corresponding to the first user; verifying whether the first face feature hash value is consistent with a pre-stored target face feature hash value of a target user; if so, verifying whether the first user identity information in the first user information is consistent with the pre-stored target user identity information of the target user; if so, determining that the identity authentication of the currently logged-in first user is successful.

[0124] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements an identity authentication method based on facial feature hashing provided by the above methods. The method includes: acquiring a first facial image and first user information of a currently logged-in first user, wherein the first user information includes at least first user identity information and a first text password; extracting a first facial feature from the first facial image and quantizing the first facial feature to obtain a first facial feature vector; performing a hash operation on the first facial feature vector to obtain a first facial feature hash value corresponding to the first user; verifying whether the first facial feature hash value is consistent with a pre-stored target facial feature hash value of a target user; if so, verifying whether the first user identity information in the first user information is consistent with the pre-stored target user identity information of the target user; if so, determining that the identity authentication of the currently logged-in first user is successful.

[0125] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0126] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An identity authentication method based on facial feature hashing, characterized in that, include: Obtain the first facial image and first user information of the currently logged-in first user, wherein the first user information includes at least the first user identity information and the first text password; Extract the first facial features from the first facial image and quantize the first facial features to obtain a first facial feature vector. The quantization process includes: correcting the first facial features based on the perturbation vector generated during the registration phase, and mapping the corrected feature values ​​to the quantization interval according to the quantization interval to obtain the first facial feature vector. The hash value of the first face feature is obtained by performing a hash operation on the first face feature vector and the first text password. Verify whether the first facial feature hash value is consistent with the pre-stored target facial feature hash value of the target user, wherein the target facial feature hash value is obtained in advance through the following steps: The system acquires multiple target face images and target user information input by the target user, wherein the target user information includes at least target user identity information, target text password, and target backup password; Calculate the facial feature descriptors corresponding to the multiple target face images respectively; The average value of the target face features is obtained by averaging the face feature descriptors corresponding to the multiple target face images. The mean of the target face features is subjected to two-bit quantization to obtain a target face feature vector and a perturbation vector. The two-bit quantization includes: mapping the mean of the target face features to the quantization interval according to the quantization interval to obtain the target face feature vector, and concatenating the auxiliary information generated during the quantization process into the perturbation vector. The target face feature vector is hashed to obtain the target face feature hash value corresponding to the target user, and the target face feature hash value is hashed with the target backup password to obtain the salted password hash value. If so, then verify whether the first user identity information in the first user information is consistent with the target user identity information of the pre-stored target user; If so, then the identity authentication of the currently logged-in first user is confirmed to be successful.

2. The method according to claim 1, characterized in that, The acquisition of multiple target face images input by the target user includes: Acquire multiple facial images from different angles and under different lighting conditions input by the target user; Face detection is performed on the multiple face images to determine the face location, face bounding box, and face probability in each face image; Multiple target face images are obtained by taking a face image whose face position is within a preset range of the face image, whose face bounding box is complete, and whose face probability is greater than a preset face probability threshold.

3. The method according to claim 2, characterized in that, The calculation of the facial feature descriptors corresponding to the multiple target face images includes: Extract the target face features from the multiple target face images; The facial feature descriptors corresponding to the target facial features of the multiple target facial images are calculated using a deep residual network.

4. The method according to claim 3, characterized in that, The step of performing feature averaging on the facial feature descriptors corresponding to the multiple target facial images to obtain the target facial feature average includes: Based on the feature vectors corresponding to the facial feature descriptors of the multiple target face images, the feature mean is calculated using a first formula to obtain the feature mean of the target face. The first formula is: ; in, The mean of the features of the target face. is the feature vector corresponding to the face feature descriptor, and z is the number of target face images.

5. The method according to claim 4, characterized in that, The step of quantizing the mean value of the target face features to obtain the target face feature vector and perturbation vector includes: A two-dimensional quantization method is used to quantize the mean value of the target face features using a second formula to obtain the target face feature vector. The second formula is: ; in, For the target face feature vector, For positive integers in the quantization interval, The mean of the target facial features, For quantization interval; During the quantization process, the auxiliary information generated corresponding to the mean of the target face features is concatenated to obtain the perturbation vector.

6. An identity authentication device based on facial feature hashing, characterized in that, include: The acquisition module is used to acquire the first face image and first user information of the currently logged-in first user, wherein the first user information includes at least the first user identity information and the first text password; The quantization module is used to extract the first facial features of the first facial image and quantize the first facial features to obtain the first facial feature vector. The quantization process includes: correcting the first facial features based on the perturbation vector generated in the registration stage, and mapping the corrected feature values ​​to the quantization interval according to the quantization interval to obtain the first facial feature vector. The calculation module is used to perform a hash operation on the first facial feature vector and the first text password to obtain the first facial feature hash value corresponding to the first user; An authentication module is used to verify whether the first facial feature hash value is consistent with the pre-stored target facial feature hash value of the target user. The target facial feature hash value is obtained in advance through the following steps: acquiring multiple target facial images and target user information input by the target user, wherein the target user information includes at least target user identity information, target text password, and target backup password; calculating facial feature descriptors corresponding to each of the multiple target facial images; performing feature averaging on the facial feature descriptors corresponding to each of the multiple target facial images to obtain the target facial feature mean; performing two-bit quantization on the target facial feature mean to obtain a target facial feature vector and a perturbation vector, wherein the two-bit quantization includes: mapping the target facial feature mean to a quantization interval according to the quantization interval to obtain a target facial feature vector, and concatenating the auxiliary information generated during the quantization process into the perturbation vector; performing a hash operation on the target facial feature vector to obtain the target facial feature hash value corresponding to the target user. And perform a hash operation between the target facial feature hash value and the target backup password to obtain a salted password hash value; if so, verify whether the first user identity information in the first user information is consistent with the target user identity information of the pre-stored target user; if so, determine that the identity authentication of the currently logged-in first user has passed.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the identity authentication method based on facial feature hashing as described in any one of claims 1 to 5.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the identity authentication method based on facial feature hashing as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Face recognition method and system based on block chain

    CN113408421A

  • Identity verification method based on biological characteristics and zero-knowledge proof under web3.0

    CN116886315A