CN114519579A - Face payment method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN114519579A
CN114519579A CN202011298439.9A CN202011298439A CN114519579A CN 114519579 A CN114519579 A CN 114519579A CN 202011298439 A CN202011298439 A CN 202011298439A CN 114519579 A CN114519579 A CN 114519579A
Authority
CN
China
Prior art keywords
face
user
information
transaction
feature information
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
CN202011298439.9A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011298439.9A priority Critical patent/CN114519579A/en
Publication of CN114519579A publication Critical patent/CN114519579A/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/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/32Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
    • G06Q20/327Short range or proximity payments by means of M-devices
    • G06Q20/3276Short range or proximity payments by means of M-devices using a pictured code, e.g. barcode or QR-code, being read by the M-device
    • 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

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Collating Specific Patterns (AREA)

Abstract

The embodiment of the invention discloses a method, a device, electronic equipment and a storage medium for realizing face payment based on a computer vision technology; when an account login request is received, acquiring a first face image to obtain face recognition result information, when the face recognition is successful, acquiring user identification information and first face characteristic information of a current user based on the face recognition result information, storing the first face characteristic information, acquiring user account information of the current user based on the user identification information, logging in an account, when a transaction request is received, acquiring a second face image, performing characteristic extraction on the second face image to obtain second face characteristic information, matching the second face characteristic information with the stored first face characteristic information to obtain a matching result, and if the matching result is successful, performing transaction based on the transaction request; therefore, the face verification is performed locally for the second time, the face payment speed is improved, and the face payment time is saved.

Description

