CN115880789A - Face recognition method based on encryption, related device and storage medium - Google Patents

Face recognition method based on encryption, related device and storage medium Download PDF

Info

Publication number
CN115880789A
CN115880789A CN202310083130.5A CN202310083130A CN115880789A CN 115880789 A CN115880789 A CN 115880789A CN 202310083130 A CN202310083130 A CN 202310083130A CN 115880789 A CN115880789 A CN 115880789A
Authority
CN
China
Prior art keywords
face
corresponding code
ciphertext
registered
code
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.)
Granted
Application number
CN202310083130.5A
Other languages
Chinese (zh)
Other versions
CN115880789B (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 recognized 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 the characteristic of a registered face ciphertext; sending the display code to service equipment so that the service equipment returns the registered face ciphertext characteristics 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 registered face plaintext characteristics to obtain a face identification result. The invention stores and transmits the encrypted face data, thereby improving the safety of personal information.

Description

Face recognition method based on encryption, 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, face recognition is widely applied to business scenes such as mobile phone recognition and customer payment, and the recognition mode is very convenient to use. But is convenient and not free from worrying about information safety. Common user passwords can be changed frequently to ensure the security of the passwords. However, private information such as a face has characteristics of uniqueness, unchangeability for a long time, and the like, and in the prior art, face identification information is usually directly stored or transmitted, and if the face identification information is leaked, the security of personal information is reduced.
Disclosure of Invention
In this context, embodiments of the present invention are intended to provide an encryption-based face recognition method, a related apparatus, and a storage medium.
In a first aspect of embodiments of the present invention, a face recognition method is provided, where the face recognition method is applied to a terminal device, and the method includes:
acquiring a face image to be recognized 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 the characteristic of a registered face ciphertext;
sending the display code to service equipment so that the service equipment returns the registered face ciphertext characteristics based on the display code;
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 registered face plaintext characteristics to obtain a face identification result.
In an embodiment of this embodiment, the initial corresponding code is obtained by encrypting, by the service device, based on the feature 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 other first preset time length to obtain an encrypted corresponding code, wherein the encrypted corresponding code is an updated first current corresponding code; and obtaining the encrypted corresponding code in an encryption mode different from that of obtaining the display code.
In an embodiment 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 recognizing the face image to be recognized based on the registered face plaintext characteristics to obtain a face recognition result, which comprises the following steps:
acquiring current face features based on the face image to be recognized; the current face features at least comprise a current eyebrow feature group, a current eye feature group, a current nose feature group, a current mouth feature group and a current face feature group;
and identifying the current face features based on the registered face plaintext features to obtain a face identification result.
In a second aspect of the embodiments of the present invention, there is provided an encryption-based face recognition method applied to a service device, the method including:
receiving and decrypting a display code to obtain a second current corresponding code corresponding to the display code; the display code is obtained by terminal equipment through encryption based on a first current corresponding code, the first current corresponding code is obtained through 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 feature of a registered face ciphertext;
acquiring a prestored registered face ciphertext feature 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 identifying the face image to be identified based on the registered face plaintext features to obtain a face identification result.
In an embodiment of this embodiment, the registered face ciphertext feature is pre-stored in the following manner:
acquiring a registered face image, and acquiring registered face plaintext characteristics 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;
respectively encrypting each feature group of the registered face plaintext features to obtain registered face ciphertext features, wherein the registered face ciphertext features comprise 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 features respectively to obtain storage position serial numbers corresponding to each ciphertext feature group respectively;
the initial corresponding code is obtained by the following method:
determining an initial corresponding code corresponding to the registered face ciphertext feature according to the sequence number of each storage position;
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 equipment also takes the initial corresponding code as an initial second current corresponding code.
In an embodiment of this embodiment, the service device encrypts, every 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 number corresponding to each ciphertext feature group; the historical second corresponding codes represent historical storage position serial numbers respectively corresponding to all ciphertext feature groups; each ciphertext feature group corresponds to a historical storage position serial number and a current storage position serial number; and 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 embodiments of the present invention, there is provided an encryption-based face recognition system, the system including a terminal device and a service device, wherein:
the terminal equipment is used for acquiring a face image to be recognized and a display code and sending the display code to the service equipment; 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 registered face ciphertext characteristic;
the service equipment is used for receiving and decrypting the display code to obtain a second current corresponding code corresponding to the display code; acquiring a prestored registered face ciphertext characteristic based on the second current corresponding code; sending the registered face ciphertext features 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 registered face plaintext characteristics to obtain a face identification result.
In a fourth aspect of embodiments of the present invention, there is provided a terminal device, comprising:
the display device comprises a first acquisition unit, a second acquisition unit and a display unit, wherein the display unit is used for acquiring a face image to be recognized and a display code, the display code is obtained based on a first current corresponding code through encryption, the first current corresponding code is obtained based on historical first corresponding codes through updating, the historical first corresponding codes comprise initial corresponding codes, and the initial corresponding codes are obtained based on registered face ciphertext characteristics;
the display code sending unit is used for sending the display code to the service equipment so that the service equipment returns the registered face ciphertext characteristics based on the display code;
the characteristic decryption unit is used for receiving and decrypting the registered face ciphertext characteristics to obtain registered face plaintext characteristics;
and the recognition unit is used for recognizing the face image to be recognized based on the registered face plaintext characteristics to obtain a face recognition result.
In a fifth aspect of embodiments of the present invention, there is provided a service apparatus, comprising:
the display code decryption unit is used for receiving and decrypting the display codes to obtain second current corresponding codes corresponding to the display codes; the display code is obtained by terminal equipment through encryption based on a first current corresponding code, the first current corresponding code is obtained through 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 feature of a registered face ciphertext;
the second acquisition unit is used for acquiring the prestored registered face ciphertext characteristics based on the second current corresponding code;
and the characteristic sending unit is used for sending the registered face ciphertext characteristic to the terminal equipment so as to enable the terminal equipment to decrypt the registered face ciphertext characteristic to obtain a registered face plaintext characteristic, and identifying the face image to be identified based on the registered face plaintext characteristic 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, a memory, and an 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 the first aspects.
In a seventh aspect of embodiments of the present invention, there is provided a computer-readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of any one of the first aspects.
According to the face recognition method based on encryption, the related device and the storage medium, the encrypted registered face ciphertext data can be stored in the service equipment, the 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 the registered face plaintext data, and the face image to be recognized is subjected to face recognition based on the registered face plaintext data. Therefore, the embodiment of the invention stores and transmits 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.
Drawings
The above and other objects, features and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description, which proceeds with reference to the accompanying drawings. Several embodiments of the 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 flowchart of a face recognition method based on encryption according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a face recognition method based on encryption according to another embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a storage location of a registered face ciphertext feature being changed based on a second current corresponding code according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a face recognition system based on encryption 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 structural 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 with reference to several exemplary embodiments. It is understood that these embodiments are given only to enable those skilled in the art to better understand and to implement the present invention, and do not limit the scope of the present 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.
As will be appreciated by one skilled in the art, embodiments of the present invention may be embodied as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
According to the embodiment of the invention, a face recognition method based on encryption, a related device and a storage medium are provided.
It is to be noted that any number of elements in the figures are provided by way of example and not limitation, and any nomenclature is used for distinction only and not in any limiting sense.
The principles and spirit of the present invention are explained in detail below with reference to several representative embodiments of the invention.
Exemplary method
Referring to fig. 1, fig. 1 is a schematic flow chart of a face recognition method based on encryption according to an embodiment of the present invention. The method can be executed by the terminal equipment, can be applied to a face recognition scene, stores and transmits the encrypted face data, and cannot 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:
and S101, acquiring a face image to be recognized and a display code.
The embodiment of the invention is applied to terminal equipment, the number of the terminal equipment can be one or more, and the terminal equipment can be a smart phone, a tablet computer, a smart watch and the like, so that 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 feature of a 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 encrypting the service equipment based on the registered face ciphertext characteristics and is sent to the terminal equipment; the terminal equipment encrypts the first current corresponding code as a historical first corresponding code every other first preset time to obtain an encrypted corresponding code, wherein the encrypted corresponding code is an updated first current corresponding code; the encryption mode of the encrypted corresponding code is different from the encryption mode of the display code; the first current corresponding code can be encrypted once every first preset time length, so that the first current corresponding code is frequently in change, the first current corresponding code 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 receiving the initial corresponding code, the terminal device may feed back a corresponding code update instruction to the service device; after receiving the corresponding code updating instruction, the service device may encrypt the second current corresponding code as the historical second corresponding code every second preset time to obtain an encrypted corresponding code, where the encrypted corresponding code is the updated second current corresponding code. And the terminal equipment encrypts the first current corresponding code as a historical first corresponding code at intervals of a first preset time period after receiving the initial corresponding code to obtain an encrypted corresponding code, wherein the encrypted corresponding code is the updated first current corresponding code. The first preset time length is the same as the second preset time length, 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.
And step S102, sending the display code to service equipment so that the service equipment returns the registered face ciphertext characteristics 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, and the second current corresponding code can determine the current storage position of the registered face ciphertext feature stored in the service equipment, so that the registered face ciphertext feature can be obtained from the current storage position.
In the embodiment of the invention, the registered face ciphertext characteristics can comprise a plurality of ciphertext characteristic groups, and each ciphertext characteristic group can be respectively stored in different storage positions in the service equipment; therefore, the storage location number of each ciphertext feature group stored in the service device may be obtained, and the obtained plurality of storage location numbers may be determined as the second current corresponding code. Namely, the second current corresponding code represents the current storage position of the registered face ciphertext feature stored in the service equipment. The storage position of the registered face ciphertext feature is directly determined through the second current corresponding code, the acquisition process of the registered face ciphertext feature can be simplified, the storage position of the registered face ciphertext feature is determined without a database mapping establishing mode in the prior art, storage resources and calculation resources are saved, and the searching efficiency of the registered face ciphertext feature is improved.
And 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 characteristics are obtained by encrypting the registered face plaintext characteristics through the service equipment, and the registered face plaintext characteristics obtained by decrypting the registered face ciphertext characteristics are realized through the terminal equipment, namely a decryption algorithm for decrypting the registered face ciphertext characteristics can be stored in the terminal equipment in advance; 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.
And step S104, identifying the face image to be identified based on the registered face plaintext characteristics to obtain a face identification result.
In the embodiment of the invention, the registered face plaintext characteristics at least comprise a registered eyebrow characteristic group, a registered eye characteristic group, a registered nose characteristic group, a registered mouth characteristic group and a registered face characteristic group;
as an optional implementation manner, the manner of recognizing the face image to be recognized based on the registered face plaintext feature in step S104 to obtain the face recognition result may specifically be:
the identifying the face image to be identified based on the registered face plaintext characteristics to obtain a face identification result, comprising:
acquiring current face features based on the face image to be recognized; the current face features at least comprise a current eyebrow feature group, a current eye feature group, a current nose feature group, a current mouth feature group and a current face feature group;
and identifying the current face features based on the registered face plaintext features to obtain a face identification result.
By implementing the implementation mode, the current face characteristics can be obtained from the face image to be recognized, and 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 characteristic group; the registered face plaintext characteristics can comprise a registered eyebrow characteristic group, a registered eye characteristic group, a registered nose characteristic group, a registered mouth characteristic group and a registered face characteristic group; each group of feature groups in the current face features is compared with each group of feature groups in the registered face plaintext features, so that a comparison result of the current face features and the registered face plaintext features, namely a face recognition result, can be obtained, and the accuracy of the face recognition result is improved.
In the embodiment of the invention, the registered face plaintext characteristics can be obtained by extracting the characteristics of the acquired registered face image through the service equipment, the service equipment can extract a plurality of groups of characteristic points including eyebrows, eyes, a nose, a mouth, a face and the like from the registered face image, namely a registered eyebrow characteristic group, a registered eye characteristic group, a registered nose characteristic group, a registered mouth characteristic group and a registered face characteristic group are obtained, and the number of the characteristic points in each group of characteristic groups can be the same or different.
In the embodiment of the invention, 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 are respectively encrypted, so that a registered eyebrow encryption feature group, a registered eye encryption feature group, a registered nose encryption feature group, a registered mouth encryption feature group and a registered face encryption feature group can be obtained; the registered eyebrow encryption feature group, the registered eye encryption feature group, the registered nose encryption feature group, the registered mouth encryption feature group, and the registered face encryption feature group may be determined as registered face ciphertext features.
Furthermore, each encrypted feature group in the registered face ciphertext features may be stored in the service device, and the storage locations of each encrypted feature group are all different. Each group of encrypted feature groups can be randomly stored in the service equipment, so that the sequence number of the storage position of each group of encrypted feature groups is also random, and the safety of the face ciphertext features registered is 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 face image to be recognized. And comparing each feature group in the registered face plaintext features 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 registered face plaintext features are considered to have higher similarity with the current face features, and the face recognition is passed.
Referring to fig. 2, fig. 2 is a schematic flow chart of a face recognition method based on encryption according to another embodiment of the present invention. The method can be executed by the service equipment, can be applied to a face recognition scene, stores and transmits the encrypted face data, and cannot 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 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 feature of a registered face ciphertext.
And step S202, acquiring pre-stored registered face ciphertext characteristics based on the second current corresponding code.
As an optional implementation manner, the registered face ciphertext feature is pre-stored in the following manner:
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 features respectively to obtain registered face ciphertext features, wherein the registered face ciphertext features comprise 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 features respectively to obtain storage position serial numbers corresponding to each ciphertext feature group respectively;
the initial corresponding code is obtained by the following method:
determining an initial corresponding code corresponding to the registered face ciphertext characteristic according to the storage position serial numbers;
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 equipment also takes the initial corresponding code as an initial second current corresponding code.
By implementing the implementation mode, the service equipment can acquire the registered face plaintext characteristics from the registered face image, encrypt the registered face plaintext characteristics to obtain the registered face ciphertext characteristics, and delete the registered face plaintext characteristics and the registered face image while storing the registered face ciphertext characteristics, so that the registered face plaintext information and the registered face image are not stored in the service equipment, 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, that is, the position where the registered face ciphertext feature is stored can be determined in the service equipment according to the initial corresponding code, and then the registered face ciphertext feature corresponding to the initial corresponding code is obtained. And the initial corresponding code is sent to the terminal equipment, so that the terminal equipment can be bound with the service equipment, and when a display code which is sent by the terminal equipment and is obtained based on the initial corresponding code is received, the registered face ciphertext characteristic corresponding to the terminal equipment can be obtained, so that the terminal equipment can accurately perform face recognition based on the registered face ciphertext characteristic, 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; the corresponding code updating instruction can indicate that the terminal device receives the initial corresponding code, so that the second current corresponding code is updated after the corresponding code updating instruction is received, the first current corresponding code of the terminal device and the second current corresponding code of the service device can be synchronously updated, and the condition that the first current corresponding code of the terminal device and the second current corresponding code of the service device are not synchronous is avoided.
In the embodiment of the present invention, the service device encrypts, every 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 number corresponding to each ciphertext feature group; the historical second corresponding codes represent historical storage position serial numbers respectively corresponding to all ciphertext feature groups; each ciphertext feature group corresponds to a historical storage position serial number and a current storage position serial number; and 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 be encrypted to obtain an 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 serial number to the storage position corresponding to the current storage position serial number, so that the storage positions of the ciphertext feature groups change along with the update of the second current corresponding code, the corresponding registered face ciphertext feature can be directly obtained from the service equipment after the second current corresponding code is updated, and the accuracy of obtaining the registered face ciphertext feature is improved.
Step S203, sending the registered face ciphertext feature to the terminal device, so that the terminal device decrypts the registered face ciphertext feature to obtain a registered face plaintext feature, and recognizing the face image to be recognized based on the registered face plaintext feature to obtain a face recognition result.
Referring to fig. 3, fig. 3 is a schematic diagram of changing a storage location of a registered face ciphertext feature based on a second current corresponding code according to an embodiment of the present invention, where:
the service equipment can extract registered face plaintext characteristics from the registered face image and encrypt the registered face plaintext characteristics to obtain registered face ciphertext characteristics; the registered face ciphertext features may include a registered eyebrow encryption feature group, a registered eye encryption feature group, a registered nose encryption feature group, a registered mouth encryption feature group and a registered face encryption feature group.
Each group of encrypted feature groups in the registered face ciphertext features can be randomly stored in a data table of the service device, and each group of encrypted feature groups corresponds to a storage position serial number. As shown in the service device data table 1, the storage location number of the registered eyebrow encryption feature group is 8, the storage location number of the registered eye encryption feature group is 3, the storage location number of the registered nose encryption feature group is 13, the storage location number of the registered mouth encryption feature group is 6, and the storage location number of the registered face encryption feature group is 18. At this time, the initial corresponding code may be: (8, 3,13,6, 18); the service equipment can send the initial corresponding code to the terminal equipment so that the terminal equipment feeds back a corresponding code updating instruction to the service equipment, and updates the received initial corresponding code as a historical first corresponding code through a first preset time length to obtain a first current corresponding code; and meanwhile, after the service equipment receives a corresponding code updating instruction fed back by the terminal equipment, the service equipment updates the initial corresponding code as a historical second corresponding code through a second preset time length to obtain a second current corresponding code. The first preset time duration is the same as the second preset time duration, 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 at the moment, 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 and 7), the service equipment can determine the updated storage position serial number of each group of encrypted feature group in the registered face ciphertext feature according to the second current corresponding code. Specifically, the storage location number of the registered eyebrow encryption feature group is changed from 8 to 21, the storage location number of the registered eye encryption feature group is changed from 3 to 14, the storage location number of the registered nose encryption feature group is changed from 13 to 2, the storage location number of the registered mouth encryption feature group is changed from 6 to 9, and the storage location number of the registered face encryption feature group is changed from 18 to 18.
The terminal equipment can encrypt the first current corresponding code to obtain a display code; the display code can be sent to the service equipment under the condition that the terminal equipment needs to perform face recognition; the service equipment stores a decryption algorithm for decrypting the display code in advance, and can obtain a second current corresponding code by decrypting the display code; the decrypted second current corresponding code is actually the same as the latest second current corresponding code updated by the service device. 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 by decryption, further can obtain the registered face ciphertext feature required by the terminal device based on the current storage position serial number, and feeds the registered face ciphertext feature back to the terminal device, so that the terminal device can complete 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 invention can also improve the safety of the first current corresponding code. In addition, the method and the device 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 method and the device can also improve the accuracy of acquiring the registered face ciphertext features.
Exemplary System
Having described the method of an exemplary embodiment of the present invention, next, an encryption-based face recognition system of an exemplary embodiment of the present invention is described 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 recognized and a display code, and send the display code to the service device 402; 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 registered face ciphertext characteristic;
the service device 402 is configured to receive and decrypt the presentation code to obtain a second current corresponding code corresponding to the presentation code; acquiring a prestored registered face ciphertext characteristic based on the second current corresponding code; 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 registered face plaintext characteristics to obtain a face identification result.
As an optional implementation manner, the initial corresponding code is obtained by encrypting, by the service device, based on the feature 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 other first preset time length to obtain an encrypted corresponding code, wherein the encrypted corresponding code is an updated first current corresponding code; and obtaining the encrypted corresponding code in an encryption mode different from that of the display code. The first current corresponding code can be encrypted once every first preset time length, so that the first current corresponding code is frequently in change, the first current corresponding code 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 alternative 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 method for the terminal device 401 to recognize the face image to be recognized based on the registered face plaintext characteristics to obtain the face recognition result may specifically be as follows:
acquiring current face features based on the face image to be recognized; the current face features at least comprise a current eyebrow feature group, a current eye feature group, a current nose feature group, a current mouth feature group and a current face feature group;
and identifying the current face features based on the registered face plaintext features to obtain a face identification result.
By implementing the implementation mode, the current face features can be acquired from the face image to be recognized, and the current face features can comprise a current eyebrow feature group, a current eye feature group, a current nose feature group, a current mouth feature group and a current face feature group; the registered face plaintext characteristics can comprise a registered eyebrow characteristic group, a registered eye characteristic group, a registered nose characteristic group, a registered mouth characteristic group and a registered face characteristic group; each group of feature groups in the current face features is compared with each group of feature groups in the registered face plaintext features, so that a comparison result of the current face features and the registered face plaintext features, namely a face recognition result, can be obtained, and the accuracy of the face recognition result is improved.
As an optional implementation manner, the registered face ciphertext features are stored in advance by the following method:
the service equipment 402 acquires a registered face image and acquires registered face plaintext characteristics 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 group of the registered face plaintext features respectively to obtain registered face ciphertext features, wherein the registered face ciphertext features include ciphertext feature groups of each feature group, and one feature group corresponds to one ciphertext feature group;
the service device 402 stores each ciphertext feature group in the registered face ciphertext features at random 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:
the service equipment 402 determines an initial corresponding code corresponding to the registered face ciphertext feature according to the storage position sequence numbers;
the service equipment 402 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 402 further takes the initial corresponding code as an initial second current corresponding code.
By implementing the implementation mode, the service equipment can acquire the registered face plaintext characteristics from the registered face image, encrypt the registered face plaintext characteristics to obtain the registered face ciphertext characteristics, and delete the registered face plaintext characteristics and the registered face image while storing the registered face ciphertext characteristics, so that the registered face plaintext information and the registered face image are not stored in the service equipment, 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, that is, the position where the registered face ciphertext feature is stored can be determined in the service equipment according to the initial corresponding code, and then the registered face ciphertext feature corresponding to the initial corresponding code is obtained. And the initial corresponding code is sent to the terminal equipment, so that the terminal equipment can be bound with the service equipment, and when a display code which is sent by the terminal equipment and is obtained based on the initial corresponding code is received, the registered face ciphertext characteristic corresponding to the terminal equipment can be obtained, so that the terminal equipment can accurately perform face recognition based on the registered face ciphertext characteristic, and the accuracy of face recognition is improved.
As an optional implementation manner, the service device 402 encrypts, every second preset time interval, 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 number respectively corresponding to each ciphertext feature group; the historical second corresponding codes represent historical storage position serial numbers respectively corresponding to all ciphertext feature groups; each ciphertext feature group corresponds to a historical storage position serial number and a current storage position serial number; and 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 be encrypted to obtain an 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 serial number to the storage position corresponding to the current storage position serial number, so that the storage positions of the ciphertext feature groups change along with the update of the second current corresponding code, the corresponding registered face ciphertext feature can be directly obtained from the service equipment after the second current corresponding code is updated, and the accuracy of obtaining the registered face ciphertext feature is improved.
Exemplary devices
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 is described next with reference to fig. 5, the terminal device including:
a first obtaining unit 501, configured to obtain a face image to be recognized 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 obtained by the first obtaining unit 501 to a service device, so that the service device returns the registered face ciphertext feature based on the display code;
the feature decryption unit 503 is 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 registered face plaintext feature 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 through encryption based on the registered face ciphertext feature, and is sent to the terminal device;
the terminal equipment encrypts the first current corresponding code as a historical first corresponding code every other first preset time to obtain an encrypted corresponding code, wherein the encrypted corresponding code is an updated first current corresponding code; and obtaining the encrypted corresponding code in an encryption mode different from that of the display code.
By implementing the implementation mode, the first current corresponding code can be encrypted once every first preset time length, so that the first current corresponding code is frequently in change, the first current corresponding code 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 alternative 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 recognition unit 504 recognizes the face image to be recognized based on the registered face plaintext feature, and the manner of obtaining the face recognition result may specifically be:
acquiring current face features based on the face image to be recognized; the current face features at least comprise a current eyebrow feature group, a current eye feature group, a current nose feature group, a current mouth feature group and a current face feature group;
and identifying the current face features based on the registered face plaintext features to obtain a face identification result.
By implementing the implementation mode, the current face features can be acquired from the face image to be recognized, and the current face features can comprise a current eyebrow feature group, a current eye feature group, a current nose feature group, a current mouth feature group and a current face feature group; the registered face plaintext characteristics can comprise a registered eyebrow characteristic group, a registered eye characteristic group, a registered nose characteristic group, a registered mouth characteristic group and a registered face characteristic group; each group of feature groups in the current face features is compared with each group of feature groups in the registered face plaintext features, so that a comparison result of the current face features and the registered face plaintext features, namely a face recognition result, can be obtained, and the accuracy of the face recognition result is improved.
Fig. 6 illustrates a service apparatus according to an exemplary embodiment of the present invention, including:
the display code decryption unit 601 is configured to receive and decrypt a display code to obtain a second current corresponding code corresponding to the display code; the display codes are obtained by terminal equipment through encryption based on first current corresponding codes, the first current corresponding codes are obtained through updating based on historical first corresponding codes, the historical first corresponding codes comprise initial corresponding codes, and the initial corresponding codes are obtained based on registered face ciphertext characteristics;
a second obtaining unit 602, configured to obtain a pre-stored registered face ciphertext feature based on the second current corresponding code obtained by the display code decryption 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 identifies a face image to be identified based on the registered face plaintext feature to obtain a face identification result.
As an optional implementation manner, the registered face ciphertext feature is pre-stored in the following manner:
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;
respectively encrypting each feature group of the registered face plaintext features to obtain registered face ciphertext features, wherein the registered face ciphertext features comprise 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 features respectively to obtain storage position serial numbers corresponding to each ciphertext feature group respectively;
the initial corresponding code is obtained by the following method:
determining an initial corresponding code corresponding to the registered face ciphertext characteristic according to the storage position serial numbers;
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 equipment also takes the initial corresponding code as an initial second current corresponding code.
By implementing the implementation mode, the service equipment can acquire the registered face plaintext characteristics from the registered face image, encrypt the registered face plaintext characteristics to obtain the registered face ciphertext characteristics, and delete the registered face plaintext characteristics and the registered face image while storing the registered face ciphertext characteristics, so that the registered face plaintext information and the registered face image are not stored in the service equipment, 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, that is, the position where the registered face ciphertext feature is stored can be determined in the service equipment according to the initial corresponding code, and then the registered face ciphertext feature corresponding to the initial corresponding code is obtained. And the initial corresponding code is sent to the terminal equipment, so that the terminal equipment can be bound with the service equipment, and when a display code which is sent by the terminal equipment and is obtained based on the initial corresponding code is received, the registered face ciphertext characteristic corresponding to the terminal equipment can be obtained, so that the terminal equipment can accurately perform face recognition based on the registered face ciphertext characteristic, and the accuracy of face recognition is improved.
As an optional implementation manner, the service device encrypts, every second preset time interval, 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 number corresponding to each ciphertext feature group; the historical second corresponding codes represent historical storage position serial numbers respectively corresponding to all ciphertext feature groups; each ciphertext feature group corresponds to a historical storage position serial number and a current storage position serial number; and 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 be encrypted to obtain an 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 serial number to the storage position corresponding to the current storage position serial number, so that the storage positions of the ciphertext feature groups change along with the update of the second current corresponding code, the corresponding registered face ciphertext feature can be directly obtained from the service equipment after the second current corresponding code is updated, and the accuracy of obtaining the registered face ciphertext feature is improved.
Exemplary Medium
Having introduced the method and apparatus of the exemplary embodiment of the present invention, next, referring to fig. 7, a computer-readable storage medium of the exemplary embodiment of the present invention is described, referring to fig. 7, which illustrates a computer-readable storage medium, namely 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, will implement the steps described in the above method embodiments, for example, obtaining a facial image to be recognized and a presentation code, where the presentation 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 registered face ciphertext features; sending the display code to service equipment so that the service equipment returns the registered face ciphertext characteristics 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 registered face plaintext characteristics 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 Memories (RAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a flash memory, or other optical and magnetic storage media, which are not described in detail herein.
Exemplary computing device
Having described the methods, apparatus and media of exemplary embodiments of the present invention, a computing device for encryption-based face recognition of exemplary embodiments of the present invention will now be described with reference to FIG. 8.
FIG. 8 illustrates a block diagram of an exemplary computing device 80, which computing device 80 may be a computer system or server, suitable for use in implementing embodiments of the present invention. The computing device 80 shown in FIG. 8 is only one example and should not impose any limitations on the functionality or 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 couples various system components including the system memory 802 and the processing unit 801.
Computing device 80 typically includes a variety of computer system readable media. Such media may 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 can 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, and typically referred to as a "hard drive"). Although not shown in FIG. 8, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 803 by one or more data media interfaces. At least one program product may be included in system memory 802 having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
Program/utility 8025, having a set (at least one) of program modules 8024, can 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 of which, or some combination thereof, may comprise an implementation of a network environment. Program modules 8024 generally carry out the functions and/or methodologies of embodiments of the invention as described.
Computing device 80 may also communicate with one or more external devices 804 (e.g., keyboard, pointing device, display, etc.). Such communication may be through input/output (I/O) interfaces 805. Moreover, computing device 80 may also communicate with one or more networks (e.g., 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, the network adapter 806 communicates with other modules of the computing device 80, such as the processing unit 801, over the bus 803. It should be appreciated that although not shown in FIG. 8, other hardware and/or software modules may be used in conjunction 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, acquiring a face image to be recognized 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; sending the display code to service equipment so that the service equipment returns the registered face ciphertext characteristics based on the display code; 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 registered face plaintext characteristics 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 the encryption based face recognition system are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module according to embodiments of the invention. Conversely, the features and functions of one unit/module described above may be further divided into embodiments 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 is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the units into only one type of logical function may be implemented in other ways, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into 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 such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute 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), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that the following descriptions are only illustrative and not restrictive, and that the scope of the present invention is not limited to the above embodiments: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Moreover, while the operations of the method of the invention are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.

