Payment method, device and equipment based on all-in-one two-dimensional code and readable storage medium

By double hashing encryption of user information and product information, and using hash function and Base coding to generate an all-in-one QR code, the problem of complexity and low recognition of QR codes in the existing technology is solved, and the identification is improved. Speed ​​and security improve user experience.

CN118552192APending Publication Date: 2024-08-27QIAN JIN NETWORK INFORMATION TECH SHANGHAI LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410746266.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

The QR code generated by the existing all-in-one QR code payment method is complex and has low recognition, resulting in a low recognition rate of the identification terminal and affecting the user experience.

Method used

By double hashing encryption of user information and product information, and using hash functions and Base encoding to convert the results into shorter strings, an all-in-one QR code is generated to improve recognition and reduce error rates.

Benefits of technology

It improves the recognition rate of all-in-one QR codes, reduces payment time, improves user experience, and enhances the security of the generation and parsing process to prevent abuse and malicious attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118552192A
    Figure CN118552192A
Patent Text Reader

Abstract

The invention discloses a payment method and device based on an all-in-one two-dimensional code, equipment and a readable storage medium. The method comprises the following steps: performing first hash operation on user information and commodity information to obtain a first hash result; performing second hash operation on the first hash result and the first character string to obtain a second hash result; performing hash calculation on the second hash result to obtain a hash value of the first byte number; converting the hash value into a second character string with a second byte number through Base coding, wherein the second byte number is smaller than the first byte number; the second character string and the payment link address are sent to the payment terminal, so that the payment terminal generates an all-in-one two-dimensional code; in response to the code scanning operation, calling user information and commodity information corresponding to the second character string according to the second character string and the mapping relationship; and deducting money on the target payment platform based on the user information and the commodity information. According to the invention, the recognition degree of the all-in-one two-dimensional code is improved, and the payment time is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of new generation information technology, specifically to the field of communication service technology, and in particular to a payment method, device, electronic device and computer-readable storage medium based on an all-in-one QR code. Background Art

[0002] All-in-one QR code payment, also known as aggregate payment, refers to integrating multiple payment methods into one QR code. Consumers can use different payment tools to scan the same QR code to complete payment. The advantage of all-in-one QR code payment is that one QR code can support multiple payment methods, meeting the payment habits of different consumers and avoiding the problem of consumers' scanning errors caused by placing multiple QR codes.

[0003] However, the currently generated all-in-one QR codes are relatively complex and have low recognition, resulting in a low rate at which the recognition terminal recognizes the all-in-one QR codes. Therefore, payment usually takes a long time, affecting the user experience. Summary of the invention

[0004] In view of this, embodiments of the present application provide a payment method, device, electronic device and computer-readable storage medium based on an all-in-one QR code, which are used to solve at least one technical problem.

[0005] The embodiment of the present application provides a payment method based on an all-in-one QR code, which is applied to a server. The payment method based on the all-in-one QR code includes: after receiving a first operation of generating an all-in-one QR code sent by a payment terminal, performing a first hash operation based on user information and product information provided by the payment terminal to obtain a first hash result; taking the first hash result as input, adding a first character string, and performing a second hash operation on the first hash result and the first character string to obtain a second hash result; performing a hash calculation on the second hash result based on a hash function to obtain a hash value of a first byte quantity; converting the hash value into a second byte quantity through Base encoding; character string, the second byte quantity is less than the first byte quantity; the second character string, user information, product information and the mapping relationship between the second character string and the user information and the product information are stored in a database; the second character string and the payment link address are sent to the payment terminal, so that the payment terminal generates an all-in-one QR code based on the second character string and the payment link address; in response to the scanning operation of the all-in-one QR code, the user information and product information corresponding to the second character string are retrieved from the database according to the second character string and the mapping relationship; in response to the selection input of the target payment platform, the target payment platform is called, and a deduction operation is performed on the target payment platform based on the user information and the product information.

[0006] According to some embodiments of the present application, optionally, the database includes a remote dictionary service database and a relational database;

[0007] Before storing the second character string, the user information, the product information, and the mapping relationship between the second character string and the user information and the product information in the database, the payment method based on the all-in-one QR code further includes:

[0008] querying whether there is a character string identical to the second character string in the remote dictionary service database and the relational database;

[0009] If at least one of the remote dictionary service database and the relational database has a string identical to the second string, re-performing a first hash operation based on the user information, the product information and the third string representing the first timestamp or the unique identifier to obtain an updated first hash result, using the updated first hash result as input, returning to add the first string, and performing a second hash operation on the first hash result and the first string to obtain a second hash result, until there is no string identical to the second string in both the remote dictionary service database and the relational database;

[0010] Storing the second character string, user information, product information, and a mapping relationship between the second character string and the user information and product information in a database includes:

[0011] When there is no character string identical to the second character string in the remote dictionary service database and the relational database, the second character string, user information, product information and the mapping relationship are stored in the remote dictionary service database and the relational database.

[0012] According to some embodiments of the present application, optionally, the first character string is a character string representing the second timestamp and the generation number of the all-in-one QR code within the target time period;

[0013] After taking the first hash result as input, adding the first character string, and performing a second hash operation on the first hash result and the first character string to obtain a second hash result, the payment method based on the all-in-one QR code further includes:

[0014] Update the build number;

[0015] When the updated generation number is consistent with the preset target number, the number of all-in-one QR codes generated by the payment terminal within the target time period is limited, and a prompt message for limiting the number of generated codes is sent to the payment terminal;

[0016] If the payment terminal receives feedback to lift the limit on the number of generated transactions, and the identity authentication of the payment terminal is correct, the limit on the number of generated transactions will be lifted.

[0017] According to some embodiments of the present application, optionally, before sending the second character string and the payment link address to the payment terminal, the payment method based on the all-in-one QR code further includes:

[0018] Determining whether the second timestamp is within a preset time period;

[0019] If the second timestamp is not within the preset time period, the second character string and the payment link address are not sent to the payment terminal;

[0020] Sending the second character string and the payment link address to the payment terminal includes:

[0021] If the second timestamp is within the preset time period, the second character string and the payment link address are sent to the payment terminal.

[0022] According to some embodiments of the present application, optionally, the second number of bytes is less than 10 bytes.

[0023] According to some embodiments of the present application, optionally, the user information includes a user identifier and a user's membership information, the product information includes first sub-product information and second sub-product information, the first sub-product information includes a product name, a product identifier, and a product price, and the second sub-product information includes at least one of whether there is a gift, whether a coupon can be used, and a coupon amount;

[0024] Before sending the second character string and the payment link address to the payment terminal, the payment method based on the all-in-one QR code further includes:

