Face data signature method and device, electronic equipment and storage medium
By fusing facial data and acceleration data, and using an autoencoder model and hash operations to generate signature information, the problem of unstable facial data encryption in existing technologies is solved, achieving higher-security data encryption.
Patent Information
- Application Number
- CN202110669809.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-17
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2041-06-17
AI Technical Summary
Existing facial data encryption methods struggle to reliably control the mosaic effect, resulting in suboptimal encryption, the risk of original image leakage, and an inability to effectively protect privacy.
By fusing facial data and reference acceleration data, feature encoding and reconstruction are performed using an autoencoder model, and combined with hash operations and encryption processing, signature information of the facial data is generated.
It improves the security of facial data encryption, ensures privacy protection during data transmission, and prevents the leakage of original images.
Smart Images

Figure CN115495720B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, in particular to a face data signature method and device, electronic equipment and a storage medium. BACKGROUND
[0002] With the large-scale commercial use of face recognition technology in intelligent security, urban transportation, smart business and smart community and other public places, the privacy protection of face data has attracted more and more public attention and concern. In order to protect the privacy of the public, a new generation of face recognition system needs to introduce a face data encryption security mechanism.
[0003] In the related art, face data encryption generally performs position transformation or disorder processing on key parts of the face (such as the eye part) to achieve a key part mosaic effect, but the mosaic effect is difficult to control accurately. For example, the code effect obtained by disorder or transformation operation is not stable, and sometimes part of the original image can be seen, and the encryption effect is not ideal. SUMMARY
[0004] The face data signature method and device, electronic equipment and storage medium provided by the embodiments of the present application can improve the security of face data encryption.
[0005] The face data signature method provided by the embodiments of the present application comprises:
[0006] obtaining face data to be signed and reference acceleration data corresponding to the face data;
[0007] fusing the face data and the reference acceleration data to obtain fused face data;
[0008] performing feature encoding on the fused face data to obtain encoding information of the fused face data;
[0009] performing feature reconstruction on the encoding information to obtain an acceleration security factor corresponding to the fused face data;
[0010] performing a hash operation on the acceleration security factor and the face data to obtain a hash value corresponding to the face data;
[0011] performing encryption processing on the hash value based on a key corresponding to the face data to obtain signature information of the face data.
[0012] Correspondingly, the face data signature device provided by the embodiments of the present application comprises:
[0013] an obtaining unit configured to obtain face data to be signed and reference acceleration data corresponding to the face data;
[0014] The fusion unit is used to fuse the face data and the reference acceleration data to obtain fused face data;
[0015] An encoding unit is used to perform feature encoding on the fused face data to obtain the encoded information of the fused face data;
[0016] The reconstruction unit is used to reconstruct the features of the encoded information to obtain the acceleration safety factor corresponding to the fused face data;
[0017] A hash unit is used to perform a hash operation on the acceleration security factor and the face data to obtain the hash value corresponding to the face data;
[0018] An encryption unit is used to encrypt the hash value based on the key corresponding to the face data to obtain the signature information of the face data.
[0019] Optionally, in some embodiments of this application, the hash unit may include a fusion subunit and a hash subunit, as follows:
[0020] The fusion subunit is used to fuse the acceleration safety factor and the face data to obtain an information sequence;
[0021] The hash subunit is used to perform a hash operation on the information sequence to obtain the hash value corresponding to the face data.
[0022] Optionally, in some embodiments of this application, the fusion subunit may be specifically used to obtain a preset security factor of the face data; and to fuse the preset security factor, the acceleration security factor and the face data to obtain an information sequence.
[0023] Optionally, in some embodiments of this application, the encoding unit may include an extraction subunit, an acquisition subunit, and a sampling subunit, as follows:
[0024] The extraction subunit is used to extract features from the fused face data to obtain the latent vector of the fused face data in the latent space.
[0025] Obtain sub-units to obtain the probability distribution corresponding to the latent vector;
[0026] The sampling subunit is used to sample the latent vector based on the probability distribution corresponding to the latent vector to obtain the encoding information of the fused face data.
[0027] Optionally, in some embodiments of this application, the acquisition subunit may be used to acquire the mean information and variance information corresponding to the latent vector; and determine the probability distribution of the latent vector based on the mean information and the variance information.
[0028] Optionally, in some embodiments of this application, the encoding unit may be specifically used to perform feature encoding on the fused face data through an autoencoder model to obtain the encoded information of the fused face data.
[0029] Optionally, in some embodiments of this application, the face data signature device may further include a training unit for training a preset autoencoder model. The training unit may include a data acquisition subunit, a sample fusion subunit, a feature encoding subunit, a feature reconstruction subunit, and an adjustment subunit, as follows:
[0030] The data acquisition subunit is used to acquire training data, which includes sample face data and sample acceleration data corresponding to the sample face data.
[0031] The sample fusion subunit is used to fuse the sample face data and the sample acceleration data to obtain fused sample face data;
[0032] The feature encoding subunit is used to perform feature encoding on the fused sample face data through a preset autoencoder model to obtain the encoding information of the fused sample face data.
[0033] The feature reconstruction subunit is used to reconstruct the features of the encoded information to obtain reconstructed face data;
[0034] The adjustment subunit is used to adjust the parameters of the preset autoencoder model based on the loss value between the reconstructed face data and the fused sample face data, so as to obtain the trained autoencoder model.
[0035] Optionally, in some embodiments of this application, the adjustment subunit may be specifically used to calculate the reconstruction loss value between the reconstructed face data and the fused sample face data; calculate the distribution loss value between the probability distribution corresponding to the encoded information of the fused sample face data and the preset distribution; and adjust the parameters of the preset autoencoder model according to the reconstruction loss value and the distribution loss value.
[0036] An electronic device provided in this application includes a processor and a memory. The memory stores multiple instructions, and the processor loads the instructions to execute the steps in the face data signature method provided in this application.
[0037] Furthermore, this application embodiment also provides a storage medium storing a computer program thereon, wherein when the computer program is executed by a processor, it implements the steps in the face data signature method provided in this application embodiment.
[0038] This application provides a face data signature method, apparatus, electronic device, and storage medium. It can acquire face data to be signed and corresponding reference acceleration data; fuse the face data and the reference acceleration data to obtain fused face data; perform feature encoding on the fused face data to obtain encoded information; reconstruct features from the encoded information to obtain an acceleration security factor corresponding to the fused face data; perform a hash operation on the acceleration security factor and the face data to obtain a hash value corresponding to the face data; and encrypt the hash value based on the key corresponding to the face data to obtain signature information of the face data. This application embodiment can combine acceleration data to encrypt face data, which helps improve the security of face data encryption. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1a This is a schematic diagram of a scenario illustrating the face data signature method provided in an embodiment of this application;
[0041] Figure 1b This is a flowchart of the face data signature method provided in the embodiments of this application;
[0042] Figure 1c This is a schematic diagram of the face data signature method provided in the embodiments of this application;
[0043] Figure 1d This is a model architecture diagram of the face data signature method provided in the embodiments of this application;
[0044] Figure 1e This is another flowchart of the face data signature method provided in the embodiments of this application;
[0045] Figure 1f This is another flowchart of the face data signature method provided in the embodiments of this application;
[0046] Figure 2 This is another flowchart of the face data signature method provided in the embodiments of this application;
[0047] Figure 3 This is a schematic diagram of the structure of the face data signature device provided in the embodiments of this application;
[0048] Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0049] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0050] This application provides a face data signature method, apparatus, electronic device, and storage medium. Specifically, the face data signature apparatus can be integrated into an electronic device, such as a terminal or server.
[0051] It is understood that the face data signature method of this embodiment can be executed on a terminal, on a server, or jointly by a terminal and a server. The above examples should not be construed as limiting this application.
[0052] like Figure 1a As shown, the example illustrates a face data signature method jointly executed by a terminal and a server. The face data signature system provided in this embodiment includes a terminal 10 and a server 11, etc.; the terminal 10 and the server 11 are connected via a network, such as a wired or wireless network, etc., wherein the face data signature device can be integrated into the terminal.
[0053] Terminal 10 can be used to: acquire face data to be signed and reference acceleration data corresponding to the face data; fuse the face data and the reference acceleration data to obtain fused face data; perform feature encoding on the fused face data to obtain encoded information of the fused face data; perform feature reconstruction on the encoded information to obtain an acceleration security factor corresponding to the fused face data; perform hash operation on the acceleration security factor and the face data to obtain a hash value corresponding to the face data; and encrypt the hash value based on the key corresponding to the face data to obtain signature information of the face data. Terminal 10 may include a mobile phone, smart TV, tablet computer, laptop computer, or personal computer (PC), etc. A client may also be set on terminal 10, which may be an application client or a browser client, etc.
[0054] Server 11 can receive the signature information of the face data sent by terminal 10, verify the signature information, and then send the verification result back to terminal 10. Server 11 can be a single server, a server cluster consisting of multiple servers, or a cloud server. In the face data signature method disclosed in this application, the signature information of the face data, the face data, the reference acceleration data, and the key, etc., can be stored on a blockchain.
[0055] The facial data signature method provided in this application relates to computer vision technology in the field of artificial intelligence. This application can improve the security of facial data encryption.
[0056] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to have perception, reasoning, and decision-making capabilities. AI technology is a comprehensive discipline involving a wide range of fields, encompassing both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly include computer vision, speech processing, natural language processing, machine learning / deep learning, autonomous driving, and intelligent transportation.
[0057] Computer vision (CV) is a science that studies how to enable machines to "see." More specifically, it refers to machine vision, which uses cameras and computers to replace human eyes in recognizing and measuring targets, and then performs image processing to create images more suitable for human observation or transmission to instruments. As a scientific discipline, computer vision studies related theories and technologies, attempting to build artificial intelligence systems capable of extracting information from images or multidimensional data. Computer vision technologies typically include image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, 3D object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping (SLAM), autonomous driving, intelligent transportation, and other technologies, as well as common biometric recognition technologies such as facial recognition and fingerprint recognition.
[0058] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.
[0059] This embodiment will be described from the perspective of a facial data signature device, which can be integrated into an electronic device.
[0060] The facial data signature method of this application can be applied to various scenarios requiring facial data encryption. For example, in an offline payment system that allows for facial recognition transactions, the facial data collected by the facial payment device can be encrypted using the facial data signature method provided in this embodiment to generate a signature information for the facial data, which is then sent to a server for verification.
[0061] like Figure 1b As shown, the specific process of this face data signature method can be as follows:
[0062] 101. Obtain the face data to be signed and the reference acceleration data corresponding to the face data.
[0063] In this embodiment, signing the face data can ensure the data security of the data sender, that is, ensure the data security of the face collection object.
[0064] Facial data can be collected through a target device, which may include a facial recognition module (such as a camera). Specifically, this target device may be a facial payment device, which performs related payment operations based on the collected facial data.
[0065] Facial data specifically refers to facial images, which can include RGB (red, green, blue) three-color facial data. The resolution of the facial data is related to the camera.
[0066] In one embodiment, such as Figure 1c As shown, this is the face capture page displayed on the target device's screen. The face capture page can display the face capture area, which can display the captured face image.
[0067] The reference acceleration data can be the acceleration measured by an accelerometer in the target device during the acquisition of facial data. An accelerometer is a sensor capable of measuring acceleration. Specifically, the reference acceleration data can include acceleration data along the x, y, and z axes.
[0068] 102. The face data and the reference acceleration data are fused to obtain fused face data.
[0069] There are various ways to fuse data, and this embodiment does not limit them. For example, the fusion method can be splicing, specifically, reference acceleration data can be spliced after face data, or face data can be spliced after reference acceleration data.
[0070] In some embodiments, the face data can be preprocessed first, and then the preprocessed face data can be fused with reference acceleration data to obtain fused face data.
[0071] Specifically, this preprocessing method can involve performing grayscale processing on the face data, converting the face data into a grayscale image, and then using the Bernoulli distribution to binarize each pixel in the grayscale image, that is, converting the grayscale image into a black and white image.
[0072] 103. Perform feature encoding on the fused face data to obtain the encoding information of the fused face data.
[0073] Optionally, in this embodiment, the step "performing feature encoding on the fused face data to obtain the encoding information of the fused face data" may include:
[0074] Feature extraction is performed on the fused face data to obtain the latent vector of the fused face data in the latent space;
[0075] Obtain the probability distribution corresponding to the hidden vector;
[0076] Based on the probability distribution corresponding to the latent vector, the latent vector is sampled to obtain the encoding information of the fused face data.
[0077] This includes feature extraction from the fused facial data, which can specifically involve performing convolution and pooling operations on the fused facial data. The pooling operations can include max pooling, average pooling, and generalized-mean pooling, among others.
[0078] In this context, the latent vector can be understood as a vector composed of unobservable random variables. The probability distribution corresponding to the latent vector can be either a normal distribution (i.e., a Gaussian distribution) or a uniform distribution, depending on the specific circumstances.
[0079] Optionally, in this embodiment, the step "obtaining the probability distribution corresponding to the latent vector" may include:
[0080] Obtain the mean and variance information corresponding to the latent vector;
[0081] Based on the mean information and the variance information, the probability distribution of the latent vector is determined.
[0082] For example, assuming the latent vectors follow a standard normal distribution N(0,1), the fused face data is denoted as x, the mean information as μ, the variance information as σ, and the latent vectors as z. Let x = σ*z + μ, then x follows a distribution with a mean of μ and a variance of σ. 2 The normal distribution N(μ, σ) 2 That is, the probability distribution N(μ, σ) of the latent vector z is obtained. 2 ).
[0083] 104. Perform feature reconstruction on the encoded information to obtain the acceleration safety factor corresponding to the fused face data.
[0084] In this process, feature reconstruction of the encoded information yields fused facial data. This fused facial data can then be used as an acceleration security factor to encrypt the facial data, thereby improving the security of the facial data encryption.
[0085] Optionally, in this embodiment, the step "performing feature encoding on the fused face data to obtain the encoding information of the fused face data" may include:
[0086] The fused face data is feature-encoded using an autoencoder model to obtain the encoded information of the fused face data.
[0087] The step "reconstructing features from the encoded information to obtain the acceleration safety factor corresponding to the fused face data" may include:
[0088] By using an autoencoder model to reconstruct features from the encoded information, the acceleration safety factor corresponding to the fused face data is obtained.
[0089] The autoencoder model can be a deep neural network (DNN), a visual geometry group network (VGGNet), a residual network (ResNet), or a densely connected convolutional network (DenseNet), etc. However, it should be understood that the autoencoder model in this embodiment is not limited to the types listed above.
[0090] Specifically, the autoencoder model may include an encoder and a decoder. The encoder can be used to encode features of the fused face data to obtain the encoded information of the fused face data; the decoder can be used to reconstruct features from the encoded information to obtain the acceleration safety factor corresponding to the fused face data.
[0091] Optionally, in this embodiment, the autoencoder model can specifically be a variational autoencoder (VAE), where the encoder can be considered as an inference network and the decoder as a generative network. A VAE is a probabilistic, unsupervised generative model.
[0092] In one specific embodiment, such as Figure 1d As shown, the stacked deconvolutional network unit is a variational autoencoder. Its input neural network on the left is the inference network, and its output neural network on the right is the generator network. The inference network can employ three convolutional layers and one fully connected layer. The generator network can use fully connected layers followed by four convolutional transpose layers (i.e., deconvolutional layers).
[0093] Specifically, the first layer of the inference network is the input layer; the second layer is a convolutional layer using 16 convolutional kernels, with a kernel size of 3x3, a stride of 2, SAME padding, and ReLU activation function; the third layer is a convolutional layer using 32 convolutional kernels, with a kernel size of 3x3, a stride of 2, SAME padding, and ReLU activation function; the fourth layer is a convolutional layer using 64 convolutional kernels, with a kernel size of 3x3, a stride of 2, SAME padding, and ReLU activation function; and the fifth layer is a fully connected layer.
[0094] Here, padding is a method of filling pixels, and SAME is a parameter of padding, which uses a complete padding method.
[0095] ReLU stands for Rectified Linear Unit, also known as the rectified linear unit, and is a commonly used activation function in artificial neural networks.
[0096] Specifically, the generator network consists of the following layers: the first layer is the input layer; the second layer is a fully connected layer with ReLU activation; the third layer is a resampling layer that reshapes the input features from the second layer to (batch size, 7, 7, 32); the fourth layer is a deconvolutional layer with 64 kernels (3x3 kernel size, stride 2, padding SAME, and ReLU activation); the fifth layer is a deconvolutional layer with 32 kernels (3x3 kernel size, stride 2, padding SAME, and ReLU activation); the sixth layer is a deconvolutional layer with 16 kernels (3x3 kernel size, stride 2, padding SAME, and ReLU activation); and the seventh layer is a deconvolutional layer with 1 kernel (3x3 kernel size, stride 1, padding SAME, and linear activation).
[0097] The reshape function can be used to transform a matrix. It transforms a specified matrix into a matrix of a specific dimension while keeping the number of elements in the matrix unchanged. The function can readjust the number of rows, columns, and dimensions of the matrix.
[0098] The generator network can be considered as an upsampling module, and the inference network can be considered as a downsampling module.
[0099] Optionally, in this embodiment, the fused face data x can be feature-encoded by the encoder of the variational autoencoder to obtain the encoded information z of the fused face data. Then, the encoded information z is passed through the decoder of the variational autoencoder to obtain the generated data of the variational autoencoder, that is, the fused face data after feature reconstruction, which is used as the acceleration safety factor.
[0100] The encoder's role is to obtain the latent representation z from the fused face data x. The specific process can be as follows:
[0101] First, assume that the latent representation (i.e., the latent vector) follows a preset distribution, which can be defined as an approximate posterior distribution q(z|x), where q(z|x) is a probability distribution. This approximate posterior distribution takes the observed values (i.e., the fused face data) as input and obtains a set of parameters (specifically, mean information and variance information) for the conditional probability distribution of the latent representation. Then, the probability distribution of the latent representation is determined, and the latent expression z, which is the encoded information of the fused face data, is sampled from the probability distribution of the latent representation.
[0102] The decoder's role is to map the latent representation z to a space consistent with the distribution of the fused face data. In other words, it reconstructs the fused face data using the latent representation z, or restores the fused face data. The specific process can be as follows:
[0103] The latent code (i.e., the latent expression z) is taken as input, and a unit Gaussian prior p(z) is applied to the latent code. The output parameter p(x|z) is used for the observation conditional distribution and is used as the acceleration safety factor.
[0104] It should be noted that the autoencoder model can be trained by other devices and then provided to the face data signature device, or it can be trained by the face data signature device itself.
[0105] If the face data signature device is trained automatically, then before the step "using an autoencoder model to perform feature encoding on the fused face data to obtain the encoded information of the fused face data", the following may also be included:
[0106] Acquire training data, which includes sample face data and sample acceleration data corresponding to the sample face data;
[0107] The sample face data and the sample acceleration data are fused to obtain fused sample face data;
[0108] By using a preset autoencoder model, feature encoding is performed on the fused sample face data to obtain the encoded information of the fused sample face data;
[0109] The encoded information is reconstructed to obtain reconstructed face data;
[0110] Based on the loss value between the reconstructed face data and the fused sample face data, the parameters of the preset autoencoder model are adjusted to obtain the trained autoencoder model.
[0111] The loss value can be calculated using the cross-entropy loss function, the mean squared error loss function, and the norm loss function, etc. This embodiment does not impose any restrictions on this.
[0112] This process involves calculating the vector distance between the feature vectors of the reconstructed face data and the feature vectors of the fused sample face data. Based on this vector distance, a loss value is determined between the reconstructed face data and the fused sample face data. The magnitude of the loss value can be measured by the magnitude of the vector distance. A larger vector distance results in a larger loss value, and a smaller vector distance results in a smaller loss value. This vector distance can be cosine distance or Euclidean distance, etc., and this embodiment is not limited to this.
[0113] Before fusing sample face data and sample acceleration data, the sample face data can be preprocessed. For example, data cleaning can be performed to filter out invalid data, and the sample face data can be converted into grayscale images. Then, the Bernoulli distribution can be used to model each pixel in the grayscale image, that is, to statically binarize it to 0 and 1. Specifically, binarization can be performed using the following code:
[0114] # Standardize the image to the interval [0., 1.]
[0115] train_images / = 255.
[0116] test_images / = 255.
[0117] # Binarization
[0118] train_images[train_images>= .5] = 1.
[0119] train_images[train_images<.5] = 0.
[0120] test_images[test_images>= .5] = 1.
[0121] test_images[test_images<.5] = 0
[0122] Among them, train_images are grayscale images of sample face data.
[0123] The sample face data can include face data with good image quality or face data with poor image quality (i.e., noisy sample data).
[0124] Optionally, in this embodiment, the step "adjusting the parameters of the preset autoencoder model based on the loss value between the reconstructed face data and the fused sample face data" may include:
[0125] Calculate the reconstruction loss value between the reconstructed face data and the fused sample face data;
[0126] Calculate the distribution loss value between the probability distribution corresponding to the encoded information of the fused sample face data and the preset distribution;
[0127] The parameters of the preset autoencoder model are adjusted based on the reconstruction loss value and the distribution loss value.
[0128] The preset distribution can be a normal distribution (i.e., a Gaussian distribution) or a uniform distribution; this embodiment does not impose any restrictions on it.
[0129] In this embodiment, the training process first calculates the reconstruction loss value between the reconstructed face data and the fused sample face data, as well as the distribution loss value between the probability distribution corresponding to the encoded information of the fused sample face data and a preset distribution. Then, the parameters of the preset autoencoder model are adjusted using the backpropagation algorithm. Based on the reconstruction loss value and the distribution loss value, the parameters of the preset autoencoder model are optimized so that the reconstruction loss value and the distribution loss value satisfy the preset loss condition, thus obtaining the trained autoencoder model. Specifically, the preset loss condition can be that the sum of the reconstruction loss value and the distribution loss value is less than the preset loss value, where the preset loss value can be set according to the actual situation.
[0130] The distributed loss value can be expressed by the following formula:
[0131]
[0132] in, For approximate posterior distribution, for and The joint probability density, To integrate the sample face data, The ELBO is the lower bound of evidence for the marginal log-likelihood, which represents the encoded information corresponding to the fused sample face data.
[0133] Among them, the entire training framework of the autoencoder model is the fused sample face data. Encode and decode. The merged sample face data The encoding is a implicit expression z (encoded information), while The latent representation z is then decoded to obtain the reconstructed face data. The purpose of training is to learn the mapping functions of the encoder and decoder, so the training process is actually performing variational inference, that is, finding a certain function to optimize the target, hence the name Variational Autoencoder (VAE).
[0134] Specifically, throughout the entire training iteration process, it can be assumed that the latent representation (i.e., the hidden vector) follows a pre-defined distribution. (e.g., Gaussian distribution), the parameters describing the Gaussian distribution—mean and variance—can be directly learned through a pre-defined autoencoder model. During each iteration, the fused sample face data is passed to the encoder to obtain an approximate posterior. We obtain a set of mean and variance vectors, and then derive the probability distribution corresponding to the latent vectors; then, we apply the reparameterization technique to obtain the probability distribution from the unit Gaussian prior distribution. Encoded information of the fused sample face data obtained from mid-sample sampling Finally, the re-parameterized encoded information is... Passed to the decoder to obtain the generated distribution The logit, i.e., the reconstructed face data, can be used as an acceleration safety factor.
[0135] It should be noted that avoiding batch normalization when training variational autoencoders (VAEs) is a common practice, as mini-batch processing introduces additional randomness, which exacerbates the instability of random sampling.
[0136] In one specific embodiment, such as Figure 1d As shown, the autoencoder model can specifically be a stacked deconvolutional network (SDN), which contains multiple stacked deconvolutional network units (SDN units). Each stacked deconvolutional network unit can include a decoder and an encoder. Specifically, a stacked deconvolutional network unit can be regarded as an autoencoder module. Stacked deconvolutional networks can be used for efficient image semantic segmentation, and hierarchical supervision can be used to help optimize the network.
[0137] In SDN, multiple shallow deconvolutional networks (SDN units) are stacked sequentially to integrate contextual information and ensure fine-grained recovery of location information. Simultaneously, connections between and within units are used to support network training and improve feature fusion, as these connections improve information flow and gradient propagation throughout the network. Furthermore, hierarchical supervision is used during the sampling process of each SDN unit to ensure the distinctiveness of feature representations and aid in network optimization. Hierarchical supervision utilizes multiple classification layers to simultaneously perform classification supervision on both the overall and local images to assess the quality of images at different sizes; additionally, by sharing weights across multiple classification layers, detailed information from different locations in the generated image can be obtained.
[0138] Figure 1d In the diagram, the upper part represents the structure of a stacked deconvolutional network (SDN), and the lower part represents the specific structure of an SDN unit (labeled a), a downsampling module (labeled b), and an upsampling module (labeled c) within the SDN unit.
[0139] Specifically, such as Figure 1eThe diagram illustrates the entire training process of an autoencoder model. First, data collection is performed, including the collection of sample face data and sample acceleration data. The sample face data can include faces with high or low image quality. Then, relatively important features are extracted from the sample face data and fused with the sample acceleration data. The fused result is input into a pre-defined autoencoder model for training. Before training the pre-defined autoencoder model, a model can be selected, for example, a variational autoencoder model. After model selection, the pre-defined autoencoder model is trained based on the fused sample face data. The parameters of the pre-defined autoencoder model are adjusted based on the loss value between the reconstructed face data and the fused sample face data to obtain the trained autoencoder model. Finally, the trained autoencoder model is evaluated.
[0140] 105. Perform a hash operation on the acceleration security factor and the face data to obtain the hash value corresponding to the face data.
[0141] The hash operation may use algorithms such as SM3 (a cryptographic hash function standard), SHA (SecureHash Algorithm), and MD5 (Message Digest Algorithm 5), but this embodiment does not limit them.
[0142] A hash function is a cryptographic algorithm primarily used in information security. It transforms an input of arbitrary length into a fixed-length output, called a hash value. This transformation is essentially a compression mapping, meaning the space of hash values is usually smaller than the space of input values. A key property of hash operations is irreversibility; given a hash value, it is extremely difficult to calculate the corresponding message. Different input values correspond to fundamentally different output values, and different output values correspond to different input values. Therefore, it is impossible to determine a unique input value from the hash value; in other words, there is no way to retrieve the original input data from the output hash value.
[0143] Optionally, in this embodiment, the step "performing a hash operation on the acceleration security factor and the face data to obtain the hash value corresponding to the face data" may include:
[0144] The acceleration safety factor and the facial data are fused to obtain an information sequence;
[0145] A hash operation is performed on the information sequence to obtain the hash value corresponding to the face data.
[0146] Optionally, in this embodiment, the step "fusing the acceleration security factor and the face data to obtain an information sequence" may include:
[0147] Obtain the preset security factor of the facial data;
[0148] The preset security factor, the acceleration security factor, and the face data are fused to obtain an information sequence.
[0149] There are many ways to integrate, such as splicing, and this embodiment does not limit this.
[0150] The preset security factor is specifically a non-sensor security factor (i.e., a non-accelerometer security factor), which can be set according to actual conditions; this embodiment does not impose any restrictions on it. For example, the preset security factor may include timestamps, pedometer information, magic words, device model information, signature algorithm version, random numbers, etc. The original signature string format and magic words may vary depending on the application of the business backend; a unified agreement is sufficient.
[0151] Among them, facial data can be denoted as payload, timestamp as timestamp, pedometer information as counter, magic number as magic_num, device model information as device_info, signature algorithm version as sign_version, and random number as random; the fusion of preset security factor, acceleration security factor and facial data can be specifically as follows:
[0152] {magic_num}{device_info}{sign_version}{timestamp}{counter}{acceleration safety factor}{random}{payload}.
[0153] In some embodiments, there are multiple preset security factors for facial data;
[0154] The step "fusing the preset security factor, the acceleration security factor, and the face data to obtain an information sequence" may include:
[0155] Calculate the hash value of each preset security factor, the hash value of the acceleration security factor, and the hash value of the face data;
[0156] Based on the size of the hash value, the hash values of each preset security factor, the hash value of the acceleration security factor, and the hash value of the face data are sorted to obtain sorted information;
[0157] The sorted information is then concatenated to obtain an information sequence.
[0158] Specifically, the order of concatenation can be determined based on the size of the hash value.
[0159] Among them, the preset security factor, acceleration security factor and face data can use different hash operations to calculate the corresponding hash values, or they can use the same hash operation to calculate the corresponding hash values.
[0160] In a specific scenario, such as Figure 1f As shown, facial data is collected by a facial recognition device. A preset security factor is then fused with the facial data to obtain an initial information sequence. The preset security factor is a non-sensor security factor, which may include a business-defined magic letter, a timestamp security factor, an anti-duplicate security factor, and a random number. When the target device's accelerometer detects that the target device is in a non-stationary state, a layer of acceleration security factor, fused with reference acceleration data, is added to the facial data. This is processed by an autoencoder model to obtain an information sequence. This information sequence is then hashed to obtain the hash value corresponding to the facial data. Finally, the hash value is encrypted to obtain the signature information of the facial data.
[0161] 106. Based on the key corresponding to the face data, the hash value is encrypted to obtain the signature information of the face data.
[0162] The encryption algorithm used can be the national standard cryptography and RSA (Rivest, Shamir & Adleman) algorithm, etc. This embodiment does not limit the encryption algorithm used.
[0163] The security of the RSA algorithm is based on the difficulty of factoring large prime numbers in number theory. RSA requires sufficiently large integers. The more difficult the factorization, the harder the cipher is to break, and the higher the encryption level.
[0164] It should be noted that this encryption process can be either symmetric or asymmetric encryption; this embodiment does not impose any restrictions. Symmetric encryption is a fast and simple encryption method, using the same key for both encryption and decryption. Asymmetric encryption, however, uses different encryption and decryption keys. Asymmetric encryption algorithms require two keys: a public key and a private key. The public and private keys are a pair; if data is encrypted using the public key, only the corresponding private key can decrypt it; conversely, if data is encrypted using the private key, only the corresponding public key can decrypt it.
[0165] The signature information of the facial data contains hidden key information, so the signature information can prove the identity of the subject whose facial data was collected.
[0166] As can be seen from the above, this embodiment can obtain the face data to be signed and the reference acceleration data corresponding to the face data; fuse the face data and the reference acceleration data to obtain fused face data; perform feature encoding on the fused face data to obtain the encoding information of the fused face data; perform feature reconstruction on the encoding information to obtain the acceleration security factor corresponding to the fused face data; perform hash operation on the acceleration security factor and the face data to obtain the hash value corresponding to the face data; and encrypt the hash value based on the key corresponding to the face data to obtain the signature information of the face data. This embodiment can combine acceleration data to encrypt face data, which is beneficial to improving the security of face data encryption.
[0167] Based on the method described in the preceding embodiments, the following will provide a more detailed explanation by taking the specific integration of the facial data signature device into a terminal as an example.
[0168] This application provides a method for facial data signature, such as... Figure 2 As shown, the specific process of this face data signature method can be as follows:
[0169] 201. The terminal acquires the face data to be signed and the reference acceleration data corresponding to the face data.
[0170] Facial data can be collected through a target device, which may include a facial recognition module (such as a camera). Specifically, this target device may be a facial payment device, which performs related payment operations based on the collected facial data.
[0171] The reference acceleration data can be the acceleration measured by an accelerometer in the target device during the acquisition of facial data. An accelerometer is a sensor capable of measuring acceleration. Specifically, the reference acceleration data can include acceleration data along the x, y, and z axes.
[0172] 202. The terminal fuses the face data and the reference acceleration data to obtain fused face data.
[0173] There are various ways to fuse data, and this embodiment does not limit them. For example, the fusion method can be splicing, specifically, reference acceleration data can be spliced after face data, or face data can be spliced after reference acceleration data.
[0174] In some embodiments, the face data can be preprocessed first, and then the preprocessed face data can be fused with reference acceleration data to obtain fused face data.
[0175] Specifically, this preprocessing method can involve performing grayscale processing on the face data, converting the face data into a grayscale image, and then using the Bernoulli distribution to binarize each pixel in the grayscale image, that is, converting the grayscale image into a black and white image.
[0176] 203. The terminal performs feature encoding on the fused face data to obtain the encoded information of the fused face data.
[0177] Optionally, in this embodiment, the step "performing feature encoding on the fused face data to obtain the encoding information of the fused face data" may include:
[0178] Feature extraction is performed on the fused face data to obtain the latent vector of the fused face data in the latent space;
[0179] Obtain the probability distribution corresponding to the hidden vector;
[0180] Based on the probability distribution corresponding to the latent vector, the latent vector is sampled to obtain the encoding information of the fused face data.
[0181] Optionally, in this embodiment, the step "obtaining the probability distribution corresponding to the latent vector" may include:
[0182] Obtain the mean and variance information corresponding to the latent vector;
[0183] Based on the mean information and the variance information, the probability distribution of the latent vector is determined.
[0184] For example, assuming the latent vectors follow a standard normal distribution N(0,1), the fused face data is denoted as x, the mean information as μ, the variance information as σ, and the latent vectors as z. Let x = σ*z + μ, then x follows a distribution with a mean of μ and a variance of σ. 2 The normal distribution N(μ, σ) 2 That is, the probability distribution N(μ, σ) of the latent vector z is obtained. 2 ).
[0185] 204. The terminal performs feature reconstruction on the encoded information to obtain the acceleration security factor corresponding to the fused face data.
[0186] In this process, feature reconstruction of the encoded information yields fused facial data. This fused facial data can then be used as an acceleration security factor to encrypt the facial data, thereby improving the security of the facial data encryption.
[0187] 205. The terminal fuses the acceleration security factor and the face data to obtain an information sequence.
[0188] Optionally, in this embodiment, the step "fusing the acceleration security factor and the face data to obtain an information sequence" may include:
[0189] Obtain the preset security factor of the facial data;
[0190] The preset security factor, the acceleration security factor, and the face data are fused to obtain an information sequence.
[0191] There are many ways to integrate, such as splicing, and this embodiment does not limit this.
[0192] The step "fusing the preset security factor, the acceleration security factor, and the face data to obtain an information sequence" may include:
[0193] Calculate the hash value of each preset security factor, the hash value of the acceleration security factor, and the hash value of the face data;
[0194] Based on the size of the hash value, the hash values of each preset security factor, the hash value of the acceleration security factor, and the hash value of the face data are sorted to obtain sorted information;
[0195] The sorted information is then concatenated to obtain an information sequence.
[0196] 206. The terminal performs a hash operation on the information sequence to obtain the hash value corresponding to the face data.
[0197] The hash operation may use algorithms such as SM3 (a cryptographic hash function standard), SHA (SecureHash Algorithm), and MD5 (Message Digest Algorithm 5), but this embodiment does not limit them.
[0198] 207. The terminal encrypts the hash value based on the key corresponding to the face data to obtain the signature information of the face data.
[0199] The encryption algorithm used can be the national standard cryptography and RSA (Rivest, Shamir & Adleman) algorithm, etc. This embodiment does not limit the encryption algorithm used.
[0200] As can be seen from the above, this embodiment can obtain the face data to be signed and the corresponding reference acceleration data through the terminal; fuse the face data and the reference acceleration data to obtain fused face data; perform feature encoding on the fused face data to obtain the encoded information of the fused face data; perform feature reconstruction on the encoded information to obtain the acceleration security factor corresponding to the fused face data; fuse the acceleration security factor and the face data to obtain an information sequence; perform hash operation on the information sequence to obtain the hash value corresponding to the face data. Based on the key corresponding to the face data, the hash value is encrypted to obtain the signature information of the face data. This embodiment can combine acceleration data to encrypt face data, which is beneficial to improving the security of face data encryption.
[0201] To better implement the above methods, embodiments of this application also provide a face data signature device, such as... Figure 3 As shown, the face data signature device may include an acquisition unit 301, a fusion unit 302, an encoding unit 303, a reconstruction unit 304, a hashing unit 305, and an encryption unit 306, as follows:
[0202] (1) Obtain unit 301;
[0203] The acquisition unit 301 is used to acquire the face data to be signed and the reference acceleration data corresponding to the face data.
[0204] (2) Fusion unit 302;
[0205] The fusion unit 302 is used to fuse the face data and the reference acceleration data to obtain fused face data.
[0206] (3) Encoding unit 303;
[0207] The encoding unit 303 is used to perform feature encoding on the fused face data to obtain the encoding information of the fused face data.
[0208] Optionally, in some embodiments of this application, the encoding unit may include an extraction subunit, an acquisition subunit, and a sampling subunit, as follows:
[0209] The extraction subunit is used to extract features from the fused face data to obtain the latent vector of the fused face data in the latent space.
[0210] Obtain sub-units to obtain the probability distribution corresponding to the latent vector;
[0211] The sampling subunit is used to sample the latent vector based on the probability distribution corresponding to the latent vector to obtain the encoding information of the fused face data.
[0212] Optionally, in some embodiments of this application, the acquisition subunit may be used to acquire the mean information and variance information corresponding to the latent vector; and determine the probability distribution of the latent vector based on the mean information and the variance information.
[0213] Optionally, in some embodiments of this application, the encoding unit may be specifically used to perform feature encoding on the fused face data through an autoencoder model to obtain the encoded information of the fused face data.
[0214] (4) Reconstruction unit 304;
[0215] The reconstruction unit 304 is used to reconstruct the features of the encoded information to obtain the acceleration safety factor corresponding to the fused face data.
[0216] (5) Hash unit 305;
[0217] The hash unit 305 is used to perform a hash operation on the acceleration security factor and the face data to obtain the hash value corresponding to the face data.
[0218] Optionally, in some embodiments of this application, the hash unit may include a fusion subunit and a hash subunit, as follows:
[0219] The fusion subunit is used to fuse the acceleration safety factor and the face data to obtain an information sequence;
[0220] The hash subunit is used to perform a hash operation on the information sequence to obtain the hash value corresponding to the face data.
[0221] Optionally, in some embodiments of this application, the fusion subunit may be specifically used to obtain a preset security factor of the face data; and to fuse the preset security factor, the acceleration security factor and the face data to obtain an information sequence.
[0222] (6) Encryption unit 306;
[0223] The encryption unit 306 is used to encrypt the hash value based on the key corresponding to the face data to obtain the signature information of the face data.
[0224] Optionally, in some embodiments of this application, the face data signature device may further include a training unit for training a preset autoencoder model. The training unit may include a data acquisition subunit, a sample fusion subunit, a feature encoding subunit, a feature reconstruction subunit, and an adjustment subunit, as follows:
[0225] The data acquisition subunit is used to acquire training data, which includes sample face data and sample acceleration data corresponding to the sample face data.
[0226] The sample fusion subunit is used to fuse the sample face data and the sample acceleration data to obtain fused sample face data;
[0227] The feature encoding subunit is used to perform feature encoding on the fused sample face data through a preset autoencoder model to obtain the encoding information of the fused sample face data.
[0228] The feature reconstruction subunit is used to reconstruct the features of the encoded information to obtain reconstructed face data;
[0229] The adjustment subunit is used to adjust the parameters of the preset autoencoder model based on the loss value between the reconstructed face data and the fused sample face data, so as to obtain the trained autoencoder model.
[0230] Optionally, in some embodiments of this application, the adjustment subunit may be specifically used to calculate the reconstruction loss value between the reconstructed face data and the fused sample face data; calculate the distribution loss value between the probability distribution corresponding to the encoded information of the fused sample face data and the preset distribution; and adjust the parameters of the preset autoencoder model according to the reconstruction loss value and the distribution loss value.
[0231] As can be seen from the above, in this embodiment, the acquisition unit 301 acquires the face data to be signed and the reference acceleration data corresponding to the face data; the fusion unit 302 fuses the face data and the reference acceleration data to obtain fused face data; the encoding unit 303 performs feature encoding on the fused face data to obtain the encoding information of the fused face data; the reconstruction unit 304 performs feature reconstruction on the encoding information to obtain the acceleration security factor corresponding to the fused face data; the hash unit 305 performs a hash operation on the acceleration security factor and the face data to obtain the hash value corresponding to the face data; and the encryption unit 306 encrypts the hash value based on the key corresponding to the face data to obtain the signature information of the face data. This embodiment can combine acceleration data to encrypt face data, which is beneficial to improving the security of face data encryption.
[0232] This application also provides an electronic device, such as... Figure 4 The diagram shows a structural schematic of an electronic device involved in an embodiment of this application. This electronic device can be a terminal or a server, specifically:
[0233] The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0234] The processor 401 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402, it performs various functions and processes data, thereby performing overall detection of the electronic device. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 401.
[0235] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0236] The electronic device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0237] The electronic device may also include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0238] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402 to realize various functions, as follows:
[0239] The process involves: acquiring face data to be signed and corresponding reference acceleration data; fusing the face data and the reference acceleration data to obtain fused face data; performing feature encoding on the fused face data to obtain its encoding information; reconstructing the encoding information to obtain an acceleration security factor corresponding to the fused face data; performing a hash operation on the acceleration security factor and the face data to obtain a hash value corresponding to the face data; and encrypting the hash value based on the key corresponding to the face data to obtain the signature information of the face data.
[0240] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0241] As can be seen from the above, this embodiment can obtain the face data to be signed and the reference acceleration data corresponding to the face data; fuse the face data and the reference acceleration data to obtain fused face data; perform feature encoding on the fused face data to obtain the encoding information of the fused face data; perform feature reconstruction on the encoding information to obtain the acceleration security factor corresponding to the fused face data; perform hash operation on the acceleration security factor and the face data to obtain the hash value corresponding to the face data; and encrypt the hash value based on the key corresponding to the face data to obtain the signature information of the face data. This embodiment can combine acceleration data to encrypt face data, which is beneficial to improving the security of face data encryption.
[0242] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0243] To this end, embodiments of this application provide a storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the face data signature methods provided in embodiments of this application. For example, the instructions can execute the following steps:
[0244] The process involves: acquiring face data to be signed and corresponding reference acceleration data; fusing the face data and the reference acceleration data to obtain fused face data; performing feature encoding on the fused face data to obtain its encoding information; reconstructing the encoding information to obtain an acceleration security factor corresponding to the fused face data; performing a hash operation on the acceleration security factor and the face data to obtain a hash value corresponding to the face data; and encrypting the hash value based on the key corresponding to the face data to obtain the signature information of the face data.
[0245] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0246] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0247] Since the instructions stored in the storage medium can execute the steps in any of the face data signature methods provided in the embodiments of this application, the beneficial effects that any of the face data signature methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0248] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations of the aforementioned facial data signature aspect.
[0249] The foregoing has provided a detailed description of a face data signature method, apparatus, electronic device, and storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for face data signature, characterized in that, The method comprises the following steps: obtaining face data to be signed and reference acceleration data corresponding to the face data, wherein the reference acceleration data is acceleration of an acceleration sensor in a target device when the face data is collected; fusing the face data and the reference acceleration data to obtain fused face data; encoding features of the fused face data to obtain encoding information of the fused face data; reconstructing features of the encoding information to obtain an acceleration security factor corresponding to the fused face data; performing a hash operation on the acceleration security factor and the face data to obtain a hash value corresponding to the face data; performing encryption processing on the hash value based on a key corresponding to the face data to obtain signature information of the face data.
2. The method of claim 1, wherein, The step of performing a hash operation on the acceleration security factor and the face data to obtain a hash value corresponding to the face data comprises the following steps: fusing the acceleration security factor and the face data to obtain an information sequence; performing a hash operation on the information sequence to obtain a hash value corresponding to the face data.
3. The method of claim 2, wherein, The step of fusing the acceleration security factor and the face data to obtain an information sequence comprises the following steps: obtaining a preset security factor of the face data; fusing the preset security factor, the acceleration security factor and the face data to obtain an information sequence.
4. The method of claim 1, wherein, The step of encoding features of the fused face data to obtain encoding information of the fused face data comprises the following steps: extracting features of the fused face data to obtain an implicit vector of the fused face data in an implicit space; obtaining a probability distribution corresponding to the implicit vector; performing sampling processing on the implicit vector based on the probability distribution corresponding to the implicit vector to obtain the encoding information of the fused face data.
5. The method of claim 4, wherein, The step of obtaining a probability distribution corresponding to the implicit vector comprises the following steps: obtaining mean information and variance information corresponding to the implicit vector; determining the probability distribution of the implicit vector based on the mean information and the variance information.
6. The method of claim 1, wherein, The step of encoding features of the fused face data to obtain encoding information of the fused face data comprises the following step: encoding features of the fused face data by using a self-encoder model to obtain the encoding information of the fused face data.
7. The method of claim 6, wherein, Before the step of encoding features of the fused face data by using a self-encoder model to obtain the encoding information of the fused face data, the method further comprises the following steps: obtaining training data, wherein the training data comprises sample face data and sample acceleration data corresponding to the sample face data; fusing the sample face data and the sample acceleration data to obtain fused sample face data; encoding features of the fused sample face data by using a preset self-encoder model to obtain encoding information of the fused sample face data; reconstructing features of the encoding information to obtain reconstructed face data; adjusting parameters of the preset self-encoder model based on a loss value between the reconstructed face data and the fused sample face data to obtain a trained self-encoder model.
8. The method of claim 7, wherein, The parameters of the preset autoencoder model are adjusted based on the loss value between the reconstructed face data and the fused sample face data, including: calculating the reconstruction loss value between the reconstructed face data and the fused sample face data; calculating the distribution loss value between the probability distribution corresponding to the encoding information of the fused sample face data and the preset distribution; adjusting the parameters of the preset autoencoder model according to the reconstruction loss value and the distribution loss value.
9. A face data signing apparatus, comprising: including: The acquisition unit is used for acquiring face data to be signed and reference acceleration data corresponding to the face data; wherein the reference acceleration data is the acceleration of the acceleration sensor in the target device when collecting face data; The fusion unit is used for fusing the face data and the reference acceleration data to obtain fused face data; The encoding unit is used for feature encoding of the fused face data to obtain the encoding information of the fused face data; The reconstruction unit is used for feature reconstruction of the encoding information to obtain an acceleration security factor corresponding to the fused face data; The hash unit is used for hash operation on the acceleration security factor and the face data to obtain a hash value corresponding to the face data; The encryption unit is used for encrypting the hash value based on the key corresponding to the face data to obtain signature information of the face data.
10. The apparatus of claim 9, wherein, The hash unit includes a fusion subunit and a hash subunit, The fusion subunit is used for fusing the acceleration security factor and the face data to obtain an information sequence; The hash subunit is used for hash operation on the information sequence to obtain a hash value corresponding to the face data.
11. The apparatus of claim 10, wherein, The fusion subunit is specifically used for obtaining a preset security factor of the face data; fusing the preset security factor, the acceleration security factor and the face data to obtain an information sequence.
12. The apparatus of claim 9, wherein, The encoding unit includes an extraction subunit, an acquisition subunit and a sampling subunit, The extraction subunit is used for feature extraction of the fused face data to obtain an implicit vector of the fused face data in an implicit space; The acquisition subunit is used for acquiring a probability distribution corresponding to the implicit vector; The sampling subunit is used for sampling processing of the implicit vector based on the probability distribution corresponding to the implicit vector to obtain the encoding information of the fused face data.
13. The apparatus of claim 12, wherein, The acquisition subunit is specifically used for acquiring mean information and variance information corresponding to the implicit vector; and determining the probability distribution of the implicit vector based on the mean information and the variance information.
14. The apparatus of claim 9, wherein, The encoding unit is specifically used for feature encoding of the fused face data by an autoencoder model to obtain the encoding information of the fused face data.
15. The apparatus of claim 14, wherein, The face data signature device further includes a training unit, The training unit is used for training a preset autoencoder model; The training unit includes a data acquisition subunit, a sample fusion subunit, a feature encoding subunit, a feature reconstruction subunit and an adjustment subunit, The data acquisition subunit is configured to acquire training data, wherein the training data comprises sample face data and sample acceleration data corresponding to the sample face data. A sample fusion subunit is configured to fuse the sample face data and the sample acceleration data to obtain fused sample face data. A feature encoding subunit is configured to perform feature encoding on the fused sample face data by using a preset auto-encoder model to obtain encoding information of the fused sample face data. A feature reconstruction subunit is configured to perform feature reconstruction on the encoding information to obtain reconstructed face data. An adjustment subunit is configured to adjust parameters of the preset auto-encoder model based on a loss value between the reconstructed face data and the fused sample face data to obtain a trained auto-encoder model.
16. The apparatus of claim 15, wherein, The adjustment subunit is specifically configured to calculate a reconstruction loss value between the reconstructed face data and the fused sample face data, calculate a distribution loss value between a preset distribution and a probability distribution corresponding to the encoding information of the fused sample face data, and adjust the parameters of the preset auto-encoder model according to the reconstruction loss value and the distribution loss value.
17. An electronic device, comprising: The memory stores an application program, and the processor is configured to run the application program in the memory to perform the operations in the face data signature method of any one of claims 1 to 8.
18. A storage medium, characterized by The storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by the processor to perform the steps in the face data signature method of any one of claims 1 to 8.
19. A computer program product, characterised in that, The computer program product comprises computer instructions stored in a computer readable storage medium, a processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform the steps in the face data signature method of any one of claims 1 to 8.
Citation Information
Patent Citations
Screen unlocking method, data access control method and security control device
CN103294334A
Bank abnormal condition detection system based on mobile phone acceleration sensor and gyroscope
CN103956007A