WO2021017693A1 - 平行链资产转移方法、设备和存储介质 - Google Patents

平行链资产转移方法、设备和存储介质 Download PDF

Info

Publication number
WO2021017693A1
WO2021017693A1 PCT/CN2020/097846 CN2020097846W WO2021017693A1 WO 2021017693 A1 WO2021017693 A1 WO 2021017693A1 CN 2020097846 W CN2020097846 W CN 2020097846W WO 2021017693 A1 WO2021017693 A1 WO 2021017693A1
Authority
WO
WIPO (PCT)
Prior art keywords
parachain
transaction
consensus
main chain
asset
Prior art date
Application number
PCT/CN2020/097846
Other languages
English (en)
French (fr)
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
Application filed by 杭州复杂美科技有限公司 filed Critical 杭州复杂美科技有限公司
Publication of WO2021017693A1 publication Critical patent/WO2021017693A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Definitions

  • This application relates to the field of blockchain technology, and in particular to a method, equipment and storage medium for transferring parachain assets.
  • the parachain synchronizes transactions from the main chain, and uses the consensus of the main chain to carry out the parachain consensus.
  • the present invention provides a parachain asset transfer method suitable for main chain nodes, including:
  • Each node of the first parachain synchronizes, packs, and executes the first transaction to deduct the first asset to be transferred in the account of the first parachain of the first user;
  • Each consensus node of the first parachain generates a first consensus transaction and sends it to the corresponding main chain node; wherein, the first consensus transaction includes the execution result of the first transaction;
  • the nodes of the second parachain separately synchronize, package and execute the second transaction to add the first asset in the account of the second parachain of the first user;
  • Each consensus node of the second parachain generates a second consensus transaction and sends it to the corresponding main chain node; wherein, the second consensus transaction includes the execution result of the second transaction;
  • the present invention provides a parachain asset transfer method suitable for consensus nodes of the parachain, including:
  • the main chain node performs the current parachain consensus on the parachain, and judges whether the first transaction is successfully executed on the parachain according to the result of the parachain consensus: if yes, add the first asset to the account of the first user’s main chain Transfer right
  • the main chain node packs and executes the second transaction, and deducts the transfer right of the first asset from the account of the first user’s main chain: if the deduction is successful, the second transaction is executed successfully, and the second transaction is recorded on the main chain for use :
  • the nodes of the second parachain separately synchronize, package and execute the second transaction to add the first asset in the account of the second parachain of the first user;
  • Each consensus node of the second parachain generates a second consensus transaction and sends it to the corresponding main chain node for the second parachain consensus; wherein, the second consensus transaction includes the execution result of the second transaction;
  • the present invention provides a parachain asset transfer method suitable for non-consensus nodes of the parachain, including:
  • the main chain node performs the current parachain consensus on the parachain, and judges whether the first transaction is successfully executed on the parachain according to the result of the parachain consensus: if yes, add the first asset to the account of the first user’s main chain Transfer right
  • the main chain node packs and executes the second transaction, and deducts the transfer right of the first asset from the account of the first user’s main chain: if the deduction is successful, the second transaction is executed successfully, and the second transaction is recorded on the main chain for use :
  • the nodes of the second parachain separately synchronize, package and execute the second transaction to add the first asset in the account of the second parachain of the first user;
  • Each consensus node of the second parachain generates a second consensus transaction and sends it to the corresponding main chain node for the second parachain consensus; wherein, the second consensus transaction includes the execution result of the second transaction.
  • the present invention also provides another parachain asset transfer method suitable for consensus nodes of the parachain, including:
  • the present invention also provides another parachain asset transfer method suitable for non-consensus nodes of the parachain, including:
  • the second consensus transaction includes the execution result of the second transaction, which is generated by the consensus node of the current parachain and sent to the main chain node for supply Carry out the current parachain consensus on the parachain.
  • the present invention also provides a device, including one or more processors and a memory, where the memory contains instructions executable by the one or more processors to make the one or more processors execute each of the processors according to the present invention.
  • the parachain asset transfer method provided by the embodiment.
  • the present invention also provides a storage medium storing a computer program, which causes the computer to execute the parachain asset transfer method according to each embodiment of the present invention.
  • the first transaction and the second transaction are configured to be executed on the main chain and the parachain respectively, so that the first transaction is executed on the main chain according to the first transaction.
  • the execution result of the chain determines whether the asset transfer right is added to the user's main chain account, and then according to whether the user's main chain account has enough asset transfer rights to determine whether the second transaction is successfully executed on the main chain, and in the second parallel
  • the transfer of assets is completed by executing the second transaction on the chain, which realizes the relatively convenient asset transfer between parallel chains through two transactions;
  • the parachain asset transfer method, device and storage medium provided by some embodiments of the present invention further complete the cancellation operation of the asset transfer by transferring to the parachain where the asset was originally located.
  • FIG. 1 is a flow chart of a method for transferring parachain assets suitable for main chain nodes according to an embodiment of the present invention.
  • Fig. 2 is a flowchart of a parachain asset transfer method suitable for parachain consensus nodes according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of a parachain asset transfer method suitable for parachain non-consensus nodes according to an embodiment of the present invention.
  • FIG. 4 is a flowchart of another parachain asset transfer method suitable for parachain consensus nodes according to an embodiment of the present invention.
  • Fig. 5 is a flowchart of another parachain asset transfer method suitable for parachain non-consensus nodes according to an embodiment of the present invention.
  • Fig. 6 is a schematic structural diagram of a device provided by an embodiment of the present invention.
  • FIG. 1 is a flow chart of a method for transferring parachain assets suitable for main chain nodes according to an embodiment of the present invention.
  • the present invention provides a parachain asset transfer method suitable for main chain nodes, including:
  • S12 Package and execute the first transaction, and record the first transaction on the main chain for:
  • Each node of the first parachain synchronizes, packs, and executes the first transaction to deduct the first asset to be transferred in the account of the first parachain of the first user;
  • Each consensus node of the first parachain generates a first consensus transaction and sends it to the corresponding main chain node; wherein, the first consensus transaction includes the execution result of the first transaction;
  • S141 Package and execute each first consensus transaction to carry out the parachain consensus of the first parachain
  • step S145 add the transfer right of the first asset in the account of the first user's main chain
  • S161 Package and execute the second transaction, and deduct the transfer right of the first asset from the account of the first user's main chain:
  • step S163 the second transaction is recorded on the main chain for:
  • the nodes of the second parachain separately synchronize, package and execute the second transaction to add the first asset in the account of the second parachain of the first user;
  • Each consensus node of the second parachain generates a second consensus transaction and sends it to the corresponding main chain node; wherein, the second consensus transaction includes the execution result of the second transaction;
  • S18 Package and execute each second consensus transaction to carry out the second parachain consensus.
  • the parachain in this application refers to the parachain constructed based on the parachain mechanism proposed by the applicant (synchronized transactions from the main chain, consensus on the parachain with the help of the main chain consensus, etc.).
  • the main chain of the main chain and the main chain of the second parallel chain are the same main chain (a person skilled in the art can understand that if they are based on different main chains, the two parallel chains are not "parallel" to each other).
  • the main chain P is configured with parachains Pa and Pb, and the user A wants to transfer the 10 abc tokens held on the parachain Pa to the parachain Pb as an example to illustrate the above method.
  • tx1 is configured with a title type (title1) for asset transfer, so that the main chain and parachain can identify the transaction type, so that tx1 will be executed by the main chain and the parachain respectively.
  • step S12 the main chain node receives, broadcasts and packs tx1, after identifying title1, executes tx1 through the parachain asset transfer contract, and records tx1 in the main chain block block 1 after passing the main chain consensus.
  • Each node are synchronous parallel chains TX1 Pa (Pa and the other parallel chains 1 in block transactions), and parallel strand package generated tile block 1-a, performs tx1, deducting the user A's account Pa parallel chains 10 abc token: if the deduction is successful, tx1 is executed successfully; if the deduction fails, tx1 fails to execute.
  • Each consensus node of the parachain Pa (for example, the consensus nodes m1, m2, m3, m4) generates the first consensus transaction (correspondingly, tx 1-a-m1 , tx) according to the execution result of the parachain block 1-a . 1-a-m2 , tx 1-a-m3 , tx 1-a-m4 ) and sent to the main chain node.
  • step S141 the main chain nodes respectively receive, broadcast and package to execute each first consensus transaction (tx 1-a-m1 , tx 1-a-m2 , tx 1-a-m3 , tx 1-a-m4 ).
  • first consensus transaction tx 1-a-m1 , tx 1-a-m2 , tx 1-a-m3 , tx 1-a-m4 .
  • parachain consensus Carry out the parachain consensus of the parachain block 1-a of the Pa chain.
  • the principle of the parachain consensus can refer to the various parachain consensus patent texts previously applied by the applicant, which will not be repeated here.
  • step S143 the main chain node finds the execution result of tx1 on the Pa chain according to the execution result of the consensus parachain block block 1-a , and judges whether tx1 is successfully executed on the Pa chain:
  • step S145 add 10 abc token transfer rights to user A's main chain account.
  • the increase in the transfer right is configured to add 10 abc' tokens to the account.
  • it can also be configured to add 10 frozen abc tokens to the account, or in other different ways that those skilled in the art can understand, the same technical effect can be achieved.
  • each node of the parachain Pa is Synchronize each first consensus transaction to perform parachain self-consensus on the parachain block 1-a locally.
  • the principle of parachain self-consensus is to put it simply, first compare each consensus transaction, and then compare the comparison result with the local execution result.
  • User A’s client can generate the second transaction tx2 in advance, and send it to the main chain node regularly (or after monitoring the growth of a specified number of blocks on the main chain); it can also query the execution of tx1 through the parachain consensus through the main chain As a result, or, after querying the execution result of tx1 through the parachain self-consensus through the first parachain, the second transaction tx2 is generated and sent to the main chain node.
  • tx2 is also equipped with a title type (title2) for asset transfer for the main chain and parachain to identify the transaction type, so that tx2 will be executed by the main chain and the parachain respectively.
  • step S16 the main chain node receives, broadcasts, and packs and executes tx2, and deducts the transfer right of 10 abc tokens from User A's main chain account:
  • tx2 is executed successfully, and tx2 is recorded in block 2 of the main chain after the consensus is passed.
  • Each node are synchronous parallel chains Pb TX2 (in block 2 and the other chain Pb parallel transaction), and generates a packed block parallel chain block 2-b, performed tx2, Pb increase in parallel chains A in the user account 10 abc tokens.
  • Each consensus node of the parachain Pb (for example, consensus nodes n1, n2, n3, n4) generates a second consensus transaction (correspondingly, tx 2-b-n1 , tx) according to the execution result of the parachain block block 2-b .
  • 2-b-n2 , tx 2-b-n3 , tx 2-b-n4 and sent to the main chain node.
  • step S18 the main chain nodes respectively receive, broadcast, and package to execute each second consensus transaction (tx 2-b-n1 , tx 2-b-n2 , tx 2-b-n3 , tx 2-b-n4 ). Carry out the parachain consensus of the parachain block 2-b of the Pb chain.
  • each node of the parachain Pb is Synchronize each second consensus transaction to perform parachain self-consensus on the parachain block 2-b locally.
  • the first transaction and the second transaction are configured to be executed on the main chain and the parachain respectively, so as to determine whether to add to the user’s main chain account on the main chain according to the execution result of the first transaction on the first parachain.
  • Asset transfer rights and then determine whether the second transaction is successfully executed on the main chain based on whether the user’s main chain account has sufficient asset transfer rights, and complete the transfer of assets by executing the second transaction on the second parachain.
  • a relatively convenient asset transfer between parachains is completed through two transactions.
  • the second transaction is used to cancel the transfer of the first asset, and the second parachain is the first parachain.
  • the above preferred embodiment further completes the cancellation operation of the asset transfer by transferring to the parachain where the asset was originally located.
  • Fig. 2 is a flowchart of a parachain asset transfer method suitable for parachain consensus nodes according to an embodiment of the present invention. The method shown in FIG. 2 can be performed in conjunction with FIG. 1.
  • the present invention also provides a parachain asset transfer method suitable for parachain consensus nodes, including:
  • S22 Synchronize the first transaction of the current parachain from the main chain and package it for execution to deduct the first asset to be transferred in the account of the first user’s first parachain; where the first transaction is packaged and executed by the main chain node and recorded in On the main chain
  • S24 Generate a first consensus transaction including the execution result of the first transaction and send it to the corresponding main chain node for:
  • the main chain node performs the current parachain consensus on the parachain, and judges whether the first transaction is successfully executed on the parachain according to the result of the parachain consensus: if yes, add the first asset to the account of the first user’s main chain Transfer right
  • the main chain node packs and executes the second transaction, and deducts the transfer right of the first asset from the account of the first user’s main chain: if the deduction is successful, the second transaction is executed successfully, and the second transaction is recorded on the main chain for use :
  • the nodes of the second parachain separately synchronize, package and execute the second transaction to add the first asset in the account of the second parachain of the first user;
  • Each consensus node of the second parachain generates a second consensus transaction and sends it to the corresponding main chain node for the second parachain consensus; wherein, the second consensus transaction includes the execution result of the second transaction;
  • S26 Synchronize each first consensus transaction generated by each consensus node of the current parachain from the main chain to perform the parachain self-consensus.
  • the second transaction is used to cancel the transfer of the first asset, and the second parachain is the current parachain.
  • FIG. 3 is a flowchart of a parachain asset transfer method suitable for parachain non-consensus nodes according to an embodiment of the present invention. The method shown in Figure 3 can be implemented in conjunction with Figure 1-2.
  • the present invention also provides a parachain asset transfer method suitable for parachain non-consensus nodes, including:
  • S32 Synchronize the first transaction of the current parachain from the main chain and package it for execution to deduct the first asset to be transferred in the account of the first user’s first parachain; where the first transaction is packaged and executed by the main chain node and recorded in On the main chain
  • S34 Synchronize each first consensus transaction of the current parachain from the main chain to perform self-consensus on the parachain; where the first consensus transaction includes the execution result of the first transaction, which is generated by the consensus node of the current parachain and sent to the main chain node For:
  • the main chain node performs the current parachain consensus on the parachain, and judges whether the first transaction is successfully executed on the parachain according to the result of the parachain consensus: if yes, add the first asset to the account of the first user’s main chain Transfer right
  • the main chain node packs and executes the second transaction, and deducts the transfer right of the first asset from the account of the first user’s main chain: if the deduction is successful, the second transaction is executed successfully, and the second transaction is recorded on the main chain for use :
  • the nodes of the second parachain separately synchronize, package and execute the second transaction to add the first asset in the account of the second parachain of the first user;
  • Each consensus node of the second parachain generates a second consensus transaction and sends it to the corresponding main chain node for the second parachain consensus; wherein, the second consensus transaction includes the execution result of the second transaction.
  • the second transaction is used to cancel the transfer of the first asset, and the second parachain is the current parachain.
  • FIG. 4 is a flowchart of another parachain asset transfer method suitable for parachain consensus nodes according to an embodiment of the present invention. The method shown in Figure 4 can be executed in conjunction with Figures 1-3.
  • the present invention also provides another parachain asset transfer method suitable for parachain consensus nodes, including:
  • S42 Synchronize the second transaction of the current parachain from the main chain and package it for execution to add the first asset to the account of the first user’s current parachain; where the second transaction is packaged and executed by the main chain node, and is executed in the first user’s When the transfer right of the first asset is successfully deducted from the main chain’s account, the execution is successful and recorded on the main chain; the transfer right is packaged by the main chain node and each first consensus transaction is executed to carry out the parachain consensus of the first parachain.
  • the result of the chain consensus judges that the first transaction is successfully executed on the first parachain, and it is added to the account of the first user’s main chain; the first transaction is packaged and executed by the main chain node to be recorded on the main chain, and the Each node of the parachain is synchronized, packaged and executed to deduct the first asset to be transferred in the account of the first parachain of the first user; the first consensus transaction includes the execution result of the first transaction;
  • S44 Generate a second consensus transaction and send it to the corresponding main chain node for the current parachain consensus; wherein, the second consensus transaction includes the execution result of the second transaction;
  • S46 Synchronize each second consensus transaction of the current parachain from the main chain to conduct self-consensus on the parachain.
  • the second transaction is used to cancel the transfer of the first asset, and the above-mentioned current parachain is the first parachain.
  • Fig. 5 is a flowchart of another parachain asset transfer method suitable for parachain non-consensus nodes according to an embodiment of the present invention. The method shown in Figure 5 can be executed in conjunction with Figures 1-4.
  • the present invention also provides another parachain asset transfer method suitable for parachain non-consensus nodes, including:
  • S52 Synchronize the second transaction of the current parachain from the main chain and package it for execution to add the first asset to the account of the first user’s current parachain; where the second transaction is packaged and executed by the main chain node, and is executed in the first user’s When the transfer right of the first asset is successfully deducted from the main chain’s account, the execution is successful and recorded on the main chain; the transfer right is packaged by the main chain node and each first consensus transaction is executed to carry out the parachain consensus of the first parachain.
  • the result of the chain consensus judges that the first transaction is successfully executed on the first parachain, and it is added to the account of the first user’s main chain; the first transaction is packaged and executed by the main chain node to be recorded on the main chain, and the Each node of the parachain is synchronized, packaged and executed to deduct the first asset to be transferred in the account of the first parachain of the first user; the first consensus transaction includes the execution result of the first transaction;
  • S54 Synchronize each second consensus transaction of the current parachain from the main chain to perform parachain self-consensus; where the second consensus transaction includes the execution result of the second transaction, which is generated by the consensus node of the current parachain and sent to the main chain node For the current parachain consensus.
  • the second transaction is used to cancel the transfer of the first asset, and the above-mentioned current parachain is the first parachain.
  • Fig. 6 is a schematic structural diagram of a device provided by an embodiment of the present invention.
  • the present application also provides a device 600, including one or more central processing units (CPU) 601, which can be based on a program stored in a read-only memory (ROM) 602 or The program loaded from the storage section 608 into the random access memory (RAM) 603 executes various appropriate actions and processing. In the RAM 603, various programs and data required for the operation of the device 600 are also stored.
  • the CPU601, ROM602, and RAM603 are connected to each other through a bus 604.
  • An input/output (I/O) interface 605 is also connected to the bus 604.
  • the following components are connected to the I/O interface 605: an input part 606 including a keyboard, a mouse, etc.; an output part 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and speakers, etc.; a storage part 608 including a hard disk, etc. ; And a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet.
  • the driver 610 is also connected to the I/O interface 605 as needed.
  • a removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that the computer program read from it is installed into the storage part 608 as needed.
  • the parachain asset transfer method described in any of the above embodiments can be implemented as a computer software program.
  • an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes program code for executing a parachain asset transfer method.
  • the computer program may be downloaded and installed from the network through the communication part 609, and/or installed from the removable medium 611.
  • the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium may be the computer-readable storage medium included in the device of the above-mentioned embodiment; or it may exist alone without being installed in The computer-readable storage medium in the device.
  • the computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the parachain asset transfer method described in this application.
  • each block in the flowchart or block diagram can represent a module, program segment, or part of code, and the module, program segment, or part of code contains one or more for realizing the specified logical function Executable instructions.
  • the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown in succession can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by a combination of dedicated hardware and computer instructions.
  • each unit may be a software program arranged in a computer or a mobile smart device, or may be a separately configured hardware device.
  • the names of these units or modules do not constitute a limitation on the units or modules themselves under certain circumstances.

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Character Discrimination (AREA)

