Payment method, system, electronic device and storage medium
1. A payment method is applied to local terminal equipment and comprises the following steps:
responding to a payment request, acquiring a to-be-recognized face picture of a to-be-paid user, and extracting to-be-recognized face features of the to-be-recognized face picture;
reading the prestored face features of each legal user in a local face feature library; the legal users comprise users whose payment behaviors at the local terminal equipment meet a first preset condition;
comparing the prestored face features with the face features to be recognized, and determining a comparison result;
and sending the comparison result to a server, wherein the server is used for paying according to the comparison result.
2. The payment method according to claim 1, wherein before the obtaining of the face picture to be recognized of the user to be paid in response to the payment request, the method further comprises:
receiving a registration request of a first user initiated on the local terminal equipment;
responding to the registration request, and acquiring a plurality of first face pictures of the first user;
inputting the first face pictures into a face quality detection model to obtain a face quality detection result;
according to the face quality detection result, determining a target face picture with the highest quality score from the plurality of first face pictures, and extracting first face features from the target face picture;
and creating a local face feature library according to the first face features, wherein the pre-stored face features comprise the first face features.
3. A payment method as claimed in claim 2, wherein, following receipt of the registration request of the first user initiated on the local terminal device, the method further comprises:
acquiring identity identification information of the first user;
judging whether the first user has the authority of registering on the local terminal equipment or not based on the identity identification information;
if the first user has the authority of registering on the local terminal equipment, determining that the first user is a legal user, and responding to the registration request to obtain a plurality of first facial pictures of the first user;
after the extracting the first face feature from the target face picture, the method further includes:
judging whether the daily place of the first user is consistent with the geographical position of the local terminal equipment;
and if the daily place of the first user is consistent with the geographical position of the local terminal equipment, creating a local face feature library according to the first face feature.
4. A payment method as claimed in claim 2 or 3, wherein the method further comprises:
receiving a user characteristic storage instruction sent by the server; the user feature storage instruction comprises second face features of at least one second user, and the second user is a user with payment behavior data on the local terminal equipment meeting a second preset condition; the payment behavior data comprises payment frequency and/or payment times;
and storing the second face features into the local face feature library.
5. A payment method as recited in claim 4, wherein after receiving the user characteristic storage instruction sent by the server, the method further comprises:
judging whether the current residual storage capacity of the local face feature library is larger than or equal to the data capacity of the second face feature;
if the current residual storage capacity of the local face feature library is larger than or equal to the data capacity of the second face feature, storing the second face feature into the local face feature library; or the like, or, alternatively,
and if the current residual storage capacity of the local face feature library is smaller than the data volume of the second face feature, deleting part of face features from the local face feature library according to a second preset condition, and storing the second face features into the local face feature library.
6. The payment method of any one of claims 2-5, wherein said creating a local facial feature library from said first facial features comprises:
determining a user type to which the first user belongs;
clustering the first face features according to the user types to obtain a plurality of classification groups;
creating a feature sub-library for each of the taxonomic groups;
and constructing the local face feature library according to the plurality of feature sub-libraries.
7. The payment method according to claim 6, wherein the comparing the pre-stored face features with the face features to be recognized to determine a comparison result comprises:
determining a feature sub-library corresponding to the face features to be recognized based on the user type of the user to be paid;
determining the similarity between the human face features to be recognized and each pre-stored human face feature in the determined feature sub-library;
determining that the comparison is successful under the condition that a legal user with the similarity larger than a preset threshold exists in the feature sub-library; and determining that the comparison fails under the condition that no legal user with the similarity larger than a preset threshold value exists in the feature sub-library.
8. The payment method according to claim 7, wherein, when there are a plurality of legal users with similarity greater than a preset threshold in the feature sub-library; the method further comprises the following steps:
obtaining portrait description characteristics of a plurality of legal users;
respectively constructing user portraits for a plurality of legal users based on the acquired portraits description characteristics;
and comparing the user images corresponding to the plurality of legal users with the user image of the user to be paid, and selecting the legal user with the highest user image matching degree from the plurality of legal users as the legal user with successful comparison.
9. A payment method as claimed in any one of claims 2 to 8, wherein the method further comprises:
receiving a characteristic deleting instruction which is sent by the server and aims at least one third user; the third user is a user with payment behavior data meeting a third preset condition; the payment behavior data comprises payment frequency and/or payment times;
and deleting the face features of the third user from the local face feature library to obtain an updated local face feature library.
10. A payment method as claimed in any one of claims 1 to 9, wherein the method further comprises:
under the condition that the comparison result indicates that the comparison is successful, acquiring account information of the user to be paid and a face block diagram corresponding to the face picture to be recognized;
the sending the comparison result to a server includes:
sending the comparison result, the account information and the face block diagram to a server; the server is used for carrying out payment based on the comparison result and the account information and checking the payment result based on the human face diagram.
11. A payment method as recited in any one of claims 1-10, wherein the method further comprises:
sending a feature comparison request carrying the face picture to be recognized to the server under the condition that the comparison result indicates that the comparison is failed, wherein the feature comparison request is used for requesting the server to perform feature comparison based on the face picture to be recognized, and triggering the server to perform payment operation under the condition that the comparison of the server is successful;
and receiving payment success information returned by the server after the payment operation is completed.
12. A payment method, applied to a server, comprising:
acquiring a comparison result sent by local terminal equipment; the comparison result is obtained by comparing the human face features to be identified of the human face picture to be identified with the pre-stored human face features of each legal user in the local human face feature library by the local terminal equipment; the legal users comprise users whose payment behaviors at the local terminal equipment meet a first preset condition;
and carrying out payment operation based on the comparison result.
13. The payment method according to claim 12, wherein the performing the payment operation based on the comparison result comprises:
receiving a face picture to be recognized sent by the local terminal equipment under the condition that the comparison result indicates that the comparison fails;
comparing the characteristics of the users to be paid based on the face pictures to be recognized to obtain a new comparison result;
and carrying out payment operation based on the new comparison result.
14. A payment method as claimed in claim 12 or 13, wherein the method further comprises:
acquiring payment behavior data generated by a historical payment user in the local terminal equipment; the payment behavior data comprises payment frequency and/or payment times;
generating a user characteristic storage instruction pointing to the historical payment user under the condition that the payment behavior data meet a second preset condition;
sending the user characteristic storage instruction to the local terminal equipment; the user characteristic storage instruction is used for instructing the local terminal equipment to synchronize the information of the historical payment user.
15. A payment system, comprising: a local terminal device according to any of claims 1-11 and a server according to any of claims 12-14.
16. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is operating, the machine-readable instructions when executed by the processor performing a payment method as claimed in any one of claims 1 to 14.
17. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, performs a payment method as claimed in any one of claims 1 to 14.
Background
With the development of internet technology, internet-based payment methods, such as code scanning payment, fingerprint payment, and face payment, have become very popular. Among them, face payment is a great concern because of the good experience that users do not need to carry their own mobile devices.
In the process of face payment, a payment device with a face brushing function is required to be accessed, and the face is displayed in the payment device to carry out payment operation. Due to the rigor of payment, the payment needs to be verified in a relatively complex way, most of the payment devices on the market at present adopt a cloud identification mode, namely, face collection is carried out at a payment terminal, and then the face is sent to the cloud for identification and payment.
However, in the case of a large number of payment terminals, the above method may result in a higher identification pressure ratio at the cloud, which may cause a longer payment delay and lower the service quality.
Disclosure of Invention
The embodiment of the disclosure at least provides a payment method, a payment system, electronic equipment and a storage medium, so as to improve payment efficiency.
In a first aspect, an embodiment of the present disclosure provides a payment method, applied to a local terminal device, including:
responding to a payment request, acquiring a to-be-recognized face picture of a to-be-paid user, and extracting to-be-recognized face features of the to-be-recognized face picture;
reading the prestored face features of each legal user in a local face feature library; the legal users comprise users who meet a preset condition first in the payment behavior of the local terminal equipment;
comparing the prestored face features with the face features to be recognized, and determining a comparison result;
and sending the comparison result to a server, wherein the server is used for paying according to the comparison result.
By adopting the payment method, under the condition of responding to the payment request, the face features to be recognized can be extracted based on the acquired face picture to be recognized of the user to be paid, so that under the condition of reading the prestored face features of each legal user in the local face feature library, the face features to be recognized and the prestored face features can be compared, and the comparison result is sent to the server so that the server can complete the payment process based on the comparison result. The local terminal equipment in the disclosure can utilize the local human face feature library to compare features, so that the server only needs to realize payment operation based on comparison results, especially, the local terminal equipment is more and has a plurality of payment requirements, each local terminal equipment can automatically compare features without queuing at the server, and the payment efficiency is obviously improved.
In a possible implementation manner, before the obtaining, in response to the payment request, a to-be-recognized face picture of the to-be-paid user, the method further includes:
receiving a registration request of a first user initiated on the local terminal equipment;
responding to the registration request, and acquiring a plurality of first face pictures of the first user;
inputting the first face pictures into a face quality detection model to obtain a face quality detection result;
according to the face quality detection result, determining a target face picture with the highest quality score from the plurality of first face pictures, and extracting first face features from the target face picture;
and creating a local face feature library according to the first face features, wherein the pre-stored face features comprise the first face features.
Here, the first facial feature of the first user may be obtained based on the registration request of the first user, and then a local facial feature library may be constructed. The first user may be a peripheral user who uses the local terminal device to pay for the articles, the first facial feature may be a facial feature extracted from a target facial picture with the highest quality score selected from a plurality of first facial pictures acquired by the first user, and the two characteristics of the first user may improve the feature comparison speed and the comparison accuracy of the local terminal device to a certain extent.
In one possible implementation, after receiving the registration request of the first user initiated on the local terminal device, the method further includes:
acquiring identity identification information of the first user;
judging whether the first user has the authority of registering on the local terminal equipment or not based on the identity identification information;
if the first user has the authority of registering on the local terminal equipment, determining that the first user is a legal user, and responding to the registration request to obtain a plurality of first facial pictures of the first user;
after the extracting the first face feature from the target face picture, the method further includes:
judging whether the daily place of the first user is consistent with the geographical position of the local terminal equipment;
and if the daily place of the first user is consistent with the geographical position of the local terminal equipment, creating a local face feature library according to the first face feature.
Here, in order to further ensure the validity of the user corresponding to the face features stored in the local face feature library, after receiving the registration request, the first user may be verified for the registration authority by using the identity information, and whether to perform the face feature warehousing operation may be determined based on the consistency between the frequent residence of the user and the geographic location to which the local terminal device belongs, so as to ensure the security of the subsequent face verification.
In one possible embodiment, the method further comprises:
receiving a user characteristic storage instruction sent by the server; the user feature storage instruction comprises second face features of at least one second user, and the second user is a user with payment behavior data on the local terminal equipment meeting a second preset condition; the payment behavior data comprises payment frequency and/or payment times;
and storing the second face features into the local face feature library.
Here, the second facial features of the second user with a higher payment frequency and a higher payment number may be synchronized to the local facial feature library to increase the comparison speed.
In a possible implementation manner, after receiving the user feature storage instruction sent by the server, the method further includes:
judging whether the current residual storage capacity of the local face feature library is larger than or equal to the data capacity of the second face feature;
if the current residual storage capacity of the local face feature library is larger than or equal to the data capacity of the second face feature, storing the second face feature into the local face feature library; or the like, or, alternatively,
and if the current residual storage capacity of the local face feature library is smaller than the data volume of the second face feature, deleting part of face features from the local face feature library according to a second preset condition, and storing the second face features into the local face feature library.
In one possible embodiment, the creating a local facial feature library according to the first facial feature includes:
determining a user type to which the first user belongs;
clustering the first face features according to the user types to obtain a plurality of classification groups;
creating a feature sub-library for each of the taxonomic groups;
and constructing the local face feature library according to the plurality of feature sub-libraries.
The first face features of the first user can be clustered according to the user types, and a corresponding feature sub-library is created for each classified group, so that a local face feature library is created, and therefore, under the condition of performing feature comparison subsequently, the face features can be directly selected from the corresponding feature sub-libraries for comparison, and comparison efficiency is further improved.
In a possible implementation manner, the comparing the pre-stored face features with the face features to be recognized to determine a comparison result includes:
determining a feature sub-library corresponding to the face features to be recognized based on the user type of the user to be paid;
determining the similarity between the human face features to be recognized and each pre-stored human face feature in the determined feature sub-library;
determining that the comparison is successful under the condition that a legal user with the similarity larger than a preset threshold exists in the feature sub-library; and determining that the comparison fails under the condition that no legal user with the similarity larger than a preset threshold value exists in the feature sub-library.
In the method, the feature sub-library for comparison can be determined based on the user type of the user to be paid, and then feature comparison is realized based on the similarity between features, so that the method is simple and efficient.
In a possible implementation manner, when a plurality of legal users with similarity degrees larger than a preset threshold exist in the feature sub-library; the method further comprises the following steps:
obtaining portrait description characteristics of a plurality of legal users;
respectively constructing user portraits for a plurality of legal users based on the acquired portraits description characteristics;
and comparing the user images corresponding to the plurality of legal users with the user image of the user to be paid, and selecting the legal user with the highest user image matching degree from the plurality of legal users as the legal user with successful comparison.
Here, in the case that a plurality of users with higher similarity are determined for the user to be paid, user screening may be further performed in combination with user portrait construction to ensure accuracy of comparison results.
In one possible embodiment, the method further comprises:
receiving a characteristic deleting instruction which is sent by the server and aims at least one third user; the third user is a user with payment behavior data meeting a third preset condition; the payment behavior data comprises payment frequency and/or payment times;
and deleting the face features of the third user from the local face feature library to obtain an updated local face feature library.
Here, the face features of the third user with a relatively low payment frequency and a relatively low payment frequency may be deleted from the local face feature library, and the storage space of the local terminal device may be increased while ensuring the comparison speed.
In one possible embodiment, the method further comprises:
under the condition that the comparison result indicates that the comparison is successful, acquiring account information of the user to be paid and a face block diagram corresponding to the face picture to be recognized;
the sending the comparison result to a server includes:
sending the comparison result, the account information and the face block diagram to a server; the server is used for carrying out payment based on the comparison result and the account information and checking the payment result based on the human face diagram.
Here, under the condition that the comparison of the local terminal device is successful, the account information of the user to be paid can be determined and the comparison result is sent to the server together, so that the server can deduct money directly based on the account information and complete the payment process, and the payment efficiency is further improved. Meanwhile, the payment result can be checked based on the human face block diagram, and the smooth proceeding of the payment operation is ensured.
In one possible embodiment, the method further comprises:
sending a feature comparison request carrying the face picture to be recognized to the server under the condition that the comparison result indicates that the comparison is failed, wherein the feature comparison request is used for requesting the server to perform feature comparison based on the face picture to be recognized, and triggering the server to perform payment operation under the condition that the comparison of the server is successful;
and receiving payment success information returned by the server after the payment operation is completed.
In order to ensure the smooth proceeding of the payment operation, under the condition that the comparison of the local terminal equipment fails, the face picture to be recognized can be directly sent to the server so that the server can firstly carry out feature comparison and then carry out payment, and the service quality of the payment is improved.
In a second aspect, an embodiment of the present disclosure further provides a payment method, applied to a server, including:
acquiring a comparison result sent by local terminal equipment; the comparison result is obtained by comparing the human face features to be identified of the human face picture to be identified with the pre-stored human face features of each legal user in the local human face feature library by the local terminal equipment; the legal users comprise users whose behaviors at the local terminal equipment meet a first preset condition;
and carrying out payment operation based on the comparison result.
By adopting the payment method, the payment operation can be carried out based on the comparison result sent by the local terminal equipment, the local terminal equipment can utilize the local face feature library to carry out feature comparison, so that the server only needs to realize the payment operation based on the comparison result, particularly, under the condition that the number of the local terminal equipment is large and a plurality of payment demands are met, each local terminal equipment can carry out feature comparison by itself, the server does not need to queue for comparison, and the payment efficiency is obviously improved.
In a possible embodiment, the performing a payment operation based on the comparison result includes:
receiving a face picture to be recognized sent by the local terminal equipment under the condition that the comparison result indicates that the comparison fails;
comparing the characteristics of the users to be paid based on the face pictures to be recognized to obtain a new comparison result;
and carrying out payment operation based on the new comparison result.
In one possible embodiment, the method further comprises:
acquiring payment behavior data generated by a historical payment user in the local terminal equipment; the payment behavior data comprises payment frequency and/or payment times;
generating a user characteristic storage instruction pointing to the historical payment user under the condition that the payment behavior data meet a second preset condition;
sending the user characteristic storage instruction to the local terminal equipment; the user characteristic storage instruction is used for instructing the local terminal equipment to synchronize the information of the historical payment user.
In one possible embodiment, the method further comprises:
under the condition that the payment behavior data meet a third preset condition, generating a characteristic deleting instruction pointing to the historical payment user;
and sending the characteristic deleting instruction to the local terminal equipment, wherein the characteristic deleting instruction is used for indicating the local terminal equipment to delete the information of the historical payment user.
In one possible embodiment, the method further comprises:
receiving a human face block diagram sent by the local terminal equipment; the face block diagram is an image of a face part corresponding to the indication of the user to be paid in the face picture to be recognized under the condition that the comparison result indicates that the comparison is successful;
and responding to a payment checking instruction, and checking a payment result based on the human face block diagram.
In a possible embodiment, the performing a payment operation based on the comparison result includes:
under the condition that the comparison result indicates that the comparison is successful, searching account information matched with the user to be paid from prestored account information of each user based on the comparison result;
and carrying out payment operation based on the found account information matched with the user to be paid.
In a third aspect, an embodiment of the present disclosure further provides a payment apparatus, applied to a local terminal device, including:
the response module is used for responding to the payment request, acquiring a to-be-recognized face picture of the to-be-paid user and extracting to-be-recognized face features of the to-be-recognized face picture;
the reading module is used for reading the prestored face characteristics of each legal user in the local face characteristic library; the legal users comprise users who meet a preset condition first in the payment behavior of the local terminal equipment;
the comparison module is used for comparing the prestored face features with the face features to be recognized and determining a comparison result;
and the sending module is used for sending the comparison result to a server, wherein the server is used for paying according to the comparison result.
In a fourth aspect, an embodiment of the present disclosure further provides a payment apparatus, which is applied to a server, and includes:
the acquisition module is used for acquiring a comparison result sent by the local terminal equipment; the comparison result is obtained by comparing the human face features to be identified of the human face picture to be identified with the pre-stored human face features of each legal user in the local human face feature library by the local terminal equipment; the legal users comprise users whose payment behaviors at the local terminal equipment meet a first preset condition;
and the payment module is used for carrying out payment operation based on the comparison result.
In a fifth aspect, an embodiment of the present disclosure further provides a payment system, including: a local terminal device as described in the first aspect and any of its various embodiments and a server as described in the second aspect and any of its various embodiments.
In a sixth aspect, an embodiment of the present disclosure further provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is operated, the machine-readable instructions when executed by the processor performing the steps of the payment method as set forth in any one of the first aspect and its various embodiments, the second aspect and its various embodiments.
In a seventh aspect, this disclosed embodiment also provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, performs the steps of the payment method as described in the first aspect and any of the various embodiments thereof, and the second aspect and any of the various embodiments thereof.
For the description of the effects of the payment apparatus, the electronic device, and the computer-readable storage medium, reference is made to the description of the payment method, and details are not repeated here.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly described below, and the drawings herein incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the technical solutions of the present disclosure. It is appreciated that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope, for those skilled in the art will be able to derive additional related drawings therefrom without the benefit of the inventive faculty.
Fig. 1 illustrates a flow chart of a payment method provided by an embodiment of the present disclosure;
FIG. 2 illustrates a flow chart of another payment method provided by embodiments of the present disclosure;
FIG. 3 illustrates a schematic diagram of a payment system provided by embodiments of the present disclosure;
fig. 4 shows a schematic diagram of a payment device provided by an embodiment of the present disclosure;
FIG. 5 shows a schematic diagram of another payment device provided by embodiments of the present disclosure;
fig. 6 shows a schematic diagram of an electronic device provided by an embodiment of the present disclosure;
fig. 7 shows a schematic diagram of another electronic device provided by an embodiment of the disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The term "and/or" herein merely describes an associative relationship, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Research shows that in the process of face payment, payment equipment with a face brushing payment function is required to be accessed, and the face is displayed in the payment equipment to carry out payment operation. Due to the rigor of payment, the payment needs to be verified in a relatively complex way, most of the payment devices on the market at present adopt a cloud identification mode, namely, face collection is carried out at a payment terminal, and then the face is sent to the cloud for identification and payment.
However, in the case of a large number of payment terminals, the above method may result in a higher identification pressure ratio at the cloud, which may cause a longer payment delay and lower the service quality.
Based on the research, the present disclosure provides a payment method, system, electronic device, and storage medium to improve payment efficiency.
To facilitate understanding of the present embodiment, a payment method disclosed in the embodiments of the present disclosure is first described in detail, and an execution subject of the payment method provided in the embodiments of the present disclosure is generally a computer device with certain computing capability, where the computer device includes, for example: a terminal device, which may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or other processing device. In some possible implementations, the payment method may be implemented by way of a processor invoking computer readable instructions stored in a memory.
Referring to fig. 1, a flowchart of a payment method provided in the embodiment of the present disclosure is shown, where the method includes steps S101 to S104, where:
s101: responding to the payment request, acquiring a face picture to be recognized of the user to be paid, and extracting the face feature to be recognized of the face picture to be recognized;
s102: reading the prestored face features of each legal user in a local face feature library; the legal users comprise users who meet a preset condition first in the payment behavior of the local terminal equipment;
s103: comparing the prestored face features with the face features to be recognized, and determining a comparison result;
s104: and sending the comparison result to a server, wherein the server is used for paying according to the comparison result.
Here, in order to facilitate understanding of the payment method provided by the embodiment of the present disclosure, first, a brief description is given to an application scenario of the payment method. The payment method can be mainly applied to various payment scenes, can be mainly applied to face payment, and can be applied to unmanned supermarket scenes.
In the process of face payment, terminal equipment with a face brushing function is required to be accessed. After the face acquisition is carried out on the terminal equipment, the face can be sent to the cloud for authentication, and payment can be carried out after the authentication is passed. However, in the case of a large number of payment devices, the above method may result in a higher identification pressure ratio at the cloud, which may cause a longer payment delay and lower the service quality.
In order to solve the above problem, embodiments of the present disclosure provide a payment method, a payment system, an electronic device, and a storage medium, so as to improve payment efficiency.
Here, the face features to be recognized may be extracted based on the acquired face picture to be recognized, and the pre-stored face features of each legitimate user in the local face feature library may be read, so that after the pre-stored face features are compared with the face features to be recognized, the comparison result may be sent to the server so that the server completes the payment process based on the comparison result.
The face picture to be recognized can be acquired by using a camera arranged on the local terminal device, namely, the camera can start acquisition operation to capture the face of the user to be paid under the condition of having a payment request. The users to be paid corresponding to different application scenarios are also different, and are not described herein again.
Under the condition that the local terminal device catches the face, the face features to be recognized of the face picture to be recognized can be extracted, and the face features to be recognized are compared with the face features prestored in each legal user in the local face feature library. Here, whether the user to be paid is a legal user can be determined based on the similarity between every two features, the server can be notified of the comparison result under the condition that the user to be paid is determined to be the legal user, so that the server can complete the subsequent payment process, the server can directly send the face picture to be recognized to the server under the condition that the user to be paid is determined to be an illegal user, so that the server can perform identity comparison again, and the subsequent payment process can be completed under the condition that the identity comparison is successful.
It can be known that, the payment method provided by the embodiment of the present disclosure firstly completes identity comparison at the local terminal device side, and thus, even if the local terminal devices are more, the time-consuming problem caused by the need of queuing at the server side for identity comparison is not caused, and the subsequent payment efficiency is significantly improved.
In addition, the embodiment of the disclosure can also perform identity comparison again by using the server under the condition that the comparison of the local terminal device fails, which mainly considers that the server often has stronger computing power and richer data resources, so that the comparison success rate can be improved, and the payment security is ensured.
The local face feature library may collect pre-stored face features of each legal user, and the legal users may include users whose behavior at the local terminal device satisfies a preset condition. For example, the user may register with the local terminal device in advance, the user may often make payment on the local terminal device, and the like, and the user may also meet other preset conditions, and the embodiment of the present disclosure is not limited specifically here.
According to the payment method provided by the embodiment of the disclosure, under the condition that the comparison result indicates that the comparison fails, the comparison result and the acquired face picture to be recognized can be sent to the server.
In specific application, a feature comparison request carrying a face picture to be recognized can be sent to a server under the condition that the comparison of the local terminal equipment fails. The server can be triggered to complete the payment process under the condition that the server receives the feature comparison request and the comparison is successful based on the face picture to be recognized.
It should be noted that, along with the sending of the information indicating that the comparison fails, not only the face pictures to be recognized may be sent at the same time, but also the face block diagrams extracted from the face pictures to be recognized may be sent at the same time, and the face block diagrams correspond to the face areas of the users to be paid.
Under the condition of simultaneously sending the face pictures to be recognized, a series of operations such as face block diagram extraction, face feature extraction and feature ratio equalization can be carried out on the server side to further complete the payment process, and under the condition of simultaneously sending the face block diagrams, the face feature extraction and the feature ratio equalization can be directly carried out.
According to the payment method provided by the embodiment of the disclosure, under the condition that the comparison result indicates that the comparison fails, the account information of the user to be paid can be acquired at the local terminal device, and the comparison result and the account information are sent to the server.
The account information may be related information of the account to be deducted of the user to be paid, for example, bank card number information, user name information of a third party payment platform, and the like, so that the server may initiate a deduction instruction to the corresponding deduction platform through the account information sent by the local terminal device, and execute a final deduction action to complete the payment process.
In practical application, in consideration of the key role of the image background information on the judgment of the authenticity of the face, the picture of the face to be recognized can be directly sent to the server so that the server completes a series of identity comparison and payment operations, and the payment safety is further ensured.
In addition, in the embodiment of the disclosure, under the condition that the comparison result indicates that the comparison is successful, the face block diagram can be extracted from the acquired face picture to be recognized, and the extracted face block diagram is sent to the server for archiving. The method mainly considers that in an actual service scene, payment operation relates to user property, once a problem occurs, the reason of the payment problem often needs to be traced back in time, the archiving of the small graph (namely the human face block diagram) can help the checking of the payment result, and the small graph is transmitted to a server through local terminal equipment and does not occupy too large network bandwidth.
It should be noted that, in practical application, the face image to be recognized may be directly archived as well as archived by using the face block diagram.
Each pre-stored face feature included in the local face feature library in the embodiment of the present disclosure may be determined after the relevant user registers in the local terminal device, or may be determined by the server based on the payment behavior of the relevant user, which will be further described below.
The payment method provided by the embodiment of the disclosure can construct a local face feature library according to the following steps:
step one, receiving a registration request of a first user initiated on local terminal equipment;
responding to the registration request, and acquiring a plurality of first face pictures of the first user;
inputting a plurality of first face pictures into a face quality detection model to obtain a face quality detection result;
determining a target face picture with the highest quality score from the plurality of first face pictures according to the face quality detection result, and extracting first face features from the target face picture;
and fifthly, creating a local face feature library according to the first face features, wherein the pre-stored face features comprise the first face features.
Here, the first face picture may be acquired in response to a registration request of the first user, and in a case where the face features are extracted from the first face picture, the first face features may be stored in the local face feature library.
In a specific application, the local terminal device may support a user to enter, for example, a face picture may be entered through a camera. In general, a plurality of face pictures can be input for one user. In order to further improve the accuracy of subsequent feature comparison, the face quality of a plurality of first face pictures corresponding to the first user can be scored based on a pre-trained face quality detection model, and a face picture with the highest quality score can be selected.
The face quality detection model is used for determining features related to the picture quality based on analysis of the definition, the integrity, the exposure and the like of the face picture, and determining a picture quality score based on the features.
The first facial feature of the facial picture can be added into the local facial feature library under the condition that a user entering related information of the local terminal equipment can pay the equipment frequently by default, the facial picture is successfully entered, and the target facial picture is selected.
Meanwhile, the embodiment of the disclosure also supports the entry of other information, for example, the entry of the account information of the person through a keyboard. Here, the face picture, the face feature and the corresponding account information may be synchronized to the server to keep the server synchronized with the local terminal device, so that the server performs multi-device management conveniently.
In practical application, in order to further ensure the validity of the user corresponding to the face features stored in the local face feature library, after receiving the registration request, the first user may be verified for the registration authority by using the identity information, which may specifically be implemented by the following steps:
step one, acquiring identity identification information of a first user;
step two, judging whether the first user has the authority of registering on the local terminal equipment or not based on the identity identification information;
and step three, if the first user has the authority of registering on the local terminal equipment, determining that the first user is a legal user, responding to a registration request, and acquiring a plurality of first facial pictures of the first user.
Here, it may be verified whether the first user has the registration right based on the identification information. Before the verification of the registration authority, a user identifier with the registration authority may be bound to the local terminal device in advance, where the user may be an owner of the local terminal device, a manager of the local terminal device, or another user with the registration authority.
In the embodiment of the present disclosure, whether to perform the face feature entering operation may also be determined based on consistency between the place where the user normally lives and the geographic location to which the local terminal device belongs, that is, if the place where the first user normally lives is consistent with the geographic location to which the local terminal device belongs, the reasonability of entering the face feature on the local terminal device is described to a certain extent, for example, for the local terminal device set by a convenience store in a cell, the first user may be a cell resident. Furthermore, a local face feature library can be created according to the first face features, so that the safety of subsequent face verification is further ensured.
In the embodiment of the present disclosure, the local face feature library may be updated according to the following steps:
step one, receiving a user characteristic storage instruction sent by a server; the user feature storage instruction comprises at least one second face feature of a second user, and the second user is a user with payment behavior data on the local terminal equipment meeting a second preset condition; the payment behavior data comprises payment frequency and/or payment times;
and step two, storing the second face features into a local face feature library.
The first preset condition may be that the payment frequency is higher than the preset frequency and the payment number is greater than the preset number. That is, in the case that the server determines that some users (i.e., second users) pay frequently at the local terminal device, the face features of the users are automatically synchronized to the local face feature library of the terminal device, so as to increase the comparison speed.
In practical application, whether the current residual storage capacity of the local face feature library is larger than or equal to the data volume of the second face features to be stored needs to be evaluated, and if the current residual storage capacity of the local face feature library is larger than or equal to the data volume of the second face features, the second face features are stored in the local face feature library; and if the current residual storage capacity of the local face feature library is smaller than the data volume of the second face feature, deleting part of face features from the local face feature library according to a second preset condition, and storing the second face features into the local face feature library. Here, the facial features of the user with a low payment frequency and a low payment number may be deleted.
In the embodiment of the present disclosure, the local face feature library may also be updated according to the following steps:
step one, receiving a characteristic deleting instruction which is sent by a server and aims at least one third user; the third user is a user whose payment behavior data meet a third preset condition; the payment behavior data comprises payment frequency and/or payment times;
and step two, deleting the face features of the third user from the local face feature library to obtain an updated local face feature library.
The third preset condition may be that the payment frequency is lower than or equal to the preset frequency, and the payment number is less than or equal to the preset number, and besides, the third preset condition may be that the payment duration from the current time exceeds the preset duration. That is, in the case where the server determines that some users (i.e., third users) do not pay at the local terminal device for a long time and the users are in the local face feature library, the face features of the users are deleted from the local face feature library, so as to maintain a relatively fixed data size locally and ensure that the storage space of the local terminal device is sufficiently used.
It should be noted that, in practical applications, the information of the third user may be retained on the server side, so that the information synchronization is performed in time when the information synchronization is needed.
In order to further improve the efficiency of face comparison, the payment method provided by the embodiment of the disclosure can establish the feature sub-library based on the face feature clustering, and further realize rapid face comparison based on the feature comparison of the feature sub-library.
The library establishing scheme can be specifically realized by the following steps:
step one, determining a user type to which a first user belongs;
clustering the first face features according to the user types to obtain a plurality of classification groups;
step three, creating a feature sub-library for each classification group;
and step four, constructing a local face feature library according to the plurality of feature sub-libraries.
Here, the face feature comparison may be performed based on the user type, and then a local face feature library may be created based on the feature sub-library corresponding to each classification group.
Wherein the user type may be determined based on different application scenarios. Taking the scenario of an unmanned supermarket as an example, the user types can be types of students, parents, old people and the like, and for different student types, the corresponding first face features are different, so that the first face features can be put into different local face feature libraries.
In addition, in the process of face feature clustering, clustering can be performed by combining with information such as user preference, and clustering can be realized by adopting clustering methods such as K-means, and the like, which are not described herein repeatedly.
Based on the local face feature library constructed with different feature sub-libraries, the feature comparison can be performed according to the following method:
step one, determining a feature sub-library corresponding to the face features to be recognized based on the user type of the user to be paid;
determining similarity between the human face features to be recognized and each prestored human face feature in the determined feature sub-library;
thirdly, determining that the comparison is successful under the condition that a legal user with the similarity larger than a preset threshold exists in the feature sub-library; and determining that the comparison fails under the condition that no legal user with the similarity larger than a preset threshold value exists in the feature sub-library.
Here, a feature sub-library corresponding to the user to be paid may be locked based on the user type, and then a similarity between each pre-stored face feature in the feature sub-library and the face feature to be recognized of the face picture to be recognized is determined, where the higher the similarity is, the higher the probability in the description ratio is, and conversely, the lower the similarity is, the lower the probability in the description ratio is. Here, the comparison may be determined to be successful to complete the identity comparison when there is a valid user whose similarity is greater than the preset threshold in the feature sub-library, and the comparison may also be determined to be failed to initiate a request for performing comparison again to the server to complete the subsequent payment process when there is no valid user whose similarity is greater than the preset threshold in the feature sub-library.
The feature similarity here may be determined based on a cosine formula.
In practical application, if a plurality of prestored face features with relatively high similarity are searched from the feature sub-library, in order to facilitate subsequent payment operation, user screening may be further performed in combination with a user portrait to determine a final comparative person, which may specifically be implemented according to the following steps:
firstly, obtaining portrait description characteristics of a plurality of legal users;
secondly, respectively constructing user portraits for a plurality of legal users based on the acquired portraits description characteristics;
and step three, comparing the user images corresponding to the plurality of legal users with the user images of the users to be paid, and selecting the legal user with the highest user image matching degree from the plurality of legal users as the legal user with successful comparison.
The portrait description features can describe each user from more feature dimensions, the feature comparison result is more targeted through more full-dimension description, and the comparison accuracy is improved.
Next, taking an unmanned supermarket scene as an example, a maintenance process of the local face feature library is explained.
For an unmanned supermarket located in a certain cell, face pictures and related personal information of all owners in the cell can be recorded in a local terminal device arranged in the supermarket in advance, and the owners can be used as resident members of the local terminal device. If the new owner is checked in within a certain time, the information of the new owner can be recorded into the local terminal equipment, and the face features can be automatically synchronized to the local terminal equipment under the condition that the server determines that the new owner has frequent payment behaviors, so that the new owner can quickly complete local identity comparison. If the owner moves out of the cell, the information of the owner may be deleted at the local terminal device, or if the server determines that the owner does not have a payment behavior for a long time, the server may issue an instruction to the local terminal device to delete the information of the owner so as to make full use of the storage space of the local terminal device.
Referring to fig. 2, which is a flowchart of a payment method provided in the embodiment of the present disclosure, an execution subject of the payment method may be a server, and in a specific application, the execution subject may be a cloud server. The method comprises steps S201 to S202, wherein:
s201: acquiring a comparison result sent by local terminal equipment; the comparison result is obtained by comparing the human face features to be identified of the human face picture to be identified with the pre-stored human face features of each legal user in the local human face feature library by the local terminal equipment; the legal users comprise users whose payment behaviors at the local terminal equipment meet a first preset condition;
s202: and carrying out payment operation based on the comparison result.
The server can carry out payment operation based on the comparison result sent by the local terminal device. The comparison result can be obtained by comparing the face features to be recognized of the face picture to be recognized with the pre-stored face features of each legal user in the local face feature library by the local terminal device.
The above description may be referred to for the comparison process between the face features to be recognized and the pre-stored face features in the local face feature library, and details are not repeated here. For a detailed description of a legitimate user, reference may also be made to the above description, which is not repeated herein.
In the embodiment of the present disclosure, when it is determined that the identity comparison of the local terminal device fails, the identity comparison may be performed again on the server side, and the subsequent payment operation may be performed specifically by the following steps:
step one, receiving a face picture to be recognized sent by local terminal equipment under the condition that a comparison result indicates that the comparison fails;
secondly, comparing the characteristics of the user to be paid based on the face picture to be recognized to obtain a new comparison result;
and thirdly, carrying out payment operation based on the new comparison result.
Here, the process of identity comparison on the server side may be determined based on a face library, where the face library may include face pictures of various authorized users and corresponding personal information, and is wider than the user coverage of a local face feature library in the local terminal device to some extent. The specific feature comparison method is similar and will not be described herein.
In the embodiment of the disclosure, when it is determined that the identity comparison of the local terminal device is successful, the local terminal device may send the comparison result and the account information to the server together for payment, or send the comparison result to the server only, so that the server may search the account information matched with the user to be paid from the pre-stored account information of each user based on the comparison result, perform payment operation based on the searched account information matched with the user to be paid, and perform payment operation according to the following steps:
step one, judging whether account balance pointed by account information of a user to be paid meets a preset payment amount or not, and obtaining a judgment result;
and step two, carrying out payment operation based on the judgment result.
Here, in the case that it is determined that the identity of the user to be paid is legal, a deduction application may be initiated to the account bound to the user to be paid, so that, in the case that it is determined that the balance of the account of the user to be paid is greater than the payment amount, the corresponding payment amount may be directly deducted from the account bound to the user to be paid based on the previous identity verification, so as to successfully complete the payment.
In the event that it is determined that the account balance of the user to be paid is less than the payment amount, a payment failure message may be generated to alert the payee that the user to be paid needs to pay again. In addition, all balance in the account bound by the user to be paid can be directly deducted based on the prior identity authentication, and the user can be reminded that part of the balance is unpaid.
In addition, the embodiment of the disclosure can also check the payment result by using a small image file under the condition that the identity comparison of the local terminal device is successful. That is, here, the payment result may be checked based on the face block diagram extracted from the face picture to be recognized by the payment checking instruction. The details of the checking method are not repeated herein, and reference may be made to the above description.
In order to better serve the local terminal device, there is a need for information addition and information deletion between the server and the local terminal device in the embodiment of the present disclosure, and the following two aspects can be further explained.
In a first aspect: the information addition can be carried out according to the following steps:
step one, acquiring payment behavior data generated by a historical payment user in local terminal equipment; the payment behavior data comprises payment frequency and/or payment times;
step two, generating a user characteristic storage instruction pointing to a historical payment user under the condition that the payment behavior data meet a second preset condition;
and step three, sending a user characteristic storage instruction to the local terminal equipment, wherein the user characteristic storage instruction is used for indicating the local terminal equipment to synchronize the information of the historical payment user.
The second preset condition may be that the payment frequency is higher than the preset frequency and the payment number is greater than the preset number. That is, in the case that the server determines that some users pay frequently at the local terminal device, the information (for example, a face picture or personal information) of the users is automatically synchronized to the terminal device, so as to improve the comparison speed.
In a second aspect: the information deletion can be performed according to the following steps:
step one, generating a characteristic deleting instruction pointing to a historical payment user under the condition that payment behavior data meet a third preset condition;
and step two, sending a characteristic deleting instruction to the local terminal equipment, wherein the characteristic deleting instruction is used for indicating the local terminal equipment to delete the information of the historical payment user.
The third preset condition may be that the payment frequency is lower than or equal to the preset frequency, and the payment number is less than or equal to the preset number, and besides, the third preset condition may be that the payment duration from the current time exceeds the preset duration. That is, the present disclosure may be that, in the case where the server determines that some user does not pay at the local terminal device for a long time and the user is at the local terminal device, the information of the user is deleted from the local terminal device, so as to maintain a relatively fixed data size locally and ensure that the storage space of the local terminal device is sufficiently used.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Based on the payment method for the local terminal device and the server provided by the above embodiment, the embodiment of the present disclosure further provides a payment system, as shown in fig. 3, the payment system implements feature comparison of the local terminal device and payment at the server side through communication connection between the local terminal device and the server, and for specific implementation processes of the local terminal device and the server, reference is made to the above description, and details are not repeated here.
Based on the same inventive concept, a payment device corresponding to the payment method is also provided in the embodiments of the present disclosure, and as the principle of solving the problem of the device in the embodiments of the present disclosure is similar to the payment method described above in the embodiments of the present disclosure, the implementation of the device may refer to the implementation of the method, and repeated details are not repeated.
Referring to fig. 4, a schematic diagram of a payment apparatus provided in an embodiment of the present disclosure is shown, the apparatus including: a response module 401, a reading module 402, a comparison module 403 and a sending module 404; wherein the content of the first and second substances,
the response module 401 is configured to respond to the payment request, acquire a to-be-recognized face picture of the to-be-paid user, and extract a to-be-recognized face feature of the to-be-recognized face picture;
a reading module 402, configured to read pre-stored face features of each valid user in a local face feature library; the legal users comprise users who meet a preset condition first in the payment behavior of the local terminal equipment;
a comparison module 403, configured to compare the pre-stored face features with the face features to be recognized, and determine a comparison result;
a sending module 404, configured to send the comparison result to a server, where the server is configured to pay according to the comparison result.
By adopting the payment device, under the condition of responding to a payment request, the face features to be recognized can be extracted based on the acquired face pictures to be recognized of the users to be paid, so that under the condition of reading the prestored face features of each legal user in the local face feature library, the face features to be recognized and the prestored face features can be compared, and the comparison result is sent to the server so that the server can complete the payment process based on the comparison result. The local terminal equipment in the disclosure can utilize the local human face feature library to compare features, so that the server only needs to realize payment operation based on comparison results, especially, the local terminal equipment is more and has a plurality of payment requirements, each local terminal equipment can automatically compare features without queuing at the server, and the payment efficiency is obviously improved.
In a possible implementation manner, the reading module 402 is further configured to:
responding to a payment request, and receiving a registration request of a first user initiated on local terminal equipment before acquiring a face picture to be recognized of a user to be paid;
responding to the registration request, and acquiring a plurality of first facial pictures of the first user;
inputting a plurality of first face pictures into a face quality detection model to obtain a face quality detection result;
according to the face quality detection result, determining a target face picture with the highest quality score from a plurality of first face pictures, and extracting first face features from the target face picture;
and creating a local face feature library according to the first face features, wherein the pre-stored face features comprise the first face features.
In a possible implementation manner, the reading module 402 is further configured to:
after receiving a registration request of a first user initiated on local terminal equipment, acquiring identity identification information of the first user;
judging whether the first user has the authority of registering on the local terminal equipment or not based on the identity identification information;
if the first user has the authority of registering on the local terminal equipment, determining that the first user is a legal user, responding to a registration request, and acquiring a plurality of first facial pictures of the first user;
after extracting the first face features from the target face picture, judging whether the daily place of the first user is consistent with the geographical position of the local terminal equipment;
and if the daily place of the first user is consistent with the geographical position of the local terminal equipment, creating a local face feature library according to the first face feature.
In a possible implementation manner, the reading module 402 is further configured to:
receiving a user characteristic storage instruction sent by a server; the user feature storage instruction comprises at least one second face feature of a second user, and the second user is a user with payment behavior data on the local terminal equipment meeting a second preset condition; the payment behavior data comprises payment frequency and/or payment times;
and storing the second face features into a local face feature library.
In a possible implementation manner, the reading module 402 is further configured to:
after receiving a user feature storage instruction sent by a server, judging whether the current residual storage capacity of a local face feature library is larger than or equal to the data capacity of a second face feature;
if the current residual storage capacity of the local face feature library is larger than or equal to the data capacity of the second face feature, storing the second face feature into the local face feature library; or the like, or, alternatively,
and if the current residual storage capacity of the local face feature library is smaller than the data volume of the second face feature, deleting part of face features from the local face feature library according to a second preset condition, and storing the second face features into the local face feature library.
In a possible implementation, the reading module 402 is configured to create a local face feature library according to the first face feature according to the following steps:
determining a user type to which a first user belongs;
clustering the first face features according to the user types to obtain a plurality of classification groups;
creating a feature sub-library for each classification group;
and constructing a local face feature library according to the plurality of feature sub-libraries.
In a possible implementation manner, the comparing module 403 is configured to compare a pre-stored face feature with a face feature to be recognized, and determine a comparison result according to the following steps:
determining a feature sub-library corresponding to the face features to be recognized based on the user type of the user to be paid;
determining the similarity between the human face features to be recognized and each prestored human face feature in the determined feature sub-library;
determining that the comparison is successful under the condition that legal users with the similarity larger than a preset threshold exist in the feature sub-library; and determining that the comparison fails under the condition that no legal user with the similarity larger than a preset threshold value exists in the feature sub-library.
In a possible implementation manner, when a plurality of legal users with similarity degrees larger than a preset threshold exist in the feature sub-library; the comparing module 403 is further configured to:
obtaining portrait description characteristics of a plurality of legal users;
respectively constructing user portraits for a plurality of legal users based on the acquired portraits description characteristics;
and comparing the user images corresponding to the plurality of legal users with the user images of the users to be paid, and selecting the legal user with the highest user image matching degree from the plurality of legal users as the legal user with successful comparison.
In a possible implementation manner, the reading module 402 is further configured to:
receiving a characteristic deleting instruction which is sent by the server and aims at least one third user; the third user is a user whose payment behavior data meet a third preset condition; the payment behavior data comprises payment frequency and/or payment times;
and deleting the face features of the third user from the local face feature library to obtain an updated local face feature library.
In a possible implementation manner, the sending module 404 is further configured to:
under the condition that the comparison result indicates that the comparison is successful, acquiring account information of the user to be paid and a face block diagram corresponding to the face picture to be recognized;
sending the comparison result, the account information and the face block diagram to a server; the server is used for carrying out payment based on the comparison result and the account information and checking the payment result based on the face diagram.
In a possible implementation manner, the sending module 404 is further configured to:
sending a feature comparison request carrying a face picture to be recognized to a server under the condition that the comparison result indicates that the comparison is failed, wherein the feature comparison request is used for requesting the server to perform feature comparison based on the face picture to be recognized, and triggering the server to perform payment operation under the condition that the server comparison is successful;
and receiving payment success information returned by the server after the payment operation is completed.
Referring to fig. 5, a schematic diagram of another payment apparatus provided in the embodiment of the present disclosure is shown, the apparatus including: an acquisition module 501 and a payment module 502; wherein the content of the first and second substances,
an obtaining module 501, configured to obtain a comparison result sent by a local terminal device; the comparison result is obtained by comparing the human face features to be identified of the human face picture to be identified with the pre-stored human face features of each legal user in the local human face feature library by the local terminal equipment; the legal users comprise users whose payment behaviors at the local terminal equipment meet a first preset condition;
a payment module 502, configured to perform a payment operation based on the comparison result.
By adopting the payment device, the payment operation can be carried out based on the comparison result sent by the local terminal equipment, the local terminal equipment can utilize the local human face feature library to carry out feature comparison, so that the server only needs to realize the payment operation based on the comparison result, particularly, the local terminal equipment is more and has a plurality of payment requirements, each local terminal equipment can carry out the feature comparison by itself, the server does not need to queue for comparison, and the payment efficiency is obviously improved.
In a possible implementation, the payment module 502 is configured to perform a payment operation based on the comparison result according to the following steps:
receiving a face picture to be recognized sent by local terminal equipment under the condition that the comparison result indicates that the comparison fails;
comparing the characteristics of the user to be paid based on the face picture to be recognized to obtain a new comparison result;
and carrying out payment operation based on the new comparison result.
In a possible embodiment, the above apparatus further comprises:
a synchronization module 503, configured to obtain payment behavior data generated by a historical payment user in a local terminal device; the payment behavior data comprises payment frequency and/or payment times; under the condition that the payment behavior data meet a second preset condition, generating a user characteristic storage instruction pointing to a historical payment user; and sending a user characteristic storage instruction to the local terminal equipment, wherein the user characteristic storage instruction is used for indicating the local terminal equipment to synchronize the information of the historical payment user.
In a possible embodiment, the above apparatus further comprises:
a deleting module 504, configured to generate a feature deleting instruction pointing to a historical payment user when the payment behavior data meets a third preset condition; and sending a characteristic deleting instruction to the local terminal equipment, wherein the characteristic deleting instruction is used for indicating the local terminal equipment to delete the information of the historical payment user.
In a possible implementation, the obtaining module 501 is further configured to:
receiving a human face block diagram sent by local terminal equipment; the face block diagram is an image of a face part corresponding to the indication of the user to be paid in the face picture to be recognized under the condition that the comparison result indicates that the comparison is successful;
and responding to the payment checking instruction, and checking the payment result based on the face block diagram.
In a possible implementation, the payment module 502 is configured to perform a payment operation based on the comparison result according to the following steps:
under the condition that the comparison result indicates that the comparison is successful, searching account information matched with the user to be paid from prestored account information of each user based on the comparison result;
and carrying out payment operation based on the found account information matched with the user to be paid.
The description of the processing flow of each module in the device and the interaction flow between the modules may refer to the related description in the above method embodiments, and will not be described in detail here.
An embodiment of the present disclosure further provides an electronic device, as shown in fig. 6, which is a schematic structural diagram of the electronic device provided in the embodiment of the present disclosure, and the electronic device includes: a processor 601, a memory 602, and a bus 603. The memory 602 stores machine-readable instructions executable by the processor 601 (for example, execution instructions corresponding to the response module 401, the reading module 402, the comparing module 403, the sending module 404, and the like in the apparatus in fig. 4), when the electronic device is operated, the processor 601 and the memory 602 communicate via the bus 603, and when the processor 601 executes the following processes:
responding to the payment request, acquiring a face picture to be recognized of the user to be paid, and extracting the face feature to be recognized of the face picture to be recognized;
reading the prestored face features of each legal user in a local face feature library; the legal users comprise users whose payment behaviors at the local terminal equipment meet a first preset condition;
comparing the prestored face features with the face features to be recognized, and determining a comparison result;
and sending the comparison result to a server, wherein the server is used for paying according to the comparison result.
An embodiment of the present disclosure further provides an electronic device, as shown in fig. 7, which is a schematic structural diagram of the electronic device provided in the embodiment of the present disclosure, and the electronic device includes: a processor 701, a memory 702, and a bus 703. The memory 702 stores machine-readable instructions executable by the processor 701 (for example, execution instructions corresponding to the obtaining module 501 and the payment module 502 in the apparatus in fig. 5, and the like), when the electronic device is operated, the processor 701 and the memory 702 communicate via the bus 703, and when the machine-readable instructions are executed by the processor 701, the following processes are performed:
acquiring a comparison result sent by local terminal equipment; the comparison result is obtained by comparing the human face features to be identified of the human face picture to be identified with the pre-stored human face features of each legal user in the local human face feature library by the local terminal equipment; the legal users comprise users whose payment behaviors at the local terminal equipment meet a first preset condition;
and carrying out payment operation based on the comparison result.
The disclosed embodiments also provide a computer-readable storage medium having a computer program stored thereon, where the computer program is executed by a processor to perform the steps of the payment method described in the above method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.
The embodiments of the present disclosure also provide a computer program product, where the computer program product carries a program code, and instructions included in the program code may be used to execute the steps of the payment method described in the foregoing method embodiments, which may be referred to specifically for the foregoing method embodiments, and are not described herein again.
The computer program product may be implemented by hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.