Face payment method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of internet, in particular to a face payment method, a face payment device, electronic equipment and a storage medium.
Background
The face recognition is a biological feature recognition technology for identity authentication based on human physiognomic feature information, can avoid personal information leakage, and adopts a non-contact mode for recognition. The face payment is based on the face recognition technology, the face feature data of the user is associated with the user account information, payment can be achieved only by face recognition of the user when the user pays, and convenience of transaction is improved.
With the popularization of face payment, more and more merchants access a face payment mode. Under the face payment scene, need carry out face verification many times and can pay successfully many times, in this kind of payment methods, need to carry out face verification with facial image transmission to server many times, so face verification required time is generally longer under the face verification scene many times, is unfavorable for quick payment.
Disclosure of Invention
The embodiment of the invention provides a face payment method, a face payment device, electronic equipment and a storage medium, which can reduce the time consumption of a face brushing payment process and improve the payment speed in a payment scene needing face verification for multiple times.
The embodiment of the invention provides a face payment method, which comprises the following steps:
when an account login request is received, acquiring a first face image of a current user, triggering a verification server to perform face recognition according to first face feature information of the first face image and pre-stored user face feature information based on the first face image, and obtaining face recognition result information;
when the face recognition is determined to be successful based on the face recognition result information, acquiring user identification information of the current user and the first face feature information based on the face recognition result information, and storing the first face feature information;
acquiring user account information of the current user based on the user identification information, and logging in an account of the current user based on the user account information;
when a transaction request is received, acquiring a second face image, and performing feature extraction on the second face image to obtain second face feature information;
and matching the second face feature information with the stored first face feature information, and if the matching is successful, performing transaction based on the account logged by the current user and the transaction request.
Correspondingly, the embodiment of the invention also provides a face payment device, which comprises:
the system comprises an identification unit, a verification unit and a verification unit, wherein the identification unit is used for acquiring a first face image of a current user when an account login request is received, and triggering a verification server to perform face identification according to first face characteristic information of the first face image and pre-stored user face characteristic information based on the first face image to obtain face identification result information;
an information storage unit configured to, when it is determined that the face recognition is successful based on the face recognition result information, acquire user identification information of the current user and the first face feature information based on the face recognition result information, and store the first face feature information;
the login unit is used for acquiring the user account information of the current user based on the user identification information and logging in the account of the current user based on the user account information;
the feature extraction unit is used for acquiring a second face image when a transaction request is received, and performing feature extraction on the second face image to obtain second face feature information;
and the transaction unit is used for matching the second face feature information with the stored first face feature information, and if the matching is successful, performing transaction based on the account logged by the current user and the transaction request.
In an optional example, the identification unit is configured to, when an account login request sent by the merchant application is received, start a camera, acquire a first face image of a current user through the camera, trigger, based on the first face image, an authentication server to perform face identification according to first face feature information of the first face image and pre-stored user face feature information, and obtain face identification result information;
the login unit is used for sending user identification information to the merchant application program and triggering the merchant application program to log in an account according to the user identification information;
the characteristic extraction unit is used for starting a camera when receiving a payment request sent by the merchant application program, and acquiring a second face image of the current user through the camera;
and extracting the features of the second face image to obtain second face feature information.
In an optional example, the identification unit is configured to perform feature extraction on the first face image to obtain first face feature information of the first face image;
sending the first face feature information to a verification server, and triggering the verification server to perform face recognition according to the first face feature information and prestored user face feature information to obtain face recognition result information;
and the login unit is used for sending user identification information to the merchant application program, triggering the merchant application program to acquire the user account information of the current user according to the user identification information and pre-stored user account information, and logging in the account of the current user based on the user account information of the current user.
In an optional example, the transaction unit is configured to send a transaction identifier obtaining request to the verification server in response to the transaction request if the matching is successful;
receiving a transaction identifier sent by a verification server, wherein the transaction identifier has a transaction function;
and sending the transaction identifier to the merchant application program, and triggering the merchant application program to carry out transaction based on the transaction identifier.
In an optional example, the face recognition result information contains a transaction identifier corresponding to the user identification information, and the transaction identifier has a transaction function;
the information storage unit is used for storing the transaction identification;
and the transaction unit is used for responding to the transaction request and sending the transaction identifier to the merchant application program if the matching is successful, and triggering the merchant application program to carry out transaction based on the account logged by the current user and the transaction identifier.
In an optional example, the transaction device further comprises a duration counting unit, configured to count a continuous storage duration of the transaction identifier, where the continuous storage duration represents a cumulative continuous storage duration from a time when the transaction identifier is stored;
and the information storage unit is used for deleting the stored transaction identifier when the continuous storage time length exceeds a preset storage time length threshold value.
In an optional example, the information storage unit is configured to delete the first facial feature information when the continuous storage duration exceeds a preset storage duration threshold;
the transaction unit is used for not executing the step of matching the second face feature information with the stored first face feature information after obtaining the second face feature information if the stored first face feature information and the transaction identification are deleted when receiving a transaction request;
executing the step of sending the second face feature information and the user identification information to the verification server, triggering the verification server to determine the user face feature information of the current user from the pre-stored user face feature information according to the user identification information, and performing face matching based on the second face feature information and the user face feature information of the current user to obtain a matching result;
receiving a matching result sent by a server, when the matching result is successful, extracting a transaction identifier corresponding to the user identifier information from the matching result, responding to the transaction request, sending the transaction identifier to the merchant application program, and triggering the merchant application program to carry out transaction based on the account logged in by the current user and the transaction identifier.
In an optional example, the transaction unit is configured to obtain the user transaction amount from the transaction request;
when the user transaction amount exceeds a preset user transaction amount threshold value, the step of matching the second face characteristic information with the stored first face characteristic information to obtain a matching result is not executed;
executing the step of sending the second face feature information and the user identification information to a verification server, triggering the verification server to determine the user face feature information of the current user from the pre-stored user face feature information according to the user identification information, and performing face matching based on the second face feature information and the user face feature information of the current user to obtain a matching result;
and receiving a matching result sent by the verification server, and when the matching result is successful, performing transaction based on the account logged by the current user and the transaction request.
In an optional example, the method further includes deleting the first face image, the second face image, the first face feature information, and the second face feature information.
In an optional example, the method further includes acquiring and displaying a first face image of the current user when an account login request is received, and displaying an acquisition page, where the acquisition page includes an acquisition image display area, and the acquisition image display area includes the first face image;
the transaction information display unit is used for displaying a transaction page based on a transaction request when the transaction request is received, and the transaction page comprises a transaction amount;
acquiring a second face image, and extracting the features of the second face image to obtain second face feature information;
the trading system further comprises a trading result display unit, wherein the trading result display unit is used for acquiring a trading result and switching and displaying the trading page into a trading result page based on the trading result.
Correspondingly, the embodiment of the invention also provides the electronic equipment, which comprises a memory and a processor; the memory stores an application program, and the processor is used for running the application program in the memory to execute the operation of any one of the face payment methods provided by the embodiments of the present invention.
In addition, the embodiment of the present invention further provides a storage medium, where a plurality of instructions are stored, and the instructions are suitable for being loaded by a processor to perform the steps in any one of the face payment methods provided in the embodiment of the present invention.
By adopting the scheme of the embodiment of the invention, when an account login request is received, a first face image of a current user is collected, based on the first face image, the verification server is triggered to carry out face recognition according to the first face characteristic information of the first face image and pre-stored user face characteristic information to obtain face recognition result information, when the face recognition is determined to be successful based on the face recognition result information, the user identification information of the current user is obtained based on the face recognition result information, the first face characteristic information is stored, the user account information of the current user is obtained based on the user identification information, the account login of the current user is carried out based on the user account information, when a transaction request is received, a second face image is collected, and the feature extraction is carried out on the second face image, obtaining second face feature information, matching the second face feature information with the stored first face feature information, and if the matching is successful, performing transaction based on the account logged by the current user and the transaction request; according to the embodiment of the invention, after the face recognition is determined to be successful, the first face characteristic information is stored, and when a transaction request is received, the second face characteristic information can be matched with the stored first face characteristic information locally to obtain a matching result, so that the second face characteristic information of the user is not required to be sent to the verification server for matching in the transaction, the step of face characteristic comparison can be completed locally, the purpose of improving the face payment speed is realized, and the time of the user in face payment is saved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, 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 view of a scene of a face payment method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a face payment method provided by the embodiment of the invention;
fig. 3 is a schematic diagram of a transaction page of the face payment method according to the embodiment of the present invention;
fig. 4 is a schematic diagram of another transaction page of the face payment method according to the embodiment of the present invention;
fig. 5 is another flowchart of a face payment method according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a face payment method provided in an embodiment of the present invention;
fig. 7 is another schematic structural diagram of a face payment method according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
The embodiment of the invention provides a face payment method, a face payment device, electronic equipment and a storage medium. Specifically, the embodiment of the present invention provides a first face payment apparatus suitable for a first computer device, where the first computer device may be a terminal, and the terminal may be a self-service cash register device, a mobile phone, a notebook computer, and other devices. The embodiment of the invention also provides a second face payment device suitable for second computer equipment, wherein the second computer equipment can be network side equipment such as a server and the like.
For example, the first face payment apparatus may be integrated in a terminal, wherein the terminal may include a mobile phone, a wearable smart device, a tablet computer, a notebook computer, a Personal Computer (PC), and the like.
For example, the second face payment device may be integrated in a server, which may be regarded as the authentication server of the embodiment.
The server mentioned in this embodiment may be an independent physical server, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a CDN, and a big data and artificial intelligence platform, but is not limited thereto.
The embodiment of the invention introduces a face payment method by taking a first computer device as a terminal and a second computer device as a server as an example.
The present embodiment provides a face payment system, as shown in fig. 1, the face payment system includes a terminal 10, an authentication server 20, and the like; the terminal 10 and the authentication server 20 are connected via a network, for example, a wired or wireless network connection, etc., wherein the first face payment device is integrated in the terminal, for example, in the form of a client. The face payment system of this embodiment may be applied to a merchant payment scenario, in which a merchant application of a merchant itself may be installed in the terminal 10, in an example, the merchant application may autonomously complete an entire payment process, and the verification server 20 is a server of the merchant application.
Optionally, the terminal 10 may be configured to, when the merchant application receives an account login request, acquire a first face image of a current user, and based on the first face image, trigger the verification server to perform face recognition according to first face feature information of the first face image and pre-stored user face feature information to obtain face recognition result information; when the face recognition is determined to be successful based on the face recognition result information, acquiring user identification information of the current user and the first face feature information based on the face recognition result information, and storing the first face feature information; acquiring user account information of the current user based on the user identification information, and logging in an account of the current user based on the user account information; when a transaction request is received, acquiring a second face image, and performing feature extraction on the second face image to obtain second face feature information; and matching the second face feature information with the stored first face feature information, and if the matching is successful, performing transaction based on the account logged by the current user and the transaction request.
In another example, the merchant application may rely on the payment sub-program to complete the entire payment process, with the verification server 20 being the server for the payment sub-program.
Optionally, the terminal 10 may display a login operation interface of the merchant application, where the login operation interface includes a control related to user login; the user may click an account login control through the login operation interface, for example, a control named "approve to swipe face for login" in the page indicated by 301 in fig. 3, the merchant application may send an account login request to the payment sub-program, and the payment sub-program receives the account login request and invokes the camera to acquire the first face image of the current user.
Further, the terminal 10 may transmit a face recognition request to the authentication server 20 based on the first face image through the payment sub-program.
After receiving a face identification request sent by the terminal, the verification server 20 may perform face identification according to the first face feature information of the first face image and pre-stored user face feature information, and when the face identification is successful, the verification server 20 may determine the user identification information of the current user based on the identification result, and generate face identification result information based on the first face feature information and the user identification information, and send the face identification result information to the terminal 10.
The terminal 10 may obtain the user identification information of the current user and the first facial feature information after receiving the face recognition result information, and store the first facial feature information.
Further, the terminal 10 may obtain the user account information of the current user based on the user identification information, and perform account login of the current user in the merchant application based on the user account information.
The user may click a face payment control, for example, a control named "face payment" in the page indicated by 401 in fig. 4, through a transaction operation interface displayed by the terminal 10, and trigger the merchant application to generate a transaction request. After receiving the transaction request, the payment subprogram in the terminal 10 acquires a second face image, and performs feature extraction on the second face image to obtain second face feature information; and matching the second face feature information with the stored first face feature information, and if the matching is successful, performing transaction based on the transaction request.
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
The embodiment of the invention will be described from the perspective of a face payment device, which can be specifically integrated in a terminal, for example, in the form of a client.
The face recognition method of the embodiment is shown in fig. 2, and the specific flow of the face payment method is as follows:
101. when an account login request is received, acquiring a first face image of a current user, triggering a verification server to perform face recognition according to first face feature information of the first face image and pre-stored user face feature information based on the first face image, and obtaining face recognition result information.
In the actual application process, when a user uses the terminal to conduct transaction, a transaction operation page of the face payment client can be displayed on the terminal, and the transaction operation page comprises controls related to user transaction. The user may click an account login control through the transaction operation page, for example, a control named "approve to swipe face for login" in the page indicated by 301 in fig. 3, send an account login request, and when the terminal receives the account login request, acquire a first face image of the current user.
The transaction operation page can be any page provided by the face payment client for the user. Optionally, the transaction operation page includes, but is not limited to, an account login page (refer to the page indicated by 301 in fig. 3) of the face payment client, a collection page (refer to the page indicated by 302 in fig. 3), a login confirmation page (refer to the page indicated by 303 in fig. 3), a quick collection page (refer to the page indicated by 402 in fig. 4), a transaction result page (refer to the page indicated by 403 in fig. 4), and the like. The terminal can jump between pages according to the operation of the user and display different transaction operation pages corresponding to the operation. For example, the user performs an account login operation, clicks a control named "approve face brushing login" as shown in 301 of fig. 3, and the terminal jumps to a collection page as shown in 302 of fig. 3 according to the operation of the user.
In the actual application process, due to the problems of light, angle, position and the like possibly existing between the user and the terminal, the camera cannot quickly acquire the first face image of the current user meeting the requirements, and the user is required to adjust the face position, body posture and the like. In order to facilitate user adjustment, the scheme of the embodiment can be completed by displaying the acquisition page on the terminal, and user experience and transaction efficiency are improved.
In an example, the step "acquiring a first face image of a current user when an account login request is received" may specifically include:
when an account login request is received, a first face image of a current user is collected, and a collection page is displayed, wherein the collection page comprises a collection image display area, and the collection image display area comprises the first face image.
It is understood that in daily life, a merchant may connect his or her merchant application with a third party payment program to implement a transaction in order to facilitate payment by a customer. That is, the terminal may be installed with a merchant application and a payment sub-program, and the merchant application and the payment sub-program may be connected in a manner that enables the merchant application and the payment sub-program to communicate or interact with each other through an application program interface or the like.
The payment sub program is a program capable of realizing a payment function, for example, the payment sub program may be an applet having only a payment function or may be a program having other functions in addition to the payment function, and the like. The merchant application may invoke the payment sub-program when the user needs to make a payment.
Optionally, the step "when receiving an account login request, acquiring a first face image of a current user, based on the first face image, triggering a verification server to perform face recognition according to first face feature information of the first face image and pre-stored user face feature information to obtain face recognition result information", may specifically include:
and when an account login request sent by the merchant application program is received, starting a camera, acquiring a first face image of a current user through the camera, triggering a verification server to perform face recognition according to first face characteristic information of the first face image and pre-stored user face characteristic information based on the first face image, and obtaining face recognition result information.
Wherein, the payment sub-program, such as an applet with payment function, etc., can be connected with the merchant application programs of a plurality of different merchants. Optionally, when the merchant application sends an account login request to the payment sub-program, the merchant identifier and the account login request may be sent together, so that when the verification server performs face recognition according to the first face feature information of the first face image and the pre-stored user face feature information, the user face feature information of the merchant member corresponding to the merchant identifier may be selected and registered from the pre-stored user face feature information according to the merchant identifier, thereby improving the face recognition rate.
In one example, the first face feature information of the first face image may be extracted by a face feature extraction algorithm.
The Face feature extraction algorithm of this embodiment may be provided by a model constructed based on a Computer Vision technology (Computer Vision, CV), and in particular, a Face recognition technology in the Computer Vision technology, such as a Face Detection technology and the like.
Computer vision is a science for researching how to make a machine "see", and further, it means that a camera and a computer are used to replace human eyes to perform machine vision such as identification, tracking and measurement on a target, and further image processing is performed, so that the computer processing becomes an image more suitable for human eyes to observe or transmitted to an instrument to detect. As a scientific discipline, computer vision research-related theories and techniques attempt to build artificial intelligence systems that can capture information from images or multidimensional data. The computer vision technology generally includes technologies such as image processing, image Recognition, image semantic understanding, image retrieval, OCR (Optical Character Recognition), video processing, video semantic understanding, video content/behavior Recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, synchronous positioning, map construction, and the like, and also includes common biometric technologies such as face Recognition, fingerprint Recognition, and the like.
For example, the face feature algorithm may include: SIFT (Scale-invariant feature transform) algorithm, ORB (organized Fast and Rotated Brief) feature description algorithm, and the like, the face feature information of the current user extracted from the first face image.
The pre-stored user face feature information comprises user face feature information pre-stored in an authentication server. The pre-stored user face feature information may be obtained by storing the obtained face feature information by the verification server when the user uses the face payment service for the first time, or obtained by storing the obtained face feature information by the verification server when the user uses the face payment service each time. It can be understood that, in order to ensure the property security of the user, the face feature information of the user should be updated regularly or irregularly as required.
The face recognition result information comprises a face recognition result obtained by the verification server performing face recognition according to the first face feature information of the first face image and pre-stored user face feature information, and face recognition result information is generated based on the face recognition result. The face recognition result can be a message, or a message form such as a judgment mark which can transmit the face recognition result.
It will be appreciated that an authentication server may perform not only "authentication" functions, but may also perform functions of the server in the general sense, such as data or information storage, responding to service requests, undertaking services and data or information interaction, and so forth.
In order to reduce the operation pressure of the verification server, save the equipment cost and improve the speed of face recognition, the step of extracting the first face feature information can be performed locally. Optionally, the step "based on the first face image, triggering the verification server to perform face recognition according to the first face feature information of the first face image and the pre-stored user face feature information to obtain face recognition result information" may specifically include:
extracting the features of the first face image to obtain first face feature information of the first face image;
and sending the first face characteristic information to a verification server, and triggering the verification server to perform face recognition according to the first face characteristic information and prestored user face characteristic information to obtain face recognition result information.
In one example, when the face feature information of the user that needs to be stored in advance is less, a special storage area may be set in the terminal, the face feature information of the user is stored in the special storage area, and a scheme for performing face recognition directly in the terminal is executed, including:
extracting the features of the first face image to obtain first face feature information of the first face image;
and carrying out face recognition according to the first face characteristic information and pre-stored user face characteristic information to obtain face recognition result information.
The pre-stored user face feature information refers to user face feature information pre-stored in a storage area.
102. And when the face recognition is determined to be successful based on the face recognition result information, acquiring the user identification information of the current user and the first face characteristic information based on the face recognition result information, and storing the first face characteristic information.
The user identification information is information that enables the payment sub-program, the authentication server, and the merchant application to identify the user, such as a user ID.
In the actual application process, the merchant application may need to complete the transaction according to the transaction identifier due to the interface setting between the merchant application and the payment sub-program. In order to improve the transaction efficiency during transaction, if the face recognition is successful, the transaction identifier and the face recognition result information are sent together, and the transaction identifier is stored in the terminal to complete the embodiment.
In one example, the face recognition result information contains a transaction identifier corresponding to the user identification information, the transaction identifier having a transaction function. The step of, when it is determined that the face recognition is successful based on the face recognition result information, obtaining user identification information of the current user and the first face feature information based on the face recognition result information, and storing the first face feature information, further includes:
and storing the transaction identification.
The transaction identifier represents information that can enable the face payment client or the merchant application to complete a transaction, such as a payment two-dimensional code. The transaction identification may include user profile information, user debit links, etc. associated with completing the transaction.
In practical applications, the transaction identifier is usually time-sensitive for the purpose of protecting the property. The transaction function is lost when the transaction identifier exceeds a certain time. In order to ensure the validity of the transaction identifier, the continuous storage duration of the transaction identifier may be obtained after the transaction identifier is stored, and if the continuous storage duration exceeds the valid time of the transaction identifier, the transaction identifier is deleted, thereby completing the scheme of this embodiment.
In one example, after storing the transaction identifier, the method of this embodiment may further include:
counting the continuous storage time length of the transaction identification, wherein the continuous storage time length represents the accumulated continuous storage time length from the moment of storing the transaction identification;
and when the continuous storage time length exceeds a preset storage time length threshold value, deleting the stored transaction identification.
And the continuous storage duration represents the accumulated duration of continuously storing the transaction identifier by the terminal from the beginning of storing the transaction identifier.
The preset storage duration threshold is included in the face payment client or the payment subprogram, and the duration value for judging the validity of the transaction identifier, which is set according to the valid time of the transaction identifier, can be set to a numerical value such as 1 minute.
103. And acquiring the user account information of the current user based on the user identification information, and logging in the account of the current user based on the user account information.
The user account information may include information related to user login, such as a user avatar, a user account password, and a user nickname.
When the face payment client on the terminal consists of a merchant application program and a payment subprogram, the steps of obtaining the user account information of the current user based on the user identification information and logging in the account of the current user based on the user account information comprise:
sending user identification information to the merchant application program, and triggering the merchant application program to log in an account according to the user identification information;
the merchant application may store the merchant user account information of the merchant user in a storage space of the terminal or a server of the merchant application, and in order to implement account login on the merchant application, the user needs to be corresponded to the user account information according to the user identification information.
In one example, the payment subprogram sends user identification information to the merchant application program, triggers the merchant application program to obtain the user account information of the current user according to the user identification information and pre-stored user account information, and performs account login of the current user based on the user account information of the current user.
It can be understood that, the merchant application also stores in advance the correspondence between the user identification information of the merchant user and the account information of the merchant user. The merchant application program obtains the user account information of the current user according to the user identification information and the pre-stored merchant user account information, specifically, the merchant application program obtains the merchant user account information corresponding to the user identification information according to the user identification information and the corresponding relationship, and the merchant user account information is used as the merchant user account information of the current user.
The merchant user is understood as a user who uses personal information to register a merchant user account in the merchant application. And when the user finishes the registration, the user becomes the merchant user. The merchant application program establishes a merchant user account according to personal information provided by the merchant user during registration, and stores the corresponding relation between the user identification information of the merchant user and the merchant user account information.
In one example, the user identification information may be directly merchant user account information for the current user on the merchant application. The verification server stores the corresponding relationship between the user face feature information and the merchant user account information of the merchant application program, and after the face recognition is successful, the merchant user account information corresponding to the user face feature information of the current user can be obtained according to the user face feature information of the current user and the corresponding relationship.
In order to ensure the security of the user transaction, after the merchant application completes account login, a login confirmation page, such as the page indicated by 303 in fig. 3, may be displayed on the terminal, so that the user may confirm that the account logged in by the merchant application belongs to the current user according to the information, such as the nickname of the user, the avatar of the user, and the like displayed on the login confirmation page.
104. When a transaction request is received, a second face image is collected, and feature extraction is carried out on the second face image to obtain second face feature information.
The transaction request is a request generated by a user clicking a transaction control in a transaction page displayed on the terminal, for example, the user clicks a control named 'face payment' shown in a page indicated by 401 in fig. 4.
The second face feature information may include face feature information of the current user extracted from the second face image by a face feature extraction algorithm.
When the face payment client on the terminal is composed of a merchant application program and a payment subprogram, specifically, the merchant application program displays a transaction page on the terminal, and when a user clicks a transaction control in the transaction page to generate a transaction request, the merchant application program receives the transaction request and sends the transaction request to the payment subprogram.
In one example, the step "acquiring a second face image when a transaction request is received, and performing feature extraction on the second face image to obtain second face feature information" may specifically include:
when a transaction request sent by the merchant application program is received, starting a camera, and acquiring a second face image of the current user through the camera;
and extracting the features of the second face image to obtain second face feature information.
In the actual application process, in order to guarantee the property security of the user and prevent disputes between the user and the merchant, the scheme of the embodiment can be completed by displaying the transaction amount on the terminal, so that the user can confirm that the transaction amount is correct before completing the transaction.
In one example, the step "acquiring a second face image when a transaction request is received, and performing feature extraction on the second face image to obtain second face feature information" may specifically include:
when a transaction request is received, displaying a transaction page based on the transaction request, wherein the transaction page comprises a transaction amount;
and acquiring a second face image, and extracting the features of the second face image to obtain second face feature information.
105. And matching the second face feature information with the stored first face feature information, and if the matching is successful, performing transaction based on the account logged by the current user and the transaction request.
In the practical application process, in order to guarantee the property safety of the user, a scheme of matching the second face feature information with the pre-stored face feature information of the user in the verification server when the transaction amount of the user is too large can be adopted, so that the transaction safety is guaranteed.
Optionally, before the step of "matching the second facial feature information with the stored first facial feature information", the method may further include:
obtaining the user transaction amount from the transaction request;
when the user transaction amount exceeds a preset user transaction amount threshold value, the step of matching the second face characteristic information with the stored first face characteristic information to obtain a matching result is not executed;
and executing the step of sending the second face feature information and the user identification information to a verification server, and triggering the verification server to carry out face matching according to the second face feature information, the user identification information and the pre-stored face feature information of the current user to obtain a matching result.
The preset user transaction amount threshold represents the maximum single transaction amount which is set in the merchant application program and/or the payment subprogram and can ensure the user transaction safety, such as 10000 yuan for single consumption. And when the transaction amount of the user in the current transaction exceeds 10000 yuan, the step of matching the second face characteristic information with the stored first face characteristic information to obtain a matching result is not executed, and the step of sending the second face characteristic information and the user identification information to a verification server is executed.
And after the verification server receives the second face feature information and the user identification information sent by the payment subprogram, the verification server acquires the user face feature information of the current user from the pre-stored user face feature information according to the user identification information. And performing face matching on the second face feature information and the user face feature information of the current user to obtain a matching result.
And if the matching result is successful, continuing executing the step of performing transaction based on the transaction request if the matching is successful.
If the matching result is a failure, the payment subroutine displays a transaction failure page as shown at 404 in fig. 4 on the terminal, so that the user can initiate the transaction again or select other payment methods.
In one example, when the merchant application needs to complete the transaction through the transaction identifier, in order to save the storage resource of the payment sub-program, when the continuous storage duration exceeds a preset storage duration threshold, the method further includes: and deleting the first face characteristic information.
Optionally, the method of this embodiment further includes:
when a transaction request is received, if the stored first face feature information and the transaction identifier are deleted, after second face feature information is obtained, the step of matching the second face feature information with the stored first face feature information is not executed, and a matching result is obtained;
the step of sending the second face feature information and the user identification information to the verification server is executed, the verification server is triggered to determine the user face feature information of the current user from the pre-stored user face feature information according to the user identification information, and face matching is carried out on the basis of the second face feature information and the user face feature information of the current user to obtain a matching result;
receiving a matching result sent by a server, when the matching result is successful, extracting a transaction identifier corresponding to the user identifier information from the matching result, responding to the transaction request, sending the transaction identifier to the merchant application program, and triggering the merchant application program to perform transaction based on the account logged in by the current user and the transaction identifier.
In practical applications, in order to ensure the transaction security of the user, improve the transaction efficiency, and the like, the merchant application program may not complete the transaction through the transaction identifier, but make the verification server complete the deduction for the financial account of the current user through a transaction instruction.
In one example, when the payment sub-program confirms that the matching result is a successful match, the transaction request is sent to the verification server, and the verification server completes deduction on for the financial account of the current user based on the transaction request.
When the merchant application needs to complete the transaction through the transaction identifier, in order to save the storage resource of the terminal, a scheme of obtaining the transaction identifier from the verification server after successful matching may be adopted.
Optionally, the step "if the matching is successful, performing the transaction based on the transaction request" may specifically include:
if the matching is successful, a transaction identification acquisition request is sent to the verification server in response to the transaction request;
receiving a transaction identifier sent by a verification server, wherein the transaction identifier has a transaction function;
and sending the transaction identifier to the merchant application program, and triggering the merchant application program to carry out transaction based on the transaction identifier.
When the merchant application program needs to complete the transaction through the transaction identifier, in order to improve the payment speed and save the transaction flow, a scheme of storing the transaction identifier at the terminal and sending the transaction identifier to the merchant application degree by the payment sub-program after successful matching can be adopted.
In one example, the step "if the matching is successful, performing a transaction based on the transaction request" may specifically include:
and if the matching is successful, responding to the transaction request and sending the transaction identifier to the merchant application program, and triggering the merchant application program to carry out transaction based on the transaction identifier.
When the verification server can directly communicate with the merchant application program through the interface, if the result is that the matching is successful, the verification server can directly send the transaction identifier to the merchant application program.
It is understood that, for the information security of the user, a scheme of deleting the user-related information on the terminal after the transaction is completed may be performed to ensure the information security of the user.
In one example, after the step "if the matching is successful, performing a transaction based on the transaction request", the method further includes:
and deleting the first face image, the second face image, the first face feature information and the second face feature information.
After the transaction is completed, in order to enhance the user experience, the method of this embodiment further includes:
and acquiring a transaction result, and switching and displaying the transaction page as a transaction result page based on the transaction result.
In order to ensure the security of the user account, an account logout control named "logout" shown in the page indicated by 403 in fig. 4 may be included on the transaction result page, so that the user may select to logout after confirming the transaction result. It is understood that, in order to ensure the information security of the user, if the user does not select to log out, the merchant application or the payment sub-program may automatically complete the log-out operation.
As can be seen from the above, in the embodiments of the present invention, when an account login request is received, a first face image of a current user is collected, based on the first face image, an authentication server is triggered to perform face recognition according to first face feature information of the first face image and pre-stored user face feature information to obtain face recognition result information, when it is determined that the face recognition is successful based on the face recognition result information, user identification information of the current user is obtained based on the face recognition result information, the first face feature information is stored, user account information of the current user is obtained based on the user identification information, account login of the current user is performed based on the user account information, when a transaction request is received, a second face image is collected, and feature extraction is performed on the second face image, obtaining second face feature information, matching the second face feature information with the stored first face feature information, and if the matching is successful, performing transaction based on the account logged by the current user and the transaction request; according to the embodiment of the invention, after the face recognition is determined to be successful, the first face characteristic information is stored, and when a transaction request is received, the second face characteristic information can be matched with the stored first face characteristic information locally to obtain a matching result, so that the second face characteristic information of the user is not required to be sent to the verification server for matching in the transaction, the step of face characteristic comparison can be completed locally, the purpose of improving the face payment speed is realized, and the time of the user in face payment is saved.
The method according to the preceding embodiment is illustrated in further detail below by way of example.
In this embodiment, with reference to the system in fig. 1, a first face payment device is specifically integrated in a terminal, and the terminal is installed with a merchant application and a payment sub-program, where the first face device may be integrated with the merchant application and the payment sub-program, and a verification server described below is a server of the payment sub-program.
As shown in fig. 5, the specific flow of the face payment method of this embodiment may be as follows:
201. the merchant application receives the account login request and sends the account login request to the payment sub-program.
The account login page of the merchant application program indicated by 301 in fig. 3 is displayed on the terminal, when the user clicks an account login control on the account login page, such as a control named "approve face-brushing login" in the account login page indicated by 301 in fig. 3, operation indication information indicating that the account login control is operated by the user is generated, the merchant application program generates an account login request according to the operation indication information, and the account login request is sent to the payment sub-program.
Wherein, the application program interface of the payment subprogram has been opened to the merchant application program, and the merchant application program can send an account login request to the payment subprogram through the application program interface.
202. And when the payment subprogram receives an account login request sent by the merchant application program, starting a camera, and acquiring a first face image of the current user through the camera.
When the payment sub-program receives an account login request sent by the merchant application program, the payment sub-program displays a collection page on the terminal, where the collection page is shown as 302 in fig. 3, and the collection page includes a collection image display area, that is, an oval area in 302 in fig. 3. When the acquisition is unsuccessful, the acquired image display area comprises images acquired by the camera in real time. When the acquisition is successful, the acquired image display area includes the aforementioned first face image.
203. And the payment sub-program extracts the features of the first face image to obtain first face feature information.
204. The payment subroutine transmits the first facial feature information to the verification server.
205. And the verification server receives the first face characteristic information, and performs face recognition according to the first face characteristic information and pre-stored user face characteristic information to obtain a face recognition result.
206. When the face recognition is successful, the verification server acquires user identification information and transaction identification of the current user, generates face recognition result information based on the user identification information and the transaction identification, and sends the face recognition result information to the payment subprogram.
It can be understood that, the corresponding relationship between the user face feature information and the user identification information, and the corresponding relationship between the user identification information and the transaction identification are also stored in the authentication server in advance. The step of obtaining, by the verification server, user identification information and a transaction identification of the current user may specifically be obtaining, according to user face feature information of the current user and a corresponding relationship between the user face feature information and the user identification information, user identification information of the current user, and obtaining, according to the user identification information of the current user and a corresponding relationship between the user identification information and the transaction identification, a transaction identification of the current user.
When the face recognition fails, the verification server directly generates face recognition failure information and sends the face recognition failure information to the payment subprogram, and after receiving the face recognition failure information, the payment subprogram returns to the step 202 of acquiring the first face image of the current user through the camera.
207. The payment subprogram receives the face recognition result information, extracts the user identification information and the transaction identification of the current user from the face recognition result information, and stores the first face feature information, the user identification information and the transaction identification of the user.
Wherein, after storing the transaction identifier, the payment sub-routine may start counting the duration of the continuous storage of the transaction identifier.
208. The payment sub-program sends the user identification information to the merchant application program.
209. And the merchant application program receives the user identification information, acquires the merchant user account information of the current user based on the user identification information, and logs in the account of the current user based on the merchant user account information.
In one example, after the merchant application completes the account login, a login confirmation page is displayed on the terminal, as shown by the page indicated at 303 of FIG. 3. The user can confirm that the account logged in by the merchant application program belongs to the current user according to the information such as the user nickname, the user head portrait and the like displayed on the login confirmation page.
If the user finds that there is a problem with the user information, such as the nickname of the user on the login confirmation page, the user can click to log out, such as the control named "log out" shown in the page indicated by 303 in fig. 3.
If the user chooses to log out, the user returns to the login page as indicated at 301 of FIG. 3.
If the "confirm" control in the page 303 is clicked, the commodity scanning page indicated by 304 is displayed, the user can scan the commodity barcode through the terminal 10, and the successfully scanned commodity, and the commodity information such as the commodity name and the commodity price can be displayed in the page 304.
210. And in response to the selection operation of the face payment selection control, the merchant application generates a transaction request and sends the transaction request to the payment subprogram.
For example, clicking the "commodity settlement" control in page 304 of fig. 3, displaying the payment method selection page indicated by 401 in fig. 4, when the user clicks the "payment subprogram face payment" control on page 401 as in fig. 4, the merchant application generates a transaction request, and sends the transaction request to the payment subprogram.
The payment method selection page may further include a user transaction amount, such as "200" shown in page 401 of fig. 4.
211. And when the payment subprogram receives a transaction request, acquiring a second face image, and extracting the features of the second face image to obtain second face feature information.
When the payment subprogram receives a transaction request sent by the merchant application program, the payment subprogram displays a quick acquisition page on the terminal, as shown by 402 in fig. 4, the quick acquisition page displays a preset display picture, the quick acquisition page does not include a face display area, that is, a face acquired by a camera, such as the second face image, is not displayed in the quick acquisition page.
212. And when the continuous storage time length of the transaction identifier does not exceed the preset storage time length threshold, the payment subprogram matches the second face feature information with the stored first face feature information to obtain a matching result, and the step 216 is entered.
213. When the continuous storage time length of the transaction identifier exceeds the preset storage time length threshold value, the payment sub-program sends the second face feature information and the user identifier information to the verification server, and the step 214 is entered.
214. And the verification server determines the user face characteristic information of the current user from the pre-stored user face characteristic information according to the user identification information, and performs face matching on the basis of the second face characteristic information and the face characteristic information of the current user to obtain a matching result. And if the matching result is successful, the verification server generates a matching result, the matching result comprises the transaction identifier, and the matching result is sent to the payment subprogram.
215. The payment subroutine receives the matching result, and proceeds to step 216;
216. and if the matching result is successful, the payment subprogram acquires the transaction identifier and sends the transaction identifier to the merchant application program.
217. And the merchant application program receives the transaction identifier and completes the transaction according to the transaction identifier and the account logged by the current user.
And after the transaction is completed, the merchant application program acquires a transaction result, and switches and displays the quick acquisition page displayed on the terminal into a transaction result page based on the transaction result.
Optionally, if the transaction result is that the transaction is successful, the rapid acquisition page displayed on the terminal is switched and displayed to be a transaction success page as shown by 403 in fig. 4. And if the transaction result is that the transaction is failed, switching and displaying the rapid acquisition page displayed on the terminal to be a transaction failure page shown as 404 in fig. 4.
As can be seen from the above, in the embodiments of the present invention, when an account login request is received, a first face image of a current user is collected, based on the first face image, an authentication server is triggered to perform face recognition according to first face feature information of the first face image and pre-stored user face feature information to obtain face recognition result information, when it is determined that the face recognition is successful based on the face recognition result information, user identification information of the current user is obtained based on the face recognition result information, the first face feature information is stored, user account information of the current user is obtained based on the user identification information, account login of the current user is performed based on the user account information, when a transaction request is received, a second face image is collected, and feature extraction is performed on the second face image, obtaining second face feature information, matching the second face feature information with the stored first face feature information, and if the matching is successful, performing transaction based on the account logged by the current user and the transaction request; according to the embodiment of the invention, after the face recognition is determined to be successful, the first face characteristic information is stored, and when a transaction request is received, the second face characteristic information can be matched with the stored first face characteristic information locally to obtain a matching result, so that the second face characteristic information of the user is not required to be sent to the verification server for matching in the transaction, the step of face characteristic comparison can be completed locally, the purpose of improving the face payment speed is realized, and the time of the user in face payment is saved.
In addition, when the second face image is acquired, the acquisition area is not displayed, the preset display control is displayed, and the second face feature information of the user does not need to be sent to the verification server for matching during transaction, so that the face feature comparison can be completed locally, the experience of face brushing for the user for the second time is avoided, and the user experience is greatly improved.
In order to better implement the method, correspondingly, the embodiment of the invention also provides a face payment device.
Referring to fig. 7, the apparatus includes:
the identification unit 701 is used for acquiring a first face image of a current user when an account login request is received, triggering a verification server to perform face identification according to first face feature information of the first face image and pre-stored user face feature information based on the first face image, and obtaining face identification result information;
an information storage unit 702 configured to, when it is determined that the face recognition is successful based on the face recognition result information, acquire user identification information of the current user and the first face feature information based on the face recognition result information, and store the first face feature information;
a login unit 703, configured to obtain user account information of the current user based on the user identification information, and perform account login of the current user based on the user account information;
the feature extraction unit 704 is configured to, when a transaction request is received, acquire a second face image, and perform feature extraction on the second face image to obtain second face feature information;
a transaction unit 705, configured to match the second facial feature information with the stored first facial feature information, and if the matching is successful, perform a transaction based on the account logged in by the current user and the transaction request.
In an optional example, the identifying unit 701 is configured to, when an account login request sent by the merchant application is received, start a camera, acquire a first face image of a current user through the camera, trigger, based on the first face image, an authentication server to perform face identification according to first face feature information of the first face image and pre-stored user face feature information, and obtain face identification result information;
a login unit 703, configured to send user identification information to the merchant application, and trigger the merchant application to perform account login according to the user identification information;
the feature extraction unit 704 is configured to, when receiving a payment request sent by the merchant application program, start a camera, and acquire a second face image of the current user through the camera;
and extracting the features of the second face image to obtain second face feature information.
In an optional example, the identifying unit 701 is configured to perform feature extraction on the first face image to obtain first face feature information of the first face image;
sending the first face feature information to a verification server, and triggering the verification server to perform face recognition according to the first face feature information and prestored user face feature information to obtain face recognition result information;
a login unit 703, configured to send user identification information to the merchant application, trigger the merchant application to obtain user account information of the current user according to the user identification information and pre-stored user account information, and perform account login of the current user based on the user account information of the current user.
In an optional example, the transaction unit 705 is configured to send a transaction identifier obtaining request to the verification server in response to the transaction request if the matching is successful;
receiving a transaction identifier sent by a verification server, wherein the transaction identifier has a transaction function;
and sending the transaction identifier to the merchant application program, and triggering the merchant application program to carry out transaction based on the transaction identifier.
In an optional example, the face recognition result information contains a transaction identifier corresponding to the user identification information, and the transaction identifier has a transaction function;
an information storage unit 702, configured to store the transaction identifier;
a transaction unit 705, configured to send the transaction identifier to the merchant application in response to the transaction request if matching is successful, and trigger the merchant application to perform a transaction based on the transaction identifier.
In an optional example, the system further includes a duration counting unit 706, configured to count a continuous storage duration of the transaction identifier, where the continuous storage duration represents a cumulative continuous storage duration from a time when the transaction identifier is stored;
an information storage unit 702, configured to delete the stored transaction identifier when the continuous storage duration exceeds a preset storage duration threshold.
In an optional example, the information storage unit 702 is configured to delete the first facial feature information when the continuous storage duration exceeds a preset storage duration threshold;
a transaction unit 705, configured to, when a transaction request is received, if the stored first face feature information and the transaction identifier are deleted, after second face feature information is obtained, not perform the step of matching the second face feature information with the stored first face feature information;
the step of sending the second face feature information and the user identification information to the verification server is executed, the verification server is triggered to determine the user face feature information of the current user from the pre-stored user face feature information according to the user identification information, and face matching is carried out on the basis of the second face feature information and the user face feature information of the current user to obtain a matching result;
receiving a matching result sent by a server, when the matching result is successful, extracting a transaction identifier corresponding to the user identifier information from the matching result, responding to the transaction request, sending the transaction identifier to the merchant application program, and triggering the merchant application program to perform transaction based on the account logged in by the current user and the transaction identifier.
In an optional example, the transaction unit 705 is configured to obtain the user transaction amount from the transaction request;
when the user transaction amount exceeds a preset user transaction amount threshold value, the step of matching the second face characteristic information with the stored first face characteristic information to obtain a matching result is not executed;
the step of sending the second face feature information and the user identification information to a verification server is executed, the verification server is triggered to determine the user face feature information of the current user from pre-stored user face feature information according to the user identification information, and face matching is carried out on the basis of the second face feature information and the user face feature information of the current user to obtain a matching result;
and receiving a matching result sent by the verification server, and when the matching result is successful, performing transaction based on the account logged by the current user and the transaction request.
In an optional example, the method further includes a deleting unit 707 configured to delete the first face image, the second face image, the first face feature information, and the second face feature information.
In an optional example, the method further includes acquiring and displaying unit 708, configured to acquire a first face image of the current user when the account login request is received, and display an acquisition page, where the acquisition page includes an acquisition image display area, and the acquisition image display area includes the first face image;
a transaction information display unit 709, configured to, when a transaction request is received, display a transaction page based on the transaction request, where the transaction page includes a transaction amount;
acquiring a second face image, and extracting the features of the second face image to obtain second face feature information;
the system further comprises a transaction result display unit 710, configured to obtain a transaction result, and switch and display the transaction page as a transaction result page based on the transaction result.
As can be seen from the above, in the embodiments of the present invention, when an account login request is received, a first face image of a current user is collected, based on the first face image, an authentication server is triggered to perform face recognition according to first face feature information of the first face image and pre-stored user face feature information to obtain face recognition result information, when it is determined that the face recognition is successful based on the face recognition result information, user identification information of the current user is obtained based on the face recognition result information, the first face feature information is stored, user account information of the current user is obtained based on the user identification information, account login of the current user is performed based on the user account information, when a transaction request is received, a second face image is collected, and feature extraction is performed on the second face image, obtaining second face feature information, matching the second face feature information with the stored first face feature information, and if the matching is successful, performing transaction based on the account logged by the current user and the transaction request; according to the embodiment of the invention, after the face recognition is determined to be successful, the first face characteristic information is stored, and when a transaction request is received, the second face characteristic information can be matched with the stored first face characteristic information locally to obtain a matching result, so that the step of comparing the face characteristics can be completed locally without sending the second face characteristic information of the user to the verification server for matching during the transaction, the purpose of improving the face payment speed is realized, and the time of the user in face payment is saved.
In addition, when the second face image is acquired, the acquisition area is not displayed, the preset display control is displayed, and the second face feature information of the user does not need to be sent to the verification server for matching during transaction, so that the face feature comparison can be completed locally, the experience of face brushing for the user for the second time is avoided, and the user experience is greatly improved.
Accordingly, an embodiment of the present invention further provides an electronic device, as shown in fig. 8, the electronic device may include Radio Frequency (RF) circuit 601, a memory 602 including one or more computer-readable storage media, an input unit 603, a display unit 604, a sensor 605, an audio circuit 606, a Wireless Fidelity (WiFi) module 607, a processor 608 including one or more processing cores, and a power supply 609. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 6 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the RF circuit 601 may be used for receiving and transmitting signals during a message transmission or communication process, and in particular, for receiving downlink messages from a base station and then processing the received downlink messages by one or more processors 608; in addition, data relating to uplink is transmitted to the base station. In general, the RF circuit 601 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 601 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Message Service (SMS), and the like.
The memory 602 may be used to store software programs and modules, and the processor 608 executes various functional applications and data processing by operating the software programs and modules stored in the memory 602. The memory 602 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 (such as audio data, a phonebook, etc.) created according to the use of the electronic device, and the like. Further, the memory 602 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 602 may also include a memory controller to provide the processor 608 and the input unit 603 access to the memory 602.
The input unit 603 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in one particular embodiment, input unit 603 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 608, and can receive and execute commands sent by the processor 608. In addition, touch sensitive surfaces may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 603 may include other input devices in addition to the touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 604 may be used to display information input by or provided to a user and various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 604 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to the processor 608 to determine the type of touch event, and the processor 608 then provides a corresponding visual output on the display panel according to the type of touch event. Although in FIG. 6 the touch-sensitive surface and the display panel are two separate components to implement input and output functions, in some embodiments the touch-sensitive surface may be integrated with the display panel to implement input and output functions.
The electronic device may also include at least one sensor 605, such as a light sensor, motion sensor, and other sensors. In particular, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or the backlight when the electronic device is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be further configured, the description thereof is omitted here.
Audio circuitry 606, a speaker, and a microphone may provide an audio interface between a user and the electronic device. The audio circuit 606 may transmit the electrical signal converted from the received audio data to a speaker, and convert the electrical signal into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 606 and converted into audio data, which is then processed by the audio data output processor 608, and then passed through the RF circuit 601 to be sent to, for example, another electronic device, or output to the memory 602 for further processing. The audio circuitry 606 may also include an earbud jack to provide communication of a peripheral headset with the electronic device.
WiFi belongs to short-distance wireless transmission technology, and the electronic device can help the user send and receive e-mail, browse web pages, access streaming media, etc. through the WiFi module 607, and it provides wireless broadband internet access for the user. Although fig. 6 shows the WiFi module 607, it is understood that it does not belong to the essential constitution of the electronic device, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 608 is a control center of the electronic device, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 602 and calling data stored in the memory 602, thereby performing overall monitoring of the mobile phone. Optionally, processor 608 may include one or more processing cores; preferably, the processor 608 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 608.
The electronic device also includes a power supply 609 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 608 via a power management system, such that the power management system may manage charging, discharging, and power consumption. The power supply 609 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.
Although not shown, the electronic device may further include a camera, a bluetooth module, and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 608 in the electronic device loads an executable file corresponding to a process of one or more application programs into the memory 602 according to the following instructions, and the processor 608 runs the application programs stored in the memory 602, so as to implement various functions:
when an account login request is received, acquiring a first face image of a current user, triggering a verification server to perform face recognition according to first face feature information of the first face image and pre-stored user face feature information based on the first face image, and obtaining face recognition result information;
when the face recognition is determined to be successful based on the face recognition result information, acquiring user identification information of the current user and the first face feature information based on the face recognition result information, and storing the first face feature information;
acquiring user account information of the current user based on the user identification information, and logging in an account of the current user based on the user account information;
when a transaction request is received, acquiring a second face image, and performing feature extraction on the second face image to obtain second face feature information;
and matching the second face feature information with the stored first face feature information, and if the matching is successful, performing transaction based on the account logged by the current user and the transaction request.
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, the present invention provides a storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps in any one of the methods for transferring a virtual resource provided by the embodiments of the present invention. For example, the instructions may perform the steps of:
when an account login request is received, acquiring a first face image of a current user, triggering a verification server to perform face recognition according to first face feature information of the first face image and pre-stored user face feature information based on the first face image, and obtaining face recognition result information;
when the face recognition is determined to be successful based on the face recognition result information, acquiring user identification information of the current user and the first face feature information based on the face recognition result information, and storing the first face feature information;
acquiring user account information of the current user based on the user identification information, and logging in an account of the current user based on the user account information;
when a transaction request is received, acquiring a second face image, and performing feature extraction on the second face image to obtain second face feature information;
and matching the second face feature information with the stored first face feature information, and if the matching is successful, performing transaction based on the account logged by the current user and the transaction request.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium may execute the steps in any virtual resource transfer method provided in the embodiments of the present invention, beneficial effects that can be achieved by any virtual resource transfer method provided in the embodiments of the present invention may be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
According to an aspect of the application, there is also provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided in the various alternative implementations in the above embodiments.
The face payment method, the face payment device, the electronic device and the storage medium provided by the embodiment of the invention are described in detail, a specific example is applied in the text to explain the principle and the implementation of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for those skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed, and in summary, the content of the present specification should not be construed as limiting the present invention.

