Biological feature extraction method and device

By numerical adjustment of floating-point eigenvectors and binary quantization, the problem of binary quantization in the prior art resulting in feature smearing is solved, and the accuracy of identity verification is improved.

CN119206830APending Publication Date: 2024-12-27CHINA ACADEMY OF INFORMATION & COMM +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411328868.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the process of facial feature extraction, the binary quantization is too rough, resulting in the features being smoothed out, affecting the accuracy of identity verification.

Method used

By numerical adjustment of the floating-point eigenvector, elements whose values ​​are approached to the first and second values ​​are closer to these values, and then binary quantization is performed to reduce the degree of smoothing the features by binary quantization.

Benefits of technology

It effectively avoids feature smearing problems caused by binary quantization, and improves the accuracy and reliability of identity verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206830A_ABST
    Figure CN119206830A_ABST
Patent Text Reader

Abstract

One or more embodiments of the invention provide a biological feature extraction method and device. The method can comprise the following steps: carrying out feature extraction on a biological image of a user to obtain a floating-point number feature vector used for representing biological features of the user; carrying out numerical value adjustment on elements in the floating-point number feature vector, so that the value of the element of which the value is close to a first numerical value is closer to the first numerical value, and the value of the element of which the value is close to a second numerical value is closer to the second numerical value; and performing binary quantization on the floating-point number feature vector after numerical value adjustment based on the first numerical value and the second numerical value to obtain a binary feature vector corresponding to the biological image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of this specification relate to the field of image processing, and more particularly, to a method and apparatus for extracting biometric features. Background Art

[0002] Since facial features are unique to a user, they are often used for identity verification. To achieve the purpose of identity verification, it is necessary to first extract facial features from a face image as a basis for identity verification.

[0003] In related technologies, because images of the same user taken in different scenes and at different times can vary, the directly extracted facial features can also vary. Therefore, before performing identity verification based on these facial features, they must be binary-quantized to eliminate variations due to environmental factors. However, these technologies typically directly quantize the extracted facial features, which can easily smooth out the facial features and lead to inaccurate identity verification. Summary of the Invention

[0004] In view of this, one or more embodiments of this specification provide a method and apparatus for extracting biometric features.

[0005] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:

[0006] According to a first aspect of one or more embodiments of this specification, a biometric feature extraction method is proposed, including:

[0007] Extracting features from a biological image of a user to obtain a floating-point feature vector representing a biological feature of the user;

[0008] Adjusting the values ​​of the elements in the floating-point feature vector so that the values ​​of the elements close to the first value are closer to the first value, and the values ​​of the elements close to the second value are closer to the second value;

[0009] The numerically adjusted floating-point feature vector is binary-quantized based on the first numerical value and the second numerical value to obtain a binary feature vector corresponding to the biological image.

[0010] According to a second aspect of one or more embodiments of this specification, a method for training a feature extraction model is proposed, including:

[0011] Acquire a sample biometric image and a standard biometric characteristic of a user to whom the sample biometric image belongs;

[0012] Inputting the sample biological image into the to-be-trained model, so that the to-be-trained model extracts features from the sample biological image, and after numerically adjusting the extracted biological features, outputs the biological features of the sample biological image;

[0013] Based on the difference between the output biometric feature and the standard biometric feature, adjusting the model to be trained until the total loss function of the model to be trained converges, and determining that the feature recognition model training is completed;

[0014] Among them, the total loss function includes a feature extraction loss function and a binary quantization loss function; the feature extraction loss function is used to enable the feature extraction model to have the function of extracting features from biological images; the binary quantization loss function is used to enable the feature extraction model to make the values ​​of elements in the extracted biological features close to the first value closer to the first value, and the values ​​of elements close to the second value closer to the second value during the numerical adjustment process; the first value and the second value are the value results after binary quantization of the biological features.

[0015] According to a third aspect of one or more embodiments of this specification, a biometric feature extraction device is provided, comprising:

[0016] an extraction unit, performing feature extraction on a user's biological image to obtain a floating-point feature vector for representing the user's biological features;

[0017] an adjusting unit, configured to adjust the values ​​of the elements in the floating-point feature vector so that the values ​​of the elements close to the first value are closer to the first value, and the values ​​of the elements close to the second value are closer to the second value;

[0018] The quantization unit performs binary quantization on the numerically adjusted floating-point feature vector based on the first numerical value and the second numerical value to obtain a binary feature vector corresponding to the biological image.

[0019] According to a fourth aspect of one or more embodiments of this specification, a training device for a feature extraction model is provided, comprising:

[0020] an acquisition unit, configured to acquire a sample biological image and a standard biological feature of a user to which the sample biological image belongs;

[0021] a training unit, inputting the sample biological image into the model to be trained, so that the model to be trained extracts features from the sample biological image, performs numerical adjustments on the extracted biometric features, and then outputs biometric features of the sample biological image; and adjusting the model to be trained based on differences between the output biometric features and the standard biometric features until the total loss function of the model to be trained converges, thereby determining that the feature recognition model training is complete;

[0022] Among them, the total loss function includes a feature extraction loss function and a binary quantization loss function; the feature extraction loss function is used to enable the feature extraction model to have the function of extracting features from biological images; the binary quantization loss function is used to enable the feature extraction model to make the values ​​of elements in the extracted biological features close to the first value closer to the first value, and the values ​​of elements close to the second value closer to the second value during the numerical adjustment process; the first value and the second value are the value results after binary quantization of the biological features.

[0023] According to a fifth aspect of one or more embodiments of this specification, an electronic device is provided, including:

[0024] processor;

[0025] a memory for storing processor-executable instructions;

[0026] The processor implements the method as described in the first aspect or the second aspect by running the executable instructions.

[0027] According to a sixth aspect of one or more embodiments of this specification, a computer-readable storage medium is provided, on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method described in the first aspect or the second aspect are implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 This is a flowchart of a biometric feature extraction method provided by an exemplary embodiment.

[0029] Figure 2 It is a flowchart of a method for training a feature extraction model provided by an exemplary embodiment.

[0030] Figure 3 Schematic diagram of supervised training of a feature extraction model provided by an exemplary embodiment.

[0031] Figure 4 It is an interaction diagram of a DID registration method provided by an exemplary embodiment.

[0032] Figure 5It is an interaction diagram of an identity authentication method provided by an exemplary embodiment.

[0033] Figure 6 It is a structural diagram of a device provided by an exemplary embodiment.

[0034] Figure 7 It is a block diagram of a biometric feature extraction device provided by an exemplary embodiment.

[0035] Figure 8 It is a block diagram of a training device for a feature extraction model provided by an exemplary embodiment. DETAILED DESCRIPTION

[0036] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments are not intended to represent all implementations consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with certain aspects of one or more embodiments of this specification, as detailed in the appended claims.

