Methods, applications, devices, systems and equipment for generating digital identity information
By using a facial feature encoder in a blockchain network to generate digital identity information, the problems of digital identities being difficult to remember and having low verification efficiency are solved, achieving highly accurate and efficient identity verification.
Patent Information
- Application Number
- CN202310835479.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-07
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2043-07-07
AI Technical Summary
Digital identity information generated by existing technologies is difficult to remember, and its accuracy, reliability, and verification efficiency in subsequent use need to be improved.
By deploying a trained facial feature encoder on a regulatory node in the blockchain network, facial images of the target object are obtained. The facial feature encoding model is used to calculate the similarity, generate and register digital identity information, and identity can be verified with only one facial scan.
It improves the accuracy and reliability of digital identity information, simplifies the verification process, reduces memory burden, and increases efficiency.
Smart Images

Figure CN116824676B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information processing technology, and in particular to a method, application method, apparatus, system and equipment for generating digital identity information. Background Technology
[0002] A digital identity is an entity composed of a digital identifier and associated data, used to uniquely identify and verify an individual's identity. The security and trustworthiness of digital identities are crucial for protecting user privacy and preventing identity theft.
[0003] Currently in the blockchain field, digital identities are typically generated and protected using cryptographic techniques. Generating a digital identity requires the use of cryptographic algorithms to create digital certificates or public-key encryption systems. A digital certificate is a digital file containing identity information and a public key, used to verify identity and encrypt communication. Public-key encryption systems use asymmetric encryption algorithms, which have two keys, a public key and a private key, used to encrypt and decrypt data.
[0004] However, digital identities generated using cryptography are difficult to remember because the numbers do not have any interpretable meaning, and their accuracy, reliability, and verification efficiency in subsequent use need to be improved. Summary of the Invention
[0005] The embodiments of the present invention provide a method, application method, apparatus, system and device for generating digital identity information, in order to solve the technical problems that current digital identity information is not easy to remember, and its accuracy, reliability and verification efficiency in subsequent use need to be improved.
[0006] In a first aspect, embodiments of the present invention provide a method for generating digital identity information, characterized in that it is applied to a supervisory node in a blockchain network, the supervisory node being deployed with a trained facial feature encoder and storing registered digital identity information of registered objects; the method includes: acquiring a facial image of a target object; inputting the facial image into the trained facial feature encoder and outputting current facial feature encoding information; calculating the similarity between the current facial feature encoding information and each of the registered digital identity information; and, in the absence of a similarity greater than a preset threshold, determining the current facial feature encoding information as the digital identity information of the target object and registering the digital identity information of the target object.
[0007] In some embodiments, before inputting the facial image into the trained facial feature encoder, the method further includes: training the facial feature encoding model to be trained using contrastive learning based on a facial image sample set to obtain a trained facial feature encoding model, wherein the facial feature encoding model includes a facial encoding layer and a linear transformation layer, the facial encoding layer is a visual attention model, the visual attention model includes an image embedding layer and an encoder based on an attention mechanism, the image embedding layer includes a preset number of convolutional kernels of a preset size; and determining the visual attention model in the trained facial feature encoding model as the trained facial feature encoder.
[0008] In some embodiments, training the facial feature encoding model based on a facial image sample set using contrastive learning includes: acquiring facial image samples corresponding to a preset batch number of objects, and performing data augmentation on the facial image samples of each object; inputting each data-augmented facial image sample into the visual attention model in the facial feature encoding model, and outputting the facial feature sample value corresponding to each data-augmented facial image sample; calculating the feature similarity between each positive sample pair and each negative sample pair based on each facial feature sample value, wherein the positive sample pair refers to data-augmented facial image samples from the same object, and the negative sample pair refers to data-augmented facial image samples from different objects; calculating the normalized contrastive cross-entropy loss based on the feature similarity between each positive sample pair and each negative sample pair, and updating the model parameters of the facial feature encoding model based on the normalized contrastive cross-entropy loss.
[0009] In some embodiments, the registered digital identity information of the registered object includes multiple categories, each category having corresponding category facial feature encoding information; calculating the similarity between the current facial feature encoding information and each of the registered digital identity information includes: determining the target category corresponding to the current facial feature encoding information based on the similarity between the current facial feature encoding information and the category facial feature encoding information of each category; and calculating the similarity between the current facial feature encoding information and the registered digital identity information under the target category.
[0010] In some embodiments, before determining the similarity between the current facial feature encoding information and the category facial feature encoding information of each category, the method further includes: dividing the registered digital identity information of the registered object into multiple categories based on the feature projection layer, and determining the central facial feature encoding information of each category as the category facial feature encoding information.
[0011] In some embodiments, the method further includes: determining the target digital identity information of the target registered object corresponding to the current facial feature encoding information when there is a similarity greater than a preset threshold.
[0012] Secondly, the present invention provides an application method for digital identity information generated based on the digital identity information generation method described in any one of the first aspects, applied to a supervisory node in a blockchain network, the method comprising: creating a blockchain account in the blockchain network based on the digital identity information of a target object; and storing the relevant information of the target object on the blockchain account.
[0013] Thirdly, the present invention provides an application method for digital identity information generated based on the digital identity information generation method described in any one of the first aspects, applied to a supervisory node in a blockchain network. The method includes: receiving a trusted credential acquisition request sent by a client, the trusted credential acquisition request including a facial image of a target object to be verified; inputting the facial image to be verified into a trained facial feature encoder and outputting facial feature encoding information to be verified; determining the target registered object and target registered digital identity information corresponding to the facial feature encoding information to be verified based on the similarity between the facial feature encoding information to be verified and each registered digital identity information; performing dimensionality reduction and visualization processing on the facial feature encoding information to be verified, and matching it with the dimensionality reduction and visualization processing result of the registered digital identity information of the registered object to obtain an interpretability result, the interpretability result being used to characterize that the target object matches the target registered object; generating a trusted digital identity credential based on the target registered digital identity information and the interpretability result; and returning the trusted digital identity credential to the client so that the client sends the trusted digital identity credential to the server.
[0014] Fourthly, the present invention provides an application method for digital identity information generated based on the digital identity information generation method described in any one of the first aspects, applied to a client. The method includes: sending a trusted credential acquisition request to a supervisory node in a blockchain network, the trusted credential acquisition request including a facial image of a target object to be verified; receiving a trusted digital identity credential returned by the supervisory node, wherein the trusted digital identity credential is generated by the supervisory node based on the target registered digital identity information and interpretability results, the target registered digital identity information is determined based on the similarity between the facial feature encoding information to be verified and each registered digital identity information, the facial feature encoding information to be verified is obtained by feature extraction of the facial image to be verified based on a trained facial feature encoder, and the interpretability results are obtained by dimensionality reduction and visualization processing of the facial feature encoding information to be verified, used to characterize the target object matching a target registered object; and sending the trusted digital identity credential to a server, so that the server obtains relevant information of the target object from a blockchain account in the blockchain network based on the trusted digital identity credential.
[0015] Fifthly, the present invention provides an application method for digital identity information generated based on the digital identity information generation method described in any one of the first aspects, applied to a server. The method includes: receiving a trusted digital identity credential sent by a client, wherein the trusted digital identity credential is generated by a supervisory node of a blockchain network based on target registered digital identity information and interpretability results; the target registered digital identity information is determined based on the similarity between the facial feature encoding information to be verified and each registered digital identity information; the facial feature encoding information to be verified is obtained by feature extraction from the facial image of the target object based on a trained facial feature encoder; and the interpretability results are obtained by dimensionality reduction and visualization processing of the facial feature encoding information to be verified, used to characterize the target object matching the target registered object; and obtaining relevant information of the target object from the blockchain account corresponding to the blockchain network based on the trusted digital identity credential.
[0016] Sixthly, the present invention provides a digital identity information generation device applied to a supervisory node in a blockchain network. The supervisory node is equipped with a trained facial feature encoder and stores registered digital identity information of registered objects. The generation device includes: an image acquisition module for acquiring a facial image of a target object; a first encoding module for inputting the facial image into the trained facial feature encoder and outputting current facial feature encoding information; a first calculation module for calculating the similarity between the current facial feature encoding information and each registered digital identity information; and a first determination module for determining the current facial feature encoding information as the digital identity information of the target object when there is no similarity greater than a preset threshold, and registering the digital identity information of the target object.
[0017] In a seventh aspect, the present invention provides an application device for digital identity information generated based on the digital identity information generation method described in any one of the first aspects, applied to a supervisory node in a blockchain network. The application device includes: an account registration module for creating a blockchain account in the blockchain network based on the digital identity information of a target object; and an information uploading module for uploading and storing the relevant information of the target object into the blockchain account.
[0018] Eighthly, the present invention provides an application device for digital identity information generated based on the digital identity information generation method described in any one of the first aspects, applied to a supervisory node in a blockchain network. The application device includes: a first receiving module for receiving a trusted credential acquisition request sent by a client, the trusted credential acquisition request including a facial image of a target object to be verified; a second encoding module for inputting the facial image to be verified into a trained facial feature encoder and outputting facial feature encoding information to be verified; a second calculation module for determining the target registered object and target registered digital identity information corresponding to the facial feature encoding information to be verified based on the similarity between the facial feature encoding information to be verified and each registered digital identity information; a dimensionality reduction visualization module for performing dimensionality reduction visualization processing on the facial feature encoding information to be verified to obtain an interpretability result, the interpretability result being used to characterize the target object matching the target registered object; a credential generation module for generating a trusted digital identity credential based on the target registered digital identity information and the interpretability result; and a first sending module for returning the trusted digital identity credential to the client, so that the client sends the trusted digital identity credential to the server.
[0019] Ninthly, the present invention provides an application device for digital identity information generated based on the digital identity information generation method of any one of the first aspects, applied to a client. The application device includes: a second sending module, configured to send a trusted credential acquisition request to a supervisory node in a blockchain network, the trusted credential acquisition request including a facial image of a target object to be verified; a second receiving module, configured to receive a trusted digital identity credential returned by the supervisory node, wherein the trusted digital identity credential is generated by the supervisory node based on the target registered digital identity information and interpretability results, the target registered digital identity information is determined based on the similarity between the facial feature encoding information to be verified and each registered digital identity information, the facial feature encoding information to be verified is obtained by feature extraction of the facial image to be verified based on a trained facial feature encoder, and the interpretability results are obtained by dimensionality reduction visualization processing of the facial feature encoding information to be verified, used to characterize the target object matching the target registered object; the second sending module is further configured to send the trusted digital identity credential to a server, so that the server obtains relevant information of the target object from a blockchain account in the blockchain network based on the trusted digital identity credential.
[0020] In a tenth aspect, the present invention provides an application device for digital identity information generated based on the digital identity information generation method described in any one of the first aspects, applied to a server. The application device includes: a third receiving module, configured to receive a trusted digital identity credential sent by a client, wherein the trusted digital identity credential is generated by a supervisory node of the blockchain network based on target registered digital identity information and interpretability results; the target registered digital identity information is determined based on the similarity between the facial feature encoding information to be verified and each registered digital identity information; the facial feature encoding information to be verified is obtained by feature extraction from the facial image to be verified of the target object based on a trained facial feature encoder; and the interpretability results are obtained by dimensionality reduction and visualization processing of the facial feature encoding information to be verified, used to characterize the target object matching the target registered object; and an information acquisition module, configured to acquire relevant information of the target object from the blockchain account corresponding to the blockchain network based on the trusted digital identity credential.
[0021] Eleventhly, the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store computer programs; the processor is used to execute the program stored in the memory to implement the steps of the method for generating digital identity information as described in any one of the first aspects, or to implement the steps of the method for applying digital identity information as described in any one of the second to fifth aspects.
[0022] In a twelfth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method for generating digital identity information as described in any one of the first aspects, or implements the steps of the method for applying digital identity information as described in any one of the second to fifth aspects.
[0023] The present invention provides a method, application method, apparatus, system, and device for generating digital identity information. The generation method is applied to a supervisory node in a blockchain network. The supervisory node is equipped with a trained facial feature encoder and stores registered digital identity information of registered objects. The method involves acquiring a facial image of a target object; inputting the facial image into the trained facial feature encoder to output current facial feature encoding information; calculating the similarity between the current facial feature encoding information and each registered digital identity information; and determining the current facial feature encoding information as the target object's digital identity information if no similarity exceeds a preset threshold, and registering the target object's digital identity information. In other words, the present invention improves the accuracy and reliability of subsequent digital identity use by using the actual facial features of the target object as its digital identity. Furthermore, only a single facial scan is required during use, eliminating the need to input or remember any passwords or other information. Attached Figure Description
[0024] Figure 1 A flowchart illustrating a method for generating digital identity information provided in an embodiment of the present invention;
[0025] Figure 2 A flowchart illustrating another method for generating digital identity information provided in an embodiment of the present invention;
[0026] Figure 3 for Figure 2 A detailed flowchart of step S201 in the illustrated embodiment;
[0027] Figure 4 A flowchart illustrating the training process of a face encoder based on contrastive learning, provided for an embodiment of the present invention;
[0028] Figure 5 This is a schematic diagram of the structure of a patch embedding layer provided in an embodiment of the present invention;
[0029] Figure 6 for Figure 1 A detailed flowchart of step S103 in the illustrated embodiment is shown.
[0030] Figure 7 A flowchart illustrating a digital identity generation process based on facial feature catalog classification, provided in this embodiment of the invention;
[0031] Figure 8 A flowchart illustrating a method for applying digital identity information according to an embodiment of the present invention;
[0032] Figure 9 A flowchart illustrating the generation and application of digital identity as provided in an embodiment of the present invention;
[0033] Figure 10 An interactive schematic diagram illustrating another method for applying digital identity information provided in an embodiment of the present invention;
[0034] Figure 11a A visualization diagram of the two-dimensional coordinates of feature values for registering digital identity information provided in an embodiment of the present invention;
[0035] Figure 11b A visualization diagram of the three-dimensional coordinates of feature values for registering digital identity information provided in an embodiment of the present invention;
[0036] Figure 12 This is a schematic diagram of facial feature encoding information to be verified, provided in an embodiment of the present invention.
[0037] Figure 13a This invention provides a method for visualizing the two-dimensional results of facial feature encoding values to be verified, along with... Figure 11a A matching diagram of the two-dimensional visualization results;
[0038] Figure 13b This invention provides a method for visualizing the three-dimensional results of facial feature encoding values to be verified and... Figure 11b A matching diagram of the 3D visualization results;
[0039] Figure 14 This is a schematic diagram of the structure of a trusted digital identity credential provided in an embodiment of the present invention;
[0040] Figure 15 A flowchart illustrating another method for applying digital identity information provided in an embodiment of the present invention;
[0041] Figure 16 A flowchart illustrating another method for applying digital identity information provided in an embodiment of the present invention;
[0042] Figure 17 A flowchart illustrating another method for applying digital identity information provided in an embodiment of the present invention;
[0043] Figure 18 A flowchart illustrating another method for generating and applying digital identity, as provided in an embodiment of the present invention.
[0044] Figure 19This is a schematic diagram of the structure of a digital identity information generation device provided in an embodiment of the present invention;
[0045] Figure 20 This is a schematic diagram of the structure of an application device for digital identity information provided in an embodiment of the present invention;
[0046] Figure 21 A schematic diagram of the structure of another digital identity information application device provided in an embodiment of the present invention;
[0047] Figure 22 A schematic diagram of the structure of another digital identity information application device provided in an embodiment of the present invention;
[0048] Figure 23 A schematic diagram of the structure of another digital identity information application device provided in an embodiment of the present invention.
[0049] Figure 24 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] A digital identity is an entity composed of a digital identifier and related data, used to uniquely identify and verify an individual's identity. The security and trustworthiness of digital identities are crucial for protecting user privacy and preventing identity theft. With the continuous development and widespread adoption of digital technologies, the demand for digital identities is growing, becoming an important support for the development of the digital economy and a digital society.
[0052] Currently in the blockchain field, digital identities are typically generated and protected using cryptographic techniques. Generating a digital identity requires using cryptographic algorithms to create digital certificates or public-key cryptography systems. A digital certificate is a digital file containing identity information and a public key, used for identity verification and encrypted communication. Public-key cryptography systems use asymmetric encryption algorithms with two keys: a public key and a private key, used for encrypting and decrypting data. Additionally, there is another type of digital identity based on basic user information and biometric data.
[0053] However, digital identities generated using cryptography, or those based on basic user information and biometrics, are difficult for most people to remember. Furthermore, these digital identities differ from real-world identity verification methods, lacking any interpretable meaning between the numbers. Their accuracy, reliability, and efficiency in subsequent use all need improvement.
[0054] To address the aforementioned technical problems, the present invention proposes the following technical concept: by extracting the actual facial features of the target object as a digital identity, it has higher accuracy and reliability compared to digital identities generated by traditional password students. Furthermore, in subsequent use, only a facial scan is required, without the need to input or remember any passwords or other information, thus improving efficiency.
[0055] Figure 1 This is a flowchart illustrating a method for generating digital identity information according to an embodiment of the present invention. It is applied to a supervisory node in a blockchain network. The supervisory node is equipped with a trained facial feature encoder and stores the registered digital identity information of registered individuals. Figure 1 As shown, the method for generating digital identity information includes:
[0056] Step S101: Obtain the facial image of the target object.
[0057] Specifically, the target can collect facial images through a client (such as a mobile phone, camera, etc.) and send the collected facial images to the regulatory nodes on the blockchain network.
[0058] Step S102: Input the facial image into the trained facial feature encoder and output the current facial feature encoding information.
[0059] Specifically, a pre-trained facial feature encoder has been pre-deployed on the monitoring node, which can encode the facial image of the target object to obtain the current facial feature encoding information. The facial feature encoding information is usually a specific pixel value, so the facial feature encoding information can also be called facial feature encoding value.
[0060] Before using a pre-trained facial feature encoder, it is necessary to train the facial feature encoder to be trained. This can be done through contrastive learning or by transferring learning and fine-tuning.
[0061] Step S103: Calculate the similarity between the current facial feature encoding information and each of the registered digital identity information.
[0062] Specifically, registered digital identity information can be understood as the facial feature encoding values extracted from the facial image of a registered object through a trained facial feature encoder. To meet regulatory and auditing requirements, all registered digital identity information can be compiled into a facial feature directory, facilitating the management and maintenance of different facial feature encoding values (i.e., digital identities) by regulatory nodes. In this step, the cosine similarity between the target object's current facial feature encoding value and each facial feature encoding value in the facial feature directory is calculated.
[0063] Step S104: If there is no similarity greater than a preset threshold, determine that the current facial feature encoding information is the digital identity information of the target object, and register the digital identity information of the target object.
[0064] Specifically, if the similarity between the current facial feature encoding value and all registered digital identity information is not greater than a preset threshold, it indicates that the current facial feature encoding value of the target object differs significantly from all registered digital identity information. This further indicates that the target object has not yet registered digital identity information on the regulatory node. Therefore, the current facial feature encoding value can be used as the target object's digital identity information and registered on the regulatory node.
[0065] It should be noted that the preset threshold can be set based on the experience of those skilled in the art, and the present invention does not impose any restrictions on it.
[0066] In some embodiments, the method further includes: determining the target digital identity information of the target registered object corresponding to the current facial feature encoding information when there is a similarity greater than a preset threshold.
[0067] Specifically, if there is a situation where the similarity between a registered digital identity information and the current facial feature encoding value is greater than a preset threshold, it means that the current facial feature encoding value of the target object is quite similar to the registered digital identity information of a certain registered object, and can be considered as the same object. This indicates that the target object has already registered digital identity information on the regulatory node, and the target object can directly use the corresponding registered digital identity information for subsequent business processing.
[0068] The method for generating digital identity information provided in this invention is applied to a supervisory node in a blockchain network. The supervisory node is equipped with a trained facial feature encoder and stores the registered digital identity information of registered objects. The method involves acquiring a facial image of a target object; inputting the facial image into the trained facial feature encoder to output current facial feature encoding information; calculating the similarity between the current facial feature encoding information and each registered digital identity information; and determining the current facial feature encoding information as the target object's digital identity information if no similarity exceeds a preset threshold, and registering the target object's digital identity information. This invention uses the actual facial features of the target object as its digital identity, which provides more accurate and reliable identity verification compared to digital identities generated by traditional cryptography. Furthermore, using facial features as a digital identity can improve the speed and efficiency of identity verification, as only a single facial scan is required to complete the verification process, eliminating the need to input or remember any passwords or other information.
[0069] Based on the above embodiments, Figure 2 A flowchart illustrating another method for generating digital identity information provided in an embodiment of the present invention is shown below. Figure 2 As shown, before step S102, the following steps are also included:
[0070] Step S201: Based on the facial image sample set, the facial feature coding model to be trained is trained using a contrastive learning approach to obtain a trained facial feature coding model.
[0071] The facial feature encoding model includes a facial encoding layer and a linear transformation layer. The facial encoding layer is a visual attention model, which includes an image embedding layer and an encoder based on an attention mechanism. The image embedding layer includes a preset number of convolutional kernels of a preset size.
[0072] Specifically, the facial image sample set can be understood as a collection of unlabeled facial image samples. The facial feature encoding model can be self-supervised by using contrastive learning based on this facial image sample set. The facial feature encoding model includes a facial encoding layer and a linear transformation layer. The facial encoding layer uses a VisionTransformer (VIT) model, which includes an image embedding layer (patch embedding) and an attention-based encoder (Transformer encoder). This embodiment of the invention optimizes the image embedding layer by changing the traditional large convolutional kernel to a preset number of convolutional kernels of a preset size. Using multiple small convolutional kernels can reduce the model's parameters while maintaining the same receptive field, and simultaneously provide better generalization and feature extraction capabilities.
[0073] In addition, the face encoding layer can also be a 50-layer convolutional neural network (ResNet50), a hierarchical attention model (Swin Transformer), etc.
[0074] Step S202: Determine the visual attention model in the trained facial feature encoding model as the trained facial feature encoder.
[0075] Specifically, after obtaining the trained facial feature encoding model, the linear transformation layer in the facial feature encoding model is no longer needed. Instead, the facial feature encoding layer, such as the visual attention model mentioned above, is directly used as the trained facial feature encoder and deployed on the monitoring node to realize the subsequent generation and application of digital identity information.
[0076] In some embodiments, Figure 3 for Figure 2 The detailed flowchart of step S201 in the illustrated embodiment is as follows: Figure 3 As shown, step S201 includes the following steps:
[0077] Step S301: Obtain facial image samples corresponding to a preset batch number of objects, and perform data augmentation on the facial image samples of each object.
[0078] Step S302: Input each data-enhanced facial image sample into the visual attention model in the facial feature coding model, and output the facial feature sample value corresponding to each data-enhanced facial image sample.
[0079] Step S303: Calculate the feature similarity between each positive sample pair and each negative sample pair based on the facial feature sample values. The positive sample pair refers to the data-enhanced facial image sample from the same object, and the negative sample pair refers to the data-enhanced facial image sample from different objects.
[0080] Step S304: Calculate the normalized contrastive cross-entropy loss based on the feature similarity between each positive sample pair and each negative sample pair, and update the model parameters of the facial feature encoding model based on the normalized contrastive cross-entropy loss.
[0081] Specifically, the self-supervised training of the face coding model is achieved by using contrastive learning and data augmentation. The principle is to train the encoder so that the encoder's encoding of an image is closer to that of the image after data augmentation transformation, and further away from the encoding of features of other images and the image after data augmentation transformation. Figure 4 A flowchart illustrating the training process of a face encoder based on contrastive learning, as provided in this embodiment of the invention, is shown below. Figure 4 As shown, it mainly includes four parts: data augmentation, face coding layer, linear transformation layer, and loss function based on similarity calculation.
[0082] like Figure 4 As shown, during each training iteration, facial image samples of a preset batch size are first augmented. Data augmentation refers to various transformations and perturbations of the original image data, such as rotation, cropping, flipping, and scaling, to expand the training set. This allows the model to better learn the invariance and variability of the data, improves the robustness and generalization ability of the model, and reduces the degree of overfitting to the training data.
[0083] Then, each augmented facial image sample is input into the face encoding layer to obtain the corresponding facial feature sample value. The face encoding layer uses VIT as the facial feature extractor. VIT mainly consists of an image embedding layer (patch embedding) and a Transformer encoder. The image embedding layer is used to embed facial features in segments, and the Transformer encoder includes a normalization layer (norm), a multi-head attention mechanism layer, and a fully connected layer. Patch embedding typically uses a p*p convolution operation to divide the image into n patches. Typically, p is set to 16, and the original image is converted into 14*14 768-dimensional feature vectors, which are then merged and added with the class token and the position vector of each patch (position embedding).
[0084] Furthermore, in the patch Embedding layer, the fine-grainedness of facial features and the influence of local features of the input image on the facial feature extraction results are analyzed through experiments. In this embodiment, four 3*3 convolutions and one*1 convolutions are stacked to obtain a one-dimensional image sequence. Compared with the traditional 14*14 large convolution kernel, using multiple small convolution kernels can reduce the model parameters under the premise of the same receptive field. The calculation formula of the receptive field is shown in (1). Figure 5 This is a schematic diagram of a patch embedding layer provided in an embodiment of the present invention. The 197*768 feature matrix obtained by this layer can be passed as a parameter into the Transformer encoder. After normalization, self-attention layer and residual transformation, the encoded value of the image can be obtained. By stacking 6 Transformer encoders, each Transformer encoder uses a 6-head attention mechanism in its self-attention layer to generate the final image embedding representation.
[0085] F(i)=(F(i+1)-1)·Stride+Ksize (1)
[0086] Where F(i) is the receptive field of the i-th layer, stride is the stride of the i-th layer, and Ksize is the size of the convolution kernel or pooling kernel.
[0087] Then, the linear transformation layer mainly consists of fully connected layers and ReLU activation layers. It takes the facial feature encoding values obtained from the aforementioned facial encoding layer as input to this fully connected linear neural network, projecting them into another vector space. This vector space can better capture the structure and relationships of the input data. Furthermore, each input data point is processed using different data augmentation methods, such as random cropping and color dithering. The linear transformation layer then maps these augmented data points into the same feature space, allowing them to be compared and contrasted, enabling the model to learn richer and more robust feature representations.
[0088] The calculation formula for the linear transformation layer is shown in (2):
[0089] z = W (2) ·MAx(0,W (1) x+b1)+b2 (2)
[0090] Among them W (1) and W (2) b1 and b2 are weight parameters, b1 and b2 are bias terms, and Max(a,b) is the ReLU activation function used to obtain a larger value.
[0091] Then, a loss function based on similarity calculation is performed. The purpose of model optimization is to learn a similarity function to calculate the similarity or distance between two samples. This function ensures that the distance between samples of the same category is small and the distance between samples of different categories is large. The implementation process mainly involves calculating the contrast loss and backpropagating it through two networks. When the projections from the same image are similar, the contrast loss decreases. Conversely, when the projections from different images are similar, the contrast loss increases. The similarity calculation method between projections can be arbitrary. In this embodiment, cosine similarity is used to evaluate the distance between facial image feature values, and NT-Xent loss is used as the loss function. The specific formula is shown in (3).
[0092]
[0093] Among them, Z i and Z j The final encoded values for the two images are given by t, which is an adjustable Temperature parameter that can scale the input and expand the cosine similarity range of [-1, 1].
[0094] The formula for calculating the loss function based on similarity is shown in (4):
[0095]
[0096] This loss function is equivalent to the probability that the image obtained after secondary enhancement is similar to the first image in the pair. The term in the denominator represents the images obtained after enhancement of other images, i.e., the set of all negative class images, exp represents the logarithm, and S... i,j This is the calculation method for the cosine similarity of two images, which is formula (3).
[0097] The final objective function is shown in equation (5):
[0098]
[0099] The above formula is to calculate the average of the sum of losses of all pairs in each batch, where l(i,j) is the loss function calculated in formula (4), and N represents all pairs, i.e., the batch size.
[0100] In addition, the hyperparameters used in the facial feature encoding model in this application embodiment are shown in Table 1:
[0101] Table 1
[0102] Parameter Description numerical values DROPOUT rate 0.2 Batch value 128 Epochs value 100 α value 0.0001 λ value 0.03 β value 0.999 Encoder number 6 MHSA number 6 Embedding_Dim 768
[0103] Based on the aforementioned embodiments, the facial feature encoding model is self-supervised through contrastive learning, and the patch embedding in the VIT of the facial feature encoding model is optimized to realize the identity hiding function in the blockchain field in a non-cryptographic way and the digital implementation method based on facial features.
[0104] Based on the above embodiments, Figure 6 for Figure 1 The detailed flowchart of step S103 in the illustrated embodiment shows that the registered digital identity information of the registered object includes multiple categories, and each category has corresponding category facial feature encoding information. For example... Figure 6 As shown, step S103 includes the following steps:
[0105] Step S601: Determine the target category corresponding to the current facial feature encoding information based on the similarity between the current facial feature encoding information and the category facial feature encoding information of each category.
[0106] Specifically, all registered digital identity information (facial feature catalog) on the regulatory node includes multiple categories, each with its corresponding category facial feature code value; in this step, the cosine similarity between the current facial feature code value of the target object and the category facial feature code corresponding to each category is calculated to determine the target category with the highest similarity.
[0107] Step S602: Calculate the similarity between the current facial feature encoding information and the registered digital identity information under the target category.
[0108] Specifically, the cosine similarity between the current facial feature encoding value of the target object and all registered digital identity information under the target category is calculated. If there is no similarity greater than a preset threshold, the current facial feature encoding value of the target object is determined as the digital identity information of the target object and registered on the regulatory node. If there is a similarity greater than the preset threshold, the target registered digital identity information of the target object is determined. This target registered digital identity information is the digital identity of the target object, and it can be used for business processing in the future.
[0109] Continue to refer to Figure 6 As shown, in some embodiments, before step S601, step S600 is further included: dividing the registered digital identity information of the registered object into multiple categories based on the feature projection layer, and determining the central facial feature encoding information of each category as the category facial feature encoding information.
[0110] Figure 7A flowchart for digital identity generation based on facial feature catalog classification is provided as an embodiment of the present invention, such as... Figure 7 As shown, a feature projection layer projects the facial feature catalog on the regulatory node into different categories, forming different facial feature categories, such as categories A, B, and C. Each category includes the registered digital identity of at least one registered object. Each category is represented by a center encoding value calculated by the projection layer. The facial image of the target object is input into the facial feature encoder, which outputs the current facial feature encoding value. The current facial feature encoding value is first compared with the categories in the facial feature catalog for similarity calculation. If the current facial feature encoding value belongs to category A, then it is compared with all facial features in category A for similarity calculation. This can effectively improve the verification efficiency of the regulatory node when generating digital identity information.
[0111] Based on the aforementioned embodiments, considering that as the number of registered digital identity information objects increases, the facial feature catalog maintained by the regulatory node also shows an exponential upward trend, this embodiment adopts multi-level linear transformation to divide the facial feature catalog into features and use category labels for marking, thereby improving the efficiency in the process of calculating facial code value similarity.
[0112] Figure 8 This is a flowchart illustrating a method for applying digital identity information according to an embodiment of the present invention. The method is applied to a supervisory node in a blockchain network, wherein the digital identity information is generated based on the digital identity information generation method described in the foregoing embodiment. Figure 8 As shown, the application methods of this digital identity information include:
[0113] Step S801: Create a blockchain account in the blockchain network based on the target object's digital identity information.
[0114] Step S802: Store the relevant information of the target object on the blockchain account.
[0115] Specifically, after determining the target's digital identity information, the digital identity can be used to register a blockchain account, and the target's personal information and personal asset information can be stored in the corresponding blockchain account in the form of blockchain smart contracts. The personal information includes medical data, tax data, education data, and consumption data, while the personal asset information includes identity documents, personal passports, personal real estate information, and digital asset information.
[0116] Figure 9 A flowchart illustrating digital identity generation and application provided in an embodiment of the present invention is shown below. Figure 9As shown, firstly, a contrastive learning approach is used to self-supervised train the facial feature encoding model, and then the facial feature encoder in the trained model is deployed to a supervisory node in the blockchain network. User D's facial image is input to the facial feature encoder on the supervisory node for facial feature encoding, and the current facial feature encoding value is output. The current facial feature encoding value is verified according to the facial feature directory on the supervisory node, that is, the similarity between the current facial feature encoding value and all registered digital identity information under the facial feature directory is calculated. If there is no similarity greater than a preset threshold, the current facial feature encoding value is determined to be the digital identity information of the target object. If there is a similarity greater than the preset threshold, the registered digital identity information most similar to the current facial feature encoding value is determined, and this registered digital identity information is the digital identity of user D. This digital identity is used as an on-chain digital identity. The digital account stores the personal and asset information of the corresponding account and is stored in the blockchain smart contract, which can be used as a digital identity account in subsequent application scenarios.
[0117] Based on the aforementioned embodiments, by using the actual facial features of the target object as a digital identity, creating a blockchain account based on the digital identity, and storing relevant information of the target object in the blockchain account, the on-chain identity is realized digitally based on facial features and the blockchain account identity is protected by non-cryptographic privacy.
[0118] Figure 10 This is an interactive schematic diagram illustrating another method for applying digital identity information provided in an embodiment of the present invention, wherein the digital identity information is generated based on the digital identity information generation method of the aforementioned embodiment. Figure 10 As shown, the application methods of this digital identity information include:
[0119] Step S1001: The client sends a trusted credential acquisition request to the supervisory node in the blockchain network. The trusted credential acquisition request includes the facial image of the target object to be verified.
[0120] Correspondingly, the supervisory node receives a trusted credential acquisition request sent by the client, which includes the facial image of the target object to be verified.
[0121] In real-world applications, some organizations need to verify a user's identity, while others need to verify the user's identity and obtain relevant private information. In such cases, the user can collect their own facial image in real time—the image to be verified—and send it along with a trusted credential acquisition request to the regulatory node.
[0122] Step S1002: The supervisory node inputs the face image to be verified into the trained facial feature encoder and outputs the face feature encoding information to be verified.
[0123] Specifically, the regulatory node inputs the facial image to be verified from the trusted credential acquisition request into a facial feature encoder trained based on contrastive learning, and outputs the facial feature encoding information to be verified.
[0124] Step S1003: The regulatory node determines the target registered object and target registered digital identity information corresponding to the facial feature encoding information to be verified based on the similarity between the facial feature encoding information to be verified and each registered digital identity information.
[0125] Specifically, the regulatory node calculates the cosine similarity between the facial feature encoding value to be verified and each registered digital identity information. If the cosine similarity is greater than a preset threshold, the target registered object corresponding to the facial feature encoding value to be verified, and the target registered digital identity information corresponding to the target registered object are determined.
[0126] Step S1004: The regulatory node performs dimensionality reduction and visualization processing on the facial feature encoding information to be verified, and matches it with the dimensionality reduction and visualization processing result of the registered digital identity information of the registered object to obtain an interpretability result. The interpretability result is used to characterize that the target object matches the target registered object.
[0127] Specifically, the registered digital identity information (facial feature encoding values) at the regulatory nodes are high-dimensional feature values. By performing dimensionality reduction on these registered digital identity information, corresponding two-dimensional or three-dimensional coordinates are obtained. A method using local Euclidean distance to describe the surface in the high-dimensional space (768 dimensions) is employed, representing the distance between data points as a probability distribution. Then, by minimizing the distance error between the original data and the dimensionality-reduced data, a representation that preserves the manifold structure of the original data in the low-dimensional space is found. After obtaining the dimensionality-reduced two-dimensional and three-dimensional coordinates of the facial feature encoding values, interactive visualization is performed using methods such as plotly. Different colors or shapes can be used to represent the facial feature encoding values of different objects under different facial expressions and decorations.
[0128] For example, suppose there are 30 registered subjects on the monitoring node (Tester 1, Tester 2, Tester 3... Tester 30). Each tester continuously changes their facial expressions and wears facial accessories, creating 30 to 40 sets of facial images. These images are then encoded using the aforementioned facial feature encoder, resulting in 30 to 40 sets of 768-dimensional facial feature values. For the 30 testers, this totals 1076 sets of facial feature values. First, these 1076 sets of facial feature values are dimensionality-reduced, yielding two-dimensional coordinates as shown in Table 2 and three-dimensional coordinates as shown in Table 3.
[0129] Table 2
[0130]
[0131]
[0132] Table 3
[0133] x y z Tester 0 0.265660 2.741614 4.707718 Tester 1 1 -1.371263 1.396341 6.263566 Tester 1 2 0.731102 3.044538 6.235900 Tester 1 3 0.804297 2.530373 4.567465 Tester 1 4 -0.575597 0.462298 7.275027 Tester 1 …… …… …… …… …… 1074 1.675404 0.583477 5.179176 Tester 30 1075 1.754593 0.148041 5.496091 Tester 30 1076 1.631016 0.426701 5.117219 Tester 30
[0134] After obtaining the two-dimensional coordinates of the eigenvalues shown in Table 2 and the three-dimensional coordinates of the eigenvalues shown in Table 3, they are visualized, such as... Figure 11a This is a visualization diagram of the two-dimensional coordinates of feature values for registering digital identity information, provided by an embodiment of the present invention. Figure 11b This is a visualization diagram of the three-dimensional coordinates of feature values for registering digital identity information provided in an embodiment of the present invention. Figure 11a and Figure 11b It can be seen that the facial feature encoding values obtained from different facial expressions of the same test subject are in the same cluster in two-dimensional and three-dimensional space. In other words, the facial feature encoder obtained by contrastive learning training in this embodiment has accurate facial feature encoding capability and can effectively distinguish the facial feature encoding of different test subjects.
[0135] After obtaining the facial feature encoding value of the target object to be verified through step S1002, such as Figure 12 This is a schematic diagram of facial feature encoding information to be verified provided in an embodiment of the present invention; it undergoes dimensionality reduction visualization processing, and the result is compared with the dimensionality reduction visualization processing result of the registered digital identity information of the registered object (i.e., Figure 11a and Figure 11b The matching process yields two-dimensional and three-dimensional visualizations of the feature values corresponding to the facial feature encoding values of the target object to be verified, such as... Figure 13a This invention provides a method for visualizing the two-dimensional results of facial feature encoding values to be verified, along with... Figure 11a A matching diagram of the two-dimensional visualization results. Figure 13b This invention provides a method for visualizing the three-dimensional results of facial feature encoding values to be verified and... Figure 11b A matching diagram of the 3D visualization results, by Figure 13a and Figure 13b It can be seen that the facial feature encoding values of the target object to be verified are classified into the cluster where tester 1 belongs (e.g., Figure 13a and Figure 13b The box in the diagram indicates that the target object corresponds to Tester 1, and the digital identity of the target object corresponds to the target registered digital identity information of Tester 1.
[0136] Step S1005: The regulatory node generates a trusted digital identity credential based on the target registered digital identity information and the interpretability result.
[0137] Specifically, by integrating the above interpretability results and the target registered digital identity information, a trusted digital identity (facial feature) credential is obtained, such as... Figure 14 This is a schematic diagram illustrating the structure of a trusted digital identity credential provided in an embodiment of the present invention. When determining that the target object belongs to Tester 1, Tester 1's registered digital identity information (i.e., Tester 1's original facial feature values) is compared with... Figure 13a , Figure 13b The interpretability results shown are combined to form corresponding facial feature credibility credentials. Furthermore, the interpretability results can be used to intelligently generate textual descriptions of the credibility credentials (such as...). Figure 14 The text portion describes the facial feature encoding value extracted by the facial feature encoder as belonging to tester 1.
[0138] Step S1006: The supervisory node returns the digital identity trusted credential to the client.
[0139] Correspondingly, on the client side, the client receives the digital identity trusted credential returned by the regulatory node.
[0140] Step S1007: The client sends the digital identity trusted credential to the server.
[0141] Correspondingly, on the server side, the client sends a digital identity certificate.
[0142] Step S1008: The server obtains relevant information about the target object from the blockchain account corresponding to the blockchain network based on the digital identity trusted credential.
[0143] Specifically, if the server-side (such as those of banks, hotels, and judicial departments) needs to verify a user's true identity, the server obtains and verifies the trusted digital identity credential, and then uses the user's digital identity to access the user's identity verification information in the blockchain smart contract. If the server-side (such as those used for law enforcement, telemedicine, and insurance claims that require data sharing) needs to verify a user's true identity and related privacy information, the server obtains and verifies the trusted digital identity credential, and then uses the user's digital identity to access the user's identity verification information and personal privacy information in the blockchain smart contract.
[0144] Based on the aforementioned embodiments, after determining the digital identity information of the target object, a trusted credential can be generated based on the digital identity, and the trusted credential can be applied to various scenarios such as identity verification or data sharing. Compared with digital identities generated by traditional cryptography, it can provide more accurate and reliable identity verification. Furthermore, using facial features as digital identities can also improve the speed and efficiency of identity verification, that is, identity verification can be completed with only one facial scan, without the need to input or remember any passwords or other information.
[0145] Figure 15 This is a flowchart illustrating another method for applying digital identity information provided in an embodiment of the present invention, applied to a supervisory node in a blockchain network. The method includes:
[0146] Step S1501: Receive a trusted credential acquisition request sent by the client, wherein the trusted credential acquisition request includes the facial image of the target object to be verified.
[0147] Step S1502: Input the face image to be verified into the trained face feature encoder and output the face feature encoding information to be verified.
[0148] Step S1503: Based on the similarity between the facial feature encoding information to be verified and each registered digital identity information, determine the target registered object and the target registered digital identity information corresponding to the facial feature encoding information to be verified.
[0149] Step S1504: Perform dimensionality reduction and visualization processing on the facial feature encoding information to be verified, and match it with the dimensionality reduction and visualization processing result of the registered digital identity information of the registered object to obtain an interpretability result. The interpretability result is used to characterize that the target object matches the target registered object.
[0150] Step S1505: Generate a trusted digital identity credential based on the target registered digital identity information and the interpretability result.
[0151] Step S1506: Return the digital identity trusted credential to the client so that the client can send the digital identity trusted credential to the server.
[0152] The digital identity information application method provided in this invention is applied to the supervisory node in a blockchain network, and its implementation principle and technical effects are similar to those of... Figure 10 The embodiments shown are similar and will not be described again here.
[0153] Figure 16 This is a flowchart illustrating another method for applying digital identity information provided in an embodiment of the present invention, applied to a client. The method includes:
[0154] Step S1601: Send a trusted credential acquisition request to the supervisory node in the blockchain network. The trusted credential acquisition request includes the facial image of the target object to be verified.
[0155] Step S1602: Receive the trusted digital identity credential returned by the regulatory node, wherein the trusted digital identity credential is generated by the regulatory node based on the target registered digital identity information and interpretability results. The target registered digital identity information is determined based on the similarity between the facial feature encoding information to be verified and each registered digital identity information. The facial feature encoding information to be verified is obtained by extracting features from the facial image to be verified based on a trained facial feature encoder. The interpretability results are obtained by performing dimensionality reduction and visualization processing on the facial feature encoding information to be verified, and are used to characterize the target object matching the target registered object.
[0156] Step S1603: Send the digital identity trusted credential to the server so that the server can obtain relevant information of the target object from the blockchain account of the blockchain network based on the digital identity trusted credential.
[0157] The digital identity information application method provided in this embodiment of the invention is applied to a client, and its implementation principle and technical effects are similar to those of the present invention. Figure 10 The embodiments shown are similar and will not be described again here.
[0158] Figure 17 This is a flowchart illustrating another method for applying digital identity information provided in an embodiment of the present invention, applied to a server. The method includes:
[0159] Step S1701: Receive the digital identity trusted credential sent by the client, wherein the digital identity trusted credential is generated by the regulatory node of the blockchain network based on the target registered digital identity information and interpretability results. The target registered digital identity information is determined based on the similarity between the facial feature encoding information to be verified and each registered digital identity information. The facial feature encoding information to be verified is obtained by extracting features from the facial image of the target object based on a trained facial feature encoder. The interpretability results are obtained by performing dimensionality reduction and visualization processing on the facial feature encoding information to be verified, and are used to characterize the target object matching the target registered object.
[0160] Step S1702: Obtain relevant information about the target object from the blockchain account corresponding to the blockchain network based on the digital identity trusted credential.
[0161] The digital identity information application method provided in this embodiment of the invention is applied to the server side, and its implementation principle and technical effects are similar to those of the present invention. Figure 10 The embodiments shown are similar and will not be described again here.
[0162] Figure 18 This is a flowchart illustrating another digital identity generation and application method provided by an embodiment of the present invention. Assume user D needs to determine their digital identity and register a blockchain account based on that digital identity, applying it to scenarios such as identity verification and data sharing. Figure 18 As shown:
[0163] First, determine your digital identity and account registration:
[0164] User D generates facial encoding feature values through the facial feature encoder obtained by the contrastive learning, and the supervisory node performs similarity calculation with its maintained facial feature directory. If no facial feature value exists within a specific distance, a new digital identity based on facial features is created for user D. User D uploads personal information to the blockchain smart contract through this digital identity. The personal information mainly includes account information and asset information, which are used for subsequent identity verification and data sharing.
[0165] Scenario 1: Identity Verification Application
[0166] Identity verification primarily involves institutions such as banks, hotels, and judicial departments, whose requirement is to verify the user's true identity. Therefore, in this application scenario, user D first verifies their facial features through a regulatory node. This involves generating a current facial feature encoding value using a facial feature extractor. After receiving user D's current facial feature encoding value, the regulatory node calculates its similarity with its maintained facial feature directory, finds the facial feature encoding value generated during user D's registration, and returns this encoding value along with a trusted facial feature (digital identity) credential to user D. User D then provides the aforementioned credential from the regulatory node and the facial feature encoding value used during registration to the institution requiring identity verification (bank, hotel, or judicial department). After verifying the interpretability of the credential, the institution obtains user D's identity verification information from the blockchain smart contract through Alice's digital identity.
[0167] Scenario 2: Data Sharing Application
[0168] Data sharing primarily encompasses law enforcement supervision, telemedicine, and insurance claims, requiring verification of users' true identities and related privacy information. In this application scenario, user D first verifies their facial features through a regulatory node. This involves generating a current facial feature encoding value using a facial feature extractor. The regulatory node, upon receiving this value, calculates its similarity with a maintained facial feature directory, identifies the facial feature encoding value generated during user D's registration, and returns this value along with a trusted facial feature (digital identity) credential to user D. User D then provides this trusted credential and the facial feature encoding value used during registration to an institution requiring identity verification (insurance company, law enforcement agency, or medical department). After verifying the trusted credential, this institution obtains user D's identity verification information and personal privacy information (including medical data, educational data, asset data, etc.) from the blockchain smart contract using user D's digital identity. This application achieves privacy protection for user D's identity during the acquisition of user D's personal privacy data.
[0169] In summary, this invention, by using actual facial feature values as digital identities, achieves digital representation of account identities based on facial features and non-cryptographic identity concealment capabilities in the blockchain field; it improves efficiency in facial code value similarity calculation by classifying facial code value catalogs into subcategories; it performs dimensionality reduction and interpretability analysis on the facial feature code values (digital identities) generated by the facial feature encoder, and integrates the analysis results with intelligently generated text as a trusted digital identity credential. This allows for application in various practical scenarios, demonstrating universality and high scalability.
[0170] Figure 19 This is a schematic diagram of a digital identity information generation device provided in an embodiment of the present invention. It is applied to a supervisory node in a blockchain network. The supervisory node is equipped with a trained facial feature encoder and stores the registered digital identity information of registered individuals. Figure 19 As shown, the generating apparatus includes:
[0171] Image acquisition module 1901 is used to acquire a facial image of a target object; first encoding module 1902 is used to input the facial image into the trained facial feature encoder and output current facial feature encoding information; first calculation module 1903 is used to calculate the similarity between the current facial feature encoding information and each of the registered digital identity information; first determination module 1904 is used to determine that the current facial feature encoding information is the digital identity information of the target object when there is no similarity greater than a preset threshold, and to register the digital identity information of the target object.
[0172] In some embodiments, the first encoding module 1902 is further configured to: train the facial feature encoding model to be trained using contrastive learning based on a facial image sample set to obtain a trained facial feature encoding model, wherein the facial feature encoding model includes a facial encoding layer and a linear transformation layer, the facial encoding layer is a visual attention model, the visual attention model includes an image embedding layer and an encoder based on an attention mechanism, the image embedding layer includes a preset number of convolutional kernels of a preset size; and determine the visual attention model in the trained facial feature encoding model as the trained facial feature encoder.
[0173] In some embodiments, the first encoding module 1902 is specifically configured to: acquire facial image samples corresponding to a preset batch number of objects, and perform data augmentation on the facial image samples of each object; input each data-augmented facial image sample into the visual attention model in the facial feature encoding model, and output the facial feature sample value corresponding to each data-augmented facial image sample; calculate the feature similarity between each positive sample pair and each negative sample pair based on each facial feature sample value, wherein the positive sample pair refers to the data-augmented facial image samples from the same object, and the negative sample pair refers to the data-augmented facial image samples from different objects; calculate the normalized contrastive cross-entropy loss based on the feature similarity between each positive sample pair and each negative sample pair, and update the model parameters of the facial feature encoding model based on the normalized contrastive cross-entropy loss.
[0174] In some embodiments, the registered digital identity information of the registered object includes multiple categories, each category having corresponding category facial feature encoding information; the first calculation module 1903 is specifically used to: determine the target category corresponding to the current facial feature encoding information based on the similarity between the current facial feature encoding information and the category facial feature encoding information of each category; and calculate the similarity between the current facial feature encoding information and the registered digital identity information under the target category.
[0175] In some embodiments, the first calculation module 1903 is further configured to: divide the registered digital identity information of the registered object into multiple categories based on the feature projection layer, and determine the central facial feature encoding information of each category as the category facial feature encoding information.
[0176] In some embodiments, the first determining module 1904 is further configured to: determine the target digital identity information of the target registered object corresponding to the current facial feature encoding information when there is a similarity greater than a preset threshold.
[0177] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process and corresponding beneficial effects of the digital identity information generation device described above can be referred to the corresponding process in the aforementioned method example, and will not be repeated here.
[0178] Figure 20 This is a schematic diagram of the structure of an application device for digital identity information provided in an embodiment of the present invention. It is applied to a supervisory node in a blockchain network, wherein the digital identity information is generated based on the digital identity information generation method of the aforementioned embodiments, such as... Figure 20 As shown, the application device includes:
[0179] Account registration module 2001 is used to create a blockchain account in the blockchain network based on the digital identity information of the target object; information upload module 2002 is used to upload and store the relevant information of the target object to the blockchain account.
[0180] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process and corresponding beneficial effects of the application device for the digital identity information described above can be referred to the corresponding process in the aforementioned method example, and will not be repeated here.
[0181] Figure 21 This is a schematic diagram of another application device for digital identity information provided in an embodiment of the present invention, applied to a supervisory node in a blockchain network, wherein the digital identity information is generated based on the digital identity information generation method of the foregoing embodiments; as shown Figure 21 As shown, the application device includes:
[0182] A first receiving module 2101 is used to receive a trusted credential acquisition request sent by a client, the trusted credential acquisition request including a facial image of a target object to be verified; a second encoding module 2102 is used to input the facial image to be verified into a trained facial feature encoder and output facial feature encoding information to be verified; a second calculation module 2103 is used to determine the target registered object and target registered digital identity information corresponding to the facial feature encoding information to be verified based on the similarity between the facial feature encoding information to be verified and each registered digital identity information; a dimensionality reduction visualization module 2104 is used to perform dimensionality reduction visualization processing on the facial feature encoding information to be verified to obtain an interpretability result, the interpretability result being used to characterize the target object matching the target registered object; a credential generation module 2105 is used to generate a trusted digital identity credential based on the target registered digital identity information and the interpretability result; a first sending module 2106 is used to return the trusted digital identity credential to the client, so that the client sends the trusted digital identity credential to the server.
[0183] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process and corresponding beneficial effects of the application device for the digital identity information described above can be referred to the corresponding process in the aforementioned method example, and will not be repeated here.
[0184] Figure 22 This is a schematic diagram of the structure of another application device for digital identity information provided in an embodiment of the present invention, applied to a client, wherein the digital identity information is generated based on the digital identity information generation method of the foregoing embodiments; as shown Figure 22 As shown, the application device includes:
[0185] The second sending module 2201 is used to send a trusted credential acquisition request to a regulatory node in the blockchain network. The trusted credential acquisition request includes a facial image of the target object to be verified. The second receiving module 2202 is used to receive a digital identity trusted credential returned by the regulatory node. The digital identity trusted credential is generated by the regulatory node based on the target registered digital identity information and interpretability results. The target registered digital identity information is determined based on the similarity between the facial feature encoding information to be verified and each registered digital identity information. The facial feature encoding information to be verified is obtained by feature extraction of the facial image to be verified based on a trained facial feature encoder. The interpretability results are obtained by dimensionality reduction and visualization processing of the facial feature encoding information to be verified, which is used to characterize the target object matching the target registered object. The second sending module 2201 is also used to send the digital identity trusted credential to a server so that the server can obtain relevant information of the target object from the blockchain account of the blockchain network based on the digital identity trusted credential.
[0186] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process and corresponding beneficial effects of the application device for the digital identity information described above can be referred to the corresponding process in the aforementioned method example, and will not be repeated here.
[0187] Figure 23 This is a schematic diagram of the structure of another application device for digital identity information provided in an embodiment of the present invention, applied to a server, wherein the digital identity information is generated based on the digital identity information generation method of the aforementioned embodiments; as shown Figure 23 As shown, the application device includes:
[0188] The third receiving module 2301 is used to receive a digital identity trust credential sent by the client. The digital identity trust credential is generated by the supervisory node of the blockchain network based on the target registered digital identity information and interpretability results. The target registered digital identity information is determined based on the similarity between the facial feature encoding information to be verified and each registered digital identity information. The facial feature encoding information to be verified is obtained by extracting features from the target object's facial image based on a trained facial feature encoder. The interpretability results are obtained by performing dimensionality reduction and visualization processing on the facial feature encoding information to be verified, used to represent that the target object matches a registered target object. The information acquisition module 2302 is used to acquire relevant information about the target object from the blockchain account corresponding to the blockchain network based on the digital identity trust credential.
[0189] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process and corresponding beneficial effects of the application device for the digital identity information described above can be referred to the corresponding process in the aforementioned method example, and will not be repeated here.
[0190] Figure 24 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Figure 24 As shown, the electronic device includes a processor 2401, a communication interface 2402, a memory 2403, and a communication bus 2404. The processor 2401, communication interface 2402, and memory 2403 communicate with each other via the communication bus 2404.
[0191] Memory 2403 is used to store computer programs;
[0192] In one embodiment of the present invention, when the processor 2401 executes the program stored in the memory 2403, it implements the steps of the method for generating digital identity information or the method for applying digital identity information provided in any of the foregoing method embodiments.
[0193] The electronic device provided in this embodiment of the invention has a similar implementation principle and technical effect to the above embodiments, and will not be described again here.
[0194] The aforementioned memory 2403 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Memory 2403 has storage space for program code used to perform any of the method steps described above. For example, the storage space for program code may include individual program codes for implementing the various steps in the methods described above. This program code can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, optical discs (CDs), memory cards, or floppy disks. Such computer program products are typically portable or fixed storage units. The storage unit may have storage segments or storage spaces arranged similarly to memory 2403 in the aforementioned electronic device. The program code may be compressed, for example, in a suitable form. Typically, the storage unit includes programs for performing the method steps according to embodiments of the invention, i.e., code that can be read by a processor such as 2401, which, when run by the electronic device, causes the electronic device to perform the various steps in the methods described above.
[0195] Embodiments of the present invention also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for generating digital identity information and the method for applying digital identity information as described above.
[0196] The computer-readable storage medium may be included in the device / apparatus described in the above embodiments; or it may exist independently and not assembled into the device / apparatus. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of the present invention.
[0197] According to embodiments of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0198] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0199] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for generating digital identity information, characterized by, A regulatory node applied to a blockchain network, wherein the regulatory node is deployed with a trained face feature encoder and stores registered digital identity information of registered objects; the method comprises: obtaining a face image of a target object; inputting the face image into the trained face feature encoder to output current face feature encoding information; calculating the similarity between the current face feature encoding information and each of the registered digital identity information; in the absence of a similarity greater than a preset threshold, determining the current face feature encoding information as the digital identity information of the target object, and registering the digital identity information of the target object; before inputting the face image into the trained face feature encoder, further comprising: training a face feature encoding model to be trained based on a face image sample set in a contrast learning manner to obtain a trained face feature encoding model, wherein the face feature encoding model comprises a face encoding layer and a linear transformation layer, the face encoding layer is a visual attention model, the visual attention model comprises an image embedding layer and an attention mechanism-based encoder, and the image embedding layer comprises a preset number of convolution kernels of a preset size; determining the visual attention model in the trained face feature encoding model as the trained face feature encoder.
2. The method of claim 1, wherein, training the face feature encoding model to be trained based on the face image sample set in the contrast learning manner comprises: obtaining face image samples corresponding to a preset batch number of objects, and performing data enhancement on the face image samples of each object; inputting each data-enhanced face image sample into the visual attention model in the face feature encoding model to output a face feature sample value corresponding to each data-enhanced face image sample; calculating the feature similarity between each positive sample pair and each negative sample pair according to the face feature sample values, wherein the positive sample pair refers to data-enhanced face image samples from the same object, and the negative sample pair refers to data-enhanced face image samples from different objects; calculating a normalized contrast cross-entropy loss based on the feature similarity between each positive sample pair and each negative sample pair, and updating the model parameters of the face feature encoding model based on the normalized contrast cross-entropy loss.
3. The method according to claim 1 or 2, characterized in that, The registered digital identity information of the registered object includes multiple categories, and each category has corresponding category face feature encoding information; calculating the similarity between the current face feature encoding information and each of the registered digital identity information comprises: determining a target category corresponding to the current face feature encoding information according to the similarity between the current face feature encoding information and the category face feature encoding information of each category; calculating the similarity between the current face feature encoding information and the registered digital identity information under the target category.
4. The method of claim 3, wherein, before determining the target category corresponding to the current face feature encoding information according to the similarity between the current face feature encoding information and the category face feature encoding information of each category, further comprising: The registered digital identity information of the registered object is divided into multiple categories based on the feature projection layer, and center face feature code information of each category is determined as category face feature code information.
5. The method according to claim 1 or 2, characterized in that, The method further comprises: In the presence of a similarity greater than a preset threshold, determining the target digital identity information of the target registered object corresponding to the current face feature code information.
6. A method of using digital identity information generated by the method of generating digital identity information according to any one of claims 1-5, characterized in that, The method comprises: Creating a blockchain account in the blockchain network based on the digital identity information of the target object; Storing the relevant information of the target object into the blockchain account.
7. A method of using digital identity information generated by the method of generating digital identity information according to any one of claims 1-5, characterized in that, The method comprises: Receiving a trusted credential acquisition request sent by a client, the trusted credential acquisition request including a to-be-verified face image of a target object; Inputting the to-be-verified face image into a trained face feature encoder to output to-be-verified face feature code information; Determining a target registered object and target registered digital identity information corresponding to the to-be-verified face feature code information according to a similarity between the to-be-verified face feature code information and each registered digital identity information; Performing dimension reduction visualization processing on the to-be-verified face feature code information, and matching the dimension reduction visualization processing result with registered digital identity information of a registered object to obtain an explainability result, the explainability result being used to represent the target object matching the target registered object; Generating a digital identity trusted credential based on the target registered digital identity information and the explainability result; Returning the digital identity trusted credential to the client to enable the client to send the digital identity trusted credential to a server.
8. A method of using digital identity information generated by the method of generating digital identity information according to any one of claims 1-5, characterized in that, The method comprises: Sending a trusted credential acquisition request to a regulatory node in a blockchain network, the trusted credential acquisition request including a to-be-verified face image of a target object; Receiving a digital identity trusted credential returned by the regulatory node, wherein the digital identity trusted credential is generated by the regulatory node based on target registered digital identity information and an explainability result, the target registered digital identity information being determined according to a similarity between to-be-verified face feature code information and each registered digital identity information, the to-be-verified face feature code information being obtained by performing feature extraction on the to-be-verified face image based on a trained face feature encoder, and the explainability result being obtained by performing dimension reduction visualization processing on the to-be-verified face feature code information and being used to represent the target object matching a target registered object; Sending the digital identity trusted credential to a server to enable the server to obtain relevant information of the target object from a blockchain account in the blockchain network based on the digital identity trusted credential.
9. A method of using digital identity information generated by the method of generating digital identity information according to any one of claims 1-5, characterized in that, The method comprises: The digital identity trusted credential sent by the client is received, wherein the digital identity trusted credential is generated by a supervision node of a block chain network according to target registration digital identity information and an explainability result, the target registration digital identity information is determined according to similarity between to-be-verified face feature encoding information and each registration digital identity information, the to-be-verified face feature encoding information is obtained by performing feature extraction on a to-be-verified face image of a target object based on a trained face feature encoder, and the explainability result is obtained by performing dimension reduction visualization processing on the to-be-verified face feature encoding information, and is used to represent that the target object matches a target registered object. According to the digital identity trusted credential, related information of the target object is obtained from a block chain account corresponding to the block chain network.
10. An apparatus for generating digital identity information, characterized by The supervision node applied to the block chain network, wherein the supervision node is deployed with a trained face feature encoder and stores registration digital identity information of a registered object. The generating apparatus comprises: An image acquisition module, configured to acquire a face image of a target object. A first encoding module, configured to input the face image into the trained face feature encoder and output current face feature encoding information. A first calculation module, configured to calculate similarity between the current face feature encoding information and each registration digital identity information. A first determination module, configured to determine the current face feature encoding information as digital identity information of the target object in a case where there is no similarity greater than a preset threshold, and register the digital identity information of the target object. The first encoding module is further configured to: Train a to-be-trained face feature encoding model based on a face image sample set in a contrast learning manner to obtain a trained face feature encoding model, wherein the face feature encoding model comprises a face encoding layer and a linear transformation layer, the face encoding layer is a visual attention model, the visual attention model comprises an image embedding layer and an encoder based on an attention mechanism, and the image embedding layer comprises a preset number of convolution kernels with a preset size. The visual attention model in the trained face feature encoding model is determined as the trained face feature encoder.
11. An application apparatus of digital identity information generated based on the generation method of digital identity information according to any one of claims 1-5, characterized in that, The supervision node applied to the block chain network, wherein the application apparatus comprises: An account registration module, configured to create a block chain account in the block chain network based on digital identity information of a target object. An information chaining module, configured to chain and store related information of the target object into the block chain account.
12. An application apparatus of digital identity information generated based on the generation method of digital identity information according to any one of claims 1-5, characterized in that, The supervision node applied to the block chain network, wherein the application apparatus comprises: A first receiving module, configured to receive a trusted credential acquisition request sent by a client, wherein the trusted credential acquisition request comprises a to-be-verified face image of a target object. A second encoding module, configured to input the to-be-verified face image into a trained face feature encoder and output to-be-verified face feature encoding information. A second calculation module, configured to calculate similarity between the to-be-verified face feature encoding information and each registration digital identity information. A second determination module, configured to determine the to-be-verified face feature encoding information as digital identity information of the target object in a case where there is no similarity greater than a preset threshold. A second registration module, configured to register the digital identity information of the target object in a case where the to-be-verified face feature encoding information is determined as the digital identity information of the target object. The second computing module is configured to determine a target registered object and target registered digital identity information corresponding to the face feature encoding information to be verified according to a similarity between the face feature encoding information to be verified and each registered digital identity information. The dimension reduction visualization module is configured to perform dimension reduction visualization processing on the face feature encoding information to be verified to obtain an interpretability result, where the interpretability result is used to represent that the target object matches the target registered object. The credential generation module is configured to generate a digital identity trusted credential based on the target registered digital identity information and the interpretability result. The first sending module is configured to return the digital identity trusted credential to the client, so that the client sends the digital identity trusted credential to the server.
13. An application apparatus of digital identity information generated based on the generation method of digital identity information according to any one of claims 1-5, characterized in that, The application device applied to the client comprises: The second sending module is configured to send a trusted credential acquisition request to a supervision node in a blockchain network, where the trusted credential acquisition request comprises a face image to be verified of a target object. The second receiving module is configured to receive a digital identity trusted credential returned by the supervision node, where the digital identity trusted credential is generated by the supervision node based on target registered digital identity information and an interpretability result, the target registered digital identity information is determined according to a similarity between face feature encoding information to be verified and each registered digital identity information, the face feature encoding information to be verified is obtained by performing feature extraction on the face image to be verified based on a trained face feature encoder, and the interpretability result is obtained by performing dimension reduction visualization processing on the face feature encoding information to be verified and is used to represent that the target object matches a target registered object. The second sending module is further configured to send the digital identity trusted credential to a server, so that the server acquires related information of the target object from a blockchain account of the blockchain network according to the digital identity trusted credential.
14. An application apparatus of digital identity information generated based on the generation method of digital identity information according to any one of claims 1-5, characterized in that, The application device applied to the server comprises: The third receiving module is configured to receive a digital identity trusted credential sent by the client, where the digital identity trusted credential is generated by a supervision node of a blockchain network based on target registered digital identity information and an interpretability result, the target registered digital identity information is determined according to a similarity between face feature encoding information to be verified and each registered digital identity information, the face feature encoding information to be verified is obtained by performing feature extraction on a face image to be verified of a target object based on a trained face feature encoder, and the interpretability result is obtained by performing dimension reduction visualization processing on the face feature encoding information to be verified and is used to represent that the target object matches a target registered object. The information acquisition module is configured to acquire related information of the target object from a corresponding blockchain account of the blockchain network according to the digital identity trusted credential.
15. An electronic device, comprising: The device comprises a processor, a communication interface, a memory and a communication bus, where the processor, the communication interface and the memory perform mutual communication through the communication bus. The memory is configured to store a computer program. A processor for implementing the steps of the method of generating digital identity information according to any one of claims 1-5, or the steps of the method of applying digital identity information according to any one of claims 6-9, when executing a program stored on a memory.
16. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program for implementing the steps of the method of generating digital identity information according to any one of claims 1-5, or the steps of the method of applying digital identity information according to any one of claims 6-9, when executed by a processor.
Citation Information
Patent Citations
Identity authentication method and system
CN106557732A
User authentication system using artificial intelligence on a blockchain basis
KR102188979B1