A method and device for matching encrypted face features

By using the encrypted face feature matching method in the face recognition system, the feature encryption vector is generated and the transformation matrix is ​​calculated, which solves the problem of recreating the feature library when replacing the face recognition algorithm, which improves work efficiency and ensures the substitutability of the algorithm.

CN114792435BActive Publication Date: 2025-05-27SHANGHAI YITU NETWORK SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110017521.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-07
Publication Date
2025-05-27
Estimated Expiration
2041-01-07

AI Technical Summary

Technical Problem

In the case where face images are not stored, the prior art requires re-convening relevant personnel for feature recognition when replacing the face recognition algorithm, and re-creating the encrypted face feature library, which is inefficient and time-consuming.

Method used

A method for matching face features after encryption is proposed. By obtaining the first face feature, a feature encryption vector is generated, and a transformation matrix is ​​calculated to process the vector dot product between the feature encryption vector and the encryption vector to be matched, and the encrypted vector to be matched is filtered out.

Benefits of technology

It realizes matching operations based on the encrypted face features without storing face images, avoiding the need to recreate feature encryption vector library, improving work efficiency, ensuring the substitutability of feature extraction algorithms, and reducing labor and material costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114792435B_ABST
    Figure CN114792435B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of data processing technology, and in particular to a matching method and device for encrypted facial features, which solves the problem that when a facial recognition algorithm is replaced without storing a facial image, it is necessary to reconvene relevant personnel for feature recognition and recreate an encrypted facial feature library, which is inefficient and time-consuming. The method is to obtain a first facial feature of an object to be identified, generate a feature encryption vector corresponding to the first facial feature, and then determine the conversion matrix between the feature encryption vector and each stored encrypted vector to be matched, and calculate and select the encrypted vector to be matched corresponding to the largest vector dot product as the matching vector result. In this way, based on the vector dot product between the converted feature encryption vector and each stored encrypted vector to be matched, it is possible to determine the vector result that matches the object to be identified in each stored encrypted vector to be matched, thereby realizing a matching operation based on the encrypted facial feature.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a matching method and device for encrypted facial features. Background Art

[0002] With the continuous development of face recognition technology, there are more and more types of face recognition algorithms, and different face recognition algorithms are incompatible.

[0003] At present, when most companies use a facial recognition algorithm, they need to gather relevant personnel and use the facial recognition algorithm to extract facial features of the relevant personnel to form a facial feature library. Subsequently, when performing facial recognition, the facial features of the user to be identified are compared with the facial features in the facial feature library to determine the identity of the user to be identified.

[0004] However, without storing facial images to protect the privacy of relevant personnel, when an enterprise wants to switch to another facial recognition algorithm, it needs to re-convene the relevant personnel and use another facial recognition algorithm to extract facial features of the relevant personnel to form a new facial feature library. In addition, in order to protect the recognition content of different companies' algorithms from being leaked, the facial features are usually stored in encrypted form in the facial feature library. This is time-consuming and labor-intensive, and is not conducive to the free switching of facial recognition algorithms. Summary of the invention

[0005] The disclosed embodiments provide a method and device for matching encrypted facial features, so as to solve the problem in the prior art that when the facial recognition algorithm is replaced without storing facial images, it is necessary to reconvene relevant personnel for feature recognition and recreate the encrypted facial feature library, which results in low work efficiency and is time-consuming and labor-intensive.

[0006] The specific technical solutions provided by the embodiments of the present disclosure are as follows:

[0007] In the first aspect, a matching method for encrypted facial features is proposed, comprising:

[0008] Acquire a first facial feature obtained after extracting facial features of an object to be identified using a first feature extraction algorithm;

[0009] Generate a feature encryption vector corresponding to the first face feature according to a dot product result of the first face feature and each first encryption vector in a saved first encryption matrix, wherein the first encryption matrix includes N first encryption vectors obtained after feature extraction of N image samples using the first feature extraction algorithm;

[0010] Determine the transformation matrix between the feature encryption vector and each saved encryption vector to be matched, and calculate the dot product between the feature encryption vector processed by the transformation matrix and each encryption vector to be matched, where the encryption vector to be matched is generated based on the dot product results between the target face features extracted by the target feature extraction algorithm and each second encryption vector in the second encryption matrix, and the second encryption matrix includes N second encryption vectors extracted from the N image samples by using the target feature extraction algorithm;

[0011] Select the encryption vector to be matched corresponding to the largest dot product, and use the selected encryption vector to be matched as the vector result matched by the object to be recognized.

[0012] Optionally, the obtaining of the first face feature obtained by performing face feature extraction on the object to be recognized by using the first feature extraction algorithm includes:

[0013] Obtain the first face feature of the object to be recognized sent by the acquisition terminal, where the first face feature is obtained by the acquisition terminal using the first feature extraction algorithm to perform feature extraction on the object to be recognized; or,

[0014] Receive the face image of the object to be recognized collected by the acquisition terminal, perform feature extraction on the face image by using the first feature extraction algorithm to obtain the corresponding first face feature, and delete the face image.

[0015] Optionally, the generating of the feature encryption vector corresponding to the first face feature according to the dot product results between the first face feature and each first encryption vector in the saved first encryption matrix includes:

[0016] Obtain the saved first encryption matrix, and sequentially calculate the dot product results between each first encryption vector in the first encryption matrix and the first face feature;

[0017] Determine the relative positions of the first encryption vectors in the first encryption matrix, and generate the feature encryption vector corresponding to the first face feature after arranging the corresponding dot product results according to the relative positions.

[0018] Optionally, the determining of the transformation matrix between the feature encryption vector and each saved encryption vector to be matched includes:

[0019] Determine the dot product result of the face features extracted by the target feature extraction algorithm and the target face features corresponding to the saved encrypted vectors to be matched according to the correspondence between the feature encrypted vectors and the first face features, the correspondence between the encrypted vectors to be matched and the target face features extracted by using the target feature extraction algorithm, and the set correspondence between the face features extracted by the first feature extraction algorithm and the face features extracted by the target feature extraction algorithm;