[0037] It should be noted that in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than those described in this specification. In addition, a single step described in this specification may be broken down into multiple steps for description in other embodiments, and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0038] When performing identity authentication based on facial features, these features are typically represented by floating-point feature vectors. Floating-point feature vectors are generally highly accurate, and the value of each element is influenced not only by the facial features of the user in the facial image but also by other factors, such as the environment in which the image was taken.

[0039] In related technologies, after extracting facial features from a facial image, the extracted features are compared with pre-stored standard facial features to determine whether the user belongs to the standard facial features. Therefore, to prevent other factors such as environmental factors from affecting the accuracy of identity matching, it is usually necessary to binary quantize the extracted facial features represented by floating-point feature vectors to eliminate the influence of other factors such as environmental factors on the accuracy of identity matching.

[0040] However, related technologies usually use a relatively rough binary quantization logic (also known as brute force binarization) when quantizing floating-point feature vectors. While eliminating the above-mentioned interference factors, the collected facial features are also smoothed out to a certain extent, resulting in inaccurate subsequent feature comparison results.

[0041] For example, if the binary quantization result in the related art is 0 or 1, then the binary quantization logic used in the related art can be "modify the values ​​of elements in the floating-point feature vector with values ​​less than 0.5 to 0, and modify the values ​​of elements with values ​​greater than 0.5 to 1." It should be understood that the values ​​of the elements in the extracted floating-point feature vector are not evenly distributed on both sides of the threshold of 0.5. It is very likely that "the values ​​of all elements in the extracted floating-point feature vector are greater than or less than 0.5", or "only a very small number of elements in the extracted floating-point feature vector have values ​​greater than or less than 0.5".

[0042] For ease of understanding, taking the example of all elements having values ​​greater than 0.5, if the values ​​of all elements in the extracted floating-point feature vector are within the range of "0.5 to 0.8", then after the floating-point feature vector is binary quantized, the values ​​of all elements in the binary feature vector are 1, which obviously cannot reflect the user's facial features, which is equivalent to smoothing out the user's facial features, and will directly affect the accuracy of subsequent feature comparison results.

[0043] It can be seen that the related art has a problem of brute-force binarization of floating-point feature vectors, which leads to inaccurate comparison results based on the binarized facial features.

[0044] In view of this, this specification proposes a biometric feature extraction method. In this method, after extracting biometric features from a user's biometric image, the biometric features represented by a floating-point feature vector can be numerically adjusted to adjust the values ​​of elements close to a first value closer to the first value, and the values ​​of elements close to a second value closer to the second value. On this basis, the adjusted floating-point feature vector is then binary-quantized based on the first and second values ​​to obtain a binary feature vector.

[0045] It can be seen that after extracting the floating-point feature vector, this specification does not directly perform binary quantization on the floating-point feature vector as in the related art, but prioritizes numerical adjustment before binary quantization. Among them, since the numerical adjustment makes the values ​​of elements whose values ​​are close to the first value closer to the first value and the values ​​of elements whose values ​​are close to the second value closer to the second value, the numerical adjustment operation can increase the difference between elements whose values ​​are relatively close. Still using the above example, since in the range of "0.5 to 0.8", elements whose values ​​are close to 0.5 are relatively close to 0 in the entire value range, the values ​​of elements whose values ​​are close to 0.5 can be adjusted to be close to 0; similarly, elements whose values ​​are close to 0.8 are relatively close to 1 in the entire value range, the values ​​of elements whose values ​​are close to 0.8 can be adjusted to be close to 1. It is not difficult to see from this example that after adjustment based on the technical solution of this specification, the number of elements with values ​​close to the first numerical value and the second numerical value will increase, thereby reducing or even eliminating the degree of smoothing of biometric features by binary quantization, and avoiding the problem of reduced accuracy of feature comparison due to direct binary quantization of the extracted floating-point feature vector in related technologies.

[0046] Below, each step included in the technical solution of this manual is introduced:

[0047] Figure 1 This is a flow chart of a method for extracting biometric features according to an exemplary embodiment of this specification. Figure 1 As shown, the method may include the following steps:

[0048] Step 102 : extracting features from the user's biological image to obtain a floating-point feature vector for representing the user's biological features.

[0049] In this specification, the biometric features extracted from biometric images can be either the facial features mentioned above, or the user's fingerprint, palm print, iris features, etc. It should be understood that any feature that uniquely identifies a user can be used as a biometric feature in this specification. The specific biometric feature to be extracted can be determined by those skilled in the art based on actual needs and is not limited in this specification.

[0050] Correspondingly, the biometric image used for feature extraction in this specification can be an image containing the location of the corresponding biometric feature. For example, if the extracted biometric feature is a facial feature, the biometric image is a facial image; if the extracted biometric feature is a fingerprint, the biometric image is a finger image; if the extracted biometric feature is a palm print, the biometric image is a palm image; if the extracted biometric feature is an iris feature, the biometric image is a pupil image. Of course, the examples here are merely illustrative. The specific biometric image for feature extraction can be determined by those skilled in the art based on the biometric feature used, and this specification does not limit this.

[0051] Step 104 : numerically adjust the elements in the floating-point feature vector so that the values ​​of the elements close to the first value are closer to the first value, and the values ​​of the elements close to the second value are closer to the second value.

[0052] In this specification, after obtaining a floating-point feature vector through feature extraction, the floating-point feature vector can be further numerically adjusted to avoid the problem of facial features being smoothed out during subsequent binary quantization. To achieve this effect, this specification uses a method of numerically adjusting the values ​​of elements that are close to a first value to be closer to the first value, and to adjust the values ​​of elements that are close to a second value to be closer to the second value.

[0053] It should be emphasized that "approaching" in this specification is a relative concept. For any element in a floating-point feature vector, it is determined whether it is closer to the first value or the second value compared to the values ​​of other elements in the floating-point feature vector, rather than simply based on the difference between itself and the first value or the second value.

[0054] In other words, when this specification determines whether any element is close to the first value or the second value, it is based on whether the value of the element is closer to the first value or the second value compared to other elements in the floating-point feature vector. For example, if the extracted floating-point feature vector contains 20 elements, and the value range falls within "0.4~0.8", among which the value of element A is 0.40, the value of element B is 0.51, and the value of element C is 0.80, and the values ​​of the remaining 17 elements all fall between "0.51~0.79", on this basis, for element A, since its value is the smallest among all elements, it is obviously closer to 0 compared to other elements. Therefore, element A is determined to be an element close to 0, and subsequent adjustments should make it closer to 0; for element B, since there is only element C in the 20 elements, Element A has a smaller value than itself, and is obviously relatively closer to 0 among all elements. Therefore, element B is also determined to be an element close to 0 (it is not determined to be an element close to 1 because the value of element B is closer to 1 than 0 in terms of difference. In other words, it is not determined to be an element close to 1 because the difference between the value of element B 0.51 and 1 is smaller), and subsequent adjustments should also make it closer to 0; and for element C, it has the largest value among all elements, and is obviously relatively closer to 1 among all elements. Therefore, element C is determined to be an element close to 1, and subsequent adjustments should make it closer to 1.

