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

Transaction processing method, device and equipment Download PDF

Info

Publication number
CN110992039A
CN110992039A CN202010140399.9A CN202010140399A CN110992039A CN 110992039 A CN110992039 A CN 110992039A CN 202010140399 A CN202010140399 A CN 202010140399A CN 110992039 A CN110992039 A CN 110992039A
Authority
CN
China
Prior art keywords
transaction
information
reverse
user
resource transfer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010140399.9A
Other languages
Chinese (zh)
Other versions
CN110992039B (en
Inventor
王吉元
蒋海滔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ant Blockchain Technology Shanghai 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 CN202010140399.9A priority Critical patent/CN110992039B/en
Priority to CN202110929666.5A priority patent/CN113643030B/en
Publication of CN110992039A publication Critical patent/CN110992039A/en
Application granted granted Critical
Publication of CN110992039B publication Critical patent/CN110992039B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Landscapes

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

Abstract

The embodiment of the specification provides a transaction processing method, a device and equipment, wherein the method comprises the following steps: receiving a reverse transaction request sent by terminal equipment of a first user; the reverse transaction request comprises transaction information, and the transaction information comprises forward transaction identification of forward transaction related to the reverse transaction exchange; the forward transaction is a transaction for transferring resources from a first user to a second user when all transaction elements of the transaction are successfully locked; the reverse transaction is a transaction in which all or part of the resources transferred by the first user to the second user are returned to the first user; inquiring transaction record information associated with the forward transaction identification from the block chain; and if the transaction information meets the transaction condition according to the transaction record information, performing reverse transaction processing according to the transaction information.

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 trade of the commodity is not strange to people due to dissatisfaction with the purchased commodity or mistake in placing the order. Generally, the merchandise exchange transaction is performed based on transaction information of the merchandise purchase transaction. However, the transaction information of the current commodity purchase transaction is usually maintained by a centralized transaction platform, and there is a risk that the transaction information is lost or damaged, and the loss or damage of the transaction information further affects the execution of the commodity trade-back transaction.
Disclosure of Invention
One or more embodiments of the present specification provide a transaction processing method including receiving a reverse transaction request transmitted by a terminal device of a first user. Wherein the reverse transaction request includes transaction information. The transaction information includes a forward transaction identification of a forward transaction associated with the reverse exchange. And the forward transaction is a transaction for transferring resources from the first user to the second user when the locking of each transaction element of the transaction is successful. The reverse transaction is a transaction in which all or part of the resources transferred by the first user to the second user are returned to the first user. And inquiring the transaction record information associated with the forward transaction identification from the block chain. And if the transaction information meets the transaction condition according to the transaction record information, performing reverse transaction processing according to the transaction information.
One or more embodiments of the present specification provide a transaction processing device. The device comprises a receiving module, which receives a reverse transaction request sent by a terminal device of a first user. Wherein the reverse transaction request includes transaction information. The transaction information includes a forward transaction identification of a forward transaction associated with the reverse exchange. And the forward transaction is a transaction for transferring resources from the first user to the second user when the locking of each transaction element of the transaction is successful. The reverse transaction is a transaction in which part or all of the resources transferred from the first user to the second user are returned to the first user. The device also comprises a query module which queries the transaction record information associated with the forward transaction identification from the block chain. The device also comprises a processing module which carries out reverse transaction processing according to the transaction information if the transaction information is determined to meet the transaction condition according to the transaction record information.
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, receive a reverse transaction request sent by a terminal device of a first user. Wherein the reverse transaction request includes transaction information. The transaction information includes a forward transaction identification of a forward transaction associated with the reverse exchange. And the forward transaction is a transaction for transferring resources from the first user to the second user when the locking of each transaction element of the transaction is successful. The reverse transaction is a transaction in which part or all of the resources transferred from the first user to the second user are returned to the first user. And inquiring the transaction record information associated with the forward transaction identification from the block chain. And if the transaction information meets the transaction condition according to the transaction record information, performing reverse transaction processing according to the transaction information.
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 reverse transaction request sent by a terminal device of a first user. Wherein the reverse transaction request includes transaction information. The transaction information includes a forward transaction identification of a forward transaction associated with the reverse exchange. And the forward transaction is a transaction for transferring resources from the first user to the second user when the locking of each transaction element of the transaction is successful. The reverse transaction is a transaction in which part or all of the resources transferred from the first user to the second user are returned to the first user. And inquiring the transaction record information associated with the forward transaction identification from the block chain. And if the transaction information meets the transaction condition according to the transaction record information, performing reverse transaction processing according to the transaction information.
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 block diagram of a transaction processing device according to one or more embodiments of the present disclosure;
fig. 11 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: a terminal device, a transaction processing node and a blockchain of a first user; the terminal equipment of the first user can be a mobile phone, a tablet computer, a desktop computer, a portable notebook computer and the like; the terminal equipment of the first user is in communication connection with the transaction processing node through a wireless network.
Specifically, after the terminal device of the first user and the transaction processing node perform data communication to complete a forward transaction, the terminal device responds to the reverse transaction operation of the first user and sends a reverse transaction request to the transaction processing node according to the determined transaction information; when the forward transaction is the transaction of transferring resources from the first user to the second user when all transaction elements of the transaction are successfully locked, and the reverse transaction is the transaction of returning all or part of the resources transferred from the first user to the second user to the first user; the transaction information includes a forward transaction identification of a forward transaction associated with the reverse exchange. When a transaction processing node receives a reverse transaction request sent by a terminal device of a first user, inquiring transaction record information associated with a forward transaction identifier from a block chain; and determining whether the transaction information included in the reverse transaction request meets transaction conditions or not according to the inquired transaction record information, if so, performing reverse transaction processing according to the transaction information, and sending a processing result to the terminal equipment of the first user.
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), where the transaction platform performs data interaction with the block chain node, and queries transaction record information associated with the forward transaction identifier from the block chain through the block chain node.
Therefore, the transaction record information is stored in the block chain, and the data safety of the transaction record information is ensured based on the characteristics of the block chain, such as non-falsification, openness and check, and the like, so that an effective data basis is provided for the related processing of reverse transaction, and the effective processing of the reverse transaction is ensured; moreover, the forward transaction related to the reverse exchange carries out resource transfer when all transaction elements of the transaction are successfully locked, rather than directly carrying out resource transfer, thereby effectively avoiding transaction failure caused by that a certain transaction element does not meet transaction conditions.
Based on the application scenario architecture, one or more embodiments of the present specification provide a transaction processing method. Fig. 4 is a flow diagram of a transaction processing method provided in one or more embodiments of the present disclosure, 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 reverse transaction request sent by a terminal device of a first user; the reverse transaction request comprises transaction information, and the transaction information comprises forward transaction identification of forward transaction related to the reverse transaction exchange; the forward transaction is a transaction for transferring resources from a first user to a second user when all transaction elements of the transaction are successfully locked; the reverse transaction is a transaction in which all or part of the resources transferred by the first user to the second user are returned to the first user;
the transaction information further comprises resource transfer information, and the resource transfer information comprises information such as the first quantity of the resources to be returned.
Step S104, inquiring transaction record information associated with the forward transaction identification from the block chain;
and step S106, if the transaction information meets the transaction condition according to the transaction record information, performing reverse transaction processing according to the transaction information.
Further, if the transaction information is determined not to meet the transaction condition according to the transaction record information, request failure information is sent to the terminal equipment.
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 nodes according to the forward transaction identifier included in the reverse transaction request, so that the block chain nodes query transaction record information associated with the forward transaction identifier from the block chain and send the queried transaction record information to the transaction platform; accordingly, step S106 may include: and if the transaction platform determines that the transaction information included in the reverse transaction request meets the transaction condition according to the received transaction record information, performing reverse transaction processing according to the transaction information. Alternatively, step S104 includes: the transaction platform sends a verification request to the block chain link point according to transaction information included in the reverse transaction request, so that the block chain link point inquires transaction record information associated with the forward transaction identifier from the block chain based on an intelligent contract in the block chain, determines whether the transaction information meets transaction conditions according to the inquired transaction record information, and sends a determination result to the transaction platform; accordingly, step S106 includes: and if the received determined result represents that the transaction information meets the transaction condition, performing reverse transaction processing according to the transaction information.
In one or more embodiments of the present description, the transaction record information is stored in the blockchain, and based on the characteristics of the blockchain, such as non-falsification, openness and visibility, the data security of the transaction record information is ensured, so that an effective data basis is provided for the related processing of the reverse transaction, and the effective processing of the reverse transaction is ensured; moreover, the forward transaction related to the reverse exchange carries out resource transfer when all transaction elements of the transaction are successfully locked, rather than directly carrying out resource transfer, thereby effectively avoiding transaction failure caused by that a certain transaction element does not meet transaction conditions.
Considering the current successful forward transaction, the data management operations of multiple levels such as updating of stock, management of red envelope, increase and decrease of points are often involved. In order to avoid a failure of a transaction caused by a 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 terminal device, first determining locking information of transaction elements associated with the transaction, and sending a transaction element locking request to a second terminal device of a user corresponding to the transaction elements according to the locking information to lock the transaction elements associated with the transaction, if response data returned by each second terminal device all represent that the transaction elements are successfully locked, transferring resources from a resource account of a first user to a resource account of a second user according to the forward transaction request; if the response data returned by the at least one second terminal device represents that the locking of the transaction element fails, transaction rollback processing is carried out; then, each transaction record information of the transaction is stored in the blockchain, so that the transaction processing such as reverse transaction is performed based on the transaction record information in the blockchain. The resource may be an entity resource (e.g., currency) or a virtual resource (e.g., points).
As an example, the forward transaction request includes a forward transaction identifier and forward transaction information, and the forward transaction information includes information that the first user transfers 70 points to the second user and redeems a coupon identified as Y for a milk 1 box of brand X provided by the second user; the transaction processing node determines that transaction elements associated with the transaction comprise milk and a coupon according to the transaction information, determines that locking information of the milk comprises brand X and box 1, and determines that locking information of the coupon comprises identification Y; according to the forward transaction identification 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 and uses the stock quantity as the state information of the milk of the brand X according to the received transaction element locking request, for example, the inquired stock quantity is 5, the milk of the brand X is determined to be in a tradable state, 1 box of the milk of the brand X is locked, the brand X and the quantity 1 box are associated and recorded with the forward transaction identifier, and response data representing that the locking operation is successful are returned; further, when the second terminal device of the coupon management user receives the transaction element locking request, whether the coupon identified as Y is in the valid period and serves as the state information of the coupon is detected, for example, the coupon is in the valid 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 recorded in association with the forward transaction identifier, and response data representing that the locking operation is successful is returned. The transaction processing node determines that each transaction element is successfully locked according to the received response data returned by the second terminal device, and transfers 70 points from the resource account of the first user to the resource account of the second user; and determining the resource account of the first user as a resource transfer-out account, determining the resource account of the second user as a resource transfer-in account, determining the recorded information as first recorded information of forward transaction according to information association records such as account information of the resource transfer-out account, account information of the resource transfer-in account, second quantity of transferred resources and the like, and storing the first recorded information into the block chain.
Therefore, based on the forward transaction request, the resource transfer is carried out when all transaction elements of the transaction are successfully locked, rather than the direct resource transfer, and the transaction failure caused by the fact that a certain transaction element does not meet the transaction condition is effectively avoided.
After the forward transaction is successful, the user can proceed with a reverse transaction based on the successful forward transaction as desired. To ensure transaction security, the reverse transaction request includes: ciphertext data of the transaction information, wherein the ciphertext data is obtained by encrypting the transaction information by using a private key of a first user; accordingly, as shown in fig. 5, step S102 includes:
step S102', receiving a reverse transaction request sent by the terminal equipment of the first user; the reverse transaction request comprises ciphertext data of transaction information, and the transaction information comprises a forward transaction identifier of a forward transaction related to a reverse transaction exchange; the forward transaction is a transaction for transferring resources from a first user to a second user when all transaction elements of the transaction are successfully locked; the reverse transaction is a transaction in which all or part of the resources transferred by the first user to the second user are returned to the first user;
correspondingly, as shown in fig. 5, step S104 includes:
step S104-2, acquiring a public key corresponding to the private key of the first user;
optionally, the reverse transaction request further includes digital identity information of the first user, such as DID (fully: Decentralized identities; chinese: Decentralized identities or distributed identities), and correspondingly, step S104-2 may include: inquiring a corresponding document (DID doc) from the block chain according to the digital identity information of the first user, and acquiring a public key of the first user from the document; or sending a key acquisition request to a designated security mechanism according to the digital identity information of the first user, so that the designated security mechanism acquires an associated public key from the association relationship between the digital identity information and the public key which is stored in advance according to the digital identity information of the first user, and sends the acquired public key to the transaction processing node.
S104-4, decrypting the ciphertext data by using the acquired public key to obtain transaction information;
step S104-6, acquiring a forward transaction identifier from the obtained transaction information;
and step S104-8, inquiring the associated transaction record information from the blockchain according to the acquired forward transaction identification.
The transaction information is encrypted by adopting the private key of the first user, and the ciphertext data of the transaction information is sent to the transaction processing node, so that the transaction safety is ensured, and risks such as malicious tampering of the transaction information are avoided.
Considering that the user may perform the reverse transaction operation based on a failed transaction due to the misoperation, as shown in fig. 6, the step S106 includes:
step S106-2, if the transaction record information is determined to comprise the first record information and the resource transfer information in the transaction record information is matched with the resource transfer information in the transaction information, determining that the transaction information meets the transaction condition; wherein the first record information represents that the forward transaction is in a transaction success state.
Specifically, whether the inquired transaction record information comprises first record information is determined, if not, the transaction information is determined not to meet transaction conditions, and request failure information is sent to the terminal equipment of the first user; if yes, determining whether the resource transfer record information in the inquired transaction record information is matched with the resource transfer information in the transaction information, if not, determining that the transaction information does not meet transaction conditions, and sending request failure information to the terminal equipment of the first user; if the transaction information is matched with the transaction condition, determining that the transaction information meets the transaction condition, and executing step S106-4.
And step S106-4, reverse transaction processing is carried out according to the transaction information.
Further, considering that in practical applications, a user may perform one or more reverse transactions based on the same forward transaction, the transaction record information queried from the blockchain according to the forward transaction identifier may include first record information of the forward transaction, or may include both the first record information of the forward transaction and second record information of a reverse transaction processed based on the forward transaction.
When the inquired transaction record information includes the first record information, that is, when the first user performs the reverse transaction operation for the first time, as shown in fig. 7, step S106-2 includes:
step S106-2-2, determining whether the inquired transaction record information comprises first record information, if so, executing step S106-2-4, otherwise, sending request failure information to the terminal equipment of the first user;
step S106-2-4, determining resource transfer-in account information, resource transfer-out account information and a first quantity of resources to be returned according to the resource transfer information in the transaction information;
optionally, the resource transfer information in the transaction information includes resource transfer-in account information, resource transfer-out account information, and a first quantity of resources to be returned, and correspondingly, step S106-2-4 includes: and acquiring resource transfer-in account information, resource transfer-out account information and a first quantity of resources to be returned from the resource transfer information included in the transaction information. Or the resource transfer information in the transaction information comprises a user identifier of the first user, a user identifier of the second user and the first quantity of the resources to be returned, and the association relationship between the user identifier and the account information of the resource account is stored in the transaction processing node in advance; correspondingly, step S106-2-4 includes: acquiring a user identifier of a first user, a user identifier of a second user and a first quantity of resources to be returned from resource transfer information included in transaction information; acquiring associated account information from the stored association relation according to the user identifier of the first user, and determining the acquired account information as resource transfer account information; and acquiring the associated account information from the stored association relation according to the user identification of the second user, and determining the acquired account information as the resource transfer-out account information.
Step S106-2-6, verifying whether the determined resource transfer-in account information is the same as the resource transfer-out account information included in the first record information, if so, executing step S106-2-8, otherwise, sending request failure information to the terminal equipment of the first user;
step S106-2-8, verifying whether the determined resource transfer-out account information is the same as the resource transfer-in account information included in the first record information, if so, executing step S106-2-10, otherwise, sending request failure information to the terminal equipment of the first user;
and step S106-2-10, verifying whether the determined first quantity is not more than the second quantity of the transferred resources included in the first transaction record information, if so, executing step S106-4, otherwise, sending request failure information to the terminal equipment of the first user.
That is, when the verification results in steps S106-2-6 to S106-2-10 are all yes, it is determined that the resource transfer information in the transaction record information matches the resource transfer information in the transaction information. It should be noted that the execution sequence of steps S106-2-6 to S106-2-10 is not limited to the above sequence, and can be set by itself in practical applications as needed.
Further, when the inquired transaction record information includes the first record information and the second record information of the reverse transaction processed based on the forward transaction, that is, the first user does not perform the reverse transaction operation for the first time, as shown in fig. 8, on the basis of the foregoing step S106-2-2 to step S106-2-8, the following step S106-2-12 is further included:
step S106-2-12, verifying whether the third quantity is not larger than the second quantity of the transferred resources included in the first record information, wherein the third quantity is the total quantity of the resources to be returned and the returned resources included in the second record information, if so, executing step S106-4, otherwise, sending request failure information to the terminal equipment of the first user.
In the above, whether the forward transaction associated with the reverse transaction is in a successful state is determined by determining whether the inquired transaction record information includes the first record information; the validity of the transaction information is ensured by verifying whether the resource transfer information in the transaction record information is matched with the resource transfer information in the transaction information.
Further, when it is determined that the forward transaction associated with the reverse transaction exchange is in a successful state and the transaction information is valid, the reverse transaction processing may be performed according to the transaction information, specifically, the performing reverse transaction processing according to the transaction information in step S106 includes: and transferring the first amount of resources from the determined resource transfer-out account to the determined resource transfer-in account, and sending request success information to the first terminal equipment.
In order to trace back the reverse transaction and provide an effective verification basis for the reverse transaction initiated based on the same forward transaction, as shown in fig. 9, step S106 further includes:
step S108, generating second record information of the reverse transaction according to the reverse transaction identifier and the transaction information included in the reverse transaction request;
step S110, the second recording information is saved in the block chain.
In the above way, the first recording information and the second recording information are stored in the block chain, so that the data security of the recording information is ensured, and the problems that the transaction cannot be effectively processed and the like caused by data loss and the like are avoided.
In one particular embodiment, the transaction processing method may include the steps of:
step S202, receiving a reverse transaction request sent by a terminal device of a first user; the reverse transaction request comprises ciphertext data of transaction information, and the transaction information comprises a forward transaction identifier of a forward transaction related to a reverse transaction exchange; the forward transaction is a transaction for transferring resources from a first user to a second user when all transaction elements of the transaction are successfully locked; the reverse transaction is a transaction in which all or part of the resources transferred by the first user to the second user are returned to the first user;
step S204, a public key corresponding to the private key of the first user is obtained, and the obtained public key is adopted to decrypt ciphertext data included in the reverse transaction request to obtain transaction information;
step S206, acquiring a forward transaction identifier from the acquired transaction information, and inquiring related transaction record information from the blockchain according to the acquired forward transaction identifier;
step S208, determining whether the inquired transaction record information comprises first record information, if so, executing step S210, otherwise, sending request failure information to the terminal equipment of the first user;
step S210, determining whether the inquired transaction record information includes second record information of reverse transaction processed based on forward transaction, if yes, executing step S212, otherwise, executing step S222;
step S212, determining resource transfer-in account information, resource transfer-out account information and a first quantity of resources to be returned according to the resource transfer information in the transaction information;
step S214, verifying whether the determined resource transfer-in account information is the same as the resource transfer-out account information included in the first record information, if so, executing step S216, otherwise, sending request failure information to the terminal equipment of the first user;
step S216, verifying whether the determined resource transfer-out account information is the same as the resource transfer-in account information included in the first record information, if so, executing step S218, otherwise, sending request failure information to the terminal equipment of the first user;
step S218, determining the total amount of the resources to be returned and the returned resources included in the second record information as a third amount;
step S220, verifying whether the third quantity is not greater than the second quantity of the transferred resources included in the first record information, if so, executing step S230, otherwise, sending request failure information to the terminal device of the first user;
step S222, determining resource transfer-in account information, resource transfer-out account information and a first quantity of resources to be returned according to the resource transfer information in the transaction information;
step S224, verifying whether the determined resource transfer-in account information is the same as the resource transfer-out account information included in the first record information, if so, executing step S226, otherwise, sending request failure information to the terminal equipment of the first user;
step S226, verifying whether the determined resource transfer-out account information is the same as the resource transfer-in account information included in the first record information, if so, executing step S228, otherwise, sending request failure information to the terminal equipment of the first user;
step S228, verifying whether the determined first quantity is not greater than the second quantity of the transferred resource included in the first transaction record information, if so, executing step S230, otherwise, sending request failure information to the terminal device of the first user;
step S230, transferring a first amount of resources from the determined resource transfer-out account to the determined resource transfer-in account;
step S232, generating second recording information of the reverse transaction according to the reverse transaction identifier and the transaction information included in the reverse transaction request, storing the second recording information in the block chain, and sending a request success information to the first terminal device.
It should be noted that, for the specific implementation process of the above step S202 to step S232, reference may be made to the foregoing related description, and repeated details are not described herein again.
In one or more embodiments of the present description, the transaction record information is stored in the blockchain, and based on the characteristics of the blockchain, such as non-falsification, openness and visibility, the data security of the transaction record information is ensured, so that an effective data basis is provided for the related processing of the reverse transaction, and the effective processing of the reverse transaction is ensured; moreover, the forward transaction related to the reverse exchange carries out resource transfer when all transaction elements of the transaction are successfully locked, rather than directly carrying out resource transfer, thereby effectively avoiding transaction failure caused by that a certain transaction element does not meet transaction conditions.
On the basis of the same technical concept, one or more embodiments of the present disclosure further provide a transaction processing apparatus corresponding to the transaction processing methods described in fig. 4 to 9. Fig. 10 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. 4 to 9, and as shown in fig. 10, the apparatus includes:
a receiving module 301, configured to receive a reverse transaction request sent by a terminal device of a first user; wherein the reverse transaction request comprises transaction information, the transaction information comprising a forward transaction identifier of a forward transaction associated with the reverse transaction; the forward transaction is a transaction for transferring resources from the first user to the second user when each transaction element of the transaction is successfully locked; the reverse transaction is a transaction in which part or all of the resources transferred from the first user to the second user are returned to the first user;
a query module 302 for querying the transaction record information associated with the forward transaction identifier from the blockchain;
and the processing module 303 is configured to perform reverse transaction processing according to the transaction information if it is determined that the transaction information meets the transaction condition according to the transaction record information.
In the transaction processing device provided in one or more embodiments of the present specification, the transaction record information is stored in the blockchain, and based on the characteristics of the blockchain, such as non-falsification, public availability, and the like, the data security of the transaction record information is ensured, so that an effective data basis is provided for the related processing of the reverse transaction, and the effective processing of the reverse transaction is ensured; moreover, the forward transaction related to the reverse exchange carries out resource transfer when all transaction elements of the transaction are successfully locked, rather than directly carrying out resource transfer, thereby effectively avoiding transaction failure caused by that a certain transaction element does not meet transaction conditions.
Optionally, the transaction module 303 determines that the transaction information meets a transaction condition if it is determined that the transaction record information includes first record information and resource transfer information in the transaction record information matches resource transfer information in the transaction information; wherein the first record information characterizes that the forward transaction is in a transaction success state.
Optionally, the transaction record information includes: the first recording information;
the transaction module 303 determines resource transfer account information, and a first quantity of resources to be returned according to the resource transfer information in the transaction information; and the number of the first and second groups,
verifying whether the determined resource transfer-in account information is the same as the resource transfer-out account information included in the first record information;
verifying whether the determined resource transfer-out account information is the same as the resource transfer-in account information included in the first record information;
verifying whether the determined first amount is not greater than a second amount of transferred resources included in the first transaction record information;
and if the verification result is yes, determining that the resource transfer information in the transaction record information is matched with the resource transfer information in the transaction information.
Optionally, the transaction record information includes: the first record information and second record information of reverse transaction processed based on the forward transaction;
the transaction module 303 determines resource transfer account information, and a first quantity of resources to be returned according to the resource transfer information in the transaction information; and the number of the first and second groups,
verifying whether the determined resource transfer-in account information is the same as the resource transfer-out account information included in the first record information;
verifying whether the determined resource transfer-out account information is the same as the resource transfer-in account information included in the first record information;
verifying whether the third amount is not greater than the second amount of the transferred resource included in the first record information; wherein the third quantity is the total quantity of the to-be-returned resources and the returned resources included in the second record information;
and if the verification result is yes, determining that the resource transfer information in the transaction record information is matched with the resource transfer information in the transaction information.
Optionally, the transaction information further comprises: a reverse transaction identification of the reverse transaction; the device further comprises: a generation module;
the generating module is used for generating second record information of the reverse transaction according to the reverse transaction identification and the transaction information; and the number of the first and second groups,
and saving the second recording information to the block chain.
Optionally, the reverse transaction request comprises: the ciphertext data of the transaction information is obtained by encrypting the transaction information by using a private key of the first user;
the obtaining module 302 obtains a public key corresponding to the private key; and the number of the first and second groups,
decrypting the ciphertext data by using the obtained public key to obtain the transaction information;
acquiring the forward transaction identification from the obtained transaction information;
and inquiring related transaction record information from the block chain according to the acquired forward transaction identifier.
Optionally, the apparatus further comprises: a sending module;
and the sending module is used for sending request failure information to the terminal equipment if the transaction information is determined to not meet the transaction condition according to the transaction record information.
In the transaction processing device provided in one or more embodiments of the present specification, the transaction record information is stored in the blockchain, and based on the characteristics of the blockchain, such as non-falsification, public availability, and the like, the data security of the transaction record information is ensured, so that an effective data basis is provided for the related processing of the reverse transaction, and the effective processing of the reverse transaction is ensured; moreover, the forward transaction related to the reverse exchange carries out resource transfer when all transaction elements of the transaction are successfully locked, rather than directly carrying out resource transfer, thereby effectively avoiding transaction failure caused by that a certain transaction element does not meet transaction conditions.
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 9, 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. 11 is a schematic structural diagram of a transaction processing device provided in one or more embodiments of the present specification.
As shown in fig. 11, the transaction processing device may have a relatively large difference due to different configurations or performances, and may include one or more processors 401 and a memory 402, where one or more stored applications or data may be stored in the memory 402. Wherein memory 402 may be transient or persistent. The application program stored in memory 402 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 401 may be configured to communicate with the memory 402 to execute a series of computer-executable instructions in the memory 402 on the transaction processing device. The transaction processing device may also include one or more power supplies 403, one or more wired or wireless network interfaces 404, one or more input-output interfaces 405, one or more keyboards 406, etc.
In one particular embodiment, the transaction processing 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 device, and the one or more programs configured for execution by the one or more processors include computer-executable instructions for:
receiving a reverse transaction request sent by terminal equipment of a first user; wherein the reverse transaction request comprises transaction information, the transaction information comprising a forward transaction identifier of a forward transaction associated with the reverse transaction; the forward transaction is a transaction for transferring resources from the first user to the second user when each transaction element of the transaction is successfully locked; the reverse transaction is a transaction in which all or part of the resources transferred by the first user to the second user are returned to the first user;
inquiring the transaction record information associated with the forward transaction identification from the block chain;
and if the transaction information meets the transaction condition according to the transaction record information, performing reverse transaction processing according to the transaction information.
According to the transaction processing equipment provided by one or more embodiments of the specification, the transaction record information is stored in the block chain, and based on the characteristics of non-falsification, public check and the like of the block chain, the data safety of the transaction record information is ensured, so that an effective data basis is provided for relevant processing of reverse transaction, and the effective processing of the reverse transaction is ensured; moreover, the forward transaction related to the reverse exchange carries out resource transfer when all transaction elements of the transaction are successfully locked, rather than directly carrying out resource transfer, thereby effectively avoiding transaction failure caused by that a certain transaction element does not meet transaction conditions.
Optionally, the computer-executable instructions, when executed, said determining that the transaction information satisfies transaction conditions according to the transaction record information comprise:
if the transaction record information is determined to comprise first record information and the resource transfer information in the transaction record information is matched with the resource transfer information in the transaction information, determining that the transaction information meets transaction conditions; wherein the first record information characterizes that the forward transaction is in a transaction success state.
Optionally, the computer executable instructions, when executed, the transaction record information comprises: the first recording information;
determining that the resource transfer information in the transaction record information matches the resource transfer information in the transaction information, including:
determining resource transfer account information, resource transfer account information and a first quantity of resources to be returned according to the resource transfer information in the transaction information;
verifying whether the determined resource transfer-in account information is the same as the resource transfer-out account information included in the first record information; and the number of the first and second groups,
verifying whether the determined resource transfer-out account information is the same as the resource transfer-in account information included in the first record information;
verifying whether the determined first amount is not greater than a second amount of transferred resources included in the first transaction record information;
and if the verification result is yes, determining that the resource transfer information in the transaction record information is matched with the resource transfer information in the transaction information.
Optionally, the computer executable instructions, when executed, the transaction record information comprises: the first record information and second record information of reverse transaction processed based on the forward transaction;
determining that the resource transfer information in the transaction record information matches the resource transfer information in the transaction information, including:
determining resource transfer account information, resource transfer account information and a first quantity of resources to be returned according to the resource transfer information in the transaction information;
verifying whether the determined resource transfer-in account information is the same as the resource transfer-out account information included in the first record information; and the number of the first and second groups,
verifying whether the determined resource transfer-out account information is the same as the resource transfer-in account information included in the first record information;
verifying whether the third amount is not greater than the second amount of the transferred resource included in the first record information; wherein the third quantity is the total quantity of the to-be-returned resources and the returned resources included in the second record information;
and if the verification result is yes, determining that the resource transfer information in the transaction record information is matched with the resource transfer information in the transaction information.
Optionally, the computer executable instructions, when executed, further comprise: a reverse transaction identification of the reverse transaction;
after the reverse transaction processing is performed according to the transaction information, the method further comprises the following steps:
generating second record information of the reverse transaction according to the reverse transaction identification and the transaction information;
and saving the second recording information to the block chain.
Optionally, the computer executable instructions, when executed, the reverse transaction request comprises: the ciphertext data of the transaction information is obtained by encrypting the transaction information by using a private key of the first user;
the inquiring of the transaction record information associated with the forward transaction identification from the blockchain includes:
obtaining a public key corresponding to the private key;
decrypting the ciphertext data by using the obtained public key to obtain the transaction information;
acquiring the forward transaction identification from the obtained transaction information;
and inquiring related transaction record information from the block chain according to the acquired forward transaction identifier.
Optionally, the computer executable instructions, when executed, further comprise:
and if the transaction information does not meet the transaction condition according to the transaction record information, sending request failure information to the terminal equipment.
According to the transaction processing equipment provided by one or more embodiments of the specification, the transaction record information is stored in the block chain, and based on the characteristics of non-falsification, public check and the like of the block chain, the data safety of the transaction record information is ensured, so that an effective data basis is provided for relevant processing of reverse transaction, and the effective processing of the reverse transaction is ensured; moreover, the forward transaction related to the reverse exchange carries out resource transfer when all transaction elements of the transaction are successfully locked, rather than directly carrying out resource transfer, thereby effectively avoiding transaction failure caused by that a certain transaction element does not meet transaction conditions.
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, based on the same technical concept, corresponding to the methods shown in fig. 4 to fig. 9, 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 a processor, implement the following processes:
receiving a reverse transaction request sent by terminal equipment of a first user; wherein the reverse transaction request comprises transaction information, the transaction information comprising a forward transaction identifier of a forward transaction associated with the reverse transaction; the forward transaction is a transaction for transferring resources from the first user to the second user when each transaction element of the transaction is successfully locked; the reverse transaction is a transaction in which all or part of the resources transferred by the first user to the second user are returned to the first user;
inquiring the transaction record information associated with the forward transaction identification from the block chain;
and if the transaction information meets the transaction condition according to the transaction record information, performing reverse transaction processing according to the transaction information.
When executed by a processor, the computer-executable instructions stored in the storage medium provided in one or more embodiments of the present specification ensure data security of the transaction record information based on characteristics of the blockchain, such as non-falsification and public-searchable property, and further provide an effective data basis for related processing of reverse transactions, and ensure effective processing of reverse transactions; moreover, the forward transaction related to the reverse exchange carries out resource transfer when all transaction elements of the transaction are successfully locked, rather than directly carrying out resource transfer, thereby effectively avoiding transaction failure caused by that a certain transaction element does not meet transaction conditions.
Optionally, the storage medium stores computer-executable instructions that, when executed by the processor, determine that the transaction information satisfies a transaction condition according to the transaction record information, including:
if the transaction record information is determined to comprise first record information and the resource transfer information in the transaction record information is matched with the resource transfer information in the transaction information, determining that the transaction information meets transaction conditions; wherein the first record information characterizes that the forward transaction is in a transaction success state.
Optionally, the storage medium stores computer-executable instructions that, when executed by the processor, cause the transaction record information to include: the first recording information;
determining that the resource transfer information in the transaction record information matches the resource transfer information in the transaction information, including:
determining resource transfer account information, resource transfer account information and a first quantity of resources to be returned according to the resource transfer information in the transaction information;
verifying whether the determined resource transfer-in account information is the same as the resource transfer-out account information included in the first record information; and the number of the first and second groups,
verifying whether the determined resource transfer-out account information is the same as the resource transfer-in account information included in the first record information;
verifying whether the determined first amount is not greater than a second amount of transferred resources included in the first transaction record information;
and if the verification result is yes, determining that the resource transfer information in the transaction record information is matched with the resource transfer information in the transaction information.
Optionally, the storage medium stores computer-executable instructions that, when executed by the processor, cause the transaction record information to include: the first record information and second record information of reverse transaction processed based on the forward transaction;
determining that the resource transfer information in the transaction record information matches the resource transfer information in the transaction information, including:
determining resource transfer account information, resource transfer account information and a first quantity of resources to be returned according to the resource transfer information in the transaction information;
verifying whether the determined resource transfer-in account information is the same as the resource transfer-out account information included in the first record information; and the number of the first and second groups,
verifying whether the determined resource transfer-out account information is the same as the resource transfer-in account information included in the first record information;
verifying whether the third amount is not greater than the second amount of the transferred resource included in the first record information; wherein the third quantity is the total quantity of the to-be-returned resources and the returned resources included in the second record information;
and if the verification result is yes, determining that the resource transfer information in the transaction record information is matched with the resource transfer information in the transaction information.
Optionally, the storage medium stores computer-executable instructions that, when executed by the processor, further comprise: a reverse transaction identification of the reverse transaction;
after the reverse transaction processing is performed according to the transaction information, the method further comprises the following steps:
generating second record information of the reverse transaction according to the reverse transaction identification and the transaction information;
and saving the second recording information to the block chain.
Optionally, the storage medium stores computer-executable instructions that, when executed by the processor, cause the reverse transaction request to comprise: the ciphertext data of the transaction information is obtained by encrypting the transaction information by using a private key of the first user;
the inquiring of the transaction record information associated with the forward transaction identification from the blockchain includes:
obtaining a public key corresponding to the private key;
decrypting the ciphertext data by using the obtained public key to obtain the transaction information;
acquiring the forward transaction identification from the obtained transaction information;
and inquiring related transaction record information from the block chain according to the acquired forward transaction identifier.
Optionally, the storage medium stores computer-executable instructions that, when executed by the processor, further comprise:
and if the transaction information does not meet the transaction condition according to the transaction record information, sending request failure information to the terminal equipment.
When executed by a processor, the computer-executable instructions stored in the storage medium provided by one or more embodiments of the present specification ensure data security of the transaction record information based on characteristics of the blockchain, such as non-falsification, public availability, and the like, by storing the transaction record information in the blockchain, thereby providing an effective data basis for related processing of reverse transactions and ensuring effective processing of reverse transactions; moreover, the forward transaction related to the reverse exchange carries out resource transfer when all transaction elements of the transaction are successfully locked, rather than directly carrying out resource transfer, thereby effectively avoiding transaction failure caused by that a certain transaction element does not meet transaction conditions.
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 (13)