[0025] Checking whether the second byte quantity is less than or equal to a preset threshold;

[0026] If the second byte quantity is greater than a preset threshold, re-performing a first hash operation based on the user information and at least part of the first sub-product information to obtain an updated first hash result, using the updated first hash result as input, returning to add the first character string, and performing a second hash operation on the first hash result and the first character string to obtain a second hash result, until the second byte quantity is less than or equal to the preset threshold;

[0027] Sending the second character string and the payment link address to the payment terminal includes:

[0028] If the second byte quantity is less than or equal to the preset threshold, the second character string and the payment link address are sent to the payment terminal.

[0029] According to some embodiments of the present application, optionally, converting the hash value into a second string of a second number of bytes by Base encoding, where the second number of bytes is smaller than the first number of bytes, includes:

[0030] The hash value is converted into a binary system through Base encoding, and the first-base hash value is converted into a second binary character string.

[0031] The embodiment of the present application provides a payment device based on an all-in-one QR code, which is applied to a server. The payment device based on the all-in-one QR code includes: an encryption module, which is used to perform a first hash operation based on user information and commodity information provided by the payment terminal after receiving a first operation of generating an all-in-one QR code sent by a payment terminal to obtain a first hash result; taking the first hash result as input, adding a first character string, and performing a second hash operation on the first hash result and the first character string to obtain a second hash result; a hash module, which is used to perform a hash calculation on the second hash result based on a hash function to obtain a hash value of a first byte quantity; and an encoding module, which is used to convert the hash value into a second character string of a second byte quantity through Base encoding. The second byte quantity is less than the first byte quantity; a storage module is used to store the second character string, user information, product information, and the mapping relationship between the second character string and the user information and the product information in a database; a sending module is used to send the second character string and the payment link address to the payment terminal, so that the payment terminal generates an all-in-one QR code based on the second character string and the payment link address; a retrieving module is used to respond to the scanning operation of the all-in-one QR code, and retrieve the user information and product information corresponding to the second character string from the database according to the second character string and the mapping relationship; a calling module is used to respond to the selection input of the target payment platform, call the target payment platform, and perform a deduction operation on the target payment platform based on the user information and the product information.

[0032] An embodiment of the present application provides an electronic device, which includes a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the steps of the method described above are implemented.

[0033] An embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the steps of the method described above are implemented.

[0034] An embodiment of the present application provides a computer program product, wherein the computer program product includes computer program instructions, and when the computer program instructions are executed by a processor, the steps of the method described above are implemented.

[0035] The payment method, device, electronic device and computer-readable storage medium based on the all-in-one QR code provided by the embodiment of the present application, on the one hand, perform a first hash operation based on the user information and commodity information provided by the payment terminal to obtain a first hash result; take the first hash result as input, add the first string, and perform a second hash operation on the first hash result and the first string to obtain a second hash result, perform hash calculation on the second hash result based on the hash function to obtain a hash value of the first byte number; convert the hash value into a second string of the second byte number through Base encoding, and the second byte number is less than the first byte number; send the second string and the payment link address to the payment terminal, so that the payment terminal generates an all-in-one QR code based on the second string and the payment link address. In this way, after two conversions of the hash function and Base encoding, a shorter second string can be obtained, and the all-in-one QR code generated based on the second string and the payment link address can carry less content, so that the all-in-one QR code has a higher recognition and is not prone to error, which is conducive to improving the recognition rate of the all-in-one QR code, reducing the time spent on payment, and improving the user experience. On the other hand, when a scanning operation of an all-in-one QR code is received, the user information and product information corresponding to the second character string are retrieved from the database according to the second character string and the mapping relationship; and in response to the selection input of the target payment platform fed back by the payment terminal, the target payment platform is called, and a deduction operation is performed on the target payment platform based on the user information and product information. Therefore, while ensuring that the all-in-one QR code can be quickly identified, the user information and product information corresponding to the second character string can be retrieved from the database based on the second character string carried by the all-in-one QR code; and the deduction operation is completed in response to the selection input of the target payment platform. That is, while ensuring that the all-in-one QR code can be quickly identified, the payment methods of multiple payment platforms can be supported. On the other hand, by double hashing and encrypting the user information and product information, it is beneficial to improve the security of the generation process and parsing process of the second character string, and effectively prevent abuse and malicious attacks. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following briefly introduces the drawings in the embodiments of the present application.

[0037] Figure 1 A schematic diagram of a system architecture of an embodiment of the present application is shown.

[0038] Figure 2 A flow chart of a payment method based on an all-in-one QR code according to an embodiment of the present application.

[0039] Figure 3 Another flowchart of the payment method based on the all-in-one QR code according to an embodiment of the present application.

[0040] Figure 4 This is another flow chart of the payment method based on the all-in-one QR code according to an embodiment of the present application.

[0041] Figure 5 This is another flow chart of the payment method based on the all-in-one QR code according to an embodiment of the present application.

[0042] Figure 6 A structural diagram of a payment device based on an all-in-one QR code according to an embodiment of the present application.

[0043] Figure 7 A schematic diagram showing the hardware structure of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0044] The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that the purpose of providing these embodiments is to make the principles and spirit of the present application clearer and more thorough, so that those skilled in the art can better understand and implement the principles and spirit of the present application. The exemplary embodiments provided herein are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments herein, all other embodiments obtained by ordinary technicians of the art without creative work are within the scope of protection of this application.

[0045] Embodiments of the present application relate to terminal devices and / or servers. Those skilled in the art will appreciate that the embodiments of the present application may be implemented as a system, apparatus, device, method, computer-readable storage medium, or computer program product. Therefore, the present disclosure may be specifically implemented in at least one of the following forms: complete hardware, complete software, or a combination of hardware and software. According to the embodiments of the present application, the present application seeks protection for a payment method, apparatus, electronic device, computer-readable storage medium, and computer program product based on an all-in-one QR code. Figure 1 A schematic diagram of a system architecture of an embodiment of the present application is shown. Figure 1 As shown, the system includes a payment terminal 102, an identification terminal 103 and a server 104. The payment terminal 102 may include at least one of the following: a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart TV, various wearable devices, an augmented reality AR device, a virtual reality VR device, etc. The identification terminal 103 may be a terminal device with a camera. The payment terminal 102 may generate an all-in-one QR code based on the data sent by the server 104. The identification terminal 103 may scan the all-in-one QR code displayed by the payment terminal 102 to make a payment.

