WO2021218459A1 - 跨链交互方法、装置和系统 - Google Patents

跨链交互方法、装置和系统 Download PDF

Info

Publication number
WO2021218459A1
WO2021218459A1 PCT/CN2021/080793 CN2021080793W WO2021218459A1 WO 2021218459 A1 WO2021218459 A1 WO 2021218459A1 CN 2021080793 W CN2021080793 W CN 2021080793W WO 2021218459 A1 WO2021218459 A1 WO 2021218459A1
Authority
WO
WIPO (PCT)
Prior art keywords
account
chain
information
blockchain
cross
Prior art date
Application number
PCT/CN2021/080793
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 WO2021218459A1 publication Critical patent/WO2021218459A1/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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/02Payment architectures, schemes or protocols involving a neutral party, e.g. certification authority, notary or trusted third party [TTP]

Definitions

  • This application relates to the field of blockchain technology, and in particular to a cross-chain interaction method, device and system.
  • cross-chain refers to the use of certain technologies to allow value to cross the barriers between chains, so that the value originally stored on a specific blockchain is converted to the value on another chain, thereby realizing the circulation of value.
  • a blockchain is a type of distributed ledger.
  • One blockchain is an independent ledger, and two chains belonging to different blockchain systems are two different independent ledgers, which are not related to each other. .
  • Blockchain technology can be applied in many fields such as finance, health care, supply chain, asset management, etc.
  • network isolation hinders the collaborative operation of different blockchains, which greatly limits the space for blockchain to play.
  • the realization of blockchain cross-chain transactions must first design a transaction trust mechanism between two cross-chain blockchain transactions, which mainly includes confirming that the transaction has occurred and written into the respective blockchain ledger, and the transaction is transferred. There is no double spend when transferring assets, and the transaction that has occurred has reached the consensus of the two blockchain systems; or a cross-chain transaction can be divided into many steps, how to ensure that all the steps included in the exchange occur or all do not occur, that is The atomicity of transactions is guaranteed.
  • This application aims to solve one of the technical problems in the related technology at least to a certain extent.
  • this application proposes a cross-chain interaction system that can provide cross-chain services to blockchains with cross-chain requirements, and improve the speed and throughput of cross-chain transactions.
  • This application proposes a cross-chain interaction method.
  • This application proposes a cross-chain interaction device.
  • An embodiment of the present application proposes a cross-chain interaction system, including: a first block chain, a second block chain, and a cross-chain transaction platform end, the cross-chain transaction platform end including: a platform transaction module and Verification entity; the platform transaction module receives the first account information and first balance information of the first original account sent by the first blockchain and the second account information of the second original account sent by the second blockchain Account information and second balance information; the verification entity verifies that the atomic exchange verification of the cross-chain transaction is successful, then sends the atomic exchange success information to the platform transaction module; the platform transaction module according to the atomic exchange success information, The target balance is deducted from the remittance account, and the target balance is added to the receiving account; the platform transaction module updates the first original account balance information and the second original account balance information and returns The first block chain and the second block chain.
  • a cross-chain interaction method including: a platform transaction module receives first account information and first balance information of a first original account sent by a first blockchain, and a second blockchain The second account information and second balance information of the second original account sent; the verification entity verifies that the atomic exchange verification of the cross-chain transaction is successful, then sends the atomic exchange success information to the platform transaction module; the platform transaction module according to The atomic exchange success information, deduct the target balance from the remittance account, and add the target balance to the receiving account; the platform transaction module updates the first original account balance information and the first 2.
  • the original account balance information is returned to the first block chain and the second block chain.
  • a cross-chain interaction device including: a platform transaction module for receiving first account information and first balance information of a first original account sent by a first blockchain and a second The second account information and the second balance information of the second original account sent by the blockchain; the verification entity is used to verify that the atomic exchange verification of the cross-chain transaction is successful, and then the atomic exchange success information is sent to the platform transaction module; The platform transaction module is further configured to deduct a target balance from the remittance account and add the target balance to the receiving account according to the atomic exchange success information; the platform transaction module is also used to Update the first original account balance information and the second original account balance information to return to the first blockchain and the second blockchain.
  • the verification entity verifies that the atomic swap verification of the cross-chain transaction is successful, and then sends the successful atomic swap information to the platform transaction module; the platform transaction module deducts the target balance from the remittance account according to the atomic swap success information, and adds the target balance to the collection Account; the platform transaction module updates the first original account balance information and the second original account balance information to return to the first block chain and the second block chain.
  • FIG. 1 is a schematic structural diagram of a cross-chain interaction system provided by an embodiment of the application
  • Fig. 2 is a structural example diagram of a cross-chain interaction system provided by an embodiment of the application
  • FIG. 3 is a schematic diagram of a workflow of a verification entity provided by an embodiment of the application.
  • FIG. 4 is an example diagram of the system account book structure provided by an embodiment of the application.
  • FIG. 5 is a schematic flowchart of a cross-chain interaction method provided by an embodiment of the application.
  • Fig. 6 is an example flow chart of a cross-chain interaction system provided by an embodiment of the application.
  • FIG. 7 is a schematic structural diagram of a cross-chain interaction device provided by an embodiment of the application.
  • Fig. 1 is a schematic structural diagram of a cross-chain interaction system provided by an embodiment of the application.
  • the cross-chain interaction system is an independent blockchain system suitable for cross-chain scenarios, which can provide cross-chain services to two or more blockchains with cross-chain requirements, and is applied to each with cross-chain requirements.
  • this kind of blockchain the completion of cross-chain transactions is completed safely and credibly, and the consistency of the ledger after cross-chain transactions is guaranteed. It has the characteristics of fast cross-chain transactions and large throughput.
  • the cross-chain interaction system includes: a first block chain 100, a second block chain 200, and a cross-chain transaction platform terminal 300.
  • the cross-chain transaction platform terminal 300 includes: a platform transaction module 301 and a verification entity 302 .
  • the first blockchain 100 is connected to the cross-chain transaction platform terminal 300 through a first interface
  • the second blockchain 200 is connected to the cross-chain transaction platform terminal 300 through a second interface to realize cross-chain transactions.
  • Cross-chain consensus, ledger update, asset transfer function is connected to the cross-chain transaction platform terminal 300 through a second interface to realize cross-chain transactions.
  • the first block chain 100 is mainly responsible for transmitting the first account information and the corresponding balance value belonging to the first block chain to the cross-chain transaction platform terminal 300 through the first interface, and returning to the transaction account in the first block chain The updated transaction information.
  • the second blockchain 200 is responsible for transmitting the second account information and the corresponding balance value belonging to the second blockchain to the cross-chain transaction platform terminal 300 through the second interface, and returning updates to the trading account in the second blockchain After the transaction information.
  • the cross-chain transaction platform terminal 300 includes: a platform transaction module 301 and a verification entity 302, and the verification entity 302 (Validation Peer Entity, VPE for short).
  • the main function of the verification entity 302 is to verify the success of atomic transactions.
  • a verification entity 302 is constructed in 300 to verify the success of the cross-chain transaction.
  • the initial state of the corresponding account is undefined at the beginning. According to the success or failure of the atomic exchange, it is divided into the success or failure of the transaction.
  • the platform transaction module 301 is mainly responsible for processing the successful atomic transaction transaction output by the verification entity 302, and returns the account balance information of the transaction result to the first blockchain 100 and the second blockchain 200.
  • Each account of the platform transaction module 301 records transaction events that belong only to the account in the order of transactions, forming a unique chain corresponding to the account.
  • the design of one chain for each account makes each payment transaction only cause two related transactions.
  • One chain (or more than two, if the same payment transaction can contain multiple receiving accounts) needs to be changed without affecting other chains.
  • the updates between different chains are asynchronous and do not need to be performed at the same time, which improves the throughput of the system quantity.
  • the latest block (tail block) of each chain represents the (current valid state) of the chain.
  • the block data before the tail block only represents history and is only used for retrospective reconciliation.
  • the computing node can discard historical data (ie Ledger pruning), only the tail block of each chain is retained as the latest ledger, which greatly reduces storage requirements.
  • the cross-chain interaction system uses blockchain A as the first blockchain and blockchain B as the second blockchain as an example, as shown in Figure 2.
  • Blockchain A and Blockchain B can perform operations such as exporting data, trading and updating data.
  • the cross-chain transaction platform includes platform transaction modules and verification entities. Platform transaction modules include accounts a, b, and c.
  • Blockchain A and The cross-chain transaction platform can carry out two-way information interaction, and the blockchain B can also carry out two-way information interaction with the cross-chain transaction platform.
  • the platform transaction module 301 receives the first account information, first balance information, and first account information of the first original account sent by the first blockchain 100.
  • the platform transaction module 301 is composed of a chain of accounts, where the initial account block is based on the cross-chain transaction passed by the first blockchain through the first interface and the second blockchain through the second interface.
  • the account information of the blockchain is initialized.
  • An account block contains only one account and its corresponding balance information.
  • the account balance is recorded in the system ledger, which corresponds to the last account block of each account chain in the system ledger.
  • the verification request is checked and sent.
  • the difference between the balance of the block and the balance of the previous block that is, the amount of money sent
  • the receiving account can add the previous measured balance (according to the measured value) to the final balance given in the new receiving block, by Therefore, the processing speed when downloading a large number of blocks is improved.
  • the system account has already given the history record.
  • the account information can be account number, account name and other information.
  • the requested account can be the first original account or the second original account.
  • the receiving account can be the first original account or the second original account. Choose according to your needs.
  • the balance information refers to the specific value of the original account at the current moment.
  • the verification entity 302 verifies that the atomic exchange verification of the cross-chain transaction is successful, and then sends the successful atomic exchange information to the platform transaction module 301.
  • the verification entity 302 to verify the atomic swap verification of cross-chain transactions.
  • the first blockchain deposits the amount of the first account into the first contract address, and generates access to the contract address.
  • the first key, and the first key is hashed to generate the first hash value
  • the second blockchain generates the second contract address according to the first hash value, and deposits the second account amount into the second contract Address
  • the first block chain obtains the amount of the second account according to the first key
  • the second block chain obtains the amount of the first account according to the first key, then it is determined that the atomic exchange verification is successful.
  • Blockchain A deposits the transaction amount, and A deposits the account amount into the contract address, which is similar to a safe deposit box. After the security protection is created in this way, A will also generate one for accessing it Then, she shares the cryptographic hash value of this key with B; (2) Blockchain B deposits the transaction amount, and B uses the hash value provided by A to create another secure contract address for storage Enter his transaction amount D; (3) Blockchain A judges the success of the transaction amount in the exchange of Blockchain B, and A uses its own key to make the judgment of the success of the exchange amount of the transaction in Blockchain B; (4) )
  • the verification entity records the information about whether the atomic exchange is successful or not. If the success judgment in block A is completed, then B can naturally get A's account amount by using A's key. At this time, the atomic transaction is successful and is recorded in the verification entity. If the atomic transaction is unsuccessful, the verification entity record is undefined.
  • the atomic exchange is either successful or failed, and there will be no intermediate state.
  • the state of the atomic exchange changes, the state of the atomic exchange is recorded as true in the verification entity 302 of the cross-chain transaction platform 300, if If the atomic exchange fails, undefined is recorded in the verification entity 302.
  • the verification entity 302 records a transaction in the true state, the verification entity 302 starts to transmit information to the platform transaction module 301.
  • the atomic exchange ensures the state uniformity of the cross-chain transaction information, and then reaches a consensus.
  • the platform transaction module 301 deducts the target balance from the remittance account and adds the target balance to the receiving account based on the atomic exchange success information, and the platform transaction module updates the first original account balance information and the second original account balance information to return The first blockchain 100 and the second blockchain 200.
  • the block grid is digitally signed by the transaction data. And the locking mechanism ensures the consistency of the entire ledger, and realizes the selection and elimination of conflicting blocks (malicious bifurcation, double-spending transactions can create multiple conflicting blocks), the first area of each account chain in the block grid
  • the block is filled with the voting representatives voluntarily selected by the user, and the user is allowed to send update transactions to replace them at any time.
  • the weight of the voting representative is determined by the sum of the balances of all accounts selected as the representative.
  • the first block chain and the second block chain collect the transactions completed in the platform transaction module at the same fixed time as the block generation time. Trading Information.
  • the platform transaction module 301 after the platform transaction module 301 receives the first original account balance information sent by the first blockchain and the second original account balance information sent by the second blockchain, it further includes: The first original account in the blockchain 100 creates its corresponding multiple first sub-accounts in the block grid; the second original account in the second blockchain 200 creates its corresponding multiple sub-accounts in the block grid The second sub-account.
  • the block contains a single transaction, the transaction specifically refers to the operation, and the block refers to the digital code of the transaction, the transaction is signed by the private key belonging to the account that executes the transaction, and the block constitutes a block-lattice structure ,
  • Each account chain is equivalent to the transaction/balance history of the account.
  • Each account chain can only be updated by the owner of the account. This allows each account chain to be updated to the rest of the block grid immediately and asynchronously, thereby quickly generating transactions.
  • the platform transaction module 301 includes: a system ledger of all accounts; the system ledger is forwarded to the cross-chain transaction through the first interface of the first blockchain and the first interface of the second blockchain In the first block chain and the second block chain, the first block chain and the second block chain perform local ledger update according to the system ledger information returned by the platform transaction module 301.
  • the ledger structure refers to the block grid structure.
  • the system ledger is a collection of all accounts with a global nature. It is a collection of each account chain. Each account agrees to pass the signature check. Only the account owner You can modify your own chain.
  • the system ledger records the balance changes on each account chain.
  • the system ledger of the platform transaction module 301 reaches a consensus, the system ledger will be forwarded to the corresponding through the blockchain A interface and the blockchain B interface.
  • the cross-chain transaction blockchain updates the local ledger based on the returned system ledger information.
  • the status of the target account is set to the locked status.
  • the first account information and first balance information of the first original account sent by the first blockchain and the second original account sent by the second blockchain are received through the platform transaction module
  • the second account information and the second balance information of the verification entity the verification entity verifies that the atomic exchange verification of the cross-chain transaction is successful, then the atomic exchange success information is sent to the platform transaction module;
  • the platform transaction module deducts the remittance account from the remittance account based on the atomic exchange success information
  • the target balance, and the target balance is added to the receiving account;
  • the platform transaction module updates the first original account balance information and the second original account balance information to return to the first block chain and the second block chain.
  • this application also proposes a cross-chain interaction method.
  • FIG. 5 is a schematic flowchart of a cross-chain interaction method provided by an embodiment of the application.
  • the cross-chain interaction method includes:
  • Step 101 The platform transaction module receives the first account information and first balance information of the first original account sent by the first blockchain and the second account information and second balance information of the second original account sent by the second blockchain. ⁇ Amount information.
  • step 102 the verification entity verifies that the atomic exchange verification of the cross-chain transaction is successful, and then sends the atomic exchange success information to the platform transaction module.
  • the verification entity verifying that the atomic swap verification of the cross-chain transaction is successful includes: depositing the amount of the first account in the first contract address of the first blockchain, and generating the first password to access the contract address Key, and hash the first key to generate the first hash value, the second block chain generates the second contract address according to the first hash value, and deposits the second account amount into the second contract address.
  • a block chain obtains the amount of the second account according to the first key, and the second block chain obtains the amount of the first account according to the first key, then it is determined that the atomic exchange verification is successful.
  • step 103 the platform transaction module deducts the target balance from the remittance account and adds the target balance to the receiving account according to the successful atomic exchange information.
  • Step 104 The platform transaction module updates the first original account balance information and the second original account balance information to return to the first block chain and the second block chain.
  • the cross-chain transaction platform end-platform transaction module uses a block-lattice structure, each account chain is equivalent to the account’s transaction/balance history record, each The account chain can only be updated by the owner of the account, allowing each account chain to be updated to the rest of the block grid in an asynchronous manner immediately, thereby quickly generating transactions, completing the core transaction functions of cross-chain transactions and ensuring the consistency of the ledger by consensus
  • the function plays a major role in the accuracy and timeliness of cross-chain transactions.
  • the account information and balance information of the two blockchains that need to be cross-chain transactions are successfully imported; second, the cross-chain transaction platform terminal-platform transaction module is successfully initialized; third, the block for cross-chain transactions
  • the block generation time of the chain taking into account the transaction progress in the cross-chain transaction platform end-platform transaction module and the efficiency of the returned information, when the successful transaction of the atomic exchange in the verification entity is passed to the cross-chain transaction platform end-platform transaction module,
  • the first interface of the first block chain and the second interface of the second block chain will collect the cross-chain transaction platform end-platform at the same fixed time as the block generation time.
  • the transaction completed in the transaction module fourth, the cross-chain transaction platform terminal-platform transaction module account status information is returned.
  • FIG. 6 is used for detailed description.
  • Blockchain A interface, Blockchain B interface, cross-chain transaction platform end-platform transaction module system pre-configuration function: when two blockchains need to conduct cross-chain transactions , Import its original account balance information into the cross-chain transaction platform end-platform transaction module; 2) Construct the cross-chain transaction platform end-platform transaction module, and import the account information and balance information of the two blockchains that require cross-chain transactions Success means that the information is successfully imported into the cross-chain trading platform-platform trading module, and the block account initialization of the block grid system is carried out: the account in the block chain A is created in the block grid to create its corresponding accounts a1, a2, a3 ; Create the corresponding account b1, b2, b3 of the account in the block chain B in the block grid «; Cross-chain transaction platform terminal-platform transaction module -> block chain A interface, block chain B Interface: the block information initialization success message is returned.
  • the block chain A interface and the block chain B interface are used to initialize the cross-chain transaction platform terminal-the successful monitoring
  • Cross-chain transaction platform terminal-information construction of the verification entity record the success of the atomic exchange of the cross-chain transaction, if the atomic exchange of the cross-chain transaction is successful, the transaction record will be performed in the verification entity, otherwise the verification entity will be verified The record is undefined; 4) Cross-chain transaction platform end-verification entity -> cross-chain transaction platform end-platform transaction module, atomic exchange successful transaction information transfer, and the successful atomic exchange transaction information in the verification entity is passed to the platform transaction module; 5 ) Cross-chain transaction platform terminal-platform transaction module, conduct cross-chain transactions, find the corresponding account according to the successful information of the atomic exchange transaction, conduct the transaction, send the amount-deduct the balance from the sender's account-accept the amount-the recipient will The amount is added to the balance of the beneficiary account-the sending and receiving actions are carried out separately, ensuring the asynchronous nature of the transaction; 6) Cross-chain transaction platform end-platform transaction module: Cross-chain transaction consensus; 7) Cross-chain transaction Platform end-platform transaction module: According to the atomic
  • the first account information and first balance information of the first original account sent by the first blockchain and the second original account sent by the second blockchain are received through the platform transaction module
  • the second account information and the second balance information of the verification entity the verification entity verifies that the atomic exchange verification of the cross-chain transaction is successful, then the atomic exchange success information is sent to the platform transaction module;
  • the platform transaction module deducts the remittance account from the remittance account based on the atomic exchange success information
  • the target balance, and the target balance is added to the receiving account;
  • the platform transaction module updates the first original account balance information and the second original account balance information to return to the first block chain and the second block chain.
  • this application also proposes a cross-chain interaction device.
  • FIG. 7 is a schematic structural diagram of a cross-chain interaction device provided by an embodiment of the application.
  • the device includes: a platform transaction module 701 and a verification entity 702.
  • the platform transaction module 701 is configured to receive the first account information and first balance information of the first original account sent by the first blockchain and the second account information and second account information of the second original account sent by the second blockchain. Balance information.
  • the verification entity 702 is used to verify that the atomic exchange verification of the cross-chain transaction is successful, and then sends the atomic exchange success information to the platform transaction module.
  • the platform transaction module 701 is also used for deducting the target balance from the remittance account and adding the target balance to the receiving account according to the successful atomic exchange information.
  • the platform transaction module 701 is also used for the platform transaction module to update the first original account balance information and the second original account balance information back to the first block chain and the second block chain.
  • the first account information and first balance information of the first original account sent by the first blockchain and the second original account sent by the second blockchain are received through the platform transaction module
  • the second account information and the second balance information of the verification entity the verification entity verifies that the atomic exchange verification of the cross-chain transaction is successful, then the atomic exchange success information is sent to the platform transaction module;
  • the platform transaction module deducts the remittance account from the remittance account based on the atomic exchange success information
  • the target balance, and the target balance is added to the receiving account;
  • the platform transaction module updates the first original account balance information and the second original account balance information to return to the first block chain and the second block chain.
  • an embodiment of the present application proposes an electronic device, including: a memory, a processor, and a computer program stored on the memory and running on the processor.
  • the processor executes the program
  • the cross-chain interaction method described in the foregoing terminal device executes the method embodiment.
  • the embodiment of the present application proposes a computer-readable storage medium on which a computer program is stored.
  • the program is executed by a processor, the cross-chain interaction method described in the foregoing method embodiment is implemented.
  • first and second are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with “first” and “second” may explicitly or implicitly include at least one of the features. In the description of the present application, "a plurality of” means at least two, such as two, three, etc., unless specifically defined otherwise.
  • a "computer-readable medium” can be any device that can contain, store, communicate, propagate, or transmit a program for use by an instruction execution system, device, or device or in combination with these instruction execution systems, devices, or devices.
  • computer readable media include the following: electrical connections (electronic devices) with one or more wiring, portable computer disk cases (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable and editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM).
  • the computer-readable medium may even be paper or other suitable medium on which the program can be printed, because it can be used, for example, by optically scanning the paper or other medium, followed by editing, interpretation, or other suitable media if necessary. The program is processed in a manner to obtain the program electronically, and then stored in the computer memory.
  • each part of this application can be implemented by hardware, software, firmware, or a combination thereof.
  • multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system.
  • Discrete logic gate circuits with logic functions for data signals Logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate array (PGA), field programmable gate array (FPGA), etc.
  • a person of ordinary skill in the art can understand that all or part of the steps carried in the method of the foregoing embodiments can be implemented by a program instructing relevant hardware to complete.
  • the program can be stored in a computer-readable storage medium. When executed, it includes one of the steps of the method embodiment or a combination thereof.
  • the functional units in the various embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium.
  • the aforementioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Accounting & Taxation (AREA)
  • Strategic Management (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)

