Search

CN-122022995-A - Transaction method and system based on intelligent contract

CN122022995ACN 122022995 ACN122022995 ACN 122022995ACN-122022995-A

Abstract

The invention discloses a transaction method and a transaction system based on intelligent contracts, and relates to the technical field of digital currency. The method comprises the steps that a payment platform executes a payment intelligent contract according to a transaction request and sends a collection instruction to an interconnection platform according to an execution result, the interconnection platform sends the collection instruction to the collection platform, the collection platform collects money according to the collection instruction, the interconnection platform sends a query request about a target collection result to the collection platform when a query condition is met, the collection platform feeds back the target collection result to the interconnection platform according to the query request, the interconnection platform feeds back the target collection result to the payment platform, and the payment platform processes the execution result of the payment intelligent contract according to the target collection result. The implementation mode realizes the data consistency of the receiving and paying parties in the cross-institution transaction process, and enhances the interaction capability of the receiving and paying parties in the transaction process under abnormal conditions.

Inventors

  • WANG ZHE
  • ZHANG LEI
  • CHEN XINGFENG

Assignees

  • 中国人民银行数字货币研究所

Dates

Publication Date
20260512
Application Date
20241112

Claims (18)

  1. 1. A smart contract-based transaction method, comprising: The payment platform executes a payment intelligent contract according to the transaction request; The payment platform sends a collection instruction to the interconnection platform according to the execution result of the payment intelligent contract, wherein the collection instruction indicates the collection platform; The interconnection platform sends the collection instruction to the collection platform, and the collection platform collects according to the collection instruction; Under the condition that the query condition is met, the interconnection and interworking platform sends a query request about a target collection result to the collection platform; The collecting platform feeds back the target collecting result to the interconnection platform according to the query request, and the interconnection platform feeds back the target collecting result to the payment platform; and the payment platform processes the execution result of the payment intelligent contract according to the target collection result.
  2. 2. The transaction method according to claim 1, further comprising, before the interworking platform sends a query request regarding a target payment result to the payment platform: Under the condition that the target collection result is not received in a preset first time period, the interconnection platform estimates the collection result and sends the estimated collection result to the payment platform, and the payment platform determines that the query condition is met and sends the query request to the interconnection platform according to the estimated collection result.
  3. 3. The transaction method according to claim 1, further comprising, before the interworking platform sends a query request regarding a target payment result to the payment platform: The interconnection and interworking platform determines that the query condition is met under the condition that the target collection result is not received within a preset second time period; And/or the number of the groups of groups, And under the condition that the payment platform does not receive the feedback information of the interconnection platform within a preset third duration, determining that the query condition is met, and sending the query request to the interconnection platform.
  4. 4. A transaction method according to claim 2 or 3, wherein the checkout platform comprises a checkout device and a checkout contract execution device, the checkout platform registering in accordance with the checkout instruction, comprising: The collection device receives the collection instruction, sends the collection instruction to the collection contract execution device, enables the collection contract execution device to execute a first collection intelligent contract according to the collection instruction, obtains and caches collection contract data, and sends a cache result to the collection device; the collection device calls a collection wallet to collect according to the buffer result of the collection contract data; The collection contract executing device processes the collection contract data according to the collection result of the collection wallet and sends the processing result to the collection device; and the cash collecting device feeds back the target cash collecting result to the interconnection platform according to the processing result.
  5. 5. The method of claim 4, wherein, And if the collection device does not receive the processing result sent by the collection contract executing device within a preset fourth time period, the collection device feeds back a collection failure result to the interconnection platform.
  6. 6. The method of claim 5, wherein, The fourth time period is less than the first time period, the second time period, and/or the third time period.
  7. 7. The transaction method according to claim 1, wherein the payment platform sends a collection instruction to an interworking platform according to the execution result of the payment smart contract, comprising: The payment platform freezes the payment amount in the payment wallet, executes the payment intelligent contract according to the freezing result, obtains and caches payment contract data, and sends the collection instruction to the interconnection platform according to the caching result; the payment platform processes the execution result of the payment intelligent contract according to the target collection result, and comprises the following steps: in the case that the target collection result indicates that collection is successful, the payment platform pays according to the frozen payment amount in the payment wallet and submits the cached payment contract data; And deleting the payment contract data and thawing the payment amount in the case that the target payment result indicates payment failure.
  8. 8. The transaction method according to claim 1, wherein the payment platform executes a payment smart contract according to a transaction request, and the payment platform sends a collection instruction to an interworking platform according to an execution result of the payment smart contract, comprising: The payment platform executes the payment intelligent contract according to the transaction request to obtain and cache payment contract data, calls a payment wallet to pay according to the cache result, submits the payment intelligent contract data according to the payment result, and sends the collection instruction to the interconnection platform according to the submitting result; the payment platform processes the execution result of the payment intelligent contract according to the target collection result, and comprises the following steps: And under the condition that the target collection result indicates collection failure, the payment platform executes a second collection intelligent contract according to the target collection result and the submitting result of the payment contract data, and invokes the payment wallet to collect the money, wherein the collection amount is the same as the payment amount corresponding to the payment contract data.
  9. 9. A transaction system based on intelligent contracts is characterized by comprising a payment platform, an interconnection platform and a collection platform, wherein, The payment platform is configured to execute a payment intelligent contract according to a transaction request, send a collection instruction to the interconnection platform according to the execution result of the payment intelligent contract, wherein the collection instruction indicates the collection platform, and process the execution result of the payment intelligent contract according to a target collection result; The interconnection platform is configured to send the collection instruction to the collection platform, send a query request about a target collection result to the collection platform and feed the target collection result back to the payment platform when the query condition is met; the collection platform is configured to collect money according to the collection instruction, and feed back the target collection result to the interconnection platform according to the query request.
  10. 10. The transaction system according to claim 9, wherein the transaction system is configured to, The interconnection platform is further configured to estimate a collection result and send the estimated collection result to the payment platform when the target collection result is not received within a preset first time period; The payment platform is configured to determine that the query condition is satisfied according to the estimated collection result, and send the query request to the interconnection platform.
  11. 11. The transaction system according to claim 9, wherein the transaction system is configured to, The interconnection platform is configured to determine that the query condition is met under the condition that the target collection result is not received within a preset second time period; And/or the number of the groups of groups, The payment platform is configured to determine that the query condition is met and send the query request to the interconnection platform under the condition that feedback information of the interconnection platform is not received within a preset third time period.
  12. 12. The transaction system according to claim 9 or 10, wherein the checkout platform includes a checkout device and a checkout contract execution device; The collection device is configured to receive a collection instruction, send the collection instruction to the collection contract execution device, and call a collection wallet to collect according to the caching result of the collection contract data; The collection contract execution device is configured to execute a first collection intelligent contract according to the collection instruction, obtain and cache collection contract data, send the cache result to the collection device, process the collection contract data according to the collection result of the collection wallet, and send the processing result to the collection device.
  13. 13. The transaction system according to claim 12, wherein, The collection device is configured to feed back the collection failure result to the interconnection platform if the processing result sent by the collection contract executing device is not received within a preset fourth time period.
  14. 14. The transaction system according to claim 13, wherein, The fourth time period is less than the first time period, the second time period, and/or the third time period.
  15. 15. The transaction system according to claim 9, wherein the transaction system is configured to, The payment platform is configured to freeze the payment amount in the payment wallet, execute the payment intelligent contract according to the frozen result, obtain and cache payment contract data, send a collection instruction to the interconnection platform according to the cache result, pay according to the frozen payment amount in the payment wallet and submit the cached payment contract data when the target collection result indicates that collection is successful, delete the payment contract data and defrost the payment amount when the target collection result indicates that collection is unsuccessful.
  16. 16. The transaction system according to claim 9, wherein the transaction system is configured to, The payment platform is configured to execute a payment intelligent contract according to a transaction request to obtain and cache payment contract data, call a payment wallet according to the cache result to pay, submit the payment intelligent contract according to the payment result, send the collection instruction to the interconnection platform according to the submission result, execute a second collection intelligent contract according to the target collection result and the submission result of the payment contract data when the target collection result indicates collection failure, and call the payment wallet to collect the same collection amount as the payment amount corresponding to the payment contract data.
  17. 17. A server for conducting transactions based on smart contracts, comprising: one or more processors; storage means for storing one or more programs, When executed by the one or more processors, causes the one or more processors to implement the transaction method of any of claims 1-8.
  18. 18. A computer readable medium on which a computer program is stored, characterized in that the program, when executed by a processor, implements the transaction method according to any of claims 1-8.