[0046] A client may be installed on the payment terminal 102 and the identification terminal 103. For example, the client may be a client that specifically performs a specific function (such as an application app), or a client that is embedded with multiple application applets (with different functions), or a client that is logged in through a browser. The user may operate on the payment terminal 102 or the identification terminal 103. For example, the user may open the client installed on the payment terminal 102 or the identification terminal 103 and input instructions through the client operation, or the user may open the browser installed on the payment terminal 102 or the identification terminal 103 and input instructions through the browser operation. After the payment terminal 102 or the identification terminal 103 receives the instruction input by the user, the request information containing the instruction is sent to the server 104. After receiving the request information, the server 104 performs corresponding processing and then returns the processing result information to the payment terminal 102 or the identification terminal 103. The user instruction is completed through a series of data processing and information interaction.

[0047] In this document, terms such as first, second, third, etc. are only used to distinguish one entity (or operation) from another entity (or operation), but not to require or imply any order or relationship between these entities (or operations).

[0048] Before describing the technical solutions provided by the embodiments of the present application, in order to facilitate the understanding of the embodiments of the present application, the present application first specifically describes the problems existing in the related art:

[0049] All-in-one QR code payment, also known as aggregate payment, refers to integrating multiple payment methods into one QR code. Consumers can use different payment tools to scan the same QR code to complete payment. The advantage of all-in-one QR code payment is that one QR code can support multiple payment methods, meeting the payment habits of different consumers and avoiding the problem of consumers' scanning errors caused by placing multiple QR codes.

[0050] However, the inventors of this application have found that in the related art, when the payment terminal generates an all-in-one QR code (or all-in-one payment code), the server usually first sends various information such as user information and product information to the payment terminal, and then the payment terminal generates the all-in-one QR code based on the received user information and product information. In this way, the generated all-in-one QR code is more complex and has low recognition, resulting in a low rate of recognition of the all-in-one QR code by the recognition terminal, so payment usually takes a long time, affecting the user experience. In addition, since the all-in-one QR code contains more information, and more information means that the error rate of the all-in-one QR code is higher, the all-in-one QR code is not easy to be recognized or prone to recognition errors.

[0051] For example, in some application scenarios, such as when users purchase value-added services of a recruitment platform (such as opening a VIP membership) through a payment terminal, the payment efficiency is low because the all-in-one QR code displayed by the payment terminal is relatively complex and has low recognition. Payment usually takes a long time, affecting the user experience.

[0052] In view of the above research findings of the inventors, the embodiments of the present application provide a payment method, device, equipment and computer-readable storage medium based on an all-in-one QR code, which can solve at least one of the above technical problems existing in the related art.

[0053] In a first aspect, the embodiment of the present application provides a payment method based on an all-in-one QR code, which can be applied to the server 104. The payment method based on an all-in-one QR code provided in the embodiment of the present application is introduced below.

[0054] Figure 2 Schematic diagram of a payment method based on an all-in-one QR code according to an embodiment of the present application. Figure 2 As shown, the payment method based on the all-in-one QR code of the embodiment of the present application includes the following steps S201 to S208.

[0055] S201: After receiving a first operation for generating an all-in-one QR code sent by a payment terminal, a first hash operation is performed based on user information and product information provided by the payment terminal to obtain a first hash result.

[0056] The user can log in his / her own user information on the payment terminal. In addition, the user can purchase the goods he / she wants to purchase on the shopping interface displayed on the payment terminal. The payment terminal can send the user information and the goods information to the server. After receiving the first operation of generating an all-in-one QR code sent by the payment terminal, the server can perform a first hash operation based on the user information and the goods information provided by the payment terminal to obtain a first hash result.

[0057] Among them, user information and product information can be flexibly adjusted according to actual conditions, and this application does not limit this. For example, in some examples, user information may include a user identifier, such as a user identity identification number (Identity document, ID). In addition, user information may also include other information such as the user's membership information. For example, the user's membership information may be the user's membership level, and this application does not limit this. Product information may include product identification, product name, and product price. For example, the product identification may be a product ID. In addition, product information may also include other information such as whether there are gifts, whether coupons can be used, the coupon amount and / or the coupon usage time, and this application does not limit this.

[0058] In order to improve the security of data transmission, in some embodiments of the present application, the server can perform double hash encryption on user information and product information, such as double MD5 (Message Digest Algorithm 5) encryption. MD5 is a hash function that can generate a 128-bit (16-byte) hash value, which can usually be represented by a 32-bit hexadecimal string. MD5 encryption can be used to improve the integrity and security of information transmission.

[0059] Specifically, in S201, the server may perform a first hash operation on the user information and product information provided by the payment terminal to obtain a first hash result. That is, the user information and product information may be used as input, and a hash operation may be performed on the user information and product information. A hash operation is a process of transforming an input of any length (also known as a pre-image) into an output of a fixed length through a hash algorithm, that is, converting the input data into a string of fixed length, which may be called a hash value. Therefore, the first hash result may be a first hash value. Exemplarily, the first hash value may be a hexadecimal string.

[0060] S202: taking the first hash result as input, adding the first character string, and performing a second hash operation on the first hash result and the first character string to obtain a second hash result.

[0061] In S202, the first hash result obtained by the first hash operation can be used as input, and the first string can be added. The first string can be called "salt", that is, a first string (salt) is added during the hashing process to increase the difficulty of cracking. Then, the first hash result and the first string are subjected to a second hash operation to obtain a second hash result. The second hash result can be a second hash value. Exemplarily, the second hash value can be a hexadecimal string.

[0062] In this way, since the user information and product information are double hashed and encrypted, and the first string (salt) is added in the hashing process, the difficulty of cracking the data can be greatly improved, which is beneficial to improving the security of the generation process and parsing process of the second string, and effectively preventing abuse and malicious attacks.

[0063] S203: Perform hash calculation on the second hash result based on the hash function to obtain a hash value of the first number of bytes.

[0064] In S203, the second hash result may be hashed based on the hash function to obtain a hash value of the first byte quantity. The byte quantity of the hash value (i.e., the first byte quantity) may be less than the byte quantity of the second hash result. The first byte quantity may be flexibly adjusted according to actual conditions, and this application does not limit this.

[0065] The type of hash function can be flexibly adjusted according to actual conditions, and this application does not limit this. For example, in some examples, the hash function can be a non-encrypted hash function, such as but not limited to the MurmurHash3 hash function. For example, by performing a hash calculation on the second hash result through a hash function, a hash value of the first byte quantity in decimal can be obtained, and the hash value can be a string of Long type numbers, that is, a relatively short data.

[0066] S204: Convert the hash value into a second character string of a second number of bytes through Base encoding, where the second number of bytes is smaller than the first number of bytes.