[0055] Of course, the examples here are only used to illustrate the actual meaning of "so that the values ​​of elements close to the first value are closer to the first value, and the values ​​of elements close to the second value are closer to the second value" to avoid misunderstanding of the technical solution of this specification. It should be understood that the examples here should be understood as an introduction to the principle rather than an execution method. The execution method will be introduced in detail later and will not be repeated here.

[0056] In this specification, multiple methods can be used to adjust the values ​​of floating-point feature vectors.

[0057] In one embodiment, the function of numerical adjustment can be integrated into the feature extraction model used for feature extraction, so that after the feature extraction model extracts a floating-point feature vector from the biological image, it further performs numerical adjustment on the floating-point feature vector and then outputs the adjusted floating-point feature vector.

[0058] In other words, this embodiment can input the user's biological image into a pre-trained feature extraction model, so that the feature extraction model can extract features from the biological image, and numerically adjust the extracted floating-point feature vector so that the values ​​of elements close to the first value are closer to the first value, and the values ​​of elements close to the second value are closer to the second value, and then output the floating-point feature vector after numerical adjustment.

[0059] In this embodiment, a feature extraction model can be trained using a machine learning approach. Any model architecture can be used for model training in this embodiment, such as a CNN (Convolutional Neural Network) model or a Transformer model. The specific model architecture used for model training can be determined by those skilled in the art based on actual needs, and this specification does not impose any limitation thereto.

[0060] In another embodiment, a numerical value adjustment rule for a floating-point feature vector may be pre-set, so that after the floating-point feature vector is extracted, the values ​​of the elements contained therein are adjusted based on the rule.

[0061] For example, the numerical adjustment rule may include: based on the median of the value range of all elements contained in the floating-point feature vector, determining elements whose values ​​are close to the first value and elements whose values ​​are close to the second value, and adjusting the values ​​of elements close to the first value to be closer to the first value, and adjusting the values ​​of elements close to the second value to be closer to the second value. Still taking the floating-point feature vector containing 20 elements and all elements whose values ​​fall within the range of "0.4 to 0.8" as an example, in this example, the median is 0.6, so elements with values ​​less than 0.6 can be determined as elements close to 0, and elements with values ​​greater than 0.6 can be determined as elements close to 1, and then the values ​​of elements with values ​​less than 0.6 are adjusted to values ​​closer to 0, and the values ​​of elements with values ​​greater than 0.6 are adjusted to values ​​closer to 1.

[0062] To give another example, the numerical adjustment rule may also include: based on the value of the center element after all elements contained in the floating-point feature vector are sorted according to their values, determining the elements whose values ​​are close to the first value and the elements whose values ​​are close to the second value, and adjusting the values ​​of the elements close to the first value to be closer to the first value, and adjusting the values ​​of the elements close to the second value to be closer to the second value. Taking a floating-point feature vector containing 21 elements as an example, these 21 elements can be sorted according to their values, and the value of the 11th element in the sorting order is used to determine the "elements whose values ​​are close to the first value" and the "elements whose values ​​are close to the second value". Assuming that the value of the 11th element in the sorting order is 0.45, then the 10 elements with values ​​less than 0.45 can be determined as elements close to the first value, and the values ​​of these 10 elements are adjusted to values ​​closer to 0; the elements with values ​​greater than 0.45 are determined as elements close to the second value, and the values ​​of these 10 elements are adjusted to values ​​closer to 1.

[0063] Of course, the above examples are all illustrative. When making numerical adjustments based on preset rules, how to specifically determine "elements whose values ​​are close to the first numerical value and elements whose values ​​are close to the second numerical value" and how to adjust the two can be determined by technical personnel in this field according to actual needs, and this specification does not limit this.

[0064] Step 106 : Binarize the numerically adjusted floating-point feature vector based on the first numerical value and the second numerical value to obtain a binary feature vector corresponding to the biological image.

[0065] In this specification, after completing the numerical adjustment operation, the numerically adjusted floating-point feature vector can be binary quantized based on the first numerical value and the second numerical value. This can be done by using brute force binarization methods such as threshold segmentation and local threshold quantization, or by using other methods such as statistical-based binary quantization and clustering-based binary quantization. The specific binary quantization method to be used can be determined by those skilled in the art based on actual needs, and this specification does not impose any restrictions on this.

[0066] In this specification, the obtained binary feature vector can be applied to a DID-based identity authentication scenario. In this scenario, when registering a DID, the user can provide their own biometric features as standard biometric features to the blockchain system for maintenance by the blockchain system. Under this premise, this specification can obtain the DID to be verified and the binary feature vector extracted from the user's biometric image. On this basis, the corresponding user can be authenticated based on the binary feature vector and the standard biometric features stored in the blockchain system based on the DID to be verified. If the extracted binary feature vector matches the standard biometric features, the user is determined to be the holder of the DID to be verified.

[0067] In this scenario, the DID to be verified can be obtained in different ways. For example, the DID to be verified can be provided by the user who provided the biometric image. In this case, it is equivalent to verifying whether the user is the owner of the DID to be verified. For another example, the DID of the device owner maintained in the device can be obtained as the DID to be verified. In this case, it is equivalent to verifying whether the user is the holder of the device, which can be used to implement functions such as lock screen unlocking and payment confirmation. Of course, the examples here are only illustrative. The specific method of obtaining the DID to be verified can be determined by those skilled in the art based on actual needs, and this specification does not limit this.

[0068] In this scenario, after obtaining the DID to be verified, the DID to be verified and the extracted binary feature vector can be provided to the blockchain system, so that the blockchain system can obtain and maintain the standard biometric features based on the DID to be verified, and compare the standard biometric features with the obtained binary feature vector, and then return the identity authentication result determined based on the comparison result. On this basis, it can be determined based on the returned result whether the user corresponding to the biometric image is the holder of the DID to be verified. In addition, this specification can also be performed by an independent verification party to perform identity authentication operations based on the DID to be verified and the extracted binary feature vector. For example, this specification can provide the DID to be verified and the extracted binary feature vector to the verification party, and the verification party can initiate a standard biometric acquisition transaction to the blockchain system based on the DID to be verified, so that the blockchain system returns the standard biometric features corresponding to the DID to be verified. On this basis, the verification party can determine whether the standard biometric features match the extracted binary feature vector. If they match, the identity authentication is determined to be successful. Of course, the examples here are also illustrative. Which execution entity performs the identity authentication operation can be determined by those skilled in the art based on actual needs, and this specification does not limit this.

