CN116129485A - Face recognition method and device, electronic equipment and storage medium - Google Patents

Face recognition method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116129485A
CN116129485A CN202210900200.7A CN202210900200A CN116129485A CN 116129485 A CN116129485 A CN 116129485A CN 202210900200 A CN202210900200 A CN 202210900200A CN 116129485 A CN116129485 A CN 116129485A
Authority
CN
China
Prior art keywords
face
recognized
target
face recognition
face image
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.)
Pending
Application number
CN202210900200.7A
Other languages
Chinese (zh)
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.)
Mashang Xiaofei Finance Co Ltd
Original Assignee
Mashang Xiaofei Finance 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 Mashang Xiaofei Finance Co Ltd filed Critical Mashang Xiaofei Finance Co Ltd
Priority to CN202210900200.7A priority Critical patent/CN116129485A/en
Publication of CN116129485A publication Critical patent/CN116129485A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Bioethics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Collating Specific Patterns (AREA)

Abstract

The application provides a face recognition method, a face recognition device, electronic equipment and a storage medium. Wherein: the client initiates a target request to a target block link point of the block chain, wherein the target request carries an address of a face recognition intelligent contract, an electronic memory card of face information of a target user and a face image set to be recognized, the face image set to be recognized comprises real and confusing face images to be recognized, and the face recognition intelligent contract is used for calling the face information of a corresponding user from a block to recognize the face images to be recognized in the client request based on the electronic memory card in the client request. When the target block chain node completes the consensus and executes the target request, a face recognition intelligent contract is called, the face information of the target user is obtained, so that the face recognition is carried out on each face image to be recognized in the set of face images to be recognized, and the face recognition result is fed back to the client. The client determines a target face recognition result based on the face recognition result of the real face image to be recognized.

Description