Abstract

一种跨链交互方法、装置和系统,其中,方法包括:平台交易模块接收第一区块链发送的第一原始账户的第一账户信息和第一余额信息和第二区块链发送的第二原始账户的第二账户信息和第二余额信息(101);验证实体验证跨链交易的原子交换验证成功,则将原子交换成功信息发送给平台交易模块(102);平台交易模块根据原子交换成功信息,从汇款账户中扣除目标余额,以及将目标余额添加到收款账户(103);平台交易模块更新第一原始账户余额信息和第二原始账户余额信息返回第一区块链和第二区块链(104)。由此,能够给有跨链需求的区块链提供跨链服务,提高跨链交易的速度和吞吐量。

Description

跨链交互方法、装置和系统
相关申请的交叉引用
本申请要求北京邮电大学于2020年04月28日提交的、发明名称为“跨链交互方法、装置和系统”的、中国专利申请号“202010351384.7”的优先权。
技术领域
本申请涉及区块链技术领域,尤其涉及一种跨链交互方法、装置和系统。
背景技术
随着区块链技术和经济的发展,对区块链跨链提出明显的诉求。目前的区块链项目都是由不同团队基于不同的场景需求和设计理念,采用不同的技术架构开发出的异构区块链。由于区块链本身的技术特点,每个区块链都是一个孤立的网络,因此这些项目就像是一个个相互隔绝的“信息孤岛”。因此,如何实现区块链之间的互联互通和价值转移成为当前区块链技术的研究重点。
其中,跨链指的是通过某些技术让价值跨过链与链之间的障碍,使得原本存储在特定区块链上的价值转换为另一条链上的价值,从而实现价值的流通。
具体地,区块链是分布式总账的一种,一条区块链就是一个独立的账本,而两条分属于不同区块链系统的链,就是两个不同的独立的账本,彼此没有关联性。本质上价值没有办法在异质账本间转移,但是对于具体的某个用户,用户在一条区块链上存储的价值,能够变成另一条链上的价值,这就是价值的流通。区块链技术可以被应用在金融、健康医疗、供应链、资产管理等诸多领域,但是受吞吐量、网络孤立性、监管、伸缩性等因素的制约,目前的区块链项目并不能很好的服务于商业应用。在区块链所面临的诸多问题中,网络孤立性阻碍了不同区块链之间的协同操作,极大程度的限制了区块链的发挥空间。
相关技术中,实现区块链跨链交易首先要设计两个跨链区块链交易之间的交易信任机制,主要包括确认交易已经发生并写入各自的区块链账本中,交易发生转移的时候转移资产没有双花,发生的交易已经达成了两个区块链系统的共识导致;或者是一个跨链交易可以分为很多步骤,如何保证交易所包含的步骤全部发生或者全部不发生,即交易的原子性保障,此保障使得交易没有临界状态,交易状态更加明确;或者是当跨链交易共识达成之后,如何完成跨链的资产管理,真正做到跨链交易物理上的完成;以及当两个跨链系统发生跨链交易时,两系统的状态难免彼此影响,如果两交易链的状态无法隔离,就会出现这 样一种情况,当跨链交易中的一条链受到攻击时,另一条区块链也会受到影响,因此,如何在跨链交易进行的过程中保障对方的区块链系统安全以及保障本区块链系统的安全这也是很关键的。
发明内容
本申请旨在至少在一定程度上解决相关技术中的技术问题之一。
为此,本申请提出一种跨链交互系统,能够给有跨链需求的区块链提供跨链服务,提高跨链交易的速度和吞吐量。
本申请提出一种跨链交互方法。
本申请提出一种跨链交互装置。
本申请一方面实施例提出了一种跨链交互系统,包括:包括:第一区块链、第二区块链和跨链交易平台端,所述跨链交易平台端包括:平台交易模块和验证实体;所述平台交易模块接收所述第一区块链发送的第一原始账户的第一账户信息和第一余额信息和所述第二区块链发送的第二原始账户的第二账户信息和第二余额信息;所述验证实体验证跨链交易的原子交换验证成功,则将原子交换成功信息发送给所述平台交易模块;所述平台交易模块根据所述原子交换成功信息,从所述汇款账户中扣除目标余额,以及将所述目标余额添加到所述收款账户;所述平台交易模块更新所述第一原始账户余额信息和所述的第二原始账户余额信息返回所述第一区块链和所述第二区块链。
本申请另一方面实施例提出了一种跨链交互方法,包括:平台交易模块接收第一区块链发送的第一原始账户的第一账户信息和第一余额信息和第二区块链发送的第二原始账户的第二账户信息和第二余额信息;验证实体验证跨链交易的原子交换验证成功,则将原子交换成功信息发送给所述平台交易模块;所述平台交易模块根据所述原子交换成功信息,从所述汇款账户中扣除目标余额,以及将所述目标余额添加到所述收款账户;所述平台交易模块更新所述第一原始账户余额信息和所述的第二原始账户余额信息返回所述第一区块链和所述第二区块链。
本申请又一方面实施例提出了一种跨链交互装置,包括:平台交易模块,用于接收第一区块链发送的第一原始账户的第一账户信息和第一余额信息和第二区块链发送的第二原始账户的第二账户信息和第二余额信息;验证实体,用于验证跨链交易的原子交换验证成功,则将原子交换成功信息发送给所述平台交易模块;所述平台交易模块,还用于根据所述原子交换成功信息,从所述汇款账户中扣除目标余额,以及将所述目标余额添加到所述收款账户;所述平台交易模块,还用于更新所述第一原始账户余额信息和所述的第二原始账户余额信息返回所述第一区块链和所述第二区块链。
本申请实施例所提供的技术方案可以包含如下的有益效果:
通过平台交易模块接收第一区块链发送的第一原始账户的第一账户信息和第一余额信息和第二区块链发送的第二原始账户的第二账户信息和第二余额信息;验证实体验证跨链交易的原子交换验证成功,则将原子交换成功信息发送给平台交易模块;平台交易模块根据原子交换成功信息,从汇款账户中扣除目标余额,以及将目标余额添加到收款账户;平台交易模块更新第一原始账户余额信息和的第二原始账户余额信息返回第一区块链和第二区块链。由此,能够给有跨链需求的区块链提供跨链服务,提高跨链交易的速度和吞吐量。
附图说明
本申请上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:
图1为本申请实施例所提供的一种跨链交互系统的结构示意图;
图2为本申请实施例所提供的一种跨链交互系统的结构示例图;
图3为本申请实施例所提供的验证实体的工作流程示意图;
图4为本申请实施例所提供的系统账本结构示例图;
图5为本申请实施例所提供的一种跨链交互方法的流程示意图;
图6为本申请实施例所提供的一种跨链交互系统的流程示例图;
图7为本申请实施例提供的一种跨链交互装置的结构示意图。
具体实施方式
下面详细描述本申请的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本申请,而不能理解为对本申请的限制。
下面参考附图描述本申请实施例的跨链交互方法、装置和系统。
图1为本申请实施例所提供的一种跨链交互系统的结构示意图。
具体地,跨链交互系统是一个独立的适用于跨链场景区块链系统,能够给两个或者两个以上有跨链需求的区块链提供跨链服务,应用于有跨链需求的各种区块链中,安全可信的完成跨链交易的完成,保证跨链交易后的账本一致性,具有跨链交易速度快,吞吐量大的特点。
如图1所示,该跨链交互系统包括:第一区块链100、第二区块链200和跨链交易平台端300,跨链交易平台端300包括:平台交易模块301和验证实体302。
在本申请实施例中,第一区块链100通过第一接口与跨链交易平台端300连接,第二 区块链200通过第二接口与跨链交易平台端300连接,实现跨链交易,跨链共识,账本更新,资产转移的功能。
第一区块链100通过第一接口主要负责给跨链交易平台端300传输属于第一区块链的第一账户信息和相对应的余额值,以及给第一区块链中的交易账户返回更新后的交易信息。
第二区块链200通过第二接口负责给跨链交易平台端300传输属于第二区块链的第二账户信息和相对应的余额值,以及给第二区块链中的交易账户返回更新后的交易信息。
跨链交易平台端300包括:平台交易模块301和验证实体302,验证实体302(Validation Peer Entity,简称VPE),验证实体302的主要功能是验证原子交易的成功与否,在跨链交易平台端300中构建验证实体302,用于验证跨链交易的成功性,一开始对应账户的初始状态为undefined(未限定的),根据原子交换的成功与否,分为交易的成功或失败。
平台交易模块301主要负责处理验证实体302输出的原子交易成功的交易,并将交易结果各账户余额信息返回给第一区块链100、第二区块链200。平台交易模块301的每个账户,按交易顺序分别记录仅属于该账户的交易事件,形成该账户对应的唯一的一条链,一个账户一条链的设计,使得每笔支付交易只会导致相关的两条链(或两个以上,若同一笔支付交易中可以包含多个接收账户)需要变更,而不影响其他链,不同链之间的更新是异步的,不需要同时进行,提高了系统的吞吐量。每个链的最新区块(尾部区块)代表了该链的(当前有效状态),尾部区块之前的区块数据只代表历史,仅用于回溯对账,计算节点可抛弃历史数据(即账本修剪),只保留每条链的尾部区块作为最新账本,这就极大地降低了存储需求。
为了本领域人员更加清楚上述结构,如图2所示,跨链交互系统以区块链A作为第一区块链,区块链B作为第二区块链为例,如图2所示,区块链A和区块链B可以进行导出数据、交易和更新数据等操作,跨链交易平台端包括平台交易模块和验证实体,平台交易模块包括账户a、b和c,区块链A与跨链交易平台端可以进行双向信息交互,区块链B也可以与跨链交易平台端可以进行双向信息交互。
具体地基于上述结构,给有跨链需求的区块链提供跨链服务,平台交易模块301接收第一区块链100发送的第一原始账户的第一账户信息和第一余额信息和第二区块链200发送的第二原始账户的第二账户信息和第二余额信息。
可以理解的是,平台交易模块301是由一条条账户链构成的,其中,初始账户块是根据第一区块链通过第一接口,第二区块链通过第二接口传递过来的跨链交易区块链的账户信息进行初始化,一个账户块只包含一个账户及其对应的余额信息,账户余额记录在系统账本中,对应的是系统账本每条账户链的最后一个账户块,验证要求检查发送块的余额与前一个块的余额之间的差(即发送的金额数),然后接收账户可以将先前的测量余额(按测 量值)增加到新的接收块中给出的最终余额中,由此,提高下载大量块时的处理速度,请求账户历史记录时,系统账户已经给出了历史记录。
其中,账户信息可以是账户号码、账户名称等信息,请求账户可以是第一原始账户也可以是第二原始账户,同理,接收账户可以是第一原始账户也可以是第二原始账户,可以根据需要进行选择,余额信息指的是原始账户当前时刻的账户具体数值。
验证实体302验证跨链交易的原子交换验证成功,则将原子交换成功信息发送给平台交易模块301。
其中,验证实体302验证跨链交易的原子交换验证的方式有很多种,作为一种可能实现方式,第一区块链的将第一账户金额存入第一合约地址,并生成访问合约地址的第一密钥,以及对第一密钥进行哈希处理生成第一哈希值,第二区块链根据第一哈希值生成第二合约地址,并将第二账户金额存入第二合约地址,第一区块链根据第一密钥获取第二账户金额,第二区块链根据第一密钥获取第一账户金额,则确定原子交换验证成功。
举例而言,如图3所示,当区块链A中的Alice,区块链B中的Bob要进行跨链交易时,执行原子交换的方法如下:
具体地,(1)区块链A中存入交易金额,A将账户金额存入合约地址,该地址类似于一个保险箱,通过该方式创建好安全防护后,A还会生成一个用于访问它的密钥,然后,她与B共享此密钥的加密哈希值;(2)区块链B存入交易金额,B使用A提供的哈希值创建出另一个安全合约地址,用于存入他的交易金额D;(3)区块链A在兑换区块链B中交易金额成功性判断,A使用它自身创建的密钥进行兑换区块链B中交易金额成功性判断;(4)验证实体记录,原子交换成功与否信息,若区块A中成功性判断完成,此时B自然可以凭借A的密钥拿到A的账户金额,此时原子交易成功,被记录在验证实体中,若原子交易不成功,验证实体记录为undefined。
也就是说,原子交换就是要么交换成功,要么失败,不会存在中间状态,当原子交换的状态发生改变时,在跨链交易平台端300的验证实体302中记录原子交换的状态为true,若原子交换失败,则在验证实体302内部记录undefined。当验证实体302记录一个true状态的交易时,验证实体302就开始向平台交易模块301传输信息,原子交换保证了跨链交易信息的状态统一性,继而达成共识。
进一步地,平台交易模块301根据原子交换成功信息,从汇款账户中扣除目标余额,以及将目标余额添加到收款账户,平台交易模块更新第一原始账户余额信息和的第二原始账户余额信息返回第一区块链100和第二区块链200。
举例而言,当区块链A中的账户a与区块链B中的账户b,原子交换验证成功,验证实体初始化为true时,在跨链交易平台端300-平台交易模块301中对应的账户a和账户b 发生交易,a账户链中会生成只包含这笔交易信息的区块,a账户的余额发生了变化,b账户链感知到a账户链中的数据变化后,也会生成只包含这笔交易信息的区块,b账户的余额也发生了相应的变化。
虽然A链与B链在形式上是互相独立的,但是a账户链与b账户链的数据更新必须相互融洽,不可以出现资金发送与接收数额不一致的现象,区块格通过交易数据的数字签名和锁定机制确保整个账本的一致性,并实现对冲突区块(恶意分叉、双花交易可制造多个冲突区块)的选择与淘汰,区块格的每个账户链的第一个区块中填写了用户自愿选择的投票代表,并允许用户随时发送更新交易将其更换,投票代表的权重由选择作为代表的所有账户的余额总和所决定。
具体地,将资金从一个账户转移到另一个账户需要进行两次交易:一次汇款从汇款人的账户中扣除余额、另一次交易是收款人将金额添加到收款人账户的余额中。在发送者和接收者的账户中将金额作为单独的交易进行转移有几个重要目的:可以实现顺序传入的交易是固定异步的、保持较小的交易以适合UDP(用户数据报协议,User Datagram Protocol)数据包、通过最小化数据占用来促进账本修剪和将已结算的交易与未结算的交易隔离开。
在本申请的一个实施例中,根据账户所在原区块链的出块时间,第一区块链和第二区块链每隔与出块时间相同的固定时间收集一次平台交易模块中完成的交易信息。
在本申请的一个实施例中,在平台交易模块301接收第一区块链发送的第一原始账户余额信息和第二区块链发送的第二原始账户余额信息之后,还包括:将第一区块链100中的第一原始账户在区块格中创建其对应的多个第一子账户;将第二区块链200中的第二原始账户在区块格中创建其对应的多个第二子账户。
需要说明的是,块包含单个交易,交易专门是指操作,而块是指交易的数字编码,交易由属于执行交易的账户的私钥进行签名,区块组成区块格(block-lattice)结构,每个账户链,相当于账户的交易/余额历史记录。每个账户链只能由账户的所有者更新。这就允许立即以异步方式将每个账户链更新到区块格的其余部分,从而快速生成交易。
在本申请的一个实施例中,平台交易模块301,包括:所有账户集合的系统账本;系统账本通过第一区块链的第一接口和第二区块链的第一接口转发到跨链交易的第一区块链和所述第二区块链中,第一区块链和第二区块链根据平台交易模块301返回系统账本信息来进行本地账本更新。
举例而言,如图4所示,账本结构参考区块格结构,系统账本是具有全局性质的所有账户集合,是每一个账户链的集合,每个账户都同意通过签名检查,只有账户所有者可以修改自己的链,系统账本记录了每条账户链上的余额变化,当平台交易模块301的系统账本达成共识后,将系统账本通过区块链A接口,区块链B接口来转发到对应跨链交易的区 块链中,跨链交易的区块链根据返回系统账本信息来进行本地账本更新。
在本申请的一个实施例中,当一个发送或接收交易要改变一个节点的账户状态时,将目标账户的状态设为锁定状态。
具体地,两个(或多个)带符号的块引用同一先前的块时,就会发生分叉,这些分叉区块导致账户链的状态产生分歧,必须解决。所以在此系统内引入一个预先占位的机制,因为区块格里的接受和发送是异步的,所以在分叉产生的时候只考虑一个节点的状态变化,当一个发送或接收交易要改变一个节点的账户状态的时候,将这个账户的状态设为不可达即锁定状态。若由其他节点也想改变这个账户的状态就排队等待,当交易完成后,账户状态更改为可达,再继续下面的操作。
本申请实施例的跨链交互系统中,通过平台交易模块接收第一区块链发送的第一原始账户的第一账户信息和第一余额信息和第二区块链发送的第二原始账户的第二账户信息和第二余额信息;验证实体验证跨链交易的原子交换验证成功,则将原子交换成功信息发送给平台交易模块;平台交易模块根据原子交换成功信息,从汇款账户中扣除目标余额,以及将目标余额添加到收款账户;平台交易模块更新第一原始账户余额信息和的第二原始账户余额信息返回第一区块链和第二区块链。由此,能够给有跨链需求的区块链提供跨链服务,提高跨链交易的速度和吞吐量。
为了实现上述实施例,本申请还提出一种跨链交互方法。
图5为本申请实施例提供的一种跨链交互方法的流程示意图。
如图5所示,该跨链交互方法包括:
步骤101,平台交易模块接收第一区块链发送的第一原始账户的第一账户信息和第一余额信息和第二区块链发送的第二原始账户的第二账户信息和第二余额信息。
步骤102,验证实体验证跨链交易的原子交换验证成功,则将原子交换成功信息发送给平台交易模块。
在本申请的一个实施例中,验证实体验证跨链交易的原子交换验证成功,包括:第一区块链的将第一账户金额存入第一合约地址,并生成访问合约地址的第一密钥,以及对第一密钥进行哈希处理生成第一哈希值,第二区块链根据第一哈希值生成第二合约地址,并将第二账户金额存入第二合约地址,第一区块链根据第一密钥获取第二账户金额,第二区块链根据第一密钥获取第一账户金额,则确定原子交换验证成功。
步骤103,平台交易模块根据原子交换成功信息,从汇款账户中扣除目标余额,以及将目标余额添加到收款账户。
步骤104,平台交易模块更新第一原始账户余额信息和的第二原始账户余额信息返回 第一区块链和第二区块链。
具体地,在跨链交互系统中如何进行交易,跨链交易平台端-平台交易模块使用区块格(block-lattice)结构,每个账户链,相当于账户的交易/余额历史记录,每个账户链只能由账户的所有者更新,允许立即以异步方式将每个账户链更新到区块格的其余部分,从而快速生成交易,完成了跨链交易的核心交易功能以及共识保证账本一致性的功能,对跨链交易的准确性,时效性起到了主要作用。
第一,两个需要进行跨链交易的区块链的账户信息及余额信息的导入成功;第二,初始化跨链交易平台端-平台交易模块成功;第三,为进行跨链交易的区块链的出块时间,考虑到跨链交易平台端-平台交易模块里面交易进行的情况和返回信息的高效,当验证实体中原子交换成功的交易传递给跨链交易平台端-平台交易模块后,根据账户所在原区块链的出块时间,第一区块链的第一接口、第二区块链的第二接口每隔与出块时间相同的固定时间收集一次跨链交易平台端-平台交易模块中完成的交易;第四,跨链交易平台端-平台交易模块账户状态信息返回。
为了本领域人员更加清楚上述过程,以图6为了进行详细说明。
具体地,如图6所示,1)区块链A接口、区块链B接口、跨链交易平台端-平台交易模块:系统预配置功能:当两个区块链要进行跨链交易时,将其原始账户余额信息导入跨链交易平台端-平台交易模块;2)构建跨链交易平台端-平台交易模块,两个需要进行跨链交易的区块链的账户信息及余额信息的导入成功,表明信息成功导入跨链交易平台端-平台交易模块,进行区块格系统的区块账户初始化:将区块链A中的账户在区块格中创建其对应的账户a1,a2,a3……;将区块链B中的账户在区块格中创建其对应的账户b1,b2,b3……;跨链交易平台端-平台交易模块->区块链A接口、区块链B接口:区块信息初始化成功信息返回。区块链A接口,区块链B接口进行初始化跨链交易平台端-平台交易模块成功的监测,在事件监测成功后,进行对于验证实体的监测。
3)跨链交易平台端-验证实体的信息构建,对于跨链交易的原子交换的成功与否进行记录,若跨链交易原子交换成功,则在验证实体中进行交易的记录,否则将验证实体记录为undefined;4)跨链交易平台端-验证实体->跨链交易平台端-平台交易模块,原子交换成功交易信息传递,将验证实体中原子交换成功的交易信息传递给平台交易模块;5)跨链交易平台端-平台交易模块,进行跨链交易,根据原子交换交易成功的信息找到对应的账户,进行交易,发送金额-从汇款人的账户中扣除余额-接受金额-收款人将金额添加到收款人账户的余额-发送和接收的动作是分开进行的,保证了交易的异步性;6)跨链交易平台端-平台交易模块:进行跨链交易共识;7)跨链交易平台端-平台交易模块:根据账户所在原区块链的出块时间,第一区块链的第一接口、第二区块链的第二接口每隔与出块时间相 同的固定时间收集一次跨链交易平台端-平台交易模块中完成的交易,账户状态信息返回;8)跨链交易平台端-区块链A接口,区块链B接口:进行跨链交易平台端-平台交易模块账户状态信息返回,当收到跨链系统账户信息时,分别发送给区块链A,区块链B。
需要说明的是,前述对实施例的解释说明也适用于该实施例的方法,此处不再赘述。
本申请实施例的跨链交互方法中,通过平台交易模块接收第一区块链发送的第一原始账户的第一账户信息和第一余额信息和第二区块链发送的第二原始账户的第二账户信息和第二余额信息;验证实体验证跨链交易的原子交换验证成功,则将原子交换成功信息发送给平台交易模块;平台交易模块根据原子交换成功信息,从汇款账户中扣除目标余额,以及将目标余额添加到收款账户;平台交易模块更新第一原始账户余额信息和的第二原始账户余额信息返回第一区块链和第二区块链。由此,能够给有跨链需求的区块链提供跨链服务,提高跨链交易的速度和吞吐量。
为了实现上述实施例,本申请还提出一种跨链交互装置。
图7为本申请实施例提供的一种跨链交互装置的结构示意图。
如图7所示,该装置包括:平台交易模块701、验证实体702。
平台交易模块701,用于接收第一区块链发送的第一原始账户的第一账户信息和第一余额信息和第二区块链发送的第二原始账户的第二账户信息和第二余额信息。
验证实体702,用于验证跨链交易的原子交换验证成功,则将原子交换成功信息发送给平台交易模块。
平台交易模块701,还用于根据原子交换成功信息,从汇款账户中扣除目标余额,以及将目标余额添加到收款账户。
平台交易模块701,还用于平台交易模块更新第一原始账户余额信息和的第二原始账户余额信息返回第一区块链和第二区块链。
需要说明的是,前述对实施例的解释说明也适用于该实施例的装置,此处不再赘述。
本申请实施例的跨链交互装置中,通过平台交易模块接收第一区块链发送的第一原始账户的第一账户信息和第一余额信息和第二区块链发送的第二原始账户的第二账户信息和第二余额信息;验证实体验证跨链交易的原子交换验证成功,则将原子交换成功信息发送给平台交易模块;平台交易模块根据原子交换成功信息,从汇款账户中扣除目标余额,以及将目标余额添加到收款账户;平台交易模块更新第一原始账户余额信息和的第二原始账户余额信息返回第一区块链和第二区块链。由此,能够给有跨链需求的区块链提供跨链服务,提高跨链交易的速度和吞吐量。
为了实现上述实施例,本申请实施例提出了一种电子设备,包括:存储器、处理器及 存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现如前述终端设备执行方法实施例所述的跨链交互方法。
为了实现上述实施例,本申请实施例提出了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时,实现前述方法实施例所述的跨链交互方法。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本申请的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现定制逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储 在计算机存储器中。
应当理解,本申请的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。如,如果用硬件来实现和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。
此外,在本申请各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。
上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本申请的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施例进行变化、修改、替换和变型。