[0069] In this scenario, the standard biometric features maintained in the blockchain system through DID registration can take different forms. For example, during the DID registration process, a user can also use the feature extraction method described above to obtain a binary feature vector corresponding to the user's biometric features, and provide this binary feature vector to the blockchain system. The blockchain system will then use this binary feature vector as the standard biometric feature corresponding to the user and associate it with the DID created for the user. In this case, during subsequent identity verification, the binary feature vector extracted from the captured biometric image can be directly compared with the binary feature vector corresponding to the DID to be verified, and verification is determined to be successful only if the two are consistent. Of course, this example is merely illustrative. The standard biometric features corresponding to the DID maintained in the blockchain system may also be other types of feature parameters used to characterize the biometric features of the corresponding user, for example, the floating-point feature vectors described above. In this case, to eliminate interference from environmental factors, when collecting the floating-point feature vectors used as standard biometric features, the biometric image used to extract the standard biometric features may be collected in a relatively suitable shooting environment to minimize interference from environmental factors. On this basis, during the verification phase, the degree of match between the extracted binary feature vector and the standard biometric features may be determined. If the match is greater than a preset value, the identity verification is determined to be successful. It should be understood that any biometric parameter that can be used to uniquely identify a user, as long as it can eliminate interference from other factors such as environmental factors, may be used as the standard biometric feature maintained in the blockchain system by registering the DID in this scenario. The specific parameters used as standard biometric features and how to perform identity verification based on the standard biometric features and the extracted binary feature vectors can be determined by those skilled in the art based on actual needs, and this specification does not impose any restrictions on this.

[0070] In addition to being applied to DID-based identity authentication scenarios, the biometric feature extraction method of this specification can also be applied to other types of identity authentication scenarios. For example, the above-mentioned standard biometric features can also be maintained in a centralized server. In this case, the extracted binary feature vector can be provided to the centralized server, so that the centralized server can perform identity authentication based on the maintained standard biometric features and the received binary feature vector. Of course, the examples here are only illustrative. It is not clear what kind of identity authentication scenario this specification is specifically applied to, or even whether it is applied to an identity authentication scenario. For example, it can also be applied to a simple feature extraction scenario. For example, the biometric feature extraction method can also be used in scenarios such as establishing a fingerprint library or a face library. All of these can be determined by those skilled in the art based on actual conditions, and this specification does not impose any restrictions on this.

[0071] In this specification, since zero-knowledge proof has the effect of verifying information without revealing specific information, this specification can perform identity authentication based on zero-knowledge proof technology. Specifically, the extracted biometrics can be compared with the standard biometrics of the target user based on zero-knowledge proof technology to determine that the identity authentication is successful if the comparison result shows that the two match.

[0072] It should be understood that when using zero-knowledge proof technology for comparison, if the extracted biometric features are indeed those of the target user, it is necessary to ensure that the extracted biometric features have a sufficiently high degree of similarity with the standard biometric features in order to ensure that the verification result obtained based on the zero-knowledge proof algorithm is verified. Therefore, it is necessary to exclude the influence of environmental factors on the extracted feature vector as much as possible. In other words, when using zero-knowledge proof technology to compare features, it is necessary to exclude the influence of environmental factors on the extracted feature vector to ensure the accuracy of the verification result. The binary quantization operation has this effect. Therefore, when using zero-knowledge proof for identity authentication, in order to ensure the accuracy of identity authentication, it is usually necessary to perform binary quantization on the extracted biometric features.

[0073] For example, when using zero-knowledge proof technology to verify whether the user of a terminal is the owner of the terminal, if the biometric feature used is a facial feature, the standard facial features of the owner can be maintained in advance, and the standard facial features are represented by a binary feature vector. On this basis, the user's facial image can be captured by the camera module on the terminal, and the user's facial features can be extracted from the facial image. Furthermore, the facial features represented by the floating-point feature vector can be binarized to obtain a binary feature vector corresponding to the user. Further, the zero-knowledge proof technology can be used to compare the obtained binary feature vector with the standard facial features to determine whether the user of the terminal is the owner of the terminal.

[0074] It should be understood that in this example, the pre-maintained standard facial features are represented using binary feature vectors to minimize interference from factors such as the environment, retaining the verification basis of facial features that are unique to the user and represent only the user's own facial features. Correspondingly, when extracting the user's facial feature vector, interference from factors such as environmental factors also needs to be eliminated. Therefore, the extracted biometric features need to be binarized to obtain a binary feature vector.

[0075] However, as mentioned above, the related art uses brute-force binarization to quantize the extracted floating-point feature vectors. While this method can eliminate interference from factors such as environmental factors, it can also easily smooth out the corresponding user's biometric characteristics represented by the floating-point feature vectors, thus reducing verification accuracy. This contradicts the original intention of the binary quantization operation to "improve verification accuracy." In other words, the binary quantization operation in the related art, while eliminating the "influence of environmental factors on the feature vector" that reduces the verification accuracy of zero-knowledge proofs, introduces a new factor that reduces the accuracy of the verification results by smoothing out the biometric characteristics represented by the feature vectors.

[0076] Therefore, after extracting a floating-point feature vector, this specification may prioritize numerical adjustment of the floating-point feature vector, as described above, and then perform binary quantization. This eliminates the "influence of environmental factors, etc., on the feature vector" while avoiding the "flattening of the biometric features represented by the feature vector" phenomenon in related art. For example, after completing the numerical adjustment and binary quantization, a zero-knowledge proof can be performed based on the obtained binary quantized feature vector and the target user's standard biometric features. If the zero-knowledge proof passes, the user of the biometric image used to extract the biometric features is determined to be the target user.

[0077] It should be noted that this specification may employ any zero-knowledge proof technology to perform zero-knowledge proof operations. For example, homomorphic encryption-based zero-knowledge proof technologies such as "Pedersen commitments" may be employed, as may interactive zero-knowledge proof technologies such as "Fiat-Shamir transforms" and "Grover-Rabin protocols." It should be understood that this specification does not limit the zero-knowledge proof method employed. The specific zero-knowledge proof technology employed may be determined by those skilled in the art based on actual needs, and this specification does not impose any restrictions thereon.

[0078] In this specification, identity verification can be implemented using zero-knowledge proof in DID-based identity verification scenarios. In this case, the entity responsible for identity verification in this specification can obtain the DID to be verified and the extracted binary feature vector, and perform a zero-knowledge proof based on both. For example, to ensure data privacy, the binary feature vector obtained by the entity can be "first encrypted data obtained by encrypting the binary feature vector," rather than the binary feature vector itself. In addition to obtaining the first encrypted data, the DID to be verified can also be obtained. Similar to the binary feature vector, the standard biometric feature obtained from the blockchain system based on the DID to be verified can also be "second encrypted data obtained by encrypting the standard biometric feature." Based on this, a calculation can be performed on the first and second encrypted data using a preset zero-knowledge proof algorithm, and the verification is determined based on the calculation results. It is important to emphasize that the encryption algorithm used to calculate the first and second encrypted data can be the same. In this case, a simpler zero-knowledge proof algorithm can be used in the subsequent zero-knowledge proof calculation to improve verification efficiency. Of course, this example is only illustrative. Whether to encrypt the data used for identity authentication for privacy protection, and how to use zero-knowledge proof to implement identity authentication in a DID-based authentication scenario can be determined by technical personnel in this field according to actual needs, and this specification does not limit this.

