WO2020042934A1 - Non-repudiation cross-chain transaction method and blockchain system - Google Patents

Non-repudiation cross-chain transaction method and blockchain system Download PDF

Info

Publication number
WO2020042934A1
WO2020042934A1 PCT/CN2019/101053 CN2019101053W WO2020042934A1 WO 2020042934 A1 WO2020042934 A1 WO 2020042934A1 CN 2019101053 W CN2019101053 W CN 2019101053W WO 2020042934 A1 WO2020042934 A1 WO 2020042934A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction
chain
target
public
service
Prior art date
Application number
PCT/CN2019/101053
Other languages
French (fr)
Chinese (zh)
Inventor
白杰
吴先锋
李冬云
Original Assignee
白杰
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
Priority claimed from CN201811497995.1A external-priority patent/CN110866750B/en
Application filed by 白杰 filed Critical 白杰
Publication of WO2020042934A1 publication Critical patent/WO2020042934A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/56Financial cryptography, e.g. electronic payment or e-cash

Definitions

  • the present application relates to the field of blockchain technology, and in particular, to a non-repudiation cross-chain transaction method and a blockchain system.
  • Blockchain provides a decentralized system idea. The most fundamental principle of this idea is to create a relatively objective anti-repudiation digital environment through public consensus.
  • Blockchain technology can make network information immutable once it is released. For example, a transaction occurs in the blockchain network. Nodes in the blockchain network will record the transaction in the generated block, and then add the block. Go to the blockchain and broadcast it throughout the network to form an unchangeable blockchain. Therefore, the blockchain is essentially a distributed public ledger.
  • This public ledger consists of multiple data blocks and is jointly maintained by each node.
  • the nodes that maintain the same blockchain form a physical chain, such as public, private, and alliance chains. These nodes together form a peer-to-peer blockchain network.
  • the above-mentioned transactions not only refer to transactions in the traditional sense, such as the purchase and sale of goods and the exchange of goods, but also the results of data operations or data exchange.
  • node A in a public chain initiates a transaction request, and the transaction content of the transaction request is to pay 10 tokens for node A to query the weather.
  • Node B in the public chain provides weather query services. Then, node A pays 10 securities exchanges to the account corresponding to node B, and node B sends the weather conditions inquired to node A, and then node A and node B jointly complete the transaction request initiated by node A.
  • the payment of 10 Zentong and sending weather conditions can be recorded as the transaction information of the transaction in the blockchain of the public chain.
  • This application provides a non-repudiation cross-chain transaction method and a blockchain system, which can be used to solve the problem that there is no unified and effective communication mechanism between blockchain networks in the prior art, transaction security cannot be guaranteed, and cross-chain transactions cannot be achieved.
  • the problem
  • the present application provides a non-repudiation cross-chain transaction method, which includes:
  • the public chain creates cross-chain transactions, which include: service transactions that need to be completed by the transaction initiation chain and return transactions that need to be completed by the transaction target chain;
  • the transaction initiation chain completes the service transaction according to the first lock request, and locks the transaction content of the service transaction;
  • the transaction target chain completes the return transaction according to the second lock request, and locks the transaction content of the return transaction
  • the public chain instructs the transaction initiation chain to unlock the transaction content of the service transaction, and instructs the transaction target chain to unlock the transaction content of the return transaction.
  • forwarding the first lock request sent by the public chain to the transaction initiation chain by the initiating parallel chain includes:
  • the initiating parallel chain detects whether the service initiating chain supports the service transaction according to the transaction information of the service transaction
  • the initiating parallel chain forwards the first lock request to the transaction initiation chain;
  • the forwarding, by the target parallel chain, the second lock request sent by the public chain to the transaction target chain includes:
  • the target parachain forwards the second lock request to the transaction target chain.
  • the method further includes:
  • the initiating parallel chain When it is determined that the transaction initiation chain does not support the service transaction, the initiating parallel chain sends failure information to the public chain, and the failure information is used to notify the public chain that the cross-chain transaction fails;
  • the method further includes:
  • the target parachain When it is determined that the transaction target chain does not support the return transaction, the target parachain sends the failure information to the public chain.
  • the transaction initiation chain sends a service completion response to the initiating parallel chain
  • the initiating parallel chain forwards the service completion response to the public chain
  • the transaction target chain When the return transaction is completed, the transaction target chain sends a return completion response to the target parallel chain;
  • the public chain completes the first transfer transaction according to the cross-chain transaction, and locks the public chain certificate exchange in the first transfer transaction, and the first transfer transaction is the transaction target chain to the The public chain certificate communication that the transaction initiation chain payment is equivalent to the service transaction;
  • the transaction initiation chain completes the service transaction
  • the public chain initiates a second transfer transaction according to the cross-chain transaction, and locks the public chain certificate exchange in the second transfer transaction.
  • the second transfer transaction is the transaction initiation chain to the transaction target chain. Pay a public chain certificate equivalent to the return transaction;
  • the target parallel chain receives a return transaction request sent by the public chain, and initiates the return transaction to the transaction target chain according to the return transaction request;
  • the transaction target chain completes the return transaction
  • the method before instructing the public chain to unlock the public chain certificate pass in the first transfer transaction, the method further includes:
  • the method further includes:
  • the creation of a cross-chain transaction by the public chain includes:
  • the public chain receives a cross-chain transaction request sent by the transaction initiation chain.
  • the cross-chain transaction request includes: the transaction content of the cross-chain transaction, and address information of the transaction initiation chain and the transaction target chain. ;
  • the present application provides a blockchain system, which is characterized in that the blockchain system includes: a transaction initiation chain, an initiation parallel chain, a transaction target chain, a target parallel chain, and a public chain; It consists of the common nodes of the transaction initiation chain and the public chain, and the target parachain consists of the common nodes of the target initiation chain and the public chain;
  • the public chain is used to create cross-chain transactions, and the cross-chain transactions include: service transactions that need to be completed by the transaction initiation chain and return transactions that need to be completed by the transaction target chain;
  • the initiating parallel chain is configured to forward the first lock request sent by the public chain to the transaction initiation chain, where the first lock request includes transaction information of the service transaction;
  • the transaction initiation chain is configured to complete the service transaction according to the first lock request, and lock the transaction content of the service transaction;
  • the target parallel chain is configured to forward a second lock request sent by the public chain to the transaction target chain, where the second lock request includes transaction information of the returned transaction;
  • the transaction target chain is configured to complete the return transaction according to the second lock request, and lock the transaction content of the return transaction
  • the public chain is further configured to instruct the transaction initiation chain to unlock the transaction content of the service transaction when it is determined that both the service transaction and the return transaction have been completed, and instruct the transaction target chain to unlock the return The transaction content of the transaction.
  • a unified and effective communication channel is formed between the transaction initiation chain and the transaction target chain through the public chain, the initiation parachain, and the target parachain.
  • this communication channel when the transaction initiation chain and the transaction target chain conduct cross-chain transactions, they can determine whether the other party has completed the agreed content in the cross-chain transaction; moreover, the transaction initiation chain and the transaction target chain lock the service transaction and the return transaction respectively.
  • Transaction content unlock the respective transaction content when the other party is determined to complete the transaction, avoid the losses caused by the other party's incomplete transaction, and achieve the anti-repudiation transaction effect, thereby ensuring that cross-chain transactions can be completed safely.
  • Fig. 1 is a schematic flowchart of a non-repudiation cross-chain transaction method according to an exemplary embodiment
  • Fig. 2 is a flowchart illustrating initiating a parallel chain to forward a first lock request according to an exemplary embodiment
  • Fig. 3 is a flow chart showing a target parallel chain forwarding a second lock request according to an exemplary embodiment
  • Fig. 4 is a schematic flowchart of a non-repudiation cross-chain transaction method according to another exemplary embodiment.
  • the blockchain network refers to a point-to-point network formed by blockchain nodes.
  • the data information in the blockchain or blockchain block is the transaction recorded by the nodes of the blockchain when a transaction occurs in the blockchain network.
  • one block includes multiple transactions, and multiple blocks form a blockchain.
  • Each node in the blockchain network can be a physical node, such as a terminal, a server, or a virtual node. Nodes in the same blockchain network communicate and maintain the operation of the blockchain network based on the same consensus mechanism.
  • the mentioned public chains, transaction initiation chains, transaction target chains, initiation parachains, and target parachains all refer to different blockchain networks that conform to the blockchain technology.
  • the public chain as the basic platform deployed on the entire network, can access multiple blockchain networks, such as industry chains, alliance chains, and private chains based on public link interface specifications.
  • Each blockchain network can serve as a development platform and provide corresponding services within its network.
  • the definition and specification of the public chain have standard interfaces and methods to facilitate network interconnection with other blockchains, such as the transaction initiation chain and the transaction target chain.
  • the public chain in this application has the ability to support cross-chain intermediation, as well as decentralized applications and smart contracting capabilities.
  • the transaction initiation chain refers to the blockchain network that initiated the cross-chain transaction
  • the transaction target chain is the blockchain network where the transaction object of the cross-chain transaction is located.
  • the public chain provides the basic platform, the transaction initiation chain and the transaction target chain as the access network, providing their respective functions and services.
  • the transaction initiation chain and transaction target chain are independent blockchain networks, such as Bitcoin and Ethereum, or industry chains and alliance chains developed by different industries, or even different private or public chains. Due to the differences between these independent blockchain networks, such as different consensus mechanisms, they cannot communicate or trade between them. Therefore, in the technical solution provided in this application, the transaction initiation chain and the transaction target chain are connected to the public chain through parallel chains.
  • the parallel chain can be composed of the public chain and the common nodes of the blockchain network. Because the parachain node is a common node of the public chain and the blockchain network, the parachain has both the functions of the public chain and the blockchain network, and stores the blockchains of both parties. Therefore, the parallel chain can transform the information in the blockchain network on one side and then transfer it to the blockchain network on the other side. Through the bridging effect in the parachain, different blockchain networks can communicate or trade.
  • the initiating parachain refers to the parallel chain connecting the public chain and the transaction initiation chain
  • the target parachain refers to the parallel chain connecting the public chain and the transaction target chain.
  • the public chain can provide cross-chain relays in practical applications, completing transactions verification, data certification, asset transfer, and smart contract execution.
  • the public chain also provides the basic blockchain platform capabilities, which is to quickly complete the deployment and verification of the scheme, and to complete the distributed storage and accounting procedures in the public chain network.
  • the public chain can also be used to store the information summary of the corresponding cross-chain transaction, that is, the transaction summary. Record the relevant content of cross-chain transactions through formatted transaction data.
  • the public chain when the public chain records certain information, it can also record third-party blockchain information through a specific compression algorithm.
  • the public chain also stores the registration information provided when the blockchain network is accessed.
  • the registration information includes: the types of services that can be provided, the types of token exchanges that can be exchanged, the methods of conducting transactions, the conditions of transactions, and the address information of each node.
  • FIG. 1 a schematic flowchart of an anti-repudiation cross-chain transaction method according to the present application is exemplarily shown. The method includes the following steps.
  • the public chain is required as an intermediary bridge to communicate the transaction initiation chain and the transaction target chain, and to complete the cross-chain transaction between the transaction initiation chain and the transaction target chain. Therefore, when a cross-chain transaction is required between the transaction initiation chain and the transaction target chain, the public chain creates a cross-chain transaction.
  • a cross-chain transaction includes two sub-transactions: the service transaction that the transaction initiation chain needs to complete and the return transaction that the transaction target chain needs to complete.
  • the service transaction is the transaction content required by the transaction initiation chain and the transaction target chain to pay the transaction target chain;
  • the return transaction is the transaction content required by the transaction target chain to the transaction initiation chain to pay the transaction initiation chain. Therefore, to complete a cross-chain transaction, you need to complete the service transaction and return transaction in the cross-chain transaction.
  • the cross-chain transaction between the transaction initiation chain A and the transaction target chain B is: 50 transactions initiating the Zhengtong a of the chain A, in exchange for 1 transaction destination chain B of the Zhengtong b. Then, in this cross-chain transaction, the service transaction pays 50 Zenith A for the transaction initiation chain to the transaction target chain; and the return transaction pays 1 ZenT for the transaction target chain to the transaction initiation chain.
  • the transaction initiation chain can call a public smart contract to send a cross-chain transaction request to the public chain.
  • the cross-chain transaction request includes: the transaction content that both parties need to pay, and the address information of the transaction initiation chain and the transaction target chain.
  • the transaction nodes in the transaction initiation chain broadcast the above-mentioned cross-chain transaction requests in the transaction initiation chain.
  • the node initiating the parallel chain obtains the transaction request and broadcasts it in the public chain, so that the public chain obtains the cross-chain transaction request.
  • After the public chain obtains the cross-chain transaction request it can verify whether the transaction initiation chain and the transaction target chain can pay the transaction content in the request according to the stored registration information.
  • the public chain verifies whether the transaction node can pay the transaction content that the transaction initiation chain needs to pay, and verifies whether the target node can pay the transaction content that the transaction target chain needs to pay.
  • the transaction node refers to the node that initiates the cross-chain transaction request in the delivery initiation chain
  • the target node refers to the node in the transaction target chain that conducts cross-chain transactions with the transaction node.
  • the public chain When the cross-chain transaction request passes the verification of the public chain, the public chain creates a cross-chain transaction according to the cross-chain transaction request. If the cross-chain transaction request does not pass the verification of the public chain, such as the transaction node cannot pay the transaction content of the service transaction, the public chain notifies the transaction that the initiating chain cross-chain transaction has failed.
  • a query transaction is initiated to the public chain by initiating a parallel chain.
  • the query transaction includes the transaction content required by the transaction initiation chain and the transaction content that the transaction initiation chain can pay.
  • the public chain determines whether there is a transaction target chain capable of reaching a transaction with the transaction initiation chain in the accessed blockchain network according to the query of the transaction and the registration information of the accessed blockchain network. If it exists, the public chain sends the address information of the transaction target chain to the transaction initiation chain by initiating the parallel chain. If it does not exist, the public chain notifies the transaction that the initiating chain cross-chain transaction has failed.
  • the address information of the transaction initiation chain is used to indicate the corresponding account addresses of the transaction node and the target node in the network of the transaction initiation chain.
  • the address information of the transaction target chain is used to indicate that the transaction node and the target node correspond to the account addresses in the network of the transaction target chain.
  • the transaction node A1 hopes to initiate the Zentong a of the chain A with 50 transactions in exchange for the Zentong b of a transaction target chain B. Therefore, the transaction node A1 initiates a query transaction to the public chain C.
  • the public chain determines that the transaction node A1 needs 1 Zhengtong b according to the query transaction, and can pay 50 Zhengtong a.
  • the public chain queries whether other blockchain networks have nodes that can reach a transaction with the transaction node A1.
  • One node in the transaction target chain B needs 50 STOs a and is willing to pay up to 5 STOs b.
  • the public chain C uses this node as the target node B1, and sends the address information of the transaction target chain B to the transaction initiation chain A.
  • the initiating parallel chain forwards the first lock request sent by the public chain to the transaction initiating chain.
  • the public chain After the public chain creates a cross-chain transaction, it needs to notify the transaction initiation chain to complete the service transaction. Therefore, the public chain sends a first lock request to the transaction initiation chain by initiating a parallel chain.
  • the first lock request is used to instruct the transaction initiation chain to complete a service transaction and lock the transaction content of the service transaction. Therefore, the first lock request includes the transaction information of the service transaction.
  • the transaction information of a transaction includes the address information of both parties, the transaction method and the transaction conditions. Among them, the transaction method is the transaction time, the format of the blockchain information (template), and the type of stock exchange that supports the transaction.
  • the transaction conditions include the transaction content that both parties of the transaction need to pay.
  • the step of initiating the parallel chain to forward the first lock request sent by the public chain to the transaction initiation chain includes:
  • the initiating parallel chain forwards the first lock request to the transaction initiation chain.
  • the public chain After the public chain creates a cross-chain transaction, it determines the service transaction that the transaction initiation chain needs to complete, and generates a first lock request based on the service transaction. In order to send the first lock request to the transaction initiation chain, the public chain broadcasts the first lock request in its own node. Since the initiating parachain node is also a node in the public chain, the initiating parachain can receive the first lock request.
  • the initiating parallel chain After receiving the first lock request, the initiating parallel chain detects whether the transaction initiating chain supports service transactions, further ensuring that cross-chain transactions can be completed. The initiating parallel chain detects whether the transaction node supports the transaction mode and transaction conditions in the transaction information according to the transaction information in the first lock request. If supported, initiate a parallel chain to determine that the transaction initiation chain supports service transactions; if not, initiate a parallel chain to determine that the transaction initiation chain does not support service transactions.
  • the cross-chain transaction is the exchange of the Zentong a of the transaction initiation chain A to the Zentong b of the transaction target chain B, with a conversion ratio of 50: 1, and stipulating the exchange of 100 Zhengtong a / 2 Zhengtong b.
  • the transaction method of the service transaction is to pay the certificate pass a, and the transaction condition is that the number of the payment certificate pass a is 100.
  • the transaction node A1 of the transaction initiation chain A has only 98 securities pass a. If the transaction conditions are not met, the initiating parallel chain AC determines that the transaction initiation chain A does not support service transactions.
  • the initiating parallel chain forwards the first lock request to the transaction initiation chain. Specifically, the initiating parallel chain broadcasts the first lock request in the transaction initiating chain. Accordingly, the transaction initiation link receives the first lock request.
  • the initiation of the parallel chain sends a failure message to the public chain.
  • the failure information is used to notify the public chain of cross-chain transaction failure. Specifically, the initiation of the parallel chain broadcasts the failure information in the public chain.
  • the public chain receives the failure information, determines that the cross-chain transaction has failed, and ends the cross-chain transaction.
  • the failure information includes transaction information of service transactions.
  • the transaction initiation chain completes the service transaction and locks the transaction content of the service transaction.
  • the transaction initiation link receives the first lock request, and determines the service transaction to be completed according to the transaction information therein. Specifically, the maintainer node in the transaction initiation chain completes the service transaction and locks the transaction content of the service transaction. Among them, the maintainer node is the node responsible for maintaining the blockchain in the blockchain network and has the right to keep accounts.
  • the initiating parallel chain broadcasts the first lock request in the transaction initiation chain. After the maintainer node in the transaction initiation chain receives the first lock request, the transaction content that the transaction initiation chain needs to pay for the cross-chain transaction is paid, and the transaction content is locked .
  • cross-chain transactions generally include two types: exchange of information exchange and information services.
  • the STO exchange refers to the use of the STO of the transaction initiation chain to exchange the STO of the transaction target chain;
  • the information service means that the transaction initiation chain pays a certain amount of STO to the transaction target chain, and the purchase of the transaction target chain sends the corresponding Or the transaction initiation chain sends the information data to the transaction target chain in exchange for a certain amount of securities.
  • a stock exchange or an information service it is a data operation or the result of a data operation.
  • a service transaction is a stock exchange that pays a certain number of transaction initiation chains.
  • the maintainer node actually transfers a certain number of securities through the account corresponding to the transaction node to the account corresponding to the target node. Because the payment is made through the transaction initiation chain, the transfer operation is completed in the transaction initiation chain and does not involve cross-chain operations between the transaction initiation chain and the transaction target chain. Therefore, after the maintainer node determines the respective accounts of the transaction node and the target node indicated by the address information of the transaction initiation chain, payment of the transaction content between the transaction node and the target node can be completed.
  • the cross-chain transaction is an information service
  • the transaction initiation chain A pays 50 transaction initiation chains A of the transaction initiation chain A to the transaction target chain B to purchase weather information provided by the transaction target chain B.
  • the service transaction is that the transaction initiation chain A pays 50 securities pass a to the transaction target chain B.
  • the maintainer node A2 in the transaction initiation chain A according to the first lock request sent by the public chain C, 50 corresponding accounts of the transaction node A1 in the transaction initiation chain and pay 50 to the corresponding account of the target node B1 in the transaction initiation chain A Zhengtong a, and lock these 50 Zhengtong a.
  • the target parallel chain forwards the second lock request sent by the public chain to the transaction target chain.
  • the public chain After the public chain creates a cross-chain transaction, it needs to notify the transaction target chain to complete the return transaction.
  • the method for initiating the parallel chain to forward the first lock request sent by the public chain to the transaction initiation chain is the same.
  • the public chain sends a second lock request to the transaction target chain through the target parallel chain.
  • the second lock request is used to instruct the transaction target chain to complete the return transaction and lock the transaction content of the return transaction. Therefore, the second lock request includes the transaction information of the returned transaction.
  • the step of the target parallel chain forwarding the second lock request sent by the public chain to the transaction target chain includes:
  • the target parallel chain receives a second lock request sent by the public chain.
  • S132 The target parallel chain detects whether the transaction target chain supports return transactions.
  • the target parallel chain forwards the second lock request to the transaction target chain.
  • the target parallel chain sends a failure message to the public chain.
  • the public chain After the public chain creates the cross-chain transaction, it determines the return transaction that the transaction target chain needs to complete, and generates a second lock request based on the return transaction. In order to send the second lock request to the transaction target chain, the public chain broadcasts the second lock request in its own node. Since the target parachain node is also a node in the public chain, the target parachain can receive the second lock request.
  • the target parallel chain After receiving the second lock request, the target parallel chain detects whether the transaction target chain supports return transactions, further ensuring that cross-chain transactions can be completed.
  • the target parallel chain detects whether the target node supports the transaction mode and transaction conditions in the transaction information according to the transaction information in the second lock request. If supported, the target parachain determines that the transaction target chain supports return transactions; if not, the target parachain determines that the transaction target chain does not support return transactions.
  • the cross-chain transaction is the exchange of the Zentong a of the transaction initiation chain A to the Zentong b of the transaction target chain B, with a conversion ratio of 50: 1, and stipulating the exchange of 100 Zhengtong a / 2 Zhengtong b.
  • the transaction method of the return transaction is payment certificate pass b
  • the transaction condition is that the number of payment certificate pass b is two.
  • the target node B1 of the transaction target chain B has 5 securities pass b, and if the transaction conditions are met, the target parallel chain BC determines that the transaction target chain B supports return transactions.
  • the target parallel chain forwards the second lock request to the transaction target chain.
  • the target parachain broadcasts a second lock request in the transaction target chain. Accordingly, the transaction target link receives a second lock request.
  • the target parallel chain sends a failure message to the public chain.
  • the failure information is used to notify the public chain of cross-chain transaction failure.
  • the target parachain broadcasts the failure information in the public chain.
  • the public chain receives the failure information, determines that the cross-chain transaction has failed, and ends the cross-chain transaction.
  • the failure information includes the transaction information of the returned transaction.
  • the transaction target chain completes the return transaction and locks the transaction content of the return transaction.
  • the transaction target link receives a second lock request, and determines the return transaction that needs to be completed according to the transaction information therein. Specifically, the maintainer node in the transaction target chain completes the return transaction and locks the transaction content of the return transaction.
  • the target parallel chain broadcasts the second lock request in the transaction target chain. When the maintainer node in the transaction target chain receives the second lock request, the transaction content that the transaction target chain needs to pay for in the cross-chain transaction is paid, and the transaction content is locked. .
  • the cross-chain transaction is an information service
  • the transaction initiation chain A pays 50 transaction initiation chains A of the transaction initiation chain A to the transaction target chain B to purchase weather information provided by the transaction target chain B.
  • the return transaction is that the transaction target chain B provides weather information to the transaction initiation chain A.
  • the maintainer node B2 in the transaction target chain B sends the weather information provided by the target node B1 to the corresponding account of the transaction node A1 in the transaction target chain B according to the second lock request sent by the public chain C, and locks the data of the weather information .
  • steps S11 and S12 may be performed before the above steps S13 and S14, or may be performed after the steps S13 and S14, and may also be performed simultaneously with the steps S13 and S14. This embodiment of the present application addresses this No restrictions.
  • the transaction initiation chain and the transaction target chain can unlock the corresponding transaction content and achieve the effect of non-repudiation.
  • the transaction initiation chain and the transaction target chain cannot directly communicate with each other to determine the transaction status of the other party, and the public chain needs to confirm the transaction status of the two parties and instruct the unlocking.
  • the public chain connects the transaction initiation chain and the transaction target chain by initiating the parachain and the target parachain, respectively.
  • the public chain can instruct the transaction initiation chain and the transaction target chain to unlock the respective transaction contents by initiating the parachain and the target parachain, respectively, to complete cross-chain transactions.
  • the public chain broadcasts the first unlocking instruction
  • the initiating parallel link receives the first unlocking instruction and broadcasts it in the transaction initiation chain.
  • the transaction content of the service transaction is unlocked.
  • the public chain broadcasts the second unlock instruction
  • the target parallel link receives the second unlock instruction and broadcasts it in the transaction target chain.
  • the maintainer node in the transaction target chain receives the second unlock instruction
  • the transaction content of the returned transaction is unlocked.
  • the cross-chain transaction is completed.
  • a service completion response is sent to the initiating parallel chain. Initiate the parallel chain to forward the service completion response to the public chain, and the public chain determines that the service transaction has been completed.
  • the transaction target chain sends a return completion response to the target parallel chain.
  • the target parallel chain forwards the return completion response to the public chain, and the public chain determines that the return transaction has been completed.
  • the public link receives the service completion response and the return completion response, it is determined that the service transaction and the return transaction have been completed.
  • a unified and effective communication channel is formed between the transaction initiation chain and the transaction target chain through the public chain, the initiation parachain, and the target parachain.
  • this communication channel when the transaction initiation chain and the transaction target chain conduct cross-chain transactions, they can determine whether the other party has completed the agreed content in the cross-chain transaction; in addition, the transaction initiation chain and the transaction target chain lock the service transaction and return transaction respectively.
  • Transaction content unlock the respective transaction content when the other party is determined to complete the transaction, avoid the losses caused by the other party's incomplete transaction, and achieve the anti-repudiation transaction effect, thereby ensuring that cross-chain transactions can be completed safely.
  • both the transaction initiation chain and the transaction target chain support the locking of the transaction content.
  • blockchain networks that do not support locking transaction content.
  • this application also provides a non-repudiation cross-chain transaction method.
  • FIG. 4 a schematic flowchart of an anti-repudiation cross-chain transaction method according to the present application is exemplarily shown. The method includes the following steps.
  • the public chain completes the first transfer transaction and locks the public chain certificate exchange in the first transfer transaction.
  • the method for creating a cross-chain transaction by the public chain is the same as the method for creating a cross-chain transaction by the public chain in the embodiment of FIG. 2 described above.
  • the embodiments of the present application are not repeated here.
  • the public chain After the cross-chain transaction is created, the public chain detects whether the transaction nodes in the transaction initiation chain and the target nodes in the transaction target chain have corresponding accounts in the public chain with a sufficient number of public chain certificates.
  • a sufficient number of public chain certificates refers to the value of public chain certificates, which is greater than the value of the transaction content of service transactions or return transactions. If yes, the public chain continues to conduct cross-chain transactions; if not, the public chain determines that the cross-chain transaction has failed and ends the cross-chain transaction.
  • the cross-chain transaction is that the transaction initiation chain A exchanges 50 securities initiation chain A's securities communication a for securities transaction b in the transaction target chain B.
  • the conversion ratio is 50: 1.
  • the exchange ratio between Zhengtong c and Zhengtong A of public chain C is 1:25.
  • the exchange ratio between Zhengtong c and Zhengtong B is 2: 1.
  • the public chain C detects whether the corresponding account of the transaction node A1 in the public chain C has at least two securities pass c, and whether the corresponding account of the target node B1 in the public chain C has at least two securities. Pass c.
  • the public chain After detecting and determining that cross-chain transactions are possible, the public chain initiates and completes the first transfer transaction.
  • the first transfer transaction is a public-chain certificate exchange that the transaction target chain pays to the transaction initiation chain and the service transaction is equivalent.
  • the maintainer node in the public chain will have a public chain certificate equivalent to the service transaction, and the target node's corresponding account in the public chain will transfer the transaction node's corresponding account in the public chain.
  • the public chain After the public chain completes the first transfer transaction, it locks the public chain certificate exchange in the first transfer transaction.
  • the cross-chain transaction is that the transaction initiation chain A exchanges 50 securities initiation chain A's securities communication a for securities transaction b in the transaction target chain B.
  • the conversion ratio is 50: 1.
  • the exchange ratio of Zhengtong c and Zhengtong a of public chain C is 1:25.
  • the maintainer node in the public chain C will transfer the two tokens c from the corresponding account of the target node B1 in the public chain C to the corresponding account of the transaction node A1 in the public chain C. And lock the above two Zhengtong c.
  • the public chain After the public chain completes the first transfer transaction, it sends a service transaction request to the initiating parallel chain to request the initiation of a parallel chain to initiate a service transaction. Therefore, the service transaction request includes transaction information of the service transaction.
  • the initiating parallel chain initiates a service transaction to the transaction initiating chain according to the service transaction request. Specifically, the public chain broadcasts a service transaction request in its own node. Accordingly, a parallel link is initiated to receive a service transaction request. Initiating a parallel chain initiates a service transaction according to the transaction information of the service transaction, that is, broadcasting a service transaction in the transaction initiation chain.
  • the transaction initiation chain completes the service transaction.
  • the transaction initiation link receives the service transaction initiated by the initiating parachain and completes the service transaction. Specifically, the maintainer node in the transaction initiation chain receives service transactions that are initiated by the parallel chain in the transaction initiation chain, pays for the transaction content that the transaction initiation chain needs to pay for in the cross-chain transaction, completes the service transaction, and in the generated block Make a record.
  • the transaction initiation chain After the transaction initiation chain completes the service transaction, it will record the completed service transaction in the generated block and add the block to the blockchain. Since the initiating parachain node is also a node in the transaction initiation chain, when the transaction initiation chain synchronizes the blockchain, the initiating parachain can also obtain the blockchain that records the service transaction and synchronize to its own parachain blockchain in. Initiate a parallel chain to check whether the service transaction is recorded in its own blockchain; if it detects that the service transaction is recorded in its own blockchain, it is determined that the service transaction has been completed; if the service transaction is not detected in its own blockchain , It is determined that the service transaction has not been completed.
  • the initiating parachain can send a third unlocking instruction to the public chain to instruct the public chain to unlock the public chain token exchange in the first transfer transaction.
  • a parallel chain is initiated to broadcast a third unlocking instruction in the public chain.
  • the maintainer node in the public chain receives the third unlocking instruction, determines that the service transaction has been completed, and then unlocks the public chain certificate in the first transfer transaction. through.
  • the public chain completes the second transfer transaction and locks the public chain certificate exchange in the second transfer transaction.
  • the second transfer transaction is a public chain certificate transaction that is equivalent to the transaction initiation chain paying to the transaction target chain and returning the transaction.
  • the maintainer node in the public chain will be equivalent to the public chain certificate of the return transaction, and the corresponding account of the transaction node in the public chain is transferred to the corresponding account of the target node in the public chain.
  • the public chain completes the second transfer transaction, it locks the public chain certificate exchange in the second transfer transaction.
  • the cross-chain transaction is that the transaction initiation chain A exchanges 50 securities initiation chain A's securities communication a for securities transaction b in the transaction target chain B.
  • the conversion ratio is 50: 1.
  • the exchange ratio of Zhengtong c and Zhengtong b of public chain C is 2: 1.
  • the maintainer node in the public chain C will transfer the two tokens c from the corresponding account of the transaction node A1 in public chain C to the corresponding account of the target node B1 in public chain C. And lock the above two Zhengtong c.
  • the target parallel chain receives a return transaction request sent by the public chain, and initiates a return transaction according to the service transaction request.
  • the public chain After the public chain completes the second transfer transaction, it sends a return transaction request to the target parallel chain to request the target parallel chain to initiate a return transaction. Therefore, the return transaction request includes the transaction information of the return transaction.
  • the target parallel chain initiates a return transaction to the transaction target chain according to the return transaction request. Specifically, the public chain broadcasts a return transaction request in its own node. Accordingly, the target parallel link receives a return transaction request.
  • the target parallel chain initiates a return transaction according to the transaction information of the return transaction, that is, broadcasts the return transaction in the transaction target chain.
  • the transaction target link receives the return transaction initiated by the target parachain and completes the return transaction. Specifically, the maintainer node in the transaction target chain receives the return transaction broadcast by the target parallel chain in the transaction target chain, pays for the transaction content that the transaction target chain needs to pay in the cross-chain transaction, completes the return transaction, and in the generated block Make a record.
  • the target parachain After the transaction target chain completes the return transaction, it will record the completed return transaction in the generated block and add the block to the blockchain. Since the target parachain node is also a node in the transaction target chain, when the transaction target chain synchronizes the blockchain, the target parachain can also obtain the blockchain that records the return transaction and synchronize to its own parallel chain blockchain in.
  • the target parallel chain detects whether the return transaction is recorded in its own blockchain; if it detects that the return transaction is recorded in its own blockchain, it determines that the return transaction is complete; if it does not detect that the return transaction is recorded in its own blockchain , It is determined that the return transaction has not been completed.
  • the target parallel chain may send a fourth unlock instruction to the public chain to instruct the public chain to unlock the public chain token exchange in the second transfer transaction.
  • the target parallel chain broadcasts the fourth unlocking instruction in the public chain.
  • the maintainer node in the public chain receives the fourth unlocking instruction and determines that the return transaction has been completed, thereby unlocking the public chain certificate in the second transfer transaction through.
  • steps S40 to S43 may be performed before steps S40 to S43, or may be performed after steps S40 to S43, and may also be performed simultaneously with steps S40 to S43. This embodiment of the present application addresses this issue. No restrictions.
  • the public chain certificate in the first transfer transaction and the second transfer transaction were both unlocked by the public chain, indicating that the cross-chain transaction between the transaction target chain and the transaction initiation chain was completed.
  • the public chain completes the first transfer transaction and locks the public chain certificate exchange in the transaction.
  • the unlock condition of the public chain certificate pass is that the service transaction is completed.
  • the public chain thus ensures that the transaction initiation chain can obtain a certificate equivalent to the service transaction when the service transaction is completed. Even if the transaction target chain does not complete the return transaction, there is no loss in the transaction initiation chain.
  • the public chain completes the second transfer transaction, locks the public chain certificate pass in the transaction, and unlocks after the service transaction is completed, so as to ensure that the transaction target chain can obtain and return in the case that the return transaction is completed.
  • Transaction Equivalent Therefore, the transaction initiation chain and the transaction target chain can avoid losses caused by the other party's incomplete transaction, and achieve non-repudiation transaction effects, thereby ensuring that cross-chain transactions can be completed safely.
  • the blockchain system includes: a transaction initiation chain, an initiation parachain, a transaction target chain, a target parachain, and a public chain; the initiation parachain is composed of a common node of the transaction initiation chain and the public chain, and the target The parallel chain is composed of a common node of the target initiation chain and the public chain;
  • the public chain is used to create cross-chain transactions, and the cross-chain transactions include: service transactions that need to be completed by the transaction initiation chain and return transactions that need to be completed by the transaction target chain;
  • the initiating parallel chain is configured to forward the first lock request sent by the public chain to the transaction initiation chain, where the first lock request includes transaction information of the service transaction;
  • the transaction initiation chain is configured to complete the service transaction according to the first lock request, and lock the transaction content of the service transaction;
  • the target parallel chain is configured to forward a second lock request sent by the public chain to the transaction target chain, where the second lock request includes transaction information of the returned transaction;
  • the transaction target chain is configured to complete the return transaction according to the second lock request, and lock the transaction content of the return transaction
  • the public chain is further configured to instruct the transaction initiation chain to unlock the transaction content of the service transaction when it is determined that both the service transaction and the return transaction have been completed, and instruct the transaction target chain to unlock the return The transaction content of the transaction.
  • a unified and effective communication channel is formed between the transaction initiation chain and the transaction target chain through the public chain, the initiation parachain, and the target parachain.
  • this communication channel when the transaction initiation chain and the transaction target chain conduct cross-chain transactions, they can determine whether the other party has completed the agreed content in the cross-chain transaction; in addition, the transaction initiation chain and the transaction target chain lock the service transaction and return transaction respectively.
  • Transaction content unlock the respective transaction content when the other party is determined to complete the transaction, avoid the losses caused by the other party's incomplete transaction, and achieve the anti-repudiation transaction effect, thereby ensuring that cross-chain transactions can be completed safely.
  • the technology in the embodiment of the present invention can be implemented by means of software plus a necessary universal hardware platform. Based on such an understanding, the technical solutions in the embodiments of the present invention can be embodied in the form of software products that are essentially or contribute to the existing technology.
  • the computer software product can be stored in a storage medium, such as ROM / RAM. , Magnetic disks, optical disks, etc., including a number of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention or certain parts of the embodiments.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

