CN113837765A - Payment verification method, device, equipment and storage medium - Google Patents

Payment verification method, device, equipment and storage medium Download PDF

Info

Publication number
CN113837765A
CN113837765A CN202111139033.0A CN202111139033A CN113837765A CN 113837765 A CN113837765 A CN 113837765A CN 202111139033 A CN202111139033 A CN 202111139033A CN 113837765 A CN113837765 A CN 113837765A
Authority
CN
China
Prior art keywords
preset
dimensional code
target
character string
verified
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.)
Granted
Application number
CN202111139033.0A
Other languages
Chinese (zh)
Other versions
CN113837765B (en
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.)
China United Network Communications Group Co Ltd
Unicompay Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Unicompay 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 China United Network Communications Group Co Ltd, Unicompay Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202111139033.0A priority Critical patent/CN113837765B/en
Publication of CN113837765A publication Critical patent/CN113837765A/en
Application granted granted Critical
Publication of CN113837765B publication Critical patent/CN113837765B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • 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

Abstract

The application provides a payment verification method, a payment verification device, payment verification equipment and a storage medium. Firstly, whether the two-dimensional code to be verified accords with a preset verification rule is judged, wherein the two-dimensional code to be verified is used for payment. If the two-dimensional code to be verified conforms to the preset verification rule, target identification data are further generated according to the two-dimensional code to be verified and the first preset verification strategy, the target identification data and the two-dimensional code to be verified have the unique corresponding relation, and whether the two-dimensional code to be verified is valid or not is verified according to the target identification data and the second preset verification strategy, so that the two-dimensional code is verified. The application provides a verification means which is different from the verification means for verifying the validity of a two-dimensional code by calculating the time interval of the generation time of the two-dimensional code in the prior art, but verifies the validity of the two-dimensional code based on a preset verification strategy, and aims to provide a two-dimensional code verification means which is more favorable and can be widely used.

Description