[0067] In S204, the hash value of the first byte number may be converted into a second string of the second byte number by Base encoding, wherein the second byte number is smaller than the first byte number, that is, the hash value is converted into a second string of the smaller byte number by Base encoding.

[0068] In this way, after two transformations of hash function and Base encoding, a shorter second character string can be obtained. The multi-in-one QR code generated based on the second character string and the payment link address can carry less content, so that the multi-in-one QR code has a higher recognition rate and is not prone to errors, which is conducive to improving the recognition rate of the multi-in-one QR code, reducing the time spent on payment, and improving the user experience.

[0069] In some embodiments, the base of the second string may be different from the base of the hash value. In S204, the hash value is converted into a base by Base encoding, for example, the hash value of the first base can be converted into a second binary string. The type of Base encoding can be flexibly adjusted according to actual conditions, and this application is not limited to this. For example, in some examples, the Base encoding can be Base62 encoding. Taking Base62 encoding as an example, the hash value is converted into a base by Base62 encoding, for example, the hash value of the first base (such as decimal) can be converted into a second binary string (such as 62-base). Compared with the hash value of the first byte quantity in decimal, the second byte quantity of the second string in 62-base is less.

[0070] S205: storing the second character string, user information, product information, and a mapping relationship between the second character string and the user information and product information in a database.

[0071] In S205, the second character string, the user information, the product information, and the mapping relationship between the second character string and the user information and the product information may be stored in a database.

[0072] S206: Send the second character string and the payment link address to the payment terminal, so that the payment terminal generates an all-in-one QR code based on the second character string and the payment link address.

[0073] After obtaining the second character string, the server may send the second character string and the payment link address used for payment to the payment terminal. The payment terminal may use a QR code generator to generate an all-in-one QR code based on the second character string and the payment link address. In some examples, when the server sends the second character string and the payment link address to the payment terminal, for example, the second character string may be concatenated after the payment link address and sent together to the payment terminal, thereby improving transmission efficiency.

[0074] S207: In response to the scanning operation of the all-in-one QR code, the user information and the product information corresponding to the second character string are retrieved from the database according to the second character string and the mapping relationship.

[0075] The scanning terminal can perform a scanning operation on the all-in-one QR code. In response to the scanning operation of the all-in-one QR code, the server can obtain the second character string carried in the all-in-one QR code. Then, based on the mapping relationship between the second character string and the user information and the product information in the database, the server can retrieve the user information and product information corresponding to the second character string in the all-in-one QR code from the database.

[0076] S208: In response to the selection input of the target payment platform, the target payment platform is called, and a deduction operation is performed on the target payment platform based on the user information and the product information.

[0077] The code scanning terminal can select a target payment platform from multiple payment platforms for payment. The target payment platform can be any one of the multiple payment platforms. In response to the selection input of the target payment platform, the server can call the target payment platform and perform a deduction operation on the target payment platform based on the user information and product information.

[0078] The payment method based on the all-in-one QR code provided in the embodiment of the present application, on the one hand, performs a first hash operation based on the user information and product information provided by the payment terminal to obtain a first hash result; takes the first hash result as input, adds the first character string, and performs a second hash operation on the first hash result and the first character string to obtain a second hash result, performs a hash calculation on the second hash result based on the hash function, and obtains a hash value of the first byte number; converts the hash value into a second character string of the second byte number through Base encoding, and the second byte number is less than the first byte number; sends the second character string and the payment link address to the payment terminal, so that the payment terminal generates an all-in-one QR code based on the second character string and the payment link address. In this way, after two conversions of the hash function and Base encoding, a shorter second character string can be obtained, and the all-in-one QR code generated based on the second character string and the payment link address can carry less content, so that the all-in-one QR code has a higher recognition and is not prone to error, which is conducive to improving the recognition rate of the all-in-one QR code, reducing the time spent on payment, and improving the user experience. On the other hand, when a scanning operation of an all-in-one QR code is received, the user information and product information corresponding to the second character string are retrieved from the database according to the second character string and the mapping relationship; and in response to the selection input of the target payment platform fed back by the payment terminal, the target payment platform is called, and a deduction operation is performed on the target payment platform based on the user information and product information. Therefore, while ensuring that the all-in-one QR code can be quickly identified, the user information and product information corresponding to the second character string can be retrieved from the database based on the second character string carried by the all-in-one QR code; and the deduction operation is completed in response to the selection input of the target payment platform. That is, while ensuring that the all-in-one QR code can be quickly identified, the payment methods of multiple payment platforms can be supported. On the other hand, by double hashing and encrypting the user information and product information, it is beneficial to improve the security of the generation process and parsing process of the second character string, and effectively prevent abuse and malicious attacks.

[0079] According to some embodiments of the present application, optionally, the database may include a Remote Dictionary Server (Redis) database and a relational database. Exemplarily, the relational database includes but is not limited to a Mysql database.

[0080] Accordingly, in S205, the second character string, the user information, the product information, and the mapping relationship between the second character string and the user information and the product information may be stored in the remote dictionary service database and the relational database.

[0081] In this way, by storing the second character string, user information, product information, and the mapping relationship between the second character string and the user information and product information in two databases (i.e., the remote dictionary service database and the relational database), even if the data in one of the databases is lost, the payment can be completed by using the second character string, user information, product information, and the mapping relationship between the second character string and the user information and product information stored in the other database, thereby improving the robustness of the all-in-one QR code payment.

[0082] Figure 3 FIG. 2 is another flow chart of a payment method based on an all-in-one QR code according to an embodiment of the present application. Figure 3 As shown, according to some embodiments of the present application, optionally, before S205: storing the second character string, user information, product information, and the mapping relationship between the second character string and the user information and product information in the database, the payment method based on the all-in-one QR code may also include the following steps S301 and S302.

[0083] S301: Querying the remote dictionary service database and the relational database to see whether there is a character string identical to the second character string.

[0084] The remote dictionary service database has a faster reading and writing speed. Therefore, in S301, it is possible to first query whether there is a string identical to the second string in the remote dictionary service database. If there is a string identical to the second string in the remote dictionary service database, execute S302. If there is no string identical to the second string in the remote dictionary service database, query whether there is a string identical to the second string in the relational database. If there is a string identical to the second string in the relational database, execute S302. If there is no string identical to the second string in the relational database, execute S205.

[0085] Thus, when querying whether there is a string identical to the second string in the database, the remote dictionary service database is queried first. If there is no string identical to the second string in the remote dictionary service database, the relational database is queried. Since the remote dictionary service database has a faster reading and writing speed, the query efficiency can be improved and the query time can be shortened.

