CN115880789B - Encryption-based face recognition method, related device and storage medium - Google Patents

Encryption-based face recognition method, related device and storage medium Download PDF

Info

Publication number
CN115880789B
CN115880789B CN202310083130.5A CN202310083130A CN115880789B CN 115880789 B CN115880789 B CN 115880789B CN 202310083130 A CN202310083130 A CN 202310083130A CN 115880789 B CN115880789 B CN 115880789B
Authority
CN
China
Prior art keywords
registered
ciphertext
feature
face
registered face
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310083130.5A
Other languages
Chinese (zh)
Other versions
CN115880789A (en
Inventor
郑瀚寻
闯小明
杨龚轶凡
侯宗礼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhonghao Xinying Hangzhou Technology Co ltd
Original Assignee
Zhonghao Xinying Hangzhou Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhonghao Xinying Hangzhou Technology Co ltd filed Critical Zhonghao Xinying Hangzhou Technology Co ltd
Priority to CN202310083130.5A priority Critical patent/CN115880789B/en
Publication of CN115880789A publication Critical patent/CN115880789A/en
Application granted granted Critical
Publication of CN115880789B publication Critical patent/CN115880789B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Collating Specific Patterns (AREA)

Abstract

The embodiment of the invention provides a face recognition method based on encryption, a related device and a storage medium. The method is applied to the terminal equipment and comprises the following steps: acquiring a face image to be identified and a display code, wherein the display code is obtained by encrypting based on a first current corresponding code, the first current corresponding code is obtained by updating based on a historical first corresponding code, the historical first corresponding code comprises an initial corresponding code, and the initial corresponding code is obtained based on a registered face ciphertext feature; sending the display code to service equipment so that the service equipment returns the registered face ciphertext feature based on the display code; receiving and decrypting the registered face ciphertext features to obtain registered face plaintext features; and identifying the face image to be identified based on the plain text features of the registered face to obtain a face identification result. The invention stores and transmits the encrypted face data, thereby improving the security of personal information.

Description

Encryption-based face recognition method, related device and storage medium
Technical Field
The embodiment of the invention relates to the technical field of information security, in particular to a face recognition method based on encryption, a related device and a storage medium.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
At present, the face recognition is widely applied to business scenes such as mobile phone recognition, customer payment and the like, and the recognition mode is very convenient to use. But the method is convenient and does not lead people to worry about information safety. Common user passwords can be changed frequently to ensure the security of the passwords. However, privacy information such as a face has the characteristics of uniqueness, long-term non-modification and the like, and in the prior art, the face identification information is generally directly stored or transmitted, and if the face identification information is revealed, the security of the personal information is reduced.
Disclosure of Invention
In this context, embodiments of the present invention desire to provide an encryption-based face recognition method, related apparatus, and storage medium.
In a first aspect of the embodiment of the present invention, a face recognition method is provided and applied to a terminal device, where the method includes:
acquiring a face image to be identified and a display code, wherein the display code is obtained by encrypting based on a first current corresponding code, the first current corresponding code is obtained by updating based on a historical first corresponding code, the historical first corresponding code comprises an initial corresponding code, and the initial corresponding code is obtained based on a registered face ciphertext feature;
Sending the display code to service equipment so that the service equipment returns the registered face ciphertext feature based on the display code;
receiving and decrypting the registered face ciphertext features to obtain registered face plaintext features;
and identifying the face image to be identified based on the plain text features of the registered face to obtain a face identification result.
In an embodiment of the present disclosure, the initial corresponding code is obtained by the service device based on the characteristic encryption of the registered face ciphertext, and is sent to the terminal device;
the terminal equipment encrypts the first current corresponding code as a historical first corresponding code every first preset time length to obtain an encrypted corresponding code, wherein the encrypted corresponding code is an updated first current corresponding code; the encryption mode of the corresponding code after the encryption is different from the encryption mode of the display code.
In one example of this embodiment, the registered face plaintext features at least include a registered eyebrow feature set, a registered eye feature set, a registered nose feature set, a registered mouth feature set, and a registered face feature set;
the step of identifying the face image to be identified based on the plain text features of the registered face to obtain a face identification result, which comprises the following steps:
Acquiring current face features based on the face image to be recognized; the current facial features at least comprise a current eyebrow feature set, a current eye feature set, a current nose feature set, a current mouth feature set and a current face feature set;
and identifying the current face features based on the plain text features of the registered faces to obtain face recognition results.
In a second aspect of the embodiment of the present invention, there is provided an encryption-based face recognition method applied to a service device, the method including:
receiving and decrypting the display code to obtain a second current corresponding code corresponding to the display code; the display code is obtained by encrypting the terminal equipment based on a first current corresponding code, the first current corresponding code is obtained by updating the terminal equipment based on a historical first corresponding code, the historical first corresponding code comprises an initial corresponding code, and the initial corresponding code is obtained based on the characteristic of registered face ciphertext;
acquiring prestored registered face ciphertext features based on the second current corresponding code;
and sending the registered face ciphertext features to the terminal equipment, so that the terminal equipment decrypts the registered face ciphertext features to obtain registered face plaintext features, and identifies the face image to be identified based on the registered face plaintext features to obtain a face identification result.
In one example of this embodiment, the registered face ciphertext feature is pre-stored by:
acquiring a registered face image, and acquiring a registered face plaintext feature based on the registered face image; the registered face plaintext features at least comprise a registered eyebrow feature group, a registered eye feature group, a registered nose feature group, a registered mouth feature group and a registered face feature group;
encrypting each feature group of the registered face plaintext feature to obtain a registered face ciphertext feature, wherein the registered face ciphertext feature comprises ciphertext feature groups of each feature group, and one feature group corresponds to one ciphertext feature group;
randomly storing each ciphertext feature group in the registered face ciphertext feature respectively to obtain a storage position serial number corresponding to each ciphertext feature group respectively;
the initial corresponding code is obtained by the following method:
determining initial corresponding codes corresponding to the registered face ciphertext features according to the serial numbers of the storage positions;
the service equipment sends the initial corresponding code to the terminal equipment so that the terminal equipment obtains a display code based on the initial corresponding code;
The service device also takes the initial corresponding code as an initial second current corresponding code.
In an embodiment of the present disclosure, the service device encrypts, at intervals of a second preset duration, the second current corresponding code as a historical second corresponding code to obtain an encrypted corresponding code, where the encrypted corresponding code is an updated second current corresponding code;
the second current corresponding code represents the current storage position serial numbers respectively corresponding to the ciphertext feature groups; the second corresponding code of the history represents the corresponding historical storage position serial numbers of the ciphertext feature groups respectively; each ciphertext feature group corresponds to a historical storage position sequence number and a current storage position sequence number; the current storage position serial number is used for transferring the ciphertext feature group corresponding to the current storage position serial number from the storage position corresponding to the historical storage position serial number to the storage position corresponding to the current storage position serial number.
In a third aspect of the embodiments of the present invention, an encryption-based face recognition system is provided, the system including a terminal device and a service device, wherein:
the terminal equipment is used for acquiring the face image to be identified and the display code and sending the display code to the service equipment; the display code is obtained by encryption based on a first current corresponding code, the first current corresponding code is obtained by updating based on a historical first corresponding code, the historical first corresponding code comprises an initial corresponding code, and the initial corresponding code is obtained based on registered face ciphertext characteristics;
The service equipment is used for receiving the display code and decrypting the display code to obtain a second current corresponding code corresponding to the display code; acquiring prestored registered face ciphertext features based on the second current corresponding code; and sending the registered face ciphertext feature to the terminal equipment;
the terminal equipment is also used for receiving and decrypting the registered face ciphertext characteristics to obtain registered face plaintext characteristics; and identifying the face image to be identified based on the plain text features of the registered face to obtain a face identification result.
In a fourth aspect of the embodiment of the present invention, there is provided a terminal device, including:
the first acquisition unit is used for acquiring a face image to be identified and a display code, wherein the display code is obtained by encryption based on a first current corresponding code, the first current corresponding code is obtained by updating based on a historical first corresponding code, the historical first corresponding code comprises an initial corresponding code, and the initial corresponding code is obtained based on registered face ciphertext characteristics;
the display code sending unit is used for sending the display code to service equipment so that the service equipment returns the registered face ciphertext characteristic based on the display code;
The feature decryption unit is used for receiving and decrypting the registered face ciphertext features to obtain registered face plaintext features;
and the identification unit is used for identifying the face image to be identified based on the plaintext features of the registered face to obtain a face identification result.
In a fifth aspect of the embodiments of the present invention, there is provided a service apparatus, including:
the display code decryption unit is used for receiving and decrypting the display code to obtain a second current corresponding code corresponding to the display code; the display code is obtained by encrypting the terminal equipment based on a first current corresponding code, the first current corresponding code is obtained by updating the terminal equipment based on a historical first corresponding code, the historical first corresponding code comprises an initial corresponding code, and the initial corresponding code is obtained based on the characteristic of registered face ciphertext;
the second acquisition unit is used for acquiring prestored registered face ciphertext features based on the second current corresponding code;
and the characteristic sending unit is used for sending the registered face ciphertext characteristics to the terminal equipment so that the terminal equipment decrypts the registered face ciphertext characteristics to obtain registered face plaintext characteristics, and identifies the face image to be identified based on the registered face plaintext characteristics to obtain a face identification result.
In a sixth aspect of embodiments of the present invention, there is provided a computing device comprising: at least one processor, memory, and input output unit; wherein the memory is for storing a computer program and the processor is for invoking the computer program stored in the memory to perform the method of any of the first aspects.
In a seventh aspect of the embodiments of the present invention, there is provided a computer readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the method of any of the first aspects.
According to the encryption-based face recognition method, the related device and the storage medium, encrypted registered face ciphertext data can be stored in the service equipment, registered face ciphertext data corresponding to the encrypted display code transmitted by the terminal equipment can be transmitted to the terminal equipment, so that the terminal equipment decrypts the registered face ciphertext data to obtain registered face plaintext data, and face recognition is carried out on a face image to be recognized based on the registered face plaintext data. Therefore, in the embodiment of the invention, the encrypted face data is stored and transmitted, and if the encrypted face data is leaked, the safety of personal information is not influenced, so that the safety of the personal information is improved.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. Several embodiments of the present invention are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
fig. 1 is a schematic flow chart of an encryption-based face recognition method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of an encryption-based face recognition method according to another embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating a storage location of a registered face ciphertext feature based on a second current corresponding code according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an encryption-based face recognition system according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a service device according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a medium according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a computing device according to an embodiment of the present invention.
In the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
Detailed Description
The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are presented merely to enable those skilled in the art to better understand and practice the invention and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Those skilled in the art will appreciate that embodiments of the invention may be implemented as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the following forms, namely: complete hardware, complete software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
According to an embodiment of the invention, a face recognition method based on encryption, a related device and a storage medium are provided.
It should be noted that any number of elements in the figures are for illustration and not limitation, and that any naming is used for distinction only and not for limitation.
The principles and spirit of the present invention are explained in detail below with reference to several representative embodiments thereof.
Exemplary method
Referring to fig. 1, fig. 1 is a schematic flow chart of an encryption-based face recognition method according to an embodiment of the present invention. The method can be executed by the terminal equipment, can be applied to face recognition scenes, stores and transmits the encrypted face data, and can not influence the safety of personal information if the encrypted face data is leaked, so that the safety of the personal information is improved. The face recognition method based on encryption comprises the following steps:
step S101, a face image to be recognized and a display code are obtained.
The embodiment of the invention is applied to the terminal equipment, one or more terminal equipment can be provided, and the terminal equipment can be a smart phone, a tablet personal computer, a smart watch and the like, so the embodiment of the invention is not limited.
In the embodiment of the invention, the display code is obtained by encrypting based on a first current corresponding code, the first current corresponding code is obtained by updating based on a historical first corresponding code, the historical first corresponding code comprises an initial corresponding code, and the initial corresponding code is obtained based on the characteristic of the registered face ciphertext.
In the embodiment of the invention, the updating encryption algorithm for updating the historical first corresponding code to obtain the first current corresponding code is different from the encryption algorithm for encrypting the first current corresponding code to obtain the display code.
In the embodiment of the invention, the initial corresponding code is obtained by the service equipment based on the characteristic encryption of the registered face ciphertext and is sent to the terminal equipment; the terminal equipment encrypts the first current corresponding code as a historical first corresponding code every first preset time length to obtain an encrypted corresponding code, wherein the encrypted corresponding code is an updated first current corresponding code; the encryption mode of the obtained encrypted corresponding code is different from the encryption mode of the obtained display code; the first current corresponding code can be encrypted once every a first preset time length, so that the first current corresponding code is always in a change state, and is difficult to crack when the first current corresponding code is leaked or illegally acquired, and the safety of the first current corresponding code is improved.
In the embodiment of the invention, the service equipment can be in communication connection with the terminal equipment. When the terminal equipment receives the initial corresponding code, the terminal equipment can feed back a corresponding code updating instruction to the service equipment; after receiving the corresponding code updating instruction, the service device may encrypt the second current corresponding code as a historical second corresponding code every second preset time period to obtain an encrypted corresponding code, where the encrypted corresponding code is the updated second current corresponding code. And the terminal equipment starts receiving the initial corresponding code and also needs to encrypt the first current corresponding code as a historical first corresponding code every a first preset time length to obtain an encrypted corresponding code, wherein the encrypted corresponding code is the updated first current corresponding code. The first preset duration is the same as the second preset duration, that is, when the terminal device receives the initial corresponding code and the service device receives the corresponding code updating instruction, the terminal device and the service device can synchronously update the current corresponding code so as to ensure that the first current corresponding code stored in the terminal device is the same as the second current corresponding code stored in the service device at any time.
Step S102, the display code is sent to service equipment, so that the service equipment returns the registered face ciphertext feature based on the display code.
In the embodiment of the invention, the service equipment can pre-store the decryption algorithm corresponding to the display code, namely, only the service equipment can decrypt the display code, and the terminal equipment and other equipment cannot decrypt the display code. The service equipment decrypts the display code to obtain a second current corresponding code, the second current corresponding code can determine the current storage position of the registered face ciphertext feature stored in the service equipment, and the registered face ciphertext feature can be obtained from the current storage position.
In the embodiment of the invention, the registered face ciphertext features can comprise a plurality of ciphertext feature groups, and each ciphertext feature group can be respectively stored in different storage positions in the service equipment; therefore, the storage position serial numbers of the ciphertext feature groups stored in the service device can be acquired, and the acquired plurality of storage position serial numbers can be determined as the second current corresponding codes. I.e. the second current corresponding code represents the current storage location of the registered face ciphertext feature stored in the service device. The storage position of the registered face ciphertext features is directly determined through the second current corresponding codes, so that the acquisition process of the registered face ciphertext features can be simplified, the storage position of the registered face ciphertext features is not required to be determined by establishing a database mapping mode in the prior art, storage resources and computing resources are saved, and the searching efficiency of the registered face ciphertext features is improved.
Step S103, receiving and decrypting the registered face ciphertext features to obtain registered face plaintext features.
In the embodiment of the invention, the registered face ciphertext features are obtained by encrypting the registered face plaintext features through the service equipment, and the registered face ciphertext features are obtained by decrypting the registered face ciphertext features through the terminal equipment, namely a decryption algorithm for decrypting the registered face ciphertext features can be prestored in the terminal equipment; in order to ensure the security of the registered face ciphertext features stored in the service device, a decryption algorithm capable of decrypting the registered face ciphertext features is not stored in the service device.
Step S104, the face image to be identified is identified based on the plain text features of the registered face, and a face identification result is obtained.
In the embodiment of the invention, the registered face plaintext features at least comprise a registered eyebrow feature group, a registered eye feature group, a registered nose feature group, a registered mouth feature group and a registered face feature group;
as an optional implementation manner, the step S104 of identifying the face image to be identified based on the plaintext feature of the registered face may specifically be:
The step of identifying the face image to be identified based on the plain text features of the registered face to obtain a face identification result, which comprises the following steps:
acquiring current face features based on the face image to be recognized; the current facial features at least comprise a current eyebrow feature set, a current eye feature set, a current nose feature set, a current mouth feature set and a current face feature set;
and identifying the current face features based on the plain text features of the registered faces to obtain face recognition results.
The implementation of the embodiment can acquire the current face characteristics from the face image to be recognized, wherein the current face characteristics can comprise a current eyebrow characteristic group, a current eye characteristic group, a current nose characteristic group, a current mouth characteristic group and a current face type characteristic group; registering the face plaintext feature may include registering an eyebrow feature set, registering an eye feature set, registering a nose feature set, registering a mouth feature set, and registering a face feature set; and comparing each group of feature groups in the current face features with each group of feature groups in the registered face plaintext features to obtain a comparison result of the current face features and the registered face plaintext features, namely a face recognition result, so that the accuracy of the face recognition result is improved.
In the embodiment of the invention, the registered face plaintext features can be obtained by extracting features of the acquired registered face images through the service equipment, the service equipment can extract a plurality of groups of feature points including eyebrows, eyes, noses, mouths, facial forms and the like from the registered face images, namely, a registered eyebrow feature group, a registered eye feature group, a registered nose feature group, a registered mouth feature group and a registered facial form feature group are obtained, and the number of feature points included in each group of feature groups can be the same or different.
In the embodiment of the invention, the registered eyebrow feature set, the registered eye feature set, the registered nose feature set, the registered mouth feature set and the registered face feature set are encrypted respectively to obtain the registered eyebrow encryption feature set, the registered eye encryption feature set, the registered nose encryption feature set, the registered mouth encryption feature set and the registered face encryption feature set; the registered eyebrow encryption feature set, the registered eye encryption feature set, the registered nose encryption feature set, the registered mouth encryption feature set, and the registered face encryption feature set may be determined as registered face ciphertext features.
Furthermore, each group of encryption feature groups in the registered face ciphertext features can be stored in the service equipment, and the storage positions of each group of encryption feature groups are different. Each group of encryption feature groups can be randomly stored in the service equipment, so that the sequence numbers of the storage positions of each group of encryption feature groups are also random, and the security of registering the face ciphertext features is further improved.
In the embodiment of the invention, the current facial features comprising the current eyebrow feature group, the current eye feature group, the current nose feature group, the current mouth feature group and the current face feature group can be obtained from the facial image to be identified. And comparing each feature group in the plaintext features of the registered face with the corresponding feature group in the current face features to obtain a comparison result corresponding to each feature group, and synthesizing the comparison results corresponding to each feature group to obtain a face recognition result.
Specifically, only when the comparison result corresponding to each group of features indicates that the comparison is passed, the similarity degree of the plaintext features of the registered face and the current face features is higher, and the face recognition is passed.
Referring to fig. 2, fig. 2 is a schematic flow chart of an encryption-based face recognition method according to another embodiment of the present invention. The method can be executed by the service equipment, can be applied to face recognition scenes, stores and transmits the encrypted face data, and can not influence the safety of personal information if the encrypted face data is leaked, so that the safety of the personal information is improved. The face recognition method based on encryption comprises the following steps:
Step S201, receiving and decrypting the display code to obtain a second current corresponding code corresponding to the display code.
In the embodiment of the invention, the display code is obtained by encrypting the terminal equipment based on a first current corresponding code, the first current corresponding code is obtained by updating the terminal equipment based on a historical first corresponding code, the historical first corresponding code comprises an initial corresponding code, and the initial corresponding code is obtained based on the characteristic of the registered face ciphertext.
Step S202, a prestored registered face ciphertext feature is obtained based on the second current corresponding code.
As an alternative embodiment, the registered face ciphertext feature is pre-stored by:
acquiring a registered face image, and acquiring a registered face plaintext feature based on the registered face image; the registered face plaintext features at least comprise a registered eyebrow feature group, a registered eye feature group, a registered nose feature group, a registered mouth feature group and a registered face feature group;
encrypting each feature group of the registered face plaintext feature to obtain a registered face ciphertext feature, wherein the registered face ciphertext feature comprises ciphertext feature groups of each feature group, and one feature group corresponds to one ciphertext feature group;
Randomly storing each ciphertext feature group in the registered face ciphertext feature respectively to obtain a storage position serial number corresponding to each ciphertext feature group respectively;
the initial corresponding code is obtained by the following method:
determining initial corresponding codes corresponding to the registered face ciphertext features according to the serial numbers of the storage positions;
the service equipment sends the initial corresponding code to the terminal equipment so that the terminal equipment obtains a display code based on the initial corresponding code;
the service device also takes the initial corresponding code as an initial second current corresponding code.
By implementing the embodiment, the service device can acquire the plain text features of the registered face from the registered face image, encrypt the plain text features of the registered face to obtain the ciphertext features of the registered face, and delete the plain text features of the registered face and the registered face image while storing the ciphertext features of the registered face, so that the plain text information of the registered face and the registered face image are not stored in the service device, and the safety of the face information is ensured. The initial corresponding code of the registered face ciphertext feature can be determined according to the storage position of the registered face ciphertext feature in the service equipment, namely the storage position of the registered face ciphertext feature can be determined in the service equipment according to the initial corresponding code, and further the registered face ciphertext feature corresponding to the initial corresponding code is obtained. And sending the initial corresponding code to the terminal equipment, so that the terminal equipment and the service equipment can be bound, and when receiving the display code sent by the terminal equipment and obtained based on the initial corresponding code, the terminal equipment can acquire the registered face ciphertext features corresponding to the terminal equipment, so that the terminal equipment can accurately perform face recognition based on the registered face ciphertext features, and the accuracy of face recognition is improved.
In the embodiment of the invention, the second current corresponding code is updated only after the service equipment receives the corresponding code updating instruction fed back by the terminal equipment; because the corresponding code updating instruction can indicate that the terminal equipment receives the initial corresponding code, the second current corresponding code is updated after the corresponding code updating instruction is received, so that the first current corresponding code of the terminal equipment and the second current corresponding code of the service equipment can be synchronously updated, and the condition that the first current corresponding code of the terminal equipment and the second current corresponding code of the service equipment are not synchronous is avoided.
In the embodiment of the invention, the service device encrypts the second current corresponding code as a historical second corresponding code every second preset time length to obtain an encrypted corresponding code, wherein the encrypted corresponding code is an updated second current corresponding code; the second current corresponding code represents the current storage position serial numbers respectively corresponding to the ciphertext feature groups; the second corresponding code of the history represents the corresponding historical storage position serial numbers of the ciphertext feature groups respectively; each ciphertext feature group corresponds to a historical storage position sequence number and a current storage position sequence number; the current storage position serial number is used for transferring the ciphertext feature group corresponding to the current storage position serial number from the storage position corresponding to the historical storage position serial number to the storage position corresponding to the current storage position serial number. After the second current corresponding code is used as the historical second corresponding code to encrypt the updated second current corresponding code, each ciphertext feature group stored in the service equipment is transferred from the storage position corresponding to the historical storage position sequence number to the storage position corresponding to the current storage position sequence number, so that the storage position of the ciphertext feature group changes along with the updating of the second current corresponding code, the fact that the second current corresponding code can still directly acquire the corresponding registered face ciphertext feature from the service equipment after updating is ensured, and the accuracy of acquiring the registered face ciphertext feature is improved.
Step 203, the registered face ciphertext feature is sent to the terminal device, so that the terminal device decrypts the registered face ciphertext feature to obtain a registered face plaintext feature, and the face image to be identified is identified based on the registered face plaintext feature to obtain a face identification result.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating a storage location of a registered face ciphertext feature based on a second current corresponding code according to an embodiment of the present invention, wherein:
the service equipment can extract the plaintext features of the registered face from the registered face image and encrypt the plaintext features of the registered face to obtain ciphertext features of the registered face; the registered face ciphertext features may include a registered eyebrow encryption feature set, a registered eye encryption feature set, a registered nose encryption feature set, a registered mouth encryption feature set, and a registered face encryption feature set.
Each group of encryption feature groups in the registered face ciphertext features can be randomly stored in a data table of the service equipment, and each group of encryption feature groups corresponds to a storage position serial number. The first storage schematic diagram of the registered face ciphertext feature may be as shown in the service device data table 1, where the storage location number of the registered eyebrow encryption feature set is 8, the storage location number of the registered eye encryption feature set is 3, the storage location number of the registered nose encryption feature set is 13, the storage location number of the registered mouth encryption feature set is 6, and the storage location number of the registered face encryption feature set is 18. At this time, the initial corresponding code may be: (8,3,13,6,18); the service device can send the initial corresponding code to the terminal device, so that the terminal device feeds back a corresponding code updating instruction to the service device, and updates the received initial corresponding code as a historical first corresponding code after a first preset duration to obtain a first current corresponding code; and the service equipment updates the initial corresponding code as a historical second corresponding code through a second preset duration after receiving a corresponding code updating instruction fed back by the terminal equipment, so as to obtain a second current corresponding code. The updating mode of the first current corresponding code obtained by the terminal equipment is the same as the updating mode of the second current corresponding code obtained by the service equipment, and the first current corresponding code obtained by the terminal equipment is the same as the second current corresponding code obtained by the service equipment.
The updated first current corresponding code and the second current corresponding code may be: (21,14,2,9,7) the service device may determine an updated storage location sequence number for each of the encrypted feature groups in the registered face ciphertext feature according to the second current corresponding code. Specifically, the storage position number of the registered eyebrow encryption feature set is changed from 8 to 21, the storage position number of the registered eye encryption feature set is changed from 3 to 14, the storage position number of the registered nose encryption feature set is changed from 13 to 2, the storage position number of the registered mouth encryption feature set is changed from 6 to 9, and the storage position number of the registered face encryption feature set is changed from 18 to 18.
The terminal equipment can encrypt the first current corresponding code to obtain a display code; under the condition that the terminal equipment needs to perform face recognition, the display code can be sent to the service equipment; the service equipment stores a decryption algorithm for decrypting the display code in advance, and a second current corresponding code can be obtained by decrypting the display code; the second current corresponding code obtained by decryption is actually the same as the latest second current corresponding code updated by self in the service equipment. Therefore, the service device can determine the current storage position serial number of the registered face ciphertext feature stored in the service device based on the current corresponding code obtained through decryption, further can acquire the registered face ciphertext feature required by the terminal device based on the current storage position serial number, and feeds back the registered face ciphertext feature to the terminal device, so that the terminal device can finish face recognition based on the registered face ciphertext feature.
The invention can store and transmit the encrypted face data, and if the encrypted face data is leaked, the safety of personal information is not affected, and the safety of the personal information is improved. In addition, the method and the device can also improve the security of the first current corresponding code. In addition, the invention can also improve the accuracy of the face recognition result. In addition, the invention can also ensure the safety of the face information. In addition, the invention can also improve the accuracy of acquiring the characteristic of the registered face ciphertext.
Exemplary System
Having described the method of an exemplary embodiment of the present invention, an encryption-based face recognition system of an exemplary embodiment of the present invention is described next with reference to fig. 4, the system comprising a terminal device 401 and a service device 402, wherein:
the terminal device 401 is configured to obtain a face image to be identified and a display code, and send the display code to the service device 402; the display code is obtained by encryption based on a first current corresponding code, the first current corresponding code is obtained by updating based on a historical first corresponding code, the historical first corresponding code comprises an initial corresponding code, and the initial corresponding code is obtained based on registered face ciphertext characteristics;
The service device 402 is configured to receive the display code and decrypt the display code to obtain a second current corresponding code corresponding to the display code; acquiring prestored registered face ciphertext features based on the second current corresponding code; and sending the registered face ciphertext feature to the terminal device 401;
the terminal device 401 is further configured to receive and decrypt the registered face ciphertext feature to obtain a registered face plaintext feature; and identifying the face image to be identified based on the plain text features of the registered face to obtain a face identification result.
As an optional implementation manner, the initial corresponding code is obtained by the service device based on the characteristic encryption of the registered face ciphertext and is sent to the terminal device; the terminal equipment encrypts the first current corresponding code as a historical first corresponding code every first preset time length to obtain an encrypted corresponding code, wherein the encrypted corresponding code is an updated first current corresponding code; the encryption mode of the corresponding code after the encryption is different from the encryption mode of the display code. The first current corresponding code can be encrypted once every a first preset time length, so that the first current corresponding code is always in a change state, and is difficult to crack when the first current corresponding code is leaked or illegally acquired, and the safety of the first current corresponding code is improved.
As an optional implementation manner, the registered face plaintext features at least include a registered eyebrow feature set, a registered eye feature set, a registered nose feature set, a registered mouth feature set and a registered face feature set;
the manner in which the terminal device 401 identifies the face image to be identified based on the plaintext feature of the registered face may specifically be:
acquiring current face features based on the face image to be recognized; the current facial features at least comprise a current eyebrow feature set, a current eye feature set, a current nose feature set, a current mouth feature set and a current face feature set;
and identifying the current face features based on the plain text features of the registered faces to obtain face recognition results.
The implementation of the embodiment can acquire the current face characteristics from the face image to be recognized, wherein the current face characteristics can comprise a current eyebrow characteristic group, a current eye characteristic group, a current nose characteristic group, a current mouth characteristic group and a current face type characteristic group; registering the face plaintext feature may include registering an eyebrow feature set, registering an eye feature set, registering a nose feature set, registering a mouth feature set, and registering a face feature set; and comparing each group of feature groups in the current face features with each group of feature groups in the registered face plaintext features to obtain a comparison result of the current face features and the registered face plaintext features, namely a face recognition result, so that the accuracy of the face recognition result is improved.
As an alternative embodiment, the registered face ciphertext feature is pre-stored by:
the service device 402 obtains a registered face image, and obtains a registered face plaintext feature based on the registered face image; the registered face plaintext features at least comprise a registered eyebrow feature group, a registered eye feature group, a registered nose feature group, a registered mouth feature group and a registered face feature group;
the service device 402 encrypts each feature set of the registered face plaintext feature to obtain a registered face ciphertext feature, where the registered face ciphertext feature includes ciphertext feature sets of each feature set, and one feature set corresponds to one ciphertext feature set;
the service device 402 randomly stores each ciphertext feature group in the registered face ciphertext feature respectively, so as to obtain a storage position serial number corresponding to each ciphertext feature group respectively;
the initial corresponding code is obtained by the following method:
the service device 402 determines an initial corresponding code corresponding to the registered face ciphertext feature according to the sequence numbers of the storage positions;
the service device 402 sends the initial corresponding code to the terminal device, so that the terminal device obtains a display code based on the initial corresponding code;
The service device 402 also takes the initial corresponding code as an initial second current corresponding code.
By implementing the embodiment, the service device can acquire the plain text features of the registered face from the registered face image, encrypt the plain text features of the registered face to obtain the ciphertext features of the registered face, and delete the plain text features of the registered face and the registered face image while storing the ciphertext features of the registered face, so that the plain text information of the registered face and the registered face image are not stored in the service device, and the safety of the face information is ensured. The initial corresponding code of the registered face ciphertext feature can be determined according to the storage position of the registered face ciphertext feature in the service equipment, namely the storage position of the registered face ciphertext feature can be determined in the service equipment according to the initial corresponding code, and further the registered face ciphertext feature corresponding to the initial corresponding code is obtained. And sending the initial corresponding code to the terminal equipment, so that the terminal equipment and the service equipment can be bound, and when receiving the display code sent by the terminal equipment and obtained based on the initial corresponding code, the terminal equipment can acquire the registered face ciphertext features corresponding to the terminal equipment, so that the terminal equipment can accurately perform face recognition based on the registered face ciphertext features, and the accuracy of face recognition is improved.
As an optional implementation manner, the service device 402 encrypts the second current corresponding code as a historical second corresponding code every second preset time period to obtain an encrypted corresponding code, where the encrypted corresponding code is an updated second current corresponding code;
the second current corresponding code represents the current storage position serial numbers respectively corresponding to the ciphertext feature groups; the second corresponding code of the history represents the corresponding historical storage position serial numbers of the ciphertext feature groups respectively; each ciphertext feature group corresponds to a historical storage position sequence number and a current storage position sequence number; the current storage position serial number is used for transferring the ciphertext feature group corresponding to the current storage position serial number from the storage position corresponding to the historical storage position serial number to the storage position corresponding to the current storage position serial number. After the second current corresponding code is used as the historical second corresponding code to encrypt the updated second current corresponding code, each ciphertext feature group stored in the service equipment is transferred from the storage position corresponding to the historical storage position sequence number to the storage position corresponding to the current storage position sequence number, so that the storage position of the ciphertext feature group changes along with the updating of the second current corresponding code, the fact that the second current corresponding code can still directly acquire the corresponding registered face ciphertext feature from the service equipment after updating is ensured, and the accuracy of acquiring the registered face ciphertext feature is improved.
Exemplary apparatus
Having described the method and system of the exemplary embodiments of the present invention, a terminal device of the exemplary embodiments of the present invention will be described with reference to fig. 5, the terminal device including:
a first obtaining unit 501, configured to obtain a face image to be identified and a display code, where the display code is obtained by encrypting based on a first current corresponding code, the first current corresponding code is obtained by updating based on a historical first corresponding code, the historical first corresponding code includes an initial corresponding code, and the initial corresponding code is obtained based on a registered face ciphertext feature;
a display code sending unit 502, configured to send the display code acquired by the first acquiring unit 501 to a service device, so that the service device returns the registered face ciphertext feature based on the display code;
a feature decryption unit 503, configured to receive and decrypt the registered face ciphertext feature, to obtain a registered face plaintext feature;
the identifying unit 504 is configured to identify the face image to be identified acquired by the first acquiring unit 501 based on the plaintext feature of the registered face acquired by the feature decrypting unit 503, so as to obtain a face identification result.
As an optional implementation manner, the initial corresponding code is obtained by the service device based on the characteristic encryption of the registered face ciphertext and is sent to the terminal device;
The terminal equipment encrypts the first current corresponding code as a historical first corresponding code every first preset time length to obtain an encrypted corresponding code, wherein the encrypted corresponding code is an updated first current corresponding code; the encryption mode of the corresponding code after the encryption is different from the encryption mode of the display code.
By implementing the implementation mode, the first current corresponding code can be encrypted once every a first preset time length, so that the first current corresponding code is always in change, and is difficult to crack when the first current corresponding code is leaked or illegally acquired, and the safety of the first current corresponding code is improved.
As an optional implementation manner, the registered face plaintext features at least include a registered eyebrow feature set, a registered eye feature set, a registered nose feature set, a registered mouth feature set and a registered face feature set;
the identifying unit 504 identifies the face image to be identified based on the plaintext feature of the registered face, and the manner of obtaining the face identification result may specifically be:
acquiring current face features based on the face image to be recognized; the current facial features at least comprise a current eyebrow feature set, a current eye feature set, a current nose feature set, a current mouth feature set and a current face feature set;
And identifying the current face features based on the plain text features of the registered faces to obtain face recognition results.
The implementation of the embodiment can acquire the current face characteristics from the face image to be recognized, wherein the current face characteristics can comprise a current eyebrow characteristic group, a current eye characteristic group, a current nose characteristic group, a current mouth characteristic group and a current face type characteristic group; registering the face plaintext feature may include registering an eyebrow feature set, registering an eye feature set, registering a nose feature set, registering a mouth feature set, and registering a face feature set; and comparing each group of feature groups in the current face features with each group of feature groups in the registered face plaintext features to obtain a comparison result of the current face features and the registered face plaintext features, namely a face recognition result, so that the accuracy of the face recognition result is improved.
Fig. 6 illustrates a service apparatus according to an exemplary embodiment of the present invention, the service apparatus including:
the display code decryption unit 601 is configured to receive and decrypt a display code, and obtain a second current corresponding code corresponding to the display code; the display code is obtained by encrypting the terminal equipment based on a first current corresponding code, the first current corresponding code is obtained by updating the terminal equipment based on a historical first corresponding code, the historical first corresponding code comprises an initial corresponding code, and the initial corresponding code is obtained based on the characteristic of registered face ciphertext;
A second obtaining unit 602, configured to obtain a prestored registered face ciphertext feature based on the second current corresponding code obtained by the display code decrypting unit 601;
the feature sending unit 603 is configured to send the registered face ciphertext feature obtained by the second obtaining unit 602 to the terminal device, so that the terminal device decrypts the registered face ciphertext feature to obtain a registered face plaintext feature, and identify a face image to be identified based on the registered face plaintext feature to obtain a face recognition result.
As an alternative embodiment, the registered face ciphertext feature is pre-stored by:
acquiring a registered face image, and acquiring a registered face plaintext feature based on the registered face image; the registered face plaintext features at least comprise a registered eyebrow feature group, a registered eye feature group, a registered nose feature group, a registered mouth feature group and a registered face feature group;
encrypting each feature group of the registered face plaintext feature to obtain a registered face ciphertext feature, wherein the registered face ciphertext feature comprises ciphertext feature groups of each feature group, and one feature group corresponds to one ciphertext feature group;
Randomly storing each ciphertext feature group in the registered face ciphertext feature respectively to obtain a storage position serial number corresponding to each ciphertext feature group respectively;
the initial corresponding code is obtained by the following method:
determining initial corresponding codes corresponding to the registered face ciphertext features according to the serial numbers of the storage positions;
the service equipment sends the initial corresponding code to the terminal equipment so that the terminal equipment obtains a display code based on the initial corresponding code;
the service device also takes the initial corresponding code as an initial second current corresponding code.
By implementing the embodiment, the service device can acquire the plain text features of the registered face from the registered face image, encrypt the plain text features of the registered face to obtain the ciphertext features of the registered face, and delete the plain text features of the registered face and the registered face image while storing the ciphertext features of the registered face, so that the plain text information of the registered face and the registered face image are not stored in the service device, and the safety of the face information is ensured. The initial corresponding code of the registered face ciphertext feature can be determined according to the storage position of the registered face ciphertext feature in the service equipment, namely the storage position of the registered face ciphertext feature can be determined in the service equipment according to the initial corresponding code, and further the registered face ciphertext feature corresponding to the initial corresponding code is obtained. And sending the initial corresponding code to the terminal equipment, so that the terminal equipment and the service equipment can be bound, and when receiving the display code sent by the terminal equipment and obtained based on the initial corresponding code, the terminal equipment can acquire the registered face ciphertext features corresponding to the terminal equipment, so that the terminal equipment can accurately perform face recognition based on the registered face ciphertext features, and the accuracy of face recognition is improved.
As an optional implementation manner, the service device encrypts the second current corresponding code as a historical second corresponding code every second preset time length to obtain an encrypted corresponding code, where the encrypted corresponding code is an updated second current corresponding code;
the second current corresponding code represents the current storage position serial numbers respectively corresponding to the ciphertext feature groups; the second corresponding code of the history represents the corresponding historical storage position serial numbers of the ciphertext feature groups respectively; each ciphertext feature group corresponds to a historical storage position sequence number and a current storage position sequence number; the current storage position serial number is used for transferring the ciphertext feature group corresponding to the current storage position serial number from the storage position corresponding to the historical storage position serial number to the storage position corresponding to the current storage position serial number. After the second current corresponding code is used as the historical second corresponding code to encrypt the updated second current corresponding code, each ciphertext feature group stored in the service equipment is transferred from the storage position corresponding to the historical storage position sequence number to the storage position corresponding to the current storage position sequence number, so that the storage position of the ciphertext feature group changes along with the updating of the second current corresponding code, the fact that the second current corresponding code can still directly acquire the corresponding registered face ciphertext feature from the service equipment after updating is ensured, and the accuracy of acquiring the registered face ciphertext feature is improved.
Exemplary Medium
Having described the method and apparatus of the exemplary embodiments of the present invention, reference is next made to fig. 7 for describing a computer readable storage medium of the exemplary embodiments of the present invention, and referring to fig. 7, the computer readable storage medium is shown as an optical disc 70, on which a computer program (i.e., a program product) is stored, where the computer program, when executed by a processor, implements the steps described in the above method embodiments, for example, obtaining a face image to be identified and a presentation code, where the presentation code is encrypted based on a first current corresponding code, the first current corresponding code is updated based on a historical first corresponding code, and the historical first corresponding code includes an initial corresponding code, and the initial corresponding code is obtained based on a registered face ciphertext feature; sending the display code to service equipment so that the service equipment returns the registered face ciphertext feature based on the display code; receiving and decrypting the registered face ciphertext features to obtain registered face plaintext features; identifying the face image to be identified based on the plain text features of the registered face to obtain a face identification result; the specific implementation of each step is not repeated here.
It should be noted that examples of the computer readable storage medium may also include, but are not limited to, a phase change memory (PRAM), a Static Random Access Memory (SRAM), a Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a flash memory, or other optical or magnetic storage medium, which will not be described in detail herein.
Exemplary computing device
Having described the methods, apparatus and media of exemplary embodiments of the present invention, next, computing devices for encryption-based face recognition of exemplary embodiments of the present invention are described with reference to fig. 8.
FIG. 8 illustrates a block diagram of an exemplary computing device 80 suitable for use in implementing embodiments of the invention, the computing device 80 may be a computer system or a server. The computing device 80 shown in fig. 8 is merely an example and should not be taken as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 8, components of computing device 80 may include, but are not limited to: one or more processors or processing units 801, a system memory 802, and a bus 803 that connects the various system components (including the system memory 802 and processing units 801).
Computing device 80 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computing device 80 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 802 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 8021 and/or cache memory 8022. Computing device 80 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, ROM8023 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 8, commonly referred to as a "hard disk drive"). Although not shown in fig. 8, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media), may be provided. In such cases, each drive may be coupled to bus 803 via one or more data medium interfaces. The system memory 802 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the embodiments of the invention.
A program/utility 8025 having a set (at least one) of program modules 8024 may be stored, for example, in system memory 802, and such program modules 8024 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 8024 generally perform the functions and/or methods in the embodiments described herein.
The computing device 80 may also communicate with one or more external devices 804 (e.g., keyboard, pointing device, display, etc.). Such communication may occur through an input/output (I/O) interface 805. Moreover, computing device 80 may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through network adapter 806. As shown in fig. 8, network adapter 806 communicates with other modules of computing device 80 (e.g., processing unit 801, etc.) over bus 803. It should be appreciated that although not shown in fig. 8, other hardware and/or software modules may be used in connection with computing device 80.
The processing unit 801 executes various functional applications and data processing by running a program stored in the system memory 802, for example, acquires a face image to be recognized and a presentation code, wherein the presentation code is encrypted based on a first current correspondence code, the first current correspondence code is updated based on a history first correspondence code, the history first correspondence code includes an initial correspondence code, and the initial correspondence code is obtained based on a registered face ciphertext feature; sending the display code to service equipment so that the service equipment returns the registered face ciphertext feature based on the display code; receiving and decrypting the registered face ciphertext features to obtain registered face plaintext features; and identifying the face image to be identified based on the plain text features of the registered face to obtain a face identification result. The specific implementation of each step is not repeated here. It should be noted that although in the above detailed description several units/modules or sub-units/sub-modules of an encryption based face recognition system are mentioned, such a division is only exemplary and not mandatory. Indeed, the features and functionality of two or more units/modules described above may be embodied in one unit/module in accordance with embodiments of the present invention. Conversely, the features and functions of one unit/module described above may be further divided into ones that are embodied by a plurality of units/modules.
In the description of the present invention, it should be noted that the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only memory (ROM), a random access memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Furthermore, although the operations of the methods of the present invention are depicted in the drawings in a particular order, this is not required to either imply that the operations must be performed in that particular order or that all of the illustrated operations be performed to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.