Payment verification method, device, equipment and storage medium
Technical Field
The present application relates to the field of information technologies, and in particular, to a payment verification method, apparatus, device, and storage medium.
Background
With the rapid development of the mobile internet, the application scene of the two-dimensional code is very common. Meanwhile, with the rapid development of mobile payment technology, payment rows who carry out code scanning payment by utilizing two-dimensional codes in various industries are also visible everywhere.
In the code scanning payment behavior, in order to avoid problems of information leakage, data insecurity and the like in the payment process and ensure smooth completion of the payment behavior, the validity of the currently generated two-dimensional code is usually checked, wherein the validity of the two-dimensional code means that each two-dimensional code can only be used for completing one payment behavior, otherwise, the two-dimensional code is invalid. At present, a corresponding time interval is mainly calculated according to the generation time of the two-dimensional code, and the validity of the two-dimensional code is judged by comparing the time interval. It can be seen that the existing two-dimensional code verification method is single, and the application aspect may be limited.
Disclosure of Invention
The application provides a payment verification method, a payment verification device, payment verification equipment and a storage medium, and is used for providing a two-dimensional code verification method for a code scanning payment behavior by adopting a two-dimensional code.
In a first aspect, the present application provides a payment verification method, including:
judging whether the two-dimensional code to be verified accords with a preset verification rule or not, wherein the two-dimensional code to be verified is used for payment behaviors;
if yes, generating target identification data according to the two-dimensional code to be verified and a first preset verification strategy, wherein the target identification data and the two-dimensional code to be verified have a unique corresponding relation;
and checking whether the two-dimensional code to be checked is valid according to the target identification data and a second preset checking strategy.
In one possible design, further comprising:
if the two-dimensional code to be verified is valid, completing the payment behavior by using the two-dimensional code to be verified;
and if the two-dimensional code to be verified is invalid, generating failure prompt information, wherein the failure prompt information is used for prompting a user that the two-dimensional code to be verified is invalid.
In a possible design, the determining whether the two-dimensional code to be verified conforms to a preset verification rule includes:
judging whether the two-dimensional code format of the two-dimensional code to be verified conforms to the preset verification rule or not;
judging whether the length of the two-dimensional code to be verified accords with the preset verification rule or not;
judging whether the prefix character string length of the two-dimensional code to be verified accords with the preset verification rule or not;
and if the two-dimension code format, the two-dimension code length and the prefix character string length all accord with the preset check rule, determining that the two-dimension code to be checked accords with the preset check rule.
In a possible design, the generating target identification data according to the two-dimensional code to be verified and a first preset verification policy includes:
obtaining an intermediate code character string according to the two-dimensional code to be verified and a preset two-dimensional code length;
generating a target code character string according to the intermediate code character string and a preset random transcoding operation;
generating a target payment identification character string and a target key character string according to the target code character string and a preset large integer algorithm, wherein the target identification data comprises the target payment identification character string and the target key character string;
the first preset verification strategy comprises the preset two-dimensional code length, the preset random transcoding operation and the preset large integer algorithm.
In one possible design, verifying whether the two-dimensional code to be verified is valid according to the target identification data and a second preset verification strategy includes:
inquiring a preset information table according to the target payment identification character string;
if a payment record character string and a user character string which are uniquely corresponding to the target payment identification character string are obtained in the preset information table, determining that the two-dimensional code to be verified is a target two-dimensional code;
verifying whether the target two-dimensional code is valid or not according to the target two-dimensional code and a preset one-time password algorithm;
the second preset verification strategy comprises the preset information table and the preset one-time password algorithm.
In a possible design, the verifying whether the target two-dimensional code is valid according to the target two-dimensional code and a preset one-time password algorithm includes:
generating a target character string according to the payment record character string, the target payment identification character string and the target base number character string;
performing preset encryption operation on the target character string to generate an encrypted character string;
verifying whether the target two-dimensional code is valid or not by utilizing a preset verifier, the encrypted character string and the target key character string;
the preset one-time password algorithm comprises the preset encryption operation and the preset verifier.
In a possible design, if a payment record character string or a user character string uniquely corresponding to the target payment identification character string is not acquired in the preset information table, it is determined that the two-dimensional code to be verified is not the target two-dimensional code.
In a possible design, before the verifying whether the target two-dimensional code is valid according to the target two-dimensional code and a preset one-time password algorithm, the method further includes:
obtaining the target radix character string according to the target two-dimensional code and a preset radix operation rule;
the second preset verification strategy further comprises the preset radix operation rule.
In one possible design, the obtaining the target radix character string according to the target two-dimensional code and a preset radix operation rule includes:
acquiring a preset last digit of the target two-dimensional code, and acquiring a random digit according to the preset last digit;
obtaining a target number according to the random number and the length of a preset array, and obtaining a preset numerical value corresponding to the target number in the preset array so as to perform preset product operation on the preset numerical value and the random number to obtain a product result;
and obtaining the target radix character string according to the product result and a preset splicing rule, wherein the preset radix operation rule comprises the preset splicing rule.
In a second aspect, the present application provides a payment verification apparatus, comprising:
the judging module is used for judging whether the two-dimensional code to be verified accords with a preset verifying rule or not, and the two-dimensional code to be verified is used for payment;
the generating module is used for generating target identification data according to the two-dimensional code to be verified and a first preset verification strategy if the two-dimensional code to be verified is in the valid state, wherein the target identification data and the two-dimensional code to be verified have a unique corresponding relation;
and the checking module is used for checking whether the two-dimensional code to be checked is valid according to the target identification data and a second preset checking strategy.
In one possible design, the payment verification apparatus further includes: a processing module; the processing module is configured to:
if the two-dimensional code to be verified is valid, completing the payment behavior by using the two-dimensional code to be verified;
and if the two-dimensional code to be verified is invalid, generating failure prompt information, wherein the failure prompt information is used for prompting a user that the two-dimensional code to be verified is invalid.
In a possible design, the determining module is specifically configured to:
judging whether the two-dimensional code format of the two-dimensional code to be verified conforms to the preset verification rule or not;
judging whether the length of the two-dimensional code to be verified accords with the preset verification rule or not;
judging whether the prefix character string length of the two-dimensional code to be verified accords with the preset verification rule or not;
and if the two-dimension code format, the two-dimension code length and the prefix character string length all accord with the preset check rule, determining that the two-dimension code to be checked accords with the preset check rule.
In one possible design, the generating module is specifically configured to:
obtaining an intermediate code character string according to the two-dimensional code to be verified and a preset two-dimensional code length;
generating a target code character string according to the intermediate code character string and a preset random transcoding operation;
generating a target payment identification character string and a target key character string according to the target code character string and a preset large integer algorithm, wherein the target identification data comprises the target payment identification character string and the target key character string;
the first preset verification strategy comprises the preset two-dimensional code length, the preset random transcoding operation and the preset large integer algorithm.
In one possible design, the verification module includes:
the query module is used for querying a preset information table according to the target payment identification character string;
the first verification sub-module is used for determining that the two-dimensional code to be verified is the target two-dimensional code if the payment record character string and the user character string which are uniquely corresponding to the target payment identification character string are obtained in the preset information table;
the second checking submodule is used for checking whether the target two-dimensional code is valid or not according to the target two-dimensional code and a preset one-time password algorithm;
the second preset verification strategy comprises the preset information table and the preset one-time password algorithm.
In one possible design, the second check sub-module is specifically configured to:
generating a target character string according to the payment record character string, the target payment identification character string and the target base number character string;
performing preset encryption operation on the target character string to generate an encrypted character string;
verifying whether the target two-dimensional code is valid or not by utilizing a preset verifier, the encrypted character string and the target key character string;
the preset one-time password algorithm comprises the preset encryption operation and the preset verifier.
In one possible design, the first check submodule is further configured to:
and if the payment record character string or the user character string uniquely corresponding to the target payment identification character string is not acquired in the preset information table, determining that the two-dimensional code to be verified is not the target two-dimensional code.
In one possible design, the generating module is further configured to:
obtaining the target radix character string according to the target two-dimensional code and a preset radix operation rule;
the second preset verification strategy further comprises the preset radix operation rule.
In one possible design, the generating module is further specifically configured to:
acquiring a preset last digit of the target two-dimensional code, and acquiring a random digit according to the preset last digit;
obtaining a target number according to the random number and the length of a preset array, and obtaining a preset numerical value corresponding to the target number in the preset array so as to perform preset product operation on the preset numerical value and the random number to obtain a product result;
and obtaining the target radix character string according to the product result and a preset splicing rule, wherein the preset radix operation rule comprises the preset splicing rule.
In a third aspect, the present application provides an electronic device, comprising:
a processor; and the number of the first and second groups,
a memory for storing a computer program for the processor;
wherein the processor is configured to perform any one of the possible payment verification methods provided by the first aspect via execution of the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements any one of the possible payment verification methods provided by the second aspect.
In a fifth aspect, the present application further provides a computer program product comprising a computer program which, when executed by a processor, implements any one of the possible payment verification methods provided by the first aspect.
The application provides a payment verification method, a payment verification device, payment verification equipment and a storage medium. Firstly, whether the two-dimensional code to be verified accords with a preset verification rule is judged, wherein the two-dimensional code to be verified is used for payment. If the two-dimensional code to be verified conforms to the preset verification rule, target identification data are further generated according to the two-dimensional code to be verified and the first preset verification strategy, the target identification data and the two-dimensional code to be verified have the unique corresponding relation, and whether the two-dimensional code to be verified is valid or not is verified according to the target identification data and the second preset verification strategy, so that the two-dimensional code is verified. The application provides a verification means which is different from the verification means for verifying the validity of a two-dimensional code by calculating the time interval of the generation time of the two-dimensional code in the prior art, but verifies the validity of the two-dimensional code based on a preset verification strategy, and aims to provide a two-dimensional code verification means which is more favorable and can be widely used.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a payment verification method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another payment verification method provided in the embodiment of the present application;
fig. 4 is a schematic flowchart of another payment verification method provided in an embodiment of the present application;
fig. 5 is a schematic flowchart of another payment verification method provided in the embodiment of the present application;
fig. 6 is a schematic flowchart of another payment verification method provided in the embodiment of the present application;
fig. 7 is a schematic structural diagram of a payment verification apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of methods and apparatus consistent with certain aspects of the present application, as detailed in the appended claims.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the above-described drawings (if any) are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The code scanning payment behavior performed by the two-dimensional code is visible everywhere, so that the problems of information leakage, data insecurity and the like in the payment process are avoided, and the payment behavior is guaranteed to be completed smoothly, the validity of the currently generated two-dimensional code is generally checked, wherein the validity of the two-dimensional code means that each two-dimensional code can only be used for completing one payment behavior, and otherwise, the two-dimensional code is invalid. At present, a corresponding time interval is mainly calculated according to the generation time of the two-dimensional code, and the validity of the two-dimensional code is judged by comparing the time interval. And as the number of code scanning payment behaviors is increased day by day, the verification of the validity of the two-dimensional code is very important. However, the existing two-dimensional code verification method is single, and the application aspect may be limited.
In view of the above problems in the prior art, the present application provides a payment verification method, apparatus, device and storage medium. The invention concept of the payment verification method provided by the application is as follows: firstly, whether the two-dimensional code to be verified accords with a preset verification rule is judged, and the validity of the two-dimensional code to be verified is further verified according to a preset corresponding verification strategy under the condition of confirming the conformity so as to judge whether the two-dimensional code to be verified is valid. The preset check rule is used for primarily judging whether the two-dimensional code to be checked is the target two-dimensional code, and the target two-dimensional code can be understood as a two-dimensional code authenticated by the target application program, in other words, the target two-dimensional code is only suitable for code scanning payment behaviors of the target application program. And in the preset corresponding verification strategy verification process, for example, the verification process of the first preset verification strategy and the second preset verification strategy, further judgment on whether the two-dimensional code to be verified is the target two-dimensional code is completed, and the validity of the two-dimensional code to be verified which is judged as the target two-dimensional code is verified. Therefore, the payment verification method is accurate, the application scene is not limited, and the verification process is completely different from that of the payment verification method in the prior art.
An exemplary application scenario of the embodiments of the present application is described below.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application, as shown in fig. 1, a terminal device 11 may run a target application program, a user may obtain a corresponding application service provided by the user through the target application program, the target application program supports a two-dimensional code scanning payment behavior, and the two-dimensional code target application program is generated. When a user uses a two-dimensional code generated by a target application program to perform code scanning payment, the validity of the two-dimensional code needs to be verified, and the two-dimensional code can be defined as a two-dimensional code to be verified. The processor of the electronic device 12 is configured in the corresponding backend service of the target application to control the target application to complete the corresponding service provided by the target application. Therefore, the processor of the electronic device 12 is configured to execute the payment verification method provided in the embodiment of the present application to verify the two-dimensional code to be verified, so as to ensure that the terminal device 11 can smoothly and safely complete the current code scanning payment behavior.
It should be noted that the terminal device 11 may be any terminal, such as a smart phone, a tablet computer, a smart watch, or other wearable smart devices, which supports a code scanning payment behavior of a corresponding target application program. The electronic device 12 may be a computer, a server, or a server cluster, and the embodiment of the present application is not limited thereto. The terminal device 11 in fig. 1 is illustrated as a smartphone, and the electronic device 12 is illustrated as a computer.
It should be noted that the above application scenarios are only exemplary, and the payment verification method, apparatus, device and storage medium provided in the embodiments of the present application include, but are not limited to, the above application scenarios.
Fig. 2 is a schematic flow chart of a payment verification method according to an embodiment of the present application. As shown in fig. 2, the payment verification method provided in the embodiment of the present application includes:
s101: and judging whether the two-dimensional code to be verified conforms to a preset verification rule.
The two-dimensional code to be verified is used for payment.
For example, the target application needs to complete a code scanning payment behavior, and thus generates a two-dimensional code required by the code scanning payment behavior, where the two-dimensional code is a two-dimensional code to be verified, that is, a payment behavior of the two-dimensional code to be verified for code scanning payment. And judging whether the two-dimensional code to be verified accords with a preset verification rule or not.
The preset check rule may include some preset check rules such as a two-dimensional code format, a two-dimensional code length, a prefix character string length, and the like, so as to perform preliminary judgment on whether the two-dimensional code to be checked is generated by the target application program and whether the two-dimensional code to be checked is only used for code scanning payment of the target application program.
For example, the two-dimensional code format may be preset as a mathematical string; the length of the two-dimensional code can be 19 bits, 20 bits and the like; for example, the prefix string of 19 bits of the two-dimensional code is preset to 331 or 332, the prefix string length is 3, the prefix string of 20 bits of the two-dimensional code is 33, the prefix string length is 2, the prefix string of 20 bits of the two-dimensional code is 4 when the prefix string of 20 bits of the two-dimensional code is 1033, and the prefix string length is 3 in other cases. It should be understood that, in an actual working condition, specific contents of a two-dimensional code format, a two-dimensional code length, and a prefix character string length in a preset check rule may be set according to an actual situation, and the listed preset check rule may include, but is not limited to, the two-dimensional code format, the two-dimensional code length, the prefix character string length, and the like.
In one possible design, possible implementations of step S103 include:
judging whether the two-dimensional code format of the two-dimensional code to be verified conforms to a preset verification rule or not;
judging whether the length of the two-dimensional code to be verified conforms to a preset verification rule or not;
and judging whether the prefix character string length of the two-dimensional code to be verified accords with a preset verification rule or not.
And judging the two-dimensional codes to be verified one by one according to specific contents included in the preset verification rule so as to determine whether the two-dimensional codes conform to the preset verification rule. According to the embodiment of the application, the two-dimensional code to be verified conforms to or is consistent with the specific content included in the preset verification rule.
After the two-dimensional code to be verified is judged through the steps, if the judgment result is that the two-dimensional code to be verified all accords with the preset verification rule, namely, if the two-dimensional code format, the two-dimensional code length and the prefix character string length all accord with the preset verification rule, the two-dimensional code to be verified is determined to accord with the preset verification rule.
Through judgment, the two-dimensional code format of the two-dimensional code to be verified, the two-dimensional code length of the two-dimensional code to be verified and the prefix character string length of the two-dimensional code to be verified all accord with preset verification rules, and then the two-dimensional code to be verified can be determined to accord with the preset verification rules.
On the contrary, if at least one of the two-dimensional code format of the two-dimensional code to be verified, the two-dimensional code length of the two-dimensional code to be verified and the prefix character string length of the two-dimensional code to be verified does not conform to the preset verification rule, it can be determined that the two-dimensional code to be verified does not conform to the preset verification rule.
According to the payment verification method provided by the embodiment of the application, whether the two-dimensional code to be verified is the target two-dimensional code or not is preliminarily judged through the preset verification rule, so that the accuracy of follow-up validity verification is favorably improved, and the safety of the two-dimensional code to be verified in payment behaviors is further improved.
S102: and if so, generating target identification data according to the two-dimensional code to be verified and a first preset verification strategy.
The target identification data and the two-dimensional code to be verified have a unique corresponding relation.
If the two-dimensional code to be verified is judged to be in accordance with the preset verification rule, namely the judgment result is yes, target identification data are further generated according to the two-dimensional code to be verified and the first preset verification strategy, wherein the target identification data and the two-dimensional code to be verified which is in accordance with the preset verification rule have a unique corresponding relation, and the unique corresponding relation can be understood that the two-dimensional code to be verified obtains the target identification data which is uniquely corresponding to the two-dimensional code to be verified after corresponding operation in the first preset verification strategy.
Otherwise, if the two-dimensional code to be verified does not accord with the preset verification rule, namely the judgment result is negative, the two-dimensional code to be verified is indicated to be a non-target two-dimensional code. At this time, a corresponding prompt message may be generated to feed back whether the determination result is negative.
The first preset verification strategy is used for correspondingly operating the two-dimensional code to be verified which accords with the preset verification rule so as to generate target identification data. Wherein the corresponding operation is the specific content of the preset first preset verification strategy. For example, the first predetermined verification strategy may include a predetermined two-dimensional code length, a predetermined random transcoding operation, and a predetermined large integer algorithm.
In a possible design, a possible implementation manner of step S102 is shown in fig. 3, and fig. 3 is a schematic flow chart of another payment verification method provided in this embodiment of the present application. As shown in fig. 3, the embodiment of the present application includes:
s1021: and obtaining an intermediate code character string according to the two-dimensional code to be verified and the preset length of the two-dimensional code.
And intercepting the two-dimensional code to be verified according to the length of the preset two-dimensional code aiming at the two-dimensional code to be verified which accords with the preset verification rule so as to obtain the intermediate code character string.
For example, the two-dimensional code to be verified conforming to the preset verification rule is 3313058462983621028, the preset two-dimensional code length may be preset in advance, and if the preset two-dimensional code length preset in advance is from the 4 th bit to the 17 th bit, the obtained intermediate code character string is 30584629836210.
It can be understood that the specific content of the preset two-dimensional code length can be set according to the actual working condition.
S1022: and generating a target code character string according to the intermediate code character string and a preset random transcoding operation.
And after the intermediate code character string is obtained, further performing preset random transcoding operation on the intermediate code character string, determining a preset random transcoding operation result as a target code character string, namely generating the target code character string according to the intermediate code character string and the preset random transcoding operation.
The preset random transcoding operation can be understood as an inversion operation on an input character string. For example, assuming that the intermediate code string is represented by a barCode, the intermediate code string is subjected to a predetermined random transcoding operation to obtain a target code string, which can be represented as "striputils. For example, the intermediate code string is 30584629836210, and the target code string obtained by performing the preset random transcoding operation on the intermediate code string is 01263892648503.
S1023: and generating a target payment identification character string and a target key character string according to the target code character string and a preset large integer algorithm.
Wherein the target identification data comprises a target payment identification string and a target key string.
After the target code character string is obtained, further, a preset large integer algorithm is carried out on the target code character string, and a result corresponding to the preset large integer algorithm is determined as a target payment identification character and a target key character string, so that target identification data are obtained.
The preset large integer class algorithm refers to a class BigInteger operation performed in Java language, and basic functions in the operation can be addition, subtraction, multiplication, division and rounding, division and remainder and the like. In the embodiment of the application, the target payment identification character string and the target key character string are obtained through the preset large integer algorithm, so that the basic functions of division and rounding and division and remainder in the preset large integer algorithm can be adopted. For example, the divided integer portion may be determined as the target payout representative string and the divided remainder portion may be determined as the target key string.
For example, for the target code string 01263892648503 obtained in step S1022, performing a preset large integer algorithm on it to obtain a target identification string and a target key string, which may be represented as: the new big integer (01263892648503), divide And Remainder, the target payment identification string is 100031076, And the target key string is 3243. The target key character string may be used for input data of a predetermined one-time-password algorithm in a second predetermined verification policy in a subsequent verification step.
According to the payment verification method provided by the embodiment of the application, the corresponding specific operation in the first preset verification strategy is carried out on the to-be-verified two-dimensional code which accords with the preset verification rule, so that the target identification data is obtained. The first preset verification strategy is corresponding specific operation set according to actual working conditions, so that the target identification data obtained through the first preset verification strategy is only corresponding to the first preset verification strategy and has uniqueness, and the accuracy and the safety of subsequent validity verification are further ensured.
S103: and verifying whether the two-dimensional code to be verified is valid or not according to the target identification data and a second preset verification strategy.
And after target identification data are generated according to a first preset verification strategy, verifying the validity of the two-dimensional code to be verified, which accords with a preset verification rule, based on the target identification data and a second preset verification strategy.
The second preset verification strategy is used for carrying out corresponding operation on the target identification data so as to judge the validity of the two-dimensional code to be verified. The corresponding operation is specific content included in the second predetermined verification policy, for example, the second predetermined verification policy may include a predetermined information table and a predetermined one-time password algorithm.
For example, the preset information table is a user security information list generated when the user registers and/or logs in the target application program, and includes a target payment identification character string that can characterize the registered user and a corresponding relationship between a payment record character string of the registered user and a user character string. Once the user registers or logs in the target application program, the preset information table can be generated. The predetermined One-Time Password algorithm may be a TOTP (Time-based One-Time Password) algorithm, which is an algorithm for calculating a One-Time Password from a shared key and a current Time.
In one possible design, possible implementation steps of step S103 are shown in fig. 4. Fig. 4 is a schematic flowchart of another payment verification method according to an embodiment of the present application. As shown in fig. 4, the embodiment of the present application includes:
s1031: inquiring a preset information table according to the target payment identification character string;
s1032: if a payment record character string and a user character string which are uniquely corresponding to the target payment identification character string are obtained in a preset information table, determining that the two-dimensional code to be verified is a target two-dimensional code;
s1033: if the payment record character string or the user character string uniquely corresponding to the target payment identification character string is not acquired in the preset information table, determining that the two-dimensional code to be verified is a non-target two-dimensional code;
s1034: and checking whether the target two-dimensional code is valid or not according to the target two-dimensional code and a preset one-time password algorithm.
Firstly, a preset information table is inquired based on a target payment identification character string to judge whether a payment record character string and a user character string which are uniquely corresponding to the target payment representation character string can be acquired in the preset information table. Correspondingly, if the payment record character string and the user character string which are uniquely corresponding to the target payment identification character string are obtained in the preset information table, it is indicated that the user corresponding to the target payment identification character string is a registered user of the target application program, the two-dimensional code to be verified of the target payment identification character string is generated as the target two-dimensional code, and the validity of the two-dimensional code is further verified based on the target two-dimensional code and a preset one-time password algorithm. On the contrary, if the target payment identification character string is not obtained, that is, if the payment record character string or the user character string uniquely corresponding to the target payment identification character string is not obtained in the preset information table, it indicates that the two-dimensional code to be verified for generating the target payment identification character string may be wrong, and the two-dimensional code is not the target two-dimensional code. And after the two-dimensional code to be verified is determined to be the target two-dimensional code, whether the target two-dimensional code is valid or not is further verified based on the target two-dimensional code and a preset one-time password algorithm.
Therefore, complete judgment on whether the two-dimensional code to be verified is the target two-dimensional code can be completed, and validity of the two-dimensional code to be verified which is judged as the target two-dimensional code is verified by adopting a preset one-time password algorithm. Thereby ensure to use the security of waiting to check up the two-dimensional code and scanning a yard payment action.
For example, by querying the preset information table according to the target payment identification string 100031076, the payment record string corresponding to the target payment identification string 100031076 and the user string bbb9fc4c9489785d70ea4fe2a970afc7 and 110000016451126 are obtained. The user character string may be used to characterize the registered user corresponding to the target payment identification character string. It can be understood that, when the information related to the registered user changes, the target payment identification character string, the payment record character string, the user character string, and the like corresponding to the registered user in the preset information table all change. Information related to the registered user such as a login IP address of the registered user, a login client, etc.
In one possible design, possible implementation steps of step S1034 are shown in fig. 5. Fig. 5 is a schematic flowchart of another payment verification method according to an embodiment of the present application. As shown in fig. 5, the embodiment of the present application includes:
s201: generating a target character string according to the payment record character string, the target payment identification character string and the target base number character string;
s202: carrying out preset encryption operation on the target character string to generate an encrypted character string;
s203: and checking whether the target two-dimensional code is valid or not by using a preset verifier, the encryption character string and the target key character string.
The preset one-time password algorithm comprises a preset encryption operation and a preset verifier.
A target string is generated based on the payment record string, the target payment identification string, and the target base string. And the target radix character string is an operation result obtained according to the target two-dimensional code and a preset radix operation rule in a second preset verification strategy. Specifically, in order to ensure the uniqueness of the target character string generated in this step, in the generated target character string, the user payment character string and the payment instrument serial number corresponding to the target payment identification character string are obtained according to the target payment identification character string, and the user payment character string and the payment instrument serial number are adopted to replace the target payment identification character string to generate the target character string.
For example, the first 8-digit string of the user payment character string as the target payment identification character string and the payment instrument serial number as the last 1-digit number of the target payment identification character string are preset in advance. If the target payment identification string is 100031076, the user payment string and the payment instrument number obtained from the target payment string are 10003107 and 6, respectively.
The method for generating the target character string may be, for example, sequentially splicing corresponding character strings, for example, sequentially splicing the target base number character string, the payment record character string, the user payment character string, and the payment instrument serial number, where the spliced character string is the target character string. Specifically, for example, the target base character string 12635, the payment record character string bbb9fc4c9489785d70ea4fe2a970afc7, the user payment character string 10003107 and the payment instrument number 6 are sequentially spliced, and the obtained bbb9fc4c9489785d70ea4fe2a970afc712635100031076 is the target character string.
And carrying out preset encryption operation on the obtained target character string to generate an encrypted character string. Assuming that the key represents the target character string and the secret represents the encrypted character string generated by the key, performing the preset encryption operation to generate the encrypted character string may be expressed as performing str2HexStr (digestutils, md5hex (key)) operation on the key to obtain the secret. Wherein, digestutils.md5hex represents the preset encryption operation adopted in the step. In an actual working condition, the preset encryption operation may be another encryption operation, which is not limited in this embodiment.
And after the encrypted character string is obtained, further checking whether the target two-dimensional code is valid by using a preset verifier, the encrypted character string and the target key character string in the target identification data obtained in the previous step. For example, the pre-set verifier may be implemented by calling a google authenticator. authority in google authenticator. Assuming that the target key string is 3243, it is able to verify whether the target two-dimensional code is valid by executing the google authentication. It is understood that the input of the preset verifier is an encryption character string and a target key character string, and the output is valid or invalid. When the target two-dimensional code is valid, the output is valid, and when the target two-dimensional code is invalid, the output is invalid. And finishing the process of verifying whether the target two-dimensional code is effective or not.
As can be seen from the above description of the embodiment, a preset one-time password algorithm, such as a TOTP algorithm, including a preset encryption operation and a preset verifier is used to verify whether the target two-dimensional code is valid. In the embodiment of the present application, the target character string and the target key character string used in the verification process by using the predetermined one-time password algorithm are generated according to the corresponding operations set in the first predetermined verification policy and the second predetermined verification policy proposed in the embodiment of the present application. Therefore, the target character string and the target key character string generated in the payment verification method provided by the embodiment of the application are exclusive and unique, exclusive data are provided for the payment verification process to be performed when the target application program performs the code scanning payment behavior, and the specificity of the data used for the payment verification is guaranteed.
And completing the payment verification process through the steps, and if the verification result is that the target two-dimensional code is valid, executing the step S104. Otherwise, if the verification result is that the target two-dimensional code is invalid, step S105 is executed.
S104: and if the two-dimension code to be verified is effective, completing the payment behavior by using the two-dimension code to be verified.
S105: and if the two-dimensional code to be verified fails, generating failure prompt information.
And the failure prompt information is used for prompting the user that the two-dimensional code to be verified fails.
And when the verification result is that the target two-dimensional code is valid, the fact that the two-dimensional code to be verified generated by the user in the target application program is valid is indicated, and then the current payment behavior is completed by using the two-dimensional code to be verified. Otherwise, when the verification result is that the target two-dimensional code is invalid, it is indicated that the two-dimensional code to be verified generated by the user in the target application program is invalid, the two-dimensional code to be verified cannot complete the payment behavior, invalidation prompt information can be generated and fed back to the user terminal to prompt the user that the two-dimensional code to be verified is invalid, and the user can regenerate the two-dimensional code to be verified in the target application program.
The payment verification method provided by the embodiment of the application firstly judges whether the two-dimensional code to be verified accords with a preset verification rule, wherein the two-dimensional code to be verified is used for payment. If the two-dimensional code to be verified conforms to the preset verification rule, target identification data are further generated according to the two-dimensional code to be verified and the first preset verification strategy, the target identification data and the two-dimensional code to be verified have the unique corresponding relation, and whether the two-dimensional code to be verified is valid or not is verified according to the target identification data and the second preset verification strategy, so that the two-dimensional code is verified. The embodiment of the application provides a verification means for verifying the validity of the two-dimensional code by calculating the time interval of the generation time of the two-dimensional code, which is different from the verification means for verifying the validity of the two-dimensional code by calculating the time interval of the generation time of the two-dimensional code in the prior art, but verifies the validity of the two-dimensional code based on a preset verification strategy of the two-dimensional code.
As described in the foregoing embodiment, the target radix character string used in generating the target character string is an operation result obtained according to the target two-dimensional code and according to the preset radix operation rule in the second preset verification policy. Therefore, before step S1034, the payment verification method provided in the embodiment of the present application further includes obtaining the target radix character string according to the target two-dimensional code and the preset radix operation rule, where the second preset verification policy further includes the preset technical operation rule.
In one possible design, a possible implementation manner of obtaining the target radix character string according to the target two-dimensional code and the preset radix operation rule is shown in fig. 6. Fig. 6 is a schematic flowchart of another payment verification method according to an embodiment of the present application. As shown in fig. 6, the embodiment of the present application includes:
s301: acquiring a preset last digit of the target two-dimensional code, and acquiring a random digit according to the preset last digit;
s302: obtaining a target number according to the random number and the length of a preset array, and obtaining a preset numerical value corresponding to the target number in the preset array so as to perform preset product operation on the preset numerical value and the random number to obtain a product result;
s303: and obtaining a target base number character string according to the product result and a preset splicing rule.
The preset radix operation rule comprises a preset splicing rule.
And acquiring a preset last digit of the target two-dimensional code, and then obtaining a random digit according to the preset last digit. For example, the two-dimensional code 3313058462983621028 to be verified in the foregoing embodiment has been determined to be the target two-dimensional code, that is, the target two-dimensional code is 3313058462983621028, assuming that the preset last digit refers to the last two preset digits, the preset last digit of the target two-dimensional code 3313058462983621028 is 28, and further, the random digit obtained according to the preset last digit is the digit 82 obtained by exchanging the preset last digit 28 according to the digit position exchange principle. It is understood that the preset last digit and the corresponding rule followed by obtaining the random number according to the preset last digit can be set according to the actual working condition, and the above description is only illustrative.
And after the random number is obtained, obtaining a target number according to the random number and the length of the preset array. The preset array is a set of data set in advance, and the length of the set of data refers to the number of different data included in the preset array. For example, if the length of the preset array is 6, it indicates that 6 preset values constitute the preset array. The 6 preset values may be set according to actual conditions, and this real-time example is not limited. The target number is obtained according to the random number and the length of the preset array, which may be dividing the random number by the length of the preset array, and determining the obtained remainder as the target number. For example, if the remainder of division of the random number 82 by the length 6 of the predetermined array is 4, the target number is 4.
Further, a preset numerical value corresponding to the target number in the preset array is obtained. For example, the target number is 4, and the 4 th preset value in the preset array is obtained. And then, carrying out preset product operation on the preset numerical value and the random number to obtain a product result. And further splicing the left side of the obtained product result into a character string 1, then intercepting the left 5 bits of the spliced character string, and determining the intercepted character string as a target base number character string, for example, the target base number character string is 12635. The preset splicing rule may be the corresponding rules such as the left-side splicing character string 1 described above and intercepting the left 5 bits of the character string, so as to obtain the target radix character string based on the preset radix operation rule. It is understood that the corresponding contents in the preset radix operation rule can be set according to the actual working conditions, and the above description is only an illustrative example.
According to the payment verification method provided by the embodiment of the application, before whether the target two-dimensional code is valid or not is verified according to the target two-dimensional code and the preset one-time password algorithm, the target radix character string is obtained according to the target two-dimensional code and the preset radix operation rule in the second preset verification strategy. The specific content of the preset radix operation rule is used for obtaining the target radix character string uniquely corresponding to the target two-dimensional code based on the target two-dimensional code, and then the target character string is obtained by using the target radix character string, so that the target character string uniquely corresponding to the target two-dimensional code is generated, and the validity check of the target two-dimensional code is favorably completed.
Fig. 7 is a schematic structural diagram of a payment verification apparatus according to an embodiment of the present application. As shown in fig. 7, the payment verification apparatus 400 provided in the embodiment of the present application includes:
the determining module 401 is configured to determine whether the two-dimensional code to be verified conforms to a preset verification rule.
The two-dimensional code to be verified is used for payment.
And a generating module 402, configured to generate target identification data according to the two-dimensional code to be verified and a first preset verification policy if yes.
The target identification data and the two-dimensional code to be verified have a unique corresponding relation.
The checking module 403 is configured to check whether the two-dimensional code to be checked is valid according to the target identification data and a second preset checking policy.
In one possible design, the payment verification apparatus 400 further includes: and a processing module. A processing module to:
if the two-dimensional code to be verified is valid, completing payment by using the two-dimensional code to be verified;
and if the two-dimensional code to be verified fails, generating failure prompt information, wherein the failure prompt information is used for prompting a user that the two-dimensional code to be verified fails.
In one possible design, the determining module 401 is specifically configured to:
judging whether the two-dimensional code format of the two-dimensional code to be verified conforms to a preset verification rule or not;
judging whether the length of the two-dimensional code to be verified conforms to a preset verification rule or not;
judging whether the prefix character string length of the two-dimensional code to be verified conforms to a preset verification rule or not;
and if the two-dimension code format, the two-dimension code length and the prefix character string length all accord with the preset check rule, determining that the two-dimension code to be checked accords with the preset check rule.
In one possible design, the generating module 402 is specifically configured to:
obtaining an intermediate code character string according to the two-dimensional code to be verified and a preset two-dimensional code length;
generating a target code character string according to the intermediate code character string and a preset random transcoding operation;
generating a target payment identification character string and a target key character string according to the target code character string and a preset large integer algorithm, wherein the target identification data comprises the target payment identification character string and the target key character string;
the first preset verification strategy comprises a preset two-dimensional code length, a preset random transcoding operation and a preset large integer algorithm.
In one possible design, the verification module 403 includes:
the query module is used for querying a preset information table according to the target payment identification character string;
the first verification submodule is used for determining the two-dimensional code to be verified as the target two-dimensional code if the payment record character string and the user character string which are uniquely corresponding to the target payment identification character string are obtained in the preset information table;
the second checking submodule is used for checking whether the target two-dimensional code is valid or not according to the target two-dimensional code and a preset one-time password algorithm;
the second preset verification strategy comprises a preset information table and a preset one-time password algorithm.
In one possible design, the second check sub-module is specifically configured to:
generating a target character string according to the payment record character string, the target payment identification character string and the target base number character string;
carrying out preset encryption operation on the target character string to generate an encrypted character string;
verifying whether the target two-dimensional code is valid or not by using a preset verifier, the encrypted character string and the target key character string;
the preset one-time password algorithm comprises a preset encryption operation and a preset verifier.
In one possible design, the first check submodule is further configured to:
and if the payment record character string or the user character string uniquely corresponding to the target payment identification character string is not acquired in the preset information table, determining the two-dimensional code to be verified to be a non-target two-dimensional code.
In one possible design, the generating module 402 is further configured to:
obtaining a target radix character string according to the target two-dimensional code and a preset radix operation rule;
the second preset verification strategy further comprises a preset radix operation rule.
In one possible design, the generating module 402 is further specifically configured to:
acquiring a preset last digit of the target two-dimensional code, and acquiring a random digit according to the preset last digit;
obtaining a target number according to the random number and the length of a preset array, and obtaining a preset numerical value corresponding to the target number in the preset array so as to perform preset product operation on the preset numerical value and the random number to obtain a product result;
and obtaining a target radix character string according to the product result and a preset splicing rule, wherein the preset radix operation rule comprises the preset splicing rule.
It should be noted that the payment verification apparatus provided in fig. 7 and the optional embodiments may be used to execute each step of the payment verification method provided in any embodiment, and the specific implementation manner and the technical effect are similar, and are not described herein again.
The foregoing embodiments of the apparatus provided in this application are merely exemplary, and the module division is only one logic function division, and there may be another division manner in actual implementation. For example, multiple modules may be combined or may be integrated into another system. The coupling of the various modules to each other may be through interfaces that are typically electrical communication interfaces, but mechanical or other forms of interfaces are not excluded. Thus, modules described as separate components may or may not be physically separate, may be located in one place, or may be distributed in different locations on the same or different devices.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 8, the electronic device 500 may include: at least one processor 501 and memory 502. Fig. 8 shows an electronic device as an example of a processor.
A memory 502 for storing computer programs for the processor 501. In particular, the program may include program code including computer operating instructions.
Memory 502 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor 501 is configured to execute the computer program stored in the memory 502 to implement the steps of the payment verification method in the above embodiments of the method.
The processor 501 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
Alternatively, the memory 502 may be separate or integrated with the processor 501. When the memory 502 is a device separate from the processor 501, the electronic device 500 may further include:
a bus 503 for connecting the processor 501 and the memory 502. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. Buses may be classified as address buses, data buses, control buses, etc., but do not represent only one bus or type of bus.
Alternatively, in a specific implementation, if the memory 502 and the processor 501 are integrated on a chip, the memory 502 and the processor 501 may communicate through an internal interface.
The present application also provides a computer-readable storage medium, which may include: a variety of media that can store 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, and in particular, a computer program is stored in the computer-readable storage medium, and when at least one processor of the electronic device executes the computer program, the electronic device executes the steps of the payment verification method provided in the foregoing various embodiments.
Embodiments of the present application also provide a computer program product, which includes a computer program, and the computer program is stored in a readable storage medium. The computer program may be read from a readable storage medium by at least one processor of the electronic device, and execution of the computer program by the at least one processor causes the electronic device to perform the steps of the payment verification method provided by the various embodiments described above.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (12)

