CN115204893A - Face recognition method and device for electronic payment and computer equipment - Google Patents

Face recognition method and device for electronic payment and computer equipment Download PDF

Info

Publication number
CN115204893A
CN115204893A CN202210699772.3A CN202210699772A CN115204893A CN 115204893 A CN115204893 A CN 115204893A CN 202210699772 A CN202210699772 A CN 202210699772A CN 115204893 A CN115204893 A CN 115204893A
Authority
CN
China
Prior art keywords
face
preset
video
electronic payment
recognition
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
CN202210699772.3A
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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank 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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202210699772.3A priority Critical patent/CN115204893A/en
Publication of CN115204893A publication Critical patent/CN115204893A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4014Identity check for transactions
    • G06Q20/40145Biometric identity checks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • 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/161Detection; Localisation; Normalisation
    • 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/40Spoof detection, e.g. liveness detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Collating Specific Patterns (AREA)

Abstract

The embodiment of the application provides a face recognition method, a face recognition device, computer equipment and a storage medium for electronic payment, wherein the method comprises the following steps: the face recognition method for electronic payment comprises the following steps: if an electronic payment request based on face recognition is received, acquiring a current face video of a user to be subjected to electronic payment; the method comprises the steps of activating a potential mapping model through a trained class focused on a preset face region, and identifying whether the preset face region in a face video moves or not to obtain a face movement identification result; judging whether the face in the face video is a real face or not according to the face motion recognition result; and if the face in the face video is a real face and the authentication result is successful, carrying out electronic payment based on a payment account matched with the face. The embodiment of the application aims to accurately determine the preset face area, and improves the face living body recognition precision.

Description