[0020] Determine the transformation matrix between the feature encrypted vector and the encrypted vector to be matched according to the combination relationship between the feature encrypted vector and the encrypted vector to be matched included in the feature dot product result.

[0021] Optionally, after using the screened encrypted vector to be matched as the vector result for matching the object to be recognized, it further includes:

[0022] Obtain the identity information associated with the screened encrypted vector to be matched, and use the identity information as the information corresponding to the object to be recognized.

[0023] In a second aspect, a matching device for encrypted face features is proposed, including:

[0024] An acquisition unit that acquires the first face features obtained after performing face feature extraction on the object to be recognized by using the first feature extraction algorithm;

[0025] A generation unit that generates a feature encrypted vector corresponding to the first face features according to the dot product result of the first face features and each first encrypted vector in the saved first encryption matrix, where the first encryption matrix includes N first encrypted vectors obtained after performing feature extraction on N image samples by using the first feature extraction algorithm;

[0026] A determination unit that determines the transformation matrix between the feature encrypted vector and each saved encrypted vector to be matched, and calculates the vector dot product between the feature encrypted vector processed by using the transformation matrix and each encrypted vector to be matched, where the encrypted vector to be matched is generated according to the dot product result between the target face features extracted by using the target feature extraction algorithm and each second encrypted vector in the second encryption matrix, and the second encryption matrix includes N second encrypted vectors extracted from the N image samples by using the target feature extraction algorithm;

[0027] A screening unit that screens out the encrypted vector to be matched corresponding to the largest vector dot product, and uses the screened encrypted vector to be matched as the vector result for matching the object to be recognized.

[0028] Optionally, when obtaining the first facial feature of the object to be recognized by using a first feature extraction algorithm, the obtaining unit is specifically configured to:

[0029] Obtain the first facial feature of the object to be recognized sent by the acquisition terminal, where the first facial feature is obtained by the acquisition terminal using a first feature extraction algorithm to perform feature extraction on the object to be recognized; or,

[0030] Receive the facial image of the object to be recognized collected by the acquisition terminal, use a first feature extraction algorithm to perform feature extraction on the facial image to obtain the corresponding first facial feature, and delete the facial image.

[0031] Optionally, when generating a feature encryption vector corresponding to the first facial feature according to the dot product results of the first facial feature and each first encryption vector in the saved first encryption matrix, the generating unit is specifically configured to:

[0032] Obtain the saved first encryption matrix, and sequentially calculate the dot product results between each first encryption vector in the first encryption matrix and the first facial feature;

[0033] Determine the relative positions of the first encryption vectors in the first encryption matrix, and generate a feature encryption vector corresponding to the first facial feature after arranging the corresponding dot product results according to the relative positions.

[0034] Optionally, when determining the transformation matrix between the feature encryption vector and each saved encryption vector to be matched, the determining unit is specifically configured to:

[0035] According to the correspondence between the feature encryption vector and the first facial feature, the correspondence between the encryption vector to be matched and the target facial feature extracted by using a target feature extraction algorithm, and the set correspondence between the facial feature extracted by using the first feature extraction algorithm and the facial feature extracted by using the target feature extraction algorithm, determine the feature dot product result between the facial feature extracted by using the target feature extraction algorithm and the target facial feature corresponding to the saved encryption vector to be matched;

[0036] According to the combination relationship between the feature encryption vector and the encryption vector to be matched included in the feature dot product result, determine the transformation matrix between the feature encryption vector and the encryption vector to be matched.

[0037] Optionally, after using the screened encryption vector to be matched as the vector result for matching the object to be recognized, the screening unit is further configured to:

[0038] Obtain the identity information associated with the to-be-matched encrypted vector that has been filtered out, and use the identity information as the information corresponding to the to-be-identified object.

[0039] In a third aspect, an electronic device is proposed, including:

[0040] A memory for storing executable instructions;

[0041] A processor for reading and executing the executable instructions stored in the memory to implement the method for matching encrypted face features described in any one of the above first aspects.

[0042] In a fourth aspect, a computer-readable storage medium is proposed. When the instructions in the storage medium are executed by an electronic device, the electronic device can execute the method for matching encrypted face features described in any one of the above first aspects.

[0043] The beneficial effects of the present disclosure are as follows:

[0044] In an embodiment of the present disclosure, after obtaining the first face feature obtained by performing face feature extraction on an object to be recognized using a first feature extraction algorithm, a feature encryption vector corresponding to the first face feature is generated according to the dot product results between the first face feature and each first encryption vector in a saved first encryption matrix, where the first encryption matrix includes N first encryption vectors obtained by performing feature extraction on N image samples using the first feature extraction algorithm. Then, a transformation matrix between the feature encryption vector and each saved encryption vector to be matched is determined, and the dot product between the feature encryption vector processed by the transformation matrix and each encryption vector to be matched is calculated, where the encryption vector to be matched is the dot product result between a target face feature extracted using a target feature extraction algorithm and N target encryption vectors extracted from the N image samples using the target feature extraction algorithm. Then, the encryption vector to be matched corresponding to the largest dot product is selected, and the selected encryption vector to be matched is used as the vector result matched with the object to be recognized. In this way, in the case where no face image is saved, after encrypting the first face feature extracted using the first extraction algorithm into a feature encryption vector, based on the dot product between the transformed feature encryption vector and each saved encryption vector to be matched, it is possible to determine the vector result matched with the object to be recognized among each saved encryption vector to be matched, realizing the matching operation based on the encrypted face feature. That is to say, when using the first feature extraction algorithm to replace the target feature extraction algorithm, it is possible to complete the matching of face features based on the feature encryption vector generated by the first feature extraction algorithm and each saved encryption feature to be matched based on the target feature extraction algorithm, thereby eliminating the need to recreate a feature encryption vector library for the first feature extraction algorithm, improving work efficiency, ensuring the replaceability of the feature extraction algorithm, and avoiding additional human and material costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is a schematic flowchart of the matching of encrypted face features in an embodiment of the present disclosure;

[0046] Figure 2 It is a schematic structural diagram of a face recognition system in an embodiment of the present disclosure;