[0086] S302: If at least one of the remote dictionary service database and the relational database has a string identical to the second string, re-perform the first hash operation based on the user information, the product information and the third string representing the first timestamp or the unique identifier to obtain an updated first hash result, use the updated first hash result as input, and return to S202: add the first string, and perform a second hash operation on the first hash result and the first string to obtain a second hash result, until there is no string identical to the second string in both the remote dictionary service database and the relational database.

[0087] If at least one of the remote dictionary service database and the relational database has a string identical to the second string, it means that the second string generated this time is not unique. In this case, if the second string is stored in the database, it will cause a conflict between the second string and the previously stored string, that is, the same string corresponds to different user information and / or different product information, which may lead to payment errors.

[0088] Therefore, if at least one of the remote dictionary service database and the relational database has a string identical to the second string, a new second string can be regenerated. Specifically, a third string representing a first timestamp or a universally unique identifier (UUID) can be added to the user information and product information, and the user information, product information and the third string can be re-hashed to obtain an updated first hash result. Then, the updated first hash result is used as input, and the process returns to S202, and the above steps are repeated until there is no string identical to the second string in both the remote dictionary service database and the relational database.

[0089] For example, the first timestamp may be a timestamp of a preset time, and the preset time may be the time when the third character string is generated. The first timestamp is unique, and the unique identifier is also unique. Therefore, the third character string is also unique.

[0090] In this way, a third character string with uniqueness is added to the user information and product information, and the first hash operation, the second hash operation, the hash calculation and the Base encoding operation are performed again, and a new second character string with uniqueness can be obtained through basically one iteration. In addition, by performing a uniqueness check on the second character string, it is possible to avoid conflicts between the second character string and the character string originally stored in the database, avoid the problem of the same character string corresponding to different user information and / or different product information, and improve the accuracy of payment.

[0091] Accordingly, S205: storing the second character string, the user information, the product information, and the mapping relationship between the second character string and the user information and the product information in a database may include the following steps:

[0092] When there is no character string identical to the second character string in the remote dictionary service database and the relational database, the second character string, user information, product information and the mapping relationship are stored in the remote dictionary service database and the relational database.

[0093] As described above, in S202, the first hash result may be used as input, the first character string may be added, and a second hash operation may be performed on the first hash result and the first character string to obtain a second hash result.

[0094] According to some embodiments of the present application, optionally, the first character string may be a character string representing the second timestamp and a generation number of the all-in-one QR code within the target time period.

[0095] The second timestamp may be a timestamp of a preset time, for example, the preset time may be the time when the first character string is generated. The target time period may be flexibly adjusted according to actual conditions, and this application does not limit this. For example, the target time period may be the same day, the same week, or the same month.

[0096] Figure 4 FIG. 2 is another flow chart of a payment method based on an all-in-one QR code according to an embodiment of the present application. Figure 4 As shown, according to some embodiments of the present application, optionally, in S202: taking the first hash result as input, adding the first character string, and performing a second hash operation on the first hash result and the first character string to obtain the second hash result, the payment method based on the all-in-one QR code may also include the following steps S401 to S403.

[0097] S401: Update the generation number.

[0098] After generating and adding the first character string representing the second timestamp and the generation number of the all-in-one QR code in the target time period, the generation number of the all-in-one QR code in the target time period may be updated. For example, the generation number of the all-in-one QR code in the target time period may be increased by 1.

[0099] S402: When the updated generation number is consistent with the preset target number, the number of all-in-one QR codes generated by the payment terminal within the target time period is limited, and a prompt message for limiting the generation number is sent to the payment terminal.

[0100] The target number can be flexibly set according to actual conditions, and this application does not limit this. When the updated generation number is consistent with the preset target number, the number of all-in-one QR codes generated by the payment terminal within the target time period can be limited. For example, the second character string can no longer be sent to the payment terminal within the target time period, so that the payment terminal cannot generate a new all-in-one QR code within the target time period. At the same time, a prompt message to limit the number of generation can be sent to the payment terminal, thereby reminding the payment terminal that the number of all-in-one QR codes generated within the target time period has been limited.

[0101] Accordingly, S203 may include the following steps: when the updated generation number is smaller than the target number, performing a hash calculation on the second hash result based on a hash function to obtain a hash value of the first number of bytes.

[0102] S403: If the operation of lifting the limit on the number of generated items is received from the payment terminal and the identity authentication of the payment terminal is correct, the limit on the number of generated items is lifted.

[0103] After receiving the prompt information of limiting the number of generated codes, the payment terminal may send the identity information for identity authentication and the operation of lifting the limit on the number of generated codes to the server. The identity information of the payment terminal may be flexibly set according to the actual situation, and this application does not limit this. After the server authenticates the identity information of the payment terminal and the identity authentication is correct, it may respond to the operation of lifting the limit on the number of generated codes and lift the limit on the number of all-in-one QR codes generated by the payment terminal within the target time period.

[0104] In this way, on the one hand, adding the first character string representing the second timestamp and the generation number of the all-in-one QR code within the target time period into the hashing process can increase the difficulty of cracking the data; on the other hand, limiting the number of all-in-one QR codes generated in combination with the first character string can effectively avoid large losses to the owner of the payment terminal due to incorrect product price setting (such as how low the product price is set).

[0105] Figure 5 FIG. 2 is another flow chart of a payment method based on an all-in-one QR code according to an embodiment of the present application. Figure 5 As shown, according to some embodiments of the present application, optionally, before S206: sending the second character string and the payment link address to the payment terminal, the payment method based on the all-in-one QR code may further include the following steps S501 and S502.

[0106] S501: Determine whether the second timestamp is within a preset time period.

[0107] The preset time period can be flexibly set according to actual conditions, and this application does not limit this.

[0108] S502: If the second timestamp is not within the preset time period, the second character string and the payment link address are not sent to the payment terminal.

[0109] Accordingly, S206: sending the second character string and the payment link address to the payment terminal may include the following steps:

[0110] If the second timestamp is within the preset time period, the second character string and the payment link address are sent to the payment terminal.

[0111] In general, the working hours of the owner (or legal user) of the payment terminal are basically stable, such as working hours from 8 am to 24 am. Therefore, the payment terminal can flexibly set the preset time period as needed. If the second timestamp is not within the preset time period, it may indicate that other users use the payment terminal without the permission of the owner of the payment terminal. Therefore, by combining the first character string representing the second timestamp, not only the difficulty of cracking the data can be increased, but also the generation of an all-in-one QR code when the second timestamp is not within the preset time period can be prevented, resulting in damage to the rights and interests of the owner of the payment terminal.

[0112] According to some embodiments of the present application, optionally, the payment method based on the all-in-one QR code may also include the following steps 1 and 2.

