CN114548993A - Block chain cross-chain transaction method based on intelligent contract sequencing - Google Patents

Block chain cross-chain transaction method based on intelligent contract sequencing Download PDF

Info

Publication number
CN114548993A
CN114548993A CN202210240384.9A CN202210240384A CN114548993A CN 114548993 A CN114548993 A CN 114548993A CN 202210240384 A CN202210240384 A CN 202210240384A CN 114548993 A CN114548993 A CN 114548993A
Authority
CN
China
Prior art keywords
chain
cross
transaction
collector
transactions
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210240384.9A
Other languages
Chinese (zh)
Inventor
汪小益
叶少杰
徐才巢
李伟
邱炜伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Qulian Technology Co Ltd
Original Assignee
Hangzhou Qulian 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 Hangzhou Qulian Technology Co Ltd filed Critical Hangzhou Qulian Technology Co Ltd
Priority to CN202210240384.9A priority Critical patent/CN114548993A/en
Publication of CN114548993A publication Critical patent/CN114548993A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3821Electronic credentials
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2272Management thereof
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

The invention discloses a block chain cross-chain trading method based on intelligent contract sequencing, which comprises the steps of firstly deploying a cross-chain contract on a source chain and a destination chain, initializing a cross-chain trading sequence number, then gradually increasing the sequence number when each cross-chain trade comes, persistently storing a key value pair with the sequence number as a key and a cross-chain trading index as a value after the sequence number of the contract is updated, and persistently storing the updated sequence number. If the cross-chain support module receives the out-of-order cross-chain transactions, searching the lost cross-chain transactions from the source chain whole node by virtue of the index stored persistently in the cross-chain contract. The invention solves the problems that the cross-link transaction is easy to lose or is received out of order, and the high reliability of the cross-link transaction is difficult to ensure, avoids the possibility of losing or receiving out of order of the cross-link transaction by using an intelligent contract sequencing strategy, and simultaneously uses the cross-link transaction index in the block chain intelligent contract to inquire about the lost cross-link transaction, thereby fundamentally solving the problem of high reliability and difficulty of the cross-link transaction.

Description