1. A payment verification method, comprising:
judging whether the two-dimensional code to be verified accords with a preset verification rule or not, wherein the two-dimensional code to be verified is used for payment behaviors;
if yes, generating target identification data according to the two-dimensional code to be verified and a first preset verification strategy, wherein the target identification data and the two-dimensional code to be verified have a unique corresponding relation;
and checking whether the two-dimensional code to be checked is valid according to the target identification data and a second preset checking strategy.
2. The payment verification method of claim 1, further comprising:
if the two-dimensional code to be verified is valid, completing the payment behavior by using the two-dimensional code to be verified;
and if the two-dimensional code to be verified is invalid, generating failure prompt information, wherein the failure prompt information is used for prompting a user that the two-dimensional code to be verified is invalid.
3. The payment verification method of claim 1, wherein the determining whether the two-dimensional code to be verified meets a preset verification rule comprises:
judging whether the two-dimensional code format of the two-dimensional code to be verified conforms to the preset verification rule or not;
judging whether the length of the two-dimensional code to be verified accords with the preset verification rule or not;
judging whether the prefix character string length of the two-dimensional code to be verified accords with the preset verification rule or not;
and if the two-dimension code format, the two-dimension code length and the prefix character string length all accord with the preset check rule, determining that the two-dimension code to be checked accords with the preset check rule.
4. The payment verification method according to any one of claims 1 to 3, wherein the generating of the target identification data according to the two-dimensional code to be verified and a first preset verification policy includes:
obtaining an intermediate code character string according to the two-dimensional code to be verified and a preset two-dimensional code length;
generating a target code character string according to the intermediate code character string and a preset random transcoding operation;
generating a target payment identification character string and a target key character string according to the target code character string and a preset large integer algorithm, wherein the target identification data comprises the target payment identification character string and the target key character string;
the first preset verification strategy comprises the preset two-dimensional code length, the preset random transcoding operation and the preset large integer algorithm.
5. The payment verification method of claim 4, wherein verifying whether the two-dimensional code to be verified is valid according to the target identification data and a second preset verification policy comprises:
inquiring a preset information table according to the target payment identification character string;
if a payment record character string and a user character string which are uniquely corresponding to the target payment identification character string are obtained in the preset information table, determining that the two-dimensional code to be verified is a target two-dimensional code;
verifying whether the target two-dimensional code is valid or not according to the target two-dimensional code and a preset one-time password algorithm;
the second preset verification strategy comprises the preset information table and the preset one-time password algorithm.
6. The payment verification method of claim 5, wherein the verifying whether the target two-dimensional code is valid according to the target two-dimensional code and a preset one-time password algorithm comprises:
generating a target character string according to the payment record character string, the target payment identification character string and the target base number character string;
performing preset encryption operation on the target character string to generate an encrypted character string;
verifying whether the target two-dimensional code is valid or not by utilizing a preset verifier, the encrypted character string and the target key character string;
the preset one-time password algorithm comprises the preset encryption operation and the preset verifier.
7. The payment verification method according to claim 5, wherein if a payment record character string or a user character string uniquely corresponding to the target payment identification character string is not acquired in the preset information table, it is determined that the two-dimensional code to be verified is not the target two-dimensional code.
8. The payment verification method of claim 5, before verifying whether the target two-dimensional code is valid according to the target two-dimensional code and a preset one-time password algorithm, further comprising:
obtaining the target radix character string according to the target two-dimensional code and a preset radix operation rule;
the second preset verification strategy further comprises the preset radix operation rule.
9. The payment verification method of claim 8, wherein the obtaining the target radix string according to the target two-dimensional code and a preset radix operation rule comprises:
acquiring a preset last digit of the target two-dimensional code, and acquiring a random digit according to the preset last digit;
obtaining a target number according to the random number and the length of a preset array, and obtaining a preset numerical value corresponding to the target number in the preset array so as to perform preset product operation on the preset numerical value and the random number to obtain a product result;
and obtaining the target radix character string according to the product result and a preset splicing rule, wherein the preset radix operation rule comprises the preset splicing rule.
10. A payment verification apparatus, comprising:
the judging module is used for judging whether the two-dimensional code to be verified accords with a preset verifying rule or not, and the two-dimensional code to be verified is used for payment;
the generating module is used for generating target identification data according to the two-dimensional code to be verified and a first preset verification strategy if the two-dimensional code to be verified is in the valid state, wherein the target identification data and the two-dimensional code to be verified have a unique corresponding relation;
and the checking module is used for checking whether the two-dimensional code to be checked is valid according to the target identification data and a second preset checking strategy.
11. An electronic device, comprising:
a processor; and the number of the first and second groups,
a memory for storing a computer program for the processor;
wherein the processor is configured to perform the payment verification method of any one of claims 1 to 9 via execution of the computer program.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the payment verification method of any one of claims 1 to 9.
CN202111139033.0A 2021-09-27 2021-09-27 Payment verification method, device, equipment and storage medium Active CN113837765B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111139033.0A CN113837765B (en) 2021-09-27 2021-09-27 Payment verification method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111139033.0A CN113837765B (en) 2021-09-27 2021-09-27 Payment verification method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113837765A true CN113837765A (en) 2021-12-24
CN113837765B CN113837765B (en) 2023-07-18