[0113] Step 1: If the second timestamp is not within the preset time period, a prompt message indicating that the second timestamp is not within the preset time period is sent to the payment terminal.

[0114] Step 2: If the payment terminal is fed back to allow the second character string and the payment link address to be sent, and the identity verification of the payment terminal is correct, the second character string and the payment link address are sent to the payment terminal.

[0115] According to some embodiments of the present application, optionally, the second byte number of the second string may be less than 10 bytes. For example, in some examples, the second byte number of the second string includes but is not limited to 5 or 6 bytes.

[0116] In this way, after two transformations of hash function and Base encoding, a shorter second character string can be obtained. The multi-in-one QR code generated based on the second character string and the payment link address can carry less content, so that the multi-in-one QR code has a higher recognition rate and is not prone to errors, which is conducive to improving the recognition rate of the multi-in-one QR code, reducing the time spent on payment, and improving the user experience.

[0117] According to some embodiments of the present application, optionally, the user information may include a user identifier and the user's membership information. The product information may include first sub-product information and second sub-product information. The first sub-product information may include a product name, a product identifier, and a product price. The second sub-product information may include at least one of whether there is a gift, whether a coupon can be used, and a coupon amount.

[0118] Before S206: sending the second character string and the payment link address to the payment terminal, the payment method based on the all-in-one QR code may further include the following steps three and four.

[0119] Step 3: Check whether the second byte quantity is less than or equal to a preset threshold.

[0120] The preset threshold value can be flexibly set according to actual conditions, and this application does not limit this. For example, in some examples, the preset threshold value can be 10.

[0121] Step 4: If the second byte quantity is greater than a preset threshold, re-perform the first hash operation based on the user information and at least part of the first sub-product information to obtain an updated first hash result, use the updated first hash result as input, and return to S202: add the first string, and perform a second hash operation on the first hash result and the first string to obtain the second hash result, until the second byte quantity is less than or equal to the preset threshold.

[0122] If the second byte number is greater than the preset threshold, it means that the generated second character string is too long. In this case, the first re-hashing operation can be performed again based on only the user information and at least part of the first sub-product information, and the process returns to S202 to repeat the above steps until the second byte number is less than or equal to the preset threshold.

[0123] Accordingly, S206: sending the second character string and the payment link address to the payment terminal may include the following steps:

[0124] If the second byte quantity is less than or equal to the preset threshold, the second character string and the payment link address are sent to the payment terminal.

[0125] In this way, by checking the second byte quantity and adjusting the generation strategy of the second character string, the second byte quantity can be made less than or equal to the preset threshold, thereby making the all-in-one QR code more recognizable and less prone to errors.

[0126] According to some embodiments of the present application, optionally, the payment method based on the all-in-one QR code may further include the following steps:

[0127] Set the expiration time of the all-in-one QR code;

[0128] When the expiration time of the all-in-one QR code is exceeded, the all-in-one QR code is invalidated.

[0129] In this way, the generated all-in-one QR code can be made timely, thereby improving the security of payment.

[0130] According to some embodiments of the present application, optionally, in order to improve compatibility, taking into account the needs of multiple different payment platforms to use the all-in-one QR code, an application programming interface (API) may be provided to allow each payment platform to use the all-in-one QR code through the API interface.

[0131] In some specific application embodiments, the product may optionally include the value-added services of the recruitment website, such as opening a VIP membership, improving exposure services, or top recruitment services. Accordingly, the product information may include the value-added service identifier, the value-added service name, and the value-added service price. In addition, the product information may also include other information such as whether there are gifts, whether coupons can be used, the coupon amount, and / or the coupon usage time.

[0132] In the embodiment of the present application, since the all-in-one QR code generated based on the second character string and the payment link address can carry less content, the all-in-one QR code can be made to have a higher degree of recognition and be less prone to errors, which is conducive to increasing the recognition rate of the all-in-one QR code, reducing the time spent on payment, and improving payment efficiency and user experience. On the other hand, while ensuring that the all-in-one QR code can be quickly recognized, it can support payment methods of multiple payment platforms. On the other hand, by double hashing and encrypting user information and product information, it is conducive to improving the security of the generation process and parsing process of the second character string, and effectively preventing abuse and malicious attacks.

[0133] Corresponding to the method embodiment of the present application, the present application also provides a payment device based on an all-in-one QR code, which is applied to a server. Figure 6 As shown, the payment device 60 based on the all-in-one QR code may include:

[0134] The encryption module 601 is used to, after receiving the first operation of generating an all-in-one QR code sent by the payment terminal, perform a first hash operation based on the user information and the product information provided by the payment terminal to obtain a first hash result; take the first hash result as input, add the first character string, and perform a second hash operation on the first hash result and the first character string to obtain a second hash result;

[0135] A hash module 602 is used to perform a hash calculation on the second hash result based on a hash function to obtain a hash value of the first number of bytes;

[0136] An encoding module 603 is used to convert the hash value into a second string of a second number of bytes by using Base encoding, where the second number of bytes is less than the first number of bytes;

[0137] A storage module 604 is used to store the second string, user information, product information, and the mapping relationship between the second string and the user information and product information in a database;

[0138] A sending module 605, configured to send the second character string and the payment link address to the payment terminal, so that the payment terminal generates an all-in-one QR code based on the second character string and the payment link address;

[0139] A retrieval module 606 is used to retrieve user information and product information corresponding to the second character string from a database according to the second character string and the mapping relationship in response to the scanning operation of the all-in-one QR code;

[0140] The calling module 607 is used to call the target payment platform in response to the selection input of the target payment platform fed back by the payment terminal, and perform a deduction operation on the target payment platform based on the user information and the commodity information.

[0141] The payment device based on the all-in-one QR code provided in the embodiment of the present application, on the one hand, performs a first hash operation based on the user information and commodity information provided by the payment terminal to obtain a first hash result; takes the first hash result as input, adds the first character string, and performs a second hash operation on the first hash result and the first character string to obtain a second hash result, performs a hash calculation on the second hash result based on the hash function to obtain a hash value of the first byte number; converts the hash value into a second character string of the second byte number through Base encoding, and the second byte number is less than the first byte number; sends the second character string and the payment link address to the payment terminal, so that the payment terminal generates an all-in-one QR code based on the second character string and the payment link address. In this way, after two conversions of the hash function and Base encoding, a shorter second character string can be obtained, and the all-in-one QR code generated based on the second character string and the payment link address can carry less content, so that the all-in-one QR code has a higher recognition and is not prone to error, which is conducive to improving the recognition rate of the all-in-one QR code, reducing the time spent on payment, and improving the user experience. On the other hand, when a scanning operation of an all-in-one QR code is received, the user information and product information corresponding to the second character string are retrieved from the database according to the second character string and the mapping relationship; and in response to the selection input of the target payment platform fed back by the payment terminal, the target payment platform is called, and a deduction operation is performed on the target payment platform based on the user information and product information. Therefore, while ensuring that the all-in-one QR code can be quickly identified, the user information and product information corresponding to the second character string can be retrieved from the database based on the second character string carried by the all-in-one QR code; and the deduction operation is completed in response to the selection input of the target payment platform. That is, while ensuring that the all-in-one QR code can be quickly identified, the payment methods of multiple payment platforms can be supported. On the other hand, by double hashing and encrypting the user information and product information, it is beneficial to improve the security of the generation process and parsing process of the second character string, and effectively prevent abuse and malicious attacks.