Block chain cross-chain transaction method based on intelligent contract sequencing
The application is a divisional application provided by a Chinese patent application with an application date of 6/2019, an application number of 201910491670.0 and a name of a blockchain cross-chain transaction method based on intelligent contract sequencing.
Technical Field
The invention relates to the field of intelligent contract technology of block chains and block chain cross-chain, in particular to a block chain cross-chain trading method based on intelligent contract sequencing.
Background
The cross-chain technology can be understood as a bridge connecting each block chain, and the main application of the cross-chain technology is to realize atomic transaction, asset conversion and intercommunication of block chain internal information between each block chain, or solve the Oracle problem and the like.
Among the many problems faced by blockchains, the lack of chain-to-chain interoperability greatly limits the application space of blockchains. The cross-chain mainly comprises two application scenes, namely information cross-chain and value cross-chain. Rigorous description, canonical implementation, and general application of cross-chain interoperability protocols will become key to implementing the "value internet". Although many blockchain advocates claim blockchains to be the next generation of internet, the current "internet" is simply composed of many blockchain "islands" that are split from each other, or appear more like an intranet, since each chain is an independent, vertical closed system.
For example, bitcoin and etherhouse are network-wide consensus-based, brute-force solution trust mechanisms. This authentication is done by each node by synchronizing the network-wide blocks. However, those block chaining (DLT) techniques that employ decentralized Ledger Technology, such as rembol and IOTA, are also isolated from each other. It is further unacceptable that the exchange of value between the decentralized blockchains is alleged to be done primarily by means of a centralized exchange, and the value of the assets on the chain cannot be reasonably assessed.
The block chains are not communicated with each other, and the application and development of the block chain technology are greatly restricted by the large fluctuation of the asset value. The interconnection operation between chains is more and more emphasized, and the demand of cross-chain is accordingly increased. However, chain crossing is a complex process, which requires both individual verification capabilities for nodes in the chain and decentralized input, and further requires information acquisition for the world outside the chain.
In the process of designing the cross-chain support module, cross-chain transactions are easy to lose or are received out of order, and the high reliability of the cross-chain transactions is difficult to ensure.
Disclosure of Invention
Aiming at the technical problem that cross-chain transaction is easy to lose or is received out of order, the invention provides a block chain cross-chain transaction method based on intelligent contract sequencing, which can fundamentally solve the problem that cross-chain transaction is difficult to be highly reliable, and the specific technical scheme is as follows:
a block chain cross-chain transaction method based on intelligent contract sequencing is characterized in that a block chain where a user sending cross-chain transaction is located is a source chain, a block chain to which the cross-chain transaction points is a destination chain, a cross-chain support module comprises a collector and an executor, cross-chain contracts are deployed on the source chain and the destination chain, and the source chain and the destination chain are registered on the cross-chain support module;
the cross-chain transaction method specifically comprises the following steps:
s1: initializing the cross-link contract by cross-link operation and maintenance personnel, wherein serial number identifications of cross-link transactions in the cross-link contract are determined by different destination chains and respectively identified as a source chain identification-destination chain first identification-0, a source chain identification-destination chain second identification-0, · · · and a source chain identification-destination chain n identification-0;
s2: a user on a source chain initiates a cross-chain transaction of a designated destination chain on the source chain, after the cross-chain support module, the source chain and the destination chain confirm that the cross-chain transaction serial number in a cross-chain contract deployed on the source chain is updated to be +1 of the user, the cross-chain transaction serial number is durably maintained by taking the serial number as a key and the cross-chain transaction index as a value, and then the transaction serial number is durably maintained;
s3: the deployed cross-chain contract on the source chain throws out the cross-chain transaction and is received by the collector in the cross-chain support module; if the received cross-chain transaction is out-of-order cross-chain transaction, caching the newly arrived cross-chain transaction, searching the lost cross-chain transaction for the source chain whole node according to an index stored persistently in a cross-chain contract, waiting for all the lost cross-chain transactions to be stored in sequence one by one and submitted to an actuator, and then storing the cross-chain transactions in the cache one by one and submitting the cross-chain transactions to the actuator;
s4: the collector collects the cross-chain transactions in the correct sequence, and then persistently stores the cross-chain transactions in the database, and then submits the cross-chain transactions to the executor, the executor checks the sequence of the cross-chain transactions, if the executor detects that the sequence number of the cross-chain transactions is not increased by one, the executor informs the collector, and when the collector cannot find the local database, the lost cross-chain transactions are found from the whole nodes of the source chain, and after waiting for all the lost cross-chain transactions to be executed in sequence, the cross-chain transactions in the cache are executed in sequence.
Furthermore, the cross-chain transaction comprises a cross-chain transaction serial number, a destination chain unique identification ID, timeout time, logic to be executed by the destination chain and a return receipt returned by the destination chain.
Furthermore, the logic to be executed by the destination chain includes a function name and a function parameter.
Further, the return receipt returned by the destination chain is a callback function and a timestamp.
Further, the local database of the collector is maintained by the collector itself, and the cross-chain transaction in the collector has a plurality of backups, thereby ensuring that the cross-chain transaction provided to the executor is highly reliable.
Furthermore, the cross-chain transaction index persistently stored in the cross-chain contract needs to conform to a certain specification and format, and the specification and format are formulated and maintained by each blockchain.
The invention has the following beneficial effects:
according to the block chain cross-chain transaction method based on intelligent contract sequencing, the possibility of cross-chain transaction loss or disordered receiving is avoided by using an intelligent contract sequencing strategy, and meanwhile, cross-chain transaction loss is inquired by using a cross-chain transaction index in a parallel chain intelligent contract, so that the problem that cross-chain transaction is difficult to highly reliable is fundamentally solved.
Drawings
FIG. 1 is a flow diagram of a parallel chain cross-chain trading method based on intelligent contract sequencing according to 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 do not limit the invention.
A block chain cross-chain transaction method based on intelligent contract sequencing is disclosed, as shown in FIG. 1, in the method, a block chain where a user sending a cross-chain transaction is located is a source chain, a block chain to which the cross-chain transaction points is a destination chain, a cross-chain support module comprises a collector and an executor, cross-chain contracts are deployed on the source chain and the destination chain, and the source chain and the destination chain are both registered on the cross-chain support module;
the cross-chain transaction method specifically comprises the following steps:
s1: initializing the cross-link contract by cross-link operation and maintenance personnel, wherein serial number identifications of cross-link transactions in the cross-link contract are determined by different destination chains and respectively identified as a source chain identification-destination chain first identification-0, a source chain identification-destination chain second identification-0, · · · and a source chain identification-destination chain n identification-0;
s2: a user on a source chain initiates a cross-chain transaction of a designated destination chain on the source chain, after the cross-chain support module, the source chain and the destination chain confirm that the cross-chain transaction serial number in a cross-chain contract deployed on the source chain is updated to be +1 of the user, the transaction serial number is persisted, and then a key value pair taking the serial number as a key and the cross-chain transaction index as a value is persisted;
s3: the deployed cross-chain contract on the source chain throws out the cross-chain transaction and is received by the collector in the cross-chain support module; if the received cross-chain transaction is out-of-order cross-chain transaction, caching the newly arrived cross-chain transaction, searching the lost cross-chain transaction for the source chain whole node according to an index stored persistently in a cross-chain contract, and after waiting for all the lost cross-chain transactions to be submitted to an actuator in sequence, submitting the cross-chain transactions in the cache to the actuator in sequence;
the disorder is that the sequence number of the cross-chain transaction in the cross-chain transaction is not increased in the natural number sequence.
S4: the collector collects the cross-chain transactions in the correct sequence, and then persistently stores the cross-chain transactions in the database, and then submits the cross-chain transactions to the executor, the executor checks the sequence of the cross-chain transactions, if the executor detects that the sequence number of the cross-chain transactions is not increased by one, the executor informs the collector, and when the collector cannot find the local database, the lost cross-chain transactions are found from the whole nodes of the source chain, and after waiting for all the lost cross-chain transactions to be executed in sequence, the cross-chain transactions in the cache are executed in sequence.
Preferably, the cross-chain transaction includes a cross-chain transaction serial number, a destination chain unique identification ID, timeout time, logic to be executed by the destination chain, and a receipt returned by the destination chain. The logic to be executed by the destination chain comprises a function name and a function parameter. The receipt returned by the destination chain is a callback function and a time stamp.
Preferably, the local database of the collector is maintained by the collector itself, and there are multiple backups of cross-chain transactions in the collector, thereby ensuring that the cross-chain transactions provided to the executor are highly reliable.
Preferably, the cross-chain transaction index persistently stored in the cross-chain contract is required to comply with a certain specification and format, and the specification and format are formulated and maintained by each blockchain.
The blockchain in the blockchain cross-chain transaction method based on intelligent contract sequencing can be an existing public chain or a union chain and a blockchain developed in the future, and the cross-chain support module does not change the original structure of the parallel chain, namely the cross-chain support module supports various heterogeneous blockchains and has good compatibility. Users on the source chain are participants who may initiate or receive digital asset transfer transactions. The cross-chain transaction index is different according to the design of each parallel chain, for example, a certain alliance chain is the transaction hash txHash of the cross-chain transaction, and another alliance chain is the transaction identifier TxID of the cross-chain transaction, but the essence of the cross-chain transaction index is the cross-chain transaction index, and the cross-chain transaction index can be used for later-stage query of the transaction content.
It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and although the invention has been described in detail with reference to the foregoing examples, it will be apparent to those skilled in the art that various changes in the form and details of the embodiments may be made and equivalents may be substituted for elements thereof. All modifications, equivalents and the like which come within the spirit and principle of the invention are intended to be included within the scope of the invention.