Family

ID=78970699

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111139033.0A Active CN113837765B (en) 2021-09-27 2021-09-27 Payment verification method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113837765B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104951943A (en) * 2015-04-24 2015-09-30 杭州甲骨文科技有限公司 Anti-counterfeiting method based on random plain and secret code association examination
CN105282088A (en) * 2014-05-28 2016-01-27 腾讯科技(深圳)有限公司 Method and system for controlling verification server and method and system for controlling verification
CN106778995A (en) * 2016-11-25 2017-05-31 北京矩石科技有限公司 A kind of art up two-dimensional code generation method and device with image co-registration
CN109766979A (en) * 2019-01-18 2019-05-17 北京思源互联科技有限公司 Two-dimensional code generation method, verification method and device
WO2020102843A1 (en) * 2018-11-21 2020-05-28 Robyn Ablinger Document / item verification process using digital closed loop system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105282088A (en) * 2014-05-28 2016-01-27 腾讯科技(深圳)有限公司 Method and system for controlling verification server and method and system for controlling verification
CN104951943A (en) * 2015-04-24 2015-09-30 杭州甲骨文科技有限公司 Anti-counterfeiting method based on random plain and secret code association examination
CN106778995A (en) * 2016-11-25 2017-05-31 北京矩石科技有限公司 A kind of art up two-dimensional code generation method and device with image co-registration
WO2020102843A1 (en) * 2018-11-21 2020-05-28 Robyn Ablinger Document / item verification process using digital closed loop system
CN109766979A (en) * 2019-01-18 2019-05-17 北京思源互联科技有限公司 Two-dimensional code generation method, verification method and device