[0047] Figure 3 It is a schematic logical structure diagram of a device for matching encrypted face features in an embodiment of the present disclosure;

[0048] Figure 4 It is a schematic physical structure diagram of a device for matching encrypted face features in an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0049] To make the objectives, technical solutions and beneficial effects of the present disclosure clearer and more understandable, the present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not used to limit the present disclosure.

[0050] Those skilled in the art know that the implementation manners of the present disclosure can be realized as a system, a device, equipment, a method or a computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0051] To solve the problem in the prior art that when there is no stored face image, when replacing the face recognition algorithm, it is necessary to reconvene relevant personnel for feature recognition and recreate the encrypted face feature library, which is inefficient and time-consuming, the present disclosure proposes a method and device for matching encrypted face features. After obtaining the first face feature obtained by performing face feature extraction on the object to be recognized using the first feature extraction algorithm, a feature encryption vector corresponding to the first face feature is generated according to the dot product results of the first face feature and each first encryption vector in the saved first encryption matrix, where the first encryption matrix includes N first encryption vectors obtained by performing feature extraction on N image samples using the first feature extraction algorithm. Then, a transformation matrix between the feature encryption vector and each saved encryption vector to be matched is determined, and the dot product of the feature encryption vector processed by the transformation matrix and each encryption vector to be matched is calculated, where the encryption vector to be matched is the dot product result between the target face feature extracted using the target feature extraction algorithm and N target encryption vectors extracted from the N image samples using the target feature extraction algorithm. Then, the encryption vector to be matched corresponding to the largest vector dot product is selected, and the selected encryption vector to be matched is used as the vector result matched with the object to be recognized.

[0052] The following will further describe in detail the preferred implementation manners of the embodiments of the present disclosure with reference to the accompanying drawings:

[0053] Refer to Figure 1 , which is a schematic diagram of the matching process of encrypted face features in the embodiments of the present disclosure. The following will describe in detail the process of the processing device performing matching operations on encrypted face features with reference to the accompanying Figure 1 drawings.

[0054] Step 101: Obtain the first face feature obtained by performing face feature extraction on the object to be recognized using the first feature extraction algorithm.

[0055] Specifically, the processing device obtains the first face feature extracted after processing the object to be recognized using the first feature extraction algorithm. Among them, the processing device can obtain the first face feature by using any one of the following processing methods, including but not limited to: the first face feature can be represented in the form of a vector. For example, it can be an n-dimensional row vector, or it can be an n-dimensional column vector. n is a positive integer, and the value of n and the vector form of the first face feature are determined according to actual configuration requirements.

[0056] Method 1: Obtain the first face feature of the object to be recognized sent by the acquisition terminal.

[0057] Specifically, obtain the first face feature of the object to be recognized sent by the acquisition terminal. Among them, the first face feature is obtained by the acquisition terminal using the first feature extraction algorithm to extract features from the object to be recognized.

[0058] That is to say, in the implementation method of Method 1, the processing device is associated with the acquisition terminal for use. The acquisition terminal uses the first feature extraction algorithm to extract features from the object to be recognized to obtain the first face feature. That is, the processing device directly obtains the first face feature of the object to be recognized extracted by the acquisition terminal.

[0059] For example, assume that the acquisition terminal is the turnstile at the entrance of a company. When an employee of the company intends to pass through the turnstile, the turnstile, as the acquisition terminal, uses the first feature extraction algorithm to extract the corresponding first face feature based on the face of the company employee appearing in the recognition area, and sends the first face feature to the processing device.

[0060] Method 2: Receive the face image of the object to be recognized collected by the acquisition terminal, use the first feature extraction algorithm to extract features from the face image to obtain the corresponding first face feature, and delete the face image.

[0061] Specifically, the processing device receives the face image of the object to be recognized collected by the acquisition terminal, uses the first feature extraction algorithm to extract features from the face image to obtain the corresponding first face feature, and deletes the face image after the feature extraction is completed.

[0062] That is to say, in the implementation method of Method 2, the processing device receives the face image collected by the acquisition terminal, uses the first feature extraction algorithm to extract the first face feature from the face image. Furthermore, to protect the biological information privacy of the object to be recognized, the obtained face image of the object to be recognized is deleted.

[0063] For example, assuming that the collection terminal is a gate at the entrance and exit of a company, when a company employee intends to pass through the gate, the gate acts as a collection terminal to collect the facial image of the company employee appearing in the identification area, and sends the facial image to a processing device. The processing device uses a first feature extraction algorithm to extract the corresponding first facial feature from the facial image and deletes the facial image.

[0064] Step 102: Generate a feature encryption vector corresponding to the first facial feature according to the dot product result of the first facial feature and each first encryption vector in the stored first encryption matrix.

[0065] The processing device obtains the first facial feature obtained by extracting facial features of an object to be identified using a first feature recognition algorithm, and then generates a feature encryption vector corresponding to the first facial feature based on the dot product result of the first facial feature and each first encrypted vector in a saved first encryption matrix, wherein the first encryption matrix includes N first encrypted vectors obtained after feature extraction of N image samples using the first feature extraction algorithm.

[0066] Specifically, after the processing device obtains the first facial feature, it obtains the saved first encryption matrix, and calculates the dot product results between each first encryption vector in the first encryption matrix and the first facial feature in turn, and then determines the relative positions of the each first encryption vector in the first encryption matrix, and arranges the corresponding dot product results according to the relative positions, and then generates a feature encryption vector corresponding to the first facial feature.

[0067] It should be noted that, in the embodiment of the present disclosure, the first encryption matrix saved by the processing device is generated after feature extraction is performed on N image samples using the first feature extraction algorithm. The processing device extracts facial features from each image sample using the first feature extraction algorithm, and then generates a first encryption matrix based on the N facial features extracted from the N image samples, wherein the N image samples are fixedly set. The present disclosure does not limit the source of the N image samples, which may be images provided in the usage specification of the first feature extraction algorithm, or images provided in the usage specification of the target feature extraction algorithm, or images configured by themselves.