Claims (11)

1. An encryption-based face recognition method applied to terminal equipment, the method comprising:
acquiring a face image to be identified and a display code, wherein the display code is obtained by encrypting based on a first current corresponding code, the first current corresponding code is obtained by updating based on a historical first corresponding code, the historical first corresponding code comprises an initial corresponding code, and the initial corresponding code is obtained based on a registered face ciphertext feature;
sending the display code to service equipment so that the service equipment returns the registered face ciphertext feature based on the display code;
receiving and decrypting the registered face ciphertext features to obtain registered face plaintext features;
identifying the face image to be identified based on the plain text features of the registered face to obtain a face identification result;
the registered face ciphertext features are pre-stored by the service device by:
acquiring a registered face image, and acquiring a registered face plaintext feature based on the registered face image; the registered face plaintext features at least comprise a registered eyebrow feature group, a registered eye feature group, a registered nose feature group, a registered mouth feature group and a registered face feature group;
Encrypting each feature group of the registered face plaintext feature to obtain a registered face ciphertext feature, wherein the registered face ciphertext feature comprises ciphertext feature groups of each feature group, and one feature group corresponds to one ciphertext feature group;
randomly storing each ciphertext feature group in the registered face ciphertext feature respectively to obtain a storage position serial number corresponding to each ciphertext feature group respectively;
the initial corresponding code is acquired by the service device by:
and determining initial corresponding codes corresponding to the registered face ciphertext features according to the sequence numbers of the storage positions.
2. The encryption-based face recognition method according to claim 1, wherein the initial corresponding code is obtained by the service device based on the registered face ciphertext feature encryption and is sent to the terminal device;
the terminal equipment encrypts the first current corresponding code as a historical first corresponding code every first preset time length to obtain an encrypted corresponding code, wherein the encrypted corresponding code is an updated first current corresponding code; the encryption mode of the corresponding code after the encryption is different from the encryption mode of the display code.
3. The encryption-based face recognition method according to claim 1 or 2, wherein the registered face plaintext features include at least a registered eyebrow feature set, a registered eye feature set, a registered nose feature set, a registered mouth feature set, and a registered face shape feature set;
the step of identifying the face image to be identified based on the plain text features of the registered face to obtain a face identification result, which comprises the following steps:
acquiring current face features based on the face image to be recognized; the current facial features at least comprise a current eyebrow feature set, a current eye feature set, a current nose feature set, a current mouth feature set and a current face feature set;
and identifying the current face features based on the plain text features of the registered faces to obtain face recognition results.
4. An encryption-based face recognition method applied to service equipment, the method comprising:
receiving and decrypting the display code to obtain a second current corresponding code corresponding to the display code; the display code is obtained by encrypting the terminal equipment based on a first current corresponding code, the first current corresponding code is obtained by updating the terminal equipment based on a historical first corresponding code, the historical first corresponding code comprises an initial corresponding code, and the initial corresponding code is obtained based on the characteristic of registered face ciphertext;
Acquiring prestored registered face ciphertext features based on the second current corresponding code;
the registered face ciphertext features are sent to the terminal equipment, so that the terminal equipment decrypts the registered face ciphertext features to obtain registered face plaintext features, and face images to be identified are identified based on the registered face plaintext features to obtain face identification results;
the registered face ciphertext features are pre-stored in the following way:
acquiring a registered face image, and acquiring a registered face plaintext feature based on the registered face image; the registered face plaintext features at least comprise a registered eyebrow feature group, a registered eye feature group, a registered nose feature group, a registered mouth feature group and a registered face feature group;
encrypting each feature group of the registered face plaintext feature to obtain a registered face ciphertext feature, wherein the registered face ciphertext feature comprises ciphertext feature groups of each feature group, and one feature group corresponds to one ciphertext feature group;
randomly storing each ciphertext feature group in the registered face ciphertext feature respectively to obtain a storage position serial number corresponding to each ciphertext feature group respectively;
The initial corresponding code is obtained by the following method:
and determining initial corresponding codes corresponding to the registered face ciphertext features according to the sequence numbers of the storage positions.
5. The encryption-based face recognition method of claim 4, after the initial corresponding code is obtained, the method further comprises:
the initial corresponding code is sent to the terminal equipment, so that the terminal equipment obtains a display code based on the initial corresponding code; and taking the initial corresponding code as an initial second current corresponding code.
6. The encryption-based face recognition method according to claim 5, wherein the service device encrypts the second current corresponding code as a historical second corresponding code every second preset time period to obtain an encrypted corresponding code, and the encrypted corresponding code is an updated second current corresponding code;
the second current corresponding code represents the current storage position serial numbers respectively corresponding to the ciphertext feature groups; the second corresponding code of the history represents the corresponding historical storage position serial numbers of the ciphertext feature groups respectively; each ciphertext feature group corresponds to a historical storage position sequence number and a current storage position sequence number; the current storage position serial number is used for transferring the ciphertext feature group corresponding to the current storage position serial number from the storage position corresponding to the historical storage position serial number to the storage position corresponding to the current storage position serial number.
7. An encryption-based face recognition system, the system comprising a terminal device and a service device, wherein:
the terminal equipment is used for acquiring the face image to be identified and the display code and sending the display code to the service equipment; the display code is obtained by encryption based on a first current corresponding code, the first current corresponding code is obtained by updating based on a historical first corresponding code, the historical first corresponding code comprises an initial corresponding code, and the initial corresponding code is obtained based on registered face ciphertext characteristics;
the service equipment is used for receiving the display code and decrypting the display code to obtain a second current corresponding code corresponding to the display code; acquiring prestored registered face ciphertext features based on the second current corresponding code; and sending the registered face ciphertext feature to the terminal equipment;
the terminal equipment is also used for receiving and decrypting the registered face ciphertext characteristics to obtain registered face plaintext characteristics; the face image to be recognized is recognized based on the plaintext features of the registered face, and a face recognition result is obtained;
the service equipment is also used for acquiring a registered face image and acquiring a registered face plaintext characteristic based on the registered face image; the registered face plaintext features at least comprise a registered eyebrow feature group, a registered eye feature group, a registered nose feature group, a registered mouth feature group and a registered face feature group; the method comprises the steps of,
Encrypting each feature group of the registered face plaintext feature to obtain a registered face ciphertext feature, wherein the registered face ciphertext feature comprises ciphertext feature groups of each feature group, and one feature group corresponds to one ciphertext feature group; the method comprises the steps of,
randomly storing each ciphertext feature group in the registered face ciphertext feature respectively to obtain a storage position serial number corresponding to each ciphertext feature group respectively; the method comprises the steps of,
and determining initial corresponding codes corresponding to the registered face ciphertext features according to the sequence numbers of the storage positions.
8. A terminal device, comprising:
the first acquisition unit is used for acquiring a face image to be identified and a display code, wherein the display code is obtained by encryption based on a first current corresponding code, the first current corresponding code is obtained by updating based on a historical first corresponding code, the historical first corresponding code comprises an initial corresponding code, and the initial corresponding code is obtained based on registered face ciphertext characteristics;
the display code sending unit is used for sending the display code to service equipment so that the service equipment returns the registered face ciphertext characteristic based on the display code;
the feature decryption unit is used for receiving and decrypting the registered face ciphertext features to obtain registered face plaintext features;
The identification unit is used for identifying the face image to be identified based on the plaintext features of the registered face to obtain a face identification result;
the registered face ciphertext features are pre-stored by the service device by:
acquiring a registered face image, and acquiring a registered face plaintext feature based on the registered face image; the registered face plaintext features at least comprise a registered eyebrow feature group, a registered eye feature group, a registered nose feature group, a registered mouth feature group and a registered face feature group;
encrypting each feature group of the registered face plaintext feature to obtain a registered face ciphertext feature, wherein the registered face ciphertext feature comprises ciphertext feature groups of each feature group, and one feature group corresponds to one ciphertext feature group;
randomly storing each ciphertext feature group in the registered face ciphertext feature respectively to obtain a storage position serial number corresponding to each ciphertext feature group respectively;
the initial corresponding code is acquired by the service device by:
and determining initial corresponding codes corresponding to the registered face ciphertext features according to the sequence numbers of the storage positions.
9. A service device, comprising:
the display code decryption unit is used for receiving and decrypting the display code to obtain a second current corresponding code corresponding to the display code; the display code is obtained by encrypting the terminal equipment based on a first current corresponding code, the first current corresponding code is obtained by updating the terminal equipment based on a historical first corresponding code, the historical first corresponding code comprises an initial corresponding code, and the initial corresponding code is obtained based on the characteristic of registered face ciphertext;
the second acquisition unit is used for acquiring prestored registered face ciphertext features based on the second current corresponding code;
the characteristic sending unit is used for sending the registered face ciphertext characteristics to the terminal equipment so that the terminal equipment decrypts the registered face ciphertext characteristics to obtain registered face plaintext characteristics, and identifies the face image to be identified based on the registered face plaintext characteristics to obtain a face identification result;
the registered face ciphertext features are pre-stored in the following way:
acquiring a registered face image, and acquiring a registered face plaintext feature based on the registered face image; the registered face plaintext features at least comprise a registered eyebrow feature group, a registered eye feature group, a registered nose feature group, a registered mouth feature group and a registered face feature group;
Encrypting each feature group of the registered face plaintext feature to obtain a registered face ciphertext feature, wherein the registered face ciphertext feature comprises ciphertext feature groups of each feature group, and one feature group corresponds to one ciphertext feature group;
randomly storing each ciphertext feature group in the registered face ciphertext feature respectively to obtain a storage position serial number corresponding to each ciphertext feature group respectively;
the initial corresponding code is obtained by the following method:
and determining initial corresponding codes corresponding to the registered face ciphertext features according to the sequence numbers of the storage positions.
10. A computing device, the computing device comprising:
at least one processor, memory, and input output unit;
wherein the memory is configured to store a computer program, and the processor is configured to invoke the computer program stored in the memory to perform the method of any of claims 1-6.
11. A computer readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 6.
CN202310083130.5A 2023-02-08 2023-02-08 Encryption-based face recognition method, related device and storage medium Active CN115880789B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310083130.5A CN115880789B (en) 2023-02-08 2023-02-08 Encryption-based face recognition method, related device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310083130.5A CN115880789B (en) 2023-02-08 2023-02-08 Encryption-based face recognition method, related device and storage medium