Claims (12)

1. A face payment method, comprising:
when an account login request is received, acquiring a first face image of a current user, triggering a verification server to perform face recognition according to first face feature information of the first face image and pre-stored user face feature information based on the first face image, and obtaining face recognition result information;
when the face recognition is determined to be successful based on the face recognition result information, acquiring user identification information of the current user and the first face feature information based on the face recognition result information, and storing the first face feature information;
acquiring user account information of the current user based on the user identification information, and logging in an account of the current user based on the user account information;
when a transaction request is received, acquiring a second face image, and performing feature extraction on the second face image to obtain second face feature information;
and matching the second face feature information with the stored first face feature information, and if the matching is successful, performing transaction based on the account logged by the current user and the transaction request.
2. The method according to claim 1, wherein the method is applied to a payment sub-program, and the authentication server is a server of the payment sub-program;
when receiving an account login request, acquiring a first face image of a current user, triggering a verification server to perform face recognition according to first face feature information of the first face image and pre-stored user face feature information based on the first face image, and obtaining face recognition result information, wherein the face recognition result information comprises:
when an account login request sent by the merchant application program is received, starting a camera, acquiring a first face image of a current user through the camera, triggering a verification server to perform face recognition according to first face feature information of the first face image and pre-stored user face feature information based on the first face image, and obtaining face recognition result information;
the obtaining of the user account information of the current user based on the user identification information and the performing of the account login of the current user based on the user account information include:
sending the user identification information to the merchant application program, and triggering the merchant application program to log in an account according to the user identification information;
when a payment request is received, a second face image is collected, feature extraction is carried out on the second face image, and second face feature information is obtained, wherein the method comprises the following steps:
when a payment request sent by the merchant application program is received, starting a camera, and acquiring a second face image of the current user through the camera;
and extracting the features of the second face image to obtain second face feature information.
3. The method according to claim 2, wherein the triggering a verification server to perform face recognition according to first face feature information of the first face image and pre-stored user face feature information based on the first face image to obtain face recognition result information comprises:
extracting the features of the first face image to obtain first face feature information of the first face image;
sending the first face feature information to a verification server, and triggering the verification server to perform face recognition according to the first face feature information and prestored user face feature information to obtain face recognition result information;
the sending the user identification information to the merchant application program and triggering the merchant application program to log in an account according to the user identification information includes:
sending the user identification information to the merchant application program, triggering the merchant application program to acquire merchant user account information of the current user in the merchant application program according to the user identification information and prestored merchant user account information, and logging in an account of the current user based on the merchant user account information.
4. The method of claim 2, wherein if the matching is successful, conducting a transaction based on the account the current user is logged in to and the transaction request comprises:
if the matching is successful, a transaction identification acquisition request is sent to the verification server in response to the transaction request;
receiving a transaction identifier sent by the verification server, wherein the transaction identifier has a transaction function;
and sending the transaction identifier to the merchant application program, and triggering the merchant application program to perform transaction based on the account logged in by the current user and the transaction identifier.
5. The method according to claim 2, wherein the face recognition result information includes a transaction identifier corresponding to the user identification information, the transaction identifier having a transaction function;
when it is determined that the face recognition is successful based on the face recognition result information, obtaining user identification information of the current user and the first face feature information based on the recognition result information, and after storing the first face feature information, further including:
storing the transaction identification;
if the matching is successful, performing transaction based on the account logged in by the current user and the transaction request, including:
and if the matching is successful, responding to the transaction request and sending the transaction identifier to the merchant application program, and triggering the merchant application program to carry out transaction based on the account logged by the current user and the transaction identifier.
6. The method of claim 5, wherein after storing the transaction identification, further comprising:
counting the continuous storage time length of the transaction identification, wherein the continuous storage time length represents the accumulated continuous storage time length from the moment of storing the transaction identification;
and when the continuous storage time length exceeds a preset storage time length threshold value, deleting the stored transaction identification.
7. The method of claim 6, further comprising, when the continuous storage duration exceeds a preset storage duration threshold: deleting the stored first face characteristic information;
the method further comprises the following steps:
when a transaction request is received, if the stored first face feature information and the transaction identifier are deleted, after second face feature information is obtained, the step of matching the second face feature information with the stored first face feature information is not executed, and a matching result is obtained;
the step of sending the second face feature information and the user identification information to the verification server is executed, the verification server is triggered to determine the user face feature information of the current user from the pre-stored user face feature information according to the user identification information, and face matching is carried out on the basis of the second face feature information and the user face feature information of the current user to obtain a matching result;
receiving a matching result sent by a server, when the matching result is successful, extracting a transaction identifier corresponding to the user identifier information from the matching result, responding to the transaction request, sending the transaction identifier to the merchant application program, and triggering the merchant application program to perform transaction based on the account logged in by the current user and the transaction identifier.
8. The method according to any one of claims 1 to 7, wherein the transaction request includes a transaction amount of the user, and before the matching the second facial feature information with the stored first facial feature information and obtaining a matching result, the method further comprises:
obtaining the user transaction amount from the transaction request;
when the user transaction amount exceeds a preset user transaction amount threshold value, the step of matching the second face characteristic information with the stored first face characteristic information to obtain a matching result is not executed;
the step of sending the second face feature information and the user identification information to a verification server is executed, the verification server is triggered to determine the user face feature information of the current user from pre-stored user face feature information according to the user identification information, and face matching is carried out on the basis of the second face feature information and the user face feature information of the current user to obtain a matching result;
and receiving a matching result sent by the verification server, and when the matching result is successful, performing transaction based on the account logged by the current user and the transaction request.
9. The method of claim 1, wherein capturing a first facial image of a current user upon receiving an account login request comprises:
when an account login request is received, acquiring a first face image of a current user, and displaying an acquisition page, wherein the acquisition page comprises an acquisition image display area, and the acquisition image display area comprises the first face image;
when a transaction request is received, a second face image is collected, feature extraction is carried out on the second face image, and second face feature information is obtained, wherein the method comprises the following steps:
when a transaction request is received, displaying a transaction page based on the transaction request, wherein the transaction page comprises a transaction amount;
acquiring a second face image, and extracting the features of the second face image to obtain second face feature information;
after the transaction is performed based on the transaction request, the method further comprises:
and acquiring a transaction result, and switching and displaying the transaction page as a transaction result page based on the transaction result.
10. A face payment device, comprising:
the system comprises an identification unit, a verification unit and a verification unit, wherein the identification unit is used for acquiring a first face image of a current user when an account login request is received, and triggering a verification server to perform face identification according to first face characteristic information of the first face image and pre-stored user face characteristic information based on the first face image to obtain face identification result information;
an information storage unit configured to, when it is determined that the face recognition is successful based on the face recognition result information, acquire user identification information of the current user and the first face feature information based on the face recognition result information, and store the first face feature information;
the login unit is used for acquiring the user account information of the current user based on the user identification information and logging in the account of the current user based on the user account information;
the feature extraction unit is used for acquiring a second face image when a transaction request is received, and performing feature extraction on the second face image to obtain second face feature information;
and the transaction unit is used for matching the second face feature information with the stored first face feature information, and if the matching is successful, performing transaction based on the account logged by the current user and the transaction request.
11. An electronic device comprising a memory and a processor; the memory stores an application program, and the processor is configured to execute the application program in the memory to perform the operations of the face payment method according to any one of claims 1 to 9.
12. A storage medium storing instructions adapted to be loaded by a processor to perform the steps of the face payment method according to any one of claims 1 to 9.
CN202011298439.9A 2020-11-18 2020-11-18 Face payment method and device, electronic equipment and storage medium Pending CN114519579A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011298439.9A CN114519579A (en) 2020-11-18 2020-11-18 Face payment method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011298439.9A CN114519579A (en) 2020-11-18 2020-11-18 Face payment method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114519579A true CN114519579A (en) 2022-05-20

