WO2021128871A1 - Transaction code generation method, apparatus and system, and method, apparatus and system for processing based on transaction code - Google Patents

Transaction code generation method, apparatus and system, and method, apparatus and system for processing based on transaction code Download PDF

Info

Publication number
WO2021128871A1
WO2021128871A1 PCT/CN2020/109082 CN2020109082W WO2021128871A1 WO 2021128871 A1 WO2021128871 A1 WO 2021128871A1 CN 2020109082 W CN2020109082 W CN 2020109082W WO 2021128871 A1 WO2021128871 A1 WO 2021128871A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction code
target
transaction
terminal
sequence
Prior art date
Application number
PCT/CN2020/109082
Other languages
French (fr)
Chinese (zh)
Inventor
刘永振
张波
向洁敏
查骏
牛天耘
冀乃庚
Original Assignee
中国银联股份有限公司
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 中国银联股份有限公司 filed Critical 中国银联股份有限公司
Publication of WO2021128871A1 publication Critical patent/WO2021128871A1/en

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/08Payment architectures
    • G06Q20/20Point-of-sale [POS] network systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Definitions

  • the invention belongs to the field of computer technology, and specifically relates to a transaction code generation and processing method, device and system based on the transaction code.
  • the consumer terminal sends a payment request to the payment system.
  • the payment system authenticates the consumer terminal and generates the corresponding transaction code and sends it to the consumer terminal.
  • the consumer terminal displays the receipt
  • the transaction code is for the merchant terminal to scan, and then the merchant terminal transmits the scanned transaction code to the payment system for payment authorization.
  • a transaction code is generated by randomly fetching values in a time sequence within a limited code space.
  • the existing transaction code generally includes 18-19 digits, of which the first 2-3 digits It is the identification code used to indicate the code issuing agency.
  • UnionPay’s logo is 62
  • Alipay’s logo is 28
  • WeChat’s logo is 13, etc.
  • the last 16 bits are valid coding bits, of which 6 random numbers are usually taken, and 10 bits are self-contained. Incremental numbers ensure uniqueness. Due to the large number of concurrent transactions of online payment, this method is likely to cause the generated transaction codes to be similar, easy to be imitated or colluded, and thus the security of online payment is not high.
  • the present invention provides the following solutions.
  • a method for generating a transaction code including: receiving a transaction code application sent by a first terminal, the transaction code application carrying transaction information of the first terminal; generating a preset sequence according to the transaction code application and transaction code resources; The preset encryption algorithm encrypts the preset sequence to generate the target transaction code; and sends the target transaction code to the first terminal.
  • the method further includes: receiving a transaction code resource generated and sent by a target resource node, where the target resource node is any one of a plurality of resource nodes deployed in a distributed manner.
  • the transaction code resource includes: a region factor used to indicate the target resource node; an incremental sequence number maintained by the target resource node; a period factor used to indicate the transaction period of the transaction code resource; according to the period The key updated by the factor.
  • generating a preset sequence based on the transaction code application and the transaction code resource includes: determining the time factor according to the current local time; combining the regional factor, the time factor, the incremental sequence number, and the cycle factor into a unique preset sequence Set sequence.
  • the transaction code resource becomes invalid after the end of the transaction period indicated by the period factor.
  • the method further includes: before receiving the transaction code application sent by the first terminal, pre-receiving the transaction code resource generated and sent by the target resource node; and/or, in response to receiving the transaction code To apply, send a transaction code resource request to the target resource node, and receive the transaction code resource generated and sent by the target resource node.
  • encrypting a preset sequence according to a preset encryption algorithm to generate a target transaction code includes: determining a first partial sequence of the preset sequence, the first partial sequence including a regional factor, a time factor, and an increasing sequence The first N bits of the number, N is a positive integer; the first partial sequence is encrypted according to the key to obtain a random sequence; the second partial sequence of the preset sequence is determined, and the second partial sequence includes the (N+1 ) Bit to last bit and cycle factor; the target transaction code is formed according to the preset flag header, random sequence and the second partial sequence.
  • the method further includes: determining a target storage node among the plurality of storage nodes deployed in a distributed manner according to the second partial sequence, and storing the target transaction code and the transaction information of the first terminal in the target storage node.
  • the method further includes: generating a preset sequence in batches according to the transaction code application and the transaction code resource, wherein the first N digits of the incremental sequence number contain instructions The preset position of the batch sequence number; the batch target transaction code is obtained according to the batch preset sequence, the batch target transaction code is sent to the first terminal, and the batch target transaction code is stored in the target storage node.
  • encrypting the preset sequence according to the preset encryption algorithm to generate the target transaction code includes: encrypting the preset sequence according to the encryption algorithm and the key to obtain the target transaction code.
  • it further includes: hashing the target transaction code, determining the target storage node among the multiple storage nodes deployed in a distributed manner according to the hashed value, and combining the target transaction code and the first The transaction information of a terminal is stored in the target storage node.
  • the encryption algorithm has a format-preserving encryption function, and the encryption algorithm is a symmetric encryption algorithm.
  • the target transaction code stored in the target storage node carries validity period information.
  • a transaction code-based processing method including: receiving a query request sent by a second terminal, wherein the query request carries a target transaction code; determining transaction information of the first terminal according to the target transaction code, and combining the first terminal The transaction information is sent to the second terminal, so that the second terminal completes the transaction based on the transaction information of the first terminal; wherein the target transaction code is generated and sent to the first terminal using the method of the first aspect, and then the second terminal passes through the first terminal One terminal obtains.
  • a transaction code generation device includes: a receiving unit for receiving a transaction code application sent by a first terminal, the transaction code application carrying transaction information of the first terminal; a sequence unit for applying and transacting according to the transaction code The code resource generates the preset sequence; the encryption unit is used to encrypt the preset sequence according to the preset encryption algorithm to generate the target transaction code; the sending unit is used to send the target transaction code to the first terminal.
  • the sequence unit is further used to receive the transaction code resource generated and sent by the target resource node, where the target resource node is any one of a plurality of resource nodes deployed in a distributed manner.
  • the transaction code resource includes: an area factor used to indicate the target resource node; an incremental sequence number maintained by the target resource node; a period factor used to indicate the transaction cycle of the transaction code resource; according to the period factor And the updated key.
  • the sequence unit is further used to: determine the time factor according to the current local time; combine the regional factor, the time factor, the incremental sequence number, and the periodic factor into a unique preset sequence.
  • the transaction code resource becomes invalid after the end of the transaction period indicated by the period factor.
  • the sequence unit is further used to: before receiving the transaction code application sent by the first terminal, pre-receive the transaction code resource generated and sent by the target resource node; and/or, in response to receiving the transaction code resource Transaction code application, sending a transaction code resource request to the target resource node, and receiving the transaction code resource generated and sent by the target resource node.
  • the encryption unit is further configured to: determine the first partial sequence of the preset sequence, the first partial sequence includes the area factor, the time factor, and the first N bits of the increasing sequence number, where N is a positive integer; Encrypt the first partial sequence to obtain a random sequence; determine the second partial sequence of the preset sequence, the second partial sequence includes the (N+1)th to the last bit of the increasing sequence number and the period factor; according to the preset flag header , The random sequence and the second part of the sequence constitute the target transaction code.
  • a storage unit is further included for: determining a target storage node among the plurality of storage nodes deployed in a distributed manner according to the second partial sequence, and storing the target transaction code and the transaction information of the first terminal Go to the target storage node.
  • the device is also used to: generate a preset sequence in batches according to the transaction code application and transaction code resources, where the first N bits of the incremental sequence number include Indicate the preset position of the batch sequence number; obtain batch target transaction codes according to the batch preset sequence, send the batch target transaction codes to the first terminal, and store the batch target transaction codes in the target storage node.
  • the encryption unit is further configured to: perform encryption processing on the preset sequence according to the encryption algorithm and the key to obtain the target transaction code.
  • the storage unit is also used to: hash the target transaction code, determine the target storage node among the multiple storage nodes deployed in a distributed manner according to the hashed value, and combine the target transaction The code and the transaction information of the first terminal are stored in the target storage node.
  • the encryption algorithm has a format-preserving encryption function, and the encryption algorithm is a symmetric encryption algorithm.
  • the target transaction code stored in the target storage node carries validity period information.
  • a transaction code-based processing device including: a query receiving unit for receiving a query request sent by a second terminal, wherein the query request carries a target transaction code; a transaction information sending unit for receiving a transaction code according to the target transaction code Determine the transaction information of the first terminal, and send the transaction information of the first terminal to the second terminal, so that the second terminal completes the transaction based on the transaction information of the first terminal; wherein, the target transaction code is generated and combined with the device of the second aspect. Sent to the first terminal, and then obtained by the second terminal through the first terminal.
  • a transaction code generation system including: multiple transaction code generation nodes, multiple resource nodes, and multiple storage nodes that are distributedly deployed; wherein each transaction code generation node is used to execute the first aspect method.
  • a transaction code generation device including: one or more multi-core processors; a memory for storing one or more programs; when one or more programs are executed by one or more multi-core processors, Make one or more multi-core processors realize: receive the transaction code application sent by the first terminal, the transaction code application carries the transaction information of the first terminal; generate the preset sequence according to the transaction code application and the transaction code resource; according to the preset encryption algorithm Encrypt the preset sequence to generate the target transaction code; send the target transaction code to the first terminal.
  • a computer-readable storage medium stores a program.
  • the program is executed by a multi-core processor, the multi-core processor is caused to execute the method as in the first aspect.
  • the encryption algorithm is adopted to ensure the randomness of the generated target transaction code, that is, it cannot be predicted based on the previously known transaction code.
  • the next transaction code can expand the generation space of the target transaction code.
  • Figure 1 is an example of a transaction code in the prior art
  • FIG. 2 is a schematic flowchart of a method for generating a transaction code according to an embodiment of the present invention
  • Fig. 3 is a schematic structural diagram of a transaction code generation system according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of the structure of a target transaction code according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of a processing method based on transaction codes according to an embodiment of the present invention.
  • Fig. 6 is a schematic structural diagram of a transaction code generating device according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a processing device based on a transaction code according to an embodiment of the present invention.
  • Fig. 8 is a schematic structural diagram of a transaction code generating device according to another embodiment of the present invention.
  • the inventor proposes a transaction code generation method.
  • the first terminal carried by the user can initiate the transaction code application, and receive the transaction code application sent by the first terminal.
  • the transaction code application carries the first terminal Transaction information of a terminal; generate a preset sequence according to the transaction code application and transaction code resources; encrypt the preset sequence according to the preset encryption algorithm to generate a target transaction code; and then send the target transaction code to the first terminal.
  • the generated preset sequence with an encryption algorithm to generate the target transaction code, the randomness of the generated target transaction code can be ensured, and the generation space of the transaction code is expanded.
  • FIG. 2 schematically shows a flow chart of a method 200 for generating a transaction code according to an embodiment of the present invention.
  • the execution subject may be one or more electronic devices; from the perspective of the program, the execution subject may correspondingly be the programs carried on these electronic devices.
  • FIG. 3 shows a schematic transaction code generation system 30, which includes a number of transaction code generation nodes 31, a number of resource nodes 32, and a number of storage nodes 33 that are distributedly deployed, wherein each transaction code generation node 31 has It can be used to perform the steps shown in Figure 2 independently.
  • any transaction code generating node 31 in FIG. 3 is used as the execution subject to describe steps 201 to S204 in FIG. 2, but it is not limited to this.
  • the method 200 may include:
  • Step 201 Receive a transaction code application sent by a first terminal, where the transaction code application carries transaction information of the first terminal;
  • the first terminal may be a user terminal installed with a designated APP or plug-in.
  • a merchant terminal such as a POS machine
  • the transaction information of the first terminal carried in the transaction code application may include user information, payment information, and risk control information of the first terminal, and the user information may include an IP address.
  • the transaction code generation node 31 that is most recently deployed in the transaction code generation system 30 can be determined according to the IP address of the first terminal carried in the transaction code application to receive the transaction code application sent by the first terminal.
  • the transaction code generation node using distributed deployment has the capability of horizontal expansion and contraction, avoiding the problem of limited ability of a single transaction code generation node.
  • the method 200 may further include:
  • Step 202 Generate a preset sequence according to the transaction code application and the transaction code resource;
  • the method may further include: receiving the transaction code resource generated and sent by the target resource node, where the target resource node is a plurality of resources deployed in a distributed manner. Any one of the nodes.
  • the transaction code generation system 30 includes several resource nodes 32 distributed in a distributed manner, and each resource node 32 can be used to independently generate and provide transaction code resources.
  • each resource node can independently manage one or more resource factors, such as incrementing serial numbers, regional factors, periodic factors, etc., and generate and provide transaction code resources based on the resource factors. Based on this, before or after receiving the transaction code application, fixed matching/or random matching/or matching to a certain resource node as a target resource node through a load balancing algorithm, and obtaining the transaction code resource provided by the resource node.
  • Each resource node can be a data center or a device cluster, which is not specifically limited in this application.
  • the method may further include: pre-receiving transaction code resources generated and sent by the target resource node; and/or, in response to receiving the transaction code request, sending a transaction code resource request to the target resource node, And receive the transaction code resource generated and sent by the target resource node.
  • one or more transaction code resources may be obtained in advance from the target resource node passively, so as to quickly generate the target transaction code and return it to the user when a transaction code request is received.
  • the transaction code resource is found to be insufficient, you can actively send the transaction code resource request to the target resource node to obtain the transaction code resource provided by the target resource node in real time to generate the target The transaction code is returned to the user.
  • the transaction code resource includes: a regional factor used to indicate the target resource node; an incremental sequence number maintained by the target resource node; a period factor used to indicate the transaction cycle of the transaction code resource; The updated key.
  • the cycle factor is used to indicate the transaction cycle of the transaction code resource.
  • every ten days can be used as a cycle, and the cycle factor on the first day of each cycle is preset to be 1, the cycle factor on the second day is 2, and so on.
  • the cycle factor can be determined according to Monday, Tuesday, ...
  • the cycle factor corresponding to Monday is 1, and the cycle factor corresponding to Monday is 2. And so on.
  • the key is updated with the change of the cycle factor.
  • the key used under each cycle factor is the same. To ensure randomness, the key used under each cycle factor can be replaced periodically.
  • the transaction code resource becomes invalid after the end of the transaction period indicated by the period factor. For example, when the transaction cycle indicated by the cycle factor carried in the acquired transaction code resource corresponds to November 11, 2019, the transaction code resource becomes invalid after the end of November 11, 2019.
  • this step 202 may further include: determining a time factor according to the current local time; combining the regional factor, the time factor, the incrementing sequence number, and the periodic factor into a unique preset sequence.
  • the time factor is usually the distance in seconds between the current local time and a certain initial time.
  • the above ABCD can be combined into a preset sequence: 3324001234567891. Since the combination of the above multiple factors is unique, the preset sequence is unique.
  • the method 200 may further include:
  • Step 203 Perform encryption processing on the preset sequence according to the preset encryption algorithm to generate a target transaction code
  • the encryption algorithm has a format-preserving encryption function, and is a symmetric encryption algorithm.
  • the above step 203 may further include: performing encryption processing on the preset sequence according to the encryption algorithm and the key to obtain the target transaction code.
  • the above-mentioned key is the key carried in the transaction code resource.
  • the key is the key carried in the transaction code resource.
  • the preset sequence: 3324001234567891 can be encrypted based on the key in the transaction code resource, and the target transaction code can be obtained in combination with the identification header (for example, 26).
  • the above step 203 may further include: determining the first partial sequence of the preset sequence, the first partial sequence includes the area factor, the time factor, and the first N bits of the increasing sequence number, where N is a positive integer; The key encrypts the first partial sequence to obtain a random sequence; determines the second partial sequence of the preset sequence, the second partial sequence includes the (N+1)th to the last bit of the increasing sequence number and the cycle factor; according to the preset flag The header, the random sequence, and the second part of the sequence constitute the target transaction code.
  • the first 7-digit combination of the regional factor, the time factor and the increasing serial number can be used as the 13-digit first partial sequence: 3324001234567, and the first partial sequence is encrypted according to the key to obtain a 13-digit random sequence: 76285894725, according to The combination of the (N+1)th to the last digit of the increasing sequence number and the period factor is a 3-digit second partial sequence: 891.
  • the target transaction code is formed as: 267628589472567891. It should be understood that the digits of the aforementioned flag header, area factor, time factor, increasing sequence, and period factor are preset empirical values according to practice, and can be adjusted accordingly according to actual needs.
  • the method 200 may further include:
  • Step S204 Send the target transaction code to the first terminal.
  • the transaction code generation system 30 further includes a plurality of storage nodes 33 distributed in a distributed manner, which are used to store the target transaction code and the transaction information of the first terminal, so that other devices can obtain it through the first terminal.
  • the transaction information of the matched first terminal can be obtained from the storage node based on the obtained target transaction code, and transaction verification can be performed.
  • this step S204 may also include: hashing the target transaction code, according to The hashed value determines the target storage node among the multiple storage nodes deployed in a distributed manner, and stores the target transaction code and the transaction information of the first terminal in the target storage node.
  • the hashed value determines the target storage node among the multiple storage nodes deployed in a distributed manner, and stores the target transaction code and the transaction information of the first terminal in the target storage node.
  • the step S204 may further include: multiple stores deployed in a distributed manner according to the second partial sequence
  • the target storage node is determined in the node, and the target transaction code and the transaction information of the first terminal are stored in the target storage node.
  • the target transaction code composed of the preset flag header (26), the random sequence (7628589472567), and the second partial sequence (891) is: 267628589472567891.
  • the second partial sequence (891) can be used to determine the uniquely corresponding target storage node from the multiple storage nodes deployed in a distributed manner, and store the target transaction code and the transaction information of the first terminal in the target storage node.
  • the second partial sequence (891) can be extracted from the target transaction code, and the second partial sequence (891) can be used in the distributed system according to the second partial sequence (891).
  • the target storage node for storing the target transaction code and the transaction information of the first terminal is found among the deployed storage nodes, and the transaction information of the first terminal can be obtained through verification and matching of the target transaction code.
  • step S204 may further include: generating a preset sequence in batches according to the transaction code application and the transaction code resource, where the first N bits of the incremental sequence number include Indicate the preset position of the batch sequence number; obtain batch target transaction codes according to the batch preset sequence, send the batch target transaction codes to the first terminal, and store the batch target transaction codes in the target storage node.
  • the transaction code application sent by the first terminal requests a batch application of 90 target transaction codes
  • a single transaction code resource can be used to generate multiple target transaction codes in batches, and the area factor, time factor, and increment
  • the combination of sequence number and periodicity factor becomes a unique preset sequence.
  • the first N bits of the increasing sequence number that is, in the increasing sequence number in the first part of the sequence
  • the first 2 bits of the increasing sequence number are split out to store the batch sequence according to requirements.
  • the batch sequence includes, for example, 01, 02 ,...,90, used to indicate each of the batch target transaction codes separately, and the remaining numbers in the preset sequence remain the same.
  • the (N+1)th to the last position of the incremental sequence number and the cycle factor can also be determined as the second partial sequence; according to the second partial sequence in distributed deployment
  • the target storage node is determined from the plurality of storage nodes, and the target transaction code and the transaction information of the first terminal are stored in the target storage node. Since multiple target transaction codes generated in batches have a completely consistent second partial sequence, the target transaction codes generated in batches can be stored in the same storage node.
  • the target transaction code stored in the target storage node carries validity period information.
  • the target storage node executes the deletion operation when the stored target transaction code exceeds its validity period.
  • FIG. 5 shows a processing method 500 based on transaction codes, which is characterized in that it includes:
  • Step 501 Receive a query request sent by a second terminal, where the query request carries the target transaction code
  • the second terminal may be a merchant terminal installed with a designated APP or plug-in, for example, it may be a POS machine.
  • the method shown in FIG. 2 can be used to generate the target transaction code and send it to the first terminal, and then the second terminal obtains the target transaction code through the first terminal.
  • the first terminal may convert the target transaction code into a graphic code, a two-dimensional code, etc. and display it on its screen, and then the second terminal scans the first terminal to obtain the target transaction code.
  • the second terminal After obtaining the target transaction code, the second terminal initiates a query request to the system, which is used to carry the target transaction code and request the system for transaction information of the first terminal corresponding to the target transaction code.
  • Step 502 Determine the transaction information of the first terminal according to the target transaction code, and send the transaction information of the first terminal to the second terminal, so that the second terminal completes the transaction based on the transaction information of the first terminal;
  • the target transaction code after receiving the query request sent by the second terminal, according to the target transaction code and the storage rules of the transaction information of the first terminal, the target transaction code can be correspondingly found from the multiple storage nodes deployed in a distributed manner.
  • the target storage node of the transaction information with the first terminal For example, it is possible to perform preset hash processing on the target transaction code, and find the target storage node used to store the target transaction code and the transaction information of the first terminal among the multiple storage nodes deployed in a distributed manner according to the hashed value. Then, the transaction information of the first terminal can be obtained through verification and matching of the target transaction code.
  • the second partial sequence can be extracted from the target transaction code, and the target storage node for storing the target transaction code and the transaction information of the first terminal can be found among the multiple storage nodes deployed in a distributed manner according to the second partial sequence. Then, the transaction information of the first terminal can be obtained through verification and matching of the target transaction code.
  • the query request can carry usage information, and then the usage verification can be performed based on the usage information sent by the second terminal and the stored transaction information of the first terminal. If the usage verification result does not meet the preset, the transaction failure can be sent to the second terminal information.
  • FIG. 3 is a schematic structural diagram of a transaction code generation system 30 provided by an embodiment of the present invention.
  • the transaction code generation system 30 includes a number of transaction code generation nodes 31, a number of resource nodes 32 and a number of storage nodes 33 that are distributedly deployed, and each transaction code generation node 31 can be used to independently execute the code shown in Figure 2 A step of.
  • an embodiment of the present invention also provides a transaction code generation device for executing the transaction code generation method provided in any of the foregoing embodiments.
  • Fig. 6 is a schematic structural diagram of an apparatus provided by an embodiment of the present invention.
  • the apparatus 600 includes:
  • the receiving unit 601 is configured to receive a transaction code application sent by the first terminal, where the transaction code application carries transaction information of the first terminal;
  • the sequence unit 602 is configured to generate a preset sequence according to the transaction code application and transaction code resources;
  • the encryption unit 603 is configured to perform encryption processing on the preset sequence according to the preset encryption algorithm to generate a target transaction code
  • the sending unit 604 is configured to send the target transaction code to the first terminal.
  • the sequence unit 602 is further configured to receive transaction code resources generated and sent by a target resource node, where the target resource node is any one of a plurality of resource nodes deployed in a distributed manner.
  • the transaction code resource includes: an area factor used to indicate the target resource node; an incremental sequence number maintained by the target resource node; a period factor used to indicate the transaction cycle of the transaction code resource; according to the period factor And the updated key.
  • the sequence unit 602 is further configured to: determine the time factor according to the current local time; combine the regional factor, the time factor, the incremental sequence number, and the periodic factor into a unique preset sequence.
  • the transaction code resource becomes invalid after the end of the transaction period indicated by the period factor.
  • the sequence unit 602 is further configured to: before receiving the transaction code application sent by the first terminal, pre-receive the transaction code resource generated and sent by the target resource node; and/or, in response to receiving To the transaction code application, send a transaction code resource request to the target resource node, and receive the transaction code resource generated and sent by the target resource node.
  • the encryption unit 603 is further configured to: determine the first partial sequence of the preset sequence, the first partial sequence includes the area factor, the time factor, and the first N bits of the increasing sequence number, where N is a positive integer; The key encrypts the first partial sequence to obtain a random sequence; determines the second partial sequence of the preset sequence, the second partial sequence includes the (N+1)th to the last bit of the increasing sequence number and the cycle factor; according to the preset flag The header, the random sequence, and the second part of the sequence constitute the target transaction code.
  • a storage unit is further included for: determining a target storage node among the plurality of storage nodes deployed in a distributed manner according to the second partial sequence, and storing the target transaction code and the transaction information of the first terminal Go to the target storage node.
  • the device is also used to: generate a preset sequence in batches according to the transaction code application and transaction code resources, where the first N bits of the incremental sequence number include Indicate the preset position of the batch sequence number; obtain batch target transaction codes according to the batch preset sequence, send the batch target transaction codes to the first terminal, and store the batch target transaction codes in the target storage node.
  • encrypting the preset sequence according to the preset encryption algorithm to generate the target transaction code includes: encrypting the preset sequence according to the encryption algorithm and the key to obtain the target transaction code.
  • the storage unit is further configured to further include: hashing the target transaction code, determining the target storage node among the multiple storage nodes deployed in a distributed manner according to the hashed value, and The target transaction code and the transaction information of the first terminal are stored in the target storage node.
  • the encryption algorithm has a format-preserving encryption function, and the encryption algorithm is a symmetric encryption algorithm.
  • the target transaction code stored in the target storage node carries validity period information.
  • FIG. 7 is a schematic structural diagram of a processing device 700 based on a transaction code provided by an embodiment of the present invention.
  • the apparatus 700 includes:
  • the query receiving unit 701 is configured to receive a query request sent by the second terminal, where the query request carries a target transaction code
  • the transaction information sending unit 702 is configured to determine the transaction information of the first terminal according to the target transaction code, and send the transaction information of the first terminal to the second terminal, so that the second terminal completes the transaction based on the transaction information of the first terminal;
  • the target transaction code is generated by the device shown in FIG. 6 and sent to the first terminal, and then obtained by the second terminal through the first terminal.
  • transaction code generation device and the transaction code-based processing device in the embodiments of the present application can respectively implement the processes of the foregoing transaction code generation method and transaction code-based processing method embodiments, and achieve the same effect and Function, I won’t go into details here.
  • FIG. 8 is a transaction code generation device according to an embodiment of the present application, which is used to execute the transaction code generation method shown in FIG. 2, and the device includes: at least one processor; and a memory communicatively connected with the at least one processor; The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor, so that the at least one processor can execute:
  • Receive the transaction code application sent by the first terminal the transaction code application carries the transaction information of the first terminal; generate the preset sequence according to the transaction code application and the transaction code resource; encrypt the preset sequence according to the preset encryption algorithm, and generate the target Transaction code: Send the target transaction code to the first terminal, and store the target transaction code and the transaction information of the first terminal.
  • a non-volatile computer storage medium of a method for generating a transaction code is provided, and computer-executable instructions are stored thereon, and the computer-executable instructions are set to be executed when run by a processor:
  • Receive the transaction code application sent by the first terminal the transaction code application carries the transaction information of the first terminal; generate the preset sequence according to the transaction code application and the transaction code resource; encrypt the preset sequence according to the preset encryption algorithm, and generate the target Transaction code: Send the target transaction code to the first terminal, and store the target transaction code and the transaction information of the first terminal.
  • the apparatus, equipment, and computer-readable storage medium provided in the embodiments of the present application correspond to the method in a one-to-one manner. Therefore, the apparatus, equipment, and computer-readable storage medium also have beneficial technical effects similar to their corresponding methods.
  • the beneficial technical effects of the method are described in detail, and therefore, the beneficial technical effects of the device, equipment and computer-readable storage medium are not repeated here.
  • the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM).
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer-readable instructions, data structures, program modules, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices.
  • PRAM phase change memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • RAM random access memory
  • ROM read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • flash memory or other memory technology
  • CD-ROM

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Computer Security & Cryptography (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

Provided are a transaction code generation method, apparatus and system, and a method, apparatus and system for processing based on a transaction code. The transaction code generation method comprises: receiving a transaction code application sent by a first terminal, the transaction code application carrying transaction information of the first terminal; generating a preset sequence according to the transaction code application and a transaction code resource; encrypting the preset sequence according to a preset encryption algorithm to generate a target transaction code; and sending the target transaction code to the first terminal. By means of the method, a target transaction code with high randomness can be generated, and a generation space of the target transaction code is expanded.

Description

交易码生成、基于交易码的处理方法、装置及系统Transaction code generation and processing method, device and system based on transaction code 技术领域Technical field
本发明属于计算机技术领域,具体涉及交易码生成、基于交易码的处理方法、装置及系统。The invention belongs to the field of computer technology, and specifically relates to a transaction code generation and processing method, device and system based on the transaction code.
背景技术Background technique
本部分旨在为权利要求书中陈述的本发明的实施方式提供背景或上下文。此处的描述不因为包括在本部分中就承认是现有技术。This section is intended to provide background or context for the embodiments of the invention stated in the claims. The description here is not recognized as prior art just because it is included in this section.
当前的交易场景中,一般是消费者终端向支付系统发送支付请求,支付系统接收到支付请求后对消费者终端进行身份验证并生成对应的交易码发送到消费者终端,消费者终端显示收到的交易码供商户终端进行扫描,然后由商户终端将扫描得到的交易码传送到支付系统进行支付授权。In the current transaction scenario, generally the consumer terminal sends a payment request to the payment system. After receiving the payment request, the payment system authenticates the consumer terminal and generates the corresponding transaction code and sends it to the consumer terminal. The consumer terminal displays the receipt The transaction code is for the merchant terminal to scan, and then the merchant terminal transmits the scanned transaction code to the payment system for payment authorization.
现有技术中,采用在有限的码空间范围内通过时序随机取值的方式生成交易码,例如,如图1所示,现有的交易码一般包括18-19位,其中前2-3位为用于指示发码机构的标识码,例如银联的标志为62、支付宝的标志为28、微信的标志为13等,后16位为有效编码位,其中通常取6位随机数,10位自增数确保唯一。由于目前线上支付的交易并发数量庞大,这种方式容易导致生成的交易码相似,容易被模仿或串改,进而导致线上支付的安全性不高。In the prior art, a transaction code is generated by randomly fetching values in a time sequence within a limited code space. For example, as shown in Figure 1, the existing transaction code generally includes 18-19 digits, of which the first 2-3 digits It is the identification code used to indicate the code issuing agency. For example, UnionPay’s logo is 62, Alipay’s logo is 28, WeChat’s logo is 13, etc. The last 16 bits are valid coding bits, of which 6 random numbers are usually taken, and 10 bits are self-contained. Incremental numbers ensure uniqueness. Due to the large number of concurrent transactions of online payment, this method is likely to cause the generated transaction codes to be similar, easy to be imitated or colluded, and thus the security of online payment is not high.
发明内容Summary of the invention
针对上述现有技术中存在的问题,提出了交易码生成方法、装置、系统及计算机可读存储介质,以及基于交易码的处理方法及装置,利用这种方法、装置、系统及计算机可读存储介质,能够解决上述问题。In response to the above-mentioned problems in the prior art, a transaction code generation method, device, system, and computer-readable storage medium, as well as a transaction code-based processing method and device are proposed, using this method, device, system, and computer-readable storage The medium can solve the above-mentioned problems.
本发明提供了以下方案。The present invention provides the following solutions.
第一方面,提供一种交易码生成方法,包括:接收第一终端发送的交易码申请,交易码申请携带第一终端的交易信息;根据交易码申请和交易码资源,生成预设序列;根据预设加密算法对预设序列进行加密处理,生成目标交易码;向第一终端发送目标交易码。In a first aspect, a method for generating a transaction code is provided, including: receiving a transaction code application sent by a first terminal, the transaction code application carrying transaction information of the first terminal; generating a preset sequence according to the transaction code application and transaction code resources; The preset encryption algorithm encrypts the preset sequence to generate the target transaction code; and sends the target transaction code to the first terminal.
在一种可能的实施方式中,该方法还包括:接收由目标资源节点生成并发送的交易码资源,其中,目标资源节点是分布式部署的多个资源节点中的任意一个。In a possible implementation manner, the method further includes: receiving a transaction code resource generated and sent by a target resource node, where the target resource node is any one of a plurality of resource nodes deployed in a distributed manner.
在一种可能的实施方式中,该交易码资源包括:用于指示目标资源节点的区域因子;由目标资源节点维护的递增序列号;用于指示交易码资源的交易周期的周期因子;根据周期因子而更新的密钥。In a possible implementation manner, the transaction code resource includes: a region factor used to indicate the target resource node; an incremental sequence number maintained by the target resource node; a period factor used to indicate the transaction period of the transaction code resource; according to the period The key updated by the factor.
在一种可能的实施方式中,根据交易码申请和交易码资源生成预设序列,包括:根据当前本地时间确定时间因子;将区域因子、时间因子、递增序列号以及周期因子组合成为唯一的预设序列。In a possible implementation manner, generating a preset sequence based on the transaction code application and the transaction code resource includes: determining the time factor according to the current local time; combining the regional factor, the time factor, the incremental sequence number, and the cycle factor into a unique preset sequence Set sequence.
在一种可能的实施方式中,该交易码资源在周期因子所指示的交易周期结束后失效。In a possible implementation manner, the transaction code resource becomes invalid after the end of the transaction period indicated by the period factor.
在一种可能的实施方式中,该方法还包括:在接收第一终端发送的交易码申请之前,预先接收由目标资源节点生成并发送的交易码资源;和/或,响应于接收到交易码申请,向目标资源节点发送交易码资源请求,并接收由目标资源节点生成并发送的交易码资源。In a possible implementation, the method further includes: before receiving the transaction code application sent by the first terminal, pre-receiving the transaction code resource generated and sent by the target resource node; and/or, in response to receiving the transaction code To apply, send a transaction code resource request to the target resource node, and receive the transaction code resource generated and sent by the target resource node.
在一种可能的实施方式中,根据预设加密算法对预设序列进行加密处理,生成目标交易码,包括:确定预设序列的第一部分序列,第一部分序列包括区域因子、时间因子以及递增序列号的前N位,N为正整数;根据密钥对第一部分序列进行加密处理以得到随机序列;确定预设序列的第二部分序列,第二部分序列包括递增序列号的第(N+1)位~末位以及周期因子;根据预设标志头、随机序列以及第二部分序列组成目标交易码。In a possible implementation manner, encrypting a preset sequence according to a preset encryption algorithm to generate a target transaction code includes: determining a first partial sequence of the preset sequence, the first partial sequence including a regional factor, a time factor, and an increasing sequence The first N bits of the number, N is a positive integer; the first partial sequence is encrypted according to the key to obtain a random sequence; the second partial sequence of the preset sequence is determined, and the second partial sequence includes the (N+1 ) Bit to last bit and cycle factor; the target transaction code is formed according to the preset flag header, random sequence and the second partial sequence.
在一种可能的实施方式中,还包括:根据第二部分序列在分布式部署的多个存储节点中确定目标存储节点,并将目标交易码以及第一终端的交易信息存储到目标存储节点。In a possible implementation manner, the method further includes: determining a target storage node among the plurality of storage nodes deployed in a distributed manner according to the second partial sequence, and storing the target transaction code and the transaction information of the first terminal in the target storage node.
在一种可能的实施方式中,若交易码申请为批量交易码申请,方法还包括:根据交易码申请和交易码资源批量生成预设序列,其中递增序列号的前N位中包含用于指示批量序号的预设位;根据批量的预设序列获取批量的目标交易码,将批量的目标交易码发送给第一终端,并使批量的目标交易码均存储到目标存储节点。In a possible implementation, if the transaction code application is a batch transaction code application, the method further includes: generating a preset sequence in batches according to the transaction code application and the transaction code resource, wherein the first N digits of the incremental sequence number contain instructions The preset position of the batch sequence number; the batch target transaction code is obtained according to the batch preset sequence, the batch target transaction code is sent to the first terminal, and the batch target transaction code is stored in the target storage node.
在一种可能的实施方式中,根据预设加密算法对预设序列进行加密处理,生成目标交易码,包括:根据加密算法和密钥对预设序列进行加密处理,得到目标交易码。In a possible implementation manner, encrypting the preset sequence according to the preset encryption algorithm to generate the target transaction code includes: encrypting the preset sequence according to the encryption algorithm and the key to obtain the target transaction code.
在一种可能的实施方式中,还包括:对目标交易码进行哈希处理,根据哈希处理后的值在分布式部署的多个存储节点中确定目标存储节点,并将目标交易码和第一终端的交易信息存储到目标存储节点。In a possible implementation manner, it further includes: hashing the target transaction code, determining the target storage node among the multiple storage nodes deployed in a distributed manner according to the hashed value, and combining the target transaction code and the first The transaction information of a terminal is stored in the target storage node.
在一种可能的实施方式中,该加密算法具备保留格式加密功能,加密算法为对称加密算法。In a possible implementation manner, the encryption algorithm has a format-preserving encryption function, and the encryption algorithm is a symmetric encryption algorithm.
在一种可能的实施方式中,存储至目标存储节点的目标交易码携带有效期信息。In a possible implementation, the target transaction code stored in the target storage node carries validity period information.
第二方面,提供一种基于交易码的处理方法,包括:接收第二终端发送的查询请求,其中查询请求携带目标交易码;根据目标交易码确定第一终端的交易信息,并将第一终端的交易信息发送给第二终端,使第二终端基于第一终端的交易信息完成交易;其中,目标交易码利用如第一方面的方法生成并发送给第一终端,然后由第二终端通过第一终端获得。In a second aspect, a transaction code-based processing method is provided, including: receiving a query request sent by a second terminal, wherein the query request carries a target transaction code; determining transaction information of the first terminal according to the target transaction code, and combining the first terminal The transaction information is sent to the second terminal, so that the second terminal completes the transaction based on the transaction information of the first terminal; wherein the target transaction code is generated and sent to the first terminal using the method of the first aspect, and then the second terminal passes through the first terminal One terminal obtains.
第三方面,一种交易码生成装置,包括:接收单元,用于接收第一终端发送的交易码申请,交易码申请携带第一终端的交易信息;序列单元,用于根据交易码申请和交易码资源,生成预设序列;加密单元,用于根据预设加密算法 对预设序列进行加密处理,生成目标交易码;发送单元,用于向第一终端发送目标交易码。In a third aspect, a transaction code generation device includes: a receiving unit for receiving a transaction code application sent by a first terminal, the transaction code application carrying transaction information of the first terminal; a sequence unit for applying and transacting according to the transaction code The code resource generates the preset sequence; the encryption unit is used to encrypt the preset sequence according to the preset encryption algorithm to generate the target transaction code; the sending unit is used to send the target transaction code to the first terminal.
在一种可能的实施方式中,该序列单元还用于:接收由目标资源节点生成并发送的交易码资源,其中,目标资源节点是分布式部署的多个资源节点中的任意一个。In a possible implementation manner, the sequence unit is further used to receive the transaction code resource generated and sent by the target resource node, where the target resource node is any one of a plurality of resource nodes deployed in a distributed manner.
在一种可能的实施方式中,交易码资源包括:用于指示目标资源节点的区域因子;由目标资源节点维护的递增序列号;用于指示交易码资源的交易周期的周期因子;根据周期因子而更新的密钥。In a possible implementation, the transaction code resource includes: an area factor used to indicate the target resource node; an incremental sequence number maintained by the target resource node; a period factor used to indicate the transaction cycle of the transaction code resource; according to the period factor And the updated key.
在一种可能的实施方式中,序列单元,还用于:根据当前本地时间确定时间因子;将区域因子、时间因子、递增序列号以及周期因子组合成为唯一的预设序列。In a possible implementation, the sequence unit is further used to: determine the time factor according to the current local time; combine the regional factor, the time factor, the incremental sequence number, and the periodic factor into a unique preset sequence.
在一种可能的实施方式中,交易码资源在周期因子所指示的交易周期结束后失效。In a possible implementation manner, the transaction code resource becomes invalid after the end of the transaction period indicated by the period factor.
在一种可能的实施方式中,序列单元,还用于:在接收第一终端发送的交易码申请之前,预先接收由目标资源节点生成并发送的交易码资源;和/或,响应于接收到交易码申请,向目标资源节点发送交易码资源请求,并接收由目标资源节点生成并发送的交易码资源。In a possible implementation, the sequence unit is further used to: before receiving the transaction code application sent by the first terminal, pre-receive the transaction code resource generated and sent by the target resource node; and/or, in response to receiving the transaction code resource Transaction code application, sending a transaction code resource request to the target resource node, and receiving the transaction code resource generated and sent by the target resource node.
在一种可能的实施方式中,加密单元还用于:确定预设序列的第一部分序列,第一部分序列包括区域因子、时间因子以及递增序列号的前N位,N为正整数;根据密钥对第一部分序列进行加密处理以得到随机序列;确定预设序列的第二部分序列,第二部分序列包括递增序列号的第(N+1)位~末位以及周期因子;根据预设标志头、随机序列以及第二部分序列组成目标交易码。In a possible implementation, the encryption unit is further configured to: determine the first partial sequence of the preset sequence, the first partial sequence includes the area factor, the time factor, and the first N bits of the increasing sequence number, where N is a positive integer; Encrypt the first partial sequence to obtain a random sequence; determine the second partial sequence of the preset sequence, the second partial sequence includes the (N+1)th to the last bit of the increasing sequence number and the period factor; according to the preset flag header , The random sequence and the second part of the sequence constitute the target transaction code.
在一种可能的实施方式中,还包括存储单元,用于:根据第二部分序列在分布式部署的多个存储节点中确定目标存储节点,并将目标交易码以及第一终端的交易信息存储到目标存储节点。In a possible implementation manner, a storage unit is further included for: determining a target storage node among the plurality of storage nodes deployed in a distributed manner according to the second partial sequence, and storing the target transaction code and the transaction information of the first terminal Go to the target storage node.
在一种可能的实施方式中,若交易码申请为批量交易码申请,装置还用于:根据交易码申请和交易码资源批量生成预设序列,其中递增序列号的前N位中 包含用于指示批量序号的预设位;根据批量的预设序列获取批量的目标交易码,将批量的目标交易码发送给第一终端,并使批量的目标交易码均存储到目标存储节点。In a possible implementation manner, if the transaction code application is a batch transaction code application, the device is also used to: generate a preset sequence in batches according to the transaction code application and transaction code resources, where the first N bits of the incremental sequence number include Indicate the preset position of the batch sequence number; obtain batch target transaction codes according to the batch preset sequence, send the batch target transaction codes to the first terminal, and store the batch target transaction codes in the target storage node.
在一种可能的实施方式中,加密单元还用于:根据加密算法和密钥对预设序列进行加密处理,得到目标交易码。In a possible implementation manner, the encryption unit is further configured to: perform encryption processing on the preset sequence according to the encryption algorithm and the key to obtain the target transaction code.
在一种可能的实施方式中,存储单元还用于:对目标交易码进行哈希处理,根据哈希处理后的值在分布式部署的多个存储节点中确定目标存储节点,并将目标交易码和第一终端的交易信息存储到目标存储节点。In a possible implementation, the storage unit is also used to: hash the target transaction code, determine the target storage node among the multiple storage nodes deployed in a distributed manner according to the hashed value, and combine the target transaction The code and the transaction information of the first terminal are stored in the target storage node.
在一种可能的实施方式中,加密算法具备保留格式加密功能,加密算法为对称加密算法。In a possible implementation manner, the encryption algorithm has a format-preserving encryption function, and the encryption algorithm is a symmetric encryption algorithm.
在一种可能的实施方式中,存储至目标存储节点的目标交易码携带有效期信息。In a possible implementation, the target transaction code stored in the target storage node carries validity period information.
第四方面,提供一种基于交易码的处理装置,包括:查询接收单元,用于接收第二终端发送的查询请求,其中查询请求携带目标交易码;交易信息发送单元,用于根据目标交易码确定第一终端的交易信息,并将第一终端的交易信息发送给第二终端,使第二终端基于第一终端的交易信息完成交易;其中,目标交易码利用如第二方面的装置生成并发送给第一终端,然后由第二终端通过第一终端获得。In a fourth aspect, a transaction code-based processing device is provided, including: a query receiving unit for receiving a query request sent by a second terminal, wherein the query request carries a target transaction code; a transaction information sending unit for receiving a transaction code according to the target transaction code Determine the transaction information of the first terminal, and send the transaction information of the first terminal to the second terminal, so that the second terminal completes the transaction based on the transaction information of the first terminal; wherein, the target transaction code is generated and combined with the device of the second aspect. Sent to the first terminal, and then obtained by the second terminal through the first terminal.
第五方面,提供一种交易码生成系统,包括:分布式部署的多个交易码生成节点、多个资源节点以及多个存储节点;其中,每个交易码生成节点用于执行第一方面的方法。In a fifth aspect, a transaction code generation system is provided, including: multiple transaction code generation nodes, multiple resource nodes, and multiple storage nodes that are distributedly deployed; wherein each transaction code generation node is used to execute the first aspect method.
第六方面,提供一种交易码生成装置,包括:一个或者多个多核处理器;存储器,用于存储一个或多个程序;当一个或多个程序被一个或者多个多核处理器执行时,使得一个或多个多核处理器实现:接收第一终端发送的交易码申请,交易码申请携带第一终端的交易信息;根据交易码申请和交易码资源,生成预设序列;根据预设加密算法对预设序列进行加密处理,生成目标交易码;向第一终端发送目标交易码。In a sixth aspect, a transaction code generation device is provided, including: one or more multi-core processors; a memory for storing one or more programs; when one or more programs are executed by one or more multi-core processors, Make one or more multi-core processors realize: receive the transaction code application sent by the first terminal, the transaction code application carries the transaction information of the first terminal; generate the preset sequence according to the transaction code application and the transaction code resource; according to the preset encryption algorithm Encrypt the preset sequence to generate the target transaction code; send the target transaction code to the first terminal.
第七方面,提供一种计算机可读存储介质,计算机可读存储介质存储有程序,当程序被多核处理器执行时,使得多核处理器执行如第一方面的方法。In a seventh aspect, a computer-readable storage medium is provided, and the computer-readable storage medium stores a program. When the program is executed by a multi-core processor, the multi-core processor is caused to execute the method as in the first aspect.
本申请实施例采用的上述至少一个技术方案能够达到以下有益效果:本实施例中,通过采用加密算法,确保了生成的目标交易码的随机性,即无法基于在先已知的交易码预测到下一个交易码,又可以扩大目标交易码的生成空间。The above-mentioned at least one technical solution adopted in the embodiment of this application can achieve the following beneficial effects: In this embodiment, the encryption algorithm is adopted to ensure the randomness of the generated target transaction code, that is, it cannot be predicted based on the previously known transaction code. The next transaction code can expand the generation space of the target transaction code.
应当理解,上述说明仅是本发明技术方案的概述,以便能够更清楚地了解本发明的技术手段,从而可依照说明书的内容予以实施。为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举例说明本发明的具体实施方式。It should be understood that the above description is only an overview of the technical solution of the present invention, so that the technical means of the present invention can be understood more clearly, so that it can be implemented in accordance with the content of the description. In order to make the above and other objects, features and advantages of the present invention more obvious and understandable, the following examples illustrate the specific embodiments of the present invention.
附图说明Description of the drawings
通过阅读下文的示例性实施例的详细描述,本领域普通技术人员将明白本文所述的有点和益处以及其他优点和益处。附图仅用于示出示例性实施例的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的标号表示相同的部件。在附图中:By reading the detailed description of the exemplary embodiments below, those of ordinary skill in the art will understand the advantages and benefits described herein as well as other advantages and benefits. The drawings are only used for the purpose of illustrating exemplary embodiments, and are not considered as a limitation to the present invention. Moreover, the same reference numerals are used to denote the same components throughout the drawings. In the attached picture:
图1为现有技术中的交易码的示例;Figure 1 is an example of a transaction code in the prior art;
图2为根据本发明一实施例的交易码生成方法的流程示意图;2 is a schematic flowchart of a method for generating a transaction code according to an embodiment of the present invention;
图3为根据本发明一实施例的交易码生成系统的结构示意图;Fig. 3 is a schematic structural diagram of a transaction code generation system according to an embodiment of the present invention;
图4为根据本发明一实施例的目标交易码的结构示意图;4 is a schematic diagram of the structure of a target transaction code according to an embodiment of the present invention;
图5为根据本发明一实施例的基于交易码的处理方法的流程示意图;5 is a schematic flowchart of a processing method based on transaction codes according to an embodiment of the present invention;
图6为根据本发明一实施例的交易码生成装置的结构示意图;Fig. 6 is a schematic structural diagram of a transaction code generating device according to an embodiment of the present invention;
图7为根据本发明一实施例的基于交易码的处理装置的结构示意图;FIG. 7 is a schematic structural diagram of a processing device based on a transaction code according to an embodiment of the present invention;
图8为根据本发明另一实施例的交易码生成装置的结构示意图。Fig. 8 is a schematic structural diagram of a transaction code generating device according to another embodiment of the present invention.
在附图中,相同或对应的标号表示相同或对应的部分。In the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Hereinafter, exemplary embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Although the drawings show exemplary embodiments of the present disclosure, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
在本发明中,应理解,诸如“包括”或“具有”等术语旨在指示本说明书中所公开的特征、数字、步骤、行为、部件、部分或其组合的存在,并且不旨在排除一个或多个其他特征、数字、步骤、行为、部件、部分或其组合存在的可能性。In the present invention, it should be understood that terms such as "including" or "having" are intended to indicate the existence of the features, numbers, steps, actions, components, parts, or combinations thereof disclosed in this specification, and are not intended to exclude one Or the possibility of the existence of multiple other features, numbers, steps, behaviors, components, parts or combinations thereof.
另外还需要说明的是,在不冲突的情况下,本发明中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本发明。In addition, it should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other if there is no conflict. Hereinafter, the present invention will be described in detail with reference to the drawings and in conjunction with the embodiments.
发明人提出一种交易码生成方法,当用户需要出示交易码以实现交易时,可以由用户携带的第一终端发起交易码申请,接收由第一终端发送的交易码申请,交易码申请携带第一终端的交易信息;根据交易码申请和交易码资源,生成预设序列;根据预设加密算法对预设序列进行加密处理,生成目标交易码;进而可向第一终端发送目标交易码。如此,通过加密算法对生成的预设序列进行加密而生成目标交易码,能够保证生成的目标交易码的随机性,又扩大了交易码的生成空间。The inventor proposes a transaction code generation method. When the user needs to show the transaction code to realize the transaction, the first terminal carried by the user can initiate the transaction code application, and receive the transaction code application sent by the first terminal. The transaction code application carries the first terminal Transaction information of a terminal; generate a preset sequence according to the transaction code application and transaction code resources; encrypt the preset sequence according to the preset encryption algorithm to generate a target transaction code; and then send the target transaction code to the first terminal. In this way, by encrypting the generated preset sequence with an encryption algorithm to generate the target transaction code, the randomness of the generated target transaction code can be ensured, and the generation space of the transaction code is expanded.
在介绍了本发明的基本原理之后,下面具体介绍本发明的各种非限制性实施方式。After introducing the basic principles of the present invention, various non-limiting embodiments of the present invention will be described in detail below.
图2示意性地示出了根据本发明实施方式的交易码生成方法200的流程示意图。可以理解,在该流程中,从设备角度而言,执行主体可以是一个或者多个电子设备;从程序角度而言,执行主体相应地可以是搭载于这些电子设备上的程序。FIG. 2 schematically shows a flow chart of a method 200 for generating a transaction code according to an embodiment of the present invention. It can be understood that in this process, from the perspective of the device, the execution subject may be one or more electronic devices; from the perspective of the program, the execution subject may correspondingly be the programs carried on these electronic devices.
图3示出一种示意性的交易码生成系统30,其中包含分布式部署的若干个交易码生成节点31,若干个资源节点32和若干个存储节点33,其中每个交易 码生成节点31均可以用于独立执行图2所示出的步骤。本实施例以图3中的任意一个交易码生成节点31作为执行主体对图2中的步骤201-步骤S204进行描述,但不限于此。FIG. 3 shows a schematic transaction code generation system 30, which includes a number of transaction code generation nodes 31, a number of resource nodes 32, and a number of storage nodes 33 that are distributedly deployed, wherein each transaction code generation node 31 has It can be used to perform the steps shown in Figure 2 independently. In this embodiment, any transaction code generating node 31 in FIG. 3 is used as the execution subject to describe steps 201 to S204 in FIG. 2, but it is not limited to this.
如图2所示,该方法200可以包括:As shown in FIG. 2, the method 200 may include:
步骤201、接收第一终端发送的交易码申请,交易码申请携带第一终端的交易信息;Step 201: Receive a transaction code application sent by a first terminal, where the transaction code application carries transaction information of the first terminal;
其中,第一终端可以是安装有指定APP或插件的用户终端,当用户需要向商户终端(比如POS机)出示交易码时,可以通过安装于第一终端的APP或插件向交易码生成系统发送交易码申请。交易码申请携带的第一终端的交易信息可以包括第一终端的用户信息、支付信息以及风控信息等,用户信息可以包括IP地址。Among them, the first terminal may be a user terminal installed with a designated APP or plug-in. When the user needs to show a transaction code to a merchant terminal (such as a POS machine), it may be sent to the transaction code generation system through the APP or plug-in installed in the first terminal Transaction code application. The transaction information of the first terminal carried in the transaction code application may include user information, payment information, and risk control information of the first terminal, and the user information may include an IP address.
例如,如图3所示,可以根据交易码申请中携带的第一终端的IP地址确定交易码生成系统30中部署最近的交易码生成节点31,以接收第一终端发送的交易码申请,本实施例中,利用分布式部署的交易码生成节点具有横向扩缩的能力,避免单个交易码生成节点的能力受限问题。For example, as shown in FIG. 3, the transaction code generation node 31 that is most recently deployed in the transaction code generation system 30 can be determined according to the IP address of the first terminal carried in the transaction code application to receive the transaction code application sent by the first terminal. In the embodiment, the transaction code generation node using distributed deployment has the capability of horizontal expansion and contraction, avoiding the problem of limited ability of a single transaction code generation node.
如图2所示,该方法200还可以包括:As shown in FIG. 2, the method 200 may further include:
步骤202、根据交易码申请和交易码资源,生成预设序列;Step 202: Generate a preset sequence according to the transaction code application and the transaction code resource;
在一些可能的实施方式中,为获取步骤202中的交易码资源,该方法还可以包括:接收由目标资源节点生成并发送的交易码资源,其中,目标资源节点是分布式部署的多个资源节点中的任意一个。In some possible implementation manners, in order to obtain the transaction code resource in step 202, the method may further include: receiving the transaction code resource generated and sent by the target resource node, where the target resource node is a plurality of resources deployed in a distributed manner. Any one of the nodes.
如图3所示,交易码生成系统30包含分布式部署的若干个资源节点32,每个资源节点32均可以用于独立生成并提供交易码资源。例如,其中每个资源节点可以独立管理一种或多种资源因子,比如:递增序列号、区域因子、周期因子等,并基于资源因子生成并提供交易码资源。基于此,可以在接收到交易码申请之前或之后,固定匹配/或随机匹配/或通过负载均衡算法匹配至某个资源节点作为目标资源节点,并获取由该资源节点提供的交易码资源。每个资源节点可以是一个数据中心,也可以是一个设备集群,本申请对此不作具体限制。As shown in FIG. 3, the transaction code generation system 30 includes several resource nodes 32 distributed in a distributed manner, and each resource node 32 can be used to independently generate and provide transaction code resources. For example, each resource node can independently manage one or more resource factors, such as incrementing serial numbers, regional factors, periodic factors, etc., and generate and provide transaction code resources based on the resource factors. Based on this, before or after receiving the transaction code application, fixed matching/or random matching/or matching to a certain resource node as a target resource node through a load balancing algorithm, and obtaining the transaction code resource provided by the resource node. Each resource node can be a data center or a device cluster, which is not specifically limited in this application.
在本实施方式中,通过利用分布式部署的多个资源节点负责交易码资源的管理和分配,能够获取具有重复性极低的交易码资源。并且分布式部署的资源节点具有横向扩缩的能力,避免单个资源节点的容量受限的问题。In this embodiment, by using multiple distributed resource nodes to be responsible for the management and allocation of transaction code resources, it is possible to obtain transaction code resources with extremely low repeatability. And the distributed deployment of resource nodes has the ability to expand and shrink horizontally, avoiding the problem of limited capacity of a single resource node.
在一些可能的实施方式中,该方法还可以包括:预先接收由目标资源节点生成并发送的交易码资源;和/或,响应于接收到交易码申请,向目标资源节点发送交易码资源请求,并接收由目标资源节点生成并发送的交易码资源。In some possible implementation manners, the method may further include: pre-receiving transaction code resources generated and sent by the target resource node; and/or, in response to receiving the transaction code request, sending a transaction code resource request to the target resource node, And receive the transaction code resource generated and sent by the target resource node.
具体地,在一种情况下,可以被动地从目标资源节点处预先获取一个或多个交易码资源,以便在接收交易码请求时迅速生成目标交易码并返回给用户。在另一种情况下,当接收交易码请求之后,若发现交易码资源不足,可以主动地向目标资源节点发送交易码资源请求,以实时获取由目标资源节点提供的交易码资源,以生成目标交易码并返回给用户。Specifically, in one case, one or more transaction code resources may be obtained in advance from the target resource node passively, so as to quickly generate the target transaction code and return it to the user when a transaction code request is received. In another case, after receiving the transaction code request, if the transaction code resource is found to be insufficient, you can actively send the transaction code resource request to the target resource node to obtain the transaction code resource provided by the target resource node in real time to generate the target The transaction code is returned to the user.
在一些可能的实施方式中,交易码资源包括:用于指示目标资源节点的区域因子;由目标资源节点维护的递增序列号;用于指示交易码资源的交易周期的周期因子;根据周期因子而更新的密钥。In some possible implementations, the transaction code resource includes: a regional factor used to indicate the target resource node; an incremental sequence number maintained by the target resource node; a period factor used to indicate the transaction cycle of the transaction code resource; The updated key.
具体地,区域因子可根据目标资源节点的唯一标识而确定,例如,如图3所示,交易码生成系统30包含的多个资源节点31分别具有标识1~9,其中假设其中具有标识3的资源节点为目标资源节点,则可确定区域因子A=3。在图3中的交易码生成系统30中,多个资源节点中的每个资源节点独立维护一组递增序列号,不同资源节点之间维护的递增序列号可以相同也可以不同,本实施例中交易码资源中携带的递增序列号来自目标资源节点,例如递增序列号C=123456789。周期因子用于指示交易码资源的交易周期。例如,可以根据某个初始时间为起点按照每十天作为一个循环,预设每个循环中第一天的周期因子为1,第二天的周期因子为2,并依次类推。为保证交易码资源的充足,目标资源节点可以预先提供后一天(例如,2019年11月11日)所需的交易码资源,具体可以计算2019年11月11日距离某个初始时间(比如1970年1月1日)的天数模10得到该周期因子,例如周期因子D=1。还例如,也可以根据某个初始时间为起点按照每周作为一个循环,则可以按照周一、周二、…周日来确定 周期因子,周一对应的周期因子为1,周一对应的周期因子为2,并以此类推。密钥随周期因子的变化而更新,每个周期因子下所采用的密钥是相同的,为保障随机性,每个周期因子下所采用的密钥可定期更换。Specifically, the area factor can be determined according to the unique identifier of the target resource node. For example, as shown in FIG. 3, the multiple resource nodes 31 included in the transaction code generation system 30 have identifiers 1-9, respectively. If the resource node is the target resource node, the area factor A=3 can be determined. In the transaction code generation system 30 in FIG. 3, each of the multiple resource nodes independently maintains a set of incremental sequence numbers, and the incremental sequence numbers maintained between different resource nodes may be the same or different. In this embodiment The incremental sequence number carried in the transaction code resource comes from the target resource node, for example, the incremental sequence number C=123456789. The cycle factor is used to indicate the transaction cycle of the transaction code resource. For example, based on a certain initial time as a starting point, every ten days can be used as a cycle, and the cycle factor on the first day of each cycle is preset to be 1, the cycle factor on the second day is 2, and so on. In order to ensure sufficient transaction code resources, the target resource node can provide the transaction code resources required for the next day (for example, November 11, 2019) in advance. Specifically, it can be calculated that the distance between November 11, 2019 and a certain initial time (for example, 1970) The period factor is obtained by modulo 10. The period factor is D=1. For another example, it is also possible to use a certain initial time as the starting point and to use each week as a cycle, then the cycle factor can be determined according to Monday, Tuesday, ... Sunday, the cycle factor corresponding to Monday is 1, and the cycle factor corresponding to Monday is 2. And so on. The key is updated with the change of the cycle factor. The key used under each cycle factor is the same. To ensure randomness, the key used under each cycle factor can be replaced periodically.
在一些可能的实施方式中,交易码资源在周期因子所指示交易周期结束后失效。例如,当获取的交易码资源中携带的周期因子指示的交易周期对应于2019年11月11日,则该交易码资源在2019年11月11日结束后失效。In some possible implementations, the transaction code resource becomes invalid after the end of the transaction period indicated by the period factor. For example, when the transaction cycle indicated by the cycle factor carried in the acquired transaction code resource corresponds to November 11, 2019, the transaction code resource becomes invalid after the end of November 11, 2019.
在一些可能的实施方式中,该步骤202,还可以包括:根据当前本地时间确定时间因子;将区域因子、时间因子、递增序列号以及周期因子组合成为唯一的预设序列。In some possible implementation manners, this step 202 may further include: determining a time factor according to the current local time; combining the regional factor, the time factor, the incrementing sequence number, and the periodic factor into a unique preset sequence.
具体地,时间因子通常取当前本地时间距离某个初始时间的秒数距离。例如,初始时间可以是当日的零点等。若生成目标交易码的当前本地时间为:2019年11月11日9点00分00秒,根据该当前本地时间计算其距离2019年11月11日0点的秒数,取得时间因子B=32400。Specifically, the time factor is usually the distance in seconds between the current local time and a certain initial time. For example, the initial time may be zero o'clock of the day, etc. If the current local time when the target transaction code is generated is: November 11, 2019, 9:00: 00 seconds, calculate the number of seconds from 0: 00 on November 11, 2019 according to the current local time, and obtain the time factor B = 32400 .
例如,若区域因子A=3,时间因子B=32400,递增序列号C=123456789,周期因子D=1,那么可以将上述ABCD组合为预设序列:3324001234567891。由于上述多个因子的组合具有唯一性,因此该预设序列具有唯一性。For example, if the area factor A=3, the time factor B=32400, the increasing sequence number C=123456789, and the period factor D=1, then the above ABCD can be combined into a preset sequence: 3324001234567891. Since the combination of the above multiple factors is unique, the preset sequence is unique.
如图2所示,该方法200还可以包括:As shown in FIG. 2, the method 200 may further include:
步骤203、根据预设加密算法对预设序列进行加密处理,生成目标交易码;Step 203: Perform encryption processing on the preset sequence according to the preset encryption algorithm to generate a target transaction code;
在一些可能的实施方式中,加密算法具备保留格式加密功能,为对称加密算法。In some possible implementation manners, the encryption algorithm has a format-preserving encryption function, and is a symmetric encryption algorithm.
在一些可能的实施方式中,上述步骤203,还可以包括:根据加密算法和密钥对预设序列进行加密处理,得到目标交易码。其中,上述密钥为交易码资源中所携带的密钥。In some possible implementation manners, the above step 203 may further include: performing encryption processing on the preset sequence according to the encryption algorithm and the key to obtain the target transaction code. Wherein, the above-mentioned key is the key carried in the transaction code resource.
具体地,密钥为交易码资源中携带的密钥。例如,假设由区域因子A=3,时间因子B=32400,递增序列号C=123456789,周期因子D=1组合为预设序列:3324001234567891。进而可以基于交易码资源中的密钥对预设序列:3324001234567891整体进行加密,并结合标识头(比如26)得到目标交易码。Specifically, the key is the key carried in the transaction code resource. For example, suppose that the area factor A=3, the time factor B=32400, the increasing sequence number C=123456789, and the period factor D=1 are combined into a preset sequence: 3324001234567891. Furthermore, the preset sequence: 3324001234567891 can be encrypted based on the key in the transaction code resource, and the target transaction code can be obtained in combination with the identification header (for example, 26).
在一些可能的实施方式中,上述步骤203,还可以包括:确定预设序列的第一部分序列,第一部分序列包括区域因子、时间因子以及递增序列号的前N位,N为正整数;根据密钥对第一部分序列进行加密处理以得到随机序列;确定预设序列的第二部分序列,第二部分序列包括递增序列号的第(N+1)位~末位以及周期因子;根据预设标志头、随机序列以及第二部分序列组成目标交易码。In some possible implementation manners, the above step 203 may further include: determining the first partial sequence of the preset sequence, the first partial sequence includes the area factor, the time factor, and the first N bits of the increasing sequence number, where N is a positive integer; The key encrypts the first partial sequence to obtain a random sequence; determines the second partial sequence of the preset sequence, the second partial sequence includes the (N+1)th to the last bit of the increasing sequence number and the cycle factor; according to the preset flag The header, the random sequence, and the second part of the sequence constitute the target transaction code.
例如,如图4所示,假设由区域因子A=3,时间因子B=32400,递增序列号C=123456789,周期因子D=1组合为16位的预设序列:3324001234567891。进而可以由区域因子、时间因子以及递增序列号的前7位数字组合作为13位的第一部分序列:3324001234567,根据密钥对第一部分序列进行保留格式加密处理得到13位的随机序列:76285894725,根据递增序列号的第(N+1)位~末位以及周期因子组合为3位的第二部分序列:891。根据预设标志头(26)、随机序列(7628589472567)以及第二部分序列(891)组成目标交易码为:267628589472567891。应当理解,上述标志头、区域因子、时间因子、递增序列、周期因子的位数是根据实践预设的经验值,可以根据实际需求相应调整。For example, as shown in Figure 4, suppose that the area factor A=3, the time factor B=32400, the increasing sequence number C=123456789, and the period factor D=1 are combined into a 16-bit preset sequence: 3324001234567891. Furthermore, the first 7-digit combination of the regional factor, the time factor and the increasing serial number can be used as the 13-digit first partial sequence: 3324001234567, and the first partial sequence is encrypted according to the key to obtain a 13-digit random sequence: 76285894725, according to The combination of the (N+1)th to the last digit of the increasing sequence number and the period factor is a 3-digit second partial sequence: 891. According to the preset flag header (26), the random sequence (7628589472567) and the second partial sequence (891), the target transaction code is formed as: 267628589472567891. It should be understood that the digits of the aforementioned flag header, area factor, time factor, increasing sequence, and period factor are preset empirical values according to practice, and can be adjusted accordingly according to actual needs.
如图2所示,该方法200还可以包括:As shown in FIG. 2, the method 200 may further include:
步骤S204、向第一终端发送目标交易码。Step S204: Send the target transaction code to the first terminal.
可选地,如图3所示,交易码生成系统30还包括分布式部署的多个存储节点33,用于存储目标交易码和第一终端的交易信息,以便于其他设备通过第一终端获取目标交易码之后,能够基于获取的目标交易码从该存储节点获取匹配的第一终端的交易信息,并进行交易验证。Optionally, as shown in FIG. 3, the transaction code generation system 30 further includes a plurality of storage nodes 33 distributed in a distributed manner, which are used to store the target transaction code and the transaction information of the first terminal, so that other devices can obtain it through the first terminal. After the target transaction code, the transaction information of the matched first terminal can be obtained from the storage node based on the obtained target transaction code, and transaction verification can be performed.
在一些可能的实施方式中,若该目标交易码是基于交易码资源中的密钥对预设序列整体进行加密而获得的,该步骤S204还可以包括:对目标交易码进行哈希处理,根据哈希处理后的值在分布式部署的多个存储节点中确定目标存储节点,并将目标交易码和第一终端的交易信息存储到目标存储节点。通过这种实施方式,当另一设备通过第一终端获取该目标交易码之后,能够对目标交易码执行同样的哈希处理,并根据哈希处理后的值在分布式部署的多个存储节点 中找到用于存储目标交易码和第一终端的交易信息的目标存储节点,进而可以通过目标交易码的验证匹配获取该第一终端的交易信息。In some possible implementations, if the target transaction code is obtained by encrypting the entire preset sequence based on the key in the transaction code resource, this step S204 may also include: hashing the target transaction code, according to The hashed value determines the target storage node among the multiple storage nodes deployed in a distributed manner, and stores the target transaction code and the transaction information of the first terminal in the target storage node. Through this implementation, after another device obtains the target transaction code through the first terminal, it can perform the same hash processing on the target transaction code, and based on the hashed value, it can be deployed on multiple storage nodes in a distributed manner. A target storage node for storing the target transaction code and the transaction information of the first terminal is found in, and then the transaction information of the first terminal can be obtained through verification and matching of the target transaction code.
在一些可能的实施方式中,若该目标交易码是根据预设标志头、随机序列以及第二部分序列组成的,该步骤S204还可以包括:根据第二部分序列在分布式部署的多个存储节点中确定目标存储节点,并将目标交易码以及第一终端的交易信息存储到目标存储节点。In some possible implementations, if the target transaction code is composed according to a preset flag header, a random sequence, and a second partial sequence, the step S204 may further include: multiple stores deployed in a distributed manner according to the second partial sequence The target storage node is determined in the node, and the target transaction code and the transaction information of the first terminal are stored in the target storage node.
例如,如图4所示,针对根据预设标志头(26)、随机序列(7628589472567)以及第二部分序列(891)组成的目标交易码为:267628589472567891。则可以利用第二部分序列(891)从分布式部署的多个存储节点中确定唯一对应的目标存储节点,并将目标交易码和第一终端的交易信息存储到目标存储节点。通过这种实施方式,当另一设备通过第一终端获取该目标交易码之后,能够从目标交易码中提取该第二部分序列(891),并根据该第二部分序列(891)在分布式部署的多个存储节点中找到用于存储目标交易码和第一终端的交易信息的目标存储节点,进而可以通过目标交易码的验证匹配获取该第一终端的交易信息。For example, as shown in Figure 4, the target transaction code composed of the preset flag header (26), the random sequence (7628589472567), and the second partial sequence (891) is: 267628589472567891. Then, the second partial sequence (891) can be used to determine the uniquely corresponding target storage node from the multiple storage nodes deployed in a distributed manner, and store the target transaction code and the transaction information of the first terminal in the target storage node. Through this implementation, after another device obtains the target transaction code through the first terminal, the second partial sequence (891) can be extracted from the target transaction code, and the second partial sequence (891) can be used in the distributed system according to the second partial sequence (891). The target storage node for storing the target transaction code and the transaction information of the first terminal is found among the deployed storage nodes, and the transaction information of the first terminal can be obtained through verification and matching of the target transaction code.
在一些可能的实施方式中,若交易码申请为批量交易码申请,步骤S204还可以包括:根据交易码申请和交易码资源批量生成预设序列,其中递增序列号的前N位中包含用于指示批量序号的预设位;根据批量的预设序列获取批量的目标交易码,将批量的目标交易码发送给第一终端,并使批量的目标交易码均存储到目标存储节点。In some possible implementation manners, if the transaction code application is a batch transaction code application, step S204 may further include: generating a preset sequence in batches according to the transaction code application and the transaction code resource, where the first N bits of the incremental sequence number include Indicate the preset position of the batch sequence number; obtain batch target transaction codes according to the batch preset sequence, send the batch target transaction codes to the first terminal, and store the batch target transaction codes in the target storage node.
例如,若第一终端发送的交易码申请请求批量申请90个目标交易码,针对这种批量交易码申请,可以采用单个交易码资源批量生成多个目标交易码,将区域因子、时间因子、递增序列号以及周期因子组合成为唯一的预设序列。在递增序列号的前N位中(也即上述第一部分序列中的递增序列号中),根据需求将递增序列号的前2位拆分出来用于存放批量序列,批量序列例如包括01,02,…,90,用于分别指示批量目标交易码中的每一个,且预设序列中的其余数字保持一致。基于上述组合批量产生的多个预设序列,进一步地,可以同样确定递增序列号的第(N+1)位~末位以及周期因子为第二部分序列;根据第二部 分序列在分布式部署的多个存储节点中确定目标存储节点,并将目标交易码以及第一终端的交易信息存储到目标存储节点。由于批量产生的多个目标交易码具有完全一致的第二部分序列,因此可以将批量产生的目标交易码保存在同一个存储节点。For example, if the transaction code application sent by the first terminal requests a batch application of 90 target transaction codes, for this type of batch transaction code application, a single transaction code resource can be used to generate multiple target transaction codes in batches, and the area factor, time factor, and increment The combination of sequence number and periodicity factor becomes a unique preset sequence. In the first N bits of the increasing sequence number (that is, in the increasing sequence number in the first part of the sequence), the first 2 bits of the increasing sequence number are split out to store the batch sequence according to requirements. The batch sequence includes, for example, 01, 02 ,...,90, used to indicate each of the batch target transaction codes separately, and the remaining numbers in the preset sequence remain the same. Based on the multiple preset sequences generated in batches by the above combination, further, the (N+1)th to the last position of the incremental sequence number and the cycle factor can also be determined as the second partial sequence; according to the second partial sequence in distributed deployment The target storage node is determined from the plurality of storage nodes, and the target transaction code and the transaction information of the first terminal are stored in the target storage node. Since multiple target transaction codes generated in batches have a completely consistent second partial sequence, the target transaction codes generated in batches can be stored in the same storage node.
在一些可能的实施方式中,存储至目标存储节点的目标交易码携带有效期信息。目标存储节点在存储的目标交易码超过其有效期时执行删除操作。In some possible implementations, the target transaction code stored in the target storage node carries validity period information. The target storage node executes the deletion operation when the stored target transaction code exceeds its validity period.
图5示出一种基于交易码的处理方法500,其特征在于,包括:FIG. 5 shows a processing method 500 based on transaction codes, which is characterized in that it includes:
步骤501:接收第二终端发送的查询请求,其中查询请求携带目标交易码;Step 501: Receive a query request sent by a second terminal, where the query request carries the target transaction code;
具体地,第二终端可以是安装有指定APP或插件的商户终端,比如可以是POS机。可以利用图2所示出方法生成目标交易码并发送给第一终端,然后第二终端通过第一终端获得该目标交易码。比如,第一终端可以将目标交易码转换为图形码、二维码等形式并显示在其屏幕上,然后由第二终端对第一终端进行扫描获得该目标交易码。第二终端在获取目标交易码之后向系统发起查询请求,用于携带目标交易码向系统请求与该目标交易码对应的第一终端的交易信息。Specifically, the second terminal may be a merchant terminal installed with a designated APP or plug-in, for example, it may be a POS machine. The method shown in FIG. 2 can be used to generate the target transaction code and send it to the first terminal, and then the second terminal obtains the target transaction code through the first terminal. For example, the first terminal may convert the target transaction code into a graphic code, a two-dimensional code, etc. and display it on its screen, and then the second terminal scans the first terminal to obtain the target transaction code. After obtaining the target transaction code, the second terminal initiates a query request to the system, which is used to carry the target transaction code and request the system for transaction information of the first terminal corresponding to the target transaction code.
步骤502:根据目标交易码确定第一终端的交易信息,并将第一终端的交易信息发送给第二终端,使第二终端基于第一终端的交易信息完成交易;Step 502: Determine the transaction information of the first terminal according to the target transaction code, and send the transaction information of the first terminal to the second terminal, so that the second terminal completes the transaction based on the transaction information of the first terminal;
具体地,在接收到第二终端发送的查询请求之后,可以根据目标交易码和第一终端的交易信息的存储规则,对应地从分布式部署的多个存储节点中找到存储有该目标交易码和第一终端的交易信息的目标存储节点。例如,可以对目标交易码执行预设哈希处理,并根据哈希处理后的值在分布式部署的多个存储节点中找到用于存储目标交易码和第一终端的交易信息的目标存储节点,进而可以通过目标交易码的验证匹配获取该第一终端的交易信息。又例如,可以从目标交易码中提取第二部分序列,并根据该第二部分序列在分布式部署的多个存储节点中找到用于存储目标交易码和第一终端的交易信息的目标存储节点,进而可以通过目标交易码的验证匹配获取该第一终端的交易信息。此外,查询请求可以携带用途信息,进而可以根据第二终端发送的用途信息以及存储的第 一终端的交易信息进行用途验证,若用途验证结果不符合预设,则可以向第二终端发送交易失败信息。Specifically, after receiving the query request sent by the second terminal, according to the target transaction code and the storage rules of the transaction information of the first terminal, the target transaction code can be correspondingly found from the multiple storage nodes deployed in a distributed manner. The target storage node of the transaction information with the first terminal. For example, it is possible to perform preset hash processing on the target transaction code, and find the target storage node used to store the target transaction code and the transaction information of the first terminal among the multiple storage nodes deployed in a distributed manner according to the hashed value. Then, the transaction information of the first terminal can be obtained through verification and matching of the target transaction code. For another example, the second partial sequence can be extracted from the target transaction code, and the target storage node for storing the target transaction code and the transaction information of the first terminal can be found among the multiple storage nodes deployed in a distributed manner according to the second partial sequence. Then, the transaction information of the first terminal can be obtained through verification and matching of the target transaction code. In addition, the query request can carry usage information, and then the usage verification can be performed based on the usage information sent by the second terminal and the stored transaction information of the first terminal. If the usage verification result does not meet the preset, the transaction failure can be sent to the second terminal information.
基于相同的技术构思,本发明实施例还提供一种交易码生成系统30。图3为本发明实施例提供的一种交易码生成系统30的结构示意图。交易码生成系统30其中包含分布式部署的若干个交易码生成节点31,若干个资源节点32和若干个存储节点33,其中每个交易码生成节点31均可以用于独立执行图2所示出的步骤。Based on the same technical concept, the embodiment of the present invention also provides a transaction code generation system 30. FIG. 3 is a schematic structural diagram of a transaction code generation system 30 provided by an embodiment of the present invention. The transaction code generation system 30 includes a number of transaction code generation nodes 31, a number of resource nodes 32 and a number of storage nodes 33 that are distributedly deployed, and each transaction code generation node 31 can be used to independently execute the code shown in Figure 2 A step of.
基于相同的技术构思,本发明实施例还提供一种交易码生成装置,用于执行上述任一实施例所提供的交易码生成方法。图6为本发明实施例提供的一种装置结构示意图。Based on the same technical concept, an embodiment of the present invention also provides a transaction code generation device for executing the transaction code generation method provided in any of the foregoing embodiments. Fig. 6 is a schematic structural diagram of an apparatus provided by an embodiment of the present invention.
如图6所示,装置600包括:As shown in FIG. 6, the apparatus 600 includes:
接收单元601,用于接收第一终端发送的交易码申请,交易码申请携带第一终端的交易信息;The receiving unit 601 is configured to receive a transaction code application sent by the first terminal, where the transaction code application carries transaction information of the first terminal;
序列单元602,用于根据交易码申请和交易码资源生成预设序列;The sequence unit 602 is configured to generate a preset sequence according to the transaction code application and transaction code resources;
加密单元603,用于根据预设加密算法对预设序列进行加密处理,生成目标交易码;The encryption unit 603 is configured to perform encryption processing on the preset sequence according to the preset encryption algorithm to generate a target transaction code;
发送单元604,用于向第一终端发送目标交易码。The sending unit 604 is configured to send the target transaction code to the first terminal.
在一种可能的实施方式中,该序列单元602还用于:接收由目标资源节点生成并发送的交易码资源,其中,目标资源节点是分布式部署的多个资源节点中的任意一个。In a possible implementation manner, the sequence unit 602 is further configured to receive transaction code resources generated and sent by a target resource node, where the target resource node is any one of a plurality of resource nodes deployed in a distributed manner.
在一种可能的实施方式中,交易码资源包括:用于指示目标资源节点的区域因子;由目标资源节点维护的递增序列号;用于指示交易码资源的交易周期的周期因子;根据周期因子而更新的密钥。In a possible implementation, the transaction code resource includes: an area factor used to indicate the target resource node; an incremental sequence number maintained by the target resource node; a period factor used to indicate the transaction cycle of the transaction code resource; according to the period factor And the updated key.
在一种可能的实施方式中,序列单元602,还用于:根据当前本地时间确定时间因子;将区域因子、时间因子、递增序列号以及周期因子组合成为唯一的预设序列。In a possible implementation manner, the sequence unit 602 is further configured to: determine the time factor according to the current local time; combine the regional factor, the time factor, the incremental sequence number, and the periodic factor into a unique preset sequence.
在一种可能的实施方式中,交易码资源在周期因子所指示的交易周期结束后失效。In a possible implementation manner, the transaction code resource becomes invalid after the end of the transaction period indicated by the period factor.
在一种可能的实施方式中,序列单元602,还用于:在接收第一终端发送的交易码申请之前,预先接收由目标资源节点生成并发送的交易码资源;和/或,响应于接收到交易码申请,向目标资源节点发送交易码资源请求,并接收由目标资源节点生成并发送的交易码资源。In a possible implementation manner, the sequence unit 602 is further configured to: before receiving the transaction code application sent by the first terminal, pre-receive the transaction code resource generated and sent by the target resource node; and/or, in response to receiving To the transaction code application, send a transaction code resource request to the target resource node, and receive the transaction code resource generated and sent by the target resource node.
在一种可能的实施方式中,加密单元603还用于:确定预设序列的第一部分序列,第一部分序列包括区域因子、时间因子以及递增序列号的前N位,N为正整数;根据密钥对第一部分序列进行加密处理以得到随机序列;确定预设序列的第二部分序列,第二部分序列包括递增序列号的第(N+1)位~末位以及周期因子;根据预设标志头、随机序列以及第二部分序列组成目标交易码。In a possible implementation, the encryption unit 603 is further configured to: determine the first partial sequence of the preset sequence, the first partial sequence includes the area factor, the time factor, and the first N bits of the increasing sequence number, where N is a positive integer; The key encrypts the first partial sequence to obtain a random sequence; determines the second partial sequence of the preset sequence, the second partial sequence includes the (N+1)th to the last bit of the increasing sequence number and the cycle factor; according to the preset flag The header, the random sequence, and the second part of the sequence constitute the target transaction code.
在一种可能的实施方式中,还包括存储单元,用于:根据第二部分序列在分布式部署的多个存储节点中确定目标存储节点,并将目标交易码以及第一终端的交易信息存储到目标存储节点。In a possible implementation manner, a storage unit is further included for: determining a target storage node among the plurality of storage nodes deployed in a distributed manner according to the second partial sequence, and storing the target transaction code and the transaction information of the first terminal Go to the target storage node.
在一种可能的实施方式中,若交易码申请为批量交易码申请,装置还用于:根据交易码申请和交易码资源批量生成预设序列,其中递增序列号的前N位中包含用于指示批量序号的预设位;根据批量的预设序列获取批量的目标交易码,将批量的目标交易码发送给第一终端,并使批量的目标交易码均存储到目标存储节点。In a possible implementation, if the transaction code application is a batch transaction code application, the device is also used to: generate a preset sequence in batches according to the transaction code application and transaction code resources, where the first N bits of the incremental sequence number include Indicate the preset position of the batch sequence number; obtain batch target transaction codes according to the batch preset sequence, send the batch target transaction codes to the first terminal, and store the batch target transaction codes in the target storage node.
在一种可能的实施方式中,根据预设加密算法对预设序列进行加密处理,生成目标交易码,包括:根据加密算法和密钥对预设序列进行加密处理,得到目标交易码。In a possible implementation manner, encrypting the preset sequence according to the preset encryption algorithm to generate the target transaction code includes: encrypting the preset sequence according to the encryption algorithm and the key to obtain the target transaction code.
在一种可能的实施方式中,存储单元还用于还包括:对目标交易码进行哈希处理,根据哈希处理后的值在分布式部署的多个存储节点中确定目标存储节点,并将目标交易码和第一终端的交易信息存储到目标存储节点。In a possible implementation manner, the storage unit is further configured to further include: hashing the target transaction code, determining the target storage node among the multiple storage nodes deployed in a distributed manner according to the hashed value, and The target transaction code and the transaction information of the first terminal are stored in the target storage node.
在一种可能的实施方式中,加密算法具备保留格式加密功能,加密算法为对称加密算法。In a possible implementation manner, the encryption algorithm has a format-preserving encryption function, and the encryption algorithm is a symmetric encryption algorithm.
在一种可能的实施方式中,存储至目标存储节点的目标交易码携带有效期信息。In a possible implementation, the target transaction code stored in the target storage node carries validity period information.
基于相同的技术构思,本发明实施例还提供一种基于交易码的处理装置,用于执行上述任一实施例所提供的基于交易码的处理方法。图7为本发明实施例提供的一种基于交易码的处理装置700的结构示意图。Based on the same technical concept, an embodiment of the present invention also provides a transaction code-based processing device for executing the transaction code-based processing method provided in any of the foregoing embodiments. FIG. 7 is a schematic structural diagram of a processing device 700 based on a transaction code provided by an embodiment of the present invention.
如图7所示,装置700包括:As shown in FIG. 7, the apparatus 700 includes:
查询接收单元701,用于接收第二终端发送的查询请求,其中查询请求携带目标交易码;The query receiving unit 701 is configured to receive a query request sent by the second terminal, where the query request carries a target transaction code;
交易信息发送单元702,用于根据目标交易码确定第一终端的交易信息,并将第一终端的交易信息发送给第二终端,使第二终端基于第一终端的交易信息完成交易;The transaction information sending unit 702 is configured to determine the transaction information of the first terminal according to the target transaction code, and send the transaction information of the first terminal to the second terminal, so that the second terminal completes the transaction based on the transaction information of the first terminal;
其中,目标交易码利用如图6示出装置生成并发送给第一终端,然后由第二终端通过第一终端获得。Wherein, the target transaction code is generated by the device shown in FIG. 6 and sent to the first terminal, and then obtained by the second terminal through the first terminal.
需要说明的是,本申请实施例中的交易码生成装置和基于交易码的处理装置分别可以实现前述交易码生成方法和基于交易码的处理方法的实施例的各个过程,并达到相同的效果和功能,这里不再赘述。It should be noted that the transaction code generation device and the transaction code-based processing device in the embodiments of the present application can respectively implement the processes of the foregoing transaction code generation method and transaction code-based processing method embodiments, and achieve the same effect and Function, I won’t go into details here.
图8为根据本申请一实施例的交易码生成装置,用于执行图2所示出的交易码生成方法,该装置包括:至少一个处理器;以及,与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行:FIG. 8 is a transaction code generation device according to an embodiment of the present application, which is used to execute the transaction code generation method shown in FIG. 2, and the device includes: at least one processor; and a memory communicatively connected with the at least one processor; The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor, so that the at least one processor can execute:
接收第一终端发送的交易码申请,交易码申请携带第一终端的交易信息;根据交易码申请和交易码资源,生成预设序列;根据预设加密算法对预设序列进行加密处理,生成目标交易码;向第一终端发送目标交易码,并存储目标交易码和第一终端的交易信息。Receive the transaction code application sent by the first terminal, the transaction code application carries the transaction information of the first terminal; generate the preset sequence according to the transaction code application and the transaction code resource; encrypt the preset sequence according to the preset encryption algorithm, and generate the target Transaction code: Send the target transaction code to the first terminal, and store the target transaction code and the transaction information of the first terminal.
根据本申请的一些实施例,提供了交易码生成方法的非易失性计算机存储介质,其上存储有计算机可执行指令,该计算机可执行指令设置为在由处理器运行时执行:According to some embodiments of the present application, a non-volatile computer storage medium of a method for generating a transaction code is provided, and computer-executable instructions are stored thereon, and the computer-executable instructions are set to be executed when run by a processor:
接收第一终端发送的交易码申请,交易码申请携带第一终端的交易信息;根据交易码申请和交易码资源,生成预设序列;根据预设加密算法对预设序列进行加密处理,生成目标交易码;向第一终端发送目标交易码,并存储目标交易码和第一终端的交易信息。Receive the transaction code application sent by the first terminal, the transaction code application carries the transaction information of the first terminal; generate the preset sequence according to the transaction code application and the transaction code resource; encrypt the preset sequence according to the preset encryption algorithm, and generate the target Transaction code: Send the target transaction code to the first terminal, and store the target transaction code and the transaction information of the first terminal.
本申请中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、设备和计算机可读存储介质实施例而言,由于其基本相似于方法实施例,所以其描述进行了简化,相关之处可参见方法实施例的部分说明即可。The various embodiments in this application are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, device, and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, their descriptions are simplified, and for related parts, please refer to the part of the description of the method embodiments.
本申请实施例提供的装置、设备和计算机可读存储介质与方法是一一对应的,因此,装置、设备和计算机可读存储介质也具有与其对应的方法类似的有益技术效果,由于上面已经对方法的有益技术效果进行了详细说明,因此,这里不再赘述装置、设备和计算机可读存储介质的有益技术效果。The apparatus, equipment, and computer-readable storage medium provided in the embodiments of the present application correspond to the method in a one-to-one manner. Therefore, the apparatus, equipment, and computer-readable storage medium also have beneficial technical effects similar to their corresponding methods. The beneficial technical effects of the method are described in detail, and therefore, the beneficial technical effects of the device, equipment and computer-readable storage medium are not repeated here.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are used to generate It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment. The instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。此外,尽管在附图中以特定顺序描述了本发明方法的操作,但是,这并非要求或者暗示必须按照该特定顺序来执行这些操作,或是必须执行全部所示的操作才能实现期望的结果。附加地或备选地,可以省略某些步骤,将多个步骤合并为一个步骤执行,和/或将一个步骤分解为多个步骤执行。Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. In addition, although the operations of the method of the present invention are described in a specific order in the drawings, this does not require or imply that these operations must be performed in the specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and/or one step may be decomposed into multiple steps for execution.
虽然已经参考若干具体实施方式描述了本发明的精神和原理,但是应该理解,本发明并不限于所公开的具体实施方式,对各方面的划分也不意味着这些方面中的特征不能组合以进行受益,这种划分仅是为了表述的方便。本发明旨在涵盖所附权利要求的精神和范围内所包括的各种修改和等同布置。Although the spirit and principle of the present invention have been described with reference to several specific embodiments, it should be understood that the present invention is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined for performance. Benefit, this division is only for the convenience of presentation. The present invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (31)

  1. 一种交易码生成方法,其特征在于,包括:A method for generating transaction codes is characterized in that it comprises:
    接收第一终端发送的交易码申请,所述交易码申请携带所述第一终端的交易信息;Receiving a transaction code application sent by a first terminal, the transaction code application carrying transaction information of the first terminal;
    根据所述交易码申请和交易码资源,生成预设序列;Generate a preset sequence according to the transaction code application and the transaction code resource;
    根据预设加密算法对所述预设序列进行加密处理,生成目标交易码;Performing encryption processing on the preset sequence according to a preset encryption algorithm to generate a target transaction code;
    向所述第一终端发送所述目标交易码。Sending the target transaction code to the first terminal.
  2. 根据权利要求1所述的方法,其特征在于,还包括:The method according to claim 1, further comprising:
    接收由目标资源节点生成并发送的所述交易码资源,其中,所述目标资源节点是分布式部署的多个资源节点中的任意一个。Receive the transaction code resource generated and sent by a target resource node, where the target resource node is any one of a plurality of resource nodes deployed in a distributed manner.
  3. 根据权利要求2所述的方法,其特征在于,所述交易码资源包括:用于指示所述目标资源节点的区域因子;由所述目标资源节点维护的递增序列号;用于指示所述交易码资源的交易周期的周期因子;根据所述周期因子而更新的密钥。The method according to claim 2, wherein the transaction code resource comprises: an area factor used to indicate the target resource node; an incremental sequence number maintained by the target resource node; used to indicate the transaction The cycle factor of the transaction cycle of the code resource; the key updated according to the cycle factor.
  4. 根据权利要求3所述的方法,其特征在于,根据所述交易码申请和交易码资源生成预设序列,包括:The method according to claim 3, wherein generating a preset sequence according to the transaction code application and the transaction code resource comprises:
    根据当前本地时间确定时间因子;Determine the time factor according to the current local time;
    将所述区域因子、所述时间因子、所述递增序列号以及所述周期因子组合成为唯一的预设序列。The area factor, the time factor, the increasing sequence number, and the period factor are combined into a unique preset sequence.
  5. 根据权利要求3所述的方法,其特征在于,所述交易码资源在所述周期因子所指示的交易周期结束后失效。The method according to claim 3, wherein the transaction code resource becomes invalid after the transaction period indicated by the period factor ends.
  6. 根据权利要求2所述的方法,其特征在于,还包括:The method according to claim 2, further comprising:
    在接收第一终端发送的交易码申请之前,预先接收由目标资源节点生成并发送的所述交易码资源;和/或,Before receiving the transaction code application sent by the first terminal, pre-receive the transaction code resource generated and sent by the target resource node; and/or,
    响应于接收到所述交易码申请,向所述目标资源节点发送交易码资源请求,并接收由目标资源节点生成并发送的所述交易码资源。In response to receiving the transaction code application, a transaction code resource request is sent to the target resource node, and the transaction code resource generated and sent by the target resource node is received.
  7. 根据权利要求4所述的方法,其特征在于,根据预设加密算法对所述预设序列进行加密处理,生成目标交易码,包括:The method according to claim 4, wherein the step of encrypting the preset sequence according to a preset encryption algorithm to generate a target transaction code comprises:
    确定所述预设序列的第一部分序列,所述第一部分序列包括所述区域因子、所述时间因子以及所述递增序列号的前N位,N为正整数;Determining a first partial sequence of the preset sequence, the first partial sequence including the area factor, the time factor, and the first N digits of the increasing sequence number, where N is a positive integer;
    根据所述密钥对所述第一部分序列进行加密处理以得到随机序列;Performing encryption processing on the first partial sequence according to the key to obtain a random sequence;
    确定所述预设序列的第二部分序列,所述第二部分序列包括所述递增序列号的第(N+1)位~末位以及所述周期因子;Determining a second partial sequence of the preset sequence, the second partial sequence including the (N+1)th to the last position of the increasing sequence number and the period factor;
    根据预设标志头、所述随机序列以及所述第二部分序列组成所述目标交易码。The target transaction code is formed according to the preset flag header, the random sequence, and the second partial sequence.
  8. 根据权利要求7所述的方法,其特征在于,还包括:The method according to claim 7, further comprising:
    根据所述第二部分序列在分布式部署的多个存储节点中确定目标存储节点,并将所述目标交易码以及所述第一终端的交易信息存储到所述目标存储节点。According to the second partial sequence, a target storage node is determined among a plurality of storage nodes deployed in a distributed manner, and the target transaction code and transaction information of the first terminal are stored in the target storage node.
  9. 根据权利要求8所述的方法,其特征在于,若所述交易码申请为批量交易码申请,所述方法还包括:The method according to claim 8, wherein if the transaction code application is a batch transaction code application, the method further comprises:
    根据所述交易码申请和所述交易码资源批量生成所述预设序列,其中所述递增序列号的前N位中包含用于指示批量序号的预设位;Generating the preset sequence in batches according to the transaction code application and the transaction code resource, wherein the first N bits of the incremental sequence number include a preset bit for indicating a batch sequence number;
    根据所述批量的预设序列获取批量的目标交易码,将所述批量的目标交易码发送给所述第一终端,并使所述批量的目标交易码均存储到所述目标存储节点。Obtain batches of target transaction codes according to the preset sequence of the batch, send the batches of target transaction codes to the first terminal, and store all the batches of target transaction codes in the target storage node.
  10. 根据权利要求4所述的方法,其特征在于,根据预设加密算法对所述预设序列进行加密处理,生成目标交易码,包括:The method according to claim 4, wherein the step of encrypting the preset sequence according to a preset encryption algorithm to generate a target transaction code comprises:
    根据加密算法和所述密钥对所述预设序列进行加密处理,得到所述目标交易码。Encryption processing is performed on the preset sequence according to the encryption algorithm and the key to obtain the target transaction code.
  11. 根据权利要求10所述的方法,其特征在于,还包括:The method according to claim 10, further comprising:
    对所述目标交易码进行哈希处理,根据所述哈希处理后的值在分布式部署的多个存储节点中确定目标存储节点,并将所述目标交易码和所述第一终端的交易信息存储到所述目标存储节点。Perform hash processing on the target transaction code, determine the target storage node among the multiple storage nodes deployed in a distributed manner according to the hashed value, and combine the target transaction code with the transaction of the first terminal The information is stored in the target storage node.
  12. 根据权利要求1所述的方法,其特征在于,所述加密算法具备保留格式加密功能,所述加密算法为对称加密算法。The method according to claim 1, wherein the encryption algorithm has a format-preserving encryption function, and the encryption algorithm is a symmetric encryption algorithm.
  13. 根据权利要求8或9或11所述的方法,其特征在于,存储至所述目标存储节点的所述目标交易码携带有效期信息。The method according to claim 8 or 9 or 11, wherein the target transaction code stored in the target storage node carries validity period information.
  14. 一种基于交易码的处理方法,其特征在于,包括:A processing method based on transaction codes, which is characterized in that it includes:
    接收第二终端发送的查询请求,其中所述查询请求携带目标交易码;Receiving a query request sent by the second terminal, wherein the query request carries the target transaction code;
    根据所述目标交易码确定第一终端的交易信息,并将所述第一终端的交易信息发送给所述第二终端,使所述第二终端基于所述第一终端的交易信息完成交易;Determine the transaction information of the first terminal according to the target transaction code, and send the transaction information of the first terminal to the second terminal, so that the second terminal completes the transaction based on the transaction information of the first terminal;
    其中,所述目标交易码利用如权利要求1-13中任一项所述方法生成并发送给所述第一终端,然后由所述第二终端通过所述第一终端获得。Wherein, the target transaction code is generated using the method according to any one of claims 1-13 and sent to the first terminal, and then obtained by the second terminal through the first terminal.
  15. 一种交易码生成装置,其特征在于,包括:A transaction code generating device, which is characterized in that it comprises:
    接收单元,用于接收第一终端发送的交易码申请,所述交易码申请携带所述第一终端的交易信息;A receiving unit, configured to receive a transaction code application sent by a first terminal, the transaction code application carrying transaction information of the first terminal;
    序列单元,用于根据所述交易码申请和交易码资源,生成预设序列;The sequence unit is used to generate a preset sequence according to the transaction code application and the transaction code resource;
    加密单元,用于根据预设加密算法对所述预设序列进行加密处理,生成目标交易码;The encryption unit is configured to perform encryption processing on the preset sequence according to a preset encryption algorithm to generate a target transaction code;
    发送单元,用于向所述第一终端发送所述目标交易码。The sending unit is configured to send the target transaction code to the first terminal.
  16. 根据权利要求15所述的装置,其特征在于,所述序列单元还用于:The device according to claim 15, wherein the sequence unit is further used for:
    接收由目标资源节点生成并发送的所述交易码资源,其中,所述目标资源节点是分布式部署的多个资源节点中的任意一个。Receive the transaction code resource generated and sent by a target resource node, where the target resource node is any one of a plurality of resource nodes deployed in a distributed manner.
  17. 根据权利要求16所述的装置,其特征在于,所述交易码资源包括:用于指示所述目标资源节点的区域因子;由所述目标资源节点维护的递增序列号;用于指示所述交易码资源的交易周期的周期因子;根据所述周期因子而更新的密钥。The device according to claim 16, wherein the transaction code resource comprises: an area factor used to indicate the target resource node; an incremental sequence number maintained by the target resource node; and used to indicate the transaction The cycle factor of the transaction cycle of the code resource; the key updated according to the cycle factor.
  18. 根据权利要求17所述的装置,其特征在于,所述序列单元,还用于:The device according to claim 17, wherein the sequence unit is further used for:
    根据当前本地时间确定时间因子;Determine the time factor according to the current local time;
    将所述区域因子、所述时间因子、所述递增序列号以及所述周期因子组合成为唯一的预设序列。The area factor, the time factor, the increasing sequence number, and the period factor are combined into a unique preset sequence.
  19. 根据权利要求17所述的装置,其特征在于,所述交易码资源在所述周期因子所指示的交易周期结束后失效。The device according to claim 17, wherein the transaction code resource becomes invalid after the end of the transaction period indicated by the period factor.
  20. 根据权利要求16所述的装置,其特征在于,所述序列单元,还用于:The device according to claim 16, wherein the sequence unit is further used for:
    在接收第一终端发送的交易码申请之前,预先接收由目标资源节点生成并发送的所述交易码资源;和/或,Before receiving the transaction code application sent by the first terminal, pre-receive the transaction code resource generated and sent by the target resource node; and/or,
    响应于接收到所述交易码申请,向所述目标资源节点发送交易码资源请求,并接收由目标资源节点生成并发送的所述交易码资源。In response to receiving the transaction code application, a transaction code resource request is sent to the target resource node, and the transaction code resource generated and sent by the target resource node is received.
  21. 根据权利要求18所述的装置,其特征在于,所述加密单元还用于:The device according to claim 18, wherein the encryption unit is further configured to:
    确定所述预设序列的第一部分序列,所述第一部分序列包括所述区域因子、所述时间因子以及所述递增序列号的前N位,N为正整数;Determining a first partial sequence of the preset sequence, the first partial sequence including the area factor, the time factor, and the first N digits of the increasing sequence number, where N is a positive integer;
    根据所述密钥对所述第一部分序列进行加密处理以得到随机序列;Performing encryption processing on the first partial sequence according to the key to obtain a random sequence;
    确定所述预设序列的第二部分序列,所述第二部分序列包括所述递增序列号的第(N+1)位~末位以及所述周期因子;Determining a second partial sequence of the preset sequence, the second partial sequence including the (N+1)th to the last position of the increasing sequence number and the period factor;
    根据预设标志头、所述随机序列以及所述第二部分序列组成所述目标交易码。The target transaction code is formed according to the preset flag header, the random sequence, and the second partial sequence.
  22. 根据权利要求21所述的装置,其特征在于,还包括存储单元,用于:The device according to claim 21, further comprising a storage unit for:
    根据所述第二部分序列在分布式部署的多个存储节点中确定目标存储节点,并将所述目标交易码以及所述第一终端的交易信息存储到所述目标存储节点。According to the second partial sequence, a target storage node is determined among a plurality of storage nodes deployed in a distributed manner, and the target transaction code and transaction information of the first terminal are stored in the target storage node.
  23. 根据权利要求22所述的装置,其特征在于,若所述交易码申请为批量交易码申请,所述装置还用于:The device according to claim 22, wherein if the transaction code application is a batch transaction code application, the device is further configured to:
    根据所述交易码申请和所述交易码资源批量生成所述预设序列,其中所述递增序列号的前N位中包含用于指示批量序号的预设位;Generating the preset sequence in batches according to the transaction code application and the transaction code resource, wherein the first N bits of the incremental sequence number include a preset bit for indicating a batch sequence number;
    根据所述批量的预设序列获取批量的目标交易码,将所述批量的目标交易码发送给所述第一终端,并使所述批量的目标交易码均存储到所述目标存储节点。Obtain batches of target transaction codes according to the preset sequence of the batch, send the batches of target transaction codes to the first terminal, and store all the batches of target transaction codes in the target storage node.
  24. 根据权利要求18所述的装置,其特征在于,所述加密单元还用于:The device according to claim 18, wherein the encryption unit is further configured to:
    根据加密算法和所述密钥对所述预设序列进行加密处理,得到所述目标交易码。Encryption processing is performed on the preset sequence according to the encryption algorithm and the key to obtain the target transaction code.
  25. 根据权利要求24所述的装置,其特征在于,还包括存储单元,用于:The device according to claim 24, further comprising a storage unit for:
    对所述目标交易码进行哈希处理,根据所述哈希处理后的值在分布式部署的多个存储节点中确定目标存储节点,并将所述目标交易码和所述第一终端的交易信息存储到所述目标存储节点。Perform hash processing on the target transaction code, determine the target storage node among the multiple storage nodes deployed in a distributed manner according to the hashed value, and combine the target transaction code with the transaction of the first terminal The information is stored in the target storage node.
  26. 根据权利要求15所述的装置,其特征在于,所述加密算法具备保留格式加密功能,所述加密算法为对称加密算法。The device according to claim 15, wherein the encryption algorithm has a format-preserving encryption function, and the encryption algorithm is a symmetric encryption algorithm.
  27. 根据权利要求22或23或25所述的装置,其特征在于,存储至所述目标存储节点的所述目标交易码携带有效期信息。The device according to claim 22 or 23 or 25, wherein the target transaction code stored in the target storage node carries validity period information.
  28. 一种基于交易码的处理装置,其特征在于,包括:A processing device based on transaction code, which is characterized in that it comprises:
    查询接收单元,用于接收第二终端发送的查询请求,其中所述查询请求携带目标交易码;The query receiving unit is configured to receive the query request sent by the second terminal, wherein the query request carries the target transaction code;
    交易信息发送单元,用于根据所述目标交易码确定第一终端的交易信息,并将所述第一终端的交易信息发送给所述第二终端,使所述第二终端基于所述第一终端的交易信息完成交易;The transaction information sending unit is configured to determine the transaction information of the first terminal according to the target transaction code, and send the transaction information of the first terminal to the second terminal, so that the second terminal is based on the first terminal. The transaction information of the terminal completes the transaction;
    其中,所述目标交易码利用如权利要求15-27中任一项所述装置生成并发送给所述第一终端,然后由所述第二终端通过所述第一终端获得。Wherein, the target transaction code is generated by the device according to any one of claims 15-27 and sent to the first terminal, and then obtained by the second terminal through the first terminal.
  29. 一种交易码生成系统,其特征在于,包括:分布式部署的多个交易码生成节点、多个资源节点以及多个存储节点;A transaction code generation system, which is characterized by comprising: a plurality of transaction code generation nodes, a plurality of resource nodes, and a plurality of storage nodes that are distributedly deployed;
    其中,每个所述交易码生成节点用于执行权利要求1-14中任一项所述的方法。Wherein, each transaction code generating node is used to execute the method according to any one of claims 1-14.
  30. 一种交易码生成装置,其特征在于,包括:A transaction code generating device, which is characterized in that it comprises:
    一个或者多个多核处理器;One or more multi-core processors;
    存储器,用于存储一个或多个程序;Memory, used to store one or more programs;
    当所述一个或多个程序被所述一个或者多个多核处理器执行时,使得所述一个或多个多核处理器实现:When the one or more programs are executed by the one or more multi-core processors, the one or more multi-core processors are caused to realize:
    接收第一终端发送的交易码申请,所述交易码申请携带所述第一终端的交易信息;Receiving a transaction code application sent by a first terminal, the transaction code application carrying transaction information of the first terminal;
    根据所述交易码申请和交易码资源,生成预设序列;Generate a preset sequence according to the transaction code application and the transaction code resource;
    根据预设加密算法对所述预设序列进行加密处理,生成目标交易码;Encrypting the preset sequence according to a preset encryption algorithm to generate a target transaction code;
    向所述第一终端发送所述目标交易码,并存储所述目标交易码和所述第一终端的交易信息。Send the target transaction code to the first terminal, and store the target transaction code and transaction information of the first terminal.
  31. 一种计算机可读存储介质,所述计算机可读存储介质存储有程序,当所述程序被多核处理器执行时,使得所述多核处理器执行如权利要求1-14中任一项所述的方法。A computer-readable storage medium, the computer-readable storage medium stores a program, and when the program is executed by a multi-core processor, the multi-core processor is caused to execute the process described in any one of claims 1-14 method.
PCT/CN2020/109082 2019-12-27 2020-08-14 Transaction code generation method, apparatus and system, and method, apparatus and system for processing based on transaction code WO2021128871A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911377610.2 2019-12-27
CN201911377610.2A CN111144872B (en) 2019-12-27 2019-12-27 Transaction code generation and transaction code-based processing method, device and system

Publications (1)

Publication Number Publication Date
WO2021128871A1 true WO2021128871A1 (en) 2021-07-01

Family

ID=70520979

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/109082 WO2021128871A1 (en) 2019-12-27 2020-08-14 Transaction code generation method, apparatus and system, and method, apparatus and system for processing based on transaction code

Country Status (2)

Country Link
CN (1) CN111144872B (en)
WO (1) WO2021128871A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111144872B (en) * 2019-12-27 2024-04-26 中国银联股份有限公司 Transaction code generation and transaction code-based processing method, device and system
CN113011980B (en) * 2021-03-30 2023-02-17 建信金融科技有限责任公司 Transaction code request routing method and device of distributed transaction system
CN113191901B (en) * 2021-05-17 2024-04-26 中国建设银行股份有限公司 Transaction service processing method, device, equipment and storage medium
CN113094736A (en) * 2021-06-04 2021-07-09 工业信息安全(四川)创新中心有限公司 Identity card number encryption method, identity card number decryption method, identity card number encryption system and identity card number decryption system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130013502A1 (en) * 2011-07-07 2013-01-10 Bank Of America Corporation Facilitation of Transactions Using a Transaction Code
CN104574047A (en) * 2015-01-21 2015-04-29 孙国华 Financial IC card payment platform based on Internet
CN107657441A (en) * 2017-09-15 2018-02-02 深圳怡化电脑股份有限公司 Self-service dealing method, system, server and mobile terminal
US20190139022A1 (en) * 2017-11-07 2019-05-09 Mezu, Inc. Currency transfer platform receiver device
CN110322237A (en) * 2019-05-23 2019-10-11 平安银行股份有限公司 A kind of method, apparatus and storage medium generating transaction code
CN111144872A (en) * 2019-12-27 2020-05-12 中国银联股份有限公司 Transaction code generation method, transaction code based processing method, device and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103401689B (en) * 2013-08-22 2017-02-08 赵忠华 Positional information based dynamic token and encryption method thereof
CN106855974A (en) * 2015-12-09 2017-06-16 华为技术有限公司 A kind of method of mobile payment and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130013502A1 (en) * 2011-07-07 2013-01-10 Bank Of America Corporation Facilitation of Transactions Using a Transaction Code
CN104574047A (en) * 2015-01-21 2015-04-29 孙国华 Financial IC card payment platform based on Internet
CN107657441A (en) * 2017-09-15 2018-02-02 深圳怡化电脑股份有限公司 Self-service dealing method, system, server and mobile terminal
US20190139022A1 (en) * 2017-11-07 2019-05-09 Mezu, Inc. Currency transfer platform receiver device
CN110322237A (en) * 2019-05-23 2019-10-11 平安银行股份有限公司 A kind of method, apparatus and storage medium generating transaction code
CN111144872A (en) * 2019-12-27 2020-05-12 中国银联股份有限公司 Transaction code generation method, transaction code based processing method, device and system

Also Published As

Publication number Publication date
CN111144872A (en) 2020-05-12
CN111144872B (en) 2024-04-26

Similar Documents

Publication Publication Date Title
WO2021128871A1 (en) Transaction code generation method, apparatus and system, and method, apparatus and system for processing based on transaction code
WO2020253234A1 (en) Data homomorphic encryption and decryption method and apparatus for implementing privacy protection
US11159305B2 (en) Homomorphic data decryption method and apparatus for implementing privacy protection
US10924285B2 (en) Method and server for providing notary service with respect to file and verifying file recorded by the notary service
US10439804B2 (en) Data encrypting system with encryption service module and supporting infrastructure for transparently providing encryption services to encryption service consumer processes across encryption service state changes
US20180032383A1 (en) Performing Transactions Between Application Containers
JP6636183B2 (en) Block generation method, apparatus and block chain network
US20210351939A1 (en) Parachain Data Synchronization Method, Device and Storage Medium
CN110009349B (en) Method and device for generating and verifying linkable ring signature in block chain
US20180365448A1 (en) Method and server for providing notary service for file and verifying file recorded by notary service
CN109635573A (en) System, method, apparatus, electronic equipment and the medium of data distribution formula encryption and decryption
US10911538B2 (en) Management of and persistent storage for nodes in a secure cluster
WO2020224489A1 (en) Blockchain-based bank data sharing method and related apparatus
EP3961974B1 (en) Block content editing methods and apparatuses
CN110689349A (en) Transaction hash value storage and search method and device in block chain
CN111597567B (en) Data processing method, data processing device, node equipment and storage medium
CN110336779B (en) Block chain construction method and device and electronic equipment
CN111178840A (en) Service processing method, device, system, electronic equipment and storage medium
CN112492048B (en) Message synchronization method and device, electronic equipment and readable storage medium
JP2016535310A (en) Method and apparatus for generating and storing prime numbers
CN110716724B (en) Method and device for realizing privacy block chain based on FPGA
CN115603907A (en) Method, device, equipment and storage medium for encrypting storage data
CN111798236B (en) Transaction data encryption and decryption methods, devices and equipment
CN112561701A (en) Transaction creating method, verification method and transaction equipment of blockchain system
CN114124469B (en) Data processing method, device and equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20904308

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20904308

Country of ref document: EP

Kind code of ref document: A1