Publications (2)

Publication Number Publication Date
CN115880789A CN115880789A (en) 2023-03-31
CN115880789B true CN115880789B (en) 2023-06-30

Family

ID=85760852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310083130.5A Active CN115880789B (en) 2023-02-08 2023-02-08 Encryption-based face recognition method, related device and storage medium

Country Status (1)

Country Link
CN (1) CN115880789B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115310057A (en) * 2022-07-13 2022-11-08 奇安信科技集团股份有限公司 Encryption and decryption method, device, equipment and storage medium for preventing inverse compilation

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10075301B2 (en) * 2015-07-13 2018-09-11 Fujitsu Limited Relational encryption for password verification
CN110363472B (en) * 2019-07-04 2021-09-14 中交机电工程局有限公司 Electromechanical material coding method
CN110955874A (en) * 2019-10-12 2020-04-03 深圳壹账通智能科技有限公司 Identity authentication method, identity authentication device, computer equipment and storage medium
CN114140837A (en) * 2020-08-12 2022-03-04 腾讯科技(深圳)有限公司 Face recognition method, template configuration method, device, equipment and storage medium
CN111738238B (en) * 2020-08-14 2020-11-13 支付宝(杭州)信息技术有限公司 Face recognition method and device
CN114792009A (en) * 2021-01-25 2022-07-26 华为技术有限公司 Data management method, equipment and system
CN112948795B (en) * 2021-02-19 2022-04-12 支付宝(杭州)信息技术有限公司 Identity authentication method and device for protecting privacy
CN114969768A (en) * 2021-02-26 2022-08-30 中移(苏州)软件技术有限公司 Data processing method and device and storage medium
CN112949545B (en) * 2021-03-17 2022-12-30 中国工商银行股份有限公司 Method, apparatus, computing device and medium for recognizing face image
CN114758388A (en) * 2022-03-31 2022-07-15 北京瑞莱智慧科技有限公司 Face recognition method, related device and storage medium
CN114707166A (en) * 2022-04-11 2022-07-05 平安国际智慧城市科技股份有限公司 Data storage and reading method, device, equipment and storage medium
CN114943090B (en) * 2022-07-22 2022-11-22 图灵人工智能研究院(南京)有限公司 Homomorphic encryption-based large-scale face library hiding query method
CN115240262A (en) * 2022-08-02 2022-10-25 深圳市捷顺科技实业股份有限公司 Face recognition method, system, computer device and medium based on end-side cooperation
CN115565222A (en) * 2022-09-22 2023-01-03 浙江大华技术股份有限公司 Face recognition method, face recognition system, terminal device and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115310057A (en) * 2022-07-13 2022-11-08 奇安信科技集团股份有限公司 Encryption and decryption method, device, equipment and storage medium for preventing inverse compilation

