CN110992040A - Transaction processing method, device and equipment - Google Patents

Transaction processing method, device and equipment Download PDF

Info

Publication number
CN110992040A
CN110992040A CN202010140402.7A CN202010140402A CN110992040A CN 110992040 A CN110992040 A CN 110992040A CN 202010140402 A CN202010140402 A CN 202010140402A CN 110992040 A CN110992040 A CN 110992040A
Authority
CN
China
Prior art keywords
transaction
request
user
record information
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010140402.7A
Other languages
Chinese (zh)
Inventor
王吉元
蒋海滔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202010140402.7A priority Critical patent/CN110992040A/en
Publication of CN110992040A publication Critical patent/CN110992040A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification

Abstract

The embodiment of the specification provides a transaction processing method, a device and equipment, wherein the method comprises the following steps: receiving a transaction request sent by terminal equipment of a user associated with the transaction; the method comprises the steps that a transaction request is used for requesting to transfer a first amount of resources from a resource account of a first user to a resource account of a second user, or the transaction request represents that transaction elements of a transaction are successfully locked and request to perform transaction confirmation processing, or the transaction request represents that the transaction elements of the transaction are failed to be locked and request to perform transaction cancellation processing; verifying whether the transaction corresponding to the transaction request is an idempotent transaction or not based on the transaction record information stored in the block chain; if yes, sending transaction expiration information to the terminal equipment; wherein the transaction expiration information is used to indicate termination of transaction processing for the transaction request.

Description