A non-repudiation cross-chain transaction method and a blockchain system. The method comprises: a public chain creates a cross-chain transaction; an initiation parallel chain forwards a first lock request to a transaction initiation chain; the transaction initiation chain completes a service transaction and locks the transaction content of the service transaction according to the first lock request; a target parallel chain forwards a second lock request to a transaction target chain; the transaction target chain completes a return transaction and locks the transaction content of the return transaction according to the second lock request; if it is determined that both the service transaction and the return transaction are completed, the public chain instructs the transaction initiation chain to unlock the transaction content of the service transaction, and the transaction target chain to unlock the transaction content of the return transaction. In the present application, the public chain instructs the transaction initiation chain and the transaction target chain to lock their respective transaction content, and then unlock the transaction content when both parties complete the transaction, so as to avoid losses of one party caused by the other party's incompletion of the transaction and achieve a non-repudiation transaction effect, thereby ensuring that the cross-chain transaction can be completed safely.

Description

抗抵赖的跨链交易方法及区块链***Non-repudiation cross-chain transaction method and blockchain system
本申请要求在2018年8月28日提交中国专利局、申请号为201810986825.3、发明名称为“区块链标准应用模型及其应用方法”以及在2018年12月7日提交中国专利局、申请号为201811497995.1、发明名称为“抗抵赖的跨链交易方法及区块链***”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the submission of the China Patent Office on August 28, 2018, application number 201810986825.3, the invention name as "Blockchain Standard Application Model and Application Method", and the submission of the China Patent Office on December 7, 2018, application number The priority of the Chinese patent application is 201811497995.1, the invention name is "Anti-repudiation cross-chain transaction method and blockchain system", the entire contents of which are incorporated herein by reference.
技术领域Technical field
本申请涉及区块链技术领域,尤其涉及一种抗抵赖的跨链交易方法及区块链***。The present application relates to the field of blockchain technology, and in particular, to a non-repudiation cross-chain transaction method and a blockchain system.
背景技术Background technique
区块链提供了一种去除中心化的***思想,这种思想最根本的原理是通过公众共识的方式,创建一个相对客观的抗抵赖数字环境。区块链技术可以使网络信息一旦发布即不可改变,例如,区块链网络中发生一笔交易,区块链网络中的节点会在生成的区块中记录该交易,再将该区块添加至区块链中,并全网广播,形成不可更改的区块链。因此,区块链本质上是一个分布式的公共账本,这个公共账本由多个数据区块组成,并由各个节点共同维护。维护同一区块链的节点组成一个物理链,例如公链、私链、联盟链等等。这些节点共同形成了一个点对点的区块链网络。Blockchain provides a decentralized system idea. The most fundamental principle of this idea is to create a relatively objective anti-repudiation digital environment through public consensus. Blockchain technology can make network information immutable once it is released. For example, a transaction occurs in the blockchain network. Nodes in the blockchain network will record the transaction in the generated block, and then add the block. Go to the blockchain and broadcast it throughout the network to form an unchangeable blockchain. Therefore, the blockchain is essentially a distributed public ledger. This public ledger consists of multiple data blocks and is jointly maintained by each node. The nodes that maintain the same blockchain form a physical chain, such as public, private, and alliance chains. These nodes together form a peer-to-peer blockchain network.
其中,上述交易不仅指传统意义上的交易,例如商品买卖和物品交换,还包括对数据的操作结果或数据交换。例如,一个公链中的节点A发起了一个交易请求,该交易请求的交易内容为节点A支付10个证通来查询天气情况。公链中的节点B提供天气查询服务。那么,节点A向节点B对应的账户支付10个证通,节点B将查询的天气情况发送给节点A,则节点A和节点B共同完成了节点A发起的交易请求。其中,支付10个证通和发送天气情况可作为交易的交易信息被记录至公链的区块链中。Among them, the above-mentioned transactions not only refer to transactions in the traditional sense, such as the purchase and sale of goods and the exchange of goods, but also the results of data operations or data exchange. For example, node A in a public chain initiates a transaction request, and the transaction content of the transaction request is to pay 10 tokens for node A to query the weather. Node B in the public chain provides weather query services. Then, node A pays 10 securities exchanges to the account corresponding to node B, and node B sends the weather conditions inquired to node A, and then node A and node B jointly complete the transaction request initiated by node A. Among them, the payment of 10 Zentong and sending weather conditions can be recorded as the transaction information of the transaction in the blockchain of the public chain.
随着区块链技术的不断发展,出现了越来越多的针对不同领域的区块链网络。不同区块链网络之间需要进行跨链交易。例如,不同区块链网络之间的证通兑换。然而,由于通常的区块链网络不能支持跨链交易,也即,现有的区块链网络之间没有统一有效的沟通机制,导致跨链交易无法实现。例如,一个公链中的节点A发起了一个交易请求,该交易请求的交易内容为节点A支付10个证通来查询天气情况。另一公链中的节点B提供天气查询服务。那么,节点A与节点B之间存在交易倾向。但是,由于节点A无法向节点B支付10个证通,节点B也不能执行查询操作,以及将查询的天气情况发送给节点A。因此,两者之间的跨链交易难以完成。With the continuous development of blockchain technology, more and more blockchain networks targeted at different fields have appeared. Cross-chain transactions are required between different blockchain networks. For example, the token exchange between different blockchain networks. However, because the usual blockchain networks cannot support cross-chain transactions, that is, there is no unified and effective communication mechanism between existing blockchain networks, which makes cross-chain transactions impossible. For example, node A in a public chain initiates a transaction request, and the transaction content of the transaction request is to pay 10 tokens for node A to query the weather. Node B in another public chain provides weather query services. Then, there is a transaction tendency between node A and node B. However, since node A cannot pay 10 tokens to node B, node B cannot perform the query operation and send the query weather condition to node A. Therefore, cross-chain transactions between the two are difficult to complete.
发明内容Summary of the Invention
本申请提供一种抗抵赖的跨链交易方法及区块链***,可用于解决在现有技术中区块链网络之间没有统一有效的沟通机制,无法保证交易安全,导致跨链交易无法实现的问题。This application provides a non-repudiation cross-chain transaction method and a blockchain system, which can be used to solve the problem that there is no unified and effective communication mechanism between blockchain networks in the prior art, transaction security cannot be guaranteed, and cross-chain transactions cannot be achieved. The problem.
第一方面,本申请提供一种抗抵赖的跨链交易方法,所述方法包括:In a first aspect, the present application provides a non-repudiation cross-chain transaction method, which includes:
公链创建跨链交易,所述跨链交易包括:交易发起链需要完成的服务交易和交易目标链需要完成的返回交易;The public chain creates cross-chain transactions, which include: service transactions that need to be completed by the transaction initiation chain and return transactions that need to be completed by the transaction target chain;
所述发起平行链向所述交易发起链转发所述公链发送的第一锁定请求,所述第一锁定请求包括所述服务交易的交易信息;Forwarding, by the initiating parallel chain, the first lock request sent by the public chain to the transaction initiation chain, where the first lock request includes transaction information of the service transaction;
所述交易发起链根据所述第一锁定请求完成所述服务交易,并锁定所述服务交易的交易内容;The transaction initiation chain completes the service transaction according to the first lock request, and locks the transaction content of the service transaction;
所述目标平行链向所述交易目标链转发所述公链发送的第二锁定请求,所述第二锁定请求包括所述返回交易的交易信息;Forwarding, by the target parallel chain, a second lock request sent by the public chain to the transaction target chain, the second lock request including transaction information of the returned transaction;
所述交易目标链根据所述第二锁定请求完成所述返回交易,并锁定所述返回交易的交易内容;The transaction target chain completes the return transaction according to the second lock request, and locks the transaction content of the return transaction;
当确定所述服务交易和所述返回交易都已完成时,所述公链指示所述交易发起链解锁所述服务交易的交易内容,以及指示所述交易目标链解锁所述返回交易的交易内容。When it is determined that both the service transaction and the return transaction have been completed, the public chain instructs the transaction initiation chain to unlock the transaction content of the service transaction, and instructs the transaction target chain to unlock the transaction content of the return transaction. .
可选地,所述发起平行链向所述交易发起链转发所述公链发送的第一锁定请求,包括:Optionally, forwarding the first lock request sent by the public chain to the transaction initiation chain by the initiating parallel chain includes:
接收所述公链根据所述跨链交易发送的所述第一锁定请求;Receiving the first lock request sent by the public chain according to the cross-chain transaction;
所述发起平行链根据所述服务交易的交易信息,检测所述交易发起链是否支持所述服务交易;The initiating parallel chain detects whether the service initiating chain supports the service transaction according to the transaction information of the service transaction;
当确定所述交易发起链支持所述服务交易时,所述发起平行链向所述交易发起链转发所述第一锁定请求;When it is determined that the transaction initiation chain supports the service transaction, the initiating parallel chain forwards the first lock request to the transaction initiation chain;
所述目标平行链向所述交易目标链转发所述公链发送的第二锁定请求,包括:The forwarding, by the target parallel chain, the second lock request sent by the public chain to the transaction target chain includes:
接收所述公链根据所述跨链交易发送的所述第二锁定请求;Receiving the second lock request sent by the public chain according to the cross-chain transaction;
所述目标平行链根据所述返回交易的交易信息,检测所述交易目标链是否支持所述返回交易;Detecting, by the target parallel chain, whether the return target transaction supports the return transaction according to the transaction information of the return transaction;
当确定所述交易目标链支持所述返回交易时,所述目标平行链向所述交易目标链转发所述第二锁定请求。When it is determined that the transaction target chain supports the return transaction, the target parachain forwards the second lock request to the transaction target chain.
可选地,所述检测所述交易发起链是否支持所述服务交易之后,还包括:Optionally, after detecting whether the service initiation chain supports the service transaction, the method further includes:
当确定所述交易发起链不支持所述服务交易时,所述发起平行链向所述公链发送失败信息,所述失败信息用于通知所述公链所述跨链交易失败;When it is determined that the transaction initiation chain does not support the service transaction, the initiating parallel chain sends failure information to the public chain, and the failure information is used to notify the public chain that the cross-chain transaction fails;
所述检测所述交易目标链是否支持所述返回交易之后,还包括:After detecting whether the transaction target chain supports the return transaction, the method further includes:
当确定所述交易目标链不支持所述返回交易时,所述目标平行链向所述公链发送所述失败信息。When it is determined that the transaction target chain does not support the return transaction, the target parachain sends the failure information to the public chain.
可选地,当完成所述服务交易时,所述交易发起链向所述发起平行链发送服务完成响应;Optionally, when the service transaction is completed, the transaction initiation chain sends a service completion response to the initiating parallel chain;
所述发起平行链向所述公链转发所述服务完成响应;The initiating parallel chain forwards the service completion response to the public chain;
当完成所述返回交易时,所述交易目标链向所述目标平行链发送返回完成响应;When the return transaction is completed, the transaction target chain sends a return completion response to the target parallel chain;
所述目标平行链向所述公链转发所述返回完成响应;Forwarding, by the target parallel chain, the return completion response to the public chain;
若公链接收到所述服务完成响应和所述返回完成响应,则确定所述服务交易和所述返回交易都已完成。If the public link receives the service completion response and the return completion response, it is determined that both the service transaction and the return transaction have been completed.
可选地,所述公链根据所述跨链交易,完成第一转账交易,以及锁定所述第一转账交易中的公链证通,所述第一转账交易为所述交易目标链向所述交易发起链支付与所述服务交易等价的公链证通;Optionally, the public chain completes the first transfer transaction according to the cross-chain transaction, and locks the public chain certificate exchange in the first transfer transaction, and the first transfer transaction is the transaction target chain to the The public chain certificate communication that the transaction initiation chain payment is equivalent to the service transaction;
发起平行链接收所述公链发送的服务交易请求,以及根据所述服务交易请求向所述交易发起链发起所述服务交易;Initiating a parallel chain to receive a service transaction request sent by the public chain, and initiating the service transaction to the transaction initiation chain according to the service transaction request;
所述交易发起链完成所述服务交易;The transaction initiation chain completes the service transaction;
当所述发起平行链确定所述服务交易已完成时,指示所述公链解锁所述第一转账交易中的公链证通;When the initiating parallel chain determines that the service transaction has been completed, instructing the public chain to unlock the public chain token exchange in the first transfer transaction;
所述公链根据所述跨链交易,发起第二转账交易,以及锁定所述第二转账交易中的公链证通,所述第二转账交易为所述交易发起链向所述交易目标链支付与所述返回交易等价的公链证通;The public chain initiates a second transfer transaction according to the cross-chain transaction, and locks the public chain certificate exchange in the second transfer transaction. The second transfer transaction is the transaction initiation chain to the transaction target chain. Pay a public chain certificate equivalent to the return transaction;
目标平行链接收所述公链发送的返回交易请求,以及根据所述返回交易请求向所述交易目标链发起所述返回交易;The target parallel chain receives a return transaction request sent by the public chain, and initiates the return transaction to the transaction target chain according to the return transaction request;
所述交易目标链完成所述返回交易;The transaction target chain completes the return transaction;
当所述目标平行链确定所述返回交易已完成时,指示所述公链解锁所述第二转账交易中的公链证通。When the target parallel chain determines that the return transaction has been completed, instruct the public chain to unlock the public chain token exchange in the second transfer transaction.
可选地,所述指示所述公链解锁所述第一转账交易中的公链证通之前,还包括:Optionally, before instructing the public chain to unlock the public chain certificate pass in the first transfer transaction, the method further includes:
所述发起平行链检测所述服务交易是否记录在自身的区块链中;The initiating a parallel chain to detect whether the service transaction is recorded in its own blockchain;
若检测到所述服务交易记录在自身的区块链中,则确定所述服务交易已完成;If it is detected that the service transaction is recorded in its own blockchain, it is determined that the service transaction has been completed;
所述指示所述公链解锁所述第二转账交易中的公链证通之前,还包括:Before instructing the public chain to unlock the public chain certificate pass in the second transfer transaction, the method further includes:
所述目标平行链检测所述返回交易是否记录在自身的区块链中;Detecting, by the target parachain, whether the return transaction is recorded in its own blockchain;
若检测到所述返回交易记录在自身的区块链中,则确定所述返回交易已完成。If the return transaction is detected in its own blockchain, it is determined that the return transaction has been completed.
可选地,所述公链创建跨链交易,包括:Optionally, the creation of a cross-chain transaction by the public chain includes:
所述公链接收所述交易发起链发送的跨链交易请求,所述跨链交易请求中包括:所述跨链交易的交易内容,以及所述交易发起链和所述交易目标链的地址信息;The public chain receives a cross-chain transaction request sent by the transaction initiation chain. The cross-chain transaction request includes: the transaction content of the cross-chain transaction, and address information of the transaction initiation chain and the transaction target chain. ;
根据所述跨链交易请求,创建所述跨链交易。Creating the cross-chain transaction according to the cross-chain transaction request.
第二方面,本申请提供一种区块链***,其特征在于,所述区块链***包括:交易发起链、发起平行链、交易目标链、目标平行链和公链;所述发起平行链由所述交易发起链和所述公链的共有节点组成,所述目标平行链由所述目标发起链和所述公链的共有节点组成;In a second aspect, the present application provides a blockchain system, which is characterized in that the blockchain system includes: a transaction initiation chain, an initiation parallel chain, a transaction target chain, a target parallel chain, and a public chain; It consists of the common nodes of the transaction initiation chain and the public chain, and the target parachain consists of the common nodes of the target initiation chain and the public chain;
所述公链,用于创建跨链交易,所述跨链交易包括:交易发起链需要完成的服务交易和交易目标链需要完成的返回交易;The public chain is used to create cross-chain transactions, and the cross-chain transactions include: service transactions that need to be completed by the transaction initiation chain and return transactions that need to be completed by the transaction target chain;
所述发起平行链,用于向所述交易发起链转发所述公链发送的第一锁定请求,所述第一锁定请求包括所述服务交易的交易信息;The initiating parallel chain is configured to forward the first lock request sent by the public chain to the transaction initiation chain, where the first lock request includes transaction information of the service transaction;
所述交易发起链,用于根据所述第一锁定请求完成所述服务交易,并锁定所述服务交易的交易内容;The transaction initiation chain is configured to complete the service transaction according to the first lock request, and lock the transaction content of the service transaction;
所述目标平行链,用于向所述交易目标链转发所述公链发送的第二锁定请求,所述第二锁定请求包括所述返回交易的交易信息;The target parallel chain is configured to forward a second lock request sent by the public chain to the transaction target chain, where the second lock request includes transaction information of the returned transaction;
所述交易目标链,用于根据所述第二锁定请求完成所述返回交易,并锁定所述返 回交易的交易内容;The transaction target chain is configured to complete the return transaction according to the second lock request, and lock the transaction content of the return transaction;
所述公链,还用于当确定所述服务交易和所述返回交易都已完成时,指示所述交易发起链解锁所述服务交易的交易内容,以及指示所述交易目标链解锁所述返回交易的交易内容。The public chain is further configured to instruct the transaction initiation chain to unlock the transaction content of the service transaction when it is determined that both the service transaction and the return transaction have been completed, and instruct the transaction target chain to unlock the return The transaction content of the transaction.
在本申请提供的方案中,通过公链、发起平行链和目标平行链,在交易发起链和交易目标链之间形成统一有效的沟通通道。利用这种沟通通道,交易发起链和交易目标链进行跨链交易时,能够确定对方是否完成了跨链交易中约定的内容;而且,交易发起链和交易目标链分别锁定服务交易和返回交易的交易内容,在确定对方完成交易时再解锁各自的交易内容,避免由于对方不完成交易带来的损失,达到抗抵赖的交易效果,从而保证跨链交易能够安全完成。In the solution provided by this application, a unified and effective communication channel is formed between the transaction initiation chain and the transaction target chain through the public chain, the initiation parachain, and the target parachain. Using this communication channel, when the transaction initiation chain and the transaction target chain conduct cross-chain transactions, they can determine whether the other party has completed the agreed content in the cross-chain transaction; moreover, the transaction initiation chain and the transaction target chain lock the service transaction and the return transaction respectively. Transaction content, unlock the respective transaction content when the other party is determined to complete the transaction, avoid the losses caused by the other party's incomplete transaction, and achieve the anti-repudiation transaction effect, thereby ensuring that cross-chain transactions can be completed safely.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present application more clearly, the drawings used in the description of the embodiments are briefly introduced below. Obviously, the drawings in the following description are just some embodiments of the application. For those of ordinary skill in the art, other drawings can be obtained according to these drawings without paying creative labor.
图1是根据一示例性实施例示出的抗抵赖的跨链交易方法的流程示意图;Fig. 1 is a schematic flowchart of a non-repudiation cross-chain transaction method according to an exemplary embodiment;
图2是根据一示例性实施例示出的发起平行链转发第一锁定请求的流程图;Fig. 2 is a flowchart illustrating initiating a parallel chain to forward a first lock request according to an exemplary embodiment;
图3是根据一示例性实施例示出的目标平行链转发第二锁定请求的流程图;Fig. 3 is a flow chart showing a target parallel chain forwarding a second lock request according to an exemplary embodiment;
图4是根据另一示例性实施例示出的抗抵赖的跨链交易方法的流程示意图。Fig. 4 is a schematic flowchart of a non-repudiation cross-chain transaction method according to another exemplary embodiment.
具体实施方式detailed description
下面将详细地对实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下实施例中描述的实施方式并不代表与本申请相一致的所有实施方式。仅是与权利要求书中所详述的、本申请的一些方面相一致的***和方法的示例。The embodiments will be described in detail below, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following examples do not represent all implementations consistent with this application. These are merely examples of systems and methods consistent with some aspects of the application as detailed in the claims.
在本申请提供的技术方案中,区块链网络是指区块链节点形成的一个点对点的网络。区块链或区块链区块中的数据信息是在区块链网络中发生交易时,区块链的节点所记录的交易。其中,一个区块包括多笔交易,而多个区块又形成一条区块链。区块链网络中的各个节点可以是物理节点,如终端、服务器,也可以是虚拟节点。同一区块链网络中的节点基于同一共识机制,沟通维护区块链网络的运行。In the technical solution provided in this application, the blockchain network refers to a point-to-point network formed by blockchain nodes. The data information in the blockchain or blockchain block is the transaction recorded by the nodes of the blockchain when a transaction occurs in the blockchain network. Among them, one block includes multiple transactions, and multiple blocks form a blockchain. Each node in the blockchain network can be a physical node, such as a terminal, a server, or a virtual node. Nodes in the same blockchain network communicate and maintain the operation of the blockchain network based on the same consensus mechanism.
在本申请中,所提及的公链、交易发起链、交易目标链、发起平行链和目标平行链,均是指符合区块链技术的不同区块链网络。本申请提供的技术方案中,公链作为部署在全网的基础平台,可以接入多个区块链网络,如基于公链接口规范搭建的行业链、联盟链以及私有链等等。每个区块链网络可以作为一个开发平台,并为其网络内部提供相应的服务。其中,公链定义和规范有标准的接口和方式,以便于其他区块链,如交易发起链和交易目标链,进行网络对接。本申请中公链具有支持跨链中介的能力,还具有去中心化的应用和智能合约化能力。In this application, the mentioned public chains, transaction initiation chains, transaction target chains, initiation parachains, and target parachains all refer to different blockchain networks that conform to the blockchain technology. In the technical solution provided in this application, the public chain, as the basic platform deployed on the entire network, can access multiple blockchain networks, such as industry chains, alliance chains, and private chains based on public link interface specifications. Each blockchain network can serve as a development platform and provide corresponding services within its network. Among them, the definition and specification of the public chain have standard interfaces and methods to facilitate network interconnection with other blockchains, such as the transaction initiation chain and the transaction target chain. The public chain in this application has the ability to support cross-chain intermediation, as well as decentralized applications and smart contracting capabilities.
交易发起链是指发起跨链交易的区块链网络,而交易目标链是该跨链交易的交易对像所在的区块链网络。在本申请中,公链提供基础平台,交易发起链和交易目标链 作为接入的网络,提供各自的功能和服务。交易发起链和交易目标链是各自独立的区块链网络,如比特币和以太坊,或者,不同行业开发的行业链和联盟链,甚至是不同的私有链或公链。这些各自独立的区块链网络由于存在差异,例如共识机制的不同,不能之间进行通信或交易。因此,在本申请提供的技术方案中,交易发起链和交易目标链通过平行链来连接公链。The transaction initiation chain refers to the blockchain network that initiated the cross-chain transaction, and the transaction target chain is the blockchain network where the transaction object of the cross-chain transaction is located. In this application, the public chain provides the basic platform, the transaction initiation chain and the transaction target chain as the access network, providing their respective functions and services. The transaction initiation chain and transaction target chain are independent blockchain networks, such as Bitcoin and Ethereum, or industry chains and alliance chains developed by different industries, or even different private or public chains. Due to the differences between these independent blockchain networks, such as different consensus mechanisms, they cannot communicate or trade between them. Therefore, in the technical solution provided in this application, the transaction initiation chain and the transaction target chain are connected to the public chain through parallel chains.
对于一个通过平行链接入公链的区块链网络,平行链可以由公链和该区块链网络的共有节点组成。因为平行链节点是公链和该区块链网络的共有节点,所以平行链同时具有公链和该区块链网络的功能,并存储有双方的区块链。因此,平行链能够对一侧区块链网络中的信息进行转化,再传递给另一侧的区块链网络。通过平行链中的桥接作用,不同区块链网络之间可以进行通信或交易。在本申请中,发起平行链是指连接公链和交易发起链的平行链,而目标平行链是指连接公链和交易目标链的平行链For a blockchain network that is connected to the public chain through parallel links, the parallel chain can be composed of the public chain and the common nodes of the blockchain network. Because the parachain node is a common node of the public chain and the blockchain network, the parachain has both the functions of the public chain and the blockchain network, and stores the blockchains of both parties. Therefore, the parallel chain can transform the information in the blockchain network on one side and then transfer it to the blockchain network on the other side. Through the bridging effect in the parachain, different blockchain networks can communicate or trade. In this application, the initiating parachain refers to the parallel chain connecting the public chain and the transaction initiation chain, and the target parachain refers to the parallel chain connecting the public chain and the transaction target chain.
基于上述组成部分,公链在实际应用中可提供跨链中继,完成交易验证,数据证明,资产转移和智能合约执行等工作。公链还提供基础的区块链平台能力,即快速完成方案部署和验证,完成在公链网络中的分布式存储和记账程序。Based on the above components, the public chain can provide cross-chain relays in practical applications, completing transactions verification, data certification, asset transfer, and smart contract execution. The public chain also provides the basic blockchain platform capabilities, which is to quickly complete the deployment and verification of the scheme, and to complete the distributed storage and accounting procedures in the public chain network.
公链除了记录自己的区块链信息外,还可以用于存储相应跨链交易的信息摘要,即交易摘要。通过格式化的交易数据记录跨链交易的相关内容。同时,为了减少对公链上分布式存储空间的占用,公链在记录某些信息时,还可以通过特定的压缩算法记录第三方区块链信息。此外,对于接入公链的区块链网络,公链还存储区块链网络接入时提供的登记信息。该登记信息包括:能够提供的服务类型,能够进行兑换的证通类型,进行交易的方式、交易的条件,各节点的地址信息等。In addition to recording its own blockchain information, the public chain can also be used to store the information summary of the corresponding cross-chain transaction, that is, the transaction summary. Record the relevant content of cross-chain transactions through formatted transaction data. At the same time, in order to reduce the occupation of distributed storage space on the public chain, when the public chain records certain information, it can also record third-party blockchain information through a specific compression algorithm. In addition, for the blockchain network accessing the public chain, the public chain also stores the registration information provided when the blockchain network is accessed. The registration information includes: the types of services that can be provided, the types of token exchanges that can be exchanged, the methods of conducting transactions, the conditions of transactions, and the address information of each node.
参见图1,其示例性地示出了本申请一种抗抵赖的跨链交易方法的流程示意图。该方法包括以下步骤。Referring to FIG. 1, a schematic flowchart of an anti-repudiation cross-chain transaction method according to the present application is exemplarily shown. The method includes the following steps.
S10,公链创建跨链交易。S10. The public chain creates cross-chain transactions.
在本申请实施例提供的方案中,需要公链作为中介桥梁,沟通交易发起链和交易目标链,完成交易发起链和交易目标链之间的跨链交易。因此,当交易发起链和交易目标链之间需要进行一笔跨链交易时,由公链创建跨链交易。一笔跨链交易包括两笔子交易:交易发起链需要完成的服务交易和交易目标链需要完成的返回交易。服务交易是交易发起链向及交易目标链支付交易目标链需求的交易内容;返回交易是交易目标链向交易发起链支付交易发起链需求的交易内容。因此,完成一笔跨链交易,需要完成跨链交易中的服务交易和返回交易。In the solution provided by the embodiment of the present application, the public chain is required as an intermediary bridge to communicate the transaction initiation chain and the transaction target chain, and to complete the cross-chain transaction between the transaction initiation chain and the transaction target chain. Therefore, when a cross-chain transaction is required between the transaction initiation chain and the transaction target chain, the public chain creates a cross-chain transaction. A cross-chain transaction includes two sub-transactions: the service transaction that the transaction initiation chain needs to complete and the return transaction that the transaction target chain needs to complete. The service transaction is the transaction content required by the transaction initiation chain and the transaction target chain to pay the transaction target chain; the return transaction is the transaction content required by the transaction target chain to the transaction initiation chain to pay the transaction initiation chain. Therefore, to complete a cross-chain transaction, you need to complete the service transaction and return transaction in the cross-chain transaction.
示例性地,交易发起链A与交易目标链B之间的跨链交易是:以50个交易发起链A的证通a,换取1个交易目标链B的证通b。那么,这笔跨链交易中,服务交易为交易发起链向交易目标链支付50个证通A;而返回交易为交易目标链向交易发起链支付1个证通b。Exemplarily, the cross-chain transaction between the transaction initiation chain A and the transaction target chain B is: 50 transactions initiating the Zhengtong a of the chain A, in exchange for 1 transaction destination chain B of the Zhengtong b. Then, in this cross-chain transaction, the service transaction pays 50 Zenith A for the transaction initiation chain to the transaction target chain; and the return transaction pays 1 ZenT for the transaction target chain to the transaction initiation chain.
在交易发起链要与交易目标链进行跨链交易时,交易发起链可以调用公共智能合约向公链发送跨链交易请求。该跨链交易请求包括:交易双方需要支付的交易内容,以及交易发起链和交易目标链的地址信息。交易发起链中的交易节点在交易发起链中广播上述跨链交易请求。发起平行链的节点获取到该交易请求,并在公链中进行广播, 使得公链获取到该跨链交易请求。公链在获取到跨链交易请求后,根据存储的登记信息验证交易发起链和交易目标链能否支付请求中的交易内容。具体地,公链验证交易节点能否支付交易发起链需要支付的交易内容,以及验证目标节点能否支付交易目标链需要支付的交易内容。其中,交易节点是指交期发起链中发起跨链交易请求的节点,目标节点是指交易目标链中与交易节点进行跨链交易的节点。When the transaction initiation chain is to conduct cross-chain transactions with the transaction target chain, the transaction initiation chain can call a public smart contract to send a cross-chain transaction request to the public chain. The cross-chain transaction request includes: the transaction content that both parties need to pay, and the address information of the transaction initiation chain and the transaction target chain. The transaction nodes in the transaction initiation chain broadcast the above-mentioned cross-chain transaction requests in the transaction initiation chain. The node initiating the parallel chain obtains the transaction request and broadcasts it in the public chain, so that the public chain obtains the cross-chain transaction request. After the public chain obtains the cross-chain transaction request, it can verify whether the transaction initiation chain and the transaction target chain can pay the transaction content in the request according to the stored registration information. Specifically, the public chain verifies whether the transaction node can pay the transaction content that the transaction initiation chain needs to pay, and verifies whether the target node can pay the transaction content that the transaction target chain needs to pay. Among them, the transaction node refers to the node that initiates the cross-chain transaction request in the delivery initiation chain, and the target node refers to the node in the transaction target chain that conducts cross-chain transactions with the transaction node.
当跨链交易请求通过了公链的验证后,公链根据该跨链交易请求创建跨链交易。若跨链交易请求没有通过公链的验证,如交易节点无法支付服务交易的交易内容,则公链通知交易发起链跨链交易失败。When the cross-chain transaction request passes the verification of the public chain, the public chain creates a cross-chain transaction according to the cross-chain transaction request. If the cross-chain transaction request does not pass the verification of the public chain, such as the transaction node cannot pay the transaction content of the service transaction, the public chain notifies the transaction that the initiating chain cross-chain transaction has failed.
在另一种实施例中,交易发起链发送跨链交易请求前,先通过发起平行链向公链发起一笔查询交易。其中,查询交易包括交易发起链所需要的交易内容和交易发起链所能支付的交易内容。公链根据查询交易和接入的区块链网络的登记信息,确定接入的区块链网络中是否存在能够与交易发起链达成交易的交易目标链。若存在,公链通过发起平行链将交易目标链的地址信息发送给交易发起链。若不存在,公链通知交易发起链跨链交易失败。此外,在本申请中,交易发起链的地址信息用于指示交易节点和目标节点在交易发起链的网络中对应的账户地址。交易目标链的地址信息用于指示是指交易节点和目标节点在交易目标链的网络中对应的账户地址。In another embodiment, before the transaction initiation chain sends a cross-chain transaction request, a query transaction is initiated to the public chain by initiating a parallel chain. The query transaction includes the transaction content required by the transaction initiation chain and the transaction content that the transaction initiation chain can pay. The public chain determines whether there is a transaction target chain capable of reaching a transaction with the transaction initiation chain in the accessed blockchain network according to the query of the transaction and the registration information of the accessed blockchain network. If it exists, the public chain sends the address information of the transaction target chain to the transaction initiation chain by initiating the parallel chain. If it does not exist, the public chain notifies the transaction that the initiating chain cross-chain transaction has failed. In addition, in this application, the address information of the transaction initiation chain is used to indicate the corresponding account addresses of the transaction node and the target node in the network of the transaction initiation chain. The address information of the transaction target chain is used to indicate that the transaction node and the target node correspond to the account addresses in the network of the transaction target chain.
示例性地,交易节点A1希望以50个交易发起链A的证通a,换取1个交易目标链B的证通b。因此,交易节点A1向公链C发起一笔查询交易。公链根据查询交易确定交易节点A1需要1个证通b,并且能够支付50个证通a。公链根据查询交易的内容,查询其它区块链网络是否有能够与交易节点A1达成交易的节点。交易目标链B中有一个节点需要50个证通a,并愿意支付最多5个证通b。那么,公链C将该节点作为目标节点B1,并将交易目标链B的地址信息发送给交易发起链A。Exemplarily, the transaction node A1 hopes to initiate the Zentong a of the chain A with 50 transactions in exchange for the Zentong b of a transaction target chain B. Therefore, the transaction node A1 initiates a query transaction to the public chain C. The public chain determines that the transaction node A1 needs 1 Zhengtong b according to the query transaction, and can pay 50 Zhengtong a. According to the content of the query transaction, the public chain queries whether other blockchain networks have nodes that can reach a transaction with the transaction node A1. One node in the transaction target chain B needs 50 STOs a and is willing to pay up to 5 STOs b. Then, the public chain C uses this node as the target node B1, and sends the address information of the transaction target chain B to the transaction initiation chain A.
S11,发起平行链向交易发起链转发公链发送的第一锁定请求。S11. The initiating parallel chain forwards the first lock request sent by the public chain to the transaction initiating chain.
公链在创建跨链交易后,需要通知交易发起链完成服务交易。因此,公链通过发起平行链向交易发起链发送第一锁定请求。第一锁定请求用于指示交易发起链完成服务交易,并锁定服务交易的交易内容。因此,第一锁定请求中包括服务交易的交易信息。一笔交易的交易信息包括交易双方的地址信息、交易方式和交易条件。其中,交易方式为交易时间、区块链信息格式(模板)、支持交易的证通类型等。交易条件包括交易双方需要支付的交易内容。After the public chain creates a cross-chain transaction, it needs to notify the transaction initiation chain to complete the service transaction. Therefore, the public chain sends a first lock request to the transaction initiation chain by initiating a parallel chain. The first lock request is used to instruct the transaction initiation chain to complete a service transaction and lock the transaction content of the service transaction. Therefore, the first lock request includes the transaction information of the service transaction. The transaction information of a transaction includes the address information of both parties, the transaction method and the transaction conditions. Among them, the transaction method is the transaction time, the format of the blockchain information (template), and the type of stock exchange that supports the transaction. The transaction conditions include the transaction content that both parties of the transaction need to pay.
进一步地,如图2所示,发起平行链向交易发起链转发公链发送的第一锁定请求的步骤包括:Further, as shown in FIG. 2, the step of initiating the parallel chain to forward the first lock request sent by the public chain to the transaction initiation chain includes:
S111,发起平行链接收公链发送的第一锁定请求。S111. Initiate a parallel chain to receive a first lock request sent by a public chain.
S112,发起平行链检测交易发起链是否支持服务交易。S112. Initiate a parallel chain to detect whether the transaction initiation chain supports service transactions.
S113,若交易发起链支持服务交易,则发起平行链向交易发起链转发第一锁定请求。S113. If the transaction initiation chain supports service transactions, the initiating parallel chain forwards the first lock request to the transaction initiation chain.
S114,若交易发起链不支持服务交易,则发起平行链向公链发送失败信息。S114. If the transaction initiation chain does not support service transactions, the initiation of the parallel chain sends a failure message to the public chain.
公链在创建跨链交易后,确定交易发起链需要完成的服务交易,以及根据该服务交易生成第一锁定请求。为了将第一锁定请求发送给交易发起链,公链在自身节点中广播第一锁定请求。由于发起平行链节点也是公链中的节点,因此发起平行链能够接 收到第一锁定请求。After the public chain creates a cross-chain transaction, it determines the service transaction that the transaction initiation chain needs to complete, and generates a first lock request based on the service transaction. In order to send the first lock request to the transaction initiation chain, the public chain broadcasts the first lock request in its own node. Since the initiating parachain node is also a node in the public chain, the initiating parachain can receive the first lock request.
在接收到第一锁定请求后,发起平行链检测交易发起链是否支持服务交易,进一步确保跨链交易能够完成。发起平行链根据第一锁定请求中的交易信息,检测交易节点是否支持交易信息中的交易方式和交易条件。若支持,则发起平行链确定交易发起链支持服务交易;若不支持,则发起平行链确定交易发起链不支持服务交易。After receiving the first lock request, the initiating parallel chain detects whether the transaction initiating chain supports service transactions, further ensuring that cross-chain transactions can be completed. The initiating parallel chain detects whether the transaction node supports the transaction mode and transaction conditions in the transaction information according to the transaction information in the first lock request. If supported, initiate a parallel chain to determine that the transaction initiation chain supports service transactions; if not, initiate a parallel chain to determine that the transaction initiation chain does not support service transactions.
示例性地,跨链交易为交易发起链A的证通a兑换交易目标链B的证通b,兑换比例为50:1,且规定兑换100个证通a/2个证通b。那么,服务交易的交易方式为支付证通a,交易条件为支付证通a的数量为100个。交易发起链A的交易节点A1只有98个证通a,不满***易条件,则发起平行链AC确定交易发起链A不支持服务交易。Exemplarily, the cross-chain transaction is the exchange of the Zentong a of the transaction initiation chain A to the Zentong b of the transaction target chain B, with a conversion ratio of 50: 1, and stipulating the exchange of 100 Zhengtong a / 2 Zhengtong b. Then, the transaction method of the service transaction is to pay the certificate pass a, and the transaction condition is that the number of the payment certificate pass a is 100. The transaction node A1 of the transaction initiation chain A has only 98 securities pass a. If the transaction conditions are not met, the initiating parallel chain AC determines that the transaction initiation chain A does not support service transactions.
若交易发起链支持服务交易,则发起平行链向交易发起链转发第一锁定请求。具体地,发起平行链在交易发起链中广播第一锁定请求。相应地,交易发起链接收到第一锁定请求。If the transaction initiation chain supports service transactions, the initiating parallel chain forwards the first lock request to the transaction initiation chain. Specifically, the initiating parallel chain broadcasts the first lock request in the transaction initiating chain. Accordingly, the transaction initiation link receives the first lock request.
若交易发起链不支持服务交易,则发起平行链向公链发送失败信息。失败信息用于通知公链跨链交易失败。具体地,发起平行链在公链中广播失败信息。相应地,公链接收失败信息,确定本次跨链交易失败,结束本次跨链交易。其中,失败信息中包括服务交易的交易信息。If the transaction initiation chain does not support service transactions, the initiation of the parallel chain sends a failure message to the public chain. The failure information is used to notify the public chain of cross-chain transaction failure. Specifically, the initiation of the parallel chain broadcasts the failure information in the public chain. Correspondingly, the public chain receives the failure information, determines that the cross-chain transaction has failed, and ends the cross-chain transaction. The failure information includes transaction information of service transactions.
S12,交易发起链完成服务交易,以及锁定服务交易的交易内容。S12. The transaction initiation chain completes the service transaction and locks the transaction content of the service transaction.
交易发起链接收到第一锁定请求,根据其中的交易信息,确定需要完成的服务交易。具体地,交易发起链中的维护者节点完成服务交易,并锁定服务交易的交易内容。其中,维护者节点是在区块链网络中负责维护区块链的节点,拥有记账的权力。发起平行链在交易发起链中广播第一锁定请求,当交易发起链中的维护者节点接收到第一锁定请求后,支付跨链交易中交易发起链需要支付的交易内容,并锁定该交易内容。The transaction initiation link receives the first lock request, and determines the service transaction to be completed according to the transaction information therein. Specifically, the maintainer node in the transaction initiation chain completes the service transaction and locks the transaction content of the service transaction. Among them, the maintainer node is the node responsible for maintaining the blockchain in the blockchain network and has the right to keep accounts. The initiating parallel chain broadcasts the first lock request in the transaction initiation chain. After the maintainer node in the transaction initiation chain receives the first lock request, the transaction content that the transaction initiation chain needs to pay for the cross-chain transaction is paid, and the transaction content is locked .
在本申请提供的技术方案中,跨链交易一般包括两种类型:证通兑换和信息服务。其中,证通兑换是指用交易发起链的证通兑换交易目标链的证通;信息服务是指交易发起链向交易目标链支付一定数量的证通,购买交易目标链向交易发起链发送相应的信息数据,或者,交易发起链向交易目标链发送信息数据,换取一定数量的证通。但无论是证通兑换,还是信息服务,都是数据操作或数据操作结果。例如,服务交易是支付一定数量的交易发起链的证通。那么,完成服务交易时,维护者节点实际是将一定数量的证通,由交易节点对应的账户转移至目标节点对应的账户。由于支付的是交易发起链的证通,因此该转账操作是在交易发起链中完成的,不涉及交易发起链和交易目标链之间的跨链操作。因此,维护者节点确定交易发起链的地址信息指示的交易节点和目标节点各自账户后,即可完成交易节点和目标节点之间交易内容的支付。In the technical solution provided in this application, cross-chain transactions generally include two types: exchange of information exchange and information services. Among them, the STO exchange refers to the use of the STO of the transaction initiation chain to exchange the STO of the transaction target chain; the information service means that the transaction initiation chain pays a certain amount of STO to the transaction target chain, and the purchase of the transaction target chain sends the corresponding Or the transaction initiation chain sends the information data to the transaction target chain in exchange for a certain amount of securities. However, whether it is a stock exchange or an information service, it is a data operation or the result of a data operation. For example, a service transaction is a stock exchange that pays a certain number of transaction initiation chains. Then, when the service transaction is completed, the maintainer node actually transfers a certain number of securities through the account corresponding to the transaction node to the account corresponding to the target node. Because the payment is made through the transaction initiation chain, the transfer operation is completed in the transaction initiation chain and does not involve cross-chain operations between the transaction initiation chain and the transaction target chain. Therefore, after the maintainer node determines the respective accounts of the transaction node and the target node indicated by the address information of the transaction initiation chain, payment of the transaction content between the transaction node and the target node can be completed.
示例性地,跨链交易为信息服务,交易发起链A向交易目标链B支付50个交易发起链A的证通a,购买交易目标链B提供的天气信息。服务交易是交易发起链A向交易目标链B支付50个证通a。交易发起链A中的维护者节点A2根据公链C发送的第一锁定请求,由交易节点A1在交易发起链中对应的账户,向目标节点B1在交易发起链A中对应的账户支付50个证通a,并锁定这50个证通a。Exemplarily, the cross-chain transaction is an information service, and the transaction initiation chain A pays 50 transaction initiation chains A of the transaction initiation chain A to the transaction target chain B to purchase weather information provided by the transaction target chain B. The service transaction is that the transaction initiation chain A pays 50 securities pass a to the transaction target chain B. The maintainer node A2 in the transaction initiation chain A, according to the first lock request sent by the public chain C, 50 corresponding accounts of the transaction node A1 in the transaction initiation chain and pay 50 to the corresponding account of the target node B1 in the transaction initiation chain A Zhengtong a, and lock these 50 Zhengtong a.
S13,目标平行链向交易目标链转发公链发送的第二锁定请求。S13. The target parallel chain forwards the second lock request sent by the public chain to the transaction target chain.
公链在创建跨链交易后,需要通知交易目标链完成返回交易。与上述步骤S11中, 发起平行链向交易发起链转发公链发送的第一锁定请求的方式相同。公链通过目标平行链向交易目标链发送第二锁定请求。第二锁定请求用于指示交易目标链完成返回交易,并锁定返回交易的交易内容。因此,第二锁定请求中包括返回交易的交易信息。After the public chain creates a cross-chain transaction, it needs to notify the transaction target chain to complete the return transaction. In the same manner as in the above step S11, the method for initiating the parallel chain to forward the first lock request sent by the public chain to the transaction initiation chain is the same. The public chain sends a second lock request to the transaction target chain through the target parallel chain. The second lock request is used to instruct the transaction target chain to complete the return transaction and lock the transaction content of the return transaction. Therefore, the second lock request includes the transaction information of the returned transaction.
进一步地,如图3所示,目标平行链向交易目标链转发公链发送的第二锁定请求的步骤包括:Further, as shown in FIG. 3, the step of the target parallel chain forwarding the second lock request sent by the public chain to the transaction target chain includes:
S131,目标平行链接收公链发送的第二锁定请求。S131. The target parallel chain receives a second lock request sent by the public chain.
S132,目标平行链检测交易目标链是否支持返回交易。S132: The target parallel chain detects whether the transaction target chain supports return transactions.
S133,若交易目标链支持返回交易,则目标平行链向交易目标链转发第二锁定请求。S133. If the transaction target chain supports return transactions, the target parallel chain forwards the second lock request to the transaction target chain.
S134,若交易目标链不支持返回交易,则目标平行链向公链发送失败信息。S134. If the transaction target chain does not support return transactions, the target parallel chain sends a failure message to the public chain.
公链在创建跨链交易后,确定交易目标链需要完成的返回交易,以及根据该返回交易生成第二锁定请求。为了将第二锁定请求发送给交易目标链,公链在自身节点中广播第二锁定请求。由于目标平行链节点也是公链中的节点,因此目标平行链能够接收到第二锁定请求。After the public chain creates the cross-chain transaction, it determines the return transaction that the transaction target chain needs to complete, and generates a second lock request based on the return transaction. In order to send the second lock request to the transaction target chain, the public chain broadcasts the second lock request in its own node. Since the target parachain node is also a node in the public chain, the target parachain can receive the second lock request.
在接收到第二锁定请求后,目标平行链检测交易目标链是否支持返回交易,进一步确保跨链交易能够完成。目标平行链根据第二锁定请求中的交易信息,检测目标节点是否支持交易信息中的交易方式和交易条件。若支持,则目标平行链确定交易目标链支持返回交易;若不支持,则目标平行链确定交易目标链不支持返回交易。After receiving the second lock request, the target parallel chain detects whether the transaction target chain supports return transactions, further ensuring that cross-chain transactions can be completed. The target parallel chain detects whether the target node supports the transaction mode and transaction conditions in the transaction information according to the transaction information in the second lock request. If supported, the target parachain determines that the transaction target chain supports return transactions; if not, the target parachain determines that the transaction target chain does not support return transactions.
示例性地,跨链交易为交易发起链A的证通a兑换交易目标链B的证通b,兑换比例为50:1,且规定兑换100个证通a/2个证通b。那么,返回交易的交易方式为支付证通b,交易条件为支付证通b的数量为2个。交易目标链B的目标节点B1有5个证通b,满***易条件,则目标平行链BC确定交易目标链B支持返回交易。Exemplarily, the cross-chain transaction is the exchange of the Zentong a of the transaction initiation chain A to the Zentong b of the transaction target chain B, with a conversion ratio of 50: 1, and stipulating the exchange of 100 Zhengtong a / 2 Zhengtong b. Then, the transaction method of the return transaction is payment certificate pass b, and the transaction condition is that the number of payment certificate pass b is two. The target node B1 of the transaction target chain B has 5 securities pass b, and if the transaction conditions are met, the target parallel chain BC determines that the transaction target chain B supports return transactions.
若交易目标链支持返回交易,则目标平行链向交易目标链转发第二锁定请求。具体地,目标平行链在交易目标链中广播第二锁定请求。相应地,交易目标链接收到第二锁定请求。If the transaction target chain supports return transactions, the target parallel chain forwards the second lock request to the transaction target chain. Specifically, the target parachain broadcasts a second lock request in the transaction target chain. Accordingly, the transaction target link receives a second lock request.
若交易目标链不支持返回交易,则目标平行链向公链发送失败信息。失败信息用于通知公链跨链交易失败。具体地,目标平行链在公链中广播失败信息。相应地,公链接收失败信息,确定本次跨链交易失败,结束本次跨链交易。其中,失败信息中包括返回交易的交易信息。If the transaction target chain does not support return transactions, the target parallel chain sends a failure message to the public chain. The failure information is used to notify the public chain of cross-chain transaction failure. Specifically, the target parachain broadcasts the failure information in the public chain. Correspondingly, the public chain receives the failure information, determines that the cross-chain transaction has failed, and ends the cross-chain transaction. The failure information includes the transaction information of the returned transaction.
S14,交易目标链完成返回交易,以及锁定返回交易的交易内容。S14. The transaction target chain completes the return transaction and locks the transaction content of the return transaction.
与上述步骤S12中,交易发起链完成服务交易以及锁定服务交易的交易内容的方式相似。交易目标链接收到第二锁定请求,根据其中的交易信息,确定需要完成的返回交易。具体地,交易目标链中的维护者节点完成返回交易,并锁定返回交易的交易内容。目标平行链在交易目标链中广播第二锁定请求,当交易目标链中的维护者节点接收到第二锁定请求后,支付跨链交易中交易目标链需要支付的交易内容,并锁定该交易内容。Similar to the above-mentioned step S12, the manner in which the transaction initiation chain completes the service transaction and locks the transaction content of the service transaction is similar. The transaction target link receives a second lock request, and determines the return transaction that needs to be completed according to the transaction information therein. Specifically, the maintainer node in the transaction target chain completes the return transaction and locks the transaction content of the return transaction. The target parallel chain broadcasts the second lock request in the transaction target chain. When the maintainer node in the transaction target chain receives the second lock request, the transaction content that the transaction target chain needs to pay for in the cross-chain transaction is paid, and the transaction content is locked. .
示例性地,跨链交易为信息服务,交易发起链A向交易目标链B支付50个交易发起链A的证通a,购买交易目标链B提供的天气信息。返回交易是交易目标链B向交易发起链A提供天气信息。交易目标链B中的维护者节点B2根据公链C发送的第二锁 定请求,向交易节点A1在交易目标链B中对应的账户发送目标节点B1提供的天气信息,并锁定该天气信息的数据。Exemplarily, the cross-chain transaction is an information service, and the transaction initiation chain A pays 50 transaction initiation chains A of the transaction initiation chain A to the transaction target chain B to purchase weather information provided by the transaction target chain B. The return transaction is that the transaction target chain B provides weather information to the transaction initiation chain A. The maintainer node B2 in the transaction target chain B sends the weather information provided by the target node B1 to the corresponding account of the transaction node A1 in the transaction target chain B according to the second lock request sent by the public chain C, and locks the data of the weather information .
需要说明的是,上述步骤S11和步骤S12可以在上述步骤S13和步骤S14之前执行,也可以在步骤S13和步骤S14之后执行,还可以与步骤S13和步骤S14同时执行,本申请实施例对此不做限定。It should be noted that the above steps S11 and S12 may be performed before the above steps S13 and S14, or may be performed after the steps S13 and S14, and may also be performed simultaneously with the steps S13 and S14. This embodiment of the present application addresses this No restrictions.
S15,当公链确定服务交易和返回交易都已完成时,指示交易发起链解锁服务交易的交易内容,以及指示交易目标链解锁返回交易的交易内容。S15. When the public chain determines that both the service transaction and the return transaction have been completed, instruct the transaction to initiate the chain to unlock the transaction content of the service transaction, and instruct the transaction target chain to unlock the return transaction.
只有服务交易和返回交易都已完成时,交易发起链和交易目标链才能解锁相应的交易内容,达到抗抵赖的交易效果。但是,交易发起链和交易目标链无法直接进行通信确定对方的交易情况,需要由公链确认双方的交易情况,并指示解锁。公链通过发起平行链和目标平行链分别连接交易发起链和交易目标链。当确定服务交易和返回交易都已完成时,公链可以通过发起平行链和目标平行链,分别指示交易发起链和交易目标链解锁各自的交易内容,完成跨链交易。具体地,对于交易发起链,公链广播第一解锁指令,则发起平行链接收到第一解锁指令,并在交易发起链中广播。当交易发起链中的维护者节点接收到第一解锁指令时,解锁服务交易的交易内容。对于交易目标链,公链广播第二解锁指令,则目标平行链接收到第二解锁指令,并在交易目标链中广播。当交易目标链中的维护者节点接收到第二解锁指令时,解锁返回交易的交易内容。当服务交易和返回交易的交易内容都被解锁时,跨链交易完成。Only when the service transaction and the return transaction have been completed, the transaction initiation chain and the transaction target chain can unlock the corresponding transaction content and achieve the effect of non-repudiation. However, the transaction initiation chain and the transaction target chain cannot directly communicate with each other to determine the transaction status of the other party, and the public chain needs to confirm the transaction status of the two parties and instruct the unlocking. The public chain connects the transaction initiation chain and the transaction target chain by initiating the parachain and the target parachain, respectively. When it is determined that both the service transaction and the return transaction have been completed, the public chain can instruct the transaction initiation chain and the transaction target chain to unlock the respective transaction contents by initiating the parachain and the target parachain, respectively, to complete cross-chain transactions. Specifically, for the transaction initiation chain, the public chain broadcasts the first unlocking instruction, and the initiating parallel link receives the first unlocking instruction and broadcasts it in the transaction initiation chain. When the maintainer node in the transaction initiation chain receives the first unlock instruction, the transaction content of the service transaction is unlocked. For the transaction target chain, the public chain broadcasts the second unlock instruction, and the target parallel link receives the second unlock instruction and broadcasts it in the transaction target chain. When the maintainer node in the transaction target chain receives the second unlock instruction, the transaction content of the returned transaction is unlocked. When the transaction content of the service transaction and the return transaction is unlocked, the cross-chain transaction is completed.
在一种可能的实施方式中,交易发起链完成服务交易后,向发起平行链发送服务完成响应。发起平行链向公链转发服务完成响应,则公链确定服务交易已完成。同样的方式,交易目标链完成返回交易后,交易目标链向目标平行链发送返回完成响应。目标平行链向公链转发返回完成响应,则公链确定返回交易已完成。当公链接收到服务完成响应和返回完成响应后,确定服务交易和返回交易都已完成。In a possible implementation manner, after the transaction initiation chain completes the service transaction, a service completion response is sent to the initiating parallel chain. Initiate the parallel chain to forward the service completion response to the public chain, and the public chain determines that the service transaction has been completed. In the same way, after the transaction target chain completes the return transaction, the transaction target chain sends a return completion response to the target parallel chain. The target parallel chain forwards the return completion response to the public chain, and the public chain determines that the return transaction has been completed. After the public link receives the service completion response and the return completion response, it is determined that the service transaction and the return transaction have been completed.
在本申请实施例提供的方案中,通过公链、发起平行链和目标平行链,在交易发起链和交易目标链之间形成统一有效的沟通通道。利用这种沟通通道,交易发起链和交易目标链进行跨链交易时,能够确定对方是否完成了跨链交易中约定的内容;而且,交易发起链和交易目标链分别锁定服务交易和返回交易的交易内容,在确定对方完成交易时再解锁各自的交易内容,避免由于对方不完成交易带来的损失,达到抗抵赖的交易效果,从而保证跨链交易能够安全完成。In the solution provided by the embodiment of the present application, a unified and effective communication channel is formed between the transaction initiation chain and the transaction target chain through the public chain, the initiation parachain, and the target parachain. Using this communication channel, when the transaction initiation chain and the transaction target chain conduct cross-chain transactions, they can determine whether the other party has completed the agreed content in the cross-chain transaction; in addition, the transaction initiation chain and the transaction target chain lock the service transaction and return transaction respectively. Transaction content, unlock the respective transaction content when the other party is determined to complete the transaction, avoid the losses caused by the other party's incomplete transaction, and achieve the anti-repudiation transaction effect, thereby ensuring that cross-chain transactions can be completed safely.
在上述实施例中,交易发起链和交易目标链都支持对交易内容的锁定。但是,在实际应用中,存在不支持锁定交易内容的区块链网络。对于交易发起链,和/或,交易目标链为不支持锁定交易内容的区块链网络的情况,本申请还提供一种抗抵赖的跨链交易方法。In the above embodiment, both the transaction initiation chain and the transaction target chain support the locking of the transaction content. However, in practical applications, there are blockchain networks that do not support locking transaction content. For the case where the transaction initiation chain and / or the transaction target chain is a blockchain network that does not support locked transaction content, this application also provides a non-repudiation cross-chain transaction method.
参见图4,其示例性地示出了本申请一种抗抵赖的跨链交易方法的流程示意图。该方法包括以下步骤。Referring to FIG. 4, a schematic flowchart of an anti-repudiation cross-chain transaction method according to the present application is exemplarily shown. The method includes the following steps.
S40,公链完成第一转账交易,以及锁定第一转账交易中的公链证通。S40. The public chain completes the first transfer transaction and locks the public chain certificate exchange in the first transfer transaction.
在本申请实施例中,公链创建跨链交易的方法与上述图2实施例中公链创建跨链交易的方法相同。本申请实施例在此不再进行赘述。In the embodiment of the present application, the method for creating a cross-chain transaction by the public chain is the same as the method for creating a cross-chain transaction by the public chain in the embodiment of FIG. 2 described above. The embodiments of the present application are not repeated here.
在创建跨链交易后,公链检测交易发起链中的交易节点和交易目标链中的目标节点,在公链中的对应账户是否有足够数量的公链证通。足够数量的公链证通是指公链证通的价值,大于服务交易或返回交易的交易内容的价值。若是,则公链继续进行跨链交易;若否,则公链确定跨链交易失败,结束本次跨链交易。After the cross-chain transaction is created, the public chain detects whether the transaction nodes in the transaction initiation chain and the target nodes in the transaction target chain have corresponding accounts in the public chain with a sufficient number of public chain certificates. A sufficient number of public chain certificates refers to the value of public chain certificates, which is greater than the value of the transaction content of service transactions or return transactions. If yes, the public chain continues to conduct cross-chain transactions; if not, the public chain determines that the cross-chain transaction has failed and ends the cross-chain transaction.
示例性地,跨链交易为交易发起链A以50个交易发起链A的证通a兑换交易目标链B的证通b。兑换比例为50:1。公链C的证通c与证通A的兑换比例为1:25。证通c与证通B的兑换比例为2:1。那么,公链C检测交易节点A1在公链C中的对应账户是否有不少于2个的证通c,以及目标节点B1在公链C中的对应账户是否有不少于2个的证通c。Exemplarily, the cross-chain transaction is that the transaction initiation chain A exchanges 50 securities initiation chain A's securities communication a for securities transaction b in the transaction target chain B. The conversion ratio is 50: 1. The exchange ratio between Zhengtong c and Zhengtong A of public chain C is 1:25. The exchange ratio between Zhengtong c and Zhengtong B is 2: 1. Then, the public chain C detects whether the corresponding account of the transaction node A1 in the public chain C has at least two securities pass c, and whether the corresponding account of the target node B1 in the public chain C has at least two securities. Pass c.
在检测并确定能够进行跨链交易后,公链发起并完成第一转账交易。第一转账交易为交易目标链向交易发起链支付与服务交易等价的公链证通。具体地,公链中的维护者节点将与服务交易等价的公链证通,由目标节点在公链中的对应账户转账至交易节点在公链中的对应账户。公链完成第一转账交易后,锁定第一转账交易中的公链证通。After detecting and determining that cross-chain transactions are possible, the public chain initiates and completes the first transfer transaction. The first transfer transaction is a public-chain certificate exchange that the transaction target chain pays to the transaction initiation chain and the service transaction is equivalent. Specifically, the maintainer node in the public chain will have a public chain certificate equivalent to the service transaction, and the target node's corresponding account in the public chain will transfer the transaction node's corresponding account in the public chain. After the public chain completes the first transfer transaction, it locks the public chain certificate exchange in the first transfer transaction.
示例性地,跨链交易为交易发起链A以50个交易发起链A的证通a兑换交易目标链B的证通b。兑换比例为50:1。公链C的证通c与证通a的兑换比例为1:25。那么,在创建跨链交易后,公链C中的维护者节点将2个证通c,由目标节点B1在公链C中的对应账户转账至交易节点A1在公链C中的对应账户,并锁定上述2个证通c。Exemplarily, the cross-chain transaction is that the transaction initiation chain A exchanges 50 securities initiation chain A's securities communication a for securities transaction b in the transaction target chain B. The conversion ratio is 50: 1. The exchange ratio of Zhengtong c and Zhengtong a of public chain C is 1:25. Then, after the cross-chain transaction is created, the maintainer node in the public chain C will transfer the two tokens c from the corresponding account of the target node B1 in the public chain C to the corresponding account of the transaction node A1 in the public chain C. And lock the above two Zhengtong c.
S41,发起平行链接收公链发送的服务交易请求,以及根据服务交易请求发起服务交易。S41. Initiate a parallel chain to receive a service transaction request sent by a public chain, and initiate a service transaction according to the service transaction request.
公链在完成第一转账交易后,向发起平行链发送服务交易请求,以请求发起平行链发起服务交易。因此,服务交易请求中包括服务交易的交易信息。发起平行链根据服务交易请求,向交易发起链发起服务交易。具体地,公链在自身节点中广播服务交易请求。相应地,发起平行链接收到服务交易请求。发起平行链根据服务交易的交易信息,发起服务交易,即在交易发起链中广播服务交易。After the public chain completes the first transfer transaction, it sends a service transaction request to the initiating parallel chain to request the initiation of a parallel chain to initiate a service transaction. Therefore, the service transaction request includes transaction information of the service transaction. The initiating parallel chain initiates a service transaction to the transaction initiating chain according to the service transaction request. Specifically, the public chain broadcasts a service transaction request in its own node. Accordingly, a parallel link is initiated to receive a service transaction request. Initiating a parallel chain initiates a service transaction according to the transaction information of the service transaction, that is, broadcasting a service transaction in the transaction initiation chain.
S42,交易发起链完成服务交易。S42. The transaction initiation chain completes the service transaction.
交易发起链接收到发起平行链发起的服务交易,并完成该服务交易。具体地,交易发起链中的维护者节点接收发起平行链在交易发起链中广播的服务交易,支付跨链交易中交易发起链需要支付的交易内容,完成服务交易,并在生成的区块中进行记录。The transaction initiation link receives the service transaction initiated by the initiating parachain and completes the service transaction. Specifically, the maintainer node in the transaction initiation chain receives service transactions that are initiated by the parallel chain in the transaction initiation chain, pays for the transaction content that the transaction initiation chain needs to pay for in the cross-chain transaction, completes the service transaction, and in the generated block Make a record.
S43,当发起平行链确定服务交易已完成时,指示公链解锁第一转账交易中的公链证通。S43. When the initiation of the parallel chain determines that the service transaction has been completed, the public chain is instructed to unlock the public chain token exchange in the first transfer transaction.
交易发起链在完成服务交易后,会在生成的区块中记录已完成的服务交易,并将该区块添加至区块链中。由于发起平行链节点也是交易发起链中的节点,因此,在交易发起链同步区块链时,发起平行链也能获取记录有服务交易的区块链,并同步到自身的平行链区块链中。发起平行链检测服务交易是否记录在自身的区块链中;若检测到服务交易记录在自身的区块链中,则确定服务交易已完成;若没有检测到服务交易记录在自身的区块链中,则确定服务交易尚未完成。After the transaction initiation chain completes the service transaction, it will record the completed service transaction in the generated block and add the block to the blockchain. Since the initiating parachain node is also a node in the transaction initiation chain, when the transaction initiation chain synchronizes the blockchain, the initiating parachain can also obtain the blockchain that records the service transaction and synchronize to its own parachain blockchain in. Initiate a parallel chain to check whether the service transaction is recorded in its own blockchain; if it detects that the service transaction is recorded in its own blockchain, it is determined that the service transaction has been completed; if the service transaction is not detected in its own blockchain , It is determined that the service transaction has not been completed.
发起平行链可以向公链发送第三解锁指令,以指示公链解锁第一转账交易中的公链证通。具体地,发起平行链在公链中广播第三解锁指令,相应地,公链中的维护者 节点接收到第三解锁指令,确定服务交易已完成,进而解锁第一转账交易中的公链证通。The initiating parachain can send a third unlocking instruction to the public chain to instruct the public chain to unlock the public chain token exchange in the first transfer transaction. Specifically, a parallel chain is initiated to broadcast a third unlocking instruction in the public chain. Accordingly, the maintainer node in the public chain receives the third unlocking instruction, determines that the service transaction has been completed, and then unlocks the public chain certificate in the first transfer transaction. through.
S44,公链完成第二转账交易,以及锁定第二转账交易中的公链证通。S44. The public chain completes the second transfer transaction and locks the public chain certificate exchange in the second transfer transaction.
在检测并确定能够进行跨链交易后,公链发起并完成第二转账交易。第二转账交易为交易发起链向交易目标链支付与返回交易等价的公链证通。具体地,公链中的维护者节点将与返回交易等价的公链证通,由交易节点在公链中的对应账户转账至目标节点在公链中的对应账户。公链完成第二转账交易后,锁定第二转账交易中的公链证通。After detecting and determining that cross-chain transactions are possible, the public chain initiates and completes the second transfer transaction. The second transfer transaction is a public chain certificate transaction that is equivalent to the transaction initiation chain paying to the transaction target chain and returning the transaction. Specifically, the maintainer node in the public chain will be equivalent to the public chain certificate of the return transaction, and the corresponding account of the transaction node in the public chain is transferred to the corresponding account of the target node in the public chain. After the public chain completes the second transfer transaction, it locks the public chain certificate exchange in the second transfer transaction.
示例性地,跨链交易为交易发起链A以50个交易发起链A的证通a兑换交易目标链B的证通b。兑换比例为50:1。公链C的证通c与证通b的兑换比例为2:1。那么,在创建跨链交易后,公链C中的维护者节点将2个证通c,由交易节点A1在公链C中的对应账户转账至目标节点B1在公链C中的对应账户,并锁定上述2个证通c。Exemplarily, the cross-chain transaction is that the transaction initiation chain A exchanges 50 securities initiation chain A's securities communication a for securities transaction b in the transaction target chain B. The conversion ratio is 50: 1. The exchange ratio of Zhengtong c and Zhengtong b of public chain C is 2: 1. Then, after the cross-chain transaction is created, the maintainer node in the public chain C will transfer the two tokens c from the corresponding account of the transaction node A1 in public chain C to the corresponding account of the target node B1 in public chain C. And lock the above two Zhengtong c.
S45,目标平行链接收公链发送的返回交易请求,以及根据服务交易请求发起返回交易。S45. The target parallel chain receives a return transaction request sent by the public chain, and initiates a return transaction according to the service transaction request.
公链在完成第二转账交易后,向目标平行链发送返回交易请求,以请求目标平行链发起返回交易。因此,返回交易请求中包括返回交易的交易信息。目标平行链根据返回交易请求,向交易目标链发起返回交易。具体地,公链在自身节点中广播返回交易请求。相应地,目标平行链接收到返回交易请求。目标平行链根据返回交易的交易信息,发起返回交易即在交易目标链中广播返回交易。After the public chain completes the second transfer transaction, it sends a return transaction request to the target parallel chain to request the target parallel chain to initiate a return transaction. Therefore, the return transaction request includes the transaction information of the return transaction. The target parallel chain initiates a return transaction to the transaction target chain according to the return transaction request. Specifically, the public chain broadcasts a return transaction request in its own node. Accordingly, the target parallel link receives a return transaction request. The target parallel chain initiates a return transaction according to the transaction information of the return transaction, that is, broadcasts the return transaction in the transaction target chain.
S46,交易目标链完成返回交易。S46. The transaction target chain completes the return transaction.
交易目标链接收到目标平行链发起的返回交易,并完成该返回交易。具体地,交易目标链中的维护者节点接收目标平行链在交易目标链中广播的返回交易,支付跨链交易中交易目标链需要支付的交易内容,完成返回交易,并在生成的区块中进行记录。The transaction target link receives the return transaction initiated by the target parachain and completes the return transaction. Specifically, the maintainer node in the transaction target chain receives the return transaction broadcast by the target parallel chain in the transaction target chain, pays for the transaction content that the transaction target chain needs to pay in the cross-chain transaction, completes the return transaction, and in the generated block Make a record.
S47,当目标平行链确定返回交易已完成时,指示公链解锁第二转账交易中的公链证通。S47. When the target parallel chain determines that the return transaction has been completed, instruct the public chain to unlock the public chain certificate pass in the second transfer transaction.
交易目标链在完成返回交易后,会在生成的区块中记录已完成的返回交易,并将该区块添加至区块链中。由于目标平行链节点也是交易目标链中的节点,因此,在交易目标链同步区块链时,目标平行链也能获取记录有返回交易的区块链,并同步到自身的平行链区块链中。目标平行链检测返回交易是否记录在自身的区块链中;若检测到返回交易记录在自身的区块链中,则确定返回交易已完成;若没有检测到返回交易记录在自身的区块链中,则确定返回交易尚未完成。After the transaction target chain completes the return transaction, it will record the completed return transaction in the generated block and add the block to the blockchain. Since the target parachain node is also a node in the transaction target chain, when the transaction target chain synchronizes the blockchain, the target parachain can also obtain the blockchain that records the return transaction and synchronize to its own parallel chain blockchain in. The target parallel chain detects whether the return transaction is recorded in its own blockchain; if it detects that the return transaction is recorded in its own blockchain, it determines that the return transaction is complete; if it does not detect that the return transaction is recorded in its own blockchain , It is determined that the return transaction has not been completed.
目标平行链可以向公链发送第四解锁指令,以指示公链解锁第二转账交易中的公链证通。具体地,目标平行链在公链中广播第四解锁指令,相应地,公链中的维护者节点接收到第四解锁指令,确定返回交易已完成,进而解锁第二转账交易中的公链证通。The target parallel chain may send a fourth unlock instruction to the public chain to instruct the public chain to unlock the public chain token exchange in the second transfer transaction. Specifically, the target parallel chain broadcasts the fourth unlocking instruction in the public chain. Accordingly, the maintainer node in the public chain receives the fourth unlocking instruction and determines that the return transaction has been completed, thereby unlocking the public chain certificate in the second transfer transaction through.
需要说明的是,上述步骤S40至步骤S43,可以在步骤S40至步骤S43之前执行,也可以在步骤S40至步骤S43之后执行,还可以和步骤S40至步骤S43同时执行,本申请实施例对此不做限定。It should be noted that the above steps S40 to S43 may be performed before steps S40 to S43, or may be performed after steps S40 to S43, and may also be performed simultaneously with steps S40 to S43. This embodiment of the present application addresses this issue. No restrictions.
第一转账交易和第二转账交易中的公链证通都被公链解锁,表明交易目标链和交 易发起链之间的跨链交易完成。The public chain certificate in the first transfer transaction and the second transfer transaction were both unlocked by the public chain, indicating that the cross-chain transaction between the transaction target chain and the transaction initiation chain was completed.
在本申请实施例中,公链完成第一转账交易,并锁定交易中的公链证通。该公链证通的解锁条件为服务交易完成。公链以此保证在服务交易完成的情况下,交易发起链能够获得与服务交易等价的证通。即使交易目标链没有完成返回交易,交易发起链也没有损失。同样的,对应交易目标链,公链完成第二转账交易、锁定交易中的公链证通、在服务交易完成后解锁,以此保证在返回交易完成的情况下,交易目标链能够获得与返回交易等价的证通。因此,交易发起链和交易目标链能够避免由于对方不完成交易带来的损失,达到抗抵赖的交易效果,从而保证跨链交易能够安全完成。In the embodiment of the present application, the public chain completes the first transfer transaction and locks the public chain certificate exchange in the transaction. The unlock condition of the public chain certificate pass is that the service transaction is completed. The public chain thus ensures that the transaction initiation chain can obtain a certificate equivalent to the service transaction when the service transaction is completed. Even if the transaction target chain does not complete the return transaction, there is no loss in the transaction initiation chain. Similarly, corresponding to the transaction target chain, the public chain completes the second transfer transaction, locks the public chain certificate pass in the transaction, and unlocks after the service transaction is completed, so as to ensure that the transaction target chain can obtain and return in the case that the return transaction is completed. Transaction Equivalent. Therefore, the transaction initiation chain and the transaction target chain can avoid losses caused by the other party's incomplete transaction, and achieve non-repudiation transaction effects, thereby ensuring that cross-chain transactions can be completed safely.
本申请还提供一种区块链***,该区块链***可用于实现上述方法示例中的跨链交易方法。该区块链***包括:交易发起链、发起平行链、交易目标链、目标平行链和公链;所述发起平行链由所述交易发起链和所述公链的共有节点组成,所述目标平行链由所述目标发起链和所述公链的共有节点组成;This application also provides a blockchain system, which can be used to implement the cross-chain transaction method in the above method examples. The blockchain system includes: a transaction initiation chain, an initiation parachain, a transaction target chain, a target parachain, and a public chain; the initiation parachain is composed of a common node of the transaction initiation chain and the public chain, and the target The parallel chain is composed of a common node of the target initiation chain and the public chain;
所述公链,用于创建跨链交易,所述跨链交易包括:交易发起链需要完成的服务交易和交易目标链需要完成的返回交易;The public chain is used to create cross-chain transactions, and the cross-chain transactions include: service transactions that need to be completed by the transaction initiation chain and return transactions that need to be completed by the transaction target chain;
所述发起平行链,用于向所述交易发起链转发所述公链发送的第一锁定请求,所述第一锁定请求包括所述服务交易的交易信息;The initiating parallel chain is configured to forward the first lock request sent by the public chain to the transaction initiation chain, where the first lock request includes transaction information of the service transaction;
所述交易发起链,用于根据所述第一锁定请求完成所述服务交易,并锁定所述服务交易的交易内容;The transaction initiation chain is configured to complete the service transaction according to the first lock request, and lock the transaction content of the service transaction;
所述目标平行链,用于向所述交易目标链转发所述公链发送的第二锁定请求,所述第二锁定请求包括所述返回交易的交易信息;The target parallel chain is configured to forward a second lock request sent by the public chain to the transaction target chain, where the second lock request includes transaction information of the returned transaction;
所述交易目标链,用于根据所述第二锁定请求完成所述返回交易,并锁定所述返回交易的交易内容;The transaction target chain is configured to complete the return transaction according to the second lock request, and lock the transaction content of the return transaction;
所述公链,还用于当确定所述服务交易和所述返回交易都已完成时,指示所述交易发起链解锁所述服务交易的交易内容,以及指示所述交易目标链解锁所述返回交易的交易内容。The public chain is further configured to instruct the transaction initiation chain to unlock the transaction content of the service transaction when it is determined that both the service transaction and the return transaction have been completed, and instruct the transaction target chain to unlock the return The transaction content of the transaction.
本申请提供的区块链***中,通过公链、发起平行链和目标平行链,在交易发起链和交易目标链之间形成统一有效的沟通通道。利用这种沟通通道,交易发起链和交易目标链进行跨链交易时,能够确定对方是否完成了跨链交易中约定的内容;而且,交易发起链和交易目标链分别锁定服务交易和返回交易的交易内容,在确定对方完成交易时再解锁各自的交易内容,避免由于对方不完成交易带来的损失,达到抗抵赖的交易效果,从而保证跨链交易能够安全完成。In the blockchain system provided by this application, a unified and effective communication channel is formed between the transaction initiation chain and the transaction target chain through the public chain, the initiation parachain, and the target parachain. Using this communication channel, when the transaction initiation chain and the transaction target chain conduct cross-chain transactions, they can determine whether the other party has completed the agreed content in the cross-chain transaction; in addition, the transaction initiation chain and the transaction target chain lock the service transaction and return transaction respectively. Transaction content, unlock the respective transaction content when the other party is determined to complete the transaction, avoid the losses caused by the other party's incomplete transaction, and achieve the anti-repudiation transaction effect, thereby ensuring that cross-chain transactions can be completed safely.
本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本发明实施例中的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。Those skilled in the art can clearly understand that the technology in the embodiment of the present invention can be implemented by means of software plus a necessary universal hardware platform. Based on such an understanding, the technical solutions in the embodiments of the present invention can be embodied in the form of software products that are essentially or contribute to the existing technology. The computer software product can be stored in a storage medium, such as ROM / RAM. , Magnetic disks, optical disks, etc., including a number of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention or certain parts of the embodiments.
本说明书中各个实施例之间相同相似的部分互相参见即可。此外,在本申请的描述中,除非另有说明,“多个”是指两个或多于两个。另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。The same or similar parts among the various embodiments in this specification may refer to each other. Furthermore, in the description of this application, unless stated otherwise, "plurality" means two or more. In addition, in order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as “first” and “second” are used to distinguish between the same or similar items having substantially the same functions and functions. Those skilled in the art can understand that the words "first", "second" and the like do not limit the number and execution order, and the words "first" and "second" are not necessarily different.
以上所述的本申请实施方式并不构成对本申请保护范围的限定。The embodiments of the present application described above do not constitute a limitation on the protection scope of the present application.