Abstract

一种平行链资产转移方法、设备和存储介质,该方法包括:打包并执行第一交易,将第一交易记录在主链上(S12):打包并执行各第一共识交易以进行平行链共识(S141);根据平行链共识的结果判断第一交易在第一平行链上是否执行成功(S143);是,则在第一用户的主链的账户中增加第一资产的转移权(S145);打包并执行第二交易,在第一用户的主链的账户中扣除第一资产的转移权(S161);扣除成功,则第二交易执行成功,将第二交易记录在主链上(S163);打包并执行各第二共识交易以进行第二平行链的平行链共识(S18)。通过该方法,实现了平行链之间便捷的资产转移。

Description

平行链资产转移方法、设备和存储介质 技术领域
本申请涉及区块链技术领域,具体涉及一种平行链资产转移方法、设备和存储介质。
背景技术
在申请人所提出的平行链机制(具体可参考申请人所申请的各项平行链专利文本)中,平行链从主链同步交易,并借助主链的共识进行平行链共识。
基于上述机制,目前可以通过一笔主链交易和一笔平行链交易所组成的交易组进行主链与平行链的跨链交易,但目前仍无法便捷地实现平行链之间的资产转移。
发明内容
鉴于现有技术中的上述缺陷或不足,期望提供一种实现平行链之间较为便捷的资产转移的平行链资产转移方法、设备和存储介质。
第一方面,本发明提供一种适用于主链节点的平行链资产转移方法,包括:
打包并执行第一交易,将第一交易记录在主链上,以供:
第一平行链的各节点分别同步、打包并执行第一交易以扣除第一用户的第一平行链的账户中待转移的第一资产;
第一平行链的各共识节点分别生成第一共识交易并发送至对应的主链节点;其中,第一共识交易包括第一交易的执行结果;
打包并执行各第一共识交易以进行第一平行链的平行链共识,根据平行链共识的结果判断第一交易在第一平行链上是否执行成功:
是,则在第一用户的主链的账户中增加第一资产的转移权;
打包并执行第二交易,在第一用户的主链的账户中扣除第一资产 的转移权:
扣除成功,则第二交易执行成功,将第二交易记录在主链上,以供:
第二平行链的各节点分别同步、打包并执行第二交易以在第一用户的第二平行链的账户中增加第一资产;
第二平行链的各共识节点分别生成第二共识交易并发送至对应的主链节点;其中,第二共识交易包括第二交易的执行结果;
打包并执行各第二共识交易以进行第二平行链的平行链共识。
第二方面,本发明提供一种适用于平行链的共识节点的平行链资产转移方法,包括:
从主链同步当前平行链的第一交易并打包执行以扣除第一用户的第一平行链的账户中待转移的第一资产;其中,第一交易由主链节点打包执行后记录在主链上;
生成包括第一交易的执行结果的第一共识交易并发送至对应的主链节点以供:
主链节点进行当前平行链的平行链共识,以及,根据平行链共识的结果判断第一交易在平行链上是否执行成功:是,则在第一用户的主链的账户中增加第一资产的转移权;
主链节点打包并执行第二交易,在第一用户的主链的账户中扣除第一资产的转移权:扣除成功,则第二交易执行成功,将第二交易记录在主链上,以供:
第二平行链的各节点分别同步、打包并执行第二交易以在第一用户的第二平行链的账户中增加第一资产;
第二平行链的各共识节点分别生成第二共识交易并发送至对应的主链节点以供进行第二平行链的平行链共识;其中,第二共识交易包括第二交易的执行结果;
从主链同步当前平行链的各共识节点分别生成的各第一共识交易以进行平行链自共识。
第三方面,本发明提供一种适用于平行链的非共识节点的平行链资产转移方法,包括:
从主链同步当前平行链的第一交易并打包执行以扣除第一用户的第一平行链的账户中待转移的第一资产;其中,第一交易由主链节点打包执行后记录在主链上;
从主链同步当前平行链的各第一共识交易以进行平行链自共识;其中,第一共识交易包括第一交易的执行结果,由当前平行链的共识节点生成并发送至主链节点以供:
主链节点进行当前平行链的平行链共识,以及,根据平行链共识的结果判断第一交易在平行链上是否执行成功:是,则在第一用户的主链的账户中增加第一资产的转移权;
主链节点打包并执行第二交易,在第一用户的主链的账户中扣除第一资产的转移权:扣除成功,则第二交易执行成功,将第二交易记录在主链上,以供:
第二平行链的各节点分别同步、打包并执行第二交易以在第一用户的第二平行链的账户中增加第一资产;
第二平行链的各共识节点分别生成第二共识交易并发送至对应的主链节点以供进行第二平行链的平行链共识;其中,第二共识交易包括第二交易的执行结果。
第四方面,本发明还提供另一种适用于平行链的共识节点的平行链资产转移方法,包括:
从主链同步当前平行链的第二交易并打包执行以在第一用户的当前平行链的账户中增加第一资产;其中,第二交易由主链节点打包执行,在第一用户的主链的账户中扣除第一资产的转移权成功时执行成功并记录在主链上;转移权由主链节点打包并执行各第一共识交易以进行第一平行链的平行链共识,根据平行链共识的结果判断第一交易在第一平行链上执行成功后,在第一用户的主链的账户中增加;第一交易由主链节点打包执行以记录在主链上,并由第一平行链的各节点分别同步、打包并执行以扣除第一用户的第一平行链的账户中待转移的第一资产;第一共识交易包括第一交易的执行结果;
生成第二共识交易并发送至对应的主链节点以供进行当前平行链的平行链共识;其中,第二共识交易包括第二交易的执行结果;
从主链同步当前平行链的各第二共识交易以进行平行链自共识。
第五方面,本发明还提供另一种适用于平行链的非共识节点的平行链资产转移方法,包括:
从主链同步当前平行链的第二交易并打包执行以在第一用户的当前平行链的账户中增加第一资产;其中,第二交易由主链节点打包执行,在第一用户的主链的账户中扣除第一资产的转移权成功时执行成功并记录在主链上;转移权由主链节点打包并执行各第一共识交易以进行第一平行链的平行链共识,根据平行链共识的结果判断第一交易在第一平行链上执行成功后,在第一用户的主链的账户中增加;第一交易由主链节点打包执行以记录在主链上,并由第一平行链的各节点分别同步、打包并执行以扣除第一用户的第一平行链的账户中待转移的第一资产;第一共识交易包括第一交易的执行结果;
从主链同步当前平行链的各第二共识交易以进行平行链自共识;其中,第二共识交易包括第二交易的执行结果,由当前平行链的共识节点生成并发送至主链节点以供进行当前平行链的平行链共识。
第六方面,本发明还提供一种设备,包括一个或多个处理器和存储器,其中存储器包含可由该一个或多个处理器执行的指令以使得该一个或多个处理器执行根据本发明各实施例提供的平行链资产转移方法。
第七方面,本发明还提供一种存储有计算机程序的存储介质,该计算机程序使计算机执行根据本发明各实施例提供的平行链资产转移方法。
本发明诸多实施例提供的平行链资产转移方法、设备和存储介质通过将第一交易和第二交易配置为在主链和平行链分别执行,从而在主链上根据第一交易在第一平行链的执行结果判断是否在用户的主链账户中增加资产转移权,进而根据用户的主链账户中是否有足够的资产转移权判断第二交易在主链上是否执行成功,并在第二平行链上通过执行第二交易完成资产的转移,实现了通过两笔交易完成平行链之间较为便捷的资产转移;
本发明一些实施例提供的平行链资产转移方法、设备和存储介质 进一步通过向资产原先所在的平行链进行转移完成资产转移的撤销操作。
附图说明
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:
图1为本发明一实施例提供的一种适用于主链节点的平行链资产转移方法的流程图。
图2为本发明一实施例提供的一种适用于平行链共识节点的平行链资产转移方法的流程图。
图3为本发明一实施例提供的一种适用于平行链非共识节点的平行链资产转移方法的流程图。
图4为本发明一实施例提供的另一种适用于平行链共识节点的平行链资产转移方法的流程图。
图5为本发明一实施例提供的另一种适用于平行链非共识节点的平行链资产转移方法的流程图。
图6为本发明一实施例提供的一种设备的结构示意图。
具体实施方式
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与发明相关的部分。
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。
图1为本发明一实施例提供的一种适用于主链节点的平行链资产转移方法的流程图。
如图1所示,在本实施例中,本发明提供一种适用于主链节点的平行链资产转移方法,包括:
S12:打包并执行第一交易,将第一交易记录在主链上,以供:
第一平行链的各节点分别同步、打包并执行第一交易以扣除第一用户的第一平行链的账户中待转移的第一资产;
第一平行链的各共识节点分别生成第一共识交易并发送至对应的主链节点;其中,第一共识交易包括第一交易的执行结果;
S141:打包并执行各第一共识交易以进行第一平行链的平行链共识;
S143:根据平行链共识的结果判断第一交易在第一平行链上是否执行成功:
是,则执行步骤S145:在第一用户的主链的账户中增加第一资产的转移权;
S161:打包并执行第二交易,在第一用户的主链的账户中扣除第一资产的转移权:
扣除成功,则第二交易执行成功,执行步骤S163:将第二交易记录在主链上,以供:
第二平行链的各节点分别同步、打包并执行第二交易以在第一用户的第二平行链的账户中增加第一资产;
第二平行链的各共识节点分别生成第二共识交易并发送至对应的主链节点;其中,第二共识交易包括第二交易的执行结果;
S18:打包并执行各第二共识交易以进行第二平行链的平行链共识。
具体地,本申请中的平行链指的是基于申请人所提出的平行链机制(从主链同步交易、借助主链共识进行平行链共识,等)所构建的平行链,第一平行链的主链和第二平行链的主链是同一主链(本领域技术人员可以理解,若基于不同主链,则两条平行链相互并不“平行”)。
以下以主链P配置有平行链Pa、Pb,用户甲要将在平行链Pa上所持有的10个abc代币转移到平行链Pb上为例,对上述方法进行示例性阐述。
响应于用户甲的资产转移操作,用户甲的用户端生成第一交易tx1,将tx1发送至主链节点。其中,tx1配置有用于资产转移的title 类型(title1),以供主链和平行链识别交易类型,使tx1会被主链和平行链分别执行。
在步骤S12中,主链节点接收、广播并打包tx1,识别title1后通过平行链资产转移合约执行tx1,通过主链共识后将tx1记录在主链区块block 1中。
平行链Pa的各节点分别同步tx1(及block 1中的其它平行链Pa的交易)并打包生成平行链区块block 1-a,执行tx1,扣除用户甲在平行链Pa的账户中的10个abc代币:扣除成功,则tx1执行成功;扣除失败,则tx1执行失败。
平行链Pa的各共识节点(例如,共识节点m1、m2、m3、m4)分别根据平行链区块block 1-a的执行结果生成第一共识交易(相应的,tx 1-a-m1、tx 1-a-m2、tx 1-a-m3、tx 1-a-m4),并发送至主链节点。
在步骤S141中,主链节点分别接收、广播并打包执行各第一共识交易(tx 1-a-m1、tx 1-a-m2、tx 1-a-m3、tx 1-a-m4)以进行Pa链的平行链区块block 1-a的平行链共识。其中,平行链共识原理可以参考申请人此前申请的各项平行链共识专利文本,此处不再赘述。
在步骤S143中,主链节点根据通过共识的平行链区块block 1-a的执行结果查找到tx1在Pa链上的执行结果,判断tx1在Pa链上是否执行成功:
否,则不执行操作;
是,则执行步骤S145:在用户甲的主链账户中增加10个abc代币的转移权。
具体地,在本实施例中,转移权的增加配置为在账户中增加10个abc’代币,在更多实施例中,还可以配置为在账户中增加10个冻结的abc代币,或,其它本领域技术人员可以理解的不同方式,可实现相同的技术效果。
此外,各第一共识交易(tx 1-a-m1、tx 1-a-m2、tx 1-a-m3、tx 1-a-m4)记录到主链上之后,平行链Pa的各节点分别同步各第一共识交易以分别在本地对平行链区块block 1-a进行平行链自共识。其中,平行链自共识原理简而言之即,先根据各笔共识交易进行比对,再将比对结果与本地 的执行结果进行比对,具体可以参考申请人此前申请的CN201910157805.X号专利文本,不再赘述。
用户甲的用户端可以提前生成第二交易tx2,定时(或监测到主链增长指定数量的区块后)发送至主链节点;也可以在通过主链查询到通过平行链共识的tx1的执行结果、或、通过第一平行链查询到通过平行链自共识的tx1的执行结果后,再生成第二交易tx2,发送至主链节点。其中,tx2同样配置有用于资产转移的title类型(title2),以供主链和平行链识别交易类型,使tx2会被主链和平行链分别执行。
在步骤S16中,主链节点接收、广播并打包执行tx2,从用户甲的主链账户中扣除10个abc代币的转移权:
扣除失败,则tx2执行失败,tx2不会被记录到主链上;
扣除成功,则tx2执行成功,在通过共识后将tx2记录到主链区块block 2中。
平行链Pb的各节点分别同步tx2(及block 2中的其它平行链Pb的交易)并打包生成平行链区块block 2-b,执行tx2,在用户甲在平行链Pb的账户中增加10个abc代币。
平行链Pb的各共识节点(例如,共识节点n1、n2、n3、n4)分别根据平行链区块block 2-b的执行结果生成第二共识交易(相应的,tx 2-b-n1、tx 2-b-n2、tx 2-b-n3、tx 2-b-n4),并发送至主链节点。
在步骤S18中,主链节点分别接收、广播并打包执行各第二共识交易(tx 2-b-n1、tx 2-b-n2、tx 2-b-n3、tx 2-b-n4)以进行Pb链的平行链区块block 2-b的平行链共识。
此外,各第二共识交易(tx 2-b-n1、tx 2-b-n2、tx 2-b-n3、tx 2-b-n4)记录到主链上之后,平行链Pb的各节点分别同步各第二共识交易以分别在本地对平行链区块block 2-b进行平行链自共识。
上述实施例通过将第一交易和第二交易配置为在主链和平行链分别执行,从而在主链上根据第一交易在第一平行链的执行结果判断是否在用户的主链账户中增加资产转移权,进而根据用户的主链账户中是否有足够的资产转移权判断第二交易在主链上是否执行成功,并在第二平行链上通过执行第二交易完成资产的转移,实现了通过两笔交 易完成平行链之间较为便捷的资产转移。
在一优选实施例中,第二交易用于撤销第一资产的转移,第二平行链为第一平行链。
具体地,同样以用户甲将在平行链Pa上所持有的10个abc代币转移到平行链Pb上为例,当tx1在主链和平行链分别执行成功并通过共识后,用户甲想要撤销该10个abc代币的转移,可以选择撤销操作,用户甲的用户端响应于该撤销操作,在生成tx2时,将tx2中的第二平行链指定为Pa链,并将tx2发送至主链节点,即可通过同样的原理完成撤销。
上述优选实施例进一步通过向资产原先所在的平行链进行转移完成资产转移的撤销操作。
图2为本发明一实施例提供的一种适用于平行链共识节点的平行链资产转移方法的流程图。图2所示的方法可配合图1执行。
如图2所示,在本实施例中,本发明还提供一种适用于平行链共识节点的平行链资产转移方法,包括:
S22:从主链同步当前平行链的第一交易并打包执行以扣除第一用户的第一平行链的账户中待转移的第一资产;其中,第一交易由主链节点打包执行后记录在主链上;
S24:生成包括第一交易的执行结果的第一共识交易并发送至对应的主链节点以供:
主链节点进行当前平行链的平行链共识,以及,根据平行链共识的结果判断第一交易在平行链上是否执行成功:是,则在第一用户的主链的账户中增加第一资产的转移权;
主链节点打包并执行第二交易,在第一用户的主链的账户中扣除第一资产的转移权:扣除成功,则第二交易执行成功,将第二交易记录在主链上,以供:
第二平行链的各节点分别同步、打包并执行第二交易以在第一用户的第二平行链的账户中增加第一资产;
第二平行链的各共识节点分别生成第二共识交易并发送至对应的主链节点以供进行第二平行链的平行链共识;其中,第二共 识交易包括第二交易的执行结果;
S26:从主链同步当前平行链的各共识节点分别生成的各第一共识交易以进行平行链自共识。
优选地,第二交易用于撤销第一资产的转移,第二平行链为当前平行链。
图2所示方法的资产转移原理可参照图1所示的方法,此处不再赘述。
图3为本发明一实施例提供的一种适用于平行链非共识节点的平行链资产转移方法的流程图。图3所示的方法可配合图1-2执行。
如图3所示,在本实施例中,本发明还提供一种适用于平行链非共识节点的平行链资产转移方法,包括:
S32:从主链同步当前平行链的第一交易并打包执行以扣除第一用户的第一平行链的账户中待转移的第一资产;其中,第一交易由主链节点打包执行后记录在主链上;
S34:从主链同步当前平行链的各第一共识交易以进行平行链自共识;其中,第一共识交易包括第一交易的执行结果,由当前平行链的共识节点生成并发送至主链节点以供:
主链节点进行当前平行链的平行链共识,以及,根据平行链共识的结果判断第一交易在平行链上是否执行成功:是,则在第一用户的主链的账户中增加第一资产的转移权;
主链节点打包并执行第二交易,在第一用户的主链的账户中扣除第一资产的转移权:扣除成功,则第二交易执行成功,将第二交易记录在主链上,以供:
第二平行链的各节点分别同步、打包并执行第二交易以在第一用户的第二平行链的账户中增加第一资产;
第二平行链的各共识节点分别生成第二共识交易并发送至对应的主链节点以供进行第二平行链的平行链共识;其中,第二共识交易包括第二交易的执行结果。
优选地,第二交易用于撤销第一资产的转移,第二平行链为当前平行链。
图3所示方法的资产转移原理同样可参照图1所示的方法,此处不再赘述。
图4为本发明一实施例提供的另一种适用于平行链共识节点的平行链资产转移方法的流程图。图4所示的方法可配合图1-3执行。
如图4所示,在本实施例中,本发明还提供另一种适用于平行链共识节点的平行链资产转移方法,包括:
S42:从主链同步当前平行链的第二交易并打包执行以在第一用户的当前平行链的账户中增加第一资产;其中,第二交易由主链节点打包执行,在第一用户的主链的账户中扣除第一资产的转移权成功时执行成功并记录在主链上;转移权由主链节点打包并执行各第一共识交易以进行第一平行链的平行链共识,根据平行链共识的结果判断第一交易在第一平行链上执行成功后,在第一用户的主链的账户中增加;第一交易由主链节点打包执行以记录在主链上,并由第一平行链的各节点分别同步、打包并执行以扣除第一用户的第一平行链的账户中待转移的第一资产;第一共识交易包括第一交易的执行结果;
S44:生成第二共识交易并发送至对应的主链节点以供进行当前平行链的平行链共识;其中,第二共识交易包括第二交易的执行结果;
S46:从主链同步当前平行链的各第二共识交易以进行平行链自共识。
优选地,第二交易用于撤销第一资产的转移,上述当前平行链为第一平行链。
图4所示方法的资产转移原理同样可参照图1所示的方法,此处不再赘述。
图5为本发明一实施例提供的另一种适用于平行链非共识节点的平行链资产转移方法的流程图。图5所示的方法可配合图1-4执行。
如图5所示,在本实施例中,本发明还提供另一种适用于平行链非共识节点的平行链资产转移方法,包括:
S52:从主链同步当前平行链的第二交易并打包执行以在第一用户的当前平行链的账户中增加第一资产;其中,第二交易由主链节点打包执行,在第一用户的主链的账户中扣除第一资产的转移权成功时执 行成功并记录在主链上;转移权由主链节点打包并执行各第一共识交易以进行第一平行链的平行链共识,根据平行链共识的结果判断第一交易在第一平行链上执行成功后,在第一用户的主链的账户中增加;第一交易由主链节点打包执行以记录在主链上,并由第一平行链的各节点分别同步、打包并执行以扣除第一用户的第一平行链的账户中待转移的第一资产;第一共识交易包括第一交易的执行结果;
S54:从主链同步当前平行链的各第二共识交易以进行平行链自共识;其中,第二共识交易包括第二交易的执行结果,由当前平行链的共识节点生成并发送至主链节点以供进行当前平行链的平行链共识。
优选地,第二交易用于撤销第一资产的转移,上述当前平行链为第一平行链。
图5所示方法的资产转移原理同样可参照图1所示的方法,此处不再赘述。
图6为本发明一实施例提供的一种设备的结构示意图。
如图6所示,作为另一方面,本申请还提供了一种设备600,包括一个或多个中央处理单元(CPU)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储部分608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM603中,还存储有设备600操作所需的各种程序和数据。CPU601、ROM602以及RAM603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。
以下部件连接至I/O接口605:包括键盘、鼠标等的输入部分606;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分607;包括硬盘等的存储部分608;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分609。通信部分609经由诸如因特网的网络执行通信处理。驱动器610也根据需要连接至I/O接口605。可拆卸介质611,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器610上,以便于从其上读出的计算机程序根据需要被安装入存储部分608。
特别地,根据本公开的实施例,上述任一实施例描述的平行链资 产转移方法可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算机程序,计算机程序包含用于执行平行链资产转移方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分609从网络上被下载和安装,和/或从可拆卸介质611被安装。
作为又一方面,本申请还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例的装置中所包含的计算机可读存储介质;也可以是单独存在,未装配入设备中的计算机可读存储介质。计算机可读存储介质存储有一个或者一个以上程序,该程序被一个或者一个以上的处理器用来执行描述于本申请的平行链资产转移方法。
附图中的流程图和框图,图示了按照本发明各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这根据所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以通过执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以通过专用硬件与计算机指令的组合来实现。
描述于本申请实施例中所涉及到的单元或模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元或模块也可以设置在处理器中,例如,各单元可以是设置在计算机或移动智能设备中的软件程序,也可以是单独配置的硬件装置。其中,这些单元或模块的名称在某种情况下并不构成对该单元或模块本身的限定。
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离本申请构思的情况下,由上述技术特征或其等同特征进行任意组合而 形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (12)

  1. 一种平行链资产转移方法,其特征在于,所述方法适用于主链节点,所述方法包括:
    打包并执行第一交易,将所述第一交易记录在主链上,以供:
    第一平行链的各节点分别同步、打包并执行所述第一交易以扣除第一用户的第一平行链的账户中待转移的第一资产;
    所述第一平行链的各共识节点分别生成第一共识交易并发送至对应的主链节点;其中,所述第一共识交易包括所述第一交易的执行结果;
    打包并执行各所述第一共识交易以进行所述第一平行链的平行链共识,根据所述平行链共识的结果判断所述第一交易在所述第一平行链上是否执行成功:
    是,则在所述第一用户的主链的账户中增加所述第一资产的转移权;
    打包并执行第二交易,在所述第一用户的主链的账户中扣除所述第一资产的转移权:
    扣除成功,则所述第二交易执行成功,将所述第二交易记录在主链上,以供:
    第二平行链的各节点分别同步、打包并执行所述第二交易以在第一用户的第二平行链的账户中增加所述第一资产;
    所述第二平行链的各共识节点分别生成第二共识交易并发送至对应的主链节点;其中,所述第二共识交易包括所述第二交易的执行结果;
    打包并执行各所述第二共识交易以进行所述第二平行链的平行链共识。
  2. 根据权利要求1所述的方法,其特征在于,所述第二交易用于撤销所述第一资产的转移,所述第二平行链为所述第一平行链。
  3. 一种平行链资产转移方法,其特征在于,所述方法适用于平行链的共识节点,所述方法包括:
    从主链同步当前平行链的第一交易并打包执行以扣除第一用户的第一平行链的账户中待转移的第一资产;其中,所述第一交易由主链节点打包执行后记录在主链上;
    生成包括所述第一交易的执行结果的第一共识交易并发送至对应的主链节点以供:
    主链节点进行当前平行链的平行链共识,以及,根据所述平行链共识的结果判断所述第一交易在所述平行链上是否执行成功:是,则在所述第一用户的主链的账户中增加所述第一资产的转移权;
    主链节点打包并执行第二交易,在所述第一用户的主链的账户中扣除所述第一资产的转移权:扣除成功,则所述第二交易执行成功,将所述第二交易记录在主链上,以供:
    第二平行链的各节点分别同步、打包并执行所述第二交易以在第一用户的第二平行链的账户中增加所述第一资产;
    所述第二平行链的各共识节点分别生成第二共识交易并发送至对应的主链节点以供进行所述第二平行链的平行链共识;其中,所述第二共识交易包括所述第二交易的执行结果;
    从主链同步当前平行链的各共识节点分别生成的各第一共识交易以进行平行链自共识。
  4. 根据权利要求3所述的方法,其特征在于,所述第二交易用于撤销所述第一资产的转移,所述第二平行链为所述当前平行链。
  5. 一种平行链资产转移方法,其特征在于,所述方法适用于平行链的非共识节点,所述方法包括:
    从主链同步当前平行链的第一交易并打包执行以扣除第一用户的第一平行链的账户中待转移的第一资产;其中,所述第一交易由主链节点打包执行后记录在主链上;
    从主链同步当前平行链的各第一共识交易以进行平行链自共识; 其中,所述第一共识交易包括所述第一交易的执行结果,由当前平行链的共识节点生成并发送至主链节点以供:
    主链节点进行当前平行链的平行链共识,以及,根据所述平行链共识的结果判断所述第一交易在所述平行链上是否执行成功:是,则在所述第一用户的主链的账户中增加所述第一资产的转移权;
    主链节点打包并执行第二交易,在所述第一用户的主链的账户中扣除所述第一资产的转移权:扣除成功,则所述第二交易执行成功,将所述第二交易记录在主链上,以供:
    第二平行链的各节点分别同步、打包并执行所述第二交易以在第一用户的第二平行链的账户中增加所述第一资产;
    所述第二平行链的各共识节点分别生成第二共识交易并发送至对应的主链节点以供进行所述第二平行链的平行链共识;其中,所述第二共识交易包括所述第二交易的执行结果。
  6. 根据权利要求5所述的方法,其特征在于,所述第二交易用于撤销所述第一资产的转移,所述第二平行链为所述当前平行链。
  7. 一种平行链资产转移方法,其特征在于,所述方法适用于平行链的共识节点,所述方法包括:
    从主链同步当前平行链的第二交易并打包执行以在第一用户的当前平行链的账户中增加所述第一资产;其中,所述第二交易由主链节点打包执行,在所述第一用户的主链的账户中扣除所述第一资产的转移权成功时执行成功并记录在主链上;所述转移权由所述主链节点打包并执行各第一共识交易以进行第一平行链的平行链共识,根据所述平行链共识的结果判断第一交易在所述第一平行链上执行成功后,在所述第一用户的主链的账户中增加;所述第一交易由主链节点打包执行以记录在主链上,并由所述第一平行链的各节点分别同步、打包并执行以扣除第一用户的第一平行链的账户中待转移的第一资产;所述第一共识交易包括所述第一交易的执行结果;
    生成第二共识交易并发送至对应的主链节点以供进行当前平行链 的平行链共识;其中,所述第二共识交易包括所述第二交易的执行结果;
    从主链同步当前平行链的各第二共识交易以进行平行链自共识。
  8. 根据权利要求7所述的方法,其特征在于,所述第二交易用于撤销所述第一资产的转移,所述当前平行链为所述第一平行链。
  9. 一种平行链资产转移方法,其特征在于,所述方法适用于平行链的非共识节点,所述方法包括:
    从主链同步当前平行链的第二交易并打包执行以在第一用户的当前平行链的账户中增加所述第一资产;其中,所述第二交易由主链节点打包执行,在所述第一用户的主链的账户中扣除所述第一资产的转移权成功时执行成功并记录在主链上;所述转移权由所述主链节点打包并执行各第一共识交易以进行第一平行链的平行链共识,根据所述平行链共识的结果判断第一交易在所述第一平行链上执行成功后,在所述第一用户的主链的账户中增加;所述第一交易由主链节点打包执行以记录在主链上,并由所述第一平行链的各节点分别同步、打包并执行以扣除第一用户的第一平行链的账户中待转移的第一资产;所述第一共识交易包括所述第一交易的执行结果;
    从主链同步当前平行链的各第二共识交易以进行平行链自共识;其中,所述第二共识交易包括所述第二交易的执行结果,由当前平行链的共识节点生成并发送至主链节点以供进行当前平行链的平行链共识。
  10. 根据权利要求9所述的方法,其特征在于,所述第二交易用于撤销所述第一资产的转移,所述当前平行链为所述第一平行链。
  11. 一种设备,其特征在于,所述设备包括:
    一个或多个处理器;
    存储器,用于存储一个或多个程序,
    当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1-10中任一项所述的方法。
  12. 一种存储有计算机程序的存储介质,其特征在于,该程序被处理器执行时实现如权利要求1-10中任一项所述的方法。