Transaction processing method, device and equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a transaction processing method, apparatus, and device.
Background
With the continuous development of internet technology, online shopping has been widely entered into people's lives with the characteristics of convenience, time saving, labor saving and the like. The user operates the terminal equipment (such as a mobile phone) to select the commodities on line and carry out electronic payment on line, and the shopping can be finished without going out. In practical application, when a user finishes electronic payment, payment success information may not be displayed on a payment page in time due to problems such as network faults, and the user is likely to click a payment button in the page again to repeatedly initiate payment transaction; or, the user may not close the payment page due to being busy with other things, and therefore when the user opens the terminal device again, the user may click the payment button in the payment page again due to misoperation to repeatedly initiate the payment transaction. The transaction initiated repeatedly is called an idempotent transaction, and for a transaction processing platform, how to effectively identify the idempotent transaction and then process the idempotent transaction is an urgent problem to be solved.
Disclosure of Invention
One or more embodiments of the present specification provide a transaction processing method. The method includes receiving a transaction request sent by a terminal device of a user associated with a transaction. Wherein the transaction request is to request a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user. Or the transaction request represents that the transaction element of the transaction is successfully locked and requests transaction confirmation processing. Or the transaction request represents that the transaction element of the transaction fails to be locked and requests to perform transaction cancellation processing. And verifying whether the transaction corresponding to the transaction request is an idempotent transaction or not based on the transaction record information stored in the blockchain. And if so, sending transaction expiration information to the terminal equipment. Wherein the transaction expiration information is used to indicate termination of transaction processing for the transaction request.
One or more embodiments of the present specification provide a transaction processing device. The device comprises a receiving module for receiving a transaction request sent by a terminal device of a user associated with the transaction. Wherein the transaction request is to request a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user. Or the transaction request represents that the transaction element of the transaction is successfully locked and requests transaction confirmation processing. Or the transaction request represents that the transaction element of the transaction fails to be locked and requests to perform transaction cancellation processing. The device also comprises a verification module which verifies whether the transaction corresponding to the transaction request is an idempotent transaction or not based on the transaction record information stored in the blockchain. The device also comprises a sending module, and if the verification result of the verification module is positive, the sending module sends transaction expiration information to the terminal equipment. The transaction expiration information is used to indicate termination of transaction processing for the transaction request.
One or more embodiments of the present specification provide a transaction processing device. The apparatus includes a processor. The apparatus also comprises a memory arranged to store computer executable instructions. The computer executable instructions, when executed, cause the processor to receive a transaction request sent by a terminal device of a user associated with a transaction. Wherein the transaction request is to request a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user. Or the transaction request represents that the transaction element of the transaction is successfully locked and requests transaction confirmation processing. Or the transaction request represents that the transaction element of the transaction fails to be locked and requests to perform transaction cancellation processing. And verifying whether the transaction corresponding to the transaction request is an idempotent transaction or not based on the transaction record information stored in the blockchain. And if so, sending transaction expiration information to the terminal equipment. The transaction expiration information is used to indicate termination of transaction processing for the transaction request.
One or more embodiments of the present specification provide a storage medium. The storage medium is used to store computer-executable instructions. The computer-executable instructions, when executed, receive a transaction request sent by a terminal device of a user associated with a transaction. Wherein the transaction request is to request a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user. Or the transaction request represents that the transaction element of the transaction is successfully locked and requests transaction confirmation processing. Or the transaction request represents that the transaction element of the transaction fails to be locked and requests to perform transaction cancellation processing. And verifying whether the transaction corresponding to the transaction request is an idempotent transaction or not based on the transaction record information stored in the blockchain. And if so, sending transaction expiration information to the terminal equipment. The transaction expiration information is used to indicate termination of transaction processing for the transaction request.
Drawings
In order to more clearly illustrate one or more embodiments or prior art solutions of the present specification, the drawings that are needed in the description of the embodiments or prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and that other drawings can be obtained by those skilled in the art without inventive exercise.
Fig. 1 is a schematic diagram of a first scenario of a transaction processing method according to one or more embodiments of the present disclosure;
fig. 2 is a schematic diagram of a second scenario of a transaction processing method according to one or more embodiments of the present disclosure;
fig. 3 is a schematic diagram illustrating a third scenario of a transaction processing method according to one or more embodiments of the present disclosure;
fig. 4 is a first flowchart of a transaction processing method according to one or more embodiments of the present disclosure;
fig. 5 is a second flowchart of a transaction processing method according to one or more embodiments of the present disclosure;
FIG. 6 is a third flowchart of a transaction processing method according to one or more embodiments of the disclosure;
FIG. 7 is a fourth flowchart of a transaction processing method according to one or more embodiments of the disclosure;
fig. 8 is a fifth flowchart of a transaction processing method according to one or more embodiments of the present disclosure;
fig. 9 is a sixth flowchart of a transaction processing method according to one or more embodiments of the present disclosure;
fig. 10 is a seventh flowchart of a transaction processing method according to one or more embodiments of the present disclosure;
fig. 11 is an eighth flowchart of a transaction processing method according to one or more embodiments of the present disclosure;
fig. 12 is a ninth flowchart of a transaction processing method according to one or more embodiments of the present disclosure;
fig. 13 is a tenth flowchart of a transaction processing method according to one or more embodiments of the present disclosure;
fig. 14 is an eleventh flowchart of a transaction processing method according to one or more embodiments of the disclosure;
fig. 15 is a twelfth flowchart of a transaction processing method according to one or more embodiments of the present disclosure;
fig. 16 is a block diagram of a transaction processing device according to one or more embodiments of the present disclosure;
fig. 17 is a schematic structural diagram of a transaction processing device according to one or more embodiments of the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in one or more embodiments of the present disclosure, the technical solutions in one or more embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in one or more embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all embodiments. All other embodiments that can be derived by a person skilled in the art from one or more of the embodiments described herein without making any inventive step shall fall within the scope of protection of this document.
Fig. 1 is a schematic view of an application scenario of a transaction processing method according to one or more embodiments of the present specification, as shown in fig. 1, the scenario includes: the method comprises the steps that a terminal device, a transaction processing node and a blockchain of a user are related to transaction; the terminal equipment can be a mobile phone, a tablet computer, a desktop computer, a portable notebook computer and the like; the terminal equipment is in communication connection with the transaction processing node through a wireless network; the users related to the transaction include a requesting user (hereinafter, referred to as a first user) of the transaction, a target user (hereinafter, referred to as a second user) of the transaction with the first user, a management user corresponding to each transaction element of the transaction, and the like, and the management user includes the second user.
Specifically, the terminal device responds to the transaction operation of the user and sends a corresponding transaction request to the transaction processing node; wherein the transaction request is for requesting a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user; or the transaction request represents that the transaction element of the transaction is successfully locked and requests to perform transaction confirmation processing; or the transaction request represents that the transaction element of the transaction is failed to be locked and requests to cancel the transaction; the transaction processing node verifies whether the transaction corresponding to the transaction request is an idempotent transaction or not based on the transaction record information stored in the blockchain; and if so, sending transaction expiration information to the terminal equipment, wherein the transaction expiration information is used for indicating that the transaction processing of the transaction request is terminated. Therefore, the transaction record information stored in the block chain is used as a verification basis to verify whether the transaction corresponding to the transaction request is an idempotent transaction, so that the authenticity and the validity of verification are ensured, and the accurate and effective identification of the idempotent transaction is realized; further avoiding the trouble brought to each user associated with the transaction by repeatedly performing transaction processing because the idempotent transaction is not identified.
Further, in one or more embodiments of the present specification, the transaction processing node may be a first blockchain node in a blockchain, and a schematic application scenario diagram of the transaction processing method is shown in fig. 2.
Further, in one or more embodiments of the present specification, the transaction processing node may also be a transaction platform for processing a transaction, and correspondingly, as shown in fig. 3, an application scenario of the transaction processing method may further include at least one block chain node (only one is shown in fig. 3), and the transaction platform performs data interaction with the block chain node through a wireless network, so as to query transaction record information from the block chain through the block chain node, and verify whether a transaction corresponding to the transaction request is an idempotent transaction based on the queried transaction record information.
Based on the above application scenario architecture, fig. 4 is a flowchart illustrating a transaction processing method according to one or more embodiments of the present specification, where the method in fig. 4 can be executed by the transaction processing node in fig. 1, as shown in fig. 4, and the method includes the following steps:
step S102, receiving a transaction request sent by a terminal device of a user associated with the transaction; the method comprises the steps that a transaction request is used for requesting to transfer a first amount of resources from a resource account of a first user to a resource account of a second user, or the transaction request represents that transaction elements of a transaction are successfully locked and request to perform transaction confirmation processing, or the transaction request represents that the transaction elements of the transaction are failed to be locked and request to perform transaction cancellation processing;
specifically, a forward transaction request sent by a first terminal device of a first user is received, where the forward transaction request is used to request that a first amount of resources, which may be physical resources (such as money) or virtual resources (such as points), be transferred from a resource account of the first user to a resource account of a second user; or, receiving a transaction confirmation request sent by a second terminal device of the user associated with the transaction element, wherein the transaction confirmation request represents that the transaction element of the transaction is successfully locked and requests to perform transaction confirmation processing; or receiving a transaction cancellation request sent by a second terminal device of the user associated with the transaction element, wherein the transaction cancellation request represents that the transaction element of the transaction fails to be locked and requests to perform transaction cancellation processing.
Specifically, some merchants have developed shopping strategies such as red envelope and credit to promote the enthusiasm of online shopping for users, and thus a successful online shopping transaction involves data management operations at multiple levels, such as stock update, red envelope management, and credit increase and decrease. In order to avoid failure of a transaction due to failure of data management operations of one or more layers, in one or more embodiments of the present specification, when a transaction processing node receives a forward transaction request sent by a first terminal device, if it is determined that a corresponding forward transaction is not an idempotent transaction, determining locking information of each transaction element associated with the transaction, and sending a transaction element locking request to a second terminal device according to the locking information to lock each transaction element associated with the transaction, if information returned by each second terminal device is a transaction confirmation request, determining that locking processing is successful, and performing forward transaction processing according to the forward transaction request; and if the information returned by the at least one second terminal device is a transaction cancellation request, determining that the locking processing fails, performing transaction rollback processing, and storing each record information of the transaction in the block chain so as to verify whether the received transaction request is idempotent transaction or not based on the record information in the block chain in the subsequent process.
As an example, the forward transaction request includes transaction identification and transaction information, the transaction information includes information that the first user transfers 70 points to the second user and redeems a coupon identified as Y for a brand X milk 1 box provided by the second user; when the transaction processing node determines that the forward transaction request is not an idempotent transaction, determining that transaction elements related to the transaction comprise milk and a coupon according to the transaction information, determining that locking information of the milk comprises an X brand and 1 box, and determining that locking information of the coupon comprises an identifier Y; according to the transaction identifier and the determined locking information, a transaction element locking request is respectively sent to a second terminal device of a second user and a second terminal device of a coupon management user; the second terminal device of the second user inquires the stock quantity of the milk of the brand X according to the received transaction element locking request, and uses the stock quantity as the state information of the milk of the brand X, for example, the inquired stock quantity is zero, determines that the milk of the brand X is in a non-tradable state, and returns a transaction cancellation request representing that the locking operation fails; further, when a second terminal device of the coupon management user receives the transaction element locking request, whether the coupon identified as Y is in the validity period or not is detected and is used as the state information of the coupon, for example, the coupon is in the validity period, the coupon is determined to be in a tradable state, the coupon is locked so that other transactions cannot use the coupon, the identifier Y of the coupon is associated with the transaction identifier for recording, and a transaction confirmation request representing that the locking operation is successful is returned; and the transaction processing node determines that the locking processing fails according to the received requests returned by the second terminal equipment, and performs transaction rollback processing.
Since the first user and each user corresponding to the transaction element may repeatedly send the corresponding transaction request due to misoperation, the transaction processing node executes step S104 when receiving the requests.
Step S104, verifying whether the transaction corresponding to the transaction request is an idempotent transaction or not based on the transaction record information stored in the block chain;
it should be noted that, when the transaction processing node is a transaction platform, step S104 may include: the transaction platform sends a query request to the block chain link point according to the transaction identifier included in the transaction request, so that the block chain link point queries related transaction record information from the block chain according to the transaction identifier and returns the queried transaction record information to the transaction platform; and the transaction platform verifies whether the transaction corresponding to the transaction request is an idempotent transaction or not according to the received transaction record information. Alternatively, step S104 may include: the transaction platform sends a verification request to the block chain link point according to the transaction identifier included in the transaction request, so that the block chain link point queries related transaction record information from the block chain according to the transaction identifier included in the verification request, verifies whether the transaction corresponding to the transaction request is idempotent transaction according to the queried transaction record information, and sends a verification result to the transaction platform.
Step S106, if yes, transaction expiration information is sent to the terminal equipment; wherein the transaction expiration information is used to indicate termination of transaction processing for the transaction request.
In one or more embodiments of the present description, transaction record information stored in a blockchain is used as a verification basis to verify whether a transaction corresponding to a transaction request is an idempotent transaction, so as to ensure the authenticity and validity of the verification and realize accurate and effective identification of the idempotent transaction; further avoiding the trouble brought to each user associated with the transaction by repeatedly performing transaction processing because the idempotent transaction is not identified.
Further, as shown in fig. 5, when the transaction corresponding to the verification transaction request in step S104 is not an idempotent transaction, the method further includes:
and step S108, carrying out corresponding transaction processing according to the transaction request.
Accordingly, step S106 includes:
step S106', transaction expiration information is sent to the terminal equipment; wherein the transaction expiration information is used to indicate termination of transaction processing for the transaction request.
In the following embodiments, the application scenario shown in fig. 3 is taken as an example for explanation.
When the transaction request is a forward transaction request, the transaction platform can perform transaction processing in any one of the following three ways;
mode 1-1: transferring a first amount of resources from a resource account of a first user to a specified hosting account, and generating first resource transfer record information according to a transaction identifier, account information of the resource account of the first user, account information of the hosting account and the like included in a transaction request; sending first resource transfer record information to the block chain nodes so that the block chain nodes store the first resource transfer record information into the block chain; and the transaction platform sends a transaction element locking request to second terminal equipment of the user corresponding to the transaction element according to the determined locking information of each transaction element, so that the second terminal equipment locks the transaction element when the transaction element is determined to be in a tradable state.
Mode 2-1: transferring a first amount of resources from the resource account of the first user to the resource account of the second user, and generating fourth resource transfer record information according to the transaction identifier, the account information of the resource account of the first user, the account information of the resource account of the second user and the like included in the transaction request; sending fourth resource transfer record information to the block chain nodes so that the block chain nodes store the fourth resource transfer record information into the block chain; and the transaction platform sends a transaction element locking request to second terminal equipment of the user corresponding to the transaction element according to the determined locking information of each transaction element, so that the second terminal equipment locks the transaction element when the transaction element is determined to be in a tradable state.
Mode 3-1: generating second state record information according to the transaction identifier, the state information representing successful resource locking and the like included in the transaction request, and storing the second state record information into a specified database; and sending a transaction element locking request to second terminal equipment of the user corresponding to the transaction element according to the determined locking information of each transaction element, so that the second terminal equipment locks the transaction element when the transaction element is determined to be in a tradable state.
Further, when the transaction request is a transaction confirmation request, that is, after the second terminal device successfully locks the corresponding transaction element, the transaction request is sent to the transaction platform; the trading platform can process the trade in any one of the following three ways:
mode 1 to 2: corresponding to the above mode 1-1, if the transaction platform determines that the requests sent by the second terminal devices are transaction confirmation requests, transferring a first amount of resources from the escrow account to the resource account of the second user; generating second resource transfer record information according to the transaction identification, the account information of the escrow account, the account information of the resource account of the second user, the resource transfer time and the like; sending second resource transfer record information to the block chain nodes so that the block chain nodes store the second resource transfer record information into the block chain; and the transaction platform sends transaction success information to the first terminal equipment and each second terminal equipment.
Mode 2-2: corresponding to the mode 2-1, if the transaction platform determines that the requests sent by the second terminal devices are transaction confirmation requests, first state record information is generated according to transaction identifiers, state information representing successful resource locking and the like, and the first state record information is stored in a specified database; and sending the transaction success information to the first terminal equipment and each second terminal equipment.
Mode 3-2: corresponding to the above mode 3-1, if the transaction platform determines that the requests sent by the second terminal devices are transaction confirmation requests, transferring the first amount of resources from the resource account of the first user to the resource account of the second user; generating sixth resource transfer record information according to the transaction identification, the account information of the resource account of the first user, the account information of the resource merchant of the second user, the resource transfer time and the like; and sending the sixth resource transfer record information to the block chain node so that the block chain node stores the sixth resource transfer record information into the block chain.
Furthermore, when the transaction request is a transaction cancel request, namely the second terminal device fails to lock the corresponding transaction element, the transaction cancel request is sent to the transaction platform; the trading platform can process the trade in any one of the following three ways:
modes 1 to 3: corresponding to the above mode 1-1, the transaction platform transfers a first amount of resources from the escrow account to the resource account of the first user, and generates third resource transfer record information according to the transaction identifier, the account information of the escrow account, the account information of the resource account of the first user, the resource transfer time, and the like; sending third resource transfer record information to the block chain nodes so that the block chain nodes store the third resource transfer record information into the block chain; and the transaction platform sends transaction failure information to the first terminal equipment and each second terminal equipment according to the transaction identifier so that the second terminal equipment releases corresponding locked resources.
Mode 2 to 3: corresponding to the above mode 2-1, the transaction platform transfers a first amount of resources from the resource account of the second user to the resource account of the first user, and generates fifth resource transfer record information according to the transaction identifier, the account information of the resource account of the first user, the account information of the resource account of the second user, the resource transfer time, and the like; sending the fifth resource transfer record information to the block chain node so that the block chain node stores the fifth resource transfer record information into the block chain; and the transaction platform sends transaction failure information to the first terminal equipment and each second terminal equipment according to the transaction identifier so that the second terminal equipment releases corresponding locked resources.
Mode 3 to 3: corresponding to the mode 3-1, the transaction platform generates third state record information according to the transaction identifier, the state information representing the resource locking failure and the like, and stores the third state record information into the designated database; and sending transaction failure information to the first terminal equipment and each second terminal equipment according to the transaction identifier so as to enable the second terminal equipment to release corresponding locked resources.
It should be noted that, when the resource to be transferred is an entity resource, the transaction platform may transfer the resource through the corresponding financial institution; when the resource to be transferred is a virtual resource (such as a point) issued by the trading platform, the trading platform can transfer the resource by itself. Further, each record information saved to the blockchain may further include a hash value calculated from the specific information, where the specific information includes account information of the resource transfer-out account, account information of the resource transfer-in account, resource transfer time, and the like.
The transaction processing method has the advantages that different transaction requests are processed in different modes, when a forward transaction request is received by a transaction processing node, transaction elements related to the transaction are firstly locked instead of directly processed, and transaction failure caused by the fact that a certain transaction element does not meet transaction conditions can be effectively avoided; when a transaction cancel request is received, namely the locking processing fails, transaction rollback processing is carried out, and the locked transaction elements can be released in time without influencing the transaction elements to participate in other transactions; moreover, by storing the related record information of the transaction in the block chain, an effective basis is provided for the follow-up verification of whether the transaction request is an idempotent transaction. Specifically, as shown in fig. 6, step S104 includes:
step S104 ', whether the associated target record information is inquired from the blockchain according to the transaction identifier included in the transaction request is determined, if so, the transaction corresponding to the transaction request is determined to be idempotent transaction, and step S106' is executed.
More specifically, as shown in fig. 7, when the step S102 includes the following step S102-2, corresponding to the above-described mode 1-1, the step S104' includes the following step S104-2, and the step S106 includes the following step S106-2;
step S102-2, receiving a forward transaction request sent by a first terminal device of a first user; wherein the forward transaction request is to request a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user;
step S104-2, determining whether related first resource transfer record information is inquired from the blockchain according to the transaction identifier, wherein the first resource transfer record information is generated after a first quantity of resources are transferred from a resource account of a first user to a specified hosting account based on the forward transaction request; and if so, determining that the target record information is inquired.
Specifically, the transaction platform sends a query request to the block link nodes according to the transaction identifier; the block chain link points inquire the associated recording information from the block chain according to the transaction identification, and send the inquired recording information to the transaction platform; the transaction platform judges whether the received record information comprises first resource transfer record information, if so, the target record information is determined to be inquired, and the transaction corresponding to the transaction request is idempotent transaction; if not, determining that the target record information is not inquired, and determining that the transaction corresponding to the transaction request is not idempotent transaction. Or the trading platform sends a query request to the block link node according to the trading identifier and a record identifier of preset first resource transfer record information; the block chain link point inquires first resource transfer record information from the block chain according to the transaction identifier and the record identifier and sends an inquiry result to the transaction platform; the transaction platform determines whether the query result represents that the first resource transfer record information is queried, if so, the target record information is determined to be queried, and the transaction corresponding to the transaction request is an idempotent transaction; if not, determining that the target record information is not inquired, and determining that the transaction corresponding to the transaction request is not idempotent transaction. The form of the record identifier may be set in practical application as required, for example, 01 represents the first resource transfer record information, 02 represents the second resource transfer record information, and the like.
And step S106-2, transaction expiration information is sent to the first terminal equipment, wherein the transaction expiration information is used for indicating that the transaction processing of the transaction request is terminated.
Further, as shown in FIG. 8, when the step S102 includes the following step S102-4, corresponding to the above-described mode 2-1, the step S104' includes the following step S104-4, and the step S106 includes the following step S106-4;
step S102-4, receiving a transaction confirmation request sent by a second terminal device of the user corresponding to the transaction element; the transaction confirmation request is a request sent by the second terminal device after the corresponding transaction element is successfully locked based on the transaction element locking request sent by the transaction processing node; the transaction confirmation request is used for requesting transaction confirmation processing;
step S104-4, determining whether related second resource transfer record information is inquired from the blockchain according to the transaction identifier, wherein the second resource transfer record information is generated after a first quantity of resources are transferred from the escrow account to the resource account of the second user when the fact that all transaction elements of the transaction are successfully locked is determined; and if so, determining that the target record information is inquired.
The implementation process of step S104-4 is similar to the implementation process of step S104-2, and reference may be made to the foregoing related description, which is not repeated herein.
And step S106-4, transaction expiration information is sent to the second terminal equipment, wherein the transaction expiration information is used for indicating that the transaction processing of the transaction request is terminated.
Further, as shown in fig. 9, when the step S102 includes the following step S102-6, corresponding to the above-described mode 3-1, the step S104' includes the following step S104-6, and the step S106 includes the aforementioned step S106-4;
step S102-6, receiving a transaction canceling request sent by a second terminal device of the user corresponding to the transaction element; the transaction canceling request is a request sent by the second terminal device after the corresponding transaction element is failed to be locked based on a transaction element locking request sent by the transaction processing node; the transaction cancellation request is used for requesting transaction cancellation processing;
step S104-6, determining whether related third resource transfer record information is inquired from the blockchain according to the transaction identifier, wherein the third resource transfer record information is generated after a first quantity of resources are transferred from the escrow account to the resource account of the first user when the locking of at least one transaction element of the transaction is determined to be failed; and if so, determining that the target record information is inquired.
The implementation process of step S104-6 is similar to the implementation process of step S104-2, and reference may be made to the foregoing related description, which is not repeated herein.
Further, as shown in fig. 10, when the step S102 includes the following step S102-8, corresponding to the above-described mode 1-2, the step S104' includes the following step S104-8, and the step S106 includes the above-described step S106-2;
step S102-8, receiving a forward transaction request sent by a first terminal device of a first user; wherein the forward transaction request is to request a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user;
step S104-8, determining whether related fourth resource transfer record information is inquired from the blockchain according to the transaction identifier, wherein the fourth resource transfer record information is information generated after a first quantity of resources are transferred from a resource account of a first user to a resource account of a second user based on the forward transaction request; and if so, determining that the target record information is inquired.
The implementation process of step S104-8 is similar to the implementation process of step S104-2, and reference may be made to the foregoing related description, which is not repeated herein.
Further, as shown in fig. 11, when the step S102 includes the following step S102-10, corresponding to the above mode 2-2, the method further includes the following step S104-10, and the step S106 includes the aforementioned step S106-4;
step S102-10, receiving a transaction confirmation request sent by a second terminal device of the user corresponding to the transaction element; the transaction confirmation request is a request sent by the second terminal device after the corresponding transaction element is successfully locked based on the transaction element locking request sent by the transaction processing node; the transaction confirmation request is used for requesting transaction confirmation processing;
step S104-10, determining whether first state record information is inquired from a designated database according to the transaction identifier, wherein the first state record information is generated when each transaction element of the transaction is determined to be successfully locked; and if so, determining that the target record information is inquired.
Specifically, the transaction identifier is matched with the transaction identifier in the record information included in the designated database, the state information representing successful resource locking is matched with the state information in the record information, if the matching is successful, the first state record information is determined to be inquired, and the transaction corresponding to the transaction request is an idempotent transaction; otherwise, the first state record information is determined not to be inquired, and the transaction corresponding to the transaction request is not idempotent transaction.
Further, as shown in fig. 12, when the step S102 includes the following step S102-12, corresponding to the above-described mode 3-2, the step S104' includes the following step S104-12, and the step S106 includes the aforementioned step S106-4;
step S102-12, receiving a transaction canceling request sent by a second terminal device of the user corresponding to the transaction element; the transaction canceling request is a request sent by the second terminal device after the corresponding transaction element is failed to be locked based on a transaction element locking request sent by the transaction processing node; the transaction cancellation request is used for requesting transaction cancellation processing;
step S104-12, determining whether related fifth resource transfer record information is inquired from the blockchain according to the transaction identifier, wherein the fifth resource transfer record information is information generated after a first quantity of resources are transferred from the resource account of the second user to the resource account of the first user when the locking of at least one transaction element of the transaction is determined to be failed; and if so, determining that the target record information is inquired.
The implementation process of step S104-12 is similar to the implementation process of step S104-2, and reference may be made to the foregoing related description, which is not repeated herein.
Further, as shown in fig. 13, when the step S102 includes the following step S102-14, corresponding to the above-described mode 1-3, the method further includes the following step S104-14, and the step S106 includes the aforementioned step S106-2;
step S102-14, receiving a forward transaction request sent by a first terminal device of a first user; wherein the forward transaction request is to request a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user;
step S104-14, determining whether second state record information is inquired from the designated database according to the transaction identifier, wherein the second state record information is information generated based on the forward transaction request, and the second state record information represents that the forward transaction is in a locking processing state of a transaction element; and if so, determining that the target record information is inquired.
The implementation process of step S104-14 is similar to the implementation process of step S104-10, and reference may be made to the foregoing related description, which is not repeated herein.
Further, as shown in fig. 14, when the step S102 includes the following steps S102-16, corresponding to the above-described mode 2-3, the step S104' includes the following steps S104-16, and the step S106 includes the aforementioned step S106-4;
step S102-16, receiving a transaction confirmation request sent by a second terminal device of the user corresponding to the transaction element; the transaction confirmation request is a request sent by the second terminal device after the corresponding transaction element is successfully locked based on the transaction element locking request sent by the transaction processing node; the transaction confirmation request is used for requesting transaction confirmation processing;
step S104-16, determining whether related sixth resource transfer record information is inquired from the blockchain according to the transaction identifier, wherein the sixth resource transfer record information is generated after a first quantity of resources are transferred from the resource account of the first user to the resource account of the second user when the fact that all transaction elements of the transaction are successfully locked is determined; and if so, determining that the target record information is inquired.
The implementation process of step S104-16 is similar to the implementation process of step S104-2, and reference may be made to the foregoing related description, which is not repeated herein.
Further, as shown in fig. 15, when the step S102 includes the following step S102-18, corresponding to the above-described mode 3-3, the method further includes the following step S104-18, and the step S106 includes the aforementioned step S106-4;
step S102-18, receiving a transaction canceling request sent by a second terminal device of the user corresponding to the transaction element; the transaction canceling request is a request sent by the second terminal device after the corresponding transaction element is failed to be locked based on a transaction element locking request sent by the transaction processing node; the transaction cancellation request is used for requesting transaction cancellation processing;
step S104-18, determining whether third state record information is inquired from a designated database according to the transaction identifier, wherein the third state record information is information generated when at least one transaction element of the transaction is determined to be failed to be locked; and if so, determining that the target record information is inquired.
The implementation process of step S104-18 is similar to the implementation process of step S104-10, and reference may be made to the foregoing related description, which is not repeated herein. In the above, for different transaction requests, different target record information is queried from the blockchain or the designated database, so as to verify whether the transaction corresponding to the transaction request is idempotent transaction according to the query result; accurate and effective recognition of idempotent transactions is achieved.
It should be noted that, when the transaction processing node is the first blockchain node, the implementation process of the transaction processing method may refer to the implementation processes of the foregoing embodiments, and details are not described here.
In one or more embodiments of the present description, transaction record information stored in a blockchain is used as a verification basis to verify whether a transaction corresponding to a transaction request is an idempotent transaction, so as to ensure the authenticity and validity of the verification and realize accurate and effective identification of the idempotent transaction; further avoiding the trouble brought to each user associated with the transaction by repeatedly performing transaction processing because the idempotent transaction is not identified.
On the basis of the same technical concept, one or more embodiments of the present specification further provide a transaction processing apparatus corresponding to the transaction processing methods described in fig. 4 to 15. Fig. 16 is a schematic diagram of module components of a transaction processing apparatus according to one or more embodiments of the present disclosure, the apparatus being configured to execute the transaction processing method described in fig. 2 to 6, and as shown in fig. 16, the apparatus includes:
a receiving module 201, configured to receive a transaction request sent by a terminal device of a user associated with a transaction; the transaction request is used for requesting to transfer a first amount of resources from a resource account of a first user to a resource account of a second user, or the transaction request represents that a transaction element of the transaction is successfully locked and requests to perform transaction confirmation processing, or the transaction request represents that the transaction element of the transaction is failed to be locked and requests to perform transaction cancellation processing;
the verification module 202 is configured to verify whether the transaction corresponding to the transaction request is an idempotent transaction based on the transaction record information stored in the blockchain;
a sending module 203, configured to send transaction expiration information to the terminal device if the verification result of the verification module is yes, where the transaction expiration information is used to indicate that the transaction processing on the transaction request is terminated.
In the transaction processing device provided in one or more embodiments of the present specification, the transaction record information stored in the blockchain is used as a verification basis to verify whether the transaction corresponding to the transaction request is an idempotent transaction, so that the authenticity and validity of the verification are ensured, and the accurate and effective identification of the idempotent transaction is realized; further avoiding the trouble brought to each user associated with the transaction by repeatedly performing transaction processing because the idempotent transaction is not identified.
Optionally, the transaction request comprises: a transaction identification;
the verification module 202, determining whether the associated target record information is queried from the block chain according to the transaction identifier;
and if so, determining that the transaction corresponding to the transaction request is an idempotent transaction.
Optionally, the receiving module 201 receives a forward transaction request sent by a first terminal device of a first user; wherein the forward transaction request is to request a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user;
correspondingly, the verification module 202 determines whether the associated first resource transfer record information is queried from the block chain according to the transaction identifier; wherein the first resource transfer record information is information generated after the first amount of resources is transferred from the first user's resource account to the designated escrow account based on the forward transaction request.
Optionally, the receiving module 201 receives a transaction confirmation request sent by a second terminal device of the user corresponding to the transaction element; the transaction confirmation request is a request sent by the second terminal device after the corresponding transaction element is successfully locked based on the received transaction element locking request; the transaction confirmation request is used for requesting transaction confirmation processing;
correspondingly, the verification module 202 determines whether the associated second resource transfer record information is queried from the block chain according to the transaction identifier; the second resource transfer record information is information generated after the first quantity of resources are transferred from the escrow account to the resource account of the second user when the transaction elements of the transaction are determined to be locked successfully;
and if so, determining to inquire the target record information.
Optionally, the receiving module 201 receives a transaction cancellation request sent by a second terminal device of the user corresponding to the transaction element; the transaction canceling request is a request sent by the second terminal device after the corresponding transaction element is failed to be locked based on the received transaction element locking request; the transaction cancellation request is used for requesting transaction cancellation processing;
correspondingly, the verification module 202 determines whether associated third resource transfer record information is queried from the block chain according to the transaction identifier; wherein the third resource transfer record information is information generated after the first amount of resources are transferred from the escrow account to the resource account of the first user when it is determined that the locking of the at least one transaction element of the transaction has failed.
Optionally, the receiving module 201 receives a forward transaction request sent by a terminal device of a first user; wherein the forward transaction request is to request a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user;
correspondingly, the verification module 202 determines whether associated fourth resource transfer record information is queried from the block chain according to the transaction identifier; wherein the fourth resource transfer record information is information generated after the first amount of resources are transferred from the resource account of the first user to the resource account of the second user based on the forward transaction request;
and if so, determining to inquire the target record information.
Optionally, the receiving module 201 receives a transaction confirmation request sent by a second terminal device of the user corresponding to the transaction element; the transaction confirmation request is a request sent by the second terminal device after the corresponding transaction element is successfully locked based on the received transaction element locking request; the transaction confirmation request is used for requesting transaction confirmation processing;
correspondingly, the verification module 202 further determines whether first state record information is queried from a specified database according to the transaction identifier; the first state record information is information generated when all transaction elements of the transaction are determined to be successfully locked;
and if so, determining to inquire the target record information.
Optionally, the receiving module 201 receives a transaction cancellation request sent by a second terminal device of the user corresponding to the transaction element; the transaction canceling request is a request sent by the second terminal device after the corresponding transaction element is failed to be locked based on the received transaction element locking request; the transaction cancellation request is used for requesting transaction cancellation processing;
correspondingly, the verification module 202 determines whether the associated fifth resource transfer record information is queried from the block chain according to the transaction identifier; wherein the fifth resource transfer record information is information generated after the first amount of resources are transferred from the resource account of the second user to the resource account of the first user when it is determined that the locking of at least one transaction element of the transaction fails;
and if so, determining to inquire the target record information.
Optionally, the receiving module 201 receives a forward transaction request sent by a terminal device of a first user; wherein the forward transaction request is to request a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user;
correspondingly, the verification module 202 further determines whether second state record information is queried from the specified database according to the transaction identifier; the second state record information represents that the forward transaction is in a locking processing state of the transaction element;
and if so, determining to inquire the target record information.
Optionally, the receiving module 201 receives a transaction confirmation request sent by a second terminal device of the user corresponding to the transaction element; the transaction confirmation request is a request sent by the second terminal device after the corresponding transaction element is successfully locked based on the received transaction element locking request; the transaction confirmation request is used for requesting transaction confirmation processing;
correspondingly, the verification module 202 determines whether the associated sixth resource transfer record information is queried from the block chain according to the transaction identifier; the sixth resource transfer record information is information generated after the first quantity of resources are transferred from the resource account of the first user to the resource account of the second user when the fact that all transaction elements of the transaction are successfully locked is determined;
and if so, determining to inquire the target record information.
Optionally, the receiving module 201 receives a transaction cancellation request sent by a second terminal device of the user corresponding to the transaction element; the transaction canceling request is a request sent by the second terminal device after the corresponding transaction element is failed to be locked based on the received transaction element locking request; the transaction cancellation request is used for requesting transaction cancellation processing;
correspondingly, the verification module 202 further determines whether third state record information is queried from the specified database according to the transaction identifier; wherein the third state record information is information generated when it is determined that at least one transaction element of the transaction fails to be locked;
and if so, determining to inquire the target record information.
Optionally, the apparatus further comprises: a processing module;
the processing module performs corresponding transaction processing according to the transaction request if the verification module 202 verifies that the transaction corresponding to the transaction request is not an idempotent transaction.
In the transaction processing device provided in one or more embodiments of the present specification, the transaction record information stored in the blockchain is used as a verification basis to verify whether the transaction corresponding to the transaction request is an idempotent transaction, so that the authenticity and validity of the verification are ensured, and the accurate and effective identification of the idempotent transaction is realized; further avoiding the trouble brought to each user associated with the transaction by repeatedly performing transaction processing because the idempotent transaction is not identified.
It should be noted that the embodiment of the transaction processing apparatus in this specification and the embodiment of the transaction processing method in this specification are based on the same inventive concept, and therefore, for specific implementation of this embodiment, reference may be made to implementation of the corresponding transaction processing method, and repeated details are not described again.
Further, corresponding to the transaction processing methods described in fig. 4 to fig. 15, based on the same technical concept, one or more embodiments of the present specification further provide a transaction processing device, which is used for executing the transaction processing method described above, and fig. 17 is a schematic structural diagram of a transaction processing device provided in one or more embodiments of the present specification.
As shown in fig. 17, the transaction processing device may have a relatively large difference due to different configurations or performances, and may include one or more processors 301 and a memory 302, and one or more stored applications or data may be stored in the memory 302. Memory 302 may be, among other things, transient storage or persistent storage. The application program stored in memory 302 may include one or more modules (not shown), each of which may include a series of computer-executable instructions in a transaction processing device. Still further, the processor 301 may be arranged in communication with the memory 302 to execute a series of computer executable instructions in the memory 302 on the transaction processing device. The transaction processing device may also include one or more power supplies 303, one or more wired or wireless network interfaces 304, one or more input-output interfaces 305, one or more keyboards 306, and the like.
In one particular embodiment, the transaction processing apparatus includes a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the transaction processing apparatus, and the one or more programs configured to be executed by the one or more processors include computer-executable instructions for:
receiving a transaction request sent by terminal equipment of a user associated with the transaction; the transaction request is used for requesting to transfer a first amount of resources from a resource account of a first user to a resource account of a second user, or the transaction request represents that a transaction element of the transaction is successfully locked and requests to perform transaction confirmation processing, or the transaction request represents that the transaction element of the transaction is failed to be locked and requests to perform transaction cancellation processing;
verifying whether the transaction corresponding to the transaction request is an idempotent transaction or not based on transaction record information stored in a block chain;
if yes, sending transaction expiration information to the terminal equipment; wherein the transaction expiration information is used to indicate termination of transaction processing for the transaction request.
In the transaction processing device provided in one or more embodiments of the present specification, the transaction record information stored in the blockchain is used as a verification basis to verify whether the transaction corresponding to the transaction request is an idempotent transaction, so that the authenticity and validity of the verification are ensured, and the accurate and effective identification of the idempotent transaction is realized; further avoiding the trouble brought to each user associated with the transaction by repeatedly performing transaction processing because the idempotent transaction is not identified.
Optionally, the computer executable instructions, when executed, the transaction request comprises: a transaction identification;
the verifying whether the transaction corresponding to the transaction request is an idempotent transaction based on the transaction record information stored in the blockchain includes:
determining whether associated target record information is queried from the blockchain according to the transaction identifier;
and if so, determining that the transaction corresponding to the transaction request is an idempotent transaction.
Optionally, the computer-executable instructions, when executed, receive a transaction request sent by a terminal device of a user associated with a transaction, including:
receiving a forward transaction request sent by first terminal equipment of a first user; wherein the forward transaction request is to request a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user;
the determining whether the associated target record information is queried from the blockchain according to the transaction identifier includes:
determining whether the associated first resource transfer record information is inquired from the block chain according to the transaction identifier; wherein the first resource transfer record information is information generated after the first amount of resources is transferred from the first user's resource account to a designated escrow account based on the forward transaction request;
and if so, determining to inquire the target record information.
Optionally, the computer-executable instructions, when executed, receive a transaction request sent by a terminal device of a user associated with a transaction, including:
receiving a transaction confirmation request sent by a second terminal device of the user corresponding to the transaction element; the transaction confirmation request is a request sent by the second terminal device after the corresponding transaction element is successfully locked based on the received transaction element locking request; the transaction confirmation request is used for requesting transaction confirmation processing;
the determining whether the associated target record information is queried from the blockchain according to the transaction identifier includes:
determining whether associated second resource transfer record information is queried from the blockchain according to the transaction identifier; the second resource transfer record information is information generated after the first quantity of resources are transferred from the escrow account to the resource account of the second user when the transaction elements of the transaction are determined to be locked successfully;
and if so, determining to inquire the target record information.
Optionally, the computer-executable instructions, when executed, receive a transaction request sent by a terminal device of a user associated with a transaction, including:
receiving a transaction canceling request sent by a second terminal device of the user corresponding to the transaction element; the transaction canceling request is a request sent by the second terminal device after the corresponding transaction element is failed to be locked based on the received transaction element locking request; the transaction cancellation request is used for requesting transaction cancellation processing;
the determining whether the associated target record information is queried from the blockchain according to the transaction identifier includes:
determining whether associated third resource transfer record information is queried from the blockchain according to the transaction identifier; wherein the third resource transfer record information is information generated after the first amount of resources are transferred from an escrow account to the resource account of the first user when it is determined that the locking of the at least one transaction element of the transaction fails;
and if so, determining to inquire the target record information.
Optionally, the computer-executable instructions, when executed, receive a transaction request sent by a terminal device of a user associated with a transaction, including:
receiving a forward transaction request sent by terminal equipment of a first user; wherein the forward transaction request is to request a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user;
the determining whether the associated target record information is queried from the blockchain according to the transaction identifier includes:
determining whether associated fourth resource transfer record information is queried from the blockchain according to the transaction identifier; wherein the fourth resource transfer record information is information generated after the first amount of resources are transferred from the resource account of the first user to the resource account of the second user based on the forward transaction request;
and if so, determining to inquire the target record information.
Optionally, the computer-executable instructions, when executed, receive a transaction request sent by a terminal device of a user associated with a transaction, including:
receiving a transaction confirmation request sent by a second terminal device of the user corresponding to the transaction element; the transaction confirmation request is a request sent by the second terminal device after the corresponding transaction element is successfully locked based on the received transaction element locking request; the transaction confirmation request is used for requesting transaction confirmation processing;
the method further comprises the following steps:
determining whether first state record information is inquired from a designated database according to the transaction identifier; the first state record information is information generated when all transaction elements of the transaction are determined to be successfully locked;
and if so, determining to inquire the target record information.
Optionally, the computer-executable instructions, when executed, receive a transaction request sent by a terminal device of a user associated with a transaction, including:
receiving a transaction canceling request sent by a second terminal device of the user corresponding to the transaction element; the transaction canceling request is a request sent by the second terminal device after the corresponding transaction element is failed to be locked based on the received transaction element locking request; the transaction cancellation request is used for requesting transaction cancellation processing;
the determining whether the associated target record information is queried from the blockchain according to the transaction identifier includes:
determining whether associated fifth resource transfer record information is queried from the blockchain according to the transaction identifier; wherein the fifth resource transfer record information is information generated after the first amount of resources are transferred from the resource account of the second user to the resource account of the first user when it is determined that the locking of at least one transaction element of the transaction fails;
and if so, determining to inquire the target record information.
Optionally, the computer-executable instructions, when executed, receive a transaction request sent by a terminal device of a user associated with a transaction, including:
receiving a forward transaction request sent by terminal equipment of a first user; wherein the forward transaction request is to request a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user;
the method further comprises the following steps:
determining whether second state record information is inquired from the designated database according to the transaction identifier; the second state record information represents that the forward transaction is in a locking processing state of the transaction element;
and if so, determining to inquire the target record information.
Optionally, the computer-executable instructions, when executed, receive a transaction request sent by a terminal device of a user associated with a transaction, including:
receiving a transaction confirmation request sent by a second terminal device of the user corresponding to the transaction element; the transaction confirmation request is a request sent by the second terminal device after the corresponding transaction element is successfully locked based on the received transaction element locking request; the transaction confirmation request is used for requesting transaction confirmation processing;
the determining whether the associated target record information is queried from the blockchain according to the transaction identifier includes:
determining whether associated sixth resource transfer record information is queried from the blockchain according to the transaction identifier; the sixth resource transfer record information is information generated after the first quantity of resources are transferred from the resource account of the first user to the resource account of the second user when the fact that all transaction elements of the transaction are successfully locked is determined;
and if so, determining to inquire the target record information.
Optionally, the computer-executable instructions, when executed, receive a transaction request sent by a terminal device of a user associated with a transaction, including:
receiving a transaction canceling request sent by a second terminal device of the user corresponding to the transaction element; the transaction canceling request is a request sent by the second terminal device after the corresponding transaction element is failed to be locked based on the received transaction element locking request; the transaction cancellation request is used for requesting transaction cancellation processing;
the method further comprises the following steps:
determining whether third state record information is inquired from the designated database according to the transaction identifier; wherein the third state record information is information generated when it is determined that at least one transaction element of the transaction fails to be locked;
and if so, determining to inquire the target record information.
Optionally, the computer executable instructions, when executed, further comprise:
and if the transaction corresponding to the transaction request is not verified to be idempotent, performing corresponding transaction processing according to the transaction request.
In the transaction processing device provided in one or more embodiments of the present specification, the transaction record information stored in the blockchain is used as a verification basis to verify whether the transaction corresponding to the transaction request is an idempotent transaction, so that the authenticity and validity of the verification are ensured, and the accurate and effective identification of the idempotent transaction is realized; further avoiding the trouble brought to each user associated with the transaction by repeatedly performing transaction processing because the idempotent transaction is not identified.
It should be noted that the embodiment of the transaction processing device in this specification and the embodiment of the transaction processing method in this specification are based on the same inventive concept, and therefore, for specific implementation of this embodiment, reference may be made to implementation of the corresponding transaction processing method, and repeated details are not described again.
Further, corresponding to the transaction processing methods shown in fig. 2 to fig. 6, based on the same technical concept, one or more embodiments of the present specification further provide a storage medium for storing computer-executable instructions, where in a specific embodiment, the storage medium may be a usb disk, an optical disk, a hard disk, and the like, and the storage medium stores computer-executable instructions that, when executed by the processor, implement the following processes:
receiving a transaction request sent by terminal equipment of a user associated with the transaction; the transaction request is used for requesting to transfer a first amount of resources from a resource account of a first user to a resource account of a second user, or the transaction request represents that a transaction element of the transaction is successfully locked and requests to perform transaction confirmation processing, or the transaction request represents that the transaction element of the transaction is failed to be locked and requests to perform transaction cancellation processing;
verifying whether the transaction corresponding to the transaction request is an idempotent transaction or not based on transaction record information stored in a block chain;
if yes, sending transaction expiration information to the terminal equipment; wherein the transaction expiration information is used to indicate termination of transaction processing for the transaction request.
When the computer executable instructions stored in the storage medium provided in one or more embodiments of the present specification are executed by the processor, the transaction record information stored in the blockchain is used as a verification basis to verify whether the transaction corresponding to the transaction request is an idempotent transaction, so as to ensure the authenticity and validity of the verification and achieve accurate and effective identification of the idempotent transaction; further avoiding the trouble brought to each user associated with the transaction by repeatedly performing transaction processing because the idempotent transaction is not identified.
Optionally, the storage medium stores computer-executable instructions that, when executed by the processor, the transaction request comprises: a transaction identification;
the verifying whether the transaction corresponding to the transaction request is an idempotent transaction based on the transaction record information stored in the blockchain includes:
determining whether associated target record information is queried from the blockchain according to the transaction identifier;
and if so, determining that the transaction corresponding to the transaction request is an idempotent transaction.
Optionally, the computer-executable instructions stored in the storage medium, when executed by the processor, receive a transaction request sent by a terminal device of a user associated with a transaction, including:
receiving a forward transaction request sent by first terminal equipment of a first user; wherein the forward transaction request is to request a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user;
the determining whether the associated target record information is queried from the blockchain according to the transaction identifier includes:
determining whether the associated first resource transfer record information is inquired from the block chain according to the transaction identifier; wherein the first resource transfer record information is information generated after the first amount of resources is transferred from the first user's resource account to a designated escrow account based on the forward transaction request;
and if so, determining to inquire the target record information.
Optionally, the computer-executable instructions stored in the storage medium, when executed by the processor, receive a transaction request sent by a terminal device of a user associated with a transaction, including:
receiving a transaction confirmation request sent by a second terminal device of the user corresponding to the transaction element; the transaction confirmation request is a request sent by the second terminal device after the corresponding transaction element is successfully locked based on the received transaction element locking request; the transaction confirmation request is used for requesting transaction confirmation processing;
the determining whether the associated target record information is queried from the blockchain according to the transaction identifier includes:
determining whether associated second resource transfer record information is queried from the blockchain according to the transaction identifier; the second resource transfer record information is information generated after the first quantity of resources are transferred from the escrow account to the resource account of the second user when the transaction elements of the transaction are determined to be locked successfully;
and if so, determining to inquire the target record information.
Optionally, the computer-executable instructions stored in the storage medium, when executed by the processor, receive a transaction request sent by a terminal device of a user associated with a transaction, including:
receiving a transaction canceling request sent by a second terminal device of the user corresponding to the transaction element; the transaction canceling request is a request sent by the second terminal device after the corresponding transaction element is failed to be locked based on the received transaction element locking request; the transaction cancellation request is used for requesting transaction cancellation processing;
the determining whether the associated target record information is queried from the blockchain according to the transaction identifier includes:
determining whether associated third resource transfer record information is queried from the blockchain according to the transaction identifier; wherein the third resource transfer record information is information generated after the first amount of resources are transferred from an escrow account to the resource account of the first user when it is determined that the locking of the at least one transaction element of the transaction fails;
and if so, determining to inquire the target record information.
Optionally, the computer-executable instructions stored in the storage medium, when executed by the processor, receive a transaction request sent by a terminal device of a user associated with a transaction, including:
receiving a forward transaction request sent by terminal equipment of a first user; wherein the forward transaction request is to request a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user;
the determining whether the associated target record information is queried from the blockchain according to the transaction identifier includes:
determining whether associated fourth resource transfer record information is queried from the blockchain according to the transaction identifier; wherein the fourth resource transfer record information is information generated after the first amount of resources are transferred from the resource account of the first user to the resource account of the second user based on the forward transaction request;
and if so, determining to inquire the target record information.
Optionally, the computer-executable instructions stored in the storage medium, when executed by the processor, receive a transaction request sent by a terminal device of a user associated with a transaction, including:
receiving a transaction confirmation request sent by a second terminal device of the user corresponding to the transaction element; the transaction confirmation request is a request sent by the second terminal device after the corresponding transaction element is successfully locked based on the received transaction element locking request; the transaction confirmation request is used for requesting transaction confirmation processing;
the method further comprises the following steps:
determining whether first state record information is inquired from a designated database according to the transaction identifier; the first state record information is information generated when all transaction elements of the transaction are determined to be successfully locked;
and if so, determining to inquire the target record information.
Optionally, the computer-executable instructions stored in the storage medium, when executed by the processor, receive a transaction request sent by a terminal device of a user associated with a transaction, including:
receiving a transaction canceling request sent by a second terminal device of the user corresponding to the transaction element; the transaction canceling request is a request sent by the second terminal device after the corresponding transaction element is failed to be locked based on the received transaction element locking request; the transaction cancellation request is used for requesting transaction cancellation processing;
the determining whether the associated target record information is queried from the blockchain according to the transaction identifier includes:
determining whether associated fifth resource transfer record information is queried from the blockchain according to the transaction identifier; wherein the fifth resource transfer record information is information generated after the first amount of resources are transferred from the resource account of the second user to the resource account of the first user when it is determined that the locking of at least one transaction element of the transaction fails;
and if so, determining to inquire the target record information.
Optionally, the computer-executable instructions stored in the storage medium, when executed by the processor, receive a transaction request sent by a terminal device of a user associated with a transaction, including:
receiving a forward transaction request sent by terminal equipment of a first user; wherein the forward transaction request is to request a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user;
the method further comprises the following steps:
determining whether second state record information is inquired from the designated database according to the transaction identifier; the second state record information represents that the forward transaction is in a locking processing state of the transaction element;
and if so, determining to inquire the target record information.
Optionally, the computer-executable instructions stored in the storage medium, when executed by the processor, receive a transaction request sent by a terminal device of a user associated with a transaction, including:
receiving a transaction confirmation request sent by a second terminal device of the user corresponding to the transaction element; the transaction confirmation request is a request sent by the second terminal device after the corresponding transaction element is successfully locked based on the received transaction element locking request; the transaction confirmation request is used for requesting transaction confirmation processing;
the determining whether the associated target record information is queried from the blockchain according to the transaction identifier includes:
determining whether associated sixth resource transfer record information is queried from the blockchain according to the transaction identifier; the sixth resource transfer record information is information generated after the first quantity of resources are transferred from the resource account of the first user to the resource account of the second user when the fact that all transaction elements of the transaction are successfully locked is determined;
and if so, determining to inquire the target record information.
Optionally, the computer-executable instructions stored in the storage medium, when executed by the processor, receive a transaction request sent by a terminal device of a user associated with a transaction, including:
receiving a transaction canceling request sent by a second terminal device of the user corresponding to the transaction element; the transaction canceling request is a request sent by the second terminal device after the corresponding transaction element is failed to be locked based on the received transaction element locking request; the transaction cancellation request is used for requesting transaction cancellation processing;
the method further comprises the following steps:
determining whether third state record information is inquired from the designated database according to the transaction identifier; wherein the third state record information is information generated when it is determined that at least one transaction element of the transaction fails to be locked;
and if so, determining to inquire the target record information.
Optionally, the storage medium stores computer-executable instructions that, when executed by the processor, further comprise:
and if the transaction corresponding to the transaction request is not verified to be idempotent, performing corresponding transaction processing according to the transaction request.
When the computer executable instructions stored in the storage medium provided by one or more embodiments of the present specification are executed by the processor, the transaction record information stored in the blockchain is used as a verification basis to verify whether the transaction corresponding to the transaction request is an idempotent transaction, so as to ensure the authenticity and validity of the verification and realize the accurate and effective identification of the idempotent transaction; further avoiding the trouble brought to each user associated with the transaction by repeatedly performing transaction processing because the idempotent transaction is not identified.
It should be noted that the embodiment of the storage medium in this specification and the embodiment of the transaction processing method in this specification are based on the same inventive concept, and therefore, for specific implementation of this embodiment, reference may be made to implementation of the corresponding transaction processing method, and repeated details are not described again.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
In the 30 s of the 20 th century, improvements in a technology could clearly be distinguished between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Language Description Language), traffic, pl (core unified Programming Language), HDCal, JHDL (Java Hardware Description Language), langue, Lola, HDL, laspam, hardsradware (Hardware Description Language), vhjhd (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the units may be implemented in the same software and/or hardware or in multiple software and/or hardware when implementing the embodiments of the present description.
One skilled in the art will recognize that one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile 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 a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
One or more embodiments of the present description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of this document and is not intended to limit this document. Various modifications and changes may occur to those skilled in the art from this document. Any modifications, equivalents, improvements, etc. which come within the spirit and principle of the disclosure are intended to be included within the scope of the claims of this document.

Claims (17)

1. A transaction processing method, comprising:
receiving a transaction request sent by terminal equipment of a user associated with the transaction; the transaction request is used for requesting to transfer a first amount of resources from a resource account of a first user to a resource account of a second user, or the transaction request represents that a transaction element of the transaction is successfully locked and requests to perform transaction confirmation processing, or the transaction request represents that the transaction element of the transaction is failed to be locked and requests to perform transaction cancellation processing;
verifying whether the transaction corresponding to the transaction request is an idempotent transaction or not based on transaction record information stored in a block chain;
if yes, sending transaction expiration information to the terminal equipment; wherein the transaction expiration information is used to indicate termination of transaction processing for the transaction request.
2. The method of claim 1, the transaction request comprising: a transaction identification;
the verifying whether the transaction corresponding to the transaction request is an idempotent transaction based on the transaction record information stored in the blockchain includes:
determining whether associated target record information is queried from the blockchain according to the transaction identifier;
and if so, determining that the transaction corresponding to the transaction request is an idempotent transaction.
3. The method of claim 2, the receiving a transaction request sent by a terminal device of a user associated with a transaction, comprising:
receiving a forward transaction request sent by first terminal equipment of a first user; wherein the forward transaction request is to request a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user;
the determining whether the associated target record information is queried from the blockchain according to the transaction identifier includes:
determining whether the associated first resource transfer record information is inquired from the block chain according to the transaction identifier; wherein the first resource transfer record information is information generated after the first amount of resources is transferred from the first user's resource account to a designated escrow account based on the forward transaction request;
and if so, determining to inquire the target record information.
4. The method of claim 2, the receiving a transaction request sent by a terminal device of a user associated with a transaction, comprising:
receiving a transaction confirmation request sent by a second terminal device of the user corresponding to the transaction element; the transaction confirmation request is a request sent by the second terminal device after the corresponding transaction element is successfully locked based on the received transaction element locking request; the transaction confirmation request is used for requesting transaction confirmation processing;
the determining whether the associated target record information is queried from the blockchain according to the transaction identifier includes:
determining whether associated second resource transfer record information is queried from the blockchain according to the transaction identifier; the second resource transfer record information is information generated after the first quantity of resources are transferred from the escrow account to the resource account of the second user when the transaction elements of the transaction are determined to be locked successfully;
and if so, determining to inquire the target record information.
5. The method of claim 2, the receiving a transaction request sent by a terminal device of a user associated with a transaction, comprising:
receiving a transaction canceling request sent by a second terminal device of the user corresponding to the transaction element; the transaction canceling request is a request sent by the second terminal device after the corresponding transaction element is failed to be locked based on the received transaction element locking request; the transaction cancellation request is used for requesting transaction cancellation processing;
the determining whether the associated target record information is queried from the blockchain according to the transaction identifier includes:
determining whether associated third resource transfer record information is queried from the blockchain according to the transaction identifier; wherein the third resource transfer record information is information generated after the first amount of resources are transferred from an escrow account to the resource account of the first user when it is determined that the locking of the at least one transaction element of the transaction fails;
and if so, determining to inquire the target record information.
6. The method of claim 2, the receiving a transaction request sent by a terminal device of a user associated with a transaction, comprising:
receiving a forward transaction request sent by first terminal equipment of a first user; wherein the forward transaction request is to request a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user;
the determining whether the associated target record information is queried from the blockchain according to the transaction identifier includes:
determining whether associated fourth resource transfer record information is queried from the blockchain according to the transaction identifier; wherein the fourth resource transfer record information is information generated after the first amount of resources are transferred from the resource account of the first user to the resource account of the second user based on the forward transaction request;
and if so, determining to inquire the target record information.
7. The method of claim 2, the receiving a transaction request sent by a terminal device of a user associated with a transaction, comprising:
receiving a transaction confirmation request sent by a second terminal device of the user corresponding to the transaction element; the transaction confirmation request is a request sent by the second terminal device after the corresponding transaction element is successfully locked based on the received transaction element locking request; the transaction confirmation request is used for requesting transaction confirmation processing;
the method further comprises the following steps:
determining whether first state record information is inquired from a designated database according to the transaction identifier; the first state record information is information generated when all transaction elements of the transaction are determined to be successfully locked;
and if so, determining to inquire the target record information.
8. The method of claim 2, the receiving a transaction request sent by a terminal device of a user associated with a transaction, comprising:
receiving a transaction canceling request sent by a second terminal device of the user corresponding to the transaction element; the transaction canceling request is a request sent by the second terminal device after the corresponding transaction element is failed to be locked based on the received transaction element locking request; the transaction cancellation request is used for requesting transaction cancellation processing;
the determining whether the associated target record information is queried from the blockchain according to the transaction identifier includes:
determining whether associated fifth resource transfer record information is queried from the blockchain according to the transaction identifier; wherein the fifth resource transfer record information is information generated after the first amount of resources are transferred from the resource account of the second user to the resource account of the first user when it is determined that the locking of at least one transaction element of the transaction fails;
and if so, determining to inquire the target record information.
9. The method of claim 2, the receiving a transaction request sent by a terminal device of a user associated with a transaction, comprising:
receiving a forward transaction request sent by first terminal equipment of a first user; wherein the forward transaction request is to request a transfer of a first amount of resources from a resource account of a first user to a resource account of a second user;
the method further comprises the following steps:
determining whether second state record information is inquired from a designated database according to the transaction identifier; the second state record information represents that the forward transaction is in a locking processing state of the transaction element;
and if so, determining to inquire the target record information.
10. The method of claim 2, the receiving a transaction request sent by a terminal device of a user associated with a transaction, comprising:
receiving a transaction confirmation request sent by a second terminal device of the user corresponding to the transaction element; the transaction confirmation request is a request sent by the second terminal device after the corresponding transaction element is successfully locked based on the received transaction element locking request; the transaction confirmation request is used for requesting transaction confirmation processing;
the determining whether the associated target record information is queried from the blockchain according to the transaction identifier includes:
determining whether associated sixth resource transfer record information is queried from the blockchain according to the transaction identifier; the sixth resource transfer record information is information generated after the first quantity of resources are transferred from the resource account of the first user to the resource account of the second user when the fact that all transaction elements of the transaction are successfully locked is determined;
and if so, determining to inquire the target record information.
11. The method of claim 2, the receiving a transaction request sent by a terminal device of a user associated with a transaction, comprising:
receiving a transaction canceling request sent by a second terminal device of the user corresponding to the transaction element; the transaction canceling request is a request sent by the second terminal device after the corresponding transaction element is failed to be locked based on the received transaction element locking request; the transaction cancellation request is used for requesting transaction cancellation processing;
the method further comprises the following steps:
determining whether third state record information is inquired from a designated database according to the transaction identifier; wherein the third state record information is information generated when it is determined that at least one transaction element of the transaction fails to be locked;
and if so, determining to inquire the target record information.
12. The method according to any one of claims 1-11, further comprising:
and if the transaction corresponding to the transaction request is not verified to be idempotent, performing corresponding transaction processing according to the transaction request.
13. A transaction processing device comprising:
the receiving module is used for receiving a transaction request sent by terminal equipment of a user related to transaction; the transaction request is used for requesting to transfer a first amount of resources from a resource account of a first user to a resource account of a second user, or the transaction request represents that a transaction element of the transaction is successfully locked and requests to perform transaction confirmation processing, or the transaction request represents that the transaction element of the transaction is failed to be locked and requests to perform transaction cancellation processing;
the verification module verifies whether the transaction corresponding to the transaction request is an idempotent transaction or not based on the transaction record information stored in the block chain;
and the sending module is used for sending transaction expiration information to the terminal equipment if the verification result of the verification module is positive, wherein the transaction expiration information is used for indicating that the transaction processing of the transaction request is terminated.
14. The apparatus of claim 13, the transaction request comprising: a transaction identification;
the verification module is used for determining whether related target record information is inquired from the block chain according to the transaction identifier;
and if so, determining that the transaction corresponding to the transaction request is an idempotent transaction.
15. The apparatus of claim 13 or 14, further comprising: a processing module;
and the processing module is used for carrying out corresponding transaction processing according to the transaction request if the verification module verifies that the transaction corresponding to the transaction request is not an idempotent transaction.
16. A transaction processing device comprising:
a processor; and the number of the first and second groups,
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
receiving a transaction request sent by terminal equipment of a user associated with the transaction; the transaction request is used for requesting to transfer a first amount of resources from a resource account of a first user to a resource account of a second user, or the transaction request represents that a transaction element of the transaction is successfully locked and requests to perform transaction confirmation processing, or the transaction request represents that the transaction element of the transaction is failed to be locked and requests to perform transaction cancellation processing;
verifying whether the transaction corresponding to the transaction request is an idempotent transaction or not based on transaction record information stored in a block chain;
and if so, sending transaction expiration information to the terminal equipment, wherein the transaction expiration information is used for indicating that the transaction processing of the transaction request is terminated.
17. A storage medium storing computer-executable instructions that when executed implement the following:
receiving a transaction request sent by terminal equipment of a user associated with the transaction; the transaction request is used for requesting to transfer a first amount of resources from a resource account of a first user to a resource account of a second user, or the transaction request represents that a transaction element of the transaction is successfully locked and requests to perform transaction confirmation processing, or the transaction request represents that the transaction element of the transaction is failed to be locked and requests to perform transaction cancellation processing;
verifying whether the transaction corresponding to the transaction request is an idempotent transaction or not based on transaction record information stored in a block chain;
and if so, sending transaction expiration information to the terminal equipment, wherein the transaction expiration information is used for indicating that the transaction processing of the transaction request is terminated.
CN202010140402.7A 2020-03-03 2020-03-03 Transaction processing method, device and equipment Pending CN110992040A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010140402.7A CN110992040A (en) 2020-03-03 2020-03-03 Transaction processing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010140402.7A CN110992040A (en) 2020-03-03 2020-03-03 Transaction processing method, device and equipment

Publications (1)

Publication Number Publication Date
CN110992040A true CN110992040A (en) 2020-04-10

Family

ID=70081351

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010140402.7A Pending CN110992040A (en) 2020-03-03 2020-03-03 Transaction processing method, device and equipment

Country Status (1)

Country Link
CN (1) CN110992040A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111768303A (en) * 2020-06-01 2020-10-13 支付宝实验室(新加坡)有限公司 Transaction processing method, device, equipment and system
CN112381650A (en) * 2020-11-18 2021-02-19 西安纸贵互联网科技有限公司 Cross-chain interoperation transaction processing method and device, electronic equipment and storage medium
CN112529714A (en) * 2020-12-22 2021-03-19 深圳市富途网络科技有限公司 Using method of financial instrument and related product
WO2021239089A1 (en) * 2020-05-29 2021-12-02 支付宝(杭州)信息技术有限公司 Transaction processing method, apparatus, device and system
CN114022150A (en) * 2022-01-07 2022-02-08 北京笔新互联网科技有限公司 Resource transfer method, device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101727525B1 (en) * 2016-09-05 2017-04-17 주식회사 스케일체인 Block chain based distributed storage method and device thereof
CN108764870A (en) * 2018-05-29 2018-11-06 阿里巴巴集团控股有限公司 Transaction processing method and device, electronic equipment based on block chain
CN108805569A (en) * 2018-05-29 2018-11-13 阿里巴巴集团控股有限公司 Transaction processing method and device, electronic equipment based on block chain
CN110288481A (en) * 2019-06-28 2019-09-27 深圳前海微众银行股份有限公司 A kind of method and device of the assets circulation based on block catenary system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101727525B1 (en) * 2016-09-05 2017-04-17 주식회사 스케일체인 Block chain based distributed storage method and device thereof
CN108764870A (en) * 2018-05-29 2018-11-06 阿里巴巴集团控股有限公司 Transaction processing method and device, electronic equipment based on block chain
CN108805569A (en) * 2018-05-29 2018-11-13 阿里巴巴集团控股有限公司 Transaction processing method and device, electronic equipment based on block chain
CN110288481A (en) * 2019-06-28 2019-09-27 深圳前海微众银行股份有限公司 A kind of method and device of the assets circulation based on block catenary system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021239089A1 (en) * 2020-05-29 2021-12-02 支付宝(杭州)信息技术有限公司 Transaction processing method, apparatus, device and system
CN111768303A (en) * 2020-06-01 2020-10-13 支付宝实验室(新加坡)有限公司 Transaction processing method, device, equipment and system
CN112381650A (en) * 2020-11-18 2021-02-19 西安纸贵互联网科技有限公司 Cross-chain interoperation transaction processing method and device, electronic equipment and storage medium
CN112381650B (en) * 2020-11-18 2024-02-27 西安纸贵互联网科技有限公司 Cross-chain interoperation transaction processing method, device, electronic equipment and storage medium
CN112529714A (en) * 2020-12-22 2021-03-19 深圳市富途网络科技有限公司 Using method of financial instrument and related product
CN114022150A (en) * 2022-01-07 2022-02-08 北京笔新互联网科技有限公司 Resource transfer method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112016921B (en) Transaction processing method, device and equipment
CN110992040A (en) Transaction processing method, device and equipment
CN111340631B (en) Asset transfer method, device, equipment and system
CN110992188B (en) Transaction processing method, device and equipment
CN110472438B (en) Transaction data processing and transaction inquiring method, device and equipment based on blockchain
CN111028084A (en) Transaction processing method, device and equipment based on block chain
WO2021259147A1 (en) Block chain-based resource transfer method, apparatus and device
CN108647950B (en) Transfer request processing method, device and equipment
CN108599973B (en) Log association method, device and equipment
WO2021239090A1 (en) Credit granting processing method, apparatus, device and system
CN111899008B (en) Resource transfer method, device, equipment and system
CN110782253B (en) Transaction processing method, device and equipment based on block chain
CN111768303A (en) Transaction processing method, device, equipment and system
CN113079224A (en) Account binding method and device, storage medium and electronic equipment
WO2021239087A1 (en) Data processing method, apparatus and device, and medium
CN110992039B (en) Transaction processing method, device and equipment
CN113421081A (en) Payment processing method and device
CN111402035B (en) Resource transfer method, device, equipment and system
CN112529576A (en) Resource processing method and device and payment processing method and device
CN113436007A (en) Transaction processing method, device, system and equipment based on block chain
CN113610640B (en) Event wind control method, device, equipment and storage medium based on alliance chain
CN114862380B (en) Quota sharing processing method and device
CN115641129A (en) Payment processing method and device based on digital wallet
CN113222573A (en) Transaction processing method and device
CN117436858A (en) Transaction processing method and device based on credit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200410

RJ01 Rejection of invention patent application after publication