Claims (10)

  1. 一种跨链交互系统,其特征在于,包括:第一区块链、第二区块链和跨链交易平台端,所述跨链交易平台端包括:平台交易模块和验证实体;
    所述平台交易模块接收所述第一区块链发送的第一原始账户的第一账户信息和第一余额信息和所述第二区块链发送的第二原始账户的第二账户信息和第二余额信息;
    所述验证实体验证跨链交易的原子交换验证成功,则将原子交换成功信息发送给所述平台交易模块;
    所述平台交易模块根据所述原子交换成功信息,从所述汇款账户中扣除目标余额,以及将所述目标余额添加到所述收款账户;
    所述平台交易模块更新所述第一原始账户余额信息和所述的第二原始账户余额信息返回所述第一区块链和所述第二区块链。
  2. 如权利要求1所述的系统,其特征在于,所述验证实体验证跨链交易的原子交换验证成功,包括:
    所述第一区块链的将第一账户金额存入第一合约地址,并生成访问所述合约地址的第一密钥,以及对所述第一密钥进行哈希处理生成第一哈希值;
    所述第二区块链根据第一哈希值生成第二合约地址,并将第二账户金额存入所述第二合约地址;
    所述第一区块链根据所述第一密钥获取所述第二账户金额,所述第二区块链根据所述第一密钥获取所述第一账户金额,则确定所述原子交换验证成功。
  3. 如权利要求1-2中任一所述的系统,其特征在于,
    根据账户所在原区块链的出块时间,所述第一区块链和所述第二区块链每隔与所述出块时间相同的固定时间收集一次所述平台交易模块中完成的交易信息。
  4. 如权利要求1-3中任一所述的系统,其特征在于,在所述平台交易模块接收所述第一区块链发送的第一原始账户余额信息和所述第二区块链发送的第二原始账户余额信息之后,还包括:
    将所述第一区块链中的第一原始账户在区块格中创建其对应的多个第一子账户;
    将所述第二区块链中的第二原始账户在区块格中创建其对应的多个第二子账户。
  5. 如权利要求1-4中任一所述的系统,其特征在于,所述平台交易模块,包括:所有账户集合的系统账本;
    所述系统账本通过所述第一区块链的第一接口和所述第二区块链的第一接口转发到跨链交易的所述第一区块链和所述第二区块链中,所述第一区块链和所述第二区块链根据所述平台交易模块返回系统账本信息来进行本地账本更新。
  6. 如权利要求5所述的系统,其特征在于,
    当一个发送或接收交易要改变一个节点的账户状态时,将目标账户的状态设为锁定状态。
  7. 一种跨链交互方法,其特征在于,包括以下步骤:
    平台交易模块接收第一区块链发送的第一原始账户的第一账户信息和第一余额信息和第二区块链发送的第二原始账户的第二账户信息和第二余额信息;
    验证实体验证跨链交易的原子交换验证成功,则将原子交换成功信息发送给所述平台交易模块;
    所述平台交易模块根据所述原子交换成功信息,从所述汇款账户中扣除目标余额,以及将所述目标余额添加到所述收款账户;
    所述平台交易模块更新所述第一原始账户余额信息和所述的第二原始账户余额信息返回所述第一区块链和所述第二区块链。
  8. 如权利要求7所述的方法,其特征在于,所述验证实体验证跨链交易的原子交换验证成功,包括:
    所述第一区块链的将第一账户金额存入第一合约地址,并生成访问所述合约地址的第一密钥,以及对所述第一密钥进行哈希处理生成第一哈希值;
    所述第二区块链根据第一哈希值生成第二合约地址,并将第二账户金额存入所述第二合约地址;
    所述第一区块链根据所述第一密钥获取所述第二账户金额,所述第二区块链根据所述第一密钥获取所述第一账户金额,则确定所述原子交换验证成功。
  9. 如权利要求7或8任一所述的方法,其特征在于,
    根据账户所在原区块链的出块时间,所述第一区块链和所述第二区块链每隔与所述出块时间相同的固定时间收集一次所述平台交易模块中完成的交易信息。
  10. 一种跨链交互装置,其特征在于,包括:
    平台交易模块,用于接收第一区块链发送的第一原始账户的第一账户信息和第一余额信息和第二区块链发送的第二原始账户的第二账户信息和第二余额信息;
    验证实体,用于验证跨链交易的原子交换验证成功,则将原子交换成功信息发送给所述平台交易模块;
    所述平台交易模块,还用于根据所述原子交换成功信息,从所述汇款账户中扣除目标余额,以及将所述目标余额添加到所述收款账户;
    所述平台交易模块,还用于更新所述第一原始账户余额信息和所述的第二原始账户余额信息返回所述第一区块链和所述第二区块链。