[0142] According to some embodiments of the present application, optionally, the database may include a remote dictionary service database and a relational database.

[0143] The payment device 60 based on the all-in-one QR code may further include a query module for querying whether there is a string identical to the second string in the remote dictionary service database and the relational database; if there is a string identical to the second string in at least one of the remote dictionary service database and the relational database, a first hash operation is re-performed based on the user information, the product information and the third string representing the first timestamp or the unique identifier to obtain an updated first hash result, the updated first hash result is used as input, and the first string is added back, and a second hash operation is performed on the first hash result and the first string to obtain a second hash result, until there is no string identical to the second string in both the remote dictionary service database and the relational database.

[0144] The storage module 604 may be configured to store the second string, user information, product information and mapping relationship in the remote dictionary service database and the relational database if there is no string identical to the second string in either the remote dictionary service database or the relational database.

[0145] According to some embodiments of the present application, optionally, the first character string is a character string representing the second timestamp and the generation number of the all-in-one QR code within the target time period. The payment device 60 based on the all-in-one QR code may also include an update module for updating the generation number; when the updated generation number is consistent with the preset target number, the number of all-in-one QR codes generated by the payment terminal within the target time period is limited, and a prompt message for limiting the number of generated codes is sent to the payment terminal; if an operation of lifting the limit on the number of generated codes is received from the payment terminal and the identity authentication of the payment terminal is correct, the limit on the number of generated codes is lifted.

[0146] According to some embodiments of the present application, optionally, the payment device 60 based on the all-in-one QR code may further include a judgment module for judging whether the second timestamp is within a preset time period; if the second timestamp is not within the preset time period, the second character string and the payment link address are not sent to the payment terminal. The sending module 605 may be used to send the second character string and the payment link address to the payment terminal if the second timestamp is within the preset time period.

[0147] According to some embodiments of the present application, optionally, the second number of bytes is less than 10 bytes.

[0148] According to some embodiments of the present application, optionally, the user information includes a user identifier and the user's membership information, the product information includes first sub-product information and second sub-product information, the first sub-product information includes the product name, product identifier and product price, and the second sub-product information includes whether there is a gift, whether a coupon can be used and at least one of the coupon amount.

[0149] The payment device 60 based on the all-in-one QR code may also include a verification module for verifying whether the second byte quantity is less than or equal to a preset threshold; if the second byte quantity is greater than the preset threshold, then re-performing a first re-hashing operation based on at least part of the user information and the first sub-commodity information to obtain an updated first hash result, using the updated first hash result as input, and returning to add the first string, and performing a second re-hashing operation on the first hash result and the first string to obtain a second hash result, until the second byte quantity is less than or equal to the preset threshold. The sending module 605 may be used to send the second string and the payment link address to the payment terminal if the second byte quantity is less than or equal to the preset threshold.

[0150] According to some embodiments of the present application, optionally, the encoding module 603 can be used to perform base conversion on the hash value through Base encoding, and convert the hash value in the first base into a second character string in the binary base.

[0151] The electronic device in the embodiment of the present application may be a user terminal device, a server, other computing devices, or a cloud server. Figure 7 A schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application is shown. The electronic device may include a processor 701 and a memory 702 storing computer program instructions. When the processor 701 executes the computer program instructions, the process or function of any of the above-mentioned embodiments of the method is implemented.

[0152] Specifically, the processor 701 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application. The memory 702 may include a large-capacity memory for data or instructions. For example, the memory 702 may be at least one of the following: a hard disk drive (HDD), a read-only memory (ROM), a random access memory (RAM), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, a universal serial bus (USB) drive or other physical / tangible memory storage device. For another example, the memory 702 may include a removable or non-removable (or fixed) medium. For another example, the memory 702 may be inside or outside the integrated gateway disaster recovery device. The memory 702 may be a non-volatile solid-state memory. In other words, the memory 702 usually includes a tangible (non-transitory) computer-readable storage medium (such as a memory device) encoded with computer-executable instructions, and when the software is executed (such as executed by one or more processors), the operations described in the method of the embodiment of the present application can be performed. The processor 701 implements the process or function of any method in the above embodiments by reading and executing the computer program instructions stored in the memory 702.

[0153] In one example, Figure 7 The electronic device shown may also include a communication interface 703 and a bus 710. Among them, the processor 701, the memory 702, and the communication interface 703 are connected through the bus 710 and complete the communication between each other. The communication interface 703 is mainly used to realize the communication between each module, device, unit and / or device in the embodiment of the present application. The bus 710 includes hardware, software or both, and can couple the components of the online data traffic billing device to each other. For example, the bus may include at least one of the following: an accelerated graphics port (AGP) or other graphics bus, an enhanced industrial standard architecture (EISA) bus, a front-end bus (FSB), a hypertransport (HT) interconnect, an industrial standard architecture (ISA) bus, an infinite bandwidth interconnect, a low pin count (LPC) bus, a memory bus, a micro channel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus or other suitable buses. The bus 710 may include one or more buses. Although the embodiments of the present application describe or illustrate a specific bus, the embodiments of the present application may consider any suitable bus or interconnection method.

[0154] In combination with the method in the above embodiments, an embodiment of the present application also provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the process or function of any method in the above embodiments is implemented.

[0155] In addition, an embodiment of the present application further provides a computer program product, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the process or function of any one of the methods in the above embodiments is implemented.

[0156] The above exemplarily describes the flowcharts and / or block diagrams of the methods, devices, systems and computer program products of the embodiments of the present application, and describes the relevant various aspects. It should be understood that each box or combination thereof in the flowchart and / or block diagram can be implemented by computer program instructions, or by dedicated hardware that performs a specified function or action, or by a combination of dedicated hardware and computer instructions. For example, these computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to form a machine that enables these instructions executed by such a processor to enable the implementation of the functions / actions specified in each box or combination thereof in the flowchart and / or block diagram. Such a processor can be a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.