PCT/CN2020/097846 2019-07-29 2020-06-24 平行链资产转移方法、设备和存储介质 WO2021017693A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910688760.9A CN110473093A (zh) 2019-07-29 2019-07-29 平行链资产转移方法、设备和存储介质
CN201910688760.9 2019-07-29

Publications (1)

Publication Number Publication Date
WO2021017693A1 true WO2021017693A1 (zh) 2021-02-04

Family

ID=68509860

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/097846 WO2021017693A1 (zh) 2019-07-29 2020-06-24 平行链资产转移方法、设备和存储介质

Country Status (2)

Country Link
CN (1) CN110473093A (zh)
WO (1) WO2021017693A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110473093A (zh) * 2019-07-29 2019-11-19 杭州复杂美科技有限公司 平行链资产转移方法、设备和存储介质
CN111432026B (zh) * 2020-04-14 2022-10-28 杭州复杂美科技有限公司 平行链交易执行方法、设备和存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107742210A (zh) * 2017-10-13 2018-02-27 布比(北京)网络技术有限公司 一种不同区块链间的跨链转账系统和方法
US20180293556A1 (en) * 2017-04-05 2018-10-11 Samsung Sds Co., Ltd. Method and system for processing blockchain-based real-time transaction
CN109271446A (zh) * 2018-08-30 2019-01-25 杭州复杂美科技有限公司 一种平行链数据同步方法、设备和存储介质
CN109377365A (zh) * 2018-10-18 2019-02-22 杭州复杂美科技有限公司 一种资产转移方法、设备和存储介质
CN109493015A (zh) * 2018-10-18 2019-03-19 杭州复杂美科技有限公司 一种资产转移方法、设备和存储介质
CN109831514A (zh) * 2019-03-02 2019-05-31 杭州复杂美科技有限公司 平行链共识方法、数据异常处理方法、设备和存储介质
CN110473093A (zh) * 2019-07-29 2019-11-19 杭州复杂美科技有限公司 平行链资产转移方法、设备和存储介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107909369A (zh) * 2017-10-13 2018-04-13 布比(北京)网络技术有限公司 基于跨链交易的共识方法、装置和存储介质
CN109325762B (zh) * 2018-08-30 2020-07-10 杭州复杂美科技有限公司 平行链跨链交易方法、设备和存储介质
CN109345387A (zh) * 2018-09-04 2019-02-15 湖南宸瀚信息科技有限责任公司 区块链跨链交易方法、跨链通信装置及存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180293556A1 (en) * 2017-04-05 2018-10-11 Samsung Sds Co., Ltd. Method and system for processing blockchain-based real-time transaction
CN107742210A (zh) * 2017-10-13 2018-02-27 布比(北京)网络技术有限公司 一种不同区块链间的跨链转账系统和方法
CN109271446A (zh) * 2018-08-30 2019-01-25 杭州复杂美科技有限公司 一种平行链数据同步方法、设备和存储介质
CN109377365A (zh) * 2018-10-18 2019-02-22 杭州复杂美科技有限公司 一种资产转移方法、设备和存储介质
CN109493015A (zh) * 2018-10-18 2019-03-19 杭州复杂美科技有限公司 一种资产转移方法、设备和存储介质
CN109831514A (zh) * 2019-03-02 2019-05-31 杭州复杂美科技有限公司 平行链共识方法、数据异常处理方法、设备和存储介质
CN110473093A (zh) * 2019-07-29 2019-11-19 杭州复杂美科技有限公司 平行链资产转移方法、设备和存储介质