[0068] For example, assume that when using the first feature extraction algorithm for feature extraction, a 1*n row vector is obtained. Then, the first encryption matrix is a matrix composed of N 1*n vectors, and the dimension of the matrix is N*n. Assume that when using the first feature extraction algorithm for feature extraction, a n*1 column vector is obtained. Then, the first encryption matrix is a matrix composed of N n*1 vectors, and the dimension of the matrix is n*N. The finally obtained feature encryption vector is used to represent the dot product result between the vector obtained after feature extraction and each vector included in the first encryption matrix.

[0069] It should be noted that in the embodiments of the present disclosure, assume that the dimension of the face features extracted by using the first feature extraction algorithm is 1*n, and the dimension of the face features extracted by using the target feature extraction algorithm is 1*m. Then, there is no necessary connection between the values of n and m, and the values of n and m are set according to actual processing needs. In some embodiments, the values of n and m may be the same, and in some other embodiments, the values of n and m may be different. The present disclosure does not make excessive limitations here. In the following formula derivations of the present disclosure, only the case where the vector extracted by the first feature extraction algorithm is in the form of a column vector is taken as an example for illustrative derivation and explanation.

[0070] During specific implementation, the feature encryption vector corresponding to the first face feature can be obtained as shown in Formula 1.1 below:

[0071]

[0072] where is the processed feature encryption vector, is the face feature obtained after using the first feature extraction algorithm for feature extraction, and A b is the created first encryption matrix.

[0073] It should be noted that for the created first encryption matrix A b , when the N image samples are fixed, the first encryption matrix A b can be regarded as a known matrix. In actual use, is the first face feature extracted from the object to be recognized by using the first feature extraction algorithm.

[0074] In this way, with the help of the first encryption matrix, it is equivalent to encrypting the extracted face features, so that in the subsequent matching process, the directly extracted face features are not used for matching, which protects the feature content extracted by the first feature extraction algorithm from being disclosed to a certain extent.

[0075] Step 103: Determine the transformation matrix between the feature encryption vector and each of the saved encryption vectors to be matched, and calculate the dot product of the feature encryption vector processed by the transformation matrix and each of the encryption vectors to be matched.

[0076] After the processing device encrypts the first face feature extracted from the object to be recognized by using the first feature extraction algorithm to generate a feature encryption vector, it determines the transformation matrix between the feature encryption vector and each of the saved encryption vectors to be matched. Among them, the encryption vector to be matched is generated according to the dot product result between the target face feature extracted by the target feature extraction algorithm and each of the second encryption vectors in the second encryption matrix. The second encryption matrix includes N second encryption vectors extracted from the N image samples by using the target feature extraction algorithm. The encryption vector to be matched is obtained by encrypting the face features of each registered object by using the same type of encryption method after the face features are extracted by using the target feature extraction algorithm.

[0077] Specifically, when determining the transformation matrix, the processing device determines the dot product result of the face feature extracted by using the target feature extraction algorithm and the target face feature corresponding to the saved encryption vector to be matched according to the correspondence between the feature encryption vector and the first face feature, the correspondence between the encryption vector to be matched and the target face feature extracted by using the target feature extraction algorithm, and the set correspondence between the face feature extracted by using the first feature extraction algorithm and the face feature extracted by using the target feature extraction algorithm. Then, according to the combination relationship between the feature encryption vector and the encryption vector to be matched included in the dot product result, the processing device determines the transformation matrix between the feature encryption vector and the encryption vector to be matched.

[0078] In specific implementation, the processing device first determines the correspondence between the first face feature extracted by using the first feature extraction algorithm and the corresponding feature encryption vector, and the correspondence between the target face feature extracted by using the target feature extraction algorithm and the saved encryption vector to be matched, which can be specifically represented by formula 1.1 above and formula 2.1 below:

[0079]

[0080] Among them, is the encryption vector to be matched, is the face feature obtained after feature extraction by using the target feature extraction algorithm, A a is the second encryption matrix generated based on the N face features extracted from the N image samples after the N image samples are subjected to feature extraction by using the target feature extraction algorithm.

[0081] It should be noted that the so-called encryption process in the present disclosure is essentially to calculate the distance between the extracted face features and each first encryption vector in the set first encryption matrix, that is, to calculate the dot product between vectors.

[0082] Meanwhile, the processing device establishes the corresponding relationship between the face features extracted by using the first feature extraction algorithm and the face features extracted by using the target feature extraction algorithm, which can be specifically as described in the following

[0083] Equation 3, Equation 4.1, and Equation 5 represent:

[0084]

[0085] QA b ≈A a (Equation 4.1)

[0086]

[0087] Specifically, the matrix Q is an assumed matrix that can convert the face features directly saved after being extracted by the first feature extraction algorithm: into the face features directly saved after being extracted by the target feature extraction algorithm Based on the same corresponding relationship, the matrix Q can make the first encryption matrix: A b be converted into the second encryption matrix generated after being extracted by the target feature extraction algorithm: A a The matrix Q can make the face features extracted by the first feature extraction algorithm: be converted into the face features extracted by the target feature extraction algorithm:

[0088] Furthermore, the processing device determines the feature dot product result between the face features extracted by using the target feature extraction algorithm and the target face features corresponding to the saved encrypted vectors to be matched based on the above corresponding relationships, and then determines the conversion matrix between the feature encrypted vector and the encrypted vector to be matched according to the combination relationship between the feature encrypted vector and the encrypted vector to be matched included in the feature dot product result.

[0089] The following describes the process of determining the feature dot product result between the face features extracted by using the target feature extraction algorithm and the target face features corresponding to the saved encrypted vectors to be matched by using the above corresponding relationships in the embodiments of the present disclosure:

[0090] It should be noted that in the embodiments of the present disclosure, solving the dot product result of the face features extracted by the target feature extraction algorithm and the target face features corresponding to the encrypted vectors to be matched saved is equivalent to solving the dot product result of the face features extracted by the target feature extraction algorithm and the target face features directly extracted by each saved target feature algorithm. As is well known, the dot product result of vectors can represent the similarity between vectors while representing the distance between vectors. Therefore, calculating the dot product result of the features is equivalent to solving the similarity between the feature vectors recognized by the target feature extraction algorithm and the target feature vectors of each registered object. Among them, the larger the dot product result of the features, the greater the similarity between the feature vectors.