Claims (11)

1. A face recognition method is applied to terminal equipment and comprises the following steps:
acquiring a face image to be recognized 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 the characteristic of a registered face ciphertext;
sending the display code to service equipment so that the service equipment returns the registered face ciphertext characteristics 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 registered face plaintext characteristics to obtain a face identification result.
2. The encryption-based face recognition method according to claim 1, wherein the initial corresponding code is obtained by the service device through encryption based on the registered face ciphertext feature and is sent to the terminal device;
the terminal equipment encrypts the first current corresponding code as a historical first corresponding code every other first preset time length to obtain an encrypted corresponding code, wherein the encrypted corresponding code is an updated first current corresponding code; and obtaining the encrypted corresponding code in an encryption mode different from that of obtaining the display code.
3. The encryption-based face recognition method according to claim 1 or 2, wherein 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 recognizing the face image to be recognized based on the registered face plaintext characteristics to obtain a face recognition result, which comprises the following steps:
acquiring current face features based on the face image to be recognized; the current face features at least comprise a current eyebrow feature group, a current eye feature group, a current nose feature group, a current mouth feature group and a current face feature group;
and identifying the current face features based on the registered face plaintext features to obtain a face identification result.
4. A face recognition method based on encryption is applied to service equipment, and the method comprises the following steps:
receiving and decrypting a display code to obtain a second current corresponding code corresponding to the display code; the display code is obtained by terminal equipment through encryption based on a first current corresponding code, the first current corresponding code is obtained through 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 feature of a registered face ciphertext;
acquiring a prestored registered face ciphertext feature 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 identifying the face image to be identified based on the registered face plaintext features to obtain a face identification result.
5. The encryption-based face recognition method of claim 4, wherein the registered face ciphertext features are pre-stored by:
acquiring a registered face image, and acquiring registered face plaintext characteristics 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;
respectively encrypting each feature group of the registered face plaintext features to obtain registered face ciphertext features, wherein the registered face ciphertext features comprise 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 features respectively to obtain storage position serial numbers corresponding to each ciphertext feature group respectively;
the initial corresponding code is obtained by the following method:
determining an initial corresponding code corresponding to the registered face ciphertext characteristic according to the storage position serial numbers;
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 equipment also takes 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 duration 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 number respectively corresponding to each ciphertext feature group; the historical second corresponding codes represent historical storage position serial numbers respectively corresponding to the ciphertext feature groups; each ciphertext feature group corresponds to a historical storage position serial number and a current storage position serial number; and 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 a face image to be recognized and a display code and sending the display code to the service equipment; the display codes are 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 registered face ciphertext characteristics;
the service equipment is used for receiving and decrypting the display code to obtain a second current corresponding code corresponding to the display code; acquiring a prestored registered face ciphertext feature based on the second current corresponding code; sending the registered face ciphertext features 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 registered face plaintext characteristics to obtain a face identification result.
8. A terminal device, comprising:
the system comprises a first obtaining unit, a second obtaining unit and a display unit, wherein the display unit is used for obtaining a face image to be recognized and a display code, the display code is obtained based on a first current corresponding code through encryption, the first current corresponding code is obtained based on historical first corresponding codes through updating, the historical first corresponding codes comprise initial corresponding codes, and the initial corresponding codes are obtained based on registered face ciphertext characteristics;
the display code sending unit is used for sending the display code to the service equipment so as to enable the service equipment to return the registered face ciphertext characteristics based on the display code;
the characteristic decryption unit is used for receiving and decrypting the registered face ciphertext characteristics to obtain registered face plaintext characteristics;
and the recognition unit is used for recognizing the face image to be recognized based on the registered face plaintext characteristics to obtain a face recognition result.
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 terminal equipment through encryption based on a first current corresponding code, the first current corresponding code is obtained through 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 feature of a registered face ciphertext;
the second acquisition unit is used for acquiring the prestored registered face ciphertext characteristics based on the second current corresponding code;
and the characteristic sending unit is used for sending the registered face ciphertext characteristic to the terminal equipment so as to enable the terminal equipment to decrypt the registered face ciphertext characteristic to obtain a registered face plaintext characteristic, and identifying the face image to be identified based on the registered face plaintext characteristic to obtain a face identification result.
10. A computing device, the computing device comprising:
at least one processor, a memory, and an input-output unit;
wherein the memory is used for storing a computer program, and the processor is used for calling the computer program stored in the memory to execute the method of any one of claims 1 to 6.
11. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of any one of claims 1-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 true CN115880789A (en) 2023-03-31
CN115880789B 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 (15)

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

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170019261A1 (en) * 2015-07-13 2017-01-19 Fujitsu Limited Relational encryption for password verification
CN110363472A (en) * 2019-07-04 2019-10-22 中交机电工程局有限公司 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
CN111738238A (en) * 2020-08-14 2020-10-02 支付宝(杭州)信息技术有限公司 Face recognition method and device
CN114792009A (en) * 2021-01-25 2022-07-26 华为技术有限公司 Data management method, equipment and system
CN112948795A (en) * 2021-02-19 2021-06-11 支付宝(杭州)信息技术有限公司 Identity authentication method and device for protecting privacy
CN114969768A (en) * 2021-02-26 2022-08-30 中移(苏州)软件技术有限公司 Data processing method and device and storage medium
CN112949545A (en) * 2021-03-17 2021-06-11 中国工商银行股份有限公司 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
CN115310057A (en) * 2022-07-13 2022-11-08 奇安信科技集团股份有限公司 Encryption and decryption method, device, equipment and storage medium for preventing inverse compilation
CN114943090A (en) * 2022-07-22 2022-08-26 图灵人工智能研究院(南京)有限公司 Large-scale face library hidden query method based on homomorphic encryption
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

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Y C FENG ET AL.: "A Hybrid Approach for Face Template Protection", 《PROC.SPIE 6944,BIOMETRIC TECHNOLOGY FOR HUMAN IDENTIFICATION》 *
唐培丽 等: "人脸识别智能终端的物理安全测评技术研究", 《行业与应用安全》 *