Also Published As

Publication number Publication date
CN110473093A (zh) 2019-11-19

Similar Documents

Publication Publication Date Title
US11398914B2 (en) Blockchain-based data authorization method and apparatus
CN110457875B (zh) 基于区块链的数据授权方法及装置
US11310051B2 (en) Blockchain-based data authorization method and apparatus
US20210326813A1 (en) Parallel Chain Cross-Chain Transaction Method, Device and Storage Medium
WO2020043048A1 (zh) 一种平行链数据同步方法、设备和存储介质
CN110473094B (zh) 基于区块链的数据授权方法及装置
US11831656B2 (en) Providing data authorization based on blockchain
US11042876B2 (en) Transaction method and system based on centralized settlement and blockchain deposit certificates
WO2020043047A1 (zh) 一种平行链共识方法、设备和存储介质
US20210049608A1 (en) Transaction method and system based on centralized clearing and blockchain record keeping
WO2020001370A1 (zh) 一种多链并发交易方法
WO2020024994A1 (zh) 一种隐私交易方法及系统、设备和可存储介质
WO2021051761A1 (zh) 用于同步节点数据的方法和装置
WO2021139533A1 (zh) 共识交易发送方法、设备和存储介质
WO2021017693A1 (zh) 平行链资产转移方法、设备和存储介质
WO2020108419A1 (zh) 区块确认方法、设备和存储介质
US9589153B2 (en) Securing integrity and consistency of a cloud storage service with efficient client operations
CN109460405A (zh) 用于区块链网络的区块生成方法、同步方法、存储介质、计算设备
WO2022121348A1 (zh) 延时交易生成方法、延时交易执行方法、设备和存储介质
WO2020029930A1 (zh) 一种资产找回方法、设备和存储介质
WO2020133069A1 (zh) 区块链的数据处理方法和装置
WO2021057167A1 (zh) 基于fpga的安全智能合约处理器的交易处理方法及装置
US8719313B2 (en) Distributed data store with a designated master to ensure consistency
CN113132459B (zh) 分布式存储方法、系统、存储介质、信息数据处理终端
Chaparala et al. Liftchain: A scalable multi-stage nft transaction protocol

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: 20845936

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: 20845936

Country of ref document: EP

Kind code of ref document: A1