Face recognition method and device, electronic equipment and storage medium
Technical Field
The application belongs to the technical field of image processing, and particularly relates to a face recognition method, a face recognition device, electronic equipment and a storage medium.
Background
With the continuous development of the biological recognition technology and the artificial intelligence technology, the face recognition technology is widely applied, and the processes of identity authentication such as payment, access control, security check and the like are greatly simplified.
The face recognition mode at the present stage is generally that a user uploads a face image of the user to a face recognition system, and the face recognition system compares face information (such as a photo, a face feature and the like) of a target user recorded in advance to judge whether the user is the target user. In this way, the centralized face recognition system has the absolute interpretation rights to the user identity, and the defects of unreliable natural belief exist, thus limiting the development of ecological application. In addition, the user does not have privacy in the centralized face recognition system, and the uploaded face image is exposed to the face recognition system, and there is a risk of being utilized by the face recognition system or a third party.
Disclosure of Invention
The application aims to provide a face recognition method, a face recognition device, electronic equipment and a storage medium, which can realize the decentralization face recognition service based on a blockchain and have the advantages of neutrality, credibility and face image privacy protection.
In order to achieve the above object, embodiments of the present application are implemented as follows:
in a first aspect, a face recognition method is provided, including:
the method comprises the steps that a client initiates a target request to a target block link point of a block chain, wherein the target request carries an address of a face recognition intelligent contract, an electronic certificate of face information of a target user and a face image set to be recognized, the block records of each block chain node in the block chain contain the face information of a plurality of users including the target user, the face image set to be recognized comprises a real face image to be recognized and a mixed face image to be recognized, and the face recognition intelligent contract is used for calling the face information of a corresponding user from a block of the block chain node to recognize the face image to be recognized in the client request based on the electronic certificate in the client request;
when the target block link point completes the consensus of a block chain and executes the target request, invoking the face recognition intelligent contract, acquiring the face information of the target user from a local block according to the electronic certificate of the face information of the target user, and carrying out face recognition on each face image to be recognized in the set of face images to be recognized based on the face information of the target user so as to feed back the face recognition result of each face image to be recognized corresponding to the target user to the client;
And the client selects the face recognition result of the real face image to be recognized corresponding to the target user from the face recognition results of the target user corresponding to each face image to be recognized fed back by the target block chain link point, and determines a target face recognition result based on the face recognition result of the real face image to be recognized corresponding to the target user.
In a second aspect, there is provided a client of a blockchain, comprising:
a request unit, configured to send a target request to a target block link point of a block chain, where the target request carries an address of a face recognition intelligent contract, an electronic certificate of face information of the target user, and a set of face images to be recognized, the block of each block chain node in the block chain records face information of a plurality of users including the target user, the set of face images to be recognized includes a real face image to be recognized and a mixed face image to be recognized, and the face recognition intelligent contract is configured to retrieve face information of a corresponding user from a block of a block chain node based on the electronic certificate in the client request, and perform face recognition on the face image to be recognized in the client request, where when the target block link point completes consensus and executes the target request, the target block link point invokes the face recognition contract, acquire face information of the target user from a local block according to the electronic certificate of the face information of the target user, and perform face recognition on each face image to be recognized in the set of face images to be recognized based on the face information of the target user, so as to perform face recognition on each face recognition result of the corresponding user to the target user;
And the determining unit is used for selecting the face recognition result of the real face image to be recognized corresponding to the target user from the face recognition result of each face image to be recognized corresponding to the target user, which is fed back by the link points of the target block, and determining a target face recognition result based on the face recognition result of the real face image to be recognized corresponding to the target user.
In a third aspect, there is provided a blockchain node of a blockchain, comprising:
the system comprises a receiving unit, a receiving unit and a processing unit, wherein the receiving unit is used for receiving a target request initiated by a client of a blockchain, the target request carries an address of an intelligent contract for face recognition, an electronic certificate of face information of the target user and a face image set to be recognized, the blocks of each blockchain node in the blockchain record face information of a plurality of users including the target user, the face image set to be recognized comprises a real face image to be recognized and a confused face image to be recognized, and the intelligent contract for face recognition is used for calling the face information of a corresponding user from the blocks of the blockchain node to recognize the face image to be recognized in the client based on the electronic certificate in the client request;
And the execution unit is used for calling the face recognition intelligent contract when the target request completes the consensus of the blockchain and executes the same, acquiring the face information of the target user from a local block according to the electronic certificate of the face information of the target user, recognizing the face of each face image to be recognized in the set of face images to be recognized based on the face information of the target user, feeding back the face recognition result of each face image to be recognized corresponding to the target user to the client, wherein the client selects the face recognition result of each face image to be recognized corresponding to the target user from the face recognition results of each face image to be recognized fed back by the target block chain link point, and determines the target face recognition result based on the face recognition result of each face image to be recognized corresponding to the target user.
In a fourth aspect, there is provided an electronic device comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program being executed by the processor to perform the method of the first aspect described above.
In a fifth aspect, there is provided a computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method of the first aspect described above.
The face information used for verifying the identity of each user is stored in the block of each block chain node of the block chain, and face recognition intelligent contracts are deployed for each block chain node. The face recognition intelligent contract is used for calling face information of a corresponding user from a block of the block chain node based on the electronic certificate in the client request to recognize the face image to be recognized in the client request. When the user needs to verify the identity of the target user through face recognition, the electronic memory card carrying the address of the face recognition intelligent contract, the face information of the target user and the target request of the face image set to be recognized can be submitted to the blockchain node through the client, so that the blockchain node invokes the face recognition intelligent contract, the face information of the target user is obtained from the local block of the blockchain node according to the electronic memory card in the target request, and the face recognition of the target user is performed on each face image to be recognized in the face image set to be recognized based on the face information of the target user. The whole scheme realizes neutral and reliable face recognition service by means of the advantage of block chain decentralization. Meanwhile, by means of the characteristics of transparency and traceability of the block chain data, the possibility that the face recognition result is maliciously tampered by the block chain link points is further restrained. In addition, the face image set to be recognized submitted by the client in the target request comprises a real face image to be recognized and a mixed face image to be recognized, and for the blockchain, the fact that which face image in the face image set to be recognized is the face image of the user cannot be known, so that the face image of the user cannot be directly exposed to the blockchain, and privacy protection is provided for the face image of the user in the face recognition process.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort to a person having ordinary skill in the art.
Fig. 1 is a schematic flow chart of a conventional face recognition-based payment transaction completion process;
fig. 2 is a schematic architecture diagram of a face recognition method according to an embodiment of the present application;
fig. 3 is a schematic flow chart of a face recognition method according to an embodiment of the present application;
fig. 4 is a schematic flow chart of a face recognition method applied to a face payment scenario according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a client according to an embodiment of the present application;
FIG. 6 is a schematic block chain node structure according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to better understand the technical solutions in the present application, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
With the continuous development of the biological recognition technology and the artificial intelligence technology, the face recognition technology is widely applied, and the processes of identity authentication such as payment, access control, security check and the like are greatly simplified. The face recognition mode at the present stage is generally that a user uploads a face image of the user to a centralized face recognition system, and the face recognition system compares face information (such as a photo, a face feature and the like) of a target user recorded in advance to judge whether the user is the target user.
Taking a face payment scenario as an example, fig. 1 is a schematic flow chart of face payment, and specifically includes the following steps:
1) The user initiates a transaction request for face payment to the payment system.
2) And the payment system responds to the transaction request of the user, and invokes a camera of the user terminal to acquire the face image of the user through the payment application of the user terminal.
3) The payment system performs face recognition on the acquired face image.
4) And after the face recognition is passed, the payment system executes the transaction operation corresponding to the transaction request.
5) The payment system feeds back the transaction result of the face payment to the user.
From the above flow, it can be seen that the payment system has an interpretation of the user's identity, i am not me if the payment system maliciously determines that i am not me. Under this highly centralized mechanism, the payment system cannot guarantee a neutral, trusted provision of face recognition services. In addition, the user has no privacy to the payment system, and the uploaded face images are directly exposed to the payment system, so that the risk of being utilized by the payment system or a third party exists.
In view of this, the present application aims to propose a face recognition scheme that is decentralised and can protect user privacy. Referring to fig. 2, fig. 2 is a schematic view of an application scenario of the face recognition scheme of the present application, including: users, clients, and blockchains. The client may be a mobile phone, a tablet computer, a desktop computer, a portable notebook computer, etc. (fig. 2 illustrates a mobile phone as an example). After the user initiates operations requiring face recognition (such as face payment operations, face unlocking operations, etc.) by using the client, the client accesses the blockchain and initiates a target request to a target blockchain link point in the blockchain. The target request carries the address of the intelligent contract for face recognition, the electronic certificate of the face information of the target user and the face image set to be recognized, wherein the face image set to be recognized comprises a real face image to be recognized and a mixed face image to be recognized. Then, the target block chain link point invokes a face recognition intelligent contract, the face information of the target user is obtained from the local block according to the electronic certificate of the face information of the target user, and face recognition is carried out on each face image to be recognized in the set of face images to be recognized based on the face information of the target user, so that the face recognition result of each face image to be recognized corresponding to the target user is fed back to the client; finally, the client can determine the final required target face recognition result only according to the face recognition result of the target user corresponding to the face image to be recognized, so that the user initiated operation can be processed according to the target face recognition result.
Obviously, for the blockchain, it is not known which of the face images to be recognized provided by the client is the face image of the user, so that the privacy information of the face of the user is effectively protected. Meanwhile, the intelligent contract is called through the request block chain link point to finish face recognition, and neutral and reliable face recognition service can be realized by means of the characteristic of block chain decentralization, so that the face recognition result is prevented from being tampered maliciously.
The face recognition scheme of the application can be executed by the electronic device, and particularly can be executed by a processor of the electronic device. So-called electronic devices may include terminal devices such as smartphones, tablet computers, notebook computers, desktop computers, intelligent voice interaction devices, smart appliances, smart watches, car terminals, aircraft, etc.; alternatively, the electronic device may further include a server, such as an independent physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides a cloud computing service.
Based on the architecture of the application scenario shown in fig. 2, the embodiment of the application provides a face recognition method. Fig. 3 is a flow chart of a face recognition method according to an embodiment of the present application, where the method in fig. 3 can be performed by the client and the block link points in fig. 2. As shown in fig. 3, the face recognition method of the method comprises the following steps:
S302, a client initiates a target request to a target block link point of a block chain, wherein the target request carries an address of a face recognition intelligent contract, an electronic certificate of face information of a target user and a face image set to be recognized, the face information of a plurality of users including the target user is recorded in blocks of each block chain node in the block chain, the face image set to be recognized comprises a real face image to be recognized and a mixed face image to be recognized, the face recognition intelligent contract is used for calling the face information of the corresponding user from the blocks of the block chain node to recognize the face image to be recognized in the client request based on the electronic certificate in the client request.
In the application, after the user initiates the operation requiring face recognition, the client can shoot the face of the user by using the camera of the client, and the face image obtained by shooting is the face image to be recognized truly. Meanwhile, the client needs to use face images of other users authorized to use as confusing face images to be recognized so as to form a face image set to be recognized for the face recognition after being mixed with the real face images to be recognized.
In practical application, the confused face image to be recognized can be a face image which is randomly requested by the client from the authorized open source face image database, that is, the confused face image to be recognized of each face recognition is randomly generated and is not regular and circulated, so that the fact that a plurality of malicious institutions can reversely deduce the real face image to be recognized of the user after intercepting the face image set to be recognized of the face recognition for a plurality of times is avoided. In addition, if the algorithm of face recognition supports face recognition on the encrypted face image, the real face image to be recognized in the application can be generated after the face image base shot by the client is properly encrypted, for example, the algorithm can support face recognition on the face image added with mosaic, and the real face image to be recognized in the application can be generated after the face image base shot by the client is properly coded.
On the other hand, the blocks of each block chain node in the block chain record face information (the face information can be a face image or a face feature, etc.) of a user capable of providing face recognition service, and the face information of each user can generate a corresponding electronic certificate after being recorded in the block chain node, and the electronic certificate comprises an identification of a client (a block chain account number logged in by the client, a mobile phone number of the user to which the client belongs, etc.) and a storage address of the face information of the user. It should be appreciated that the face information of the corresponding user may be retrieved from the block of the blockchain node through electronic certification.
In the application, the client needs to provide the electronic certificate of the face information of the target user in the target request, so that the target blockchain node can call the face information of the target user from the local block based on the electronic certificate in the target request, and compare the face information of the target user with each face image to be identified in the face image set provided by the client so as to determine the face image to be identified truly and confuse the face recognition results of each face image to be identified.
It should be understood that the blockchain node itself does not have the function of face recognition, and here, the application needs to make the blockchain node provide the face recognition service by means of the intelligent contract of the blockchain. Wherein the intelligent contract is an event-driven program running on the blockchain and capable of being automatically executed according to preset conditions. The method comprises the steps of extracting the execution logic of face information of a corresponding user from a block of a block chain node based on an electronic certificate, compiling the execution logic of face recognition of a face image to be recognized based on the extracted face information of the user into a face recognition intelligent contract, and deploying compiled face recognition intelligent to each block chain node of the block chain. For the context of the present application, if the request initiated by the client carries the address of the face recognition smart contract, an event of calling the face recognition smart contract is triggered. Correspondingly, after the target blockchain node invokes the face recognition intelligent contract, the face recognition can be carried out on each face image to be recognized in the face image set of the target request only according to the execution logic of the face recognition intelligent contract.
S304, when the target block chain node finishes the block chain consensus and executes the target request, a face recognition intelligent contract is called, the face information of the target user is obtained from a local block according to the electronic certificate of the face information of the target user, and face recognition is carried out on each face image to be recognized in the set of face images to be recognized based on the face information of the target user, so that the face recognition result of each face image to be recognized corresponding to the target user is fed back to the client.
It should be appreciated that based on existing blockchain technology, clients connect to the blockchain network by accessing one blockchain node in the blockchain. The target request initiated by the client is firstly accepted by the accessed blockchain node and then broadcast by the accessed blockchain node so as to synchronize the data of the target request to the transaction pools of other blockchain nodes. An enabled blockchain node in the blockchain then pulls the data of the target request from its own transaction pool to initiate consensus. After the data of the target request passes the consensus, each blockchain node starts to execute the data of the target request again. Wherein the consensus is the existing mechanism of the blockchain, and after receiving the proposal of the consensus from the enabled blockchain link point, other blockchain nodes enter a consensus stage to verify the data of the proposal of the enabled blockchain link point based on the verification logic of the consensus. The purpose of the check is to confirm whether the enabled blockchain node has proposed the same data to each of the other blockchain nodes, thereby suppressing the enabled blockchain node from attempting to tamper with the data by proposing to other parts of the blockchain nodes to tamper with the data.
Therefore, for the embodiment of the present application, when the target request completes the consensus and is executed (that is, after the data of the target request is determined to be legal by the consensus), the target block link point needs to invoke the face recognition intelligent contract to perform face recognition on the real face image to be recognized and the confused face image to be recognized in the target request. Here, it should be noted that, the purpose of the client of the present application to initiate the target request is: the request target block chain node carries out face recognition on a face image set to be recognized in the target request, so that the following steps are executed on the target request: and calling a face recognition intelligent contract to carry out face recognition on the real face image to be recognized and the confusion face image to be recognized in the target request.
S306, the client selects the face recognition result of the real face image to be recognized corresponding to the target user from the face recognition results of the target user corresponding to each face image to be recognized fed back by the target block chain link point, and determines the target face recognition result based on the face recognition result of the real face image to be recognized corresponding to the target user.
It is understood that the confusion of the face image to be recognized in the application only plays a role in confusion, and the real face image to be recognized is prevented from being exposed to the blockchain. For the client, the final target face recognition result is determined only according to the face recognition result of the target user corresponding to the face image to be recognized. If the target face recognition result indicates that the target face recognition result passes, the user using the client is the target user; if the target face recognition result indicates that the user using the client does not pass through, the user using the client is not the target user.
In practical applications, the target blockchain node of the present application is not limited to one.
Aiming at the scene that the target block chain nodes are a plurality of, the client can request the face recognition intelligent contracts respectively called by the target block chain nodes through the form of target requests, and face recognition is carried out on the face image set to be recognized. Correspondingly, in the face recognition results of the target users corresponding to the real face images to be recognized fed back by the link points of the target blocks, if the duty ratio indicating the passing of the face recognition reaches the preset threshold, the client takes the passing of the face recognition as the target face recognition result, otherwise, the client takes the fact that the face recognition does not pass as the target face recognition result. Such as: and 10 target block chain nodes are provided, the preset threshold value is set to be 80%, and when the face recognition result indication provided by 9 target block chain nodes passes, the face recognition is taken as the final target face recognition result.
Aiming at the scene that the target block chain node is one, the client can take the face recognition result of the target user corresponding to the real face image to be recognized fed back by the unique target block chain node as a target face recognition result.
Furthermore, in some scenarios, the act of a user requesting blockchain to initiate face recognition may also be considered a type of privacy information. A scenario such as security inspection requires authentication of the user through face recognition to pass, and the user may not wish to expose his whereabouts to the blockchain. For example, in the face payment scenario, the user does not want to expose his own consumption record to the blockchain.
Aiming at the special privacy protection requirement, the application can also carry the electronic certificate of the face information of the confusing user on the target request. When the target blockchain node invokes the face recognition intelligent contract, the face recognition is carried out on each face image to be recognized in the set of face images to be recognized based on the face information of the target user, and the face recognition is carried out on each face image to be recognized based on the face information of the confusing user. Thus, for the blockchain side, it is not known whether the actual intention of the user to request face recognition is to initiate identity verification for the target user or to initiate identity verification for the confusing user. In general, the client initiates identity verification on which user, which indicates which user the user of the client is, and the electronic certificate which confuses the face information of the user is introduced, so that the blockchain cannot know which user needs to perform identity verification, and privacy protection for initiating face recognition is realized.
In addition, after the target request is executed, the target blockchain node can also write the information association such as the identification of the client, the electronic certificate of the face information of the target user (the electronic certificate of the face information of the confused user can be also included), the face recognition result (the face recognition result of the confused user can be also included) of the target user corresponding to each face image to be recognized, and the like into a local block of the target blockchain node for storage (namely, the writing block operation of the blockchain). Subsequently, if the face recognition result is doubtful, the user of the client can initiate complaints. Correspondingly, the method and the device can call out the electronic certificate of the face information of the target user submitted at the time and the face recognition result of each face image to be recognized corresponding to the target user from the local block of the target blockchain node based on the identification of the complaint client so as to trace back the face recognition.
Based on the foregoing, the scheme of the embodiment of the application stores the face information for verifying the identity of each user into the block of each blockchain node of the blockchain, and deploys face recognition intelligent contracts for each blockchain node. The face recognition intelligent contract is used for calling face information of a corresponding user from a block of the block chain node based on the electronic certificate in the client request to recognize the face image to be recognized in the client request. When the user needs to verify the identity of the target user through face recognition, the electronic memory card carrying the address of the face recognition intelligent contract, the face information of the target user and the target request of the face image set to be recognized can be submitted to the blockchain node through the client, so that the blockchain node invokes the face recognition intelligent contract, the face information of the target user is obtained from the local block of the blockchain node according to the electronic memory card in the target request, and the face recognition of the target user is performed on each face image to be recognized in the face image set to be recognized based on the face information of the target user. The whole scheme realizes neutral and reliable face recognition service by means of the advantage of block chain decentralization. Meanwhile, by means of the characteristics of transparency and traceability of the block chain data, the possibility that the face recognition result is maliciously tampered by the block chain link points is further restrained. In addition, the face image set to be recognized submitted by the client in the target request comprises a real face image to be recognized and a mixed face image to be recognized, and for the blockchain, the fact that which face image in the face image set to be recognized is the face image of the user cannot be known, so that the face image of the user cannot be directly exposed to the blockchain, and privacy protection is provided for the face image of the user in the face recognition process.
It should be appreciated that the method of the present application may be applied to any scenario where face recognition is required, initiated by a user via a client. The face recognition method of the application is described below by taking face payment as an example.
Referring to fig. 4, fig. 4 is a schematic flow chart of completing face payment based on the face recognition method of the present application, specifically including the following steps:
1) And the user initiates a transaction request of face payment to the payment system by using the payment APP of the client.
2) The payment system responds to the transaction request of the client side, and starts a payment APP execution face payment flow of the client side to execute:
2.1 A camera of the client is activated to shoot a real face image to be recognized of the user.
2.2 The control client requests to confuse the face image to be recognized from a server providing the face confusion service.
2.3 The server of the face confusion service responds to the request of the client, and randomly selects a plurality of face images to be recognized for confusion and feeds the face images back to the client.
In the application scene, a server of the face confusion service locally stores a plurality of face images authorized by users for confusion on a client side. Optionally, the face image at the server side can be stored again after being scrambled periodically, so as to ensure that the confusion to be recognized face image provided to the client is not fixed and circulated, and the cracking difficulty is increased.
3) After obtaining the real face image to be recognized and the face image to be recognized of the face payment, the client mixes the real face image to be recognized and the face image to be recognized together to obtain a face image set to be recognized, and simultaneously, the client configures an electronic certificate of a target user for each face image to be recognized in the face image set to be recognized.
Here, as an exemplary introduction, the data structure of the face image set to be recognized configuring the electronic certificate (the electronic certificate is represented by a token) is as follows:
[ { photo: 'face image to be recognized 1', token: 'token of target user' };
{ photo: 'confusing face photo 2', token: 'token of target user' };
{ photo: 'true face image to be identified', token: 'token of target user' };
{ photo } ' confusing face photo 3', token } ' token of the target user }.
The face images to be recognized are concentrated, the actual face images to be recognized and the mixed face images to be recognized are mixed together after being mixed, and no fixed ordering rule can be circulated.
In addition, the face payment scene can also introduce an electronic certificate which confuses the face information of the user. Correspondingly, the face image set to be identified is classified into two parts.
Part of the face images to be recognized are face images to be recognized, which are configured by an electronic certificate token based on face information of a real user, and the corresponding data structures are as follows:
[ { photo: 'confusion of face image to be recognized 1', token: 'token of target user' };
{ photo } ' confusion of face image 2' to be recognized, token } ' token of target user;
{ photo: 'true face image to be identified', token: 'token of target user' };
{ photo } ' confusing face photo 3', token } ' token of the target user }.
The other part is a face image to be recognized configured based on an electronic certificate token confusing the face information of the user, and the corresponding data structure is as follows:
[ { photo: 'confusion of face image to be recognized 1', token: 'confusion of token of user' };
{ photo: 'true face image to be recognized', token: 'token of confusing user' };
{ photo: ' confusion of face image 2' to be recognized, ' token: ' confusion of token of user ' };
{ photo } ' confusion of face image 3' to be recognized, token } ' confusion of token of user ].
4) And then, the client initiates a target request to a target block link point of the block chain, wherein the target request carries the address of the face recognition intelligent contract, the electronic certificate of the face information of the target user, the face image set to be recognized and the transaction mark of the face payment.
Similarly, if an electronic certificate for confusing the face information of the user is introduced, in this step, the target request also needs to carry the electronic certificate for confusing the face information of the user.
5) The target block link point responds to the target request, extracts a face recognition intelligent contract according to the address in the target request, invokes the face recognition intelligent contract, acquires the face information of the target user from the local block according to the electronic certificate in the target request, and carries out face recognition on each face image to be recognized in the set of face images to be recognized based on the face information of the target user to obtain a face recognition result of the face image to be recognized corresponding to the target user.
It should be noted that, the target request in the present application refers to a blockchain transaction, unlike a transaction in which a user initiates a face payment through a payment APP.
Obviously, if the face payment scene of the application introduces the electronic certificate of the face information of the confusing user, the step also needs to acquire the face information of the confusing user from the local block based on the electronic certificate corresponding to the confusing user, and face recognition is carried out on each face image to be recognized in the face image set to be recognized based on the face information of the confusing user, so as to obtain the face recognition result of each face image to be recognized corresponding to the confusing user.
6) And then, the target blockchain node feeds back the face recognition result of the target user corresponding to each face image to be recognized and the transaction identification of the face payment to the client and the payment system.
Similarly, if the face payment scene of the application introduces an electronic certificate for confusing the face information of the user, the target blockchain node in the step also feeds back the face recognition result of each face image to be recognized corresponding to the confusing user to the client and the payment system.
7) The client and the payment system determine the final target face recognition result of the face payment based on the face recognition result of the target user corresponding to the face image to be recognized.
It should be understood that if the target blockchain node in the present scenario is one, the face recognition result of the target user corresponding to the real face image to be recognized fed back by the unique target blockchain node is the final target face recognition result. If the target block chain nodes of the scene are multiple, in the face recognition results of the target users corresponding to the real face images to be recognized fed back by the multiple target block chain nodes, only when the duty ratio indicating the passing of the face recognition reaches a preset threshold, the face recognition is taken as the target face recognition result, otherwise, the face recognition is not taken as the target face recognition result.
In addition, in the application scenario, the target blockchain node may only feed back the face recognition results of the target users corresponding to the face images to be recognized to the client; and then, determining a final target face recognition result of the face payment by the payment APP at the customer service side based on the face recognition result of the target user corresponding to the face image to be recognized, and submitting the final target face recognition result to a payment system by the payment APP.
8) The payment system decides whether to execute face payment initiated by the user based on the target face recognition result.
Specifically, in this step, if the target face recognition result indicates that the user who initiates the transaction request is not a legal target user, rejecting the transaction request; and if the target face recognition result indicates that the user initiating the transaction request is a legal target user, performing the related operation of face payment of the user.
9) The payment system feeds back the final result of the face payment (payment success or payment failure) to the client.
It should be understood that if the final result of face payment indicates that the payment fails, and the client determines that the face recognition result is that the face recognition passes based on the face recognition result fed back by the target blockchain node, then complaints about the payment system can be initiated to the supervisor, and the supervisor can call relevant data of the face payment from the blockchain, such as the identification of the face payment, the electronic evidence of face information of the target user, the face image set to be identified, the face recognition result of each face image to be identified corresponding to the target user, and the like, and audit whether the payment system has illegal behaviors according to the fetched relevant data.
It can be seen that in the face payment scenario of the embodiment of the present application, the interpretation rights of the user identities are set in the decentralised blockchain, and the blockchain link points of the blockchain provide neutral and trusted face recognition services for the users based on the execution logic of the face recognition intelligent contract.
Meanwhile, based on the existing blockchain technology, each blockchain node can write block records on data in transactions initiated by clients, and the characteristics that the blockchain data is not tamperable and transparent and searchable are utilized, and then the face recognition is traced based on the records in the blocks, so that the behavior of the blockchain nodes is restrained, and the malicious modification of the face recognition result by the blockchain nodes is avoided.
In addition, in practical application, the client may send the blockchain transaction carrying the face image set to be identified to a plurality of blockchain nodes in the blockchain, and the blockchain nodes respectively perform face recognition on the face image set to be identified, and then determine a final target face recognition result according to the passing proportion of the face recognition results fed back by the blockchain nodes. Based on the technology of the blockchain, the fact that the face recognition result can only be distorted in the blockchain by malicious tampering of half or more blockchain nodes is not realized in theory, so that the face recognition mechanism based on the multi-area blockchain nodes can effectively avoid the possibility that the face recognition result is tampered, and has the advantage of high reliability.
Corresponding to the method shown in fig. 3, the embodiment of the application further provides a client. Fig. 5 is a schematic structural diagram of the client 500, including:
the transaction initiating unit 510 is configured to initiate a target request from a target block link point of a blockchain, where the target request carries an address of a face recognition intelligent contract, an electronic certificate of face information of the target user, and a set of face images to be recognized, blocks of each blockchain node in the blockchain record face information of a plurality of users including the target user, the set of face images to be recognized includes a real face image to be recognized and a mixed face image to be recognized, the face recognition intelligent contract is configured to invoke the face information of a corresponding user from the blocks of the blockchain node based on the electronic certificate in the client request to perform face recognition on the face image to be recognized in the client request, where the target block link point invokes the face recognition intelligent contract when the target request completes the co-recognition and execution, acquire the face information of the target user from a local block according to the electronic certificate of the face information of the target user, and perform the face recognition on each face image to be recognized in the set of face images to be recognized based on the face information of the target user, so as to perform the face recognition on the feedback result of each face image to be recognized to the client.
And the determining unit 520 is configured to select a face recognition result of the real face image to be recognized corresponding to the target user from face recognition results of the target user corresponding to each face image to be recognized fed back by the link points of the target block, and determine a target face recognition result based on the face recognition result of the real face image to be recognized corresponding to the target user.
Optionally, the target blockchain node is plural, and the determining unit 520 is specifically configured to: and in the face recognition results of the target users corresponding to the real face images to be recognized fed back by the target block chain link points, if the duty ratio indicating the passing of the face recognition reaches a preset threshold, the face recognition is taken as a target face recognition result, otherwise, the face recognition is not taken as a target face recognition result.
Optionally, the target blockchain node is one, and the determining unit 520 is specifically configured to: and taking the face recognition result of the target user corresponding to the real face image to be recognized fed back by the unique target block chain link point as a target face recognition result.
Optionally, the real face image to be recognized is a face image for face payment acquired by the client invoking a camera function when a user of the client initiates the face payment based on the client, and the target user is a settlement user for the face payment.
Optionally, the obfuscated face image to be identified is a face image randomly requested by the client from an authorized open source face image database.
According to another embodiment of the present application, each unit in the client shown in fig. 5 may be separately or completely combined into one or several other units to form a structure, or some unit(s) thereof may be further split into a plurality of units with smaller functions to form a structure, which may achieve the same operation without affecting the implementation of the technical effects of the embodiments of the present application. The above units are divided based on logic functions, and in practical applications, the functions of one unit may be implemented by a plurality of units, or the functions of a plurality of units may be implemented by one unit. In other embodiments of the present application, the data processing apparatus may also include other units, and in practical applications, these functions may also be implemented with assistance from other units, and may be implemented by cooperation of multiple units.
According to another embodiment of the present application, a client as shown in fig. 5 may be constructed by running a computer program (including program code) capable of executing the steps involved in the client-side corresponding method as shown in fig. 3 on a general-purpose computing device such as a computer including a processing element such as a Central Processing Unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and the like, and a storage element, and the face recognition method of the embodiment of the present application is implemented. The computer program may be recorded on a computer-readable storage medium, for example, and loaded into and executed in a data processing apparatus via the computer-readable storage medium.
Based on the client side of the embodiment of the application, the face information for verifying the identity of each user is stored in the block of each blockchain node of the blockchain, and face recognition intelligent contracts are deployed for each blockchain node. The face recognition intelligent contract is used for calling face information of a corresponding user from a block of the blockchain node based on the electronic certificate in the blockchain transaction to recognize the face image to be recognized in the blockchain transaction. When a user needs to verify the identity of a target user through face recognition, the user can submit an electronic certificate carrying the address of the intelligent contract for face recognition, the face information of the target user and a target request of a face image set to be recognized to the block chain link point through the client, so that the block chain link point invokes the intelligent contract for face recognition, the face information of the target user is acquired from a local block of the block chain node according to the electronic certificate in the target request, face recognition of the target user is carried out on each face image to be recognized in the face image set based on the face information of the target user, the face recognition result of each face image to be recognized for the target user is fed back to the client, and the face recognition result of the real face image to be recognized for the target user is extracted by the client in an advancing mode, so that the target face recognition result is determined. The whole scheme realizes neutral and reliable face recognition service by means of the advantage of block chain decentralization. Meanwhile, by means of the characteristics of transparency and traceability of the block chain data, the possibility that the face recognition result is maliciously tampered by the block chain link points is further restrained. In addition, the face image set to be recognized submitted by the client in the target request comprises a real face image to be recognized and a mixed face image to be recognized, and for the blockchain, the fact that which face image in the face image set to be recognized is the face image of the user cannot be known, so that the face image of the user cannot be directly exposed to the blockchain, and privacy protection is provided for the face image of the user in the face recognition process.
Corresponding to the method shown in fig. 3, the embodiment of the present application further provides a blockchain node. FIG. 6 is a schematic diagram of the blockchain node 600, including:
the receiving unit 610 is configured to receive a target request initiated by a client of a blockchain, where the target request carries an address of an intelligent contract for face recognition, an electronic certificate of face information of the target user, and a set of face images to be recognized, a block of each blockchain node in the blockchain records face information of a plurality of users including the target user, the set of face images to be recognized includes a real face image to be recognized and a confusing face image to be recognized, and the intelligent contract for face recognition is configured to retrieve face information of a corresponding user from a block of the blockchain node to perform face recognition on the face image to be recognized in the client request based on the electronic certificate in the client request.
And the execution unit 620 is configured to invoke the face recognition intelligent contract when the target request completes the co-recognition of the blockchain and executes the request, acquire the face information of the target user from a local block according to the electronic certificate of the face information of the target user, and perform face recognition on each face image to be recognized in the set of face images to be recognized based on the face information of the target user, so as to feed back the face recognition result of each face image to be recognized corresponding to the target user to the client, where the client selects the face recognition result of each face image to be recognized, which is fed back from the link point of the target block, corresponding to the target user from the face recognition result of each face image to be recognized, and determines the target face recognition result based on the face recognition result of the real face image to be recognized corresponding to the target user.
Optionally, the target request further carries an electronic certificate that confuses face information of the user, and when the target request completes the consensus and execution of the blockchain, the execution unit 620 is further configured to: and acquiring the face information of the confusion user from a local block according to the electronic certificate of the face information of the confusion user, and carrying out face recognition on each face image to be recognized in the set of face images to be recognized based on the face information of the confusion user so as to feed back the face recognition result of each face image to be recognized corresponding to the confusion user to the client, wherein the client selects the face recognition result of the real face image to be recognized corresponding to the target user from the face recognition result of each face image to be recognized fed back by the target block link point and the face recognition result of each face image to be recognized corresponding to the confusion user.
Optionally, the block link points include: and the recording unit is used for writing blocks corresponding to the face recognition result of the target user for each face image to be recognized to be associated and recorded in a local block after the target request is executed.
According to another embodiment of the present application, each unit in the blockchain node shown in fig. 6 may be separately or completely combined into one or several other units to form a structure, or some unit(s) thereof may be further split into a plurality of units with smaller functions to form a structure, which may achieve the same operation without affecting the implementation of the technical effects of the embodiments of the present application. The above units are divided based on logic functions, and in practical applications, the functions of one unit may be implemented by a plurality of units, or the functions of a plurality of units may be implemented by one unit. In other embodiments of the present application, the data processing apparatus may also include other units, and in practical applications, these functions may also be implemented with assistance from other units, and may be implemented by cooperation of multiple units.
According to another embodiment of the present application, the blockchain node as shown in fig. 6 may be constructed by running a computer program (including program code) capable of executing the steps involved in the target blockchain node-side corresponding method as shown in fig. 3 on a general-purpose computing device such as a computer including a processing element such as a Central Processing Unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and a storage element, and the face recognition method of the embodiment of the present application is implemented. The computer program may be recorded on a computer-readable storage medium, for example, and loaded into and executed in a data processing apparatus via the computer-readable storage medium.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Referring to fig. 7, at the hardware level, the electronic device includes a processor, and optionally an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, network interface, and memory may be interconnected by an internal bus, which may be an ISA (Industry Standard Architecture ) bus, a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or EISA (Extended Industry Standard Architecture ) bus, among others. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 7, but not only one bus or type of bus.
And the memory is used for storing programs. In particular, the program may include program code including computer-operating instructions. The memory may include memory and non-volatile storage and provide instructions and data to the processor.
Optionally, the processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs, and forms the client shown in fig. 5 above on a logic level. Correspondingly, the processor executes the program stored in the memory and is specifically configured to perform the following operations:
a target request is initiated to a target block link point of a block chain, wherein the target request carries an address of a face recognition intelligent contract, an electronic certificate of face information of a target user and a face image set to be recognized, the block records of each block chain node in the block chain contain the face information of a plurality of users including the target user, the face image set to be recognized comprises real face images to be recognized and mixed face images to be recognized, the face recognition intelligent contract is used for calling the face information of a corresponding user from the block of the block chain node to recognize the face images to be recognized in the client request based on the electronic certificate in the client request, and when the target block link point completes the co-recognition of the block chain and executes the target request, the face recognition intelligent contract is called, the face information of the target user is obtained from a local block according to the electronic certificate of the face information of the target user, and each face image to be recognized in the face image set to be recognized is subjected to face recognition based on the face information of the target user so as to feed back the face images to be recognized to the client.
And selecting the face recognition result of the real face image to be recognized corresponding to the target user from the face recognition result of each face image to be recognized corresponding to the target user, which is fed back by the target block chain link point, and determining a target face recognition result based on the face recognition result of the real face image to be recognized corresponding to the target user.
Alternatively, the processor reads the corresponding computer program from the non-volatile memory into the memory and then runs to logically form the blockchain node shown in fig. 6 above. Correspondingly, the processor executes the computer program stored in the memory and is specifically configured to perform the following operations:
receiving a target request initiated by a client of a blockchain, wherein the target request carries an address of an intelligent contract for face recognition, an electronic certificate of face information of a target user and a face image set to be recognized, the blocks of each blockchain node in the blockchain record face information of a plurality of users including the target user, the face image set to be recognized comprises a real face image to be recognized and a mixed face image to be recognized, and the intelligent contract for face recognition is used for calling the face information of a corresponding user from the blocks of the blockchain node to recognize the face image to be recognized in the client request based on the electronic certificate in the client request.
When the target requests complete the consensus of a blockchain and execution, invoking the face recognition intelligent contract, acquiring the face information of the target user from a local block according to the electronic certificate of the face information of the target user, recognizing the face of each face image to be recognized in the set of face images to be recognized based on the face information of the target user, and feeding back the face recognition result of each face image to be recognized corresponding to the target user to the client, wherein the client selects the face recognition result of each face image to be recognized, which is fed back from the link point of the target block, corresponding to the target user from the face recognition result of each face image to be recognized, and determines the target face recognition result based on the face recognition result of the real face image to be recognized corresponding to the target user.
The face recognition method disclosed in the embodiment of the application can be applied to a processor and implemented by the processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
Of course, other implementations, such as a logic device or a combination of hardware and software, are not excluded from the electronic device of the present application, that is, the execution subject of the following processing flow is not limited to each logic unit, but may be hardware or a logic device.
Furthermore, embodiments of the present application also propose a computer-readable storage medium storing one or more computer programs, the one or more computer programs comprising instructions.
Optionally, the above instructions, when executed by a portable electronic device comprising a plurality of applications, enable the portable electronic device to perform the steps performed at the client side in the method shown in fig. 3, comprising:
a target request is initiated to a target block link point of a block chain, wherein the target request carries an address of a face recognition intelligent contract, an electronic certificate of face information of a target user and a face image set to be recognized, the block records of each block chain node in the block chain contain the face information of a plurality of users including the target user, the face image set to be recognized comprises real face images to be recognized and mixed face images to be recognized, the face recognition intelligent contract is used for calling the face information of a corresponding user from the block of the block chain node to recognize the face images to be recognized in the client request based on the electronic certificate in the client request, and when the target block link point completes the co-recognition of the block chain and executes the target request, the face recognition intelligent contract is called, the face information of the target user is obtained from a local block according to the electronic certificate of the face information of the target user, and each face image to be recognized in the face image set to be recognized is subjected to face recognition based on the face information of the target user so as to feed back the face images to be recognized to the client.
And selecting the face recognition result of the real face image to be recognized corresponding to the target user from the face recognition result of each face image to be recognized corresponding to the target user, which is fed back by the target block chain link point, and determining a target face recognition result based on the face recognition result of the real face image to be recognized corresponding to the target user.
Alternatively, the instructions, when executed by a portable electronic device comprising a plurality of applications, cause the portable electronic device to perform the steps on the target blockchain side of the method of fig. 3, comprising:
receiving a target request initiated by a client of a blockchain, wherein the target request carries an address of an intelligent contract for face recognition, an electronic certificate of face information of a target user and a face image set to be recognized, the blocks of each blockchain node in the blockchain record face information of a plurality of users including the target user, the face image set to be recognized comprises a real face image to be recognized and a mixed face image to be recognized, and the intelligent contract for face recognition is used for calling the face information of a corresponding user from the blocks of the blockchain node to recognize the face image to be recognized in the client request based on the electronic certificate in the client request.
When the target requests complete the consensus of a blockchain and execution, invoking the face recognition intelligent contract, acquiring the face information of the target user from a local block according to the electronic certificate of the face information of the target user, recognizing the face of each face image to be recognized in the set of face images to be recognized based on the face information of the target user, and feeding back the face recognition result of each face image to be recognized corresponding to the target user to the client, wherein the client selects the face recognition result of each face image to be recognized, which is fed back from the link point of the target block, corresponding to the target user from the face recognition result of each face image to be recognized, and determines the target face recognition result based on the face recognition result of the real face image to be recognized corresponding to the target user.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing describes specific embodiments of the present application. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application. Moreover, all other embodiments obtained by those skilled in the art without making any inventive effort shall fall within the scope of protection of this document.