Also Published As

Publication number Publication date
CN115880789A (en) 2023-03-31

Similar Documents

Publication Publication Date Title
CN108599930B (en) Firmware encryption and decryption system and method
CN108197485B (en) Terminal data encryption method and system and terminal data decryption method and system
WO2020215568A1 (en) Communication number changing method, apparatus and system, computer device and storage medium
CN110100422B (en) Data writing method and device based on block chain intelligent contract and storage medium
US5778072A (en) System and method to transparently integrate private key operations from a smart card with host-based encryption services
CN108898005B (en) Hard disk identification method, system, equipment and computer readable storage medium
CN112507365B (en) Data matching method, terminal and storage medium
CN109936546B (en) Data encryption storage method and device and computing equipment
CN110334531B (en) Virtual machine key management method, master node, system, storage medium and device
CN108667784B (en) System and method for protecting internet identity card verification information
CN115795538A (en) Desensitization document anti-desensitization method, apparatus, computer device and storage medium
JP2017516343A (en) Address book protection method, apparatus and communication system
US20220092221A1 (en) Systems and methods for real-time encryption of sensitive data
CN110545542A (en) Main control key downloading method and device based on asymmetric encryption algorithm and computer equipment
CN114238883A (en) Identity authentication method, device, equipment and storage medium
CN113946862A (en) Data processing method, device and equipment and readable storage medium
CN111666577B (en) Data decryption method, device, equipment and storage medium
CN115880789B (en) Encryption-based face recognition method, related device and storage medium
JP2007020065A (en) Decryption backup method, decryption restoration method, attestation device, individual key setting machine, user terminal, backup equipment, encryption backup program, decryption restoration program
KR101156102B1 (en) Memory card reader apparatus having security features and the method thereof
CN108881106B (en) System and method for network electronic identity verification
CN115757535A (en) Data query method, data storage method and device and electronic equipment
KR20170048767A (en) Apparatus for generating barcode using homomorphic encryption and Method thereof
CN114679724A (en) Key updating system and method
CN113992359A (en) Encryption control method and device for user information, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Encrypted facial recognition methods, related devices, and storage media

Granted publication date: 20230630

Pledgee: Hangzhou United Rural Commercial Bank Limited by Share Ltd. Baoshan Branch

Pledgor: Zhonghao Xinying (Hangzhou) Technology Co.,Ltd.

Registration number: Y2024980001698