[0091] In the derivation process, first establish the dot product result of the face features extracted by the target feature extraction algorithm and the target face features corresponding to the encrypted vectors to be matched saved as shown in Formula 6.1 below:

[0092]

[0093] Wherein, represents the face features extracted by the target feature extraction algorithm, represents the target face features directly saved after being extracted by the target feature extraction algorithm. That is to say, is equivalent to the features uniformly saved after the target feature extraction algorithm extracts the features of each registered object.

[0094] It should be noted that in the embodiments of the present disclosure, the encrypted face features are used for the matching operation, and the saved face features are also encrypted. The content shown in Formula 6.1 here is only the assumed feature relationship for the purpose of derivation, in order to represent that based on the content shown in the current Formula 6.1, the matching of face features can be achieved.

[0095] After replacing in Formula 6.1 with the representation form shown in Formula , Formula 6.1 can be sorted out as the content shown in Formula 6.2 below:

[0096]

[0097] At the same time, based on Formula 4.1: QA b ≈ A a shown, Q can be represented as the content shown in Formula 4.2 below:

[0098]

[0099] It should be noted that for is the generalized inverse of matrix A b , so it is not required that matrix A b is a square matrix.

[0100] Furthermore, after replacing Q represented by Formula 4.2 with Q in Formula 6.2, the content shown in Formula 6.3 can be obtained:

[0101]

[0102] Based on the above Formula 6.3, according to the conversion relationship between the dot product of vectors and transpose, the dot product form in Formula 6.3 can be transformed into the matrix product form shown in 6.4:

[0103]

[0104] Further, based on Formula 6.4, by decomposing and combining the transpose form, the conversion form shown in the following Formula 6.5 can be transformed:

[0105]

[0106] Further, based on Formula 6.5, after inversely converting the matrix product form of the above formula into the dot product form, the representation form shown in Formula 6.6 can be obtained:

[0107]

[0108] When converting the vector dot product form shown in Formula 2.1 into the matrix multiplication form, Formula 2.1 can be transformed into the form shown in the following Formula 2.2:

[0109]

[0110] It should be noted that in the embodiments of the present disclosure, is a one-dimensional vector, specifically represented by a row vector or a column vector, and the present disclosure does not make excessive limitations. In particular, in some cases, it can be adaptively represented in the form of a row vector or a column vector.

[0111] After replacing part of the content in the above Formula 6.6 with Formula 2.2, the content shown in the following Formula 6.7 can be obtained:

[0112]

[0113] Also, because is an identity matrix, then after introducing the identity matrix into Formula 6.7, the content shown in Formula 6.8 can be obtained as follows:

[0114]

[0115] Furthermore, when converting the form of the vector dot product shown in Formula 1.1 into the form of a matrix product, Formula 1.1 can be transformed into the form shown in the following Formula 1.2:

[0116]

[0117] Therefore, after replacing the corresponding part in the above Formula 6.8 with the content of Formula 1.2, the content shown in Formula 6.9 can be obtained as follows:

[0118]

[0119] Furthermore, according to the content shown in Formula 4.2, it can be disassembled into to obtain the corresponding schematic formula as the content shown in Formula 4.3:

[0120]

[0121]

[0122] Therefore, after replacing part of the content in Formula 6.9 with the content shown in Formula 4.3, a representation form such as Formula 6.10 can be obtained as follows:

[0123]

[0124] Since in Formula 6.10, Therefore, Formula 6.10 can be organized into the content shown in the form of Formula 6.11:

[0125]

[0126] For Formula 6.11, can be schematically used as a transformation matrix, and the transformation matrix can be symbolically represented as being used to perform a transformation process on the feature encryption vector, so that by calculating the vector dot product between the transformed feature encryption vector and the encrypted vector to be matched, the similarity matching between the extracted feature and each saved feature can be realized.

[0127] In this way, it is possible to derive the dot product result of the feature points between the face features extracted by the target feature extraction algorithm and the target face features saved by the target extraction algorithm, and obtain the operation form between the feature encryption vector, the encrypted vector to be matched, and the generated first encryption matrix. That is to say, based on the above derivation process, the solution process of the feature dot product result can be equivalently transformed into the process of solving the vector dot product between the transformed feature encryption vector and the encrypted vector to be matched, realizing the matching operation based on the encrypted face features.

[0128] Step 104: Screen out the to-be-matched encrypted vector corresponding to the maximum vector dot product, and use the screened to-be-matched encrypted vector as the vector result matched by the to-be-identified object.

[0129] The processing device screens out the to-be-matched encrypted vector corresponding to the maximum vector dot product, and uses the screened to-be-matched encrypted vector as the vector result matched by the to-be-identified object. Then, the processing device obtains the identity information associated with the screened to-be-matched encrypted vector, and uses the identity information as the information corresponding to the to-be-identified object.

[0130] Specifically, the processing device screens out the to-be-matched encrypted vector corresponding to the maximum vector dot product as the vector matched with the extracted first face feature, and then obtains the identity information associated with the screened to-be-matched encrypted vector, and uses the identity information as the information corresponding to the to-be-identified object.

[0131] It should be noted that in the embodiments of the present disclosure, the to-be-matched encrypted vector may exist in the to-be-matched encrypted vector library created by the corresponding target feature extraction algorithm.

[0132] For example, continuing with the example of identification at the company entrance and exit turnstile, the processing device stores the to-be-matched encrypted face feature library of each company employee extracted when the target feature extraction algorithm was previously used. When the company changes the extraction algorithm from the target feature extraction algorithm to the first feature extraction algorithm, to ensure that the to-be-matched encrypted face feature library established based on the target feature extraction algorithm can support the identity recognition operation of company employees, during the matching operation, first use the first feature extraction algorithm to extract the first face feature of the company employee to be identified, then encrypt it to obtain a feature encrypted vector based on the set first encryption matrix, and calculate the vector dot product between the company employee and each to-be-matched encrypted face feature in the to-be-matched encrypted face feature library according to the transformation matrix and operation form determined by the above formula 6.11. Furthermore, determine the to-be-matched encrypted face feature corresponding to the maximum vector dot product as the to-be-matched encrypted face feature that best matches the company employee, and determine the identity information associated with the to-be-matched encrypted face feature, and use the identity information as the identity information of the company employee.