Claims (13)

1. A face recognition method, comprising:
the method comprises the steps that a client initiates a target request to a target block link point of a block chain, wherein the target request carries an address of a face recognition intelligent contract, an electronic certificate of face information of a target user and a face image set to be recognized, the block records of each block chain node in the block chain contain the face information of a plurality of users including the target user, the face image set to be recognized comprises a real face image to be recognized and a mixed face image to be recognized, and the face recognition intelligent contract is used for calling the face information of a corresponding user from a block of the block chain node to recognize the face image to be recognized in the client request based on the electronic certificate in the client request;
When the target block link point completes the consensus of a block chain and executes the target request, invoking the face recognition intelligent contract, acquiring the face information of the target user from a local block according to the electronic certificate of the face information of the target user, and carrying out face recognition on each face image to be recognized in the set of face images to be recognized based on the face information of the target user so as to feed back the face recognition result of each face image to be recognized corresponding to the target user to the client;
and the client selects the face recognition result of the real face image to be recognized corresponding to the target user from the face recognition results of the target user corresponding to each face image to be recognized fed back by the target block chain link point, and determines a target face recognition result based on the face recognition result of the real face image to be recognized corresponding to the target user.
2. The method of claim 1, wherein the target request further carries an electronic certificate that confuses face information of a user, and wherein the target block link point invokes the face recognition intelligent contract when the target request completes the consensus and execution of a block chain, further performs:
And acquiring the face information of the confusion user from a local block according to the electronic certificate of the face information of the confusion user, and carrying out face recognition on each face image to be recognized in the set of face images to be recognized based on the face information of the confusion user so as to feed back the face recognition result of each face image to be recognized corresponding to the confusion user to the client, wherein the client selects the face recognition result of the real face image to be recognized corresponding to the target user from the face recognition result of each face image to be recognized fed back by the target block link point and the face recognition result of each face image to be recognized corresponding to the confusion user.
3. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the target blockchain nodes are a plurality of, and the determining the target face recognition result based on the face recognition result of the target user corresponding to the real face image to be recognized comprises the following steps:
and in the face recognition results of the target users corresponding to the real face images to be recognized fed back by the target block chain link points, if the duty ratio indicating the passing of the face recognition reaches a preset threshold, the face recognition is taken as a target face recognition result, otherwise, the face recognition is not taken as a target face recognition result.
4. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the target blockchain node is one, and the determining a target face recognition result based on the face recognition result of the target user corresponding to the real face image to be recognized comprises the following steps:
and taking the face recognition result of the target user corresponding to the real face image to be recognized fed back by the target block chain link point as a target face recognition result.
5. The method as recited in claim 1, further comprising:
and after the target request is executed, the target block link point writes blocks corresponding to the face recognition result of the target user for each face image to be recognized, so as to be associated and recorded in a local block.
6. The method according to any one of claim 1 to 5, wherein,
the real face image to be recognized is a face image which is acquired by the client and used for face payment by calling a camera shooting function when a user of the client initiates face payment based on the client, and the target user is a settlement user for the face payment.
7. The method according to any one of claim 1 to 5, wherein,
the confusing face image to be identified is a face image which is randomly requested by the client from an authorized open source face image database.
8. The face recognition method is applied to the client and is characterized by comprising the following steps of:
a target request is initiated to a target block link point of a block chain, wherein the target request carries an address of a face recognition intelligent contract, an electronic certificate of face information of a target user and a face image set to be recognized, the block records of each block chain node in the block chain contain the face information of a plurality of users including the target user, the face image set to be recognized comprises real face images to be recognized and mixed face images to be recognized, the face recognition intelligent contract is used for calling the face information of a corresponding user from the block of the block chain node to recognize the face images to be recognized in the client request based on the electronic certificate in the client request, and when the target block link point completes the co-recognition of the block chain and executes the target request, the face recognition intelligent contract is called, the face information of the target user is obtained from a local block according to the electronic certificate of the face information of the target user, and each face image to be recognized in the face image set to be recognized is subjected to face recognition based on the face information of the target user so as to feed back the face images to be recognized to the client;
And selecting the face recognition result of the real face image to be recognized corresponding to the target user from the face recognition result of each face image to be recognized corresponding to the target user, which is fed back by the target block chain link point, and determining a target face recognition result based on the face recognition result of the real face image to be recognized corresponding to the target user.
9. A face recognition method applied to a blockchain node, comprising:
receiving a target request initiated by a client of a blockchain, wherein the target request carries an address of an intelligent contract for face recognition, an electronic certificate of face information of the target user and a face image set to be recognized, the blocks of each blockchain node in the blockchain record face information of a plurality of users including the target user, the face image set to be recognized comprises a real face image to be recognized and a mixed face image to be recognized, and the intelligent contract for face recognition is used for calling the face information of a corresponding user from the blocks of the blockchain node to recognize the face image to be recognized in the client request based on the electronic certificate in the client request;
When the target requests complete the consensus of a blockchain and execution, invoking the face recognition intelligent contract, acquiring the face information of the target user from a local block according to the electronic certificate of the face information of the target user, recognizing the face of each face image to be recognized in the set of face images to be recognized based on the face information of the target user, and feeding back the face recognition result of each face image to be recognized corresponding to the target user to the client, wherein the client selects the face recognition result of each face image to be recognized, which is fed back from the link point of the target block, corresponding to the target user from the face recognition result of each face image to be recognized, and determines the target face recognition result based on the face recognition result of the real face image to be recognized corresponding to the target user.
10. A client, comprising:
a request unit, configured to send a target request to a target block link point of a block chain, where the target request carries an address of a face recognition intelligent contract, an electronic certificate of face information of the target user, and a set of face images to be recognized, the block of each block chain node in the block chain records face information of a plurality of users including the target user, the set of face images to be recognized includes a real face image to be recognized and a mixed face image to be recognized, and the face recognition intelligent contract is configured to retrieve face information of a corresponding user from a block of a block chain node based on the electronic certificate in the client request, and perform face recognition on the face image to be recognized in the client request, where when the target block link point completes consensus and executes the target request, the target block link point invokes the face recognition contract, acquire face information of the target user from a local block according to the electronic certificate of the face information of the target user, and perform face recognition on each face image to be recognized in the set of face images to be recognized based on the face information of the target user, so as to perform face recognition on each face recognition result of the corresponding user to the target user;
And the determining unit is used for selecting the face recognition result of the real face image to be recognized corresponding to the target user from the face recognition result of each face image to be recognized corresponding to the target user, which is fed back by the link points of the target block, and determining a target face recognition result based on the face recognition result of the real face image to be recognized corresponding to the target user.
11. A blockchain node, comprising:
the system comprises a receiving unit, a receiving unit and a processing unit, wherein the receiving unit is used for receiving a target request initiated by a client of a blockchain, the target request carries an address of an intelligent contract for face recognition, an electronic certificate of face information of the target user and a face image set to be recognized, the blocks of each blockchain node in the blockchain record face information of a plurality of users including the target user, the face image set to be recognized comprises a real face image to be recognized and a confused face image to be recognized, and the intelligent contract for face recognition is used for calling the face information of a corresponding user from the blocks of the blockchain node to recognize the face image to be recognized in the client based on the electronic certificate in the client request;
And the execution unit is used for calling the face recognition intelligent contract when the target request completes the consensus of the blockchain and executes the same, acquiring the face information of the target user from a local block according to the electronic certificate of the face information of the target user, recognizing the face of each face image to be recognized in the set of face images to be recognized based on the face information of the target user, feeding back the face recognition result of each face image to be recognized corresponding to the target user to the client, wherein the client selects the face recognition result of each face image to be recognized corresponding to the target user from the face recognition results of each face image to be recognized fed back by the target block chain link point, and determines the target face recognition result based on the face recognition result of each face image to be recognized corresponding to the target user.
12. An electronic device includes: memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the computer program is executed by the processor to perform the method of claims 1 to 7.
13. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program when executed by a processor implements the method of claims 1 to 7.
CN202210900200.7A 2022-07-28 2022-07-28 Face recognition method and device, electronic equipment and storage medium Pending CN116129485A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210900200.7A CN116129485A (en) 2022-07-28 2022-07-28 Face recognition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210900200.7A CN116129485A (en) 2022-07-28 2022-07-28 Face recognition method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116129485A true CN116129485A (en) 2023-05-16