Claims (8)

  1. 一种抗抵赖的跨链交易方法,其特征在于,所述方法包括:A non-repudiation cross-chain transaction method is characterized in that the method includes:
    公链创建跨链交易,所述跨链交易包括:交易发起链需要完成的服务交易和交易目标链需要完成的返回交易;The public chain creates cross-chain transactions, which include: service transactions that need to be completed by the transaction initiation chain and return transactions that need to be completed by the transaction target chain;
    所述发起平行链向所述交易发起链转发所述公链发送的第一锁定请求,所述第一锁定请求包括所述服务交易的交易信息;Forwarding, by the initiating parallel chain, the first lock request sent by the public chain to the transaction initiation chain, where the first lock request includes transaction information of the service transaction;
    所述交易发起链根据所述第一锁定请求完成所述服务交易,并锁定所述服务交易的交易内容;The transaction initiation chain completes the service transaction according to the first lock request, and locks the transaction content of the service transaction;
    所述目标平行链向所述交易目标链转发所述公链发送的第二锁定请求,所述第二锁定请求包括所述返回交易的交易信息;Forwarding, by the target parallel chain, a second lock request sent by the public chain to the transaction target chain, the second lock request including transaction information of the returned transaction;
    所述交易目标链根据所述第二锁定请求完成所述返回交易,并锁定所述返回交易的交易内容;The transaction target chain completes the return transaction according to the second lock request, and locks the transaction content of the return transaction;
    当确定所述服务交易和所述返回交易都已完成时,所述公链指示所述交易发起链解锁所述服务交易的交易内容,以及指示所述交易目标链解锁所述返回交易的交易内容。When it is determined that both the service transaction and the return transaction have been completed, the public chain instructs the transaction initiation chain to unlock the transaction content of the service transaction, and instructs the transaction target chain to unlock the transaction content of the return transaction. .
  2. 根据权利要求1所述的方法,其特征在于,The method according to claim 1, wherein:
    所述发起平行链向所述交易发起链转发所述公链发送的第一锁定请求,包括:The forwarding of the first lock request sent by the public chain to the transaction initiation chain by the initiating parallel chain includes:
    接收所述公链根据所述跨链交易发送的所述第一锁定请求;Receiving the first lock request sent by the public chain according to the cross-chain transaction;
    所述发起平行链根据所述服务交易的交易信息,检测所述交易发起链是否支持所述服务交易;The initiating parallel chain detects whether the service initiating chain supports the service transaction according to the transaction information of the service transaction;
    当确定所述交易发起链支持所述服务交易时,所述发起平行链向所述交易发起链转发所述第一锁定请求;When it is determined that the transaction initiation chain supports the service transaction, the initiating parallel chain forwards the first lock request to the transaction initiation chain;
    所述目标平行链向所述交易目标链转发所述公链发送的第二锁定请求,包括:The forwarding, by the target parallel chain, the second lock request sent by the public chain to the transaction target chain includes:
    接收所述公链根据所述跨链交易发送的所述第二锁定请求;Receiving the second lock request sent by the public chain according to the cross-chain transaction;
    所述目标平行链根据所述返回交易的交易信息,检测所述交易目标链是否支持所述返回交易;Detecting, by the target parallel chain, whether the return target transaction supports the return transaction according to the transaction information of the return transaction;
    当确定所述交易目标链支持所述返回交易时,所述目标平行链向所述交易目标链转发所述第二锁定请求。When it is determined that the transaction target chain supports the return transaction, the target parachain forwards the second lock request to the transaction target chain.
  3. 根据权利要求2所述的方法,其特征在于,The method according to claim 2, wherein:
    所述检测所述交易发起链是否支持所述服务交易之后,还包括:After detecting whether the service initiation chain supports the service transaction, the method further includes:
    当确定所述交易发起链不支持所述服务交易时,所述发起平行链向所述公链发送失败信息,所述失败信息用于通知所述公链所述跨链交易失败;When it is determined that the transaction initiation chain does not support the service transaction, the initiating parallel chain sends failure information to the public chain, and the failure information is used to notify the public chain that the cross-chain transaction fails;
    所述检测所述交易目标链是否支持所述返回交易之后,还包括:After detecting whether the transaction target chain supports the return transaction, the method further includes:
    当确定所述交易目标链不支持所述返回交易时,所述目标平行链向所述公链发送所述失败信息。When it is determined that the transaction target chain does not support the return transaction, the target parachain sends the failure information to the public chain.
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    当完成所述服务交易时,所述交易发起链向所述发起平行链发送服务完成响应;When the service transaction is completed, the transaction initiation chain sends a service completion response to the initiating parallel chain;
    所述发起平行链向所述公链转发所述服务完成响应;The initiating parallel chain forwards the service completion response to the public chain;
    当完成所述返回交易时,所述交易目标链向所述目标平行链发送返回完成响应;When the return transaction is completed, the transaction target chain sends a return completion response to the target parallel chain;
    所述目标平行链向所述公链转发所述返回完成响应;Forwarding, by the target parallel chain, the return completion response to the public chain;
    若公链接收到所述服务完成响应和所述返回完成响应,则确定所述服务交易和所述返回交易都已完成。If the public link receives the service completion response and the return completion response, it is determined that both the service transaction and the return transaction have been completed.
  5. 根据权利要求1所述的方法,其特征在于,当所述交易发起链,和/或,所述交易目标链不支持锁定交易内容的功能时,所述方法还包括:The method according to claim 1, wherein when the transaction initiation chain and / or the transaction target chain does not support the function of locking transaction content, the method further comprises:
    所述公链根据所述跨链交易,完成第一转账交易,以及锁定所述第一转账交易中的公链证通,所述第一转账交易为所述交易目标链向所述交易发起链支付与所述服务交易等价的公链证通;The public chain completes the first transfer transaction according to the cross-chain transaction, and locks the public chain certificate exchange in the first transfer transaction. The first transfer transaction is the transaction target chain to the transaction initiation chain. Payment of a public chain certificate equivalent to the service transaction;
    发起平行链接收所述公链发送的服务交易请求,以及根据所述服务交易请求向所述交易发起链发起所述服务交易;Initiating a parallel chain to receive a service transaction request sent by the public chain, and initiating the service transaction to the transaction initiation chain according to the service transaction request;
    所述交易发起链完成所述服务交易;The transaction initiation chain completes the service transaction;
    当所述发起平行链确定所述服务交易已完成时,指示所述公链解锁所述第一转账交易中的公链证通;When the initiating parallel chain determines that the service transaction has been completed, instructing the public chain to unlock the public chain token exchange in the first transfer transaction;
    所述公链根据所述跨链交易,发起第二转账交易,以及锁定所述第二转账交易中的公链证通,所述第二转账交易为所述交易发起链向所述交易目标链支付与所述返回交易等价的公链证通;The public chain initiates a second transfer transaction according to the cross-chain transaction, and locks the public chain certificate exchange in the second transfer transaction. The second transfer transaction is the transaction initiation chain to the transaction target chain. Pay a public chain certificate equivalent to the return transaction;
    目标平行链接收所述公链发送的返回交易请求,以及根据所述返回交易请求向所述交易目标链发起所述返回交易;The target parallel chain receives a return transaction request sent by the public chain, and initiates the return transaction to the transaction target chain according to the return transaction request;
    所述交易目标链完成所述返回交易;The transaction target chain completes the return transaction;
    当所述目标平行链确定所述返回交易已完成时,指示所述公链解锁所述第二转账交易中的公链证通。When the target parallel chain determines that the return transaction has been completed, instruct the public chain to unlock the public chain token exchange in the second transfer transaction.
  6. 根据权利要求5所述的方法,其特征在于,The method according to claim 5, wherein:
    所述指示所述公链解锁所述第一转账交易中的公链证通之前,还包括:Before the instructing the public chain to unlock the public chain certificate pass in the first transfer transaction, the method further includes:
    所述发起平行链检测所述服务交易是否记录在自身的区块链中;The initiating a parallel chain to detect whether the service transaction is recorded in its own blockchain;
    若检测到所述服务交易记录在自身的区块链中,则确定所述服务交易已完成;If it is detected that the service transaction is recorded in its own blockchain, it is determined that the service transaction has been completed;
    所述指示所述公链解锁所述第二转账交易中的公链证通之前,还包括:Before instructing the public chain to unlock the public chain certificate pass in the second transfer transaction, the method further includes:
    所述目标平行链检测所述返回交易是否记录在自身的区块链中;Detecting, by the target parachain, whether the return transaction is recorded in its own blockchain;
    若检测到所述返回交易记录在自身的区块链中,则确定所述返回交易已完成。If the return transaction is detected in its own blockchain, it is determined that the return transaction has been completed.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述公链创建跨链交易,包括:The method according to any one of claims 1-6, wherein the creation of a cross-chain transaction by the public chain comprises:
    所述公链接收所述交易发起链发送的跨链交易请求,所述跨链交易请求中包括:所述跨链交易的交易内容,以及所述交易发起链和所述交易目标链的地址信息;The public chain receives a cross-chain transaction request sent by the transaction initiation chain. The cross-chain transaction request includes: the transaction content of the cross-chain transaction, and address information of the transaction initiation chain and the transaction target chain. ;
    根据所述跨链交易请求,创建所述跨链交易。Creating the cross-chain transaction according to the cross-chain transaction request.
  8. 一种区块链***,其特征在于,所述区块链***包括:交易发起链、发起平行链、交易目标链、目标平行链和公链;所述发起平行链由所述交易发起链和所述公链的共有节点组成,所述目标平行链由所述目标发起链和所述公链的共有节点组成;A blockchain system, characterized in that the blockchain system comprises: a transaction initiation chain, an initiation parachain, a transaction target chain, a target parachain and a public chain; the initiation parallel chain is composed of the transaction initiation chain and The public node is composed of common nodes, and the target parachain is composed of the target initiation chain and the public node of the public chain;
    所述公链,用于创建跨链交易,所述跨链交易包括:交易发起链需要完成的服务交易和交易目标链需要完成的返回交易;The public chain is used to create cross-chain transactions, and the cross-chain transactions include: service transactions that need to be completed by the transaction initiation chain and return transactions that need to be completed by the transaction target chain;
    所述发起平行链,用于向所述交易发起链转发所述公链发送的第一锁定请求,所述第一锁定请求包括所述服务交易的交易信息;The initiating parallel chain is configured to forward the first lock request sent by the public chain to the transaction initiation chain, where the first lock request includes transaction information of the service transaction;
    所述交易发起链,用于根据所述第一锁定请求完成所述服务交易,并锁定所述服务交易的交易内容;The transaction initiation chain is configured to complete the service transaction according to the first lock request, and lock the transaction content of the service transaction;
    所述目标平行链,用于向所述交易目标链转发所述公链发送的第二锁定请求,所述第二锁定请求包括所述返回交易的交易信息;The target parallel chain is configured to forward a second lock request sent by the public chain to the transaction target chain, where the second lock request includes transaction information of the returned transaction;
    所述交易目标链,用于根据所述第二锁定请求完成所述返回交易,并锁定所述返回交易的交易内容;The transaction target chain is configured to complete the return transaction according to the second lock request, and lock the transaction content of the return transaction;
    所述公链,还用于当确定所述服务交易和所述返回交易都已完成时,指示所述交易发起链解锁所述服务交易的交易内容,以及指示所述交易目标链解锁所述返回交易的交易内容。The public chain is further configured to instruct the transaction initiation chain to unlock the transaction content of the service transaction when it is determined that both the service transaction and the return transaction have been completed, and instruct the transaction target chain to unlock the return The transaction content of the transaction.
