Face authentication and recognition method, device, storage medium and equipment
The method encrypts face feature information with a 3D code-specific key and algorithm, storing it in a 3D code image to prevent data leaks and enhance user privacy in face recognition systems.
Patent Information
- Application Number
- CN202111631119.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2041-12-28
AI Technical Summary
In the existing face authentication methods, users' facial information is easily leaked, infringing on user privacy and security, and reducing user life experience.
By generating face feature point ciphertext and combining the 3D code image information, a face authentication 3D code is generated, and the user saves it himself to avoid data leakage on the server.
It realizes the safe storage of facial feature information on the three-dimensional code, prevents data leakage, improves user privacy protection, and improves user experience.
Smart Images

Figure CN114491619B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of biometric identification and authentication, and in particular, to a face authentication and recognition method, device, storage medium, and equipment. Background Art
[0002] With the rapid development of current computer technology, the processing power of computers has been greatly improved. Face authentication has important practical value in many fields such as security, entertainment, and human-computer interaction and has been widely used. For example, in intelligent access control devices, face recognition is used for identity authentication to control the entry and exit of personnel. Face recognition authentication can identify an individual's biometric characteristics through the face, and can effectively solve the problems of user identity verification and security control in the identity management system.
[0003] However, in existing face authentication methods, face feature information needs to be stored on the server corresponding to the application platform, resulting in the easy leakage of user identity information, infringing on the privacy and security of users, and reducing the user experience.
[0004] In view of the above problems, no effective solution has been proposed yet. Summary of the Invention
[0005] Embodiments of the present invention provide a face authentication and recognition method, device, storage medium, and equipment to at least solve the technical problem that the face information of users in the existing face authentication and recognition method has a risk of leakage.
[0006] According to one aspect of the embodiments of the present invention, a face authentication and recognition method is provided, including: when detecting that a user performs face registration, obtaining the face feature information of the user and the 3D code style selected by the user; determining an encryption key and an encryption algorithm corresponding to the 3D code style; performing an encryption operation on the face feature information by using the encryption key and the encryption algorithm to generate face feature point ciphertext; and generating a face authentication 3D code of the user by using the face feature point ciphertext and 3D code image information, where the 3D code image information is determined according to the 3D code style by using a 3D code generation algorithm.
[0007] Optionally, the generating the face authentication 3D code of the user by using the face feature point ciphertext and 3D code image information includes: compiling the face feature point ciphertext into binary digits; determining the 3D code image information according to the 3D code style by using a 3D code generation algorithm; and performing sequence coding processing on the binary digit string and the 3D code image information to obtain the face authentication 3D code.
[0008] Optionally, after generating the face authentication 3D code of the user by using the above-mentioned encrypted face feature points and 3D code image information, the method further includes: when detecting that the user performs face authentication, scanning the face authentication 3D code to obtain the encrypted face feature points; using an intelligent image recognition algorithm to recognize the 3D code image information of the face authentication 3D code to obtain the 3D code pattern; determining the decryption key and decryption algorithm corresponding to the 3D code pattern; using the decryption key and the decryption algorithm to perform a decryption operation on the encrypted face feature points to obtain the face feature information.
[0009] Optionally, after performing a decryption operation on the encrypted face feature points by using the decryption key and the decryption algorithm to obtain the face feature information, the method further includes: performing face detection on the user to obtain the current face feature information of the user; performing a feature matching operation on the current face feature information and the face feature information to obtain the face similarity; determining the face authentication result of the user according to the comparison result between the face similarity and a preset threshold.
[0010] Optionally, determining the face authentication result of the user according to the comparison result between the face similarity and a preset threshold includes: if the comparison result is that the face similarity is greater than or equal to the preset threshold, determining that the face authentication result is a successful face authentication; if the comparison result is that the face similarity is less than the preset threshold, determining that the face authentication result is a failed face authentication.
[0011] According to another aspect of the embodiments of the present invention, there is also provided a face authentication recognition device, including: an acquisition module, configured to acquire the face feature information of the user and the 3D code pattern selected by the user when detecting that the user performs face registration; a determination module, configured to determine the encryption key and encryption algorithm corresponding to the 3D code pattern; a calculation module, configured to perform an encryption operation on the face feature information by using the encryption key and the encryption algorithm to generate encrypted face feature points; a generation module, configured to generate the face authentication 3D code of the user by using the encrypted face feature points and 3D code image information, where the 3D code image information is determined according to the 3D code pattern by using a 3D code generation algorithm.
[0012] Optionally, the generation module includes: a compilation unit, configured to compile the encrypted face feature points into binary digits; a first determination unit, configured to determine the 3D code image information according to the 3D code pattern by using a 3D code generation algorithm; a processing unit, configured to perform sequence coding processing on the binary digit string and the 3D code image information to obtain the face authentication 3D code.
[0013] Optionally, the above-mentioned generation module further includes: a scanning unit, configured to scan the three-dimensional face authentication code when it is detected that the user performs face authentication, and obtain the ciphertext of face feature points; an identification unit, configured to identify the three-dimensional code image information of the three-dimensional face authentication code by using an intelligent image recognition algorithm, and obtain the three-dimensional code style; a second determination unit, configured to determine a decryption key and a decryption algorithm corresponding to the three-dimensional code style; a decryption unit, configured to perform a decryption operation on the ciphertext of face feature points by using the decryption key and the decryption algorithm, and obtain the face feature information.
[0014] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, which stores multiple instructions, and the instructions are suitable for being loaded and executed by a processor to perform any one of the above-mentioned face authentication and recognition methods.
[0015] According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to perform any one of the above-mentioned face authentication and recognition methods.
[0016] In the embodiments of the present invention, when it is detected that a user performs face registration, the face feature information of the user and the three-dimensional code style selected by the user are obtained; an encryption key and an encryption algorithm corresponding to the three-dimensional code style are determined; the face feature information is encrypted by using the encryption key and the encryption algorithm to generate ciphertext of face feature points; the three-dimensional face authentication code of the user is generated by using the ciphertext of face feature points and three-dimensional code image information, wherein the three-dimensional code image information is determined according to the three-dimensional code style by using a three-dimensional code generation algorithm, achieving the purpose of storing the face feature information in the form of ciphertext of feature points on the three-dimensional code, thereby realizing the technical effect of completing face authentication by using the three-dimensional code, and further solving the technical problem that the face information of users in the existing face authentication and recognition methods has a risk of leakage. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present invention, and constitute a part of this application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:
[0018] Figure 1 is a flowchart of a face authentication and recognition method according to an embodiment of the present invention;
[0019] Figure 2 is a schematic diagram of an optional three-dimensional code generation process according to an embodiment of the present invention;
[0020] Figure 3It is a schematic diagram of an optional face authentication process according to an embodiment of the present invention;
[0021] Figure 4 It is a schematic structural diagram of an optional face authentication process according to an embodiment of the present invention;
[0022] Figure 5 It is a schematic structural diagram of a face authentication and recognition device according to an embodiment of the present invention. Detailed implementation manners
[0023] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order different from those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0025] Embodiment 1
[0026] According to an embodiment of the present invention, an embodiment of a face authentication and recognition method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.
[0027] Figure 1 It is a flowchart of the face authentication and recognition method according to an embodiment of the present invention. As Figure 1 shown, the method includes the following steps:
[0028] Step S102, when it is detected that the user performs face registration, obtain the face feature information of the above user and the 3D code style selected by the above user;
[0029] Step S104, determine the encryption key and encryption algorithm corresponding to the above three-dimensional code style;
[0030] Step S106, perform an encryption operation on the above face feature information by using the above encryption key and the above encryption algorithm to generate face feature point ciphertext;
[0031] Step S108, generate the face authentication three-dimensional code of the above user by using the above face feature point ciphertext and three-dimensional code image information, wherein the above three-dimensional code image information is determined according to the above three-dimensional code style by using a three-dimensional code generation algorithm.
[0032] In the embodiment of the present invention, the execution subject of the face authentication and recognition solution provided in the above steps S102 to S108 is a server. That is, when a user registers for a face authentication and recognition service, the server is used to obtain the face feature information of the above user and the three-dimensional code style selected by the above user, perform an encryption operation on the above face feature information by using the encryption key and encryption algorithm corresponding to the above three-dimensional code style, calculate the face feature point ciphertext, and combine the above face feature point ciphertext with the three-dimensional code image information to generate the face authentication three-dimensional code of the above user.
[0033] It should be noted that when the above user performs face registration, various types of intelligent devices can be used for registration, such as: smart phones, smart computers, etc.; the above three-dimensional code style can be selected according to the user's preference, and can include: displaying / not displaying the face, any background image, special three-dimensional code shape, etc.; the above three-dimensional code image information is determined according to the above three-dimensional code style by using a three-dimensional code generation algorithm; the advantage of the above three-dimensional code compared with the two-dimensional code is that: the three-dimensional code has a larger information capacity, can encode complex face feature information, and also has a built-in anti-counterfeiting function.
[0034] As an alternative embodiment, as Figure 2 shown in the schematic diagram of the three-dimensional code generation process, before generating the three-dimensional code, first, the user needs to perform face registration. After the server detects the user's face information, the feature vector of the face feature points is obtained; at the same time, the three-dimensional code style selected by the user is obtained. The server generates the corresponding encryption key and encryption algorithm according to the style selected by the user, and uses the encryption key and the corresponding encryption algorithm to perform an encryption operation on the face feature points to generate face feature point ciphertext. Finally, the face feature information is saved on the three-dimensional code in the form of ciphertext for the user to save by himself, without having to worry about the problem of data leakage on the server side.
[0035] It should be noted that the encryption algorithm and key used for encryption correspond to the format of the three-dimensional code. The key and algorithm are both stored on the server side. After the facial feature information is encrypted, it is saved on the three-dimensional code. The above encryption algorithm and key do not need to be transmitted to the user and are only stored on the server side. When decrypting, the server can determine the format of the three-dimensional code by intelligently identifying the three-dimensional code image, and then find the corresponding decryption algorithm and key on the server side to decrypt the facial feature information and perform authentication.
[0036] Through the embodiments of the present invention, the facial feature information is encrypted and saved in the three-dimensional code. The user can generate and save their own three-dimensional code, without worrying about problems such as leakage, loss, and damage. When the user needs to perform facial authentication, the user can complete the identity authentication through facial recognition and three-dimensional code verification, achieving the purpose of saving the facial feature information in the form of ciphertext of feature points on the three-dimensional code, thus realizing the technical effect of completing facial authentication using the three-dimensional code, and further solving the technical problem of the risk of leakage of the user's facial information in the existing facial authentication recognition method.
[0037] In an optional embodiment, generating the above-mentioned facial authentication three-dimensional code of the user by using the above-mentioned ciphertext of facial feature points and three-dimensional code image information includes:
[0038] Step S202: Compile the above-mentioned ciphertext of facial feature points into binary digits;
[0039] Step S204: Use the three-dimensional code generation algorithm to determine the above-mentioned three-dimensional code image information according to the above-mentioned three-dimensional code style;
[0040] Step S206: Perform sequence coding processing on the above-mentioned binary digit string and the above-mentioned three-dimensional code image information to obtain the above-mentioned facial authentication three-dimensional code.
[0041] In the embodiments of the present invention, the server compiles the above-mentioned ciphertext of facial feature points into binary digits, and uses the three-dimensional code generation algorithm to determine the above-mentioned three-dimensional code image information according to the above-mentioned three-dimensional code style; performs sequence coding processing on the above-mentioned binary digit string and the above-mentioned three-dimensional code image information to obtain the above-mentioned facial authentication three-dimensional code.
[0042] It should be noted that the above-mentioned three-dimensional code image information can be determined according to the user's selection results (which can include: showing / hiding the face, any background image, special three-dimensional code shape, etc.).
[0043] As an alternative embodiment, the server compiles the ciphertext of the feature points into a string of binary digits, and then, through a specific three-dimensional code generation algorithm and in combination with the overall color content of the generated picture of the three-dimensional code style, encodes the binary digit string and the image information into an array that can be interpreted through specific rules, namely the three-dimensional face authentication code; the above three-dimensional code can be printed in color or sent as an electronic photo to the user's electronic storage device for easy carrying and preservation by the user.
[0044] It should be noted that when performing face registration, the face image is mapped into a 128-dimensional feature vector, the AES encryption algorithm is used, a 128-bit encryption key is adopted, and different three-dimensional code styles correspond to different encryption keys.
[0045] In an alternative embodiment, after generating the three-dimensional face authentication code of the above user by using the above ciphertext of the face feature points and the three-dimensional code image information, the above method further includes:
[0046] Step S302, when detecting that the above user performs face authentication, scan the above three-dimensional face authentication code to obtain the above ciphertext of the face feature points;
[0047] Step S304, use an intelligent image recognition algorithm to recognize the three-dimensional code image information of the above three-dimensional face authentication code to obtain the above three-dimensional code style;
[0048] Step S306, determine the decryption key and decryption algorithm corresponding to the above three-dimensional code style;
[0049] Step S308, perform a decryption operation on the above ciphertext of the face feature points by using the above decryption key and the above decryption algorithm to obtain the above face feature information.
[0050] In the embodiment of the present invention, as Figure 3 shown in the schematic diagram of the face authentication process, when detecting that the above user performs face authentication, the server scans the above three-dimensional face authentication code to obtain the above ciphertext of the face feature points; uses an intelligent image recognition algorithm to recognize the three-dimensional code image information of the above three-dimensional face authentication code to obtain the above three-dimensional code style; performs a decryption operation on the above ciphertext of the face feature points by using the above decryption key and the above decryption algorithm to obtain the above face feature information.
[0051] As an alternative embodiment, during face authentication, the face feature point matching algorithm selects the Euclidean distance. The smaller the Euclidean distance, the greater the similarity and the more likely it is the face information of the same person.
[0052] In an alternative embodiment, after performing a decryption operation on the above ciphertext of the face feature points by using the above decryption key and the above decryption algorithm to obtain the above face feature information, the above method further includes:
[0053] Step S402: Perform face detection on the above user to obtain the current face feature information of the above user;
[0054] Step S404: Perform feature matching operation on the above current face feature information and the above face feature information to obtain the face similarity degree;
[0055] Step S406: Determine the face authentication result of the above user according to the comparison result between the above face similarity degree and a preset threshold.
[0056] In an embodiment of the present invention, when a user performs face authentication, the server is used to perform face detection on the above user to obtain the current face feature information of the above user; perform feature matching operation on the above current face feature information and the above face feature information to obtain the face similarity degree; and determine the face authentication result of the above user according to the comparison result between the above face similarity degree and a preset threshold.
[0057] It should be noted that the above face feature matching operation determines the face similarity according to the calculated Euclidean distance. The smaller the Euclidean distance, the greater the similarity.
[0058] In an alternative embodiment, determining the face authentication result of the above user according to the comparison result between the above face similarity degree and a preset threshold includes:
[0059] Step S502: If the above comparison result is that the above face similarity degree is greater than or equal to the above preset threshold, then determine that the above face authentication result is face authentication successful;
[0060] Step S504: If the above comparison result is that the above face similarity degree is less than the above preset threshold, then determine that the above face authentication result is the above face authentication failed.
[0061] In an embodiment of the present invention, when the above similarity is greater than the preset threshold, it is determined that the authenticated user and the registered user are the same user, that is, the above face authentication result is face authentication successful; when the above similarity is less than the preset threshold, it is determined that the authenticated user and the registered user are different users, that is, the above face authentication result is face authentication failed.
[0062] As an alternative embodiment, as Figure 4 shown in the schematic diagram of the face authentication process structure, when a user performs face authentication, the user provides a face authentication three-dimensional code to the authentication device for scanning. After the above device reads the ciphertext, it uses an intelligent image recognition algorithm to recognize the overall color content of the scanned three-dimensional code picture to obtain the style of the three-dimensional code. The above server finds the corresponding decryption key string code and decryption algorithm through the style of the three-dimensional code, and uses the key string code and the corresponding decryption algorithm to decrypt the ciphertext to obtain the registered face feature information.
[0063] Optionally, the server performs face detection on the user, obtains the facial feature point information to be authenticated, and performs feature matching operations with the registered facial feature point information. The closer the feature distance is, the more likely it indicates the same user; otherwise, it is a different user, obtaining the authentication result and completing the entire process of face authentication.
[0064] It should be noted that the above three-dimensional code enriches the overall color content of the picture, and users can also obtain some or even all of the image information by simply using the human eye to identify; the above server can train various styles of three-dimensional codes in large quantities, enabling the intelligent image recognition algorithm to accurately identify various three-dimensional code styles and improving the authentication speed and authentication ability.
[0065] Through the above steps, it is possible to save the facial feature information in the form of ciphertext on the three-dimensional code. Utilizing the larger information capacity of the three-dimensional code, complex facial feature information can be encoded, with a built-in anti-counterfeiting function, achieving the purpose of saving the facial feature information in the form of feature point ciphertext on the three-dimensional code, thereby realizing the technical effect of completing face authentication using the three-dimensional code, and further solving the technical problem of the risk of leakage of users' facial information in the existing face authentication and recognition methods.
[0066] Embodiment 2
[0067] According to an embodiment of the present invention, there is also provided an apparatus embodiment for implementing the above face authentication and recognition method. Figure 5 It is a structural schematic diagram of a face authentication and recognition apparatus according to an embodiment of the present invention, as Figure 5 shown. The above apparatus includes: an acquisition module 50, a determination module 52, a calculation module 54, and a generation module 56, where:
[0068] The acquisition module 50 is configured to obtain the facial feature information of the above user and the three-dimensional code style selected by the above user when detecting that the user performs face registration;
[0069] The determination module 52 is configured to determine the encryption key and encryption algorithm corresponding to the above three-dimensional code style;
[0070] The calculation module 54 is configured to perform an encryption operation on the above facial feature information using the above encryption key and the above encryption algorithm to generate facial feature point ciphertext;
[0071] The generation module 56 is configured to generate the face authentication three-dimensional code of the above user using the above facial feature point ciphertext and three-dimensional code image information, where the above three-dimensional code image information is determined according to the above three-dimensional code style using a three-dimensional code generation algorithm.
[0072] Optionally, the above-mentioned generation module includes: a compilation unit for compiling the above-mentioned encrypted face feature points into binary digits; a first determination unit for determining the above-mentioned 3D code image information according to the above-mentioned 3D code pattern by using a 3D code generation algorithm; a processing unit for performing sequence coding processing on the above-mentioned binary digit string and the above-mentioned 3D code image information to obtain the above-mentioned 3D face authentication code.
[0073] Optionally, the above-mentioned generation module further includes: a scanning unit for scanning the above-mentioned 3D face authentication code to obtain the above-mentioned encrypted face feature points when it is detected that the above-mentioned user performs face authentication; an identification unit for identifying the 3D code image information of the above-mentioned 3D face authentication code by using an intelligent image recognition algorithm to obtain the above-mentioned 3D code pattern; a second determination unit for determining a decryption key and a decryption algorithm corresponding to the above-mentioned 3D code pattern; a decryption unit for performing a decryption operation on the above-mentioned encrypted face feature points by using the above-mentioned decryption key and the above-mentioned decryption algorithm to obtain the above-mentioned face feature information.
[0074] It should be noted here that the above-mentioned acquisition module 50, determination module 52, calculation module 54, and generation module 56 correspond to steps S102 to S108 in Embodiment 1. The functions of the four modules and the corresponding steps are the same in terms of the implemented examples and application scenarios, but are not limited to the content disclosed in the above-mentioned Embodiment 1.
[0075] It should be noted that the preferred implementation manner of this embodiment can refer to the relevant description in Embodiment 1, which will not be elaborated here.
[0076] According to an embodiment of the present invention, an embodiment of a computer-readable storage medium is further provided. Optionally, in this embodiment, the above-mentioned computer-readable storage medium can be used to store the program code executed by the above-mentioned face authentication and recognition method provided in Embodiment 1.
[0077] Optionally, in this embodiment, the above-mentioned computer-readable storage medium can be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the mobile terminals in a mobile terminal group.
[0078] Optionally, in this embodiment, the computer-readable storage medium is set to store program code for performing the following steps: when it is detected that a user performs face registration, obtaining the above-mentioned user's face feature information and the above-mentioned 3D code pattern selected by the user; determining an encryption key and an encryption algorithm corresponding to the above-mentioned 3D code pattern; performing an encryption operation on the above-mentioned face feature information by using the above-mentioned encryption key and the above-mentioned encryption algorithm to generate encrypted face feature points; generating the above-mentioned user's 3D face authentication code by using the above-mentioned encrypted face feature points and 3D code image information, where the above-mentioned 3D code image information is determined according to the above-mentioned 3D code pattern by using a 3D code generation algorithm.
[0079] Optionally, the above computer-readable storage medium may also execute program code for the following steps: Compile the above ciphertext of facial feature points into binary digits; Use a three-dimensional code generation algorithm to determine the above three-dimensional code image information according to the above three-dimensional code pattern; Perform sequence coding processing on the above binary digit string and the above three-dimensional code image information to obtain the above three-dimensional face authentication code.
[0080] Optionally, the above computer-readable storage medium may also execute program code for the following steps: When it is detected that the above user performs face authentication, scan the above three-dimensional face authentication code to obtain the above ciphertext of facial feature points; Use an intelligent image recognition algorithm to recognize the three-dimensional code image information of the above three-dimensional face authentication code to obtain the above three-dimensional code pattern; Determine the decryption key and decryption algorithm corresponding to the above three-dimensional code pattern; Use the above decryption key and the above decryption algorithm to perform decryption operation on the above ciphertext of facial feature points to obtain the above facial feature information.
[0081] Optionally, the above computer-readable storage medium may also execute program code for the following steps: Perform face detection on the above user to obtain the current facial feature information of the above user; Perform feature matching operation on the above current facial feature information and the above facial feature information to obtain the degree of face similarity; Determine the above face authentication result according to the comparison result between the above degree of face similarity and a preset threshold.
[0082] Optionally, the above computer-readable storage medium may also execute program code for the following steps: If the above comparison result is that the above degree of face similarity is greater than or equal to the above preset threshold, determine that the above face authentication result is face authentication successful; If the above comparison result is that the above degree of face similarity is less than the above preset threshold, determine that the above face authentication result is face authentication failed.
[0083] According to an embodiment of the present invention, an embodiment of a processor is also provided. Optionally, in this embodiment, the above computer-readable storage medium may be used to save the program code executed by the face authentication recognition method provided in the above Embodiment 1.
[0084] An embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program stored on the memory and executable on the processor. When the processor executes the program, the following steps are implemented: when it is detected that a user performs face registration, obtain the face feature information of the user and the 3D code style selected by the user; determine the encryption key and encryption algorithm corresponding to the 3D code style; perform an encryption operation on the face feature information by using the encryption key and the encryption algorithm to generate a face feature point ciphertext; generate a face authentication 3D code of the user by using the face feature point ciphertext and 3D code image information, where the 3D code image information is determined according to the 3D code style by using a 3D code generation algorithm.
[0085] Optionally, the electronic device may further execute the program code of the following steps: compile the face feature point ciphertext into binary digits; determine the 3D code image information according to the 3D code style by using a 3D code generation algorithm; perform sequence encoding processing on the binary digit string and the 3D code image information to obtain the face authentication 3D code.
[0086] Optionally, the electronic device may further execute the program code of the following steps: when it is detected that the user performs face authentication, scan the face authentication 3D code to obtain the face feature point ciphertext; use an intelligent image recognition algorithm to recognize the 3D code image information of the face authentication 3D code to obtain the 3D code style; determine the decryption key and decryption algorithm corresponding to the 3D code style; perform a decryption operation on the face feature point ciphertext by using the decryption key and the decryption algorithm to obtain the face feature information.
[0087] Optionally, the electronic device may further execute the program code of the following steps: perform face detection on the user to obtain the current face feature information of the user; perform a feature matching operation on the current face feature information and the face feature information to obtain a face similarity degree; determine the face authentication result of the user according to the comparison result between the face similarity degree and a preset threshold.
[0088] Optionally, the electronic device may further execute the program code of the following steps: if the comparison result is that the face similarity degree is greater than or equal to the preset threshold, determine that the face authentication result is successful face authentication; if the comparison result is that the face similarity degree is less than the preset threshold, determine that the face authentication result is failed face authentication.
[0089] The present application also provides a computer program product, which when executed on a data processing device, is adapted to execute a program initialized with the following method steps: when it is detected that a user performs face registration, obtain the face feature information of the above user and the 3D code style selected by the above user; determine the encryption key and encryption algorithm corresponding to the above 3D code style; perform an encryption operation on the above face feature information by using the above encryption key and the above encryption algorithm to generate face feature point ciphertext; generate the user's face authentication 3D code by using the above face feature point ciphertext and 3D code image information, wherein the above 3D code image information is determined according to the above 3D code style by using a 3D code generation algorithm.
[0090] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.
[0091] In the above embodiments of the present invention, the descriptions of the respective embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0092] In several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the units or modules can be in an electrical or other form.
[0093] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0094] In addition, in each embodiment of the present invention, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0095] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs.
[0096] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A face authentication and recognition method, characterized in that Including: When detecting that the user performs face registration, obtain the face feature information of the user and the 3D code style selected by the user. Wherein, after the server detects the face information of the user, the feature vector of the face feature points is obtained. The 3D code style is selected according to the user's preference, and the 3D code style includes: displaying the face, not displaying the face, any background image, and special 3D code shape; Determine the encryption key and encryption algorithm corresponding to the 3D code style, wherein the encryption key and the encryption algorithm are stored in the server; Perform an encryption operation on the face feature information by using the encryption key and the encryption algorithm to generate the ciphertext of the face feature points; Generate the face authentication 3D code of the user by using the ciphertext of the face feature points and the 3D code image information, wherein the 3D code image information is determined according to the 3D code style by using a 3D code generation algorithm; After generating the face authentication 3D code of the user by using the ciphertext of the face feature points and the 3D code image information, the method further includes: when detecting that the user performs face authentication, scan the face authentication 3D code to obtain the ciphertext of the face feature points; use an intelligent image recognition algorithm to identify the 3D code image information of the face authentication 3D code to obtain the 3D code style; determine the decryption key and decryption algorithm corresponding to the 3D code style; perform a decryption operation on the ciphertext of the face feature points by using the decryption key and the decryption algorithm to obtain the face feature information.
2. The method according to claim 1, characterized in that, The generating the face authentication 3D code of the user by using the ciphertext of the face feature points and the 3D code image information includes: Compile the ciphertext of the face feature points into binary numbers; Determine the 3D code image information according to the 3D code style by using a 3D code generation algorithm; Perform a sequence coding process on the binary digital string and the 3D code image information to obtain the face authentication 3D code.
3. The method according to claim 1, wherein After performing a decryption operation on the ciphertext of the face feature points by using the decryption key and the decryption algorithm to obtain the face feature information, the method further includes: Perform face detection on the user to obtain the current face feature information of the user; Perform a feature matching operation on the current face feature information and the face feature information to obtain the face similarity; Determine the face authentication result of the user according to the comparison result between the face similarity and a preset threshold.
4. The method according to claim 3, characterized in that, Determining the face authentication result of the user according to the comparison result between the face similarity and a preset threshold includes: If the comparison result is that the face similarity is greater than or equal to the preset threshold, determine that the face authentication result is successful face authentication; If the comparison result is that the face similarity is less than the preset threshold, determine that the face authentication result is failed face authentication.
5. A face authentication and recognition device, characterized in that, Including: An acquisition module, configured to acquire the face feature information of the user and the 3D code style selected by the user when it is detected that the user performs face registration. After the server detects the face information of the user, it obtains the feature vector of the face feature points. The 3D code style is selected according to the user's preference, and the 3D code style includes: displaying the face, not displaying the face, any background image, and special 3D code shape; A determination module, configured to determine the encryption key and encryption algorithm corresponding to the 3D code style, where the encryption key and the encryption algorithm are stored on the server; A calculation module, configured to perform an encryption operation on the face feature information by using the encryption key and the encryption algorithm to generate face feature point ciphertext; A generation module, configured to generate a face authentication 3D code of the user by using the face feature point ciphertext and 3D code image information, where the 3D code image information is determined according to the 3D code style by using a 3D code generation algorithm; Among them, the generation module further includes: a scanning unit, configured to scan the face authentication 3D code when it is detected that the user performs face authentication to obtain the face feature point ciphertext; an identification unit, configured to identify the 3D code image information of the face authentication 3D code by using an intelligent image recognition algorithm to obtain the 3D code style; a second determination unit, configured to determine the decryption key and decryption algorithm corresponding to the 3D code style; and a decryption unit, configured to perform a decryption operation on the face feature point ciphertext by using the decryption key and the decryption algorithm to obtain the face feature information.
6. The device according to claim 5, wherein The generation module includes: A compilation unit, configured to compile the face feature point ciphertext into binary digits; A first determination unit, configured to determine the 3D code image information according to the 3D code style by using a 3D code generation algorithm; A processing unit, configured to perform sequence encoding processing on the binary digit string and the 3D code image information to obtain the face authentication 3D code.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores multiple instructions, and the instructions are adapted to be loaded and executed by a processor to perform the face authentication recognition method according to any one of claims 1 to 4.
8. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is configured to run the computer program to perform the face authentication recognition method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Identification authentication method and system
CN101465736A
Facial image identification verification-based mobile Internet account login system and method
CN105227316A
Escorting encryption method and device, electronic device and computer storage medium
CN112187805A
Portrait-combined novel three-dimensional code verification method and device
CN113780029A