Also Published As

Publication number Publication date
CN113837765B (en) 2023-07-18

Similar Documents

Publication Publication Date Title
CN109815657B (en) Identity authentication method and device based on alliance chain, computer readable storage medium and terminal equipment
US10216923B2 (en) Dynamically updating CAPTCHA challenges
EP3474209A1 (en) Storing blockchain private keys in a sim card
CN107451819B (en) Identity verification method and device based on user operation behavior characteristics
CN110489466B (en) Method and device for generating invitation code, terminal equipment and storage medium
CN108075888B (en) Dynamic URL generation method and device, storage medium and electronic equipment
CN111290742A (en) Parameter verification method and device, electronic equipment and readable storage medium
CN112487253B (en) User invitation code generation method, verification method, device, equipment and storage medium
CN110113329B (en) Verification method and device for verification code
CN109145651B (en) Data processing method and device
CN105099983A (en) Authorization method, authority setting method and devices
CN111431908B (en) Access processing method and device, management server and readable storage medium
CN111783049A (en) User information processing method and system based on block chain
CN112015806A (en) Method and device for storing data by block chain
CN109902493B (en) Script issuing method and server
CN112187783B (en) Authentication method and device, electronic equipment and storage medium
CN111984989B (en) Method, device, system and medium for self-checking publishing and accessing URL
CN111628863B (en) Data signature method and device, electronic equipment and storage medium
CN113837765B (en) Payment verification method, device, equipment and storage medium
US20220337401A1 (en) Electronic device for performing authentication on basis of cloud server and control method therefor
CN111177674A (en) Device verification method and device
CN110020040B (en) Method, device and system for querying data
CN112583600B (en) User authentication method, device, electronic equipment and medium
KR20190063095A (en) A method and program for safely storing and analyzing data in the cloud
CN116828404B (en) Industry short message accurate sending method and device, electronic equipment and medium

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
GR01 Patent grant
GR01 Patent grant