Description

Transaction method and system based on intelligent contract Technical Field The invention relates to the technical field of digital currency, in particular to a transaction method and system based on intelligent contracts. Background In the existing digital currency transaction based on intelligent contracts, the transaction flow of cross-institution payment is generally that after a payer executes a payment intelligent contract, a transaction instruction is initiated to a payee through an interconnection platform, and the payee institution can execute the payment intelligent contract according to the transaction instruction. However, the payee may fail to check in during the collection due to abnormal wallet status, overrun, etc. That is, there may be an abnormal situation in the course of the transaction in which the payee cannot check out after the payment by the payer is successful. In this abnormal situation, since the smart contract cannot perform the reverse operation, the transaction data of the payer and the payee may be inconsistent, thereby affecting the user experience. Disclosure of Invention In view of this, an embodiment of the present invention provides a transaction method and system based on an intelligent contract, in a cross-institution transaction process, under the condition that a query condition is satisfied, an interconnection platform sends a query request about a target collection result to a collection platform, then the collection platform can feed back the target collection result to a payment platform through the interconnection platform, and the payment platform processes an execution result of a payment intelligent contract according to the target collection result. Therefore, an active inquiry mechanism of the collection result is realized in the cross-institution transaction process, and the payment platform can process the payment data according to the inquiry result, so that the transaction data of the two parties of receiving and payment are consistent. In addition, the interaction capability of the payment and receipts in the transaction process is enhanced by introducing an active query mechanism, so that the user experience is improved. To achieve the above object, according to one aspect of an embodiment of the present invention, there is provided a transaction method based on an intelligent contract. The transaction method based on the intelligent contract provided by the embodiment of the invention comprises the steps that a payment platform executes payment intelligent contract according to a transaction request; The payment platform sends a collection instruction to the interconnection platform according to the execution result of the payment intelligent contract, wherein the collection instruction indicates the collection platform; The interconnection platform sends a collection instruction to the collection platform, and the collection platform collects according to the collection instruction; Under the condition that the query condition is met, the interconnection and intercommunication platform sends a query request about a target collection result to the collection platform; The collecting platform feeds back a target collecting result to the interconnection platform according to the query request, and the interconnection platform feeds back the target collecting result to the payment platform; and the payment platform processes the execution result of the payment intelligent contract according to the target collection result. Optionally, before the interconnection platform sends the query request of the collection result to the collection platform, the transaction method further includes: Under the condition that the interconnection platform does not receive the target collection result within the preset first time period, estimating the collection result and sending the estimated collection result to the payment platform, and determining that the inquiry condition is met and sending an inquiry request to the interconnection platform by the payment platform according to the estimated collection result. Optionally, before the interconnection and interworking platform sends the query request of the collection result to the collection platform, the transaction method further comprises the step of determining that the query condition is met under the condition that the interconnection and interworking platform does not receive the target collection result within a preset second time period. Optionally, before the interconnection platform sends the query request of the collection result to the collection platform, the transaction method further includes: and under the condition that the payment platform does not receive feedback information of the interconnection platform within a preset third duration, determining that the query condition is met, and sending a query request to the interconnection platform. Optionally, the cashing platform comprises a cashing d