1. A transaction processing method, comprising:
receiving a reverse transaction request sent by terminal equipment of a first user; wherein the reverse transaction request comprises transaction information, the transaction information comprising a forward transaction identifier of a forward transaction associated with the reverse transaction; the forward transaction is a transaction for transferring resources from the first user to the second user when each transaction element of the transaction is successfully locked; the reverse transaction is a transaction in which all or part of the resources transferred by the first user to the second user are returned to the first user;
inquiring the transaction record information associated with the forward transaction identification from the block chain;
and if the transaction information meets the transaction condition according to the transaction record information, performing reverse transaction processing according to the transaction information.
2. The method of claim 1, the determining from the transaction record information that the transaction information satisfies a transaction condition, comprising:
if the transaction record information is determined to comprise first record information and the resource transfer information in the transaction record information is matched with the resource transfer information in the transaction information, determining that the transaction information meets transaction conditions; wherein the first record information characterizes that the forward transaction is in a transaction success state.
3. The method of claim 2, the transaction record information comprising: the first recording information;
determining that the resource transfer information in the transaction record information matches the resource transfer information in the transaction information, including:
determining resource transfer account information, resource transfer account information and a first quantity of resources to be returned according to the resource transfer information in the transaction information;
verifying whether the determined resource transfer-in account information is the same as the resource transfer-out account information included in the first record information; and the number of the first and second groups,
verifying whether the determined resource transfer-out account information is the same as the resource transfer-in account information included in the first record information;
verifying whether the determined first amount is not greater than a second amount of transferred resources included in the first transaction record information;
and if the verification result is yes, determining that the resource transfer information in the transaction record information is matched with the resource transfer information in the transaction information.
4. The method of claim 2, the transaction record information comprising: the first record information and second record information of reverse transaction processed based on the forward transaction;
determining that the resource transfer information in the transaction record information matches the resource transfer information in the transaction information, including:
determining resource transfer account information, resource transfer account information and a first quantity of resources to be returned according to the resource transfer information in the transaction information;
verifying whether the determined resource transfer-in account information is the same as the resource transfer-out account information included in the first record information; and the number of the first and second groups,
verifying whether the determined resource transfer-out account information is the same as the resource transfer-in account information included in the first record information;
verifying whether the third amount is not greater than the second amount of the transferred resource included in the first record information; wherein the third quantity is the total quantity of the to-be-returned resources and the returned resources included in the second record information;
and if the verification result is yes, determining that the resource transfer information in the transaction record information is matched with the resource transfer information in the transaction information.
5. The method of claim 1, the transaction information further comprising: a reverse transaction identification of the reverse transaction;
after the reverse transaction processing is performed according to the transaction information, the method further comprises the following steps:
generating second record information of the reverse transaction according to the reverse transaction identification and the transaction information;
and saving the second recording information to the block chain.
6. The method of claim 1, the reverse transaction request comprising: the ciphertext data of the transaction information is obtained by encrypting the transaction information by using a private key of the first user;
the inquiring of the transaction record information associated with the forward transaction identification from the blockchain includes:
obtaining a public key corresponding to the private key;
decrypting the ciphertext data by using the obtained public key to obtain the transaction information;
acquiring the forward transaction identification from the obtained transaction information;
and inquiring related transaction record information from the block chain according to the acquired forward transaction identifier.
7. The method of any of claims 1-6, further comprising:
and if the transaction information does not meet the transaction condition according to the transaction record information, sending request failure information to the terminal equipment.
8. A transaction processing device comprising:
the receiving module is used for receiving a reverse transaction request sent by terminal equipment of a first user; wherein the reverse transaction request comprises transaction information, the transaction information comprising a forward transaction identifier of a forward transaction associated with the reverse transaction; the forward transaction is a transaction for transferring resources from the first user to the second user when each transaction element of the transaction is successfully locked; the reverse transaction is a transaction in which part or all of the resources transferred from the first user to the second user are returned to the first user;
the query module is used for querying the transaction record information associated with the forward transaction identification from the block chain;
and the processing module is used for carrying out reverse transaction processing according to the transaction information if the transaction information meets the transaction condition according to the transaction record information.
9. The apparatus of claim 8, wherein the first and second electrodes are disposed on opposite sides of the substrate,
the transaction module determines that the transaction information meets transaction conditions if the transaction record information comprises first record information and resource transfer information in the transaction record information is matched with resource transfer information in the transaction information; wherein the first record information characterizes that the forward transaction is in a transaction success state.
10. The apparatus of claim 8, the transaction information further comprising: a reverse transaction identification of the reverse transaction; the device comprises: a generation module;
the generating module is used for generating second record information of the reverse transaction according to the reverse transaction identification and the transaction information after the transaction module carries out reverse transaction processing according to the transaction information;
and saving the second recording information to the block chain.
11. The apparatus of claim 8, the reverse transaction request comprising: the ciphertext data of the transaction information is obtained by encrypting the transaction information by using a private key of the first user;
the inquiry module acquires a public key corresponding to the private key; and the number of the first and second groups,
decrypting the ciphertext data by using the obtained public key to obtain the transaction information;
acquiring the forward transaction identification from the obtained transaction information;
and inquiring related transaction record information from the block chain according to the acquired forward transaction identifier.
12. 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 reverse transaction request sent by terminal equipment of a first user; wherein the reverse transaction request comprises transaction information, the transaction information comprising a forward transaction identifier of a forward transaction associated with the reverse transaction; the forward transaction is a transaction for transferring resources from the first user to the second user when each transaction element of the transaction is successfully locked; the reverse transaction is a transaction in which part or all of the resources transferred from the first user to the second user are returned to the first user;
inquiring the transaction record information associated with the forward transaction identification from the block chain;
and if the transaction information meets the transaction condition according to the transaction record information, performing reverse transaction processing according to the transaction information.
13. A storage medium storing computer-executable instructions that when executed implement the following:
receiving a reverse transaction request sent by terminal equipment of a first user; wherein the reverse transaction request comprises transaction information, the transaction information comprising a forward transaction identifier of a forward transaction associated with the reverse transaction; the forward transaction is a transaction for transferring resources from the first user to the second user when each transaction element of the transaction is successfully locked; the reverse transaction is a transaction in which part or all of the resources transferred from the first user to the second user are returned to the first user;
inquiring the transaction record information associated with the forward transaction identification from the block chain;
and if the transaction information meets the transaction condition according to the transaction record information, performing reverse transaction processing according to the transaction information.
CN202010140399.9A 2020-03-03 2020-03-03 Transaction processing method, device and equipment Active CN110992039B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010140399.9A CN110992039B (en) 2020-03-03 2020-03-03 Transaction processing method, device and equipment
CN202110929666.5A CN113643030B (en) 2020-03-03 2020-03-03 Transaction processing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010140399.9A CN110992039B (en) 2020-03-03 2020-03-03 Transaction processing method, device and equipment

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202110929666.5A Division CN113643030B (en) 2020-03-03 2020-03-03 Transaction processing method, device and equipment