[0079] In this specification, since the standard biometric features used to verify identity in the identity authentication scenario uniquely correspond to the corresponding user, the user's standard biometric features can be maintained by constructing a biometric template for representing the user's biometric features.

[0080] It should be understood that the biometric templates described in this specification only need to meet the following requirements: uniquely correspond to a user and be used to represent the user's biometric characteristics. This specification does not limit the specific form in which the biometric template is presented. For example, the biometric template can be a floating-point feature vector, a binary feature vector, or other forms such as a feature list or feature curve. For example, if the user's biometric template is a binary feature vector, the method described above can be employed: feature extraction is performed on the user's biometric image to obtain a floating-point feature vector representing the user's biometric characteristics. This floating-point feature vector is then numerically adjusted and quantized, with the resulting binary feature vector serving as the user's biometric template. Of course, this example is merely illustrative. The specific form of the biometric templates described in this specification, as well as how to construct a unique biometric template corresponding to a user, can be determined by those skilled in the art based on actual needs and is not limited by this specification.

[0081] However, it should be emphasized that in order to ensure that it uniquely corresponds to the user and can always be used for the identity authentication of the same user, when constructing the biometric template, the interference of factors that may affect the presentation of the user in the biometric image over time and space, such as "such as environmental factors and differences in users over time (such as those caused by the user's age)," should be excluded as much as possible. In other words, the user's biometric template can be: a template that can be used to characterize the user's fixed biometric characteristics that do not change over time and space. Of course, this example is only illustrative. This example is only used to achieve relatively stable and accurate identity authentication, and the biometric template is limited in this way. If the stability of identity authentication is not considered, the biometric template can also be "parameters used to characterize biometric characteristics obtained under the interference of many factors." The specific definition of the biometric template can also be determined by those skilled in the art according to actual needs, and this specification does not impose any restrictions on this.

[0082] After completing the creation of the biometric template, after obtaining the binary feature vector based on the above method, the binary feature vector is template mapped to determine the biometric template corresponding to the user to which the biometric image belongs. The biometric template obtained based on the template mapping is used to compare with the standard biometric template of the target user. When the comparison result shows that the two match, the user to whom the biometric image belongs is determined to be the target user.

[0083] In this specification, a plurality of preset candidate biometric templates may be maintained, from which the biometric template corresponding to the extracted binary feature vector can be determined during template mapping. Alternatively, only a standard biometric template corresponding to the user to which the user belongs may be maintained. In this case, the template mapping operation involves determining whether the maintained standard biometric template matches the extracted binary feature vector. Of course, this example is merely illustrative. The specific method for performing the template mapping operation to determine the biometric template corresponding to the binary feature vector can be determined by those skilled in the art based on actual needs and is not limited by this specification.

[0084] It should be stated that the technical solutions of this specification can be applied to any type of device. For example, the device can be a mobile terminal such as a smart phone or tablet computer, or a fixed terminal such as a PC (Personal Computer) or smart TV, or even other forms such as a virtual machine, a server cluster, or the cloud. It should be understood that any device that only needs to have certain computing resources to implement the feature extraction function can be used as the execution subject of this specification, which can be either a physical device or a virtual device. The specific device to which the technical solutions of this specification are applied can be determined by those skilled in the art according to actual needs, and this specification does not limit this.

[0085] It can be seen from the above technical solution that after extracting the floating-point feature vector used to characterize the user's biometric characteristics from the biological image, this specification does not directly quantize the floating-point feature vector, but instead prioritizes numerically adjusting the floating-point feature vector so that the values ​​of elements close to the first value are closer to the first value, and the values ​​of elements close to the second value are closer to the second value. On this basis, the floating-point feature vector after numerical adjustment is further quantized.

[0086] It should be understood that, through this method, the elements that are close to the "two values ​​used for binary quantization" can be made closer to the values ​​they are close to, which is equivalent to highlighting the biometric characteristics of the corresponding element's position. To a certain extent, this adjustment can be seen as offsetting the smoothing effect of the subsequent binary quantization operation on the biometric characteristics of the corresponding element's position. It can be seen that, through this method, it is possible to avoid the problem of smoothing of biometric characteristics caused by directly performing brute force binarization on the floating-point feature vector due to uneven distribution of element values, such as "all elements in the floating-point feature vector are close to the same value", "only a small number of elements in the floating-point feature vector are close to one value, and most elements are close to another value".

[0087] In this specification, as described above, the feature extraction model can be trained to enable the feature extraction model to complete the above-mentioned feature extraction and value adjustment operations. The following describes the training process of the feature extraction model.

[0088] Figure 2 This is a flow chart of a method for training a feature extraction model according to an exemplary embodiment of this specification. Figure 2 As shown, the method may include the following steps:

[0089] Step 202: Acquire a sample biometric image and standard biometric features of the user to whom the sample biometric image belongs.

[0090] In this specification, a biometric image containing a user's biometric features may be preferentially obtained as a sample biometric image for model training. In addition, the user's standard biometric features may also be obtained as labels for the sample biometric image.

[0091] In this specification, the standard biometric features can be obtained through various methods. For example, a technician with professional knowledge can determine the standard biometric features based on a sample biometric image. In another example, a device with feature extraction capabilities can extract the corresponding user's biometric features from the sample biometric image to serve as the standard biometric features. Of course, this example is merely illustrative, and the specific method for obtaining the standard biometric features can be determined by those skilled in the art based on actual circumstances. For example, in addition to manual or device acquisition, a combination of manual and device acquisition can also be used, and this specification does not limit this.

[0092] In step 204 , the sample biological image is input into the model to be trained, so that the model to be trained extracts features from the sample biological image, adjusts the extracted biological features numerically, and then outputs the biological features of the sample biological image.

[0093] In this specification, the model to be trained may have a feature extraction function and a numerical adjustment function, so that the feature vector output by the trained feature extraction model is a floating-point feature vector that has been numerically adjusted.

[0094] It is worth noting that the models to be trained in this specification can adopt different model architectures. For example, CNN (Convolutional Neural Network) model, Transformer model, etc. can be used for model training. The specific model architecture to be used for model training can be determined by technical personnel in this field according to actual needs, and this specification does not limit this.

[0095] Step 206: Based on the difference between the output biometric feature and the standard biometric feature, the model to be trained is adjusted until the total loss function of the model to be trained converges, and it is determined that the feature recognition model training is completed; wherein, the total loss function includes a feature extraction loss function and a numerical adjustment loss function; the feature extraction loss function is used to enable the feature extraction model to have the function of extracting features from biological images; the numerical adjustment loss function is used to enable the feature extraction model to make the values ​​of elements in the extracted biometric features that are close to the first numerical value closer to the first numerical value, and the values ​​of elements that are close to the second numerical value closer to the second numerical value during the numerical adjustment process; the first numerical value and the second numerical value are the value results after binary quantization of the biometric features.