Family

ID=81595530

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011298439.9A Pending CN114519579A (en) 2020-11-18 2020-11-18 Face payment method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114519579A (en)

Similar Documents

Publication Publication Date Title
CN107992728B (en) Face verification method and device
CN108256853B (en) Payment method and mobile terminal
CN108629579B (en) Payment method and mobile terminal
CN110674662A (en) Scanning method and terminal equipment
CN110457888B (en) Verification code input method and device, electronic equipment and storage medium
CN109544172B (en) Display method and terminal equipment
CN109495638B (en) Information display method and terminal
US20230021413A1 (en) Voice Payment Method and Electronic Device
CN108629280B (en) Face recognition method and mobile terminal
CN110555171A (en) Information processing method, device, storage medium and system
CN109166164B (en) Expression picture generation method and terminal
CN112989888A (en) Fingerprint anti-counterfeiting method and electronic equipment
CN112818733B (en) Information processing method, device, storage medium and terminal
CN108307031B (en) Screen processing method, device and storage medium
CN110929238B (en) Information processing method and device
CN114626036A (en) Information processing method and device based on face recognition, storage medium and terminal
CN114519579A (en) Face payment method and device, electronic equipment and storage medium
CN110472520B (en) Identity recognition method and mobile terminal
CN109523270B (en) Information processing method and terminal equipment
CN111325560A (en) Payment method and electronic equipment
CN114078011A (en) Information processing method and device based on image recognition, storage medium and terminal
CN113542206B (en) Image processing method, device and computer readable storage medium
CN110769415B (en) Authentication method and electronic equipment
CN108008874B (en) Data processing method and device of mobile terminal and mobile terminal
CN110032904B (en) Graphic code identification method and mobile terminal

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