Publications (2)

Publication Number Publication Date
CN110992039A true CN110992039A (en) 2020-04-10
CN110992039B CN110992039B (en) 2021-06-29

Family

ID=70081326

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202110929666.5A Active CN113643030B (en) 2020-03-03 2020-03-03 Transaction processing method, device and equipment
CN202010140399.9A Active CN110992039B (en) 2020-03-03 2020-03-03 Transaction processing method, device and equipment

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202110929666.5A Active CN113643030B (en) 2020-03-03 2020-03-03 Transaction processing method, device and equipment

Country Status (1)

Country Link
CN (2) CN113643030B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112200552A (en) * 2020-06-24 2021-01-08 支付宝(杭州)信息技术有限公司 Resource transfer method, device and equipment based on block chain
CN112581131A (en) * 2020-05-15 2021-03-30 支付宝(杭州)信息技术有限公司 Asset transfer method, device, equipment and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106469377A (en) * 2015-08-21 2017-03-01 阿里巴巴集团控股有限公司 Return of goods information processing method and device
CN107038578A (en) * 2017-04-19 2017-08-11 浙江数秦科技有限公司 Multi-signature exchange information processing method in data trade platform based on block chain
CN109409856A (en) * 2017-08-18 2019-03-01 阿里巴巴集团控股有限公司 Reimbursement information processing method and device
CN109544157A (en) * 2018-10-25 2019-03-29 腾讯科技(深圳)有限公司 Transaction processing method, device and system
CN109872137A (en) * 2019-01-30 2019-06-11 北京沃东天骏信息技术有限公司 A kind of electronic trade method, node and storage medium
CN110163634A (en) * 2019-04-29 2019-08-23 阿里巴巴集团控股有限公司 Withdrawing method and device, electronic equipment based on block chain
CN110574058A (en) * 2017-04-18 2019-12-13 区块链控股有限公司 Computer-implemented system and method for performing transaction blending on blockchains

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3384448B1 (en) * 2015-11-30 2020-10-14 Shapeshift AG Systems and methods for improving security in blockchain-asset exchange
US11531974B2 (en) * 2016-08-17 2022-12-20 International Business Machines Corporation Tracking transactions through a blockchain
KR101841568B1 (en) * 2017-04-27 2018-05-04 주식회사 코인플러그 Method for issuing, using, refunding, settling and revocating electric voucher using updated status of balance database by respective blocks in blockchain, and server using the same
US11238460B2 (en) * 2017-04-28 2022-02-01 Mastercard International Incorporated Method and system for implementing chargebacks on a distributed ledger system
CN108320228A (en) * 2018-03-07 2018-07-24 物数(上海)信息科技有限公司 Transregional piece of chain transaction in assets method, platform, equipment and storage medium
CN110472438B (en) * 2019-07-31 2023-08-18 创新先进技术有限公司 Transaction data processing and transaction inquiring method, device and equipment based on blockchain
CN110503435B (en) * 2019-07-31 2023-10-27 创新先进技术有限公司 Transaction early warning method, device and equipment based on blockchain
CN110837491B (en) * 2019-11-25 2021-04-09 深圳市深银联易办事金融服务有限公司 Block chain financial big data processing system and method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106469377A (en) * 2015-08-21 2017-03-01 阿里巴巴集团控股有限公司 Return of goods information processing method and device
CN110574058A (en) * 2017-04-18 2019-12-13 区块链控股有限公司 Computer-implemented system and method for performing transaction blending on blockchains
CN107038578A (en) * 2017-04-19 2017-08-11 浙江数秦科技有限公司 Multi-signature exchange information processing method in data trade platform based on block chain
CN109409856A (en) * 2017-08-18 2019-03-01 阿里巴巴集团控股有限公司 Reimbursement information processing method and device
CN109544157A (en) * 2018-10-25 2019-03-29 腾讯科技(深圳)有限公司 Transaction processing method, device and system
CN109872137A (en) * 2019-01-30 2019-06-11 北京沃东天骏信息技术有限公司 A kind of electronic trade method, node and storage medium
CN110163634A (en) * 2019-04-29 2019-08-23 阿里巴巴集团控股有限公司 Withdrawing method and device, electronic equipment based on block chain

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112581131A (en) * 2020-05-15 2021-03-30 支付宝(杭州)信息技术有限公司 Asset transfer method, device, equipment and system
US11449876B2 (en) 2020-05-15 2022-09-20 Alipay (Hangzhou) Information Technology Co., Ltd. Methods, apparatuses, devices, and systems for asset transfer
CN112200552A (en) * 2020-06-24 2021-01-08 支付宝(杭州)信息技术有限公司 Resource transfer method, device and equipment based on block chain