[0096] In this specification, in order to enable the trained feature extraction model to have both feature extraction and value adjustment functions, the total loss function pre-set in this specification for model training may include two parts: one is a feature extraction loss function, which can be used to enable the feature extraction model to have the function of extracting features from biological images; the other is a value adjustment loss function, which can be used to enable the feature extraction model to adjust the values ​​of elements in the extracted biometric features that are close to the first value to be closer to the first value, and the values ​​of elements that are close to the second value to be closer to the second value during the process of value adjustment. On this basis, after the sample biometric image is input into the model to be trained and the biometric features are output by the model to be trained, the output biometric features can be compared with the obtained standard biometric features to adjust the model to be trained based on the difference between the two until the total loss function of the model to be trained converges, and the model at which the loss function converges is used as the trained feature extraction model.

[0097] Among them, the feature extraction loss function can adopt different feature extraction algorithms. For example, when the extracted biometric feature is a facial feature, the feature extraction algorithm can be an Arcface face recognition algorithm, or an Eigenfaces feature face recognition algorithm, a Fisherfaces algorithm, etc., and when the biometric feature is another type of biometric feature, any type of algorithm for extracting that type of biometric feature can also be used. Of course, the examples here are only illustrative, and the feature extraction algorithm used by the feature extraction loss function can be determined by those skilled in the art according to actual needs, and this specification does not limit this.

[0098] Similarly, the numerical adjustment loss function can also use different algorithms. For example, a loss function designed to implement the numerical adjustment function can be designed using at least one of a hash quantization algorithm, a Gaussian estimator, a binary cross entropy, a difference algorithm, a weighted average algorithm, etc. The specific algorithm or algorithms included in the numerical adjustment loss function can be determined by those skilled in the art based on actual needs, and this specification does not limit this.

[0099] Take "the feature extraction loss function adopts the Arcface face recognition algorithm, and the numerical adjustment loss function is designed based on the hash quantization algorithm, the second-level cross entropy, and the Gaussian estimator" as an example to illustrate:

[0100] In this example, the construction process of the total loss function L can be as follows Figure 3 As shown, it can be specifically expressed as:

[0101] L=w1*L main +w2*L aux ;

[0102] L mainis the feature extraction algorithm as the main supervision loss, that is, the feature extraction loss function described above, and w1 is L main The weight of aux is a numerical adjustment algorithm for auxiliary supervision loss, used as the above numerical adjustment loss function, and w2 is L aux The weight of . Among them, w1+w2=1.0.

[0103] In this example, the primary supervisory loss L main The feature extraction algorithm used can be: Arcface face recognition algorithm.

[0104] In this example, the auxiliary supervision loss L aux The floating-point feature vector can be approximated to 0 or 1 (i.e., the numerical adjustment described above) through learnable hash quantization technology. At this time, the auxiliary quantization loss formula can be:

[0105]

[0106] Hb(u,v)=-ulog(v)+(1-u)log(1-v);

[0107]

[0108]

[0109] Among them, H(b, g) is the auxiliary quantization loss, b k and g k are the adjusted floating-point features and target binary vectors respectively; H b (u, v) = -ulog(v) + (1-u)log(1-v) is the binary cross entropy, v is the predicted probability, and u is the actual binary label (0 or 1);

[0110] For each element of the floating-point feature vector, use the sign function to adjust the feature. From the original feature h k The sign value of plus 1 divided by 2 is obtained, and Keep

[0111] Target binary vector g k Expressed as a Gaussian predictor, the values ​​obtained based on the Gaussian predictor are called Gaussian estimators, which show a Gaussian distribution as the value changes.

[0112] It is not difficult to see from the above formula that this example designs an auxiliary supervision L that can learn hash quantization in parallel based on the main supervision of face recognition. aux, so that each element in the floating-point feature vector obtained by feature extraction can fit the Gaussian predictor g + and g - , to guide the eigenvalues ​​to approach 0 or 1. Among them, by introducing binary cross entropy and The expression of can make different adjustments to the features that are close to 0 or 1, so that the eigenvalues ​​that are close to 0 are closer to 0, and the eigenvalues ​​that are close to 1 are closer to 1.

[0113] After completing the construction of the model's loss function, the labeled sample biological images can be input into the model to be trained to adjust the model according to the difference between the output floating-point feature vector and the standard biological feature used as the label until the total loss function L converges.

[0114] As can be seen from the above technical solution, this specification can train a feature extraction model through supervised training. Specifically, a specific loss function can be designed based on the adjustment requirements for floating-point feature vectors so that the trained feature extraction model has the numerical adjustment function described above. On this basis, simply inputting the biological image into the feature extraction model can extract the adjusted floating-point feature vector used to represent the user's biometric characteristics, thereby avoiding the problem of directly performing binary quantization on the unadjusted floating-point feature vector in related technologies, which leads to the smoothing of the biometric characteristics.

[0115] Below, we will take "authentication through zero-knowledge proof in the DID scenario" as an example to introduce the technical solution of this specification.

[0116] Figure 4 This is an interactive diagram of a DID registration method shown in an exemplary embodiment of this specification. Figure 4 As shown, the method may include the following steps:

[0117] Step 401: The terminal extracts features from the facial image of the user.

[0118] For example, assume that the terminal belongs to user A, and that the terminal is equipped with a feature extraction model trained using the method described above. In this embodiment, after capturing a facial image of user A through a camera, the terminal can input this facial image into the feature extraction model, which then outputs a floating-point feature vector a representing the facial features of user A. This floating-point feature vector is then quantized to binary, yielding a corresponding binary feature vector a'.

[0119] Step 402: The terminal generates a facial feature template of the user based on the extracted facial features.

[0120] Continuing with the above example, after the terminal extracts the binary feature vector a', because the binary quantization operation has the effect of eliminating interference such as environmental factors, it can directly use the binary feature vector a' as the facial feature template of user A. Of course, to ensure that the facial feature template is absolutely unique to user A, the binary feature vector a' can be further adjusted. For example, this adjustment can be performed by the terminal based on preset rules or by technicians with professional knowledge. In this case, the adjusted feature vector can be used as the facial feature template of user A.

[0121] In step 403, the terminal generates a DID registration transaction based on the facial feature template.

[0122] Continuing with the above example, after the terminal generates the facial feature template of user A, on the one hand, it can maintain it, and on the other hand, it can generate a DID registration transaction based on the facial feature template and submit the DID registration transaction to the blockchain system.

[0123] In step 404, the terminal submits the DID registration transaction to the blockchain system.

[0124] Step 405: The blockchain system generates a DID for the user.

[0125] Step 406: associate the generated DID and the received facial feature template for evidence storage.

[0126] Continuing with the above example, after receiving the DID registration transaction, the blockchain system can generate a DID corresponding to user A and create a DID document associated with the DID. On this basis, the facial feature template included in the DID registration transaction can be stored in the DID document.

[0127] In step 407, the blockchain system returns the DID to the terminal.