Face recognition method and device for electronic payment and computer equipment
Technical Field
The application relates to the technical field of communication, in particular to a face recognition method and device for electronic payment, computer equipment and a storage medium.
Background
With the development of science and technology, electronic payment is more and more widely entered into the lives of people due to the advantages of convenience, easy operation, high efficiency and the like. In the existing electronic payment, besides password payment and the like, a face recognition payment technology is gradually becoming a mainstream payment technology.
However, at present, fraud and the like may occur through face recognition payment, for example, fraud is performed through photos, synthesized faces and the like. In order to prevent fraud, at present, living body detection is usually performed based on a human face, but living body detection based on the human face is difficult to locate at a moving part of a human face area, and a situation that a user still cannot recognize the moving part after moving may occur.
Disclosure of Invention
The embodiment of the application provides a face recognition method and device for electronic payment, computer equipment and a storage medium, which can accurately determine the face to be located in a preset face area, improve the face living body recognition precision and ensure the payment safety.
In one aspect, the present application provides a face recognition method for electronic payment, which includes: if an electronic payment request based on face recognition is received, acquiring a current face video of a user to be subjected to electronic payment; the method comprises the steps of activating a potential mapping model through a trained class focused on a preset face region, and identifying whether the preset face region in a face video moves or not to obtain a face movement identification result; judging whether the face in the face video is a real face or not according to the face motion recognition result; if the face in the face video is a real face, carrying out identity verification on the user through a pre-trained face recognition model to obtain an identity verification result; and if the identity authentication result is that the authentication is successful, carrying out electronic payment based on the payment account matched with the face.
On the other hand, the application provides a face recognition device based on electronic payment, and the face recognition device based on electronic payment comprises:
the acquisition module is used for acquiring the current face video of the user to be subjected to electronic payment if an electronic payment request based on face recognition is received;
the living body detection module is used for identifying whether a preset face area in the face video moves or not through a trained class activation potential mapping model focused on the preset face area to obtain a face movement identification result; judging whether the face in the face video is a real face or not according to the face motion recognition result;
the face recognition module is used for carrying out identity verification on the user through a pre-trained face recognition model to obtain an identity verification result if the face in the face video is a real face; and if the identity authentication result is that the authentication is successful, carrying out electronic payment based on the payment account matched with the face.
In another aspect, the present application further provides a computer device, including:
one or more processors;
a memory; and
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the method for face recognition for electronic payments of any of the first aspect.
In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, the computer program being loaded by a processor to execute the steps in the face recognition method for electronic payment according to any one of the first aspect.
The embodiment of the application carries out the positioning of the preset face region through a class activation potential mapping model (F-CALM) focusing on the preset face region, and the model has the characteristic of strong focusing property, so that the model can be accurately positioned to the preset face region to judge whether the face moves, the identification precision of face living body identification can be improved, after the face is judged to be a real face, the identity is verified through the face identification model, electronic payment is carried out, and the payment safety is ensured.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of an embodiment of a face recognition method for electronic payment provided in an embodiment of the present application;
fig. 2 is a schematic flow chart of another embodiment of a face recognition method for electronic payment provided in the embodiment of the present application;
fig. 3 is a schematic structural diagram of an embodiment of a face recognition device based on electronic payment provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of an embodiment of a computer device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the description of the present application, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like indicate orientations or positional relationships based on those shown in the drawings, and are used merely for convenience of description and for simplicity of description, and do not indicate or imply that the referenced device or element must have a particular orientation, be constructed in a particular orientation, and be operated, and thus should not be considered as limiting the present application. Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
In this application, the word "exemplary" is used to mean "serving as an example, instance, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the application. In the following description, details are set forth for the purpose of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known structures and processes are not set forth in detail in order to avoid obscuring the description of the present application with unnecessary detail. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
It should be noted that, since the method in the embodiment of the present application is executed in a computer device, processing objects of each computer device exist in the form of data or information, for example, time, which is substantially time information, and it is understood that, in the subsequent embodiments, if size, number, position, and the like are mentioned, corresponding data exist, so as to be processed by the electronic device, and details are not described herein.
The embodiments of the present application provide a face recognition method and apparatus, a computer device, and a storage medium for electronic payment, which are described in detail below.
First, an embodiment of the present application provides a face recognition method for electronic payment, where an execution subject of the face recognition method for electronic payment is a face recognition apparatus based on electronic payment, and the face recognition apparatus based on electronic payment is applied to a computer device, and the face recognition method for electronic payment includes: if an electronic payment request based on face recognition is received, acquiring a current face video of the user to be subjected to electronic payment; the method comprises the steps of activating a potential mapping model through a trained class focused on a preset face region, and identifying whether the preset face region in a face video moves or not to obtain a face movement identification result;
judging whether the face in the face video is a real face or not according to the face motion recognition result; if the face in the face video is a real face, carrying out identity verification on the user through a pre-trained face recognition model to obtain an identity verification result; and if the identity authentication result is that the authentication is successful, carrying out electronic payment based on the payment account matched with the face.
The embodiment of the application carries out the positioning of the preset face region through a class activation potential mapping model (F-CALM) focusing on the preset face region, and the model has the characteristic of strong focusing property, so that the model can be accurately positioned to the preset face region to judge whether the face moves, the identification precision of face living body identification can be improved, after the face is judged to be a real face, the identity is verified through the face identification model, electronic payment is carried out, and the payment safety is ensured.
As shown in fig. 1, which is a schematic flow chart of an embodiment of a face recognition method for electronic payment in the embodiment of the present application, the face recognition method for electronic payment includes:
step 101, if an electronic payment request based on face recognition is received, acquiring a current face video of a user to be subjected to electronic payment.
For example, the computer device may provide multiple electronic payment verification methods, such as face recognition verification, password recognition verification, and the like, and the computer device may monitor whether electronic payment is required in real time, and if electronic payment is required and the electronic payment verification method is face recognition verification, characterize that an electronic payment request based on face recognition is received. The electronic payment request can carry the current face video of the user to be subjected to electronic payment, so that the face video can be conveniently received.
That is to say, if the electronic payment request carries the current face video of the user to be subjected to electronic payment, the computer device may obtain the current face video from the electronic payment request, and if the electronic payment request does not carry the current face video of the user to be subjected to electronic payment, the computer device may also obtain the current face video in other manners, which is not limited in this embodiment.
The computer device in the embodiment of the present application may be a special cash register device, or may also be a server or a terminal, such as a mobile phone, a tablet, and the like, which is not limited in the embodiment of the present application.
And 102, activating a potential mapping model through the trained class focusing on the preset face region, and identifying whether the preset face region in the face video moves or not to obtain a face movement identification result. The preset human face area is eyes, mouth and the like, and whether the human face area is a living human face organ can be judged.
In some embodiments, a plurality of face image frames may be acquired from a face video; determining a preset face region of each face image frame by focusing on an activated potential mapping model of the preset face region; and comparing the face characteristics of the preset face area of each face image frame to obtain a face motion recognition result.
In some embodiments, acquiring a plurality of face image frames from a face video includes: carrying out face image quality evaluation on each face image frame in the face video to obtain the face image definition; and screening the human face image frames meeting the preset image definition from the human face image frames to obtain the plurality of human face image frames. The image definition can be set according to requirements, such as no ghost, and the like, and this embodiment does not limit this.
F-CALM is improved by the Class Activation Mapping (CAM). F-CALM is explanatory and can generate attribution map (attribute map) for classified network
The class activation map corresponding to the CAM can show the most discriminative core region for identifying a specific class, and the class activation map of the corresponding class of a certain picture can be calculated through the weighting of the output feature map of the last convolution layer. There are many methods for computing class activation graphs, including: grad-CAM, grad-CAM + +, and the like.
Hidden variables encoding and identifying cue positions can be explicitly combined in a Class Activation Mapping (CAM) model, so that an attribute map (attribute map) is put into a training computational map (CALL), and thus, a class activation potential mapping (CALM) model is constructed. For example, the embodiment of the present application may use the position of the pixel point as a hidden variable.
CALM is trained by the Expectation-Maximization (EM) algorithm. CALM is able to more accurately identify the discriminating attributes of an image classifier than other visual attribute baselines such as CAM.
The method and the device improve the focusing performance on the basis of the class activation of the latent mapping model CALM, and obtain the class activation of the latent mapping model F-CALM for focusing on the preset face area.
In some embodiments, in the class-activated potential mapping model, the class-activated potential mapping model may be trained by a preset loss function to obtain a trained class-activated potential mapping model for focusing on a preset face region.
For example, compared with the method for calculating the loss through the EM algorithm in the CALM, in the embodiment of the present application, when the training class activates the potential mapping model F-CALM, an area loss function may be added to the preset loss function to enhance the focusing performance.
That is, the preset loss function is the loss L calculated by EM em And area loss function L area The sum of (a) and (b).
Loss L calculated by EM em Reference may be made to the following:
L EM =-logp θ (y|x)≤-∑ z p θ′ (z|x,y)log p θ (y,z|x);
wherein x is a face image in a face video training sample, Z is a pixel point of the face image x, Z can be used as a hidden variable, y is a classification result of the face image x, theta is a parameter of a classification network, and theta' is a distribution parameter of Z.
Area loss function L area The following were used:
Figure BDA0003703559490000071
wherein x is a face image in a face video training sample, and z i Is the position of the ith pixel point of the face image x, n is the total number of the pixel points,
Figure BDA0003703559490000072
for the classification labeling of the image determined according to the ith pixel point,
Figure BDA0003703559490000073
indicating that in the case where x is known,
Figure BDA0003703559490000074
the joint probability of (c).
The preset loss function is as follows:
L=L EM +L EM
in the embodiment, an area loss function is added during training, and the area loss function is the sum of the joint probability distribution of each pixel point and the classification label under the condition of determining the face image x, so that the classification conditions of different positions of different face images can be reflected, and the face focusing performance is improved.
After the face motion recognition structure is obtained through the trained F-CALM, the process proceeds to step 103.
And 103, judging whether the face in the face video is a real face or not according to the face motion recognition result. The real face is directly shot by a user to be electronically paid at present, and the face obtained by means of a photo, a synthesized face and the like does not exist.
If the face motion recognition result indicates that the preset face area has motion, the face in the face video is a real face, and the step 104 is entered.
And step 104, performing identity verification on the user through the pre-trained face recognition model to obtain an identity verification result.
Authentication of a user is divided into two cases, one is a payment account for which the computer device knows that electronic payment is to be made, and the other is a payment account for which the computer device does not know that electronic payment is to be made.
Under the condition that the computer equipment knows a payment account to be subjected to electronic payment, the pre-trained face recognition model can be used for distinguishing a face in a current face video and judging whether the face is matched with a face of a pre-stored payment account to be subjected to electronic payment, if so, the authentication result is successful, and if not, the authentication result is failed. For example, a payment account has logged in a certain payment APP, a user to be subjected to electronic payment can enter a face video during payment, and a pre-trained face recognition model judges whether a face in the face video entered by the user to be subjected to electronic payment matches with an actual user face corresponding to the payment account.
Under the condition that the payment account to be subjected to electronic payment is unknown by the computer equipment, the pre-trained model needs to be capable of identifying the payment account corresponding to the face in the current face video, if the face of each stored payment account is matched with the face in the current face video, the payment account corresponding to the face in the current face video is found, if the payment account is found, verification is successful, the payment account matched with the face in the face video is obtained, and if the payment account is not found, verification fails. For example, when a user performs face brushing payment on trading equipment in a shopping mall, the trading equipment does not know the payment account of the user, and the payment account needs to be searched based on a face video of the user.
One payment account may correspond to multiple faces, that is, multiple users may use the same payment account, for example, user a may give user B the authority to use the payment account to perform electronic payment, so that the payment account corresponds to the faces of user a and user B.
When the authentication result is authentication failure, a prompt message can be sent to prompt the user, for example: the user is not registered, the face of the user is incomplete or an object in the background is recognized, and the like.
When the authentication result is not successfully authenticated, step 105 may be performed.
And 105, if the identity authentication result is successful, carrying out electronic payment based on the payment account matched with the face.
That is, an order for an electronic payment is obtained and payment is made based on the identified payment account.
The process from the step 104 to the step 105 is a process in the case that the face in the face video is a real face, and when the face in the face video is a virtual face, the process may reenter the step 102 to re-receive the electronic payment request; when the face in the face video is a virtual face, referring to fig. 2, step 201 to step 202 are also executed.
Step 201, if the face in the face video is a virtual face, outputting an alarm prompt of virtual face fraud transaction based on the payment account matched with the face.
After the virtual face is determined, in order to ensure the safety of cash, an alarm prompt is output in consideration of the possibility of fraud of the payment account, so that the user can know the risk of the payment account and process the risk.
Step 202, if the processing message of the alarm prompt is the frozen account, the payment account is frozen.
That is, the processing mode selected by the user is to freeze the account, and in practical application, the user may also select other processing modes, for example, ignoring the alarm prompt.
In some embodiments, when a face in a face video is detected to be a virtual face, a payment account corresponding to the virtual face may be set as a risk account, and after a current face video of a user to be subjected to electronic payment is acquired each time, whether an account corresponding to the face is a risk account is verified, that is, whether a situation that the face in the face video is determined to be the virtual face exists in a historical transaction is verified; if present, the level of transaction verification may be increased.
Illustratively, if the payment account is a risk account, obtaining biometric information of a user to be subjected to electronic payment, where the biometric information includes at least any one of: iris information, fingerprint information, voiceprint information, bone voiceprint information; and if the identity authentication result is that the authentication is successful and the payment account matched with the biological characteristic information is the same as the payment account matched with the face, carrying out electronic payment based on the payment account matched with the face. According to the embodiment of the application, under the condition that the payment account has risks, the face recognition and the biological feature information of the user are combined to carry out identity verification so as to determine whether to carry out payment or not, and the payment safety is further improved.
The method and the device have the advantages that the preset face region is positioned through a class activation potential mapping (F-CALM) focused on the preset face region, and due to the fact that the model has the characteristic of strong focusing, the model can be accurately positioned in the preset face region to judge whether the face moves, the recognition accuracy of face living body recognition can be improved, after the face is judged to be a real face, identity verification is conducted through the face recognition model, electronic payment is conducted, and the safety of payment is guaranteed; in addition, the F-CALM of the embodiment of the application is combined with an area loss function in training, and the focusing performance can be improved through the area loss function, so that the face recognition precision is further improved.
An embodiment of the present application further provides a face recognition device based on electronic payment, which can be shown in fig. 3, and the face recognition device based on electronic payment includes:
an obtaining module 301, configured to obtain a current face video of the user to be subjected to electronic payment if an electronic payment request based on face recognition is received;
the living body detection module 302 is configured to activate a potential mapping model according to a trained class focused on a preset face region, and identify whether the preset face region in the face video moves, so as to obtain a face movement identification result; judging whether the face in the face video is a real face or not according to the face motion recognition result;
a face recognition module 303, configured to, if a face in the face video is a real face, perform identity verification on the user through a pre-trained face recognition model to obtain an identity verification result; and if the identity authentication result is that the authentication is successful, carrying out electronic payment based on the payment account matched with the face.
In some embodiments of the present application, the living body detection module 302 is further configured to obtain a face video training sample before the trained class activation potential mapping model for focusing on a preset face region is used to identify whether the preset face region in the face video moves, so as to obtain a face motion identification result, where the classification labeling of the face video training sample includes: the preset face area is moved, and the preset face area is not moved; inputting the face video training sample into a class activation potential mapping model to obtain an estimated face motion recognition result; and obtaining the trained class activation potential mapping model according to the estimated face motion recognition result, the classification label and a preset loss function of the training sample.
In some embodiments of the present application, the living body detection module 302 is further configured to obtain the trained class activation potential mapping model according to the estimated face motion recognition result of the training sample, the classification label, and a preset loss function, including: calculating an area loss function according to the classification labels and the training samples to obtain an area loss function value, wherein the area loss function L area The following were used:
Figure BDA0003703559490000111
wherein x is a face image in a face video training sample, and z i Is the position of the ith pixel point of the face image x, n is the total number of the pixel points,
Figure BDA0003703559490000112
for the classification labeling of the image determined according to the ith pixel point,
Figure BDA0003703559490000113
indicating that in the case where x is known,
Figure BDA0003703559490000114
a joint probability of (a); inputting the area loss function value and the estimated face motion recognition result into the preset loss function to obtain a preset loss function value; and training the class activation potential mapping model according to the preset loss function value to obtain the trained class activation potential mapping model. In the embodiment, an area loss function is added during training, and the area loss function is the sum of the joint probability distribution of each pixel point and the classification label under the condition of determining the face image x, so that the classification conditions of different positions of different face images can be reflected, and the face focusing performance is improved.
In some embodiments of the present application, the living body detection module 302 is further configured to activate a potential mapping model through a trained class focused on a preset face region, and identify whether the preset face region in the face video moves, so as to obtain a face movement identification result, where the identifying includes: acquiring a plurality of face image frames according to the face video; determining a preset face region of each face image frame through the activated potential mapping model focusing on the preset face region; and comparing the face characteristics of the preset face area of each face image frame to obtain a face motion recognition result.
In some embodiments of the present application, the liveness detection module 302 is further configured to acquire a plurality of face image frames according to the face video, including: carrying out face image quality evaluation on each face image frame in the face video to obtain the face image definition; and screening the face image frames meeting the preset image definition from the face image frames to obtain the plurality of face image frames. According to the embodiment of the application, the face image frame meeting the preset image definition is screened, so that the face image recognition efficiency is improved.
In some embodiments of the present application, the face recognition module 303 is further configured to output an alarm prompt of a virtual face fraud transaction based on the payment account matched with the face if the face in the face video is a virtual face; monitoring the processing message of the alarm prompt; and if the processing message is the frozen account, freezing the payment account. In the embodiment, whether the account is frozen or not can be selected based on the user processing message, and the safety of the payment account is improved.
In some embodiments of the present application, the face recognition module 303 is further configured to verify whether there is a case that a face in the face video is determined to be a virtual face in a historical transaction after acquiring a current face video of a user to be subjected to electronic payment; if the face in the face video is determined to be a virtual face, obtaining biological feature information of the user to be subjected to electronic payment, wherein the biological feature information comprises at least any one of the following items: iris information, fingerprint information, voiceprint information, bone voiceprint information; if the identity verification result is that the verification is successful, carrying out electronic payment based on the payment account matched with the face, wherein the electronic payment comprises the following steps: and if the identity authentication result is successful, and the payment account matched with the biological characteristic information is the same as the payment account matched with the face, carrying out electronic payment based on the payment account matched with the face. In the embodiment, under the condition that the payment account has risks, the face recognition and the biological feature information of the user are combined to perform identity verification to determine whether to perform payment, so that the payment safety is further improved.
The embodiment of the present application further provides a computer device, which integrates any one of the face recognition apparatuses based on electronic payment provided by the embodiment of the present application, and the computer device includes:
one or more processors;
a memory; and
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor for the steps of the face recognition method for electronic payment described in any of the above embodiments of the face recognition method for electronic payment.
The embodiment of the application further provides computer equipment, and the computer equipment integrates any one of the face recognition devices based on electronic payment provided by the embodiment of the application. As shown in fig. 4, it shows a schematic structural diagram of a computer device according to an embodiment of the present application, and specifically:
the computer device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 4 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby monitoring the computer device as a whole. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The computer device further comprises a power supply 403 for supplying power to the various components, and preferably, the power supply 403 is logically connected to the processor 401 via a power management system, so that functions of managing charging, discharging, and power consumption are implemented via the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The computer device may also include an input unit 404, the input unit 404 being operable to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the computer device loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application programs stored in the memory 402.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present application provides a computer-readable storage medium, which may include: read Only Memory (ROM), random Access Memory (RAM), magnetic or optical disks, and the like. Stored thereon, is a computer program, which is loaded by a processor to execute the steps of any one of the methods for face recognition for electronic payment provided by the embodiments of the present application. For example, the computer program may be loaded by a processor to perform the steps of:
if an electronic payment request based on face recognition is received, acquiring a current face video of a user to be subjected to electronic payment;
the method comprises the steps of identifying whether a preset face area in a face video moves or not through a trained class activation potential mapping model focused on the preset face area to obtain a face movement identification result;
judging whether the face in the face video is a real face or not according to the face motion recognition result; if the face in the face video is a real face, carrying out identity verification on the user through a pre-trained face recognition model to obtain an identity verification result;
and if the identity authentication result is that the authentication is successful, carrying out electronic payment based on the payment account matched with the face.
In some embodiments of the present application, before the trained class activation potential mapping model for focusing on a preset face region is used to identify whether the preset face region in the face video moves and obtain a face motion identification result, a face video training sample is obtained, wherein the classification labeling of the face video training sample includes: the preset face area is moved, and the preset face area is not moved; inputting the face video training sample into a class activation potential mapping model to obtain an estimated face motion recognition result; and obtaining the trained class activation potential mapping model according to the estimated face motion recognition result, the classification label and a preset loss function of the training sample.
In some embodiments of the present application, obtaining the trained class activation potential mapping model according to the estimated face motion recognition result, the classification label, and the preset loss function of the training sample includes: calculating an area loss function according to the classification labels and the training samples to obtain an area loss function value, wherein the area loss function L area The following:
Figure BDA0003703559490000151
wherein, x is a face image in a face video training sample, z i Is the position of the ith pixel point of the face image x, n is the total number of the pixel points,
Figure BDA0003703559490000161
for the classification labeling of the image determined according to the ith pixel point,
Figure BDA0003703559490000162
indicating that in the case where x is known,
Figure BDA0003703559490000163
a joint probability of (a); inputting the area loss function value and the estimated face motion recognition result into the preset loss function to obtain a preset loss function value; and training the class activation potential mapping model according to the preset loss function value to obtain the trained class activation potential mapping model.
In some embodiments of the present application, the identifying whether a preset face region in the face video moves or not by using a trained class activation potential mapping model for focusing on the preset face region to obtain a face movement identification result includes: acquiring a plurality of face image frames according to the face video; determining a preset face region of each face image frame through the activated potential mapping model focusing on the preset face region; and comparing the face characteristics of the preset face area of each face image frame to obtain a face motion recognition result.
In some embodiments of the present application, acquiring a plurality of face image frames from the face video includes: carrying out face image quality evaluation on each face image frame in the face video to obtain the face image definition; and screening the face image frames meeting the preset image definition from the face image frames to obtain the plurality of face image frames.
In some embodiments of the present application, if a face in the face video is a virtual face, outputting an alarm prompt of a virtual face fraud transaction based on a payment account matched with the face; monitoring the processing message of the alarm prompt; and if the processing message is the blocked account, blocking the payment account.
In some embodiments of the application, after a current face video of a user to be subjected to electronic payment is acquired, whether a situation that a face in the face video is determined to be a virtual face exists in a historical transaction is verified; if the face in the face video is determined to be a virtual face, obtaining biological feature information of the user to be subjected to electronic payment, wherein the biological feature information comprises at least one of the following items: iris information, fingerprint information, voiceprint information, bone voiceprint information; if the identity verification result is that the verification is successful, carrying out electronic payment based on the payment account matched with the face, wherein the electronic payment comprises the following steps: and if the identity authentication result is successful, and the payment account matched with the biological characteristic information is the same as the payment account matched with the face, carrying out electronic payment based on the payment account matched with the face.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed descriptions of other embodiments, and are not described herein again.
In a specific implementation, each unit or structure may be implemented as an independent entity, or may be combined arbitrarily to be implemented as one or several entities, and the specific implementation of each unit or structure may refer to the foregoing method embodiment, which is not described herein again.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
The face recognition method, the face recognition device, the computer device, and the storage medium for electronic payment provided in the embodiments of the present application are described in detail above, and specific examples are applied in the present application to explain the principles and embodiments of the present application, and the description of the embodiments above is only used to help understanding the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A face recognition method for electronic payment, the method comprising:
if an electronic payment request based on face recognition is received, acquiring a current face video of a user to be subjected to electronic payment;
the method comprises the steps of activating a potential mapping model through a trained class focused on a preset face region, and identifying whether the preset face region in a face video moves or not to obtain a face movement identification result;
judging whether the face in the face video is a real face or not according to the face motion recognition result;
if the face in the face video is a real face, carrying out identity verification on the user through a pre-trained face recognition model to obtain an identity verification result;
and if the identity authentication result is that the authentication is successful, carrying out electronic payment based on the payment account matched with the face.
2. The method of claim 1, wherein before the step of identifying whether the preset face region in the face video moves or not by activating the latent mapping model through the trained class focused on the preset face region to obtain the face motion identification result, the method further comprises:
obtaining a face video training sample, wherein the classification labeling of the face video training sample comprises: the preset face area is moved, and the preset face area is not moved;
inputting the face video training sample into a class activation potential mapping model to obtain an estimated face motion recognition result;
and obtaining the trained class activation potential mapping model according to the estimated face motion recognition result, the classification label and a preset loss function of the training sample.
3. The method of claim 2, wherein the obtaining the trained class-activated potential mapping model according to the estimated face motion recognition result, the classification label, and the preset loss function of the training sample comprises:
calculating an area loss function according to the classification labels and the training samples to obtain an area loss function value, wherein the area loss function L area The following were used:
Figure FDA0003703559480000021
wherein, x is a face image in a face video training sample, z i Is the position of the ith pixel point of the face image x, n is the total number of the pixel points,
Figure FDA0003703559480000022
for the classification labeling of the image determined according to the ith pixel point,
Figure FDA0003703559480000023
in the case where x is known, it is shown,
Figure FDA0003703559480000024
z i a joint probability of (a);
inputting the area loss function value and the estimated face motion recognition result into the preset loss function to obtain a preset loss function value;
and training the class activation potential mapping model according to the preset loss function value to obtain the trained class activation potential mapping model.
4. The method of claim 1, wherein the identifying whether the preset face region in the face video moves through the trained class-activated potential mapping model for focusing on the preset face region to obtain a face motion identification result comprises:
acquiring a plurality of face image frames according to the face video;
determining a preset face region of each face image frame through the activated potential mapping model focusing on the preset face region;
and comparing the face characteristics of the preset face area of each face image frame to obtain a face motion recognition result.
5. The method of claim 4, wherein the obtaining a plurality of human face image frames according to the human face video comprises:
carrying out face image quality evaluation on each face image frame in the face video to obtain the face image definition;
and screening the face image frames meeting the preset image definition from the face image frames to obtain the plurality of face image frames.
6. The face recognition method according to any one of claims 1 to 5, wherein the method further comprises:
if the face in the face video is a virtual face, outputting an alarm prompt of virtual face fraud transaction based on the payment account matched with the face;
monitoring the processing message of the alarm prompt;
and if the processing message is the frozen account, freezing the payment account.
7. The face recognition method according to any one of claims 1 to 5, wherein after the acquiring of the current face video of the user to be subjected to electronic payment, the method further comprises:
verifying whether the situation that the face in the face video is determined to be a virtual face exists in historical transactions;
if the face in the face video is determined to be a virtual face, obtaining biological feature information of the user to be subjected to electronic payment, wherein the biological feature information comprises at least one of the following items: iris information, fingerprint information, voiceprint information, bone voiceprint information;
if the identity verification result is that the verification is successful, carrying out electronic payment based on the payment account matched with the face, wherein the electronic payment comprises the following steps:
and if the identity authentication result is that the authentication is successful and the payment account matched with the biological characteristic information is the same as the payment account matched with the face, carrying out electronic payment based on the payment account matched with the face.
8. A face recognition apparatus for electronic payments, comprising:
the acquisition module is used for acquiring the current face video of the user to be subjected to electronic payment if an electronic payment request based on face recognition is received;
the living body detection module is used for activating a potential mapping model through a trained class focused on a preset face region, identifying whether the preset face region in the face video moves or not, and obtaining a face movement identification result; judging whether the face in the face video is a real face or not according to the face motion recognition result;
the face recognition module is used for carrying out identity verification on the user through a pre-trained face recognition model to obtain an identity verification result if the face in the face video is a real face; and if the identity authentication result is that the authentication is successful, carrying out electronic payment based on the payment account matched with the face.
9. A computer device, characterized in that the computer device comprises:
one or more processors;
a memory; and
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the face recognition method for electronic payments of any of the claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a computer program which is loaded by a processor for performing the steps in the method for face recognition for electronic payments according to any of the claims 1 to 7.
CN202210699772.3A 2022-06-20 2022-06-20 Face recognition method and device for electronic payment and computer equipment Pending CN115204893A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210699772.3A CN115204893A (en) 2022-06-20 2022-06-20 Face recognition method and device for electronic payment and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210699772.3A CN115204893A (en) 2022-06-20 2022-06-20 Face recognition method and device for electronic payment and computer equipment