[0133] Based on the same inventive concept, the encrypted face feature matching method proposed in the present disclosure can be specifically used in a face recognition system. Some possible application scenarios related to the present disclosure will be described below.

[0134] Figure 2Schematic diagram of the architecture of a face recognition system in an embodiment of the present disclosure, including a first electronic device and a second electronic device. The first electronic device can be a turnstile, an access control, a camera (such as a dome camera, a bullet camera, a USB camera, etc.), a mobile phone, a computer, etc. The second electronic device can be a server, a computer, etc. The first electronic device and the second electronic device communicate through a wired connection or a wireless connection, where:

[0135] The first electronic device is configured to obtain a target face image, extract the face feature of the target face image using a first feature extraction algorithm to obtain a first face feature, and send a face recognition request to the second electronic device. The face recognition request includes the first face feature.

[0136] Among them, the target feature extraction algorithm can be a pre-agreed feature extraction algorithm or a mandatory feature extraction algorithm.

[0137] The second electronic device is configured to receive the face recognition request and perform face recognition processing on the first face feature in the face recognition request based on the saved encrypted vectors to be matched.

[0138] In practical applications, the second electronic device encrypts the first face feature so that the obtained feature encrypted vector and the saved encrypted vectors to be matched are unified in the same feature space. The purpose of converting the feature encrypted vector into an encrypted vector to be matched is to convert the feature encrypted vector into this feature space, so that the second electronic device can directly calculate the similarity between the feature encrypted vector and each encrypted vector to be matched subsequently.

[0139] Specifically, the second electronic device can calculate the dot product result between the feature encrypted vector processed based on the feature matrix and each encrypted vector to be matched, determine the matching encrypted vector, and further determine the face recognition result.

[0140] In addition, the second electronic device can also send the face recognition result to the first electronic device so that the first electronic device can execute subsequent service processes based on the face recognition result. For example, operations such as controlling the opening of the turnstile.

[0141] In a possible implementation manner, the first electronic device can extract the first face feature using a first feature extraction algorithm, encrypt the first face feature to generate a feature encrypted vector, and perform encryption processing on the feature encrypted vector using a transformation matrix; in a possible implementation manner, the first electronic device can extract the first face feature using a first feature extraction algorithm and send the first face feature to the second electronic device for processing; in another possible implementation manner, the second electronic device can extract the face feature using a first feature extraction algorithm, encrypt the obtained face feature to generate a feature encrypted vector, and perform encryption processing on the feature encrypted vector using a transformation matrix.

[0142] In specific implementation, a face recognition product of one company can be installed in the first electronic device, and a face recognition product of another company can be installed in the second electronic device. Or, the first electronic device can be a face recognition product of one company, and the second electronic device can be a face recognition product of another company. Or, a certain face recognition product of one company can be installed in the first electronic device, and another face recognition product of this company can be installed in the second electronic device. And, in any case, the first feature extraction algorithm for face feature extraction and the feature extraction algorithm corresponding to the encrypted vector to be matched (such as the target feature extraction algorithm) are different feature extraction algorithms.

[0143] Since the face features extracted by using the first feature extraction algorithm can be encrypted and then converted into a vector that can be compared with the encrypted vector to be matched, in the case of only saving the encrypted vector to be matched without saving the corresponding face image, the first feature extraction algorithm for face feature extraction can be freely replaced.

[0144] It should be noted that the process of encrypting the first face features to obtain a feature encrypted vector that can be compared with the encrypted vector to be matched is the same as the Figure 1 encryption method of face features in the process shown in this embodiment of the present disclosure, and the present disclosure will not elaborate herein.

[0145] Based on the same inventive concept, refer to Figure 3 shown, which is a schematic logical structure diagram of a matching device for encrypted face features in this embodiment of the present disclosure. In this embodiment of the present disclosure, a matching device for encrypted face features is proposed, including: an acquisition unit 301, a generation unit 302, a determination unit 303, and a screening unit 304, where

[0146] The acquisition unit 301 acquires the first face features obtained after face feature extraction of the object to be recognized by using the first feature extraction algorithm;

[0147] The generation unit 302 generates a feature encrypted vector corresponding to the first face features according to the dot product results of the first face features and each first encrypted vector in the saved first encryption matrix, where the first encryption matrix includes N first encrypted vectors obtained after feature extraction of N image samples by using the first feature extraction algorithm;

[0148] Determination unit 303 determines a transformation matrix between the feature encryption vector and each of the stored encryption vectors to be matched, and calculates the vector dot product between the feature encryption vector processed by the transformation matrix and each of the encryption vectors to be matched. The encryption vectors to be matched are generated based on the dot product results between the target face features extracted by a target feature extraction algorithm and each of the second encryption vectors in a second encryption matrix. The second encryption matrix includes N second encryption vectors extracted from the N image samples by the target feature extraction algorithm;

[0149] Screening unit 304 screens out the encryption vector to be matched corresponding to the maximum vector dot product, and uses the screened encryption vector to be matched as the vector result for matching the object to be recognized.

[0150] Optionally, when obtaining the first face feature obtained by performing face feature extraction on the object to be recognized using a first feature extraction algorithm, the obtaining unit 301 is specifically configured to:

[0151] Obtain the first face feature of the object to be recognized sent by the acquisition terminal, where the first face feature is obtained by the acquisition terminal using the first feature extraction algorithm to perform feature extraction on the object to be recognized; or,

[0152] Receive the face image of the object to be recognized collected by the acquisition terminal, perform feature extraction on the face image using the first feature extraction algorithm to obtain the corresponding first face feature, and delete the face image.