Family

ID=86303272

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210900200.7A Pending CN116129485A (en) 2022-07-28 2022-07-28 Face recognition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116129485A (en)

Similar Documents

Publication Publication Date Title
JP6914353B2 (en) Real estate property management system using blockchain network
CN109146679B (en) Intelligent contract calling method and device based on block chain and electronic equipment
CN110096857B (en) Authority management method, device, equipment and medium for block chain system
US20200274715A1 (en) Method, apparatus, and electronic device for blockchain-based recordkeeping
CN113542288B (en) Service authorization method, device, equipment and system
CN104104672B (en) The method that dynamic authorization code is established in identity-based certification
WO2019042324A1 (en) Resource transfer method, fund payment method and apparatus, and electronic device
CN110035105B (en) Screen recording evidence obtaining method and system based on block chain and electronic equipment
CN111415158B (en) Wind control method and system based on block chain
CN112100594A (en) Service processing method, device and equipment based on block chain
CN111159651A (en) Block chain online evidence storage method and system
US20160379328A1 (en) Identification Authentication in a Communications Network
CN110032846B (en) Identity data anti-misuse method and device and electronic equipment
CN111191212A (en) Block chain-based digital certificate processing method, device, equipment and storage medium
CN113630253A (en) Login method, device, computer system and readable storage medium
US11837031B2 (en) Distributed voting platform
CN115102744A (en) Data access method and device
CN112069529B (en) Block chain-based volume management method and device, computer and storage medium
CN112333217A (en) Joint recommendation method and system based on block chain
CN116129485A (en) Face recognition method and device, electronic equipment and storage medium
TWI745749B (en) Block chain-based audio agreement signing method and device, and electronic equipment
CN114040223A (en) Image processing method and system
CN111784352A (en) Authentication risk identification method and device and electronic equipment
CN113259340B (en) Block chain data processing method and device and electronic equipment
US20240007472A1 (en) Authorization level unlock for matching authorization categories

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