PCT/CN2019/101053 2018-08-28 2019-08-16 Non-repudiation cross-chain transaction method and blockchain system WO2020042934A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201810986825.3 2018-08-28
CN201810986825 2018-08-28
CN201811497995.1A CN110866750B (en) 2018-08-28 2018-12-07 Anti-repudiation cross-chain transaction method and block chain system
CN201811497995.1 2018-12-07

Publications (1)

Publication Number Publication Date
WO2020042934A1 true WO2020042934A1 (en) 2020-03-05

Family

ID=69645011

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/101053 WO2020042934A1 (en) 2018-08-28 2019-08-16 Non-repudiation cross-chain transaction method and blockchain system

Country Status (1)

Country Link
WO (1) WO2020042934A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111640017A (en) * 2020-05-06 2020-09-08 深圳前海微众银行股份有限公司 Transaction correctness verification method and device applied to alliance chain cross-chain transfer
CN111666325A (en) * 2020-05-18 2020-09-15 国网浙江省电力有限公司信息通信分公司 Validity verification method for cross-link port calling
CN111798238A (en) * 2020-07-03 2020-10-20 杭州复杂美科技有限公司 Parallel chain consensus method, device and storage medium
CN111798316A (en) * 2020-07-03 2020-10-20 杭州复杂美科技有限公司 Parallel chain consensus method, device and storage medium
CN112053146A (en) * 2020-08-24 2020-12-08 杭州云象网络技术有限公司 Cross-chain reward and punishment method based on anonymous service and Hash locking
CN112508566A (en) * 2020-12-01 2021-03-16 浙商银行股份有限公司 Alliance chain-based cross-chain private transaction method and equipment
CN112508563A (en) * 2020-12-01 2021-03-16 浙商银行股份有限公司 Cross-chain transaction credibility verification method and device and computer equipment
US20210342940A1 (en) * 2020-08-31 2021-11-04 Polymath Inc. Method, system, and medium for blockchain-enabled atomic settlement

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107085810A (en) * 2017-04-19 2017-08-22 朱皞罡 Across the chain operating method and block chain management system of a kind of block chain
CN107301600A (en) * 2017-06-23 2017-10-27 北京天德科技有限公司 A kind of core algorithm for the block chain the Internet model merchandised across chain
US20170352219A1 (en) * 2015-08-06 2017-12-07 Blockchain Technologies Corporation System and method for securely receiving and counting votes in an election
CN107742210A (en) * 2017-10-13 2018-02-27 布比(北京)网络技术有限公司 Across the chain fund transfer system and method for a kind of different blocks interchain

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170352219A1 (en) * 2015-08-06 2017-12-07 Blockchain Technologies Corporation System and method for securely receiving and counting votes in an election
CN107085810A (en) * 2017-04-19 2017-08-22 朱皞罡 Across the chain operating method and block chain management system of a kind of block chain
CN107301600A (en) * 2017-06-23 2017-10-27 北京天德科技有限公司 A kind of core algorithm for the block chain the Internet model merchandised across chain
CN107742210A (en) * 2017-10-13 2018-02-27 布比(北京)网络技术有限公司 Across the chain fund transfer system and method for a kind of different blocks interchain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
BAI, LIE ET AL.: "Model Publication and Deployment Technologies Research", INFORMATION TECHNOLOGY AND NETWORK SECURITY, vol. 37, no. 8, 10 August 2018 (2018-08-10), pages 13 - 17 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111640017A (en) * 2020-05-06 2020-09-08 深圳前海微众银行股份有限公司 Transaction correctness verification method and device applied to alliance chain cross-chain transfer
CN111640017B (en) * 2020-05-06 2024-05-28 深圳前海微众银行股份有限公司 Transaction correctness verification method and device applied to alliance chain cross-chain transfer
CN111666325A (en) * 2020-05-18 2020-09-15 国网浙江省电力有限公司信息通信分公司 Validity verification method for cross-link port calling
CN111666325B (en) * 2020-05-18 2024-04-19 国网浙江省电力有限公司 Cross-link-port calling validity verification method
CN111798316B (en) * 2020-07-03 2023-11-28 杭州复杂美科技有限公司 Parallel chain consensus method, apparatus and storage medium
CN111798238B (en) * 2020-07-03 2023-11-24 杭州复杂美科技有限公司 Parallel chain consensus method, apparatus and storage medium
CN111798316A (en) * 2020-07-03 2020-10-20 杭州复杂美科技有限公司 Parallel chain consensus method, device and storage medium
CN111798238A (en) * 2020-07-03 2020-10-20 杭州复杂美科技有限公司 Parallel chain consensus method, device and storage medium
CN112053146A (en) * 2020-08-24 2020-12-08 杭州云象网络技术有限公司 Cross-chain reward and punishment method based on anonymous service and Hash locking
US20210342940A1 (en) * 2020-08-31 2021-11-04 Polymath Inc. Method, system, and medium for blockchain-enabled atomic settlement
CN112508566A (en) * 2020-12-01 2021-03-16 浙商银行股份有限公司 Alliance chain-based cross-chain private transaction method and equipment
CN112508563A (en) * 2020-12-01 2021-03-16 浙商银行股份有限公司 Cross-chain transaction credibility verification method and device and computer equipment
CN112508566B (en) * 2020-12-01 2024-04-05 浙商银行股份有限公司 Cross-link privacy transaction method and device based on alliance links

