A facial feature encryption system and method based on face recognition
By using a 6-digit numeric password to cyclically move right and interval sampling encryption of FaceNet's face feature vectors, the problems of complex encryption and feature vector leakage in the existing technology are solved, and fast and secure facial feature encryption is achieved to ensure that The security of the identification process is achieved.
Patent Information
- Application Number
- CN201810735852.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-07-06
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2038-07-06
AI Technical Summary
The existing encrypted face recognition technology based on ciphertext domains is complex and the encrypted images cannot be directly used in the recognition algorithm, and the face feature vectors are easily leaked, resulting in the threat of recognition security.
The face feature vector obtained based on FaceNet is encrypted using a 6-digit digital password, and the encrypted feature vector is formed by cyclic right shift and interval sampling, and a decryption module is provided to decrypt the feature vector in reverse operation.
The encryption process is simplified, the encryption speed and security is improved, and it ensures that even if the feature information is leaked, it is difficult to crack, protecting the user's facial feature information security.
Smart Images

Figure CN109104274B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of information security technology, and in particular relates to a face feature encryption system and method based on face recognition. Background Art
[0002] Face recognition is a biometric technology that identifies people based on their facial features. It uses a camera or camcorder to capture images or video streams containing faces, and automatically detects and tracks faces in the images. It then performs a series of face-related technologies on the detected faces. It is also commonly called portrait recognition or facial recognition.
[0003] In recent years, face recognition technology has developed rapidly and has been used in security identification, mobile payment and other fields, and the requirements for its security are getting higher and higher. However, it is still difficult to apply face verification and recognition in natural conditions. FaceNet (face recognition) technology can directly map face images to Euclidean space, and the length of the spatial distance represents the similarity of face images. As long as the mapping space is generated, tasks such as face recognition, verification and clustering can be easily completed.
[0004] The facial feature vector obtained based on facenet (face recognition) can be used to match faces. The facial feature vector is stored as a face identifier. If the stored information is leaked, the consequences will be serious.
[0005] For example, the invention patent with publication number CN107045627A discloses an encrypted face recognition technology based on the ciphertext domain, which combines the feature vector of the face image with encryption technology to protect the face image information, and can also resist conventional, geometric, illumination or occlusion attacks. The method is divided into two parts and a total of seven steps: the first part: frequency domain encryption of the face image, which uses the properties of the Logistic Map to perform chaotic encryption on the frequency domain face image to obtain the encrypted image E(i, j); the second part: feature vector extraction, which selects the feature vector of the face image according to the human visual characteristics (HVS), and then performs face recognition by calculating the similarity between the feature vectors.
[0006] This invention patent is based on encrypted face recognition technology in the ciphertext domain. It first uses the properties of Logistic Map to encrypt the face image in the frequency domain, and then extracts the face feature vector by performing DFT (discrete Fourier transformation) on the encrypted image. The face to be tested is encrypted in the transform domain, the encrypted face feature vector is extracted in the DFT transform domain, and then face recognition is performed by calculating the similarity between the feature vectors.
[0007] This technology still has many shortcomings: encrypted face recognition technology based on ciphertext domain is to encrypt face images, the process is relatively complicated, and the encrypted image cannot be directly used in the recognition algorithm.
[0008] Therefore, the present invention proposes an encryption method for facial features based on FaceNet face recognition in order to solve the problems of leakage of facial feature information and complexity of encryption methods in the prior art.
[0009] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0010] In view of the above-mentioned technical problems existing in the prior art, the present invention provides a facial feature encryption system and method based on face recognition. The facial feature vector obtained by the present invention based on facenet is stored as a face identifier. If the stored information is leaked, the consequences are serious. Therefore, a method is proposed to allow users to set a 6-digit password to encrypt the facial feature vector.
[0011] In order to achieve the above technical objectives, the present invention adopts the following technical solutions:
[0012] A face feature encryption system based on face recognition, comprising:
[0013] An acquisition module, used to acquire a facial feature vector obtained based on face recognition;
[0014] The encryption module is used to set a 6-digit password to encrypt the facial feature vector.
[0015] As a preferred embodiment of the present invention, in the 6-digit password set by the encryption module, the first digit value represents the number of bits that the facial feature vector is cyclically right-shifted in a serial manner; the second to sixth digits are respectively added with the number of 0s in the facial feature vector formed by each sample, to obtain the number of bits that each sampled facial feature vector is cyclically right-shifted in a serial manner.
[0016] As a preferred embodiment of the present invention, the sampling is interval sampling, and the facial feature vectors formed by the sampling are 5 groups.
[0017] As a preferred embodiment of the present invention, the face feature vector encrypted by the encryption module is: the face feature vectors formed by 5 groups of sampling are connected end to end in sequence after cyclic right shift.
[0018] As a preferred embodiment of the present invention, the system further comprises a decryption module for receiving a digital password and performing an inverse operation on the encryption process of the encryption module according to the digital password.
[0019] A facial feature encryption method based on face recognition, comprising:
[0020] S1. Obtaining a facial feature vector based on face recognition;
[0021] S2. Set a 6-digit password to encrypt the facial feature vector.
[0022] As a preferred embodiment of the present invention, step S2 includes:
[0023] S21. Circularly right-shift the facial feature vector in a sequence according to the first digit of the 6-digit password being the number of digits to be shifted.
[0024] As a preferred embodiment of the present invention, step S2 further includes:
[0025] S22, extracting 5 groups of face feature vectors according to interval sampling;
[0026] S23, according to the second to sixth digits in the 6-digit password, respectively add the number of 0s in the facial feature vector formed by each sample, to obtain the number of digits of each sampled facial feature vector cyclically right-shifted in a sequence manner;
[0027] S24, cyclically right-shift each group of facial feature vectors formed by sampling in a sequence manner.
[0028] As a preferred embodiment of the present invention, the step S2 also includes: S25, the facial feature vectors formed by the five groups of sampling are connected end to end in sequence after being cyclically right-shifted.
[0029] As a preferred embodiment of the present invention, the method further includes: A. if face recognition decryption is required, the encryption process of the face feature vector is inversely operated according to the received digital password.
[0030] The technical solution provided by the present invention may include the following beneficial effects:
[0031] 1. The present invention solves the problem in the prior art that face feature vectors are easily leaked, resulting in face recognition being easily cracked.
[0032] 2. The present invention proposes a method that allows users to set a 6-digit password to encrypt facial feature vectors. Even if the stored facial feature information is leaked, it is difficult to crack the facial feature information without the user's password, thereby achieving the purpose of protecting the information security of the user's facial features.
[0033] 3. The present invention uses a 6-digit solution to encrypt facial feature vectors, which has fast encryption speed, simple encryption process, simple encryption password, and is easy for users to operate. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is a structural diagram of a facial feature encryption system based on face recognition according to Embodiment 1 of the present invention;
[0035] Figure 2 This is a structural diagram of a facial feature encryption system based on face recognition according to Embodiment 2 of the present invention;
[0036] Figure 3 This is an example diagram of Embodiment 2 of the present invention;
[0037] Figure 4 This is a flow chart of a facial feature encryption method based on face recognition according to Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0038] The present invention will now be more fully described with reference to the accompanying drawings in the text which follow, in which embodiments of the present invention are shown. However, the present invention may be embodied in a variety of different forms and should not be construed as being limited to the specific embodiments set forth herein. Rather, these embodiments are intended to convey the scope of the present invention to those skilled in the art.
[0039] Unless otherwise defined, the terms (including technical and scientific terms) used herein should be understood to have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. Moreover, it is understood that the terms used herein should be understood to have the same meaning as that in this specification and the relevant art, and should not be interpreted by an ideal or overly formal meaning, unless explicitly provided in this document.
[0040] Example 1
[0041] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings.
[0042] This embodiment provides a facial feature encryption system based on face recognition, such as Figure 1 As shown, it includes: an acquisition module 100 and an encryption module 200. The specific operation process of this solution is as follows:
[0043] The acquisition module 100 is used to acquire a facial feature vector obtained based on face recognition.
[0044] Facenet (face recognition) technology is a widely used biometric technology. After obtaining a facial feature vector from Facenet, the present invention does not store the facial feature vector first, but first obtains the facial feature vector obtained by Facenet.
[0045] The encryption module 200 is used to set a 6-digit password to encrypt the facial feature vector.
[0046] The present invention uses a 6-digit password to encrypt the face feature vector, and stores it after encryption, thereby solving the problem of user face feature information being leaked and misappropriated.
[0047] The method for encrypting the facial feature vector using a 6-digit password in this embodiment is as follows: the first digit value represents the number of bits of the facial feature vector that are circularly shifted right in a serial manner, and the second to sixth digits correspond to the respective sampled feature vectors plus the number of 0s in the respective sampled feature vectors, to obtain the number of bits of the respective sampled feature vectors that are circularly shifted right in a serial manner.
[0048] Moving in sequence means moving in order without disrupting the order of elements during the moving process.
[0049] After the respective sampled feature vectors are cyclically right-shifted in a sequence manner, they are connected end to end in order to obtain an encrypted feature vector, and the encrypted feature vector is stored.
[0050] Even if someone else gets the encrypted facial feature vector and knows that the password is 6 digits, and tries to crack it by brute force using the 6-digit password, the number of 0s in the sampled features corresponding to each digit is unknown, so brute force cracking is not feasible.
[0051] To sum up, the facial feature encryption system based on face recognition provided in this embodiment allows the user to set a 6-digit password to encrypt the facial feature vector. Even if the stored facial feature information is leaked, it is difficult to crack the facial feature information without the user's password, thereby achieving the purpose of protecting the information security of the user's facial features.
[0052] Example 2
[0053] This embodiment is basically the same as the above-mentioned embodiment 1, including the acquisition module 100 and the encryption module 200 of embodiment 1. The difference between this embodiment and embodiment 1 is that this embodiment further includes: a decryption module 300, such as Figure 2 As shown, the specific operation process of this embodiment is as follows:
[0054] The encryption module 200 encrypts the facial feature vector in the following steps:
[0055] Assume that the length of the facial feature vector obtained based on Facenet technology is 512 elements. Figure 3 As shown in the figure, S1 represents the first eigenvector element, S2 represents the second eigenvector element, and so on, S512 represents the 512th eigenvector element.
[0056] The user sets a 6-digit numeric password. Assuming the password set by the user is 634981, it can be seen that the first digit of the password is 6, and the five numbers from the second to the sixth digits are 3, 4, 9, 8, and 1 respectively.
[0057] First, all elements of the facial feature vector are cyclically right-shifted by 6 bits in a sequential manner, where the sequential manner means that 512 feature vector elements are shifted in sequence.
[0058] Then, the facial feature vector after circular right shift by 6 bits is sampled.
[0059] The sampling is interval sampling, and the facial feature vectors formed by the sampling are 5 groups, thus obtaining 5 sampling groups.
[0060] Interval sampling is to arrange all elements of the facial feature vector in order, and use the equidistant method to take out an element as a sample at a certain interval; the interval in this embodiment is 5.
[0061] Then, the second to sixth digits of the password are added to the number of 0s in the facial feature vectors formed by each sample, and the number of digits of each sampled facial feature vector that is cyclically right-shifted in a sequence is obtained.
[0062] For example, the second digit of the password is 3, that is, 3 is added to the number of 0 elements in the first group of the sampling group. If the number of 0 elements in the first group of the sampling group is 56, then 3 plus 56 is 59, so the first group sequence of the sampling group is cyclically right shifted 59 bits in a serial manner.
[0063] The numbers from the third to the sixth digits are 4, 9, 8, and 1, respectively, which are related to the number of digits of the elements in the second to fifth groups of the sampling group. The specific right shift operation schemes of these four groups of elements refer to the right shift scheme of the first group of elements mentioned above, which is the same as the right shift scheme of the first element, and will not be repeated here. After completing the above steps, 5 new element sequences are obtained.
[0064] The face feature vector encrypted by the encryption module is: the face feature vectors formed by 5 groups of sampling are connected end to end in sequence after being cyclically right-shifted.
[0065] Finally, the five new element sequences are connected end to end in the order of the first to fifth groups. For example, the first element of the second group is connected to the last element of the first group, and so on to form a new sequence of length 512, which is the encrypted facial feature vector.
[0066] At this point, the encryption of the facial feature vector is completed. Then the encrypted facial feature vector element sequence is stored.
[0067] The system further comprises a decryption module 300 for receiving a digital password and performing an inverse operation on the encryption process of the encryption module according to the digital password.
[0068] The decryption process requires the user to enter the set password, and the inverse operation of the encryption process is performed according to the password; the decryption steps of the face feature vector are as follows:
[0069] The system receives a numeric password entered by the user. If the numeric password entered by the user is 634981 (the correct numeric password), the system first divides the stored encrypted facial feature vector elements into 5 groups of equal length, adds the number of 0 elements in each group to the number of the corresponding password bits, and obtains the number of bits of each group of elements that are cyclically shifted left, for example, the number of 0 elements in the first group plus the second digit of the password bit 3, and so on.
[0070] Then the five groups of eigenvectors are circularly shifted left in sequence according to the number of shifted bits in each group.
[0071] Then restore the element sequences in the newly obtained 5 groups into one sequence: the first element of the first group is the first element of the new sequence, the first element of the second group is the second element of the new sequence, and so on, to obtain the restored sequence.
[0072] Finally, according to the first digit of the password, the restored sequence is cyclically shifted left by 6 elements to obtain the original face feature vector, completing the decryption process.
[0073] After completing the decryption process and obtaining the facial feature vector, the face recognition and matching can be successfully completed.
[0074] To sum up, the face feature encryption system based on face recognition provided in this embodiment encrypts the face feature vector through 6-digit numbers. The encryption speed is fast, the encryption process is simple, the encryption password is simple, and it is easy for users to operate. The 6-digit password encryption conforms to the user's operating habits.
[0075] Example 3
[0076] This embodiment provides a facial feature encryption method based on face recognition, such as Figure 4 As shown, the specific process may include the following steps:
[0077] S1. Store the facial feature vector obtained based on face recognition.
[0078] Facenet (face recognition) technology is a widely used biometric technology. After obtaining a facial feature vector from Facenet, the present invention does not store the facial feature vector first, but first obtains the facial feature vector obtained by Facenet.
[0079] S2. Set a 6-digit password to encrypt the facial feature vector.
[0080] The solution of encrypting the facial feature vector with 6 digits has fast encryption speed, simple encryption process, simple encryption password, and is easy for users to operate. The 6-digit password encryption conforms to the user's operating habits.
[0081] The encryption process of the 6-digit digital password is as follows:
[0082] S21. Circularly right-shift the facial feature vector in a sequence according to the first digit of the 6-digit password being the number of digits to be shifted.
[0083] Moving in sequence means moving in order without disrupting the order of elements during the moving process.
[0084] Assuming that the password set by the user is 634981, it can be seen that the first digit of the password is 6, and the five numbers from the second to the sixth digits are 3, 4, 9, 8, and 1 respectively.
[0085] Since the first digit of the password is 6, all elements of the facial feature vector are cyclically shifted right by 6 bits in a sequence.
[0086] S22. Extract 5 groups of facial feature vectors according to interval sampling.
[0087] Interval sampling is to arrange all elements of the facial feature vector in order, and use the equidistant method to take out an element as a sample at a certain interval; the interval in this embodiment is 5, and 5 sampling groups are obtained after sampling.
[0088] S23, according to the second to sixth digits in the 6-digit password, respectively add the number of 0s in the facial feature vector formed by each sample, to obtain the number of digits of each sampled facial feature vector cyclically right-shifted in a sequence manner;
[0089] S24, cyclically right-shifting each group of facial feature vectors formed by sampling in a sequence manner.
[0090] For example, the second digit of the password is 3, that is, 3 is added to the number of 0 elements in the first group of the sampling group. If the number of 0 elements in the first group of the sampling group is 56, then 3 plus 56 is 59, so the first group sequence of the sampling group is cyclically right shifted 59 bits in a serial manner.
[0091] The numbers from the third to the sixth digits are 4, 9, 8, and 1, respectively, which are related to the number of digits of the elements in the second to fifth groups of the sampling group. The specific right shift operation schemes of these four groups of elements refer to the right shift scheme of the first group of elements mentioned above, which is the same as the right shift scheme of the first element, and will not be repeated here. After completing the above steps, 5 new element sequences are obtained.
[0092] S25. The facial feature vectors formed by the 5 groups of sampling are connected end to end in sequence after cyclic right shift.
[0093] Finally, the five new element sequences are connected end to end in the order of the first to fifth groups. For example, the first element of the second group is connected to the last element of the first group, and so on to form a new sequence of length 512, which is the encrypted facial feature vector.
[0094] At this point, the encryption of the facial feature vector is completed. Then the encrypted facial feature vector element sequence is stored.
[0095] The method also includes: A. if face recognition decryption is required, the encryption process of the face feature vector is inversely calculated according to the received digital password.
[0096] First, the user enters the password 634981 (the correct password), and the system divides the stored facial feature vector element sequence into 5 groups, and performs a circular left shift based on the number of 0 elements in each group plus the number of the corresponding password position. Among them, the first group corresponds to the second password position, the second group corresponds to the third password position, and so on.
[0097] Then restore the newly obtained 5-group element sequence to a sequence: the first element of the first group is the first element of the new sequence, the first element of the second group is the second element of the new sequence, and so on. Finally, according to the first digit 6 of the password, the restored sequence is cyclically shifted to the left by 6 elements to complete the decryption process.
[0098] To sum up, the facial feature encryption method based on face recognition provided in this embodiment allows the user to set a 6-digit password to encrypt the facial feature vector. Even if the stored facial feature information is leaked, it is difficult to crack the facial feature information without the user's password, thereby achieving the purpose of protecting the information security of the user's facial features.
[0099] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
Claims
1. A facial feature encryption system based on face recognition, It is characterized in that include: An acquisition module, used to acquire a facial feature vector obtained based on face recognition; The encryption module is used to set a 6-digit password to encrypt the facial feature vector. In the 6-digit password set by the encryption module, the first digit value represents the number of bits of the facial feature vector that is cyclically right shifted in a serial manner; the second to sixth digits are respectively added with the number of 0s in each facial feature vector obtained by sampling the facial feature vector after cyclically right shifting in a serial manner, to obtain the number of bits of each sampled facial feature vector that is cyclically right shifted in a serial manner.
2. The face feature encryption system based on face recognition according to claim 1, It is characterized in that The sampling is interval sampling, and the facial feature vectors formed by the sampling are 5 groups.
3. The face feature encryption system based on face recognition according to claim 2, It is characterized in that The face feature vector encrypted by the encryption module is: the face feature vectors formed by 5 groups of sampling are connected end to end in sequence after being cyclically right-shifted.
4. The face feature encryption system based on face recognition according to claim 1, It is characterized in that The system also includes a decryption module, which is used to receive a digital password and perform an inverse operation on the encryption process of the encryption module according to the digital password.
5. A facial feature encryption method based on face recognition, It is characterized in that include: S1. Obtaining a facial feature vector based on face recognition; S2. Setting a 6-digit password to encrypt the facial feature vector; The step S2 comprises: S21, according to the first digit of the 6-digit password being the number of digits to be moved, the facial feature vector is circularly shifted right in a sequence manner; S22, extracting 5 groups of face feature vectors according to interval sampling; S23, according to the second to sixth digits in the 6-digit password, respectively add the number of 0s in the facial feature vector formed by each sample, to obtain the number of digits of each sampled facial feature vector cyclically right-shifted in a sequence manner; S24, cyclically right-shift each group of facial feature vectors formed by sampling in a sequence manner.
6. The face feature encryption method based on face recognition according to claim 5, It is characterized in that The step S2 also includes: S25, the facial feature vectors formed by the five groups of sampling are connected end to end in sequence after being cyclically right-shifted.
7. The facial feature encryption method based on face recognition according to claim 5, It is characterized in that The method also includes: A. if face recognition decryption is required, the encryption process of the face feature vector is inversely calculated according to the received digital password.
Citation Information
Patent Citations
Encrypted face recognition method based on ciphertext domain
CN107045627A
Security verification method for diagnosis
CN103763098A
Electronic signature method based on face identification technology and signature verification method
CN106503655A
Encrypting apparatus
US20110176673A1
Rearranging write data to avoid hard errors
US20140245107A1