[0128] In step 408, the terminal stores the DID of the user to which it belongs.

[0129] Continuing with the above example, after completing the DID registration operation, the blockchain system can return the DID generated for user A to the terminal for maintenance by the terminal.

[0130] From the above technical solution, it can be seen that this manual can maintain the facial feature template used for identity authentication in the blockchain system by registering DID for subsequent identity authentication.

[0131] Figure 5 This is an interactive diagram of an identity authentication method shown in an exemplary embodiment of this specification. Figure 5 As shown, the method may include the following steps:

[0132] Step 501: The terminal obtains a facial image of the user to be verified.

[0133] In this embodiment, the user identity authentication operation can be performed in different scenarios.

[0134] Taking "unlocking the terminal screen" as an example, in this scenario, when the user in front of the screen triggers the touch screen to try to unlock it, the user can be treated as a user to be verified, and the user's facial image can be captured by the camera module equipped with the terminal.

[0135] Step 502: The terminal extracts features from the facial image.

[0136] Following the above example, after the terminal collects the face image of the user to be verified, it can extract the features of the face image. Figure 4 The terminals of the illustrated embodiment are the same terminal. Then, the collected facial image can be input into the feature extraction model, so that the model outputs a floating-point feature vector for characterizing the facial features of the user to be verified, and the floating-point feature vector is binary quantized to obtain a binary feature vector for characterizing the facial features of the user to be verified.

[0137] Step 503: The terminal performs template mapping on the extracted facial features.

[0138] Following the above example, Figure 4 After the illustrated embodiment, the terminal can maintain a facial feature template of user A. Then, when performing the template mapping operation, it can be determined whether the binary feature vector obtained by binary quantization matches the maintained facial feature template. For example, the similarity between the two can be calculated. If it is greater than a preset value, the mapping is considered successful, and the maintained facial feature template can be used to verify the identity of the user to be verified.

[0139] In step 504, the terminal encrypts the mapped facial feature template based on a homomorphic encryption algorithm to obtain encrypted facial data.

[0140] Continuing with the above example, after the mapping is complete, subsequent verification operations can be performed based on the mapped facial feature template. Specifically, to protect user privacy while implementing zero-knowledge proof, a homomorphic encryption algorithm can be used to encrypt the facial feature template to obtain encrypted facial data.

[0141] In step 505 , the terminal provides the encrypted facial data and the DID of the user to which the terminal belongs to the verification party.

[0142] Following the above example, since the terminal and Figure 4The terminal shown is the same terminal, and the user to which the terminal belongs is the above-mentioned user A. Therefore, after obtaining the encrypted facial data, the encrypted facial data and user A's DID can be provided to the verification party for identity verification.

[0143] In step 506, the verifier generates an acquisition transaction for the standard facial feature template based on the received DID.

[0144] Continuing with the above example, after receiving user A's DID and encrypted facial data, the verifier can generate a transaction to obtain the standard facial feature template for user A based on the DID and provide the transaction to the blockchain system.

[0145] In step 507, the verifier provides the acquired transaction to the blockchain system.

[0146] In step 508, the blockchain system searches for a standard facial feature template based on the DID.

[0147] Continuing with the above example, the blockchain system can obtain user A’s standard facial feature template from the corresponding DID document based on user A’s DID.

[0148] In step 509, the blockchain system encrypts the standard facial feature template based on the homomorphic encryption algorithm to obtain encrypted template data.

[0149] Continuing with the above example, after finding the standard facial feature template of user A, the standard facial feature template can be encrypted based on the same homomorphic encryption algorithm in step 504 to obtain encrypted template data, and the encrypted template data is returned to the verification party.

[0150] In step 510, the blockchain system returns the encrypted template data to the verifier.

[0151] In step 511, the verifier performs zero-knowledge proof based on the encrypted face data and the encrypted template data.

[0152] Continuing with the above example, since this embodiment uses the same homomorphic encryption algorithm to encrypt the "facial feature template obtained by template mapping" and the "standard facial feature template found based on DID", if the encrypted data are completely consistent, it means that the data before encryption is also completely consistent. Therefore, after obtaining the encrypted template data returned by the blockchain system, the verifier can directly compare the encrypted template data and the encrypted face data. If the two are consistent, it indicates that the identity authentication is successful. Otherwise, it indicates that the facial feature template of user A maintained by the terminal has been tampered with and the identity authentication fails.

[0153] In step 512, the authenticator returns the authentication result to the terminal.

[0154] Continuing with the above example, the authenticator can return the verification result to the terminal. If the verification is successful, it proves that the user to be verified is user A. At this time, the terminal can unlock the screen to allow the user to operate. Otherwise, it will not be unlocked.

[0155] It can be seen from the above technical solutions that the technical solutions of this specification can be used in DID identity authentication scenarios. It should be understood that due to the existence of operation steps such as template mapping and zero-knowledge proof, the extracted facial features will directly affect the accuracy of template mapping and zero-knowledge proof. Imagine that if the relevant technology directly quantizes the extracted floating-point feature vector without numerical adjustment, the user's facial features will be smoothed out, and then problems such as template mapping failure will occur. In other words, when performing zero-knowledge proof in a DID-based identity authentication scenario, the accuracy of the extracted binary feature vector is required to be higher. Therefore, this embodiment extracts facial features through the feature extraction model described above, avoiding the problem of only brute-force binarization of the extracted floating-point feature vector in the relevant technology, which leads to low accuracy of zero-knowledge proof based on DID.

[0156] Figure 6 This is a schematic structural diagram of a device provided by an exemplary embodiment. Figure 6 At the hardware level, the device includes a processor 602, an internal bus 604, a network interface 606, a memory 608, and a non-volatile memory 610. Of course, it may also include hardware required for other functions. One or more embodiments of this specification can be implemented based on software, such as the processor 602 reading the corresponding computer program from the non-volatile memory 610 into the memory 608 and then running it. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0157] Please refer to Figure 7 , the biometric feature extraction device can be applied to Figure 6 The device shown in the figure is used to implement the technical solution of this specification. The biometric feature extraction device may include:

[0158] An extraction unit 701 performs feature extraction on a user's biometric image to obtain a floating-point feature vector representing the user's biometric features.

[0159] An adjusting unit 702 adjusts the values ​​of the elements in the floating-point feature vector so that the values ​​of the elements close to the first value are closer to the first value, and the values ​​of the elements close to the second value are closer to the second value.

[0160] The quantization unit 703 performs binary quantization on the numerically adjusted floating-point feature vector based on the first numerical value and the second numerical value to obtain a binary feature vector corresponding to the biological image.

[0161] Optionally, also include:

[0162] The acquisition unit 704 acquires the DID to be verified and authenticates the user based on the binary feature vector and the standard biometric feature stored in the blockchain system based on the DID to be verified;

[0163] The determining unit 705 determines that the user is the holder of the DID to be verified when the binary feature vector matches the standard biometric feature.

[0164] Optional,