Claims (10)

1. A blockchain cross-chain transaction method based on intelligent contract sequencing is applied to a cross-chain support module, the cross-chain support module comprises a collector and an executor, and the method comprises the following steps:
receiving, with the collector, a cross-chain transaction from a source chain, the cross-chain transaction having a corresponding sequence number and a destination chain;
if the cross-link transaction is out-of-order cross-link transaction, searching the lost cross-link transaction from the whole node of the source link by adopting an index persistently stored in a cross-link contract;
after the collector collects the cross-chain transactions in the correct sequence, submitting the cross-chain transactions to the executor;
checking the order of the cross-chain transactions with the executor;
and when the executor confirms that the sequence of the cross-chain transactions is the correct sequence, executing the cross-chain transactions in sequence by adopting the executor.
2. The method of claim 1, wherein, prior to submitting the cross-chain transaction to the executor after the collector collects the cross-chain transactions in the correct order, further comprising:
and if the serial number of the cross-chain transaction collected by the collector is increased by one, determining that the collector collects the cross-chain transaction in the correct sequence.
3. The method of claim 1, wherein the method further comprises:
and after the collector collects the cross-chain transactions in the correct sequence, storing the cross-chain transactions to a local database for summarizing.
4. The method of any of claims 1-3, after said checking the order of the cross-chain transactions with the executor, further comprising:
if the executor detects that the serial number of the cross-chain transaction is not increased by one, the collector is informed;
searching for lost cross-chain transactions in a local database using the collector;
and if the collector does not find the lost cross-chain transaction in the local database, finding the lost cross-chain transaction from the whole node of the source chain.
5. The method of claim 4, wherein the method further comprises:
and sending the cross-chain transaction to the destination chain in sequence according to the sequence number of the cross-chain transaction.
6. The method of claim 5, wherein the cross-chain transaction further comprises a unique identification ID of the destination chain, a timeout time, logic to be executed by the destination chain, and a receipt returned by the destination chain.
7. The method of claim 6, wherein the logic to be executed by the destination chain includes a function name, a function parameter; and the return receipt returned by the destination chain is a callback function and a time stamp.
8. A blockchain cross-chain transaction method based on intelligent contract sequencing, applied to a source chain, the method comprising:
initiating a cross-chain transaction, wherein the cross-chain transaction has a corresponding serial number and a specified destination chain;
when the cross-chain transaction is determined to be real, effective and unique by the source chain, the destination chain and the cross-chain support module, adding the serial number of the cross-chain transaction together by adopting a cross-chain contract to persist the serial number of the cross-chain transaction, and persisting a key value pair which is generated by taking the serial number of the cross-chain transaction as a key and the cross-chain transaction index as a value;
throwing the cross-chain transaction out to the cross-chain support module; the cross-chain support module comprises a collector and an actuator; the collector is used for collecting the cross-chain transaction and submitting the cross-chain transaction to the executor; the executor is used for executing the cross-chain transaction in sequence.
9. The method of claim 8, prior to the initiating a cross-chain transaction, further comprising:
initializing a sequence number of the cross-chain transaction in the cross-chain contract;
notifying the collector to collect the cross-chain transactions.
10. The method of claim 8 or 9, wherein the method further comprises:
when information of a missing cross-chain transaction is received from the collector, returning the missing cross-chain transaction to the collector.
CN202210240384.9A 2019-06-06 2019-06-06 Block chain cross-chain transaction method based on intelligent contract sequencing Pending CN114548993A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210240384.9A CN114548993A (en) 2019-06-06 2019-06-06 Block chain cross-chain transaction method based on intelligent contract sequencing

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910491670.0A CN110264204B (en) 2019-06-06 2019-06-06 Block chain cross-chain transaction method based on intelligent contract sequencing
CN202210240384.9A CN114548993A (en) 2019-06-06 2019-06-06 Block chain cross-chain transaction method based on intelligent contract sequencing

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201910491670.0A Division CN110264204B (en) 2019-06-06 2019-06-06 Block chain cross-chain transaction method based on intelligent contract sequencing