Also Published As

Publication number Publication date
CN113643030B (en) 2024-05-28
CN110992039B (en) 2021-06-29
CN113643030A (en) 2021-11-12

Similar Documents

Publication Publication Date Title
CN111340631B (en) Asset transfer method, device, equipment and system
KR102226257B1 (en) Method and device for writing service data to a blockchain system
KR102258437B1 (en) Blockchain-based data storage and query method and device
CN112241506B (en) User behavior backtracking method, device, equipment and system
CN112016921B (en) Transaction processing method, device and equipment
CN110472438B (en) Transaction data processing and transaction inquiring method, device and equipment based on blockchain
CN110992188B (en) Transaction processing method, device and equipment
CN110503435B (en) Transaction early warning method, device and equipment based on blockchain
CN111899008B (en) Resource transfer method, device, equipment and system
CN111028084A (en) Transaction processing method, device and equipment based on block chain
CN108074024B (en) Trusted data transmission method, device and system
CN110992040A (en) Transaction processing method, device and equipment
CN111461623B (en) Block chain-based warehouse bill creating method, device and equipment
CN114637755B (en) Article code generation method based on block chain, and article right transfer method and device
CN111767144A (en) Transaction routing determination method, device, equipment and system for transaction data
CN110334160A (en) Relationship binding method, device and equipment based on block chain
CN111768303A (en) Transaction processing method, device, equipment and system
CN110992039B (en) Transaction processing method, device and equipment
CN113495797A (en) Message queue and consumer dynamic creation method and system
CN110782253B (en) Transaction processing method, device and equipment based on block chain
CN111310137A (en) Block chain associated data evidence storing method and device and electronic equipment
CN110992164B (en) Transaction processing method, device, system and equipment based on block chain
CN113327115A (en) Rental business processing method, device, equipment and system
CN113672784A (en) Vehicle information processing method, device and system based on block chain
US9600508B1 (en) Data layer service availability

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240920

Address after: Room 803, floor 8, No. 618 Wai Road, Huangpu District, Shanghai 200010

Patentee after: Ant blockchain Technology (Shanghai) Co.,Ltd.

Country or region after: China

Address before: 310000 801-11 section B, 8th floor, 556 Xixi Road, Xihu District, Hangzhou City, Zhejiang Province

Patentee before: Alipay (Hangzhou) Information Technology Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right