[0165] The invention further comprises: a proving unit 706, which performs zero-knowledge proof based on the binarized feature vector and the standard biometric feature of the target user;

[0166] The determining unit 705 is further configured to: if the zero-knowledge proof passes, determine that the user to whom the biological image belongs is the target user.

[0167] Optional,

[0168] The system further includes: a comparison unit 707, which performs template mapping on the binary feature vector to obtain a biometric template corresponding to the user; the biometric template obtained based on the template mapping is used to compare with a standard biometric template of the target user;

[0169] The determining unit 705 is further configured to: determine the user to whom the biological image belongs as the target user when the comparison result indicates that the two match.

[0170] Optionally, the extracting unit 701 and the adjusting unit 702 are further configured to:

[0171] The user's biological image is input into a pre-trained feature extraction model, so that the feature extraction model performs feature extraction on the biological image, and the extracted floating-point feature vector is numerically adjusted so that the values ​​of elements close to a first value are closer to the first value, and the values ​​of elements close to a second value are closer to the second value, and the floating-point feature vector after numerical adjustment is output.

[0172] Please refer to Figure 8 , the training device of the feature extraction model can be applied to Figure 6 The device shown in the figure is used to implement the technical solution of this specification. The training device of the feature extraction model may include:

[0173] An acquisition unit 801 acquires a sample biometric image and a standard biometric feature of a user to which the sample biometric image belongs;

[0174] The training unit 802 inputs the sample biological image into the model to be trained, so that the model to be trained extracts features from the sample biological image, adjusts the extracted biometric features, and then outputs biometric features of the sample biological image; and adjusts the model to be trained based on the difference between the output biometric features and the standard biometric features until the total loss function of the model to be trained converges, thereby determining that the feature recognition model training is complete.

[0175] Among them, the total loss function includes a feature extraction loss function and a numerical adjustment loss function; the feature extraction loss function is used to enable the feature extraction model to have the function of extracting features from biological images; the numerical adjustment loss function is used to enable the feature extraction model to make the values ​​of elements in the extracted biological features close to the first numerical value closer to the first numerical value, and the values ​​of elements close to the second numerical value closer to the second numerical value during the numerical adjustment process; the first numerical value and the second numerical value are the value results after binary quantization of the biological features.

[0176] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or any combination of these devices.

[0177] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0178] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0179] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0180] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0181] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0182] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "an," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0183] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when..." or "when..." or "in response to determining."

[0184] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification shall be included in the scope of protection of one or more embodiments of this specification.

Claims

1. A method for extracting biometric features, comprising: Extracting features from a biological image of a user to obtain a floating-point feature vector for representing biological features of the user; Adjusting the values ​​of the elements in the floating-point feature vector so that the values ​​of the elements close to the first value are closer to the first value, and the values ​​of the elements close to the second value are closer to the second value; The numerically adjusted floating-point feature vector is binary quantized based on the first value and the second value to obtain a binary feature vector corresponding to the biological image.

2. The method according to claim 1, further comprising: Obtain the DID to be verified, and authenticate the user based on the binary feature vector and the standard biometric feature stored in the blockchain system based on the DID to be verified; When the binary feature vector matches the standard biometric feature, the user is determined to be the holder of the DID to be verified.

3. The method according to claim 1, further comprising: performing zero-knowledge proof based on the binarized feature vector and a standard biometric feature of the target user; When the zero-knowledge proof passes, the user to whom the biological image belongs is determined to be the target user.

4. The method according to claim 1, further comprising: Performing template mapping on the binary feature vector to obtain a biometric feature template corresponding to the user; The biometric template obtained based on template mapping is used to compare with the standard biometric template of the target user; When the comparison result shows that the two match, the user to whom the biological image belongs is determined to be the target user.

5. The method according to claim 1, wherein extracting features from the user's biological image to obtain a floating-point feature vector for characterizing the user's biological features, and numerically adjusting elements in the floating-point feature vector comprises: The user's biological image is input into a pre-trained feature extraction model so that the feature extraction model extracts features from the biological image, and the extracted floating-point feature vector is numerically adjusted so that the values ​​of elements close to a first value are closer to the first value, and the values ​​of elements close to a second value are closer to the second value, and the floating-point feature vector after numerical adjustment is output.

6. A method for training a feature extraction model, comprising: Acquire a sample biometric image and a standard biometric feature of a user to which the sample biometric image belongs; Inputting the sample biological image into the model to be trained, so that the model to be trained extracts features from the sample biological image, and after numerically adjusting the extracted biological features, outputs the biological features of the sample biological image; Based on the difference between the outputted biometric feature and the standard biometric feature, adjusting the model to be trained until the total loss function of the model to be trained converges, and determining that the feature recognition model training is completed; Among them, the total loss function includes a feature extraction loss function and a numerical adjustment loss function; the feature extraction loss function is used to enable the feature extraction model to have the function of extracting features from biological images; the numerical adjustment loss function is used to enable the feature extraction model to make the values ​​of elements in the extracted biological features that are close to the first numerical value closer to the first numerical value, and the values ​​of elements that are close to the second numerical value closer to the second numerical value during the numerical adjustment process; the first numerical value and the second numerical value are the value results after binary quantization of the biological features.

7. A biometric feature extraction device, comprising: An extraction unit, performing feature extraction on a biological image of a user to obtain a floating point feature vector for representing a biological feature of the user; an adjusting unit, which performs numerical adjustment on the elements in the floating-point feature vector so that the values ​​of the elements close to the first value are closer to the first value, and the values ​​of the elements close to the second value are closer to the second value; The quantization unit performs binary quantization on the numerically adjusted floating-point feature vector based on the first numerical value and the second numerical value to obtain a binary feature vector corresponding to the biological image.

8. A training device for a feature extraction model, comprising: An acquisition unit, which acquires a sample biological image and a standard biological feature of a user to which the sample biological image belongs; The training unit inputs the sample biological image into the model to be trained, so that the model to be trained extracts features from the sample biological image, and after numerically adjusting the extracted biological features, outputs the biological features of the sample biological image; and, based on the difference between the output biological features and the standard biological features, adjusts the model to be trained until the total loss function of the model to be trained converges, and determines that the training of the feature recognition model is completed; Among them, the total loss function includes a feature extraction loss function and a numerical adjustment loss function; the feature extraction loss function is used to enable the feature extraction model to have the function of extracting features from biological images; the numerical adjustment loss function is used to enable the feature extraction model to make the values ​​of elements in the extracted biological features that are close to the first numerical value closer to the first numerical value, and the values ​​of elements that are close to the second numerical value closer to the second numerical value during the numerical adjustment process; the first numerical value and the second numerical value are the value results after binary quantization of the biological features.

9. An electronic device, comprising: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 6 by running the executable instructions.

10. A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • User feature vector selection method and system

    CN107292146A

  • Biometric based self-sovereign information management

    US20200201966A1

  • Identity verification and associated platform

    US20240403403A1