Publications (1)

Publication Number Publication Date
CN114548993A true CN114548993A (en) 2022-05-27

Family

ID=67917116

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202210240384.9A Pending CN114548993A (en) 2019-06-06 2019-06-06 Block chain cross-chain transaction method based on intelligent contract sequencing
CN201910491670.0A Active CN110264204B (en) 2019-06-06 2019-06-06 Block chain cross-chain transaction method based on intelligent contract sequencing

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201910491670.0A Active CN110264204B (en) 2019-06-06 2019-06-06 Block chain cross-chain transaction method based on intelligent contract sequencing

Country Status (1)

Country Link
CN (2) CN114548993A (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110719322B (en) * 2019-09-25 2021-06-22 东北大学 Data cross storage method based on block chain cross-chain
CN110780945B (en) * 2019-10-24 2023-09-08 杭州趣链科技有限公司 Cross-chain bridging method, device and storage medium for pluggable heterogeneous blockchain
CN111090661B (en) * 2019-12-10 2024-03-01 京东科技信息技术有限公司 Block chain cross-chain data access method, device, adapter and system
CN111445328A (en) * 2020-03-16 2020-07-24 西安交通大学 Cross-link gateway interaction system and method and supply chain data management method
CN112598514A (en) * 2020-12-09 2021-04-02 杭州趣链科技有限公司 Block chain-based cross-chain transaction management method, cross-chain platform and medium
CN112511355B (en) * 2020-12-18 2022-02-08 四川大学 Cross-chain intelligent contract cooperation possibility evaluation method
CN113379550B (en) * 2021-06-29 2023-04-14 杭州复杂美科技有限公司 Block execution method, computer device and storage medium
CN113590611B (en) * 2021-06-29 2023-11-24 杭州复杂美科技有限公司 Block execution method, computer device, and storage medium
CN114785853B (en) * 2022-03-31 2024-04-19 蚂蚁区块链科技(上海)有限公司 Method, apparatus, storage medium and computing device for cross-chain communication in a blockchain system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170178127A1 (en) * 2015-12-18 2017-06-22 International Business Machines Corporation Proxy system mediated legacy transactions using multi-tenant transaction database
CN107103054B (en) * 2017-04-12 2019-03-26 北京航空航天大学 A kind of intelligent contract asynchronous execution storage system and implementation method of privately owned block chain
CN108009811B (en) * 2017-11-30 2021-06-04 中国人民解放军国防科技大学 Inter-cloud computing environment value exchange-oriented cross-chain communication method
CN109684050B (en) * 2018-12-06 2021-02-19 成都佰纳瑞信息技术有限公司 Application method of parallelization transaction executor
CN109377232B (en) * 2018-12-20 2021-08-24 众安信息技术服务有限公司 DAG-based block chain transaction sequencing method and device
CN109784881A (en) * 2018-12-29 2019-05-21 广州蓝石信息技术有限公司 General across chain payment scheme based on decentralization gateway

Also Published As

Publication number Publication date
CN110264204A (en) 2019-09-20
CN110264204B (en) 2022-04-19

Similar Documents

Publication Publication Date Title
CN110264204B (en) Block chain cross-chain transaction method based on intelligent contract sequencing
CN110784346B (en) Reputation value-based PBFT consensus system and method
CN107301536B (en) Resource transfers method and device
US5802062A (en) Preventing conflicts in distributed systems
US8117155B2 (en) Collection-based object replication
EP2095248B1 (en) Consistency within a federation infrastructure
US5428771A (en) Transparent transaction coordination between distributed networks having different communication protocols
US8121979B2 (en) System and method for replication and synchronisation
Menasce et al. A locking protocol for resource coordination in distributed databases
CN110650189A (en) Relay-based block chain interaction system and method
US6438582B1 (en) Method and system for efficiently coordinating commit processing in a parallel or distributed database system
US20060195487A1 (en) Systems and Methods for Managing the Synchronization of Replicated Version-Managed Databases
CN109493050A (en) Transfer process based on the more subchains of block chain main chain adduction row
CN113157733A (en) Efficient tracing query method for multi-chain data relevance
CN111245910A (en) Block chain light node multi-copy deployment method
US20100145911A1 (en) Serverless Replication of Databases
CN105183544A (en) Non-blocking type fault-tolerant submitting method and system for distributed event
CN101242365B (en) Peer network secure routing method based on multi-dimension distributed hash table
CN116633942A (en) Bayesian-busy fault tolerance consensus method for high-speed response client
CN114513510A (en) Distributed cross-link transaction relay system facing permission chain and communication method thereof
CN116189911B (en) Hospital information system intercommunication method and system based on blockchain side chain technology
CN114172661A (en) Bidirectional chain-crossing method, system and device for digital assets
Vardhan et al. A demand based fault tolerant file replication model for clouds
CN113518126A (en) Cross fault-tolerant method for alliance chain
Goel et al. Atomic commitment and resilience in grid database systems

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