Publications (1)

Publication Number Publication Date
CN115204893A true CN115204893A (en) 2022-10-18

Family

ID=83576260

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210699772.3A Pending CN115204893A (en) 2022-06-20 2022-06-20 Face recognition method and device for electronic payment and computer equipment

Country Status (1)

Country Link
CN (1) CN115204893A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116778562A (en) * 2023-08-22 2023-09-19 中移(苏州)软件技术有限公司 Face verification method, device, electronic equipment and readable storage medium
CN116778562B (en) * 2023-08-22 2024-05-28 中移(苏州)软件技术有限公司 Face verification method, device, electronic equipment and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116778562A (en) * 2023-08-22 2023-09-19 中移(苏州)软件技术有限公司 Face verification method, device, electronic equipment and readable storage medium
CN116778562B (en) * 2023-08-22 2024-05-28 中移(苏州)软件技术有限公司 Face verification method, device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN107066983B (en) Identity verification method and device
CN109948408B (en) Activity test method and apparatus
US9430709B2 (en) Liveness detection
CN113366487A (en) Operation determination method and device based on expression group and electronic equipment
KR102554391B1 (en) Iris recognition based user authentication apparatus and method thereof
CN109660509A (en) Login method, device, system and storage medium based on recognition of face
TW202011315A (en) Method, apparatus, and system for resource transfer
CN111402480A (en) Visitor information management method, device, system, equipment and storage medium
US11961329B2 (en) Iris authentication device, iris authentication method and recording medium
CN116823274B (en) Fraud risk assessment method and device applied to financial terminal
CN108875509A (en) Biopsy method, device and system and storage medium
WO2020007191A1 (en) Method and apparatus for living body recognition and detection, and medium and electronic device
TWI325568B (en) A method for face varification
CN113657903A (en) Face-brushing payment method and device, electronic equipment and storage medium
WO2021096694A1 (en) Using an enrolled biometric dataset to detect adversarial examples in biometrics-based authentication system
WO2009008550A1 (en) Registering apparatus, collaiting apparatus, data structure, and storage medium
CN115204893A (en) Face recognition method and device for electronic payment and computer equipment
CN110415113A (en) Finance data processing method, device, server and readable storage medium storing program for executing
CN115019364A (en) Identity authentication method and device based on face recognition, electronic equipment and medium
US20220172537A1 (en) Device and method for user authentication using security card
CN114647653A (en) Face library updating method and related product
CN114331449B (en) Face payment method, device and equipment and computer storage medium
CN111368644B (en) Image processing method, device, electronic equipment and storage medium
Ozkaya et al. Intelligent face border generation system from fingerprints
US20230206240A1 (en) Account security system

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