[0153] Optionally, when generating a feature encryption vector corresponding to the first face feature according to the dot product results between the first face feature and each of the first encryption vectors in the stored first encryption matrix, the generating unit 302 is specifically configured to:

[0154] Obtain the stored first encryption matrix, and sequentially calculate the dot product results between each of the first encryption vectors in the first encryption matrix and the first face feature;

[0155] Determine the relative positions of the first encryption vectors in the first encryption matrix, and after arranging the corresponding dot product results according to the relative positions, generate a feature encryption vector corresponding to the first face feature.

[0156] Optionally, when determining the transformation matrix between the feature encryption vector and each of the stored encryption vectors to be matched, the determining unit 303 is specifically configured to:

[0157] Determine the dot product result of the facial features extracted by the target feature extraction algorithm and the target facial features corresponding to the encrypted vector to be matched to be recognized, based on the correspondence between the encrypted vector of features and the first facial features, the correspondence between the encrypted vector to be matched and the target facial features extracted by the target feature extraction algorithm, and the set correspondence between the facial features extracted by the first feature extraction algorithm and the facial features extracted by the target feature extraction algorithm;

[0158] Determine the transformation matrix between the encrypted vector of features and the encrypted vector to be matched based on the combination relationship between the encrypted vector of features and the encrypted vector to be matched included in the dot product result of features.

[0159] Optionally, after using the screened encrypted vector to be matched as the vector result for matching the object to be recognized, the screening unit 304 is further configured to:

[0160] Obtain the identity information associated with the screened encrypted vector to be matched, and use the identity information as the information corresponding to the object to be recognized.

[0161] Based on the same inventive concept, refer to Figure 4 As shown, it is a schematic physical structure diagram of a matching device for encrypted facial features in an embodiment of the present disclosure. The device 400 includes a processing component 422, which further includes one or more processors, and memory resources represented by a memory 432 for storing instructions executable by the processing component 422, such as application programs. The application programs stored in the memory 432 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 422 is configured to execute instructions to perform the above method.

[0162] The device 400 may further include a power supply component 426 configured to perform power management of the device 400, a wired or wireless network interface 450 configured to connect the device 400 to a network, and an input / output (I / O) interface 458. The device 400 may operate based on an operating system stored in the memory 432, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar systems.

[0163] Based on the same inventive concept, an embodiment of the present disclosure provides a storage medium in the embodiment of matching based on encrypted facial features. When the instructions in the storage medium are executed by an electronic device, the electronic device can execute any of the above methods.

[0164] In summary, in the embodiments of the present disclosure, after obtaining the first face feature obtained by performing face feature extraction on the object to be recognized using the first feature extraction algorithm, a feature encryption vector corresponding to the first face feature is generated according to the dot product results of the first face feature and each first encryption vector in the saved first encryption matrix, where the first encryption matrix includes N first encryption vectors obtained by performing feature extraction on N image samples using the first feature extraction algorithm. Then, a transformation matrix between the feature encryption vector and each saved encryption vector to be matched is determined, and the dot product of the feature encryption vector processed by the transformation matrix and each encryption vector to be matched is calculated, where the encryption vector to be matched is the dot product result between the target face feature extracted using the target feature extraction algorithm and N target encryption vectors extracted from the N image samples using the target feature extraction algorithm. Then, the encryption vector to be matched corresponding to the largest dot product is selected, and the selected encryption vector to be matched is used as the vector result matched by the object to be recognized. In this way, in the case where no face image is saved, after encrypting the first face feature extracted by the first extraction algorithm into a feature encryption vector, based on the dot product between the transformed feature encryption vector and each saved encryption vector to be matched, it is possible to determine the vector result that matches the object to be recognized among each saved encryption vector to be matched, realizing the matching operation based on the encrypted face feature. That is to say, when using the first feature extraction algorithm to replace the target feature extraction algorithm, it is possible to complete the matching of face features based on the feature encryption vector generated by the first feature extraction algorithm and each saved encryption feature to be matched based on the target feature extraction algorithm, thereby eliminating the need to recreate a feature encryption vector library for the first feature extraction algorithm, improving work efficiency, ensuring the replaceability of the feature extraction algorithm, and avoiding wasting additional human and material costs.

[0165] Those skilled in the art should understand that the embodiments of the present disclosure can be provided as a method, a system, or a computer program product. Therefore, the present disclosure can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present disclosure can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0166] This disclosure is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general purpose computers, special purpose computers, embedded processors, or other programmable data processing devices to produce a machine, such that the instructions executed by the processors of the computer or other programmable data processing devices produce means for implementing the functions specified in one or more flows and / or one or more blocks. Figure 1 in one or more flows and / or one or more blocks Figure 1 in one or more blocks.

[0167] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including instruction means that implement the functions specified in one or more flows and / or one or more blocks. Figure 1 in one or more flows and / or one or more blocks Figure 1 in one or more blocks.

[0168] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more flows and / or one or more blocks. Figure 1 in one or more flows and / or one or more blocks Figure 1 in one or more blocks.

[0169] Although the preferred embodiments of the disclosure have been described, additional changes and modifications can be made by those skilled in the art once they learn of the basic inventive concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications that fall within the scope of the disclosure.

[0170] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the disclosure without departing from the spirit and scope of the embodiments of the disclosure. Thus, if these modifications and variations of the embodiments of the disclosure fall within the scope of the claims of the disclosure and their equivalent technologies, the disclosure is also intended to include these changes and modifications.

Claims

1. A method for matching encrypted facial features, characterized in that, it includes: Obtain the first facial feature obtained after performing facial feature extraction on the object to be recognized using the first feature extraction algorithm; Generate a feature encryption vector corresponding to the first facial feature according to the dot product results of the first facial feature and each first encryption vector in the saved first encryption matrix, wherein the first encryption matrix includes N first encryption vectors obtained after performing feature extraction on N image samples using the first feature extraction algorithm; Determine the transformation matrix between the feature encryption vector and each saved encrypted vector to be matched, and calculate the dot product between the feature encryption vector processed by the transformation matrix and each encrypted vector to be matched, wherein the encrypted vector to be matched is generated according to the dot product results between the target facial feature extracted by the target feature extraction algorithm and each second encryption vector in the second encryption matrix, and the second encryption matrix includes N second encryption vectors extracted from the N image samples using the target feature extraction algorithm; Select the encrypted vector to be matched corresponding to the largest dot product, and use the selected encrypted vector to be matched as the vector result of the object to be recognized.