Similar Documents

Publication Publication Date Title
WO2020042934A1 (en) Non-repudiation cross-chain transaction method and blockchain system
CN110866750B (en) Anti-repudiation cross-chain transaction method and block chain system
WO2020258848A1 (en) Method and apparatus for cross-chain transmission of resources
TWI724391B (en) Node management method and device based on blockchain
WO2020258846A1 (en) Method and apparatus for sending certifiable messages across chains
KR20200100773A (en) Method and apparatus for cross ledger transmission between distributed ledgers and systems using cross ledger transmission
WO2020173500A1 (en) Public chain-based sub-chain business system
US11526875B1 (en) Bank-driven model for preventing double spending of digital currency coexisting on multiple DLT networks
CN110458709B (en) Resource transfer information transmission method and device, storage medium and electronic device
CN113850599B (en) Cross-link transaction method and system applied to alliance link
WO2021184878A1 (en) Node management method for block chain system, node, and computational device
CN112837023A (en) Business collaboration platform, method and device of organization and electronic equipment
WO2020042929A1 (en) Block chain system
KR20200086402A (en) Block chain system and method thereof
WO2020042936A1 (en) Parallel chain-based cross-chain transaction method and apparatus, and block chain system
CN110784324B (en) Node admission method and device
NL2026796B1 (en) Parallel chain-based cross-chain transaction method, device, and blockchain system
NL2026568B1 (en) Non-repudiation cross-chain transaction method and blockchain system
US11983705B1 (en) Bank-driven model for preventing double spending of digital currency transferred between multiple DLT networks using a trusted intermediary
WO2023019903A1 (en) Cross-chain transaction system and method, and device and storage medium
WO2023082883A1 (en) Cross-blockchain transaction processing method and apparatus, and computer device, computer storage medium and computer program product
WO2023045532A1 (en) Blockchain-based transaction processing
WO2020042930A1 (en) Parallel-chain-based transaction method and blockchain system
KR20200020326A (en) Electronic payment system for protection of double spending and payment method therefor
WO2020042931A1 (en) Public chain-based transaction method and blockchain system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19853781

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19853781

Country of ref document: EP

Kind code of ref document: A1