A method, device, equipment, medium and product for dense face recognition
By adopting the encryption method of combining multiplication perturbation and orthogonal transformation in the face recognition system, and using encrypted vector internal product calculation instead of similarity calculation, the security and efficiency problems of face images in the cloud storage and recognition in the prior art are solved, and efficient and secure batch face recognition is achieved.
Patent Information
- Application Number
- CN202411113824.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2044-08-14
AI Technical Summary
The prior art has security and efficiency problems when outsourcing face images to cloud servers for storage and recognition, including leakage of user privacy information and excessive computing burden on local servers, and it is impossible to achieve efficient batch face image recognition.
The encryption method combined with multiplication perturbation and orthogonal transformation is adopted, and the encrypted vector internal product calculation is used instead of similarity calculation to avoid the leakage of image information and similarity-related information, and the traces of the matrix are directly calculated through the cloud server to achieve identification matching.
The security of image information and similarity-related information during the face recognition process is realized, reducing the computing burden of local servers, improving the efficiency of face recognition, and supporting efficient parallel recognition of batch face images.
Smart Images

Figure CN118865472B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to a method, device, equipment, medium and product for dense face recognition. Background Art
[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute prior art.
[0003] Face recognition is a biometric technology that uses facial features to identify an individual. It has a wide range of applications in identity authentication, access control, and public security. In traditional application scenarios, the local server stores a large number of face images in a local database, and the face acquisition device uses sensors to collect face images and transmits them to the local server for face recognition. For the application scenario of storing and recognizing a large number of face images, due to the limited storage and computing power of the local server, it is impossible to directly store a large number of face images and efficiently perform a large number of complex operations such as matrix multiplication. Therefore, in order to reduce the storage and computing burden of the local server, the face recognition task can be outsourced to the cloud server for execution.
[0004] However, there are some security and efficiency issues in outsourcing facial images to cloud servers for storage and recognition. If facial images are uploaded directly to the cloud server in plain text, the cloud server can obtain all the information of the facial image during the database storage and recognition stage, and the user's privacy information is at risk of being stolen. Therefore, encrypted form must be used for cloud facial image storage and recognition. The existing encrypted face recognition scheme is to encrypt the facial image and send it to the cloud server, match the most similar facial image by comparing the similarity (such as the Euclidean distance between facial images), and then return the encrypted matching result to the local server. The local server needs to decrypt the matching result and verify the correctness of the matching result. This type of scheme increases the additional computing burden and time cost of the local server, and cannot achieve efficient batch facial image recognition; moreover, when the cloud server calculates the similarity of the face, it can obtain part of the face information from it. Summary of the invention
[0005] In order to overcome the deficiencies of the above-mentioned prior art, the present invention provides a method, device, equipment, medium and product for dense face recognition. An encryption method combining multiplication perturbation and orthogonal transformation is adopted, and encrypted vector inner product calculation is used instead of similarity calculation to perform face recognition matching, thereby avoiding the leakage of image information and the leakage of similarity-related information.
[0006] To achieve the above object, a first aspect of the present invention provides a method for face recognition in a dense state, which is applied to a local server, wherein the local server pre-stores a key for encrypting a face image, and the method comprises:
[0007] Obtaining an original face image set, and vectorizing each original face image therein to obtain an original feature vector;
[0008] Encrypting each original feature vector based on the key and transmitting it to a cloud server;
[0009] Obtaining a query face image to be identified from a face acquisition device, and performing vectorization to obtain a query feature vector;
[0010] Encrypting each query feature vector based on the key and transmitting it to a cloud server;
[0011] The cloud server is configured to match the query feature vector with the pre-stored original feature vector to obtain a recognition result;
[0012] Among them, the key includes a permutation matrix, a rotation matrix and a block diagonal orthogonal sparse matrix, all of which are randomly generated by a local server; encrypting the original feature vector / query feature vector includes: permuting and rotating the elements of the original feature vector / query feature vector, and using the feature vector obtained after processing as the diagonal element of the matrix for orthogonal transformation.
[0013] A second aspect of the present invention provides a secret face recognition device, the device pre-stores a key for encrypting a face image, and the device comprises:
[0014] The original image processing module is configured to obtain an original face image set, and vectorize each original face image therein to obtain an original feature vector;
[0015] An original image encryption module is configured to encrypt each original feature vector based on the key and transmit it to a cloud server;
[0016] A query image processing module is configured to obtain a query face image to be identified from a face acquisition device, and perform vectorization to obtain a query feature vector;
[0017] A query image encryption module is configured to encrypt each query feature vector based on the key and transmit it to a cloud server;
[0018] The cloud server is configured to match the query feature vector with the pre-stored original feature vector to obtain a recognition result;
[0019] Among them, the key includes a permutation matrix, a rotation matrix and a block diagonal orthogonal sparse matrix, all of which are randomly generated by a local server; encrypting the original feature vector / query feature vector includes: permuting and rotating the elements of the original feature vector / query feature vector, and using the feature vector obtained after processing as the diagonal element of the matrix for orthogonal transformation.
[0020] A third aspect of the present invention provides an electronic device, characterized in that it includes a processor and a memory, wherein the memory stores computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the described method.
[0021] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the program implements the method described when executed by a processor.
[0022] A fifth aspect of the present invention provides a computer program product comprising computer executable instructions, wherein the computer executable instructions implement the method when executed by a processor.
[0023] One or more of the above technical solutions use a combination of multiplication perturbation and orthogonal transformation to achieve encryption, without changing the vector modulus and vector inner product. The cloud server can use the encrypted vector inner product instead of similarity calculation to perform face recognition matching, avoiding the leakage of image information and similarity-related information. In addition, since the cloud server can obtain the recognition result by using the vector inner product calculation, the cloud server can directly obtain the recognition and matching result by calculating the trace of the matrix, without the need for the local server decryption and verification stage, reducing the computational burden of the local server, and can achieve efficient parallel recognition of batch face images, thereby improving the efficiency of face recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings constituting a part of the present disclosure are used to provide a further understanding of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure.
[0025] Figure 1 This is a flow chart of the interaction between the face acquisition device, the local server and the cloud server in an embodiment of the present invention;
[0026] Figure 2 Schematic diagram of the dense face recognition process in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] Based on the above content, the specific implementation process of the present invention is explained. This solution includes five parts: face image processing, key generation, original data encryption, query data encryption and result verification, and can be used in similar face recognition processes.
[0028] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as being limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not intended to limit the scope of protection of the present application.
[0029] In the description of the embodiments of the present application, the term “including” and similar terms should be understood as open inclusion, that is, “including but not limited to.” The term “based on” should be understood as “based at least in part on.”
[0030] As described in the background technology, the cloud server may be malicious and may attempt to obtain facial privacy information from encrypted facial image data or return incorrect matching results. In order to solve the above problems, one or more embodiments of the present invention provide a method and system for dense face recognition, which uses an encryption method combining multiplication perturbation and orthogonal transformation to achieve dense storage of facial image data. Since the encryption method does not change the vector modulus and vector inner product, the cloud server can use the encrypted vector inner product instead of similarity calculation to perform face recognition matching, avoiding the leakage of image information and similarity-related information.
[0031] As an example, the implementation environment of the method is as follows Figure 1 As shown, it includes a face acquisition device, a local server and a cloud server. The face acquisition device is responsible for acquiring the original face image and the query face image to be identified, and then sending the data to the local server. The local server is responsible for encrypting the original face image and sending it to the server for storage, and encrypting the query face image to be identified and sending it to the cloud server, which performs matching calculations.
[0032] The local server is configured to execute:
[0033] Step 1: Obtain a set of original face images, and vectorize each of the original face images to obtain an original feature vector;
[0034] Step 2: Encrypt each original feature vector based on the key and transmit it to the cloud server;
[0035] Step 3: Obtain the query face image to be identified from the face acquisition device, and vectorize it to obtain a query feature vector;
[0036] Step 4: Encrypt each query feature vector based on the key and transmit it to the cloud server;
[0037] The cloud server is configured to match the query feature vector with the pre-stored original feature vector to obtain a recognition result;
[0038] Among them, the key includes a permutation matrix, a rotation matrix and a block diagonal orthogonal sparse matrix, all of which are randomly generated by a local server; encrypting the original feature vector / query feature vector includes: permuting and rotating the elements of the original feature vector / query feature vector, and using the feature vector obtained after processing as the diagonal element of the matrix for orthogonal transformation.
[0039] By combining multiplication perturbation and orthogonal transformation to achieve encryption, the vector modulus and vector inner product are not changed. The cloud server can use the encrypted vector inner product instead of similarity calculation to perform face recognition matching, avoiding the leakage of image information and similarity-related information. In addition, during the encryption process, the matrix is blinded and encrypted by performing operations such as element permutation and rotation on the matrix, strengthening privacy protection, realizing encrypted storage of face images in the cloud database and privacy protection of face image queries, ensuring that the face image remains in a fully encrypted state in the subsequent recognition and matching stage.
[0040] In step 1 and step 3, vectorizing the original face image / query face image specifically includes:
[0041] Performing initial vectorization on the original face image / query face image to obtain an initial vectorized representation;
[0042] The initial vectorization is reduced to the set dimension to obtain the original feature vector / query feature vector.
[0043] Among them, reducing the dimension of the initial vectorization to the set dimension specifically includes:
[0044] Calculate the mean of the initial vectorized representations of all original face images / all query face images, calculate the mean of the initial vectorized representations of all original face images / all query face images, and process the initial vectorized representations based on mean subtraction to obtain a matrix A;
[0045] Multiplying the matrix A and its transposed matrix to obtain a covariance matrix, and performing eigenvalue decomposition on the covariance matrix to obtain a plurality of eigenvalues and their corresponding eigenvectors;
[0046] Select the n eigenvalues with the largest eigenvalues, and record their corresponding eigenvectors as the projection matrix;
[0047] The transpose of the projection matrix is multiplied by the matrix A to obtain an n-dimensional original feature vector / query feature vector.
[0048] In step 2 and step 4, before encrypting the original feature vector / query feature vector, the local server further generates a random number, and performs dimension expansion on the original feature vector / query feature vector based on the random number.
[0049] Since a new random number is generated for each encryption, the encrypted feature vector has a different representation in each encryption process, so even the same original feature vector will generate different encryption results. Even if an attacker obtains part of the encrypted data, it is difficult to infer the original feature vector through reverse engineering.
[0050] As a specific implementation, the key includes two block diagonal orthogonal sparse matrices, a permutation matrix and a non-zero vector with a determinant equal to 1;
[0051] Encrypting the original feature vector / query feature vector includes:
[0052] Based on the permutation matrix and non-zero vector, the Givens original feature vector / query feature vector is permuted and rotated.
[0053] The processed eigenvectors are used as diagonal elements of the matrix to obtain a diagonal matrix;
[0054] Generate an upper triangular matrix whose diagonal elements are all 1, and obtain the encrypted original feature vector / query feature vector through multiplication operation based on two block diagonal orthogonal sparse matrices, the upper triangular matrix and the diagonal matrix.
[0055] The cloud server matches the query feature vector with the pre-stored original feature vector specifically including: concatenating the encrypted query feature vector with the encrypted original feature vector, calculating the trace of the concatenated vector, and if the calculation result is greater than or equal to 0, the match is successful.
[0056] The following is an explanation of the face image storage stage and the face recognition stage respectively.
[0057] The local server sets the facial feature threshold θ and randomly generates two block diagonal orthogonal sparse matrices M with dimensions (n+5)×(n+5) 1 、M 2 , a permutation matrix P of dimension (n+5)×(n+5) and a non-zero vector G≡(G 1 ,G 2 ,…,G n+5 ) T .
[0058] The local server holds the key
[0059] The face image storage stage comprises the following steps:
[0060] (1) The local server obtains a set of original face images and vectorizes each of the original face images to obtain an original feature vector;
[0061] (2) Encrypting each original feature vector based on a key pre-stored in a local server and transmitting the encrypted data to a cloud server; wherein the key includes a permutation matrix, a rotation matrix, and a block diagonal orthogonal sparse matrix, which are randomly generated by a local server; encrypting each original feature vector includes: permuting and rotating each original feature vector, and using the processed feature vector as a diagonal element of the matrix for an orthogonal transformation.
[0062] The purpose of step (1) is to obtain a vector representation of the original face image, which in some embodiments specifically includes:
[0063] An original face image set is obtained, wherein the original face image set includes m original face images, and the dimension of each image is a×b; each image is preprocessed, and the preprocessing includes standardizing the geometric shape of the image, and performing histogram equalization and grayscale normalization on the image.
[0064] Perform initial vectorization on each image to obtain an initial vectorized representation. Specifically, the original face image set Each face image in is converted into a vector
[0065] Where k = ab.
[0066] The initial vectorized representation of each image is reduced to the set dimension to obtain the original feature vector.
[0067] Specifically include:
[0068] Calculate the mean of the initial vectorized representations of all original face images / all query face images, and process the initial vectorized representations based on mean subtraction to obtain A=(X 1 -μ,X 2 -μ,…,X m -μ), where represents the mean vector;
[0069] The obtained matrix is multiplied by its transposed matrix to obtain the covariance matrix, and the calculation formula of the covariance matrix is: For the covariance matrix Perform eigenvalue decomposition and obtain the eigenvalue σ 1 ,σ 2 ,…,σ k and the eigenvector μ 1 ,μ2 ,…,μ k ;
[0070] Sort the eigenvalues from large to small, and then select the first n (n<<k) eigenvalues σ i1 ,σ i2 ,…,σ in and its corresponding eigenvector μ i1 ,μ i2 ,…,μ in ;matrix It is a projection matrix composed of n eigenvectors, which can transform the original face image into the corresponding face space;
[0071] The transpose of the projection matrix is multiplied by the matrix A to obtain the n-dimensional original feature vector / query feature vector, that is, Z = W T A, each column vector Z i ∈R n×1 (1≤i≤m) represents the face image X i Projection on the face space.
[0072] In step 2, the local server further performs dimension expansion on the original feature vector based on the pre-stored random number, encrypts the expanded original feature vector, and obtains the encrypted expanded vector. As an example, the number of the random numbers is 2, and those skilled in the art can understand that other numbers of random numbers can also be generated.
[0073] In some embodiments, the step (2) specifically includes:
[0074] The local server generates random numbers β and r z , the original eigenvector Z i
[0075] Z i =(z 1 ,z 2 ,…,z n )
[0076] Expanded into (n+5)-dimensional vector Z' i :
[0077]
[0078] The local server uses the permutation matrix P and Givens rotation to blind Z' i , calculate Z″ i :
[0079]
[0080] The local server will Z″ iAs diagonal elements, construct the diagonal matrix Z:
[0081]
[0082] The local server generates an upper triangular matrix S with dimensions (n+5)×(n+5) Z , where the upper triangular elements are randomly generated and the diagonal elements are all 1. Calculate
[0083]
[0084] Then, the original data will be encrypted Sent to the cloud server.
[0085] The face recognition stage includes the following steps:
[0086] (3) The local server obtains the query face image from the face acquisition device and performs vectorization in the same manner as step (1) to obtain a query feature vector;
[0087] (4) Encrypting each query feature vector based on the key pre-stored in the local server and transmitting it to the cloud server; the encryption process is the same as step (2);
[0088] (5) The cloud server matches the query feature vector with the pre-stored original feature vector to obtain the recognition result.
[0089] In step (3), the query face image is one or more images, the number of which is denoted as q, and each query face image is denoted as Among them, 1≤j≤q, after preliminary processing, it is sent to the local server. The local server will pre-process and initially vectorize the query face image in turn, and then obtain the query feature vector through dimensionality reduction processing The query feature vector represents the projection of each query face image on the face space. The specific process is the same as step (1) and will not be repeated here. Among them, by calculating the mean of the initial vectorized representations of all query face images, the initial vectorized representation is processed based on mean subtraction, so that when a large number of face images to be queried are received by the local server at the same time, pre-processing can be performed quickly, which is particularly suitable for scenes with large traffic flow and identity recognition needs such as stations.
[0090] In step (4), the local server also generates a new random number, performs dimension expansion on the original feature vector, and encrypts the expanded original feature vector. As an example, the number of the random numbers is 2. Specifically, step (4) includes:
[0091] The local server generates random numbers α and r h, query feature vector H j
[0092] H j =(h 1 ,h 2 ,…,h n )
[0093] Expanded into (n+5)-dimensional vector H′ j :
[0094]
[0095] The local server uses the permutation matrix P and Givens rotation blinding H' j , calculate H' j ':
[0096]
[0097] The local server will H″ j As diagonal elements, construct the diagonal matrix H:
[0098]
[0099] The local server generates an upper triangular matrix S with dimensions (n+5)×(n+5) H , where the upper triangular elements are randomly generated and the diagonal elements are all 1. Calculate
[0100]
[0101] Then, the encrypted query data Sent to the cloud server.
[0102] In step (5), the cloud server identifies and matches the query face image and the original face image in sequence. Specifically, a single original face image X i and a single query face image M j The matching calculation formula is as follows:
[0103]
[0104] Where Tr(·) represents the trace of the matrix. If I i ≥0, the cloud server assigns ε=1, which means the original face image X i and query face image M j The match is successful; otherwise ε=0.
[0105] The derivation and verification process of the matching calculation formula is as follows:
[0106] The cloud server sends q query face images M j Sequentially with m original face images X i Perform identification and matching. is the original eigenvector Z i and the query feature vector H j The square of the Euclidean distance between the face features is θ, and the cloud server compares With θ 2 The relationship between faces is used for face image recognition and matching.
[0107]
[0108] in, Represents Z i and H j The inner product of .
[0109] The database of the cloud server pre-stores each encrypted raw data Receive encrypted query data Then perform matching calculation:
[0110]
[0111] Where Tr(·) represents the trace of the matrix.
[0112] Depend on
[0113]
[0114] Available
[0115]
[0116] Therefore, if and only if I i ≥0, Considered as the query face image M j and the original face image X i If the match is successful, the cloud server assigns ε = 1. Otherwise, it assigns ε = 0.
[0117] The cloud server outputs q query face images M j With m original face images X i All matches of are assigned ε and the matching results are returned to the local server.
[0118] One or more embodiments of the present invention further provide a secret face recognition device, wherein the device pre-stores a key for encrypting a face image, and the device comprises:
[0119] The original image processing module is configured to obtain an original face image set, and vectorize each original face image therein to obtain an original feature vector;
[0120] An original image encryption module is configured to encrypt each original feature vector based on the key and transmit it to a cloud server;
[0121] A query image processing module is configured to obtain a query face image to be identified from a face acquisition device, and perform vectorization to obtain a query feature vector;
[0122] A query image encryption module is configured to encrypt each query feature vector based on the key and transmit it to a cloud server;
[0123] The cloud server is configured to match the query feature vector with the pre-stored original feature vector to obtain a recognition result;
[0124] Among them, the key includes a permutation matrix, a rotation matrix and a block diagonal orthogonal sparse matrix, all of which are randomly generated by a local server; encrypting the original feature vector / query feature vector includes: permuting and rotating the elements of the original feature vector / query feature vector, and using the feature vector obtained after processing as the diagonal element of the matrix for orthogonal transformation.
[0125] One or more embodiments of the present invention further provide an electronic device that can be used to implement the dense face recognition method in the above embodiments. The electronic device includes one or more processors, one or more memories coupled to the processors, and a communication module coupled to the processors.
[0126] The memory may include one or more non-volatile memories and one or more volatile memories. Examples of non-volatile memories include, but are not limited to, at least one of the following: read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, hard disk, compact disc (CD), digital video disc (DVD) or other magnetic storage and / or optical storage. Examples of volatile memories include, but are not limited to, at least one of the following: random access memory (RAM), or other volatile memory that does not last during the power outage duration. The computer program may be stored in the ROM. The processor implements the above-mentioned dense face recognition method when executing the computer program.
[0127] In some embodiments, the program may be tangibly embodied in a computer-readable medium, which may be included in the device (such as in the memory) or other storage devices accessible by the device. The program can be loaded from the computer-readable medium into the RAM for execution. The computer-readable medium may include any type of tangible non-volatile memory, such as ROM, EPROM, flash memory, hard disk. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned encrypted face recognition method is implemented.
[0128] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a server or a terminal, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wire (such as coaxial optical cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium accessible by the server or the terminal, or a data storage device such as a server or a data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as floppy disk, hard disk and magnetic tape, etc.), an optical medium (such as digital video disk (DVD), etc.), or a semiconductor medium (such as solid state drive, etc.).
[0129] In addition, although the operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations should be performed to achieve the desired result. In certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although a number of specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present application. Certain features described in the context of separate embodiments may also be implemented in combination in a single implementation. Conversely, the various features described in the context of a single implementation may also be implemented separately or in any suitable sub-combination in multiple implementations.
[0130] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A dense face recognition method, applied to a local server, characterized in that: The local server pre-stores a key for encrypting a face image, and the method includes: Obtaining an original face image set, and vectorizing each original face image therein to obtain an original feature vector; Encrypting each original feature vector based on the key and transmitting it to a cloud server; Obtaining a query face image to be identified from a face acquisition device, and performing vectorization to obtain a query feature vector; Encrypting each query feature vector based on the key and transmitting it to a cloud server; The cloud server is configured to match the query feature vector with the pre-stored original feature vector to obtain a recognition result; The key includes a permutation matrix, a rotation matrix and a block diagonal orthogonal sparse matrix, all of which are randomly generated by a local server; encrypting the original feature vector / query feature vector includes: performing element permutation and rotation on the original feature vector / query feature vector, and using the feature vector obtained after the processing as the diagonal element of the matrix to perform an orthogonal transformation; The key consists of two block diagonal orthogonal sparse matrices, a permutation matrix and a determinant equal to A non-zero vector of ; Encrypting the original feature vector / query feature vector includes: Based on the permutation matrix and non-zero vector, the Givens original feature vector / query feature vector is permuted and rotated. The processed eigenvectors are used as diagonal elements of the matrix to obtain a diagonal matrix; Generate an upper triangular matrix whose diagonal elements are all 1, and obtain the encrypted original feature vector / query feature vector through multiplication operation based on two block diagonal orthogonal sparse matrices, the upper triangular matrix and the diagonal matrix.
2. The dense face recognition method according to claim 1, characterized in that: Vectorizing the original face image / query face image specifically includes: Performing initial vectorization on the original face image / query face image to obtain an initial vectorized representation; The initial vectorization is reduced to the set dimension to obtain the original feature vector / query feature vector.
3. The dense face recognition method according to claim 2, characterized in that: Reducing the initial vectorization to the set dimension specifically includes: Calculate the mean of the initial vectorized representations of all original face images / all query face images, and process the initial vectorized representations based on mean subtraction to obtain a matrix A; Multiplying the matrix A and its transposed matrix to obtain a covariance matrix, and performing eigenvalue decomposition on the covariance matrix to obtain a plurality of eigenvalues and their corresponding eigenvectors; Select the n eigenvalues with the largest eigenvalues, and record their corresponding eigenvectors as the projection matrix; The transpose of the projection matrix is multiplied by the matrix A to obtain an n-dimensional original feature vector / query feature vector.
4. The dense face recognition method according to claim 1, characterized in that: Before encrypting the original feature vector / query feature vector, the local server further generates a random number, and performs dimension expansion on the original feature vector / query feature vector based on the random number.
5. The dense face recognition method according to any one of claims 1 to 4, characterized in that: Matching the query feature vector with the pre-stored original feature vector specifically includes: concatenating the encrypted query feature vector with the encrypted original feature vector, calculating the trace of the concatenated vector, and if the calculation result is greater than or equal to 0, the match is successful.
6. A dense face recognition device, characterized in that: The device pre-stores a key for encrypting a face image, and the device comprises: The original image processing module is configured to obtain an original face image set, and vectorize each original face image therein to obtain an original feature vector; An original image encryption module is configured to encrypt each original feature vector based on the key and transmit it to a cloud server; A query image processing module is configured to obtain a query face image to be identified from a face acquisition device, and perform vectorization to obtain a query feature vector; A query image encryption module is configured to encrypt each query feature vector based on the key and transmit it to a cloud server; The cloud server is configured to match the query feature vector with the pre-stored original feature vector to obtain a recognition result; The key includes a permutation matrix, a rotation matrix and a block diagonal orthogonal sparse matrix, all of which are randomly generated by a local server; encrypting the original feature vector / query feature vector includes: performing element permutation and rotation on the original feature vector / query feature vector, and using the feature vector obtained after the processing as the diagonal element of the matrix to perform an orthogonal transformation; The key consists of two block diagonal orthogonal sparse matrices, a permutation matrix and a determinant equal to A non-zero vector of ; Encrypting the original feature vector / query feature vector includes: Based on the permutation matrix and non-zero vector, the Givens original feature vector / query feature vector is permuted and rotated. The processed eigenvectors are used as diagonal elements of the matrix to obtain a diagonal matrix; Generate an upper triangular matrix whose diagonal elements are all 1, and obtain the encrypted original feature vector / query feature vector through multiplication operation based on two block diagonal orthogonal sparse matrices, the upper triangular matrix and the diagonal matrix.
7. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method according to any one of claims 1 to 5.
9. A computer program product comprising computer executable instructions, characterized in that: The computer executable instructions implement the method according to any one of claims 1 to 5 when executed by a processor.
Citation Information
Patent Citations
Method for generating key based on amalgamation of multiple features in encryption area
CN101674299A
Face recognition method based on privacy protection, electronic equipment and storage medium
CN115424334A