PCT/CN2021/080793 2020-04-28 2021-03-15 跨链交互方法、装置和系统 WO2021218459A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010351384.7 2020-04-28
CN202010351384.7A CN112651724A (zh) 2020-04-28 2020-04-28 跨链交互方法、装置和系统

Publications (1)

Publication Number Publication Date
WO2021218459A1 true WO2021218459A1 (zh) 2021-11-04

Family

ID=75347103

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/080793 WO2021218459A1 (zh) 2020-04-28 2021-03-15 跨链交互方法、装置和系统

Country Status (2)

Country Link
CN (1) CN112651724A (zh)
WO (1) WO2021218459A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114301912A (zh) * 2021-12-23 2022-04-08 支付宝(杭州)信息技术有限公司 基于区块链的信息交互方法和装置
CN115208817A (zh) * 2022-05-29 2022-10-18 北京理工大学 一种基于跨链网关和Floyd算法的可信跨链路由方法
CN115526634A (zh) * 2022-11-21 2022-12-27 北京共识数信科技有限公司 一种基于区块链的智能跨链交互方法、系统和存储介质
CN116155624A (zh) * 2023-04-18 2023-05-23 北京邮电大学 针对异构联盟链的跨链方法、装置及系统
CN117294540A (zh) * 2023-11-27 2023-12-26 人民法院信息技术服务中心 基于角色授权的隐私数据跨链获取方法、装置及系统

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112651724A (zh) * 2020-04-28 2021-04-13 北京邮电大学 跨链交互方法、装置和系统
CN114385756A (zh) * 2021-06-17 2022-04-22 支付宝(杭州)信息技术有限公司 在区块链中执行交易的方法和区块链节点
CN113409145B (zh) * 2021-06-18 2022-04-22 支付宝(杭州)信息技术有限公司 一种跨区块链的交易同步方法和装置
CN113610530A (zh) * 2021-08-27 2021-11-05 中国银行股份有限公司 跨新旧系统的账户多级联动系统及方法
CN114118988A (zh) * 2021-11-08 2022-03-01 支付宝(杭州)信息技术有限公司 基于区块链的跨境汇款方法及装置、电子设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108876618A (zh) * 2018-06-15 2018-11-23 浙江华信区块链科技服务有限公司 一种交换区块链系统及相应的通用区块链互操作方法和网络
CN108876370A (zh) * 2018-06-12 2018-11-23 北京航空航天大学 一种异构多链架构下跨区块链共享开放数据的体系架构
CN109493037A (zh) * 2018-11-27 2019-03-19 深圳声笑科技有限公司 基于dag结构的资产发行方法、装置及存储介质
CN109685489A (zh) * 2018-12-28 2019-04-26 杭州云象网络技术有限公司 一种区块链之间的资产跨链交易方法
US20200026712A1 (en) * 2017-04-12 2020-01-23 Vijay Madisetti Method and System for Tuning Blockchain Scalability, Decentralization, and Security for Fast and Low-Cost Payment and Transaction Processing
CN112651724A (zh) * 2020-04-28 2021-04-13 北京邮电大学 跨链交互方法、装置和系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108492108B (zh) * 2018-03-29 2021-04-23 深圳前海微众银行股份有限公司 区块链跨链通信方法、系统和计算机可读存储介质
CN108596619B (zh) * 2018-04-26 2022-11-01 深圳怡化电脑股份有限公司 用于区块链系统的交易方法、装置、中心节点及系统
CN112651740A (zh) * 2018-08-30 2021-04-13 创新先进技术有限公司 区块链交易方法及装置、电子设备
CN112862612B (zh) * 2019-06-28 2024-04-30 创新先进技术有限公司 一种跨链发送资源的方法和装置
CN110689434B (zh) * 2019-09-26 2023-03-21 重庆邮电大学 一种基于公证人组的跨区块链交互方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200026712A1 (en) * 2017-04-12 2020-01-23 Vijay Madisetti Method and System for Tuning Blockchain Scalability, Decentralization, and Security for Fast and Low-Cost Payment and Transaction Processing
CN108876370A (zh) * 2018-06-12 2018-11-23 北京航空航天大学 一种异构多链架构下跨区块链共享开放数据的体系架构
CN108876618A (zh) * 2018-06-15 2018-11-23 浙江华信区块链科技服务有限公司 一种交换区块链系统及相应的通用区块链互操作方法和网络
CN109493037A (zh) * 2018-11-27 2019-03-19 深圳声笑科技有限公司 基于dag结构的资产发行方法、装置及存储介质
CN109685489A (zh) * 2018-12-28 2019-04-26 杭州云象网络技术有限公司 一种区块链之间的资产跨链交易方法
CN112651724A (zh) * 2020-04-28 2021-04-13 北京邮电大学 跨链交互方法、装置和系统

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114301912A (zh) * 2021-12-23 2022-04-08 支付宝(杭州)信息技术有限公司 基于区块链的信息交互方法和装置
CN115208817A (zh) * 2022-05-29 2022-10-18 北京理工大学 一种基于跨链网关和Floyd算法的可信跨链路由方法
CN115208817B (zh) * 2022-05-29 2023-10-10 北京理工大学 一种基于跨链网关和Floyd算法的可信跨链路由方法
CN115526634A (zh) * 2022-11-21 2022-12-27 北京共识数信科技有限公司 一种基于区块链的智能跨链交互方法、系统和存储介质
CN116155624A (zh) * 2023-04-18 2023-05-23 北京邮电大学 针对异构联盟链的跨链方法、装置及系统
CN117294540A (zh) * 2023-11-27 2023-12-26 人民法院信息技术服务中心 基于角色授权的隐私数据跨链获取方法、装置及系统
CN117294540B (zh) * 2023-11-27 2024-01-23 人民法院信息技术服务中心 基于角色授权的隐私数据跨链获取方法、装置及系统