[0157] The functional blocks shown in the structured block diagram of the embodiment of the present application can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc.; when implemented in software, it is a program or code segment used to perform the required task. The program or code segment can be stored in a memory, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0158] It should be noted that the present application is not limited to the specific configurations and processes described above or shown in the figures. The above is only a specific implementation mode of the present application. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the described system, device, module or unit can refer to the corresponding process in the method embodiment without further description. It should be understood that the scope of protection of the present application is not limited to this. Any technician familiar with the technical field can think of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and these modifications or substitutions should be included in the scope of protection of the present application.

Claims

1. A payment method based on an all-in-one QR code, It is characterized in that Applied to the server, the payment method includes: After receiving the first operation for generating the all-in-one QR code sent by the payment terminal, performing a first re-hashing operation based on the user information and the product information provided by the payment terminal to obtain a first hash result; Taking the first hash result as input, adding the first character string, and performing a second hash operation on the first hash result and the first character string to obtain a second hash result; Performing a hash calculation on the second hash result based on a hash function to obtain a hash value of the first number of bytes; Convert the hash value into a second string of a second number of bytes by using Base encoding, where the second number of bytes is smaller than the first number of bytes; storing the second character string, the user information, the product information, and a mapping relationship between the second character string and the user information and the product information in a database; sending the second character string and the payment link address to the payment terminal, so that the payment terminal generates the all-in-one QR code based on the second character string and the payment link address; In response to a scanning operation of the all-in-one QR code, the user information and the product information corresponding to the second character string are retrieved from the database according to the second character string and the mapping relationship; In response to the selection input of the target payment platform, the target payment platform is called, and a deduction operation is performed on the target payment platform based on the user information and the commodity information.

2. The payment method according to claim 1, It is characterized in that The database includes a remote dictionary service database and a relational database; Before storing the second character string, the user information, the product information, and the mapping relationship between the second character string and the user information and the product information in a database, the payment method further includes: querying the remote dictionary service database and the relational database whether there is a character string identical to the second character string; If at least one of the remote dictionary service database and the relational database has a string identical to the second string, re-performing a first re-hashing operation based on the user information, the product information and a third string representing the first timestamp or the unique identifier to obtain an updated first hash result, taking the updated first hash result as input, returning to add the first string, and performing a second re-hashing operation on the first hash result and the first string to obtain a second hash result, until no string identical to the second string exists in either the remote dictionary service database or the relational database; The storing the second character string, the user information, the product information, and the mapping relationship between the second character string and the user information and the product information in a database includes: When there is no character string identical to the second character string in the remote dictionary service database and the relational database, the second character string, the user information, the product information and the mapping relationship are stored in the remote dictionary service database and the relational database.

3. The payment method according to claim 1, It is characterized in that The first character string is a character string representing the second timestamp and the generation number of the all-in-one QR code within the target time period; After taking the first hash result as input, adding a first character string, and performing a second hash operation on the first hash result and the first character string to obtain a second hash result, the payment method further includes: updating the generation number; When the updated generation number is consistent with the preset target number, limiting the number of all-in-one QR codes generated by the payment terminal within the target time period, and sending a prompt message limiting the generation number to the payment terminal; If an operation of lifting the limit on the generated quantity is received in response to a request from the payment terminal and the identity authentication of the payment terminal is correct, the limit on the generated quantity is lifted.

4. The payment method according to claim 3, It is characterized in that Before sending the second character string and the payment link address to the payment terminal, the payment method further includes: Determining whether the second timestamp is within a preset time period; If the second timestamp is not within the preset time period, the second character string and the payment link address are not sent to the payment terminal; The sending the second character string and the payment link address to the payment terminal includes: If the second timestamp is within the preset time period, the second character string and the payment link address are sent to the payment terminal.

5. The payment method according to claim 1, It is characterized in that The second byte quantity is less than 10 bytes.

6. The payment method according to claim 1, It is characterized in that The user information includes a user ID and a user's membership information, and the product information includes first sub-product information and second sub-product information, wherein the first sub-product information includes a product name, a product ID, and a product price, and the second sub-product information includes at least one of whether there is a gift, whether a coupon can be used, and a coupon amount; Before sending the second character string and the payment link address to the payment terminal, the payment method further includes: Checking whether the second byte quantity is less than or equal to a preset threshold; If the second byte quantity is greater than the preset threshold, re-performing a first re-hashing operation based on the user information and at least part of the first sub-product information to obtain an updated first hash result, taking the updated first hash result as input, returning to add the first string, and performing a second re-hashing operation on the first hash result and the first string to obtain a second hash result, until the second byte quantity is less than or equal to the preset threshold; The sending the second character string and the payment link address to the payment terminal includes: If the second byte quantity is less than or equal to the preset threshold, the second character string and the payment link address are sent to the payment terminal.

7. The payment method according to claim 1, It is characterized in that The step of converting the hash value into a second string of a second number of bytes by using Base encoding, where the second number of bytes is smaller than the first number of bytes, includes: The hash value is converted into a base by using Base encoding, and the hash value in the first base is converted into a second character string in the binary base.

8. A payment device based on an all-in-one QR code, It is characterized in that Applied to the server, the payment method includes: an encryption module, configured to, after receiving a first operation for generating the all-in-one QR code sent by the payment terminal, perform a first hash operation based on the user information and the commodity information provided by the payment terminal to obtain a first hash result; take the first hash result as input, add a first character string, and perform a second hash operation on the first hash result and the first character string to obtain a second hash result; A hash module, configured to perform a hash calculation on the second hash result based on a hash function to obtain a hash value of the first number of bytes; an encoding module, configured to convert the hash value into a second string of a second number of bytes by using Base encoding, where the second number of bytes is smaller than the first number of bytes; A storage module, used to store the second character string, the user information, the product information, and a mapping relationship between the second character string and the user information and the product information in a database; a sending module, configured to send the second character string and the payment link address to the payment terminal, so that the payment terminal generates the all-in-one QR code based on the second character string and the payment link address; a retrieval module, configured to retrieve, in response to a scanning operation of the all-in-one QR code, the user information and the product information corresponding to the second character string from the database according to the second character string and the mapping relationship; The calling module is used to call the target payment platform in response to the selection input of the target payment platform, and perform a deduction operation on the target payment platform based on the user information and the commodity information.

9. An electronic device, It is characterized in that The electronic device comprises: a processor and a memory storing computer program instructions; when the electronic device executes the computer program instructions, the payment method based on the all-in-one QR code as described in any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the payment method based on an all-in-one QR code as described in any one of claims 1 to 8.