CN113781216A - Asynchronous cross-chain transaction query method and device based on callback contract mechanism - Google Patents

Asynchronous cross-chain transaction query method and device based on callback contract mechanism Download PDF

Info

Publication number
CN113781216A
CN113781216A CN202110994792.9A CN202110994792A CN113781216A CN 113781216 A CN113781216 A CN 113781216A CN 202110994792 A CN202110994792 A CN 202110994792A CN 113781216 A CN113781216 A CN 113781216A
Authority
CN
China
Prior art keywords
cross
chain
transaction
chain transaction
callback
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
CN202110994792.9A
Other languages
Chinese (zh)
Other versions
CN113781216B (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.)
China Zheshang Bank Co Ltd
Original Assignee
China Zheshang Bank 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 China Zheshang Bank Co Ltd filed Critical China Zheshang Bank Co Ltd
Priority to CN202110994792.9A priority Critical patent/CN113781216B/en
Publication of CN113781216A publication Critical patent/CN113781216A/en
Application granted granted Critical
Publication of CN113781216B publication Critical patent/CN113781216B/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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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/3821Electronic credentials
    • 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/3825Use of electronic signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Databases & Information Systems (AREA)
  • General Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Marketing (AREA)
  • Computing Systems (AREA)
  • Technology Law (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses an asynchronous cross-chain transaction query method and device based on a callback contract mechanism. Firstly, after a user initiates a cross-chain transaction to a cross-chain cluster, a first cross-chain transaction receipt is obtained, a cross-chain interaction process is completed by a block chain system, after cross-chain inquiry is completed, a target chain returns a result receipt to an initiating chain, a cross-chain callback contract associates the first cross-chain transaction receipt with a third cross-chain transaction receipt, and the user can inquire the third cross-chain transaction receipt through the first cross-chain transaction receipt and acquire the cross-chain result receipt through the third cross-chain transaction receipt. The method solves the problems that the original cross-link transaction needs to be synchronously waited, the efficiency is low and the stability is poor, the processing capacity of a block chain system is greatly improved by an asynchronous interaction mode, the interaction flow and the execution result are linked with chain storage certificates, the result is real and traceable, the query can be carried out at any time, and the efficiency and the flexibility of the cross-link transaction query are improved.

Description

Asynchronous cross-chain transaction query method and device based on callback contract mechanism
Technical Field
The invention relates to the technical field of block chain cross-chain and intelligent contracts, in particular to an asynchronous cross-chain transaction query method and equipment based on a callback contract mechanism.
Background
The block chain cross-chain technology is a key technology for solving the block chain information isolated island, achieving the block chain network barrier and realizing the data mutual fusion and sharing. The blockchain technology can solve the trust problem of each party participating in the chain, and the cross-chain technology needs to solve the trust and intercommunication problem between chains. The block chain cross-chain technology has some key problems at present, one is that a block chain platform system is not uniform, interactive interfaces have respective specifications, and the other is that a cross-chain interactive process greatly depends on an intermediary system, a large amount of time is consumed for waiting for the return of a result, and the efficiency is low.
The intelligent contract is a code logic run on the blockchain network, which specifies the operation and access mode of the assets on the blockchain, and the user can extend the capability of the intelligent contract by writing the code logic by himself to realize the operation and operation of the assets on the chain. Intelligent contracts greatly expand the capabilities of blockchains.
The asynchronous processing technology is an interactive mode relative to synchronous processing, the synchronous processing means that an initiator of an interactive action needs to actively wait for a processing result of a task receiver, and the process cannot be interrupted, the asynchronous processing means that a task receiver of the interactive action accepts the task in advance and returns the acceptance result, but the task is not completed at the moment, and the task receiver is responsible for informing the completion condition of the task of the initiator of communication, and the asynchronous processing technology is suitable for operation which has low real-time response requirement and is time-consuming.
Disclosure of Invention
The invention aims to provide an asynchronous cross-link transaction query method and equipment based on a callback contract mechanism aiming at the defects of the prior art, so that the problem of cross-link routing of information among alliance chains is solved, information can be transmitted correctly among different alliance block chains, and universality and convenience are provided for cross-link transactions among different block chains.
The purpose of the invention is realized by the following technical scheme: an asynchronous cross-chain transaction query method based on a callback contract mechanism comprises the following steps:
s1: firstly, a user deploys a cross-link callback contract at an initiating chain and acquires a callback contract address;
s2: the user generates a first cross-chain transaction by taking the cross-chain callback contract address obtained in the step S1 as a parameter, and submits the first cross-chain transaction to the initiating chain;
s3: the initiating chain receives a first cross-chain transaction initiated by a user, constructs a first cross-chain transaction certificate and returns the first cross-chain transaction certificate to the user, and asynchronously starts a cross-chain interaction process;
s4: the method comprises the steps that an initiating chain carries out a cross-chain interaction process, first cross-chain transaction is processed and converted into a cross-chain interaction request message, the cross-chain interaction request message is sent to a target chain, the target chain generates a second cross-chain transaction and a certificate thereof after receiving the cross-chain interaction request message, the second cross-chain transaction needs to contain a cross-chain callback contract address in the first cross-chain transaction, and the second cross-chain transaction and the certificate thereof are stored in the local part of the target chain; the destination chain returns the second cross-chain transaction certificate to the initiating chain; the destination chain asynchronously processes the second cross-chain transaction, generates a cross-chain interaction result message according to the first cross-chain transaction certificate, the cross-chain callback contract address and the second cross-chain transaction processing result, and returns the cross-chain interaction result message to the initiating chain;
s5: after receiving the cross-chain interaction result message, the initiating chain constructs and processes a third cross-chain transaction by taking a second cross-chain transaction processing result, a first cross-chain transaction certificate and a cross-chain callback contract address as parameters, and after the third cross-chain transaction is generated, calls a callback contract pointed by the cross-chain callback contract address by taking the transaction certificate as the parameter;
s6: the cross-chain callback contract associates the first cross-chain transaction certificate with the third cross-chain transaction certificate, and uses the second cross-chain transaction processing result as a third cross-chain transaction processing result for uplink storage;
s7: when a user inquires a cross-chain interaction result, a first cross-chain transaction certificate is required to be provided, a callback contract is called to inquire a third cross-chain transaction certificate, and a third cross-chain transaction processing result is inquired by using the third cross-chain transaction certificate and is used as a cross-chain interaction result.
Further, the cross-chain callback contract can be deployed by the user, the cross-chain callback contract needs to comply with a specific interface standard, the standard is a specific intelligent contract method name and a fixed type and quantity of parameters, the user can realize related association logic by himself, the logic must include the association of the first cross-chain transaction certificate and the third cross-chain transaction certificate, otherwise, the query flow cannot be completed. The difference between the cross-link callback contract and the common intelligent contract is whether the specific interface standard is realized. If the user does not deploy the custom cross-chain callback contract, a cross-chain callback contract address built into the blockchain system may be used.
Further, in the whole cross-chain interaction flow, the first cross-chain transaction, the cross-chain interaction request message, the second cross-chain transaction, the cross-chain interaction result message, and the third cross-chain transaction all carry: the method comprises the steps of inter-link callback contract address, a first inter-link transaction certificate, initiating link identity information and destination link identity information.
Further, the blockchain system will have a built-in cross-chain callback contract, and the contract address is a default fixed address and will be deployed when the blockchain is initialized.
Further, if the interaction is heterogeneous cross-chain interaction, cross-chain agents are deployed in both the initiating chain and the destination chain;
the cross-chain agent of the initiating chain is responsible for sending a cross-chain interaction request message, receiving a cross-chain interaction result message and generating a third cross-chain transaction to be processed inside the initiating chain;
and the cross-chain agent of the destination chain is responsible for receiving the cross-chain interaction request message, generating a second cross-chain transaction to be processed in the destination chain, wherein after the second cross-chain transaction is executed, the cross-chain agent of the destination chain generates a cross-chain interaction result message and returns the cross-chain interaction result message to the cross-chain agent of the initiating chain.
Further, a first cross-chain transaction is signed by the user, a second cross-chain transaction is signed by the destination chain, and a third cross-chain transaction is signed by the origination chain.
Further, the first cross-chain transaction is executed in the initiating chain, the second cross-chain transaction is executed in the destination chain, and the third cross-chain transaction is executed in the initiating chain, wherein the second cross-chain transaction processing result is the same as the third cross-chain transaction processing result, and the data formats of the result receipt of the second cross-chain transaction processing result and the third cross-chain transaction processing result need to be determined according to the result receipt format of the chain where the second cross-chain transaction processing result and the third cross-chain transaction processing result are located.
Further, after the third cross-chain transaction processing is completed, the third cross-chain transaction processing result is stored in the initiating chain, and the first cross-chain transaction voucher and the third cross-chain transaction voucher are correlated at the same time, so that the cross-chain interaction result can be inquired at any time after the third cross-chain transaction is successfully executed by using the first cross-chain transaction voucher.
Furthermore, after the user initiates the first cross-link transaction and obtains the first cross-link transaction certificate, the user can be regarded as successful initiation without waiting for the processing result of the second cross-link transaction and/or the third cross-link transaction; if the user needs to inquire the cross-chain interaction result, a polling or monitoring mode can be adopted, a period of time limit can be set, if the cross-chain interaction result is not inquired in the time limit, the time is considered to be out, and the cross-chain interaction can be initiated again.
The present invention also provides a computer apparatus comprising: a memory and a processor; the memory having stored thereon a computer program executable by the processor; and when the processor runs the computer program, executing the steps of the asynchronous cross-chain transaction query method based on the callback contract mechanism.
The invention has the beneficial effects that: the asynchronous cross-link transaction query method based on the callback contract mechanism provided by the invention realizes asynchronization of transaction initiation and result query, realizes cross-link request and chain link storage of cross-link results, and completes traceability of cross-link result receipt.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some preferred embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of an asynchronous cross-link transaction query method based on a callback contract mechanism according to an embodiment of the present invention.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and preferred embodiments, and the objects and effects of the present invention will become more apparent, and the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The application provides an asynchronous cross-chain transaction query method based on a callback contract mechanism, a user can initiate cross-chain transactions to an initiating chain, the initiating chain is forwarded to a target chain to be processed, the target chain recalls a cross-chain callback contract through a cross-chain agent, the cross-chain callback contract is associated with the cross-chain transactions and a cross-chain result receipt and stored in a local world state, and the user can asynchronously query the execution result of the cross-chain transactions through a first cross-chain transaction certificate. The above process is shown in fig. 1, and the method specifically includes the following steps:
s1: firstly, a user deploys a cross-link callback contract at an initiating chain and acquires a callback contract address;
specifically, the cross-chain callback contract can be deployed by a user, the cross-chain callback contract needs to comply with a specific interface standard, the standard is a specific intelligent contract method name and parameters of fixed types and quantity, the user can realize related association logic by himself, the logic must include association of a first cross-chain transaction certificate and a third cross-chain transaction certificate, otherwise, the query flow cannot be completed; the difference between the cross-link callback contract and the common intelligent contract is whether the specific interface standard is realized or not; if the user does not deploy the custom cross-chain callback contract, a cross-chain callback contract address built into the blockchain system may be used.
And a built-in cross-link callback contract of the blockchain system, wherein the contract address is a default fixed address and is deployed when the blockchain is initialized.
S2: the user generates a first cross-chain transaction by using the cross-chain callback contract address obtained in the step S1 as a parameter, and submits the first cross-chain transaction to the initiating chain.
S3: the initiating chain receives a first cross-chain transaction initiated by a user, constructs a first cross-chain transaction certificate and returns the first cross-chain transaction certificate to the user, and asynchronously starts a cross-chain interaction process.
S4: the method comprises the steps that an initiating chain carries out a cross-chain interaction process, first cross-chain transaction is processed and converted into a cross-chain interaction request message, the cross-chain interaction request message is sent to a target chain, the target chain generates a second cross-chain transaction and a certificate thereof after receiving the cross-chain interaction request message, the second cross-chain transaction needs to contain a cross-chain callback contract address in the first cross-chain transaction, and the second cross-chain transaction and the certificate thereof are stored in the local part of the target chain; the destination chain returns the second cross-chain transaction certificate to the initiating chain; and the destination chain asynchronously processes the second cross-chain transaction, generates a cross-chain interaction result message according to the first cross-chain transaction certificate, the cross-chain callback contract address and the second cross-chain transaction processing result, and returns the cross-chain interaction result message to the initiating chain.
S5: and after the initiating chain receives the cross-chain interaction result message, constructing and processing a third cross-chain transaction by taking the second cross-chain transaction processing result, the first cross-chain transaction voucher and the cross-chain callback contract address as parameters, and after the third cross-chain transaction is generated, calling a callback contract pointed by the cross-chain callback contract address by taking the transaction voucher as a parameter.
S6: and the cross-chain callback contract associates the first cross-chain transaction certificate with the third cross-chain transaction certificate, and uses the second cross-chain transaction processing result as a third cross-chain transaction processing result for uplink storage.
S7: when a user inquires a cross-chain interaction result, a first cross-chain transaction certificate is required to be provided, a callback contract is called to inquire a third cross-chain transaction certificate, and a third cross-chain transaction processing result is inquired by using the third cross-chain transaction certificate and is used as a cross-chain interaction result.
After a user initiates a first cross-link transaction and obtains a first cross-link transaction certificate, the user can be regarded as successful initiation without waiting for a processing result of a second cross-link transaction and/or a third cross-link transaction; if the user needs to inquire the cross-chain interaction result, a polling or monitoring mode can be adopted, a period of time limit can be set, if the cross-chain interaction result is not inquired in the time limit, the time is considered to be out, and the cross-chain interaction can be initiated again.
If the heterogeneous cross-chain interaction is adopted, cross-chain agents are deployed in both the initiating chain and the target chain; the cross-chain agent of the initiating chain is responsible for sending a cross-chain interaction request message, receiving a cross-chain interaction result message and generating a third cross-chain transaction to be processed inside the initiating chain; and the cross-chain agent of the destination chain is responsible for receiving the cross-chain interaction request message, generating a second cross-chain transaction to be processed in the destination chain, wherein after the second cross-chain transaction is executed, the cross-chain agent of the destination chain generates a cross-chain interaction result message and returns the cross-chain interaction result message to the cross-chain agent of the initiating chain.
Specifically, in the whole cross-chain interaction flow, the first cross-chain transaction, the cross-chain interaction request message, the second cross-chain transaction, the cross-chain interaction result message, and the third cross-chain transaction all carry: the method comprises the steps of inter-link callback contract address, a first inter-link transaction certificate, initiating link identity information and destination link identity information.
Specifically, a first cross-chain transaction is signed by a user, a second cross-chain transaction is signed by a destination chain, and a third cross-chain transaction is signed by an origination chain. The first cross-chain transaction is executed in an initiating chain, the second cross-chain transaction is executed in a destination chain, the third cross-chain transaction is executed in the initiating chain, wherein the processing result of the second cross-chain transaction is the same as the processing result of the third cross-chain transaction, and the data formats of the result receipt of the second cross-chain transaction and the third cross-chain transaction need to be determined according to the format of the result receipt of the chain where the second cross-chain transaction and the third cross-chain transaction are located. After the third cross-chain transaction is completed, the third cross-chain transaction processing result is stored in the initiating chain, and the first cross-chain transaction voucher and the third cross-chain transaction voucher are correlated at the same time, so that the cross-chain interaction result can be inquired at any time after the third cross-chain transaction is successfully executed by using the first cross-chain transaction voucher.
By the method, the cross-chain transaction execution result receipt query and the cross-chain execution result traceability are realized on the basis of not influencing a block chain trust mechanism, and compared with the traditional mode, the method improves the efficiency and flexibility of the cross-chain transaction query.
In one embodiment, a computer device is provided, which includes a memory and a processor, the memory having stored therein computer-readable instructions, which when executed by the processor, cause the processor to execute the steps in the asynchronous cross-chain transaction query method based on a callback contract mechanism in the above embodiments.
In one embodiment, a storage medium storing computer-readable instructions is provided, which when executed by one or more processors, cause the one or more processors to perform the steps in the asynchronous cross-chain transaction query method based on a callback contract mechanism in the embodiments described above. The storage medium may be a nonvolatile storage medium.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The foregoing is only a preferred embodiment of the present invention, and although the present invention has been disclosed in the preferred embodiments, it is not intended to limit the present invention. Those skilled in the art can make numerous possible variations and modifications to the present teachings, or modify equivalent embodiments to equivalent variations, without departing from the scope of the present teachings, using the methods and techniques disclosed above. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention are still within the scope of the protection of the technical solution of the present invention, unless the contents of the technical solution of the present invention are departed.

Claims (10)

1. An asynchronous cross-chain transaction query method based on a callback contract mechanism is characterized by comprising the following steps:
s1: firstly, a user deploys a cross-link callback contract at an initiating chain and acquires a callback contract address;
s2: the user generates a first cross-chain transaction by taking the cross-chain callback contract address obtained in the step S1 as a parameter, and submits the first cross-chain transaction to the initiating chain;
s3: the initiating chain receives a first cross-chain transaction initiated by a user, constructs a first cross-chain transaction certificate and returns the first cross-chain transaction certificate to the user, and asynchronously starts a cross-chain interaction process;
s4: the method comprises the steps that an initiating chain carries out a cross-chain interaction process, first cross-chain transaction is processed and converted into a cross-chain interaction request message, the cross-chain interaction request message is sent to a target chain, the target chain generates a second cross-chain transaction and a certificate thereof after receiving the cross-chain interaction request message, the second cross-chain transaction needs to contain a cross-chain callback contract address in the first cross-chain transaction, and the second cross-chain transaction and the certificate thereof are stored in the local part of the target chain; the destination chain returns the second cross-chain transaction certificate to the initiating chain; the destination chain asynchronously processes the second cross-chain transaction, generates a cross-chain interaction result message according to the first cross-chain transaction certificate, the cross-chain callback contract address and the second cross-chain transaction processing result, and returns the cross-chain interaction result message to the initiating chain;
s5: after receiving the cross-chain interaction result message, the initiating chain constructs and processes a third cross-chain transaction by taking a second cross-chain transaction processing result, a first cross-chain transaction certificate and a cross-chain callback contract address as parameters, and after the third cross-chain transaction is generated, calls a callback contract pointed by the cross-chain callback contract address by taking the transaction certificate as the parameter;
s6: the cross-chain callback contract associates the first cross-chain transaction certificate with the third cross-chain transaction certificate, and uses the second cross-chain transaction processing result as a third cross-chain transaction processing result for uplink storage;
s7: when a user inquires a cross-chain interaction result, a first cross-chain transaction certificate is required to be provided, a callback contract is called to inquire a third cross-chain transaction certificate, and a third cross-chain transaction processing result is inquired by using the third cross-chain transaction certificate and is used as a cross-chain interaction result.
2. The asynchronous cross-chain transaction query method based on the callback contract mechanism is characterized in that the cross-chain callback contract can be deployed by a user, the cross-chain callback contract needs to comply with a specific interface standard, the standard is a specific intelligent contract method name and a fixed type and number of parameters, the user can realize related association logic by himself, the logic must include association of a first cross-chain transaction certificate and a third cross-chain transaction certificate, otherwise, the query flow cannot be completed; the difference between the cross-link callback contract and the common intelligent contract is whether the specific interface standard is realized or not; if the user does not deploy the custom cross-chain callback contract, a cross-chain callback contract address built into the blockchain system may be used.
3. The asynchronous cross-chain transaction query method based on the callback contract mechanism as claimed in claim 1, wherein in the whole cross-chain interaction flow, the first cross-chain transaction, the cross-chain interaction request message, the second cross-chain transaction, the cross-chain interaction result message and the third cross-chain transaction all carry: the method comprises the steps of inter-link callback contract address, a first inter-link transaction certificate, initiating link identity information and destination link identity information.
4. The asynchronous cross-chain transaction query method based on the callback contract mechanism as claimed in claim 1, wherein the blockchain system is to embed a cross-chain callback contract, and the contract address is a default fixed address to be deployed when the blockchain is initialized.
5. The asynchronous cross-chain transaction query method based on the callback contract mechanism as claimed in claim 1, wherein if the interaction is heterogeneous cross-chain interaction, cross-chain agents are deployed in both the initiating chain and the destination chain;
the cross-chain agent of the initiating chain is responsible for sending a cross-chain interaction request message, receiving a cross-chain interaction result message and generating a third cross-chain transaction to be processed inside the initiating chain;
and the cross-chain agent of the destination chain is responsible for receiving the cross-chain interaction request message, generating a second cross-chain transaction to be processed in the destination chain, wherein after the second cross-chain transaction is executed, the cross-chain agent of the destination chain generates a cross-chain interaction result message and returns the cross-chain interaction result message to the cross-chain agent of the initiating chain.
6. The asynchronous cross-chain transaction query method based on the callback contract mechanism as claimed in claim 1, wherein a first cross-chain transaction is signed by a user, a second cross-chain transaction is signed by a destination chain, and a third cross-chain transaction is signed by an originating chain.
7. The asynchronous cross-chain transaction query method based on the callback contract mechanism as claimed in claim 1, wherein a first cross-chain transaction is executed in an initiating chain, a second cross-chain transaction is executed in a destination chain, and a third cross-chain transaction is executed in the initiating chain, wherein a second cross-chain transaction processing result and a third cross-chain transaction processing result are the same, and the result receipt data formats of the second cross-chain transaction processing result and the third cross-chain transaction processing result need to be determined according to the result receipt format of the chain where the second cross-chain transaction processing result and the third cross-chain transaction processing result are located.
8. The asynchronous cross-chain transaction query method based on the callback contract mechanism as claimed in claim 1, wherein after the third cross-chain transaction is processed, the third cross-chain transaction processing result is stored in the initiating chain, and the first cross-chain transaction credential and the third cross-chain transaction credential are associated at the same time, so that the cross-chain interaction result can be queried at any time after the third cross-chain transaction is successfully executed by using the first cross-chain transaction credential.
9. The asynchronous cross-chain transaction query method based on the callback contract mechanism as claimed in claim 1, wherein a user initiates a first cross-chain transaction and obtains a first cross-chain transaction credential, and then the user can be regarded as successful initiation without waiting for a processing result of a second cross-chain transaction and/or a third cross-chain transaction; if the user needs to inquire the cross-chain interaction result, a polling or monitoring mode can be adopted, a period of time limit can be set, if the cross-chain interaction result is not inquired in the time limit, the time is considered to be out, and the cross-chain interaction can be initiated again.
10. A computer device, comprising: a memory and a processor; the memory having stored thereon a computer program executable by the processor; the processor, when executing the computer program, performs the method of any of claims 1 to 9.
CN202110994792.9A 2021-08-27 2021-08-27 Asynchronous cross-chain transaction query method and device based on callback contract mechanism Active CN113781216B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110994792.9A CN113781216B (en) 2021-08-27 2021-08-27 Asynchronous cross-chain transaction query method and device based on callback contract mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110994792.9A CN113781216B (en) 2021-08-27 2021-08-27 Asynchronous cross-chain transaction query method and device based on callback contract mechanism

Publications (2)

Publication Number Publication Date
CN113781216A true CN113781216A (en) 2021-12-10
CN113781216B CN113781216B (en) 2024-05-28

Family

ID=78839798

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110994792.9A Active CN113781216B (en) 2021-08-27 2021-08-27 Asynchronous cross-chain transaction query method and device based on callback contract mechanism

Country Status (1)

Country Link
CN (1) CN113781216B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114363335A (en) * 2021-12-31 2022-04-15 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device
CN114581243A (en) * 2022-05-09 2022-06-03 南京金宁汇科技有限公司 Multi-channel transaction certificate asynchronous callback processing component library, method and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112150284A (en) * 2020-09-22 2020-12-29 浙江数秦科技有限公司 Block chain heterogeneous chain cross-chain transaction method
CN112287029A (en) * 2020-11-17 2021-01-29 北京物资学院 Block chain multi-chain cross-chain system and implementation mechanism thereof
CN112488679A (en) * 2020-12-03 2021-03-12 陈鹏 Cross-link contract analysis method of block chain, relay chain and cross-link system
CN112508563A (en) * 2020-12-01 2021-03-16 浙商银行股份有限公司 Cross-chain transaction credibility verification method and device and computer equipment
CN112508560A (en) * 2020-12-01 2021-03-16 浙商银行股份有限公司 Block chain cross-chain identity authentication and authority control method and device and computer equipment
WO2021103998A1 (en) * 2019-11-25 2021-06-03 深圳前海微众银行股份有限公司 Method for signing cross-blockchain transactions, and device
WO2021109735A1 (en) * 2019-12-05 2021-06-10 深圳前海微众银行股份有限公司 Cross-chain-network-based resource processing method, and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021103998A1 (en) * 2019-11-25 2021-06-03 深圳前海微众银行股份有限公司 Method for signing cross-blockchain transactions, and device
WO2021109735A1 (en) * 2019-12-05 2021-06-10 深圳前海微众银行股份有限公司 Cross-chain-network-based resource processing method, and device
CN112150284A (en) * 2020-09-22 2020-12-29 浙江数秦科技有限公司 Block chain heterogeneous chain cross-chain transaction method
CN112287029A (en) * 2020-11-17 2021-01-29 北京物资学院 Block chain multi-chain cross-chain system and implementation mechanism thereof
CN112508563A (en) * 2020-12-01 2021-03-16 浙商银行股份有限公司 Cross-chain transaction credibility verification method and device and computer equipment
CN112508560A (en) * 2020-12-01 2021-03-16 浙商银行股份有限公司 Block chain cross-chain identity authentication and authority control method and device and computer equipment
CN112488679A (en) * 2020-12-03 2021-03-12 陈鹏 Cross-link contract analysis method of block chain, relay chain and cross-link system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114363335A (en) * 2021-12-31 2022-04-15 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device
CN114363335B (en) * 2021-12-31 2024-03-15 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device
CN114581243A (en) * 2022-05-09 2022-06-03 南京金宁汇科技有限公司 Multi-channel transaction certificate asynchronous callback processing component library, method and system
CN114581243B (en) * 2022-05-09 2022-09-23 南京金宁汇科技有限公司 Asynchronous callback processing method and system for multi-channel transaction certificate

Also Published As

Publication number Publication date
CN113781216B (en) 2024-05-28

Similar Documents

Publication Publication Date Title
WO2020258848A1 (en) Method and apparatus for cross-chain transmission of resources
CN112330326B (en) Business processing method and device applied to bank transaction blockchain system
CN108540536B (en) Block chain-based network mass service processing method, equipment and storage medium
US11336451B2 (en) Cross-blockchain resource transmission
WO2020258846A1 (en) Method and apparatus for sending certifiable messages across chains
US10990704B2 (en) Management of cryptographic transactions
WO2020173500A1 (en) Public chain-based sub-chain business system
CN113781216A (en) Asynchronous cross-chain transaction query method and device based on callback contract mechanism
CN111144883B (en) Processing performance analysis method and device for blockchain network
WO2020258847A1 (en) Method and apparatus for cross-chain transmission of authenticable message based on processing module
US20220311607A1 (en) Key generation method and apparatus, device, and medium
CN109815025A (en) Business model call method, device and storage medium
CN107770269B (en) A kind of service response method and its terminal
CN111460504B (en) Service processing method, device, node equipment and storage medium
CN112491959B (en) Cross-link resource exchange method, device and system based on relay link
WO2021098139A1 (en) Method and device for storing state data of cross-chain transaction, and storage medium
CN111652605A (en) Creation system and creation method for creating cloud service package by public cloud service
US20170153911A1 (en) Distributed transactions on mobile devices via a messaging service provided by a mobile network operator
CN109194513A (en) A kind of method of API gateway Intellisense cluster
CN113220453B (en) Method and device for initiating transaction in blockchain system
WO2022183913A1 (en) Blockchain-based real right interaction
CN114390097A (en) Block chain operation method and system based on message queue and application thereof
CN111524011A (en) Parallel chain consensus confirming method, equipment and storage medium
CN114390109B (en) Service processing method, micro-service gateway and data center system
WO2017173967A1 (en) Redirection method, service provider, unstructured supplementary service data center, and system

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