Also Published As

Publication number Publication date
CN112651724A (zh) 2021-04-13

Similar Documents

Publication Publication Date Title
WO2021218459A1 (zh) 跨链交互方法、装置和系统
Sunyaev et al. Distributed ledger technology
KR102315473B1 (ko) 병렬-처리 블록체인 트랜잭션을 위한 시스템 및 방법
US10986177B2 (en) Systems and methods of self-forking blockchain protocol
US10977632B2 (en) Electronic bill management method, apparatus, and storage medium
Dziembowski et al. Perun: Virtual payment hubs over cryptocurrencies
WO2020059865A1 (ja) 決済システム、決済方法、利用者装置、決済プログラム
US20210287215A1 (en) Resource transfer system
JP7472333B2 (ja) バリデータノードにより提供されるブロックチェーントランザクションをマイニングする方法及びシステム
Robinson et al. Atomic crosschain transactions for ethereum private sidechains
Kaur et al. Scalability in blockchain: Challenges and solutions
KR20210128452A (ko) 블록체인 네트워크를 통한 이전을 구현하는 컴퓨터 구현 시스템 및 방법
CN111213340A (zh) 选择用于密码功能的证明委托并使其安全
CN115427995A (zh) 时间锁定的区块链事务和相关区块链技术
CN109493223A (zh) 一种记账方法及装置
US11544787B2 (en) Apparatus and method for providing protocol for digital asset trading
WO2021017425A1 (zh) 区块链网络中实现机密交易的方法及装置
TW202139127A (zh) 用於與區塊鏈相關聯之服務平台之運算服務
Zhang et al. Boros: Secure and efficient off-blockchain transactions via payment channel hub
Bu et al. Cross hyperledger fabric transactions
CN114945928A (zh) 时间锁定的区块链事务和相关区块链技术
US20230119035A1 (en) Platform services verification
US20210374843A1 (en) Debt Resource Management in a Distributed Ledger System
Xu et al. Existing Blockchain Platforms
Papadis Stochastic Modeling and Optimization of Blockchain Networks

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

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

Country of ref document: EP

Kind code of ref document: A1