2. The method according to claim 1, characterized in that, the obtaining of the first facial feature obtained after performing facial feature extraction on the object to be recognized using the first feature extraction algorithm includes: Obtain the first facial feature of the object to be recognized sent by the acquisition terminal, wherein the first facial feature is obtained by the acquisition terminal using the first feature extraction algorithm to perform feature extraction on the object to be recognized; or, Receive the facial image of the object to be recognized collected by the acquisition terminal, perform feature extraction on the facial image using the first feature extraction algorithm to obtain the corresponding first facial feature, and delete the facial image.

3. The method according to claim 1, characterized in that, the generating of the feature encryption vector corresponding to the first facial feature according to the dot product results of the first facial feature and each first encryption vector in the saved first encryption matrix includes: Obtain the saved first encryption matrix, and sequentially calculate the dot product results between each first encryption vector in the first encryption matrix and the first facial feature; Determine the relative positions of the first encryption vectors in the first encryption matrix, and after arranging the corresponding dot product results according to the relative positions, generate a feature encryption vector corresponding to the first facial feature.

4. The method according to any one of claims 1-3, characterized in that, the determining of the transformation matrix between the feature encryption vector and each saved encrypted vector to be matched includes: Determine the dot product result of the facial features extracted by using the target feature extraction algorithm and the target facial features corresponding to the saved encrypted vector to be matched, based on the correspondence between the encrypted feature vector and the first facial feature, the correspondence between the encrypted vector to be matched and the target facial features extracted by using the target feature extraction algorithm, and the set correspondence between the facial features extracted by using the first feature extraction algorithm and the facial features extracted by using the target feature extraction algorithm; Determine the transformation matrix between the encrypted feature vector and the encrypted vector to be matched according to the combination relationship between the encrypted feature vector and the encrypted vector to be matched included in the dot product result of the features; 5. The method according to any one of claims 1-3, characterized in that after using the screened encrypted vector to be matched as the vector result for matching the object to be identified, it further includes: Obtain the identity information associated with the screened encrypted vector to be matched, and use the identity information as the information corresponding to the object to be identified.

6. A matching device for encrypted facial features, characterized in that it includes: An acquisition unit that acquires the first facial feature obtained after extracting the facial features of the object to be identified by using the first feature extraction algorithm; A generation unit that generates an encrypted feature vector corresponding to the first facial feature according to the dot product result of the first facial feature and each first encrypted vector in the saved first encryption matrix, where the first encryption matrix includes N first encrypted vectors obtained after extracting the features of N image samples by using the first feature extraction algorithm; A determination unit that determines the transformation matrix between the encrypted feature vector and each saved encrypted vector to be matched, and calculates the dot product of the encrypted feature vector processed by using the transformation matrix and each encrypted vector to be matched, where the encrypted vector to be matched is generated according to the dot product result between the target facial features extracted by using the target feature extraction algorithm and each second encrypted vector in the second encryption matrix, and the second encryption matrix includes N second encrypted vectors extracted from the N image samples by using the target feature extraction algorithm; A screening unit that screens out the encrypted vector to be matched corresponding to the largest dot product of vectors, and uses the screened encrypted vector to be matched as the vector result for matching the object to be identified.

7. The device according to claim 6, characterized in that when acquiring the first facial feature obtained after extracting the facial features of the object to be identified by using the first feature extraction algorithm, the acquisition unit is specifically configured to: Obtain the first facial feature of the object to be identified sent by the acquisition terminal, where the first facial feature is obtained by the acquisition terminal using the first feature extraction algorithm to extract the features of the object to be identified; or, Receive the facial image of the object to be identified collected by the acquisition terminal, extract the features of the facial image by using the first feature extraction algorithm to obtain the corresponding first facial feature, and delete the facial image.

8. The device according to claim 6, characterized in that When generating a feature encryption vector corresponding to the first face feature according to the dot product results between the first face feature and the first encryption vectors in the saved first encryption matrix, the generating unit specifically is configured to: Obtain the saved first encryption matrix, and sequentially calculate the dot product results between each first encryption vector in the first encryption matrix and the first face feature; Determine the relative positions of the first encryption vectors in the first encryption matrix, and after arranging the corresponding dot product results according to the relative positions, generate a feature encryption vector corresponding to the first face feature.

9. The apparatus according to any one of claims 6 - 8, wherein, When determining the transformation matrix between the feature encryption vector and each saved encryption vector to be matched, the determining unit specifically is configured to: Determine the feature dot product result between the face feature extracted by using the target feature extraction algorithm and the target face feature corresponding to the saved encryption vector to be matched according to the correspondence between the feature encryption vector and the first face feature, the correspondence between the encryption vector to be matched and the target face feature extracted by using the target feature extraction algorithm, and the set correspondence between the face feature extracted by using the first feature extraction algorithm and the face feature extracted by using the target feature extraction algorithm; Determine the transformation matrix between the feature encryption vector and the encryption vector to be matched according to the combination relationship between the feature encryption vector and the encryption vector to be matched included in the feature dot product result.

10. The apparatus according to any one of claims 6 - 8, wherein, After using the screened encryption vector to be matched as the vector result for matching the object to be recognized, the screening unit is further configured to: Obtain the identity information associated with the screened encryption vector to be matched, and use the identity information as the information corresponding to the object to be recognized.

11. An electronic device, wherein, comprises: a memory for storing executable instructions; a processor for reading and executing the executable instructions stored in the memory to implement the matching method for encrypted face features according to any one of claims 1 to 5.

12. A computer - readable storage medium, wherein, when the instructions in the storage medium are executed by an electronic device, the electronic device is enabled to execute the matching method for encrypted face features according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Face recognition method and device

    CN108256405A

  • Face recognition method and device, equipment and medium

    CN111985360A