Also Published As

Publication number Publication date
CN115880789B (en) 2023-06-30

Similar Documents

Publication Publication Date Title
CN108599930B (en) Firmware encryption and decryption system and method
CN110457945B (en) List query method, query party device, service party device and storage medium
CN110011954B (en) Homomorphic encryption-based biological identification method, device, terminal and business server
CN108898005B (en) Hard disk identification method, system, equipment and computer readable storage medium
CN110100422B (en) Data writing method and device based on block chain intelligent contract and storage medium
CN106790156B (en) Intelligent device binding method and device
US9734091B2 (en) Remote load and update card emulation support
CN110138744B (en) Method, device and system for replacing communication number, computer equipment and storage medium
US11704420B2 (en) Terminal device and computer program
CN108667784B (en) System and method for protecting internet identity card verification information
JP6397046B2 (en) Address book protection method, apparatus and communication system
CN111209576A (en) Voice data protection method, device and system
CN110334531B (en) Virtual machine key management method, master node, system, storage medium and device
CN108347629A (en) Video file processing method, device, server and storage medium
CN110601836B (en) Key acquisition method, device, server and medium
EP2993856A1 (en) Establishment of communication connection between mobile device and secure element
KR101156102B1 (en) Memory card reader apparatus having security features and the method thereof
JP2007020065A (en) Decryption backup method, decryption restoration method, attestation device, individual key setting machine, user terminal, backup equipment, encryption backup program, decryption restoration program
CN111666577A (en) Data decryption method, device, equipment and storage medium
CN115880789B (en) Encryption-based face recognition method, related device and storage medium
CN111143629A (en) Data storage, processing and acquisition method based on identification recognition and related device thereof
KR20170048767A (en) Apparatus for generating barcode using homomorphic encryption and Method thereof
CN115757535A (en) Data query method, data storage method and device and electronic equipment
US11809603B2 (en) Systems and methods for real-time encryption of sensitive data
CN114124469A (en) Data processing method, device and equipment

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