CN111681003A - Resource cross-chain transfer method and device, computer equipment and storage medium - Google Patents

Resource cross-chain transfer method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111681003A
CN111681003A CN202010646649.6A CN202010646649A CN111681003A CN 111681003 A CN111681003 A CN 111681003A CN 202010646649 A CN202010646649 A CN 202010646649A CN 111681003 A CN111681003 A CN 111681003A
Authority
CN
China
Prior art keywords
cross
blockchain
transaction data
node
chain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010646649.6A
Other languages
Chinese (zh)
Other versions
CN111681003B (en
Inventor
李茂材
王宗友
时一防
蓝虎
朱耿良
周开班
黄焕坤
刘区城
刘攀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010646649.6A priority Critical patent/CN111681003B/en
Publication of CN111681003A publication Critical patent/CN111681003A/en
Application granted granted Critical
Publication of CN111681003B publication Critical patent/CN111681003B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

The embodiment of the application discloses a resource cross-chain transfer method, a resource cross-chain transfer device, computer equipment and a storage medium, wherein the method comprises the following steps: acquiring cross-chain transaction data on a first blockchain; storing cross-chain transaction data to a first blockchain; the cross-chain transaction data stored on the first blockchain is used for representing resource data which is deducted by the same amount as the transferred resource amount in the first account; acquiring a consensus signature of a first consensus node set of a first block chain on cross-chain transaction data; the cross-chain transaction data and the consensus signature are sent to the node of the second block chain, so that the node of the second block chain performs signature verification on the consensus signature, and when the signature verification is passed, the cross-chain transaction data are stored to the second block chain by the node of the second block chain; the cross-chain transaction data stored on the second blockchain is used to represent resource data in the second account that is increased by an amount equal to the amount of the transferred resource. By adopting the method and the device, the application range of cross-chain resource transfer can be enlarged.

Description

Resource cross-chain transfer method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for transferring resources across chains, a computer device, and a storage medium.
Background
The blockchain technology is a brand new distributed infrastructure and computing mode that uses blockchain data structures to verify and store data, uses distributed node consensus algorithms to generate and update data, uses cryptography to secure data transmission and access, and uses intelligent contracts composed of automated script codes to program and manipulate data. Briefly, a blockchain is a decentralized distributed ledger.
In the prior art, a bridge chain is mainly constructed between a first blockchain and a second blockchain to realize interaction of cross blockchains, so that the first blockchain (or the second blockchain) and the bridge chain are required to be stored in a node, the requirement on storage of the node is high, popularization and application of cross-chain resource transfer can be hindered, and the management difficulty of the node can be increased.
Disclosure of Invention
The embodiment of the application provides a resource cross-chain transfer method, a resource cross-chain transfer device, a computer device and a storage medium, which can reduce the storage requirement of nodes and enlarge the application range of cross-chain resource transfer.
An embodiment of the present application provides a resource cross-chain transfer method, including:
acquiring cross-chain transaction data on a first blockchain; the cross-chain transaction data comprises a first account on a first blockchain, a second account on a second blockchain and a transfer resource amount;
storing the cross-chain transaction data to the first blockchain; the cross-chain transaction data stored onto the first blockchain is used to represent resource data in the first account that is deducted by an amount equal to the amount of the transferred resource;
acquiring a consensus signature of a first consensus node set of the first blockchain on the cross-chain transaction data;
sending the cross-chain transaction data and the consensus signature to the node of the second blockchain, so that the node of the second blockchain performs signature verification on the consensus signature, and storing the cross-chain transaction data to the second blockchain by the node of the second blockchain when the signature verification is passed; the cross-chain transaction data stored onto the second blockchain is used to represent resource data in the second account that is increased by an amount equal to the amount of the transferred resource.
An embodiment of the present application provides a resource cross-chain transfer method, including:
acquiring a cross-chain transaction request on a second blockchain; the cross-chain transaction request comprises cross-chain transaction data and a consensus signature, wherein the cross-chain transaction data comprises a first account on a first blockchain, a second account on a second blockchain and a transfer resource amount, the consensus signature is a digital signature of a first consensus node set of the first blockchain on the cross-chain transaction data, and the cross-chain transaction request is sent after the node of the first blockchain stores the cross-chain transaction data to the first blockchain and acquires the consensus signature; the cross-chain transaction data stored on the first blockchain is used to represent resource data in the first account that is deducted by an amount equal to the amount of the transferred resource;
performing signature verification on the consensus signature, and storing the cross-chain transaction data to the second blockchain when the signature verification of the consensus signature passes; the cross-chain transaction data stored onto the second blockchain is used to represent resource data in the second account that is increased by an amount equal to the amount of the transferred resource.
An aspect of the present application provides a resource cross-chain transfer apparatus, including:
the first acquisition module is used for acquiring cross-chain transaction data on the first blockchain; the cross-chain transaction data comprises a first account on a first blockchain, a second account on a second blockchain and a transfer resource amount;
a roll-out module for storing the cross-chain transaction data to the first blockchain; the cross-chain transaction data stored onto the first blockchain is used to represent resource data in the first account that is deducted by an amount equal to the amount of the transferred resource;
a second obtaining module, configured to obtain a consensus signature of the first consensus node set of the first blockchain on the cross-chain transaction data;
a sending module, configured to send the cross-chain transaction data and the consensus signature to a node of the second blockchain, so that the node of the second blockchain performs signature verification on the consensus signature, and when the signature verification passes, the node of the second blockchain stores the cross-chain transaction data to the second blockchain; the cross-chain transaction data stored onto the second blockchain is used to represent resource data in the second account that is increased by an amount equal to the amount of the transferred resource.
An aspect of the present application provides a resource cross-chain transfer apparatus, including:
the third acquisition module is used for acquiring the cross-chain transaction request on the second blockchain; the cross-chain transaction request comprises cross-chain transaction data and a consensus signature, wherein the cross-chain transaction data comprises a first account on a first blockchain, a second account on a second blockchain and a transfer resource amount, the consensus signature is a digital signature of a first consensus node set of the first blockchain on the cross-chain transaction data, and the cross-chain transaction request is sent after the node of the first blockchain stores the cross-chain transaction data to the first blockchain and acquires the consensus signature; the cross-chain transaction data stored on the first blockchain is used to represent resource data in the first account that is deducted by an amount equal to the amount of the transferred resource;
the verification module is used for carrying out signature verification on the consensus signature;
a transfer-in module, configured to store the cross-chain transaction data to the second blockchain when signature verification of the consensus signature passes; the cross-chain transaction data stored onto the second blockchain is used to represent resource data in the second account that is increased by an amount equal to the amount of the transferred resource.
One aspect of the present disclosure provides a resource cross-chain transfer system, including a node of a first blockchain and a node of a second blockchain;
the node of the first blockchain acquires cross-chain transaction data on the first blockchain; the cross-chain transaction data comprises a first account on a first blockchain, a second account on a second blockchain and a transfer resource amount;
the node of the first blockchain stores the cross-chain transaction data to the first blockchain; the cross-chain transaction data stored onto the first blockchain is used to represent resource data in the first account that is deducted by an amount equal to the amount of the transferred resource;
the node of the first block chain acquires a common identification signature of a first common identification node set of the first block chain on the cross-chain transaction data, and sends the cross-chain transaction data and the common identification signature to the node of the second block chain;
the node of the second block chain carries out signature verification on the consensus signature, and when the signature verification of the consensus signature passes, the cross-chain transaction data is stored in the second block chain; the cross-chain transaction data stored onto the second blockchain is used to represent resource data in the second account that is increased by an amount equal to the amount of the transferred resource.
An aspect of the embodiments of the present application provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the computer program is executed by the processor, the processor is caused to execute the method in the foregoing embodiments.
An aspect of the embodiments of the present application provides a computer storage medium, in which a computer program is stored, where the computer program includes program instructions, and when the program instructions are executed by a processor, the method in the foregoing embodiments is performed.
An aspect of the embodiments of the present application provides a computer program product or a computer program, where the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium, and when the computer instructions are executed by a processor of a computer device, the computer instructions perform the methods in the embodiments described above.
According to the method and the device, the transaction data are stored on the first block chain, the signature of the first consensus node set of the first block chain on the transaction data and the transaction data are sent to the nodes of the second block chain, and the transaction data are stored on the second block chain after the signatures are verified by the nodes of the second block chain. Therefore, a plurality of block chains do not need to be stored in the block chain nodes in the application, the storage requirement on the nodes can be reduced, more nodes can be used for cross-chain resource transfer, the universality and the generalization of the cross-chain resource transfer are improved, the application range is further expanded, and only one chain needs to be stored in one node, so that the management difficulty of the nodes can be reduced; in addition, the signature of the first consensus node set on the transaction data is used as a certificate for submitting resource transfer to the second block chain, and the implementation mode of cross-chain resource transfer can be enriched.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a block chain network according to an embodiment of the present application;
2 a-2 e are schematic diagrams of a scenario of resource cross-chain transfer provided by an embodiment of the present application;
FIG. 3 is a flowchart illustrating a resource cross-chain transfer method according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating a resource cross-chain transfer method according to an embodiment of the present application;
FIG. 5 is an interaction diagram of a resource cross-chain transfer system provided in an embodiment of the present application;
FIG. 6 is a schematic diagram of a cross-chain resource transfer system according to an embodiment of the present application;
FIG. 7 is an interaction diagram of a resource cross-chain transfer method provided in an embodiment of the present application;
FIG. 8 is a system architecture diagram of a cross-chain resource transfer provided by an embodiment of the present application;
FIG. 9 is a schematic structural diagram of a resource cross-chain transfer apparatus according to an embodiment of the present application;
FIG. 10 is a schematic structural diagram of a resource cross-chain transfer apparatus according to an embodiment of the present application;
FIG. 11 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure;
fig. 12 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The Block chain (Block chain) is a novel application mode of computer technologies such as distributed data storage, point-To-point transmission (P2P, Peer To Peer), a consensus mechanism, an encryption algorithm and the like. The blockchain is essentially a decentralized database, which is a string of data blocks associated using cryptography, each data block containing one or more transaction messages for verifying the validity (anti-counterfeiting) of the message and generating the next block.
Referring to fig. 1, which is a schematic diagram of a blockchain network provided in the embodiment of the present disclosure, a node 1, a node 2, a node 3, and a node 4 may be combined into a blockchain network, each node may store one same blockchain, the 4 nodes may also be referred to as blockchain nodes, and each node may include a hardware layer, an intermediate layer, an operating system layer, and an application layer. It will be appreciated that a node may comprise a computer device.
The node may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), a big data and artificial intelligence platform. The node may also be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and the like. The nodes may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
Cloud technology (Cloud technology) is a generic term of network technology, information technology, integration technology, management platform technology, application technology and the like based on Cloud computing business model application, can form a resource pool, is used as required, and is flexible and convenient. Background services of the technical network systems currently require a large amount of computing and storage resources, such as video websites, picture-like websites and more web portals. With the high development and application of the internet industry, each article may have its own identification mark and needs to be transmitted to a background system for logic processing, data in different levels are processed separately, and various industrial data need strong system background support and can only be realized through cloud computing.
At present, cloud technologies are mainly classified into a cloud-based technology class and a cloud application class; the cloud-based technology class may be further subdivided into: cloud computing, cloud storage, databases, big data, and the like; the cloud application class may be further subdivided into: medical cloud, cloud-things, cloud security, cloud calls, private cloud, public cloud, hybrid cloud, cloud gaming, cloud education, cloud conferencing, cloud social, and artificial intelligence cloud services, among others.
The resource cross-chain transfer method can relate to cloud computing and cloud storage belonging to the cloud technology:
cloud computing (cloud computing) is a computing model that distributes computing tasks over a pool of resources formed by a large number of computers, enabling various application systems to obtain computing power, storage space, and information services as needed. The network that provides the resources is referred to as the "cloud". Resources in the "cloud" appear to the user as being infinitely expandable and available at any time, available on demand, expandable at any time, and paid for on-demand.
In the present application, whether the node of the first blockchain or the node of the second blockchain may obtain sufficient computing power and storage space through a cloud computing technology, so as to perform the uplink transaction data related in the present application.
A distributed cloud storage system (hereinafter, referred to as a storage system) refers to a storage system that integrates a large number of storage devices (storage devices are also referred to as storage nodes) of different types in a network through application software or application interfaces to cooperatively work by using functions such as cluster application, grid technology, and a distributed storage file system, and provides a data storage function and a service access function to the outside.
In the application, the blockchain can be stored on a 'cloud' by the node through a cloud storage technology, and when a block needs to be read from the blockchain or written into the blockchain, the block can be pulled from a cloud storage device or sent to the cloud storage device, so that the local storage pressure of the node is reduced.
The application scenario of the resource cross-chain transfer method is as follows: in order to realize cross-link resource transfer, transaction data are stored in a first chain firstly to transfer resource data from an account on the first block chain, the transaction data and a signature of a consensus node on the first chain on the transaction data are sent to a second block chain, and after the signature of a node on the second block chain is verified, the transaction data are also stored in the second chain to transfer the resource data into the account on the second block chain. And taking the signature of the consensus node on the first chain to the transaction data as a signature certificate for submitting a resource data transfer request to the second chain so as to enrich the implementation mode of cross-chain resource transfer.
Please refer to fig. 2 a-2 e, which are schematic diagrams illustrating a scenario of resource cross-chain transfer according to an embodiment of the present application. Fig. 2a shows 2 blockchain networks, a first blockchain network and a second blockchain network. The first blockchain network comprises 4 nodes, the 4 nodes being: node 1, node 2, node 3, and node 4, assume that node 1 and node 2 are consensus nodes of the first blockchain network. All 4 nodes will store the partition chain 20a, and as can be seen from fig. 2a, the partition chain 20a includes 3 partitions. The second blockchain network also includes 4 nodes, and the 4 nodes are respectively: node 5, node 6, node 7, and node 8. All 4 nodes will store block chain 20b, and as can be seen from fig. 2a, block chain 20b includes 4 blocks. In this scenario embodiment, it is assumed that a node in the first blockchain network and a node in the second blockchain network can directly communicate, and respective node public keys are exchanged in advance between the consensus node in the first blockchain network and the consensus node in the second blockchain network.
The node in the first blockchain network acquires transaction data, and the specific content of the transaction data may be: (Account 1, Account 2,20), Account 1 represents a resource transfer-out account, Account 2 represents a resource transfer-in account, Account 20 represents the amount of resource to be transferred, and it is noted in the transaction data that Account 1 is the account in blockchain 20a and Account 2 is the account in blockchain 20 b. Colloquially, the meaning of this transaction data is to transfer a quantity of 20 resource data from account 1 to account 2 across the chain.
The node in the first blockchain network firstly judges whether the residual resource amount of the account 1 is not less than 20, verifies whether the signature of the account 1 carried by the transaction data is correct, and the like. If the remaining resource amount of the account 1 is determined to be not less than 20 and the signature of the account 1 carried by the transaction data is verified to be correct, the transaction data is stored in the blockchain 20a, wherein the transaction data stored in the blockchain 20a represents that the account 1 on the blockchain 20a is deducted from the resource data of which the amount is 20.
As shown in fig. 2b, the specific process of storing transaction data into the blockchain 20a is as follows: storing the transaction data into a block, calculating the merck root of the transaction data, obtaining the hash value (where the hash value of the block is the hash value of the block header) and the current timestamp of the last block (i.e. the 3 rd block) of the current block chain 20a, storing the merck root, the hash value of the last block and the current timestamp into the block header, combining the block header and the block in which the transaction data is stored into a block 20c, and adding the newly generated block 20c into the block chain 20a, so as to achieve the effect of transferring the resource data of 20 in number out of the account 1.
As shown in fig. 2c, after adding the new block 20c to the blockchain 20a, the blockchain 20a now includes 4 blocks, the last block is the newly generated block 20c, and the block 20c stores transaction data.
As can be seen from the foregoing, node 1 and node 2 are consensus nodes of the first blockchain network. And acquiring the signature of the node 1 on the transaction data and the signature of the node 2 on the transaction data, and combining the signature of the node 1 on the transaction data and the signature of the node 2 on the transaction data into the signature of the consensus node. The node of the first blockchain network sends the transaction data and the signature of the consensus node to the second blockchain network.
It should be noted that the nodes in the first blockchain network may store the transaction data in the blockchain 20a first and then obtain the signature of the consensus node.
It should be noted that only after the transaction data is stored in the blockchain 20a and the signature of the consensus node is obtained, the node in the first blockchain network sends the transaction data and the signature of the consensus node to the second blockchain network.
And after the nodes in the second block chain network receive the transaction data, verifying whether the signature of the common identification node is correct, and the like. If the signature of the consensus node is verified to be correct, the resource data is stored on the blockchain 20b, wherein the transaction data stored on the blockchain 20b indicates that the account 2 on the blockchain 20b is increased by 20 resource data.
The specific process of verifying the signature of the consensus node comprises the following steps: as can be seen from the foregoing, the signature of the consensus node includes the signature of the node 1 on the transaction data and the signature of the node 2 on the transaction data, the hash value of the transaction data is first calculated, the node public key of the node 1 is used to decrypt the signature of the node 1 on the transaction data, whether the decryption result is the same as the hash value of the transaction data is verified, and if the decryption result is the same as the hash value of the transaction data, it indicates that the signature of the node 1 on the transaction data is correct. And decrypting the signature of the transaction data by the node 2 by using the node public key of the node 2, verifying whether the decryption result is the same as the hash value of the transaction data, and if so, indicating that the signature of the transaction data by the node 2 is correct. If the signature of the node 1 on the transaction data is correct, and the signature of the node 2 on the transaction data is correct, the signature of the consensus node is correct.
As shown in fig. 2d, the specific process of storing transaction data into the blockchain 20b is as follows: storing the transaction data into a block, calculating a merck root of the transaction data, obtaining a hash value (where the hash value of the block is the hash value of the block head) and a current time stamp of the last block (i.e. the 4 th block) of the current block chain 20b, storing the merck root, the hash value of the last block and the current time stamp into the block head, combining the block head and the block body storing the transaction data into a block 20d, and adding the newly generated block 20d into the block chain 20b, so as to achieve the effect of transferring the resource data of 20 in number into the account 2.
As shown in fig. 2e, after the block 20d is added to the blockchain 20b, the blockchain 20b includes 5 blocks, the last block is the newly generated block 20d, and the transaction data is also stored in the block 20 d. In general, the transaction data in block 20c of blockchain 20a may indicate that a quantity of 20 resource data was transferred from account 1, and the transaction data in block 20d of blockchain 20b may indicate that a quantity of 20 resource data was transferred to account 2.
At this point, the cross-chain transfer of resource data of resource amount 20 from account 1 on blockchain 20a to account 2 on blockchain 20b is complete. According to the process, the cross-chain resource transfer is not required to be realized through a bridge chain, and a plurality of block chains are not required to be stored in one block chain node, so that the storage requirement on the node can be reduced, more nodes can participate in the cross-chain resource transfer, and the application range of the cross-chain resource transfer is enlarged; because the consensus node can be fully trusted, the signature of the consensus node on the transaction data is used as a certificate for submitting resource transfer to the second blockchain, so that the cross-chain resource transfer mode can be enriched, and the security of the resource data on the blockchain can be improved.
The specific processes of acquiring cross-chain transaction data on the first blockchain (e.g., blockchain 20a in the above embodiment), storing the cross-chain transaction data in the first blockchain, and acquiring consensus signatures (e.g., signature of node 1 on transaction data and signature of node 2 on transaction data in the above embodiment) may be referred to the following embodiments corresponding to fig. 3 to 8.
Please refer to fig. 3, which is a flowchart illustrating a resource cross-chain transfer method according to an embodiment of the present application, where the resource cross-chain transfer method involves a resource transferring party and a resource transferring party, where the resource transferring party is a node of a first block chain, and the resource transferring party is a node of a second block chain. The following embodiments are described from the resource transfer side, and the resource cross-chain transfer method comprises the following steps:
step S101, cross-chain transaction data on a first block chain is obtained; the cross-chain transaction data includes a first account on a first blockchain, a second account on a second blockchain, and a transfer resource amount.
The resource cross-chain transfer of the present application involves at least two blockchains, namely, a first blockchain (such as the blockchain 20a in the corresponding embodiment of fig. 2 a-2 e) and a second blockchain (such as the blockchain 20b in the corresponding embodiment of fig. 2 a-2 e), where the blockchain network corresponding to the first blockchain is referred to as a first blockchain network (such as the first blockchain network in the corresponding embodiment of fig. 2 a-2 e), and the blockchain network corresponding to the second blockchain is referred to as a second blockchain network (such as the second blockchain network in the corresponding embodiment of fig. 2 a-2 e). The resource transfer-out party is a node in the first blockchain network (the node in the first blockchain network may also be referred to as a node of the first blockchain), and the resource transfer-in party is a node in the second blockchain network (the node in the second blockchain network may also be referred to as a node of the second blockchain).
The resource data transferred by the method can be asset data such as game coins, invoices and the like.
A node of the first blockchain network obtains cross-chain transaction data (such as the transaction data in the embodiment corresponding to fig. 2a to 2 e) on the first blockchain, where the cross-chain transaction data includes a first account (such as account 1 in the embodiment corresponding to fig. 2a to 2 e) on the first blockchain, a second account (such as account 2 in the embodiment corresponding to fig. 2a to 2 e) on the second blockchain, and a transfer resource amount (such as amount 20 in the embodiment corresponding to fig. 2a to 2 e), where the first account is a transfer-out account of the current cross-chain resource transfer, and the second account is a transfer-in account of the current cross-chain resource transfer.
The specific process of acquiring the cross-chain transaction data by the node in the first blockchain network may be as follows: and receiving a cross-chain resource transfer request sent by a client of the first blockchain, wherein the request comprises cross-chain transaction data and a digital signature of the first account on the cross-chain transaction data.
Step S102, storing the cross-chain transaction data to the first block chain; the cross-chain transaction data stored onto the first blockchain is used to represent resource data in the first account that is deducted by an amount equal to the amount of transferred resource.
Specifically, a node in the first blockchain network determines the account remaining resource amount of the first account on the first blockchain, and stores the cross-chain transaction data onto the first blockchain if the account remaining resource amount of the first account is greater than or equal to the transfer resource amount, wherein the cross-chain transaction data stored onto the first blockchain represents that the resource data equal to the resource amount is deducted from the first account.
For example, if the amount of transferred resource is 10 and the resource data is a token, storing the cross-chain transaction data to the first blockchain indicates that 10 tokens were transferred from the first account on the first blockchain; if the transfer resource amount is 20 and the resource data is an invoice, storing the cross-chain transaction data to the first blockchain means that the first account on the first blockchain is transferred with an amount of 20 invoices.
The specific process of acquiring the account remaining resource amount of the first account by the node in the first blockchain network may be as follows: a node in the first blockchain network traverses all blocks on the first blockchain to find a block associated with the first account. And reading historical transaction data in the found blocks, and calculating the account residual resource amount of the first account according to the read historical transaction data. For example, if the blocks found on the first blockchain associated with the first account are block 1 and block 2, and the specific content of the historical transaction data in block 1 is: transferring the resource data with the quantity of 30 to the first account by the account 3; the specific contents of the historical transaction data in block 2 are: the first account transfers the resource data with the quantity of 10 to the account 4, and at this time, the remaining resource quantity of the account of the first account is: 30-10 ═ 20.
Of course, the first account may also be a resource issuing account, in which case, a node in the first blockchain network may directly set the account remaining resource amount of the first account to infinity without traversing the first blockchain.
The specific process of storing the cross-chain transaction data to the first blockchain by the node in the first blockchain network is as follows: the first blockchain network includes a first common node set including a plurality of common nodes (referred to as first common nodes, such as node 1 and node 2 in the corresponding embodiments of fig. 2 a-2 e). An accounting node is selected from the plurality of first common identification nodes based on a preset common identification mechanism of the first blockchain, the accounting node packages the cross-chain transaction data into blocks (called as first blocks, such as the block 20c in the corresponding embodiment of fig. 2 a-2 e), the accounting node broadcasts the first blocks to all nodes in the first blockchain network, and all nodes in the first blockchain network store the first blocks to a locally maintained first blockchain, so that all nodes in the first blockchain network achieve common identification and store the cross-chain transaction data on the first blockchain, that is, transfer resource data equal to the transferred resource amount out of the first account.
The following detailed description is made based on the PBFT (Practical Byzantine Fault Tolerance) consensus mechanism to store the cross-chain transaction data onto the first blockchain: the plurality of first common nodes in the first common node set may be divided into 1 main node and N backup nodes (N is an integer greater than 0), that is, the number of the first common nodes is N +1, where the N +1 first common nodes are alternately used as main nodes, and the remaining first common nodes are all backup nodes, and the main node is an accounting node. The main node packs the cross-link transaction data into a first block, the first block is sent to each backup node, each backup node performs transaction verification on the cross-link transaction data in the first block, the verification content of the transaction verification can specifically be to verify whether the first block is correct or not, verify whether a first account is an account on a first block chain or not, and also verify whether a digital signature of the first account on the cross-link transaction data is correct or not, and the like, wherein the cross-link resource transfer request includes the digital signature of the first account on the cross-link transaction data. If the backup node passes the transaction verification of the cross-link transaction data in the first block, the backup node signs the cross-link transaction data by using the private key of the backup node to obtain the unit consensus signature. The backup node packages the unit consensus signature into a transaction confirmation message, and sends the transaction confirmation message to the main node and other backup nodes to indicate that the backup node considers the cross-link transaction data as valid transaction data; if the transaction verification of the cross-link transaction data in the first block is not passed by the backup node, the backup node will not sign or send any message. It is assumed that the master node and each backup node receive transaction confirmation messages sent by M backup nodes (M is a positive integer not greater than N, and the reason why M is smaller than N is that a malicious consensus node or a faulty consensus node may exist in the M backup nodes), that is, the number of transaction confirmation messages is equal to M. If M is larger than the preset number threshold, the main node adds the first block to the locally maintained first block chain, and each backup node also adds the first block to the locally maintained first block chain, so that the cross-chain transaction data is stored in the first block chain, and the effect of transferring the resource data out of the first account is achieved. Otherwise, if M is not greater than the preset number threshold, a notification message of the resource transfer failure may be output, and the notification message may be sent to the client of the first blockchain.
The specific process of verifying the digital signature of the first account by the backup node is as follows: calculating a hash value of cross-link transaction data by adopting a hash algorithm, acquiring a public key of a first account, decrypting a signature of the first account by adopting the public key of the first account to obtain a decryption result, and if the decryption result is the same as the hash value of the cross-link transaction data, indicating that the digital signature of the first account passes verification; otherwise, if the decryption result is different from the hash value of the cross-chain transaction data, it indicates that the digital signature verification of the first account is not passed.
The specific process of signing the cross-link transaction data by the backup node is as follows: and the backup node calculates the hash value of the cross-link transaction data, and encrypts the hash value by adopting a private key of the backup node to obtain the unit consensus signature.
Besides the PBFT consensus mechanism, a POW (Proof of Work) consensus mechanism can be adopted, and the POW (Proof of Work) consensus mechanism comprises the following steps: the first common node set comprises a plurality of first common nodes, and all the first common nodes compete for the packing authority according to the workload of the first common nodes. Assuming that the target first common identification node is the first common identification node with the largest workload, that is, the target first common identification node has a packing right, the target first common identification node packs the cross-chain transaction data into a first block, and sends the first block to the remaining first common identification nodes, the remaining first common identification nodes perform transaction verification on the cross-chain transaction data in the first block, and if the transaction verification passes, each first common identification node directly adds the first block to the first block chain maintained by the first common identification node.
The present application only details the PBFT consensus mechanism and the POW consensus mechanism, and other consensus mechanisms (e.g., Proof of rights of arrival (POS), dBFT: delayed BFT authorized byzantine fault-tolerant algorithm, etc.) may be adopted to allow the cross-chain transaction data to be added to the first blockchain.
Step S103, acquiring a consensus signature of the first consensus node set of the first block chain on the cross-chain transaction data.
Specifically, when storing the cross-chain transaction data onto the first blockchain based on the PBFT consensus mechanism, the master node may obtain a unit consensus signature from each transaction confirmation message, and combine M unit consensus signatures in the M transaction confirmation messages into the consensus signature. In this case, the consensus signature is a digital signature of the cross-chain transaction data by the first consensus node of the first set of consensus nodes that performed the transaction validation on the cross-chain transaction data.
When cross-chain transaction data are stored to the first block chain based on the POW consensus mechanism, each first consensus node also needs to sign the cross-chain transaction data in the first block by using its own node private key to obtain a unit consensus signature. The first consensus node can combine the N +1 unit consensus signatures into a consensus signature.
It can be known that if the PBFT consensus mechanism is adopted, a consensus node generates a unit consensus signature for cross-chain transaction data in the consensus process; if the POW consensus mechanism is adopted, the consensus node not only needs to participate in consensus, but also needs to generate an additional unit consensus signature.
Therefore, if the PBFT consensus mechanism is adopted, the execution sequence of step S102 and step S103 may be parallel or serial, and step S102 is executed before step S103 when the sequence is serial; if the POW consensus mechanism is adopted, the execution sequence of step S102 and step S103 may be parallel or serial, and the execution sequence of step S102 between step S103 is not limited in the serial case.
Step S104, the cross-chain transaction data and the consensus signature are sent to a node of the second block chain, so that the node of the second block chain performs signature verification on the consensus signature, and when the signature verification is passed, the cross-chain transaction data is stored to the second block chain by the node of the second block chain; the cross-chain transaction data stored onto the second blockchain is used to represent resource data in the second account that is increased by an amount equal to the amount of the transferred resource.
Specifically, after cross-link transaction data is stored in a first blockchain and a consensus signature is acquired, a node (or a master node) in the first blockchain network encapsulates the cross-link transaction data and the consensus signature into a cross-link transaction request, the cross-link transaction request is sent to a node of a second blockchain, so that the node of the second blockchain performs signature verification on the consensus signature, when the signature verification is passed, the cross-link transaction data is stored in the second blockchain by the node of the second blockchain, and the cross-link transaction data stored in the second blockchain represents that resource data equal to the transferred resource amount is added in a second account.
Since the consensus process is a behavior that inevitably occurs on the first blockchain, the consensus signature generated in the consensus process is used as a certificate for submitting the resource transfer request to the second blockchain, so that the consensus is completed on the first blockchain, the certificate for transferring the resource on the second blockchain is also obtained, and the efficiency of cross-chain resource transfer can be improved.
Please refer to fig. 4, which is a flowchart illustrating a resource cross-chain transfer method according to an embodiment of the present application, where the resource cross-chain transfer method involves a resource transferring party and a resource transferring party, where the resource transferring party is a node of a first block chain, and the resource transferring party is a node of a second block chain. The following embodiments are described from the resource transfer side, and the resource cross-chain transfer method includes the following steps:
step S201, acquiring a cross-chain transaction request on a second blockchain; the cross-chain transaction request comprises cross-chain transaction data and a consensus signature, wherein the cross-chain transaction data comprises a first account on a first blockchain, a second account on a second blockchain and a transfer resource amount, the consensus signature is a digital signature of a first consensus node set of the first blockchain on the cross-chain transaction data, and the cross-chain transaction request is sent after the node of the first blockchain stores the cross-chain transaction data to the first blockchain and acquires the consensus signature; the cross-chain transaction data stored on the first blockchain is used to represent resource data in the first account that is deducted by an amount equal to the amount of the transferred resource.
The resource cross-chain transfer at least involves two block chains, namely a first block chain and a second block chain, wherein a block chain network corresponding to the first block chain is called a first block chain network, and a block chain network corresponding to the second block chain is called a second block chain network. The resource transfer-out party is a node in the first blockchain network (the node in the first blockchain network may also be referred to as a node of the first blockchain), and the resource transfer-in party is a node in the second blockchain network (the node in the second blockchain network may also be referred to as a node of the second blockchain).
And a node in the second blockchain network acquires a cross-chain transaction request on a second blockchain, wherein the cross-chain transaction request comprises cross-chain transaction data and a consensus signature, the cross-chain transaction data comprises a first account on the first blockchain, a second account on the second blockchain and a transfer resource amount, the first account is a transfer-out account of the current cross-chain resource transfer, and the second account is a transfer-in account of the current cross-chain resource transfer.
The consensus signature is a digital signature of a set of consensus nodes in the first blockchain network (referred to as the first set of consensus nodes) on the cross-chain transaction data. The cross-chain transaction request is sent to a second block chain network after the node in the first block chain network stores cross-chain transaction data to the first block chain and acquires the consensus signature.
The resource data transferred by the method can be asset data such as game coins and invoices.
The specific processes of storing the cross-chain transaction data into the first blockchain and acquiring the consensus signature may refer to steps S101 to S104 in the corresponding embodiment of fig. 3.
Step S202, signature verification is carried out on the consensus signature, and when the signature verification of the consensus signature passes, the cross-chain transaction data is stored in the second blockchain; the cross-chain transaction data stored onto the second blockchain is used to represent resource data in the second account that is increased by an amount equal to the amount of the transferred resource.
Specifically, the cross-chain transaction data may further include a target transaction number in addition to the first account, the second account, and the transfer resource amount, where the target transaction number is a transaction identifier of the cross-chain transaction data, and any transaction number may uniquely correspond to one transaction data.
For example, when the resource data is an invoice, the target transaction number may be a unique invoice number.
A node in the second blockchain network obtains a transaction data record table, where the transaction data record table includes a plurality of historical transaction data fingerprints, each historical transaction data fingerprint is a data fingerprint of historical cross-chain transaction data, and the data fingerprint may be referred to as a hash value.
For example, before the resource transfer, the third account on the first blockchain has transferred the resource data to the fourth account on the second blockchain, and the node in the second blockchain network needs to store the hash value of the historical cross-chain transaction data of the resource transfer in the transaction data record table.
And the node in the second block chain network acquires the data fingerprint of the current cross-chain transaction data, and if the data fingerprint of the current cross-chain transaction data does not belong to a plurality of historical transaction data fingerprints, the resource transfer does not have double flowers, wherein the double flowers refer to double payment or double expenses. In this case, the node in the second blockchain network may further perform signature verification on the consensus signature.
On the contrary, if the data fingerprint of the current cross-link transaction data belongs to a plurality of historical transaction data fingerprints, it is indicated that the resource transfer operation corresponding to the current cross-link transaction data has been executed on the second blockchain, and then the node in the second blockchain network outputs a notification message that the resource data has been transferred, and sends the notification message to the first blockchain network, so as to prompt the node in the first blockchain network that the resource transfer operation corresponding to the current cross-link transaction data has been executed on the second blockchain.
This is because, because the resource data is transferred across the chain, the node in the second blockchain network verifies whether to store the cross-chain transaction data to the second blockchain only by the consensus signature, and cannot determine whether to add the cross-chain transaction data to the second blockchain by verifying the account remaining resource amount of the first account in the first blockchain. In order to prevent the nodes in the first blockchain network from submitting the same cross-chain transaction request for multiple times and prevent the occurrence of false resource transfer, the nodes in the second blockchain network need to record the hash value of the historical cross-chain transaction data every time.
The first common node set comprises a plurality of first common nodes, and the public keys of the nodes of the first common node set in the first block chain network and the public keys of the nodes of the common node set in the second block chain network (called as the second common node set) are exchanged in advance.
The consensus signature comprises a plurality of unit consensus signatures, and each unit consensus signature is a digital signature of the first consensus node on the cross-link transaction data.
As can be seen from the foregoing, the consensus signature may be a digital signature of the first consensus node in the first consensus node set, which performs transaction confirmation on the cross-chain transaction data, or may be a digital signature of all the first consensus nodes in the first consensus node set on the cross-chain transaction data.
The node in the second block chain network can obtain a node public key of the first consensus node corresponding to each unit consensus signature, signature verification is carried out on the unit consensus signatures by adopting the obtained node public key, and if the signature verification of each unit consensus signature passes, the signature verification of the consensus signatures is determined to pass; and if the signature verification of at least one unit consensus signature fails, determining that the signature verification of the consensus signature fails.
Or the node in the second block chain network may obtain the node public key of the first consensus node corresponding to each unit consensus signature, perform signature verification on the unit consensus signatures by using the obtained node public key, count the number of signature verification passes of the unit consensus signatures, and determine that the signature verification of the consensus nodes passes if the number of signature verification passes is greater than a preset threshold; and if the number of the signature verifications is not larger than the preset threshold value, determining that the signature verification of the common identification signature fails.
When the signature of the consensus node is verified, the node in the second blockchain network stores the cross-chain transaction data to the second blockchain.
The specific process of storing the cross-chain transaction data to the second blockchain by the node in the second blockchain network is as follows: the second block chain network comprises a second consensus node set, all second consensus nodes in the second consensus node set compete for the packing authority according to the workload of the second consensus nodes, and the second consensus node with the maximum workload is used as a target second consensus node.
The target second consensus node packs the cross-chain transaction data into a block (referred to as a second block, e.g., the block 20d in the corresponding embodiment of fig. 2a to 2 e), sends the second block to the other second consensus nodes, verifies the second block by all the second consensus nodes, and adds the second block to the second block chain maintained by each second consensus node after the second block passes verification, so that the cross-chain transaction data is stored in the second block chain, thereby achieving the effect of transferring the resource data out of the first account. The verification content of the second consensus node for the second block may specifically be to verify whether the target second consensus node packaging the second block is the second consensus node with the largest workload, to verify whether the second account in the cross-chain transaction data is an account on the second blockchain, or the like.
In the above description, when the consensus mechanism of the second blockchain is POW, how to add the cross-chain transaction data to the second blockchain maintained by each node in the second blockchain network, it is of course possible to adopt the consensus mechanisms such as proof of entitlement (PoS), PBFT, or RAFT (a consensus algorithm) in addition to the POW consensus mechanism.
Optionally, the node in the second blockchain network calculates a hash value of the cross-chain transaction data, the hash value is used as a new historical transaction data fingerprint, the new historical transaction data fingerprint is stored in the transaction data record table, and the subsequent new historical transaction data fingerprint can be used as a reference, so that the current cross-chain transaction data is prevented from being repeatedly submitted to the second blockchain network.
After the node in the second blockchain network stores the cross-chain transaction data to the second blockchain, the node in the second blockchain network may send a notification message that the cross-chain resource transfer is successful to the first blockchain network.
In the above, the signature of the transaction data is verified by the first consensus node, and whether cross-chain transaction data is added to the second blockchain is determined, so that resource data is transferred to the account on the second blockchain, and the implementation manner of cross-chain resource transfer can be enriched; in addition, in the verification process, the data fingerprint of the cross-chain transaction data is judged whether to be stored in the transaction data record table, so that double-flower can be prevented, and the safety of cross-chain resource transfer is improved.
Please refer to fig. 5, which is an interaction schematic diagram of a resource cross-chain transfer system according to an embodiment of the present application, where the source cross-chain transfer system includes a node of a first block chain and a node of a second block chain, the node of the first block chain is a resource transfer party, and the node of the second block chain is a resource transfer party, where the specific process includes the following steps:
step S301, a node of the first blockchain acquires cross-chain transaction data on the first blockchain; the cross-chain transaction data includes a first account on a first blockchain, a second account on a second blockchain, and a transfer resource amount.
Specifically, a node of a first blockchain acquires cross-chain transaction data on the first blockchain, wherein the cross-chain transaction data includes a first account on the first blockchain, a second account on a second blockchain and a transfer resource amount, the first account is a transfer-out account of the current cross-chain resource transfer, and the second account is a transfer-in account of the current cross-chain resource transfer.
Step S302, the node of the first blockchain stores the cross-chain transaction data to the first blockchain; the cross-chain transaction data stored onto the first blockchain is used to represent resource data in the first account that is deducted by an amount equal to the amount of transferred resource.
Specifically, the nodes of the first blockchain include a first common node set, and the first common node set includes a plurality of common nodes (referred to as first common nodes). The method comprises the steps that an accounting node is selected from a plurality of first common identification nodes based on a preset common identification mechanism of a first block chain, cross-chain transaction data are packaged into blocks by the accounting node, the first blocks are broadcasted by the accounting node in a first block chain network, all the nodes of the first block chain store the first blocks to a first block chain maintained locally, so that common identification is achieved for all the nodes of the first block chain, the cross-chain transaction data are stored on the first block chain, and resource data equal to transferred resource amount are transferred out of a first account.
Step S303, the node of the first block chain acquires a consensus signature of the first consensus node set of the first block chain on the cross-chain transaction data.
Step S304, the node of the first block chain sends the cross-chain transaction data and the consensus signature to the node of the second block chain.
The specific processes of step S301 to step S304 can refer to step S101 to step S104 in the corresponding embodiment of fig. 3.
Step S305, the node of the second block chain performs signature verification on the consensus signature, and when the signature verification of the consensus signature passes, the cross-chain transaction data is stored in the second block chain; the cross-chain transaction data stored onto the second blockchain is used to represent resource data in the second account that is increased by an amount equal to the amount of the transferred resource.
The specific process of step S305 may refer to steps S101 to S104 in the embodiment corresponding to fig. 4.
Referring to fig. 6, fig. 6 is a schematic diagram of a cross-chain resource transfer system according to an embodiment of the present application. As can be seen from fig. 6, direct communication can be performed between the node cluster of the first blockchain and the node cluster of the second blockchain, and any node in the node cluster of the first blockchain stores the first blockchain, which includes block 1, block 2, block 3, and so on; any node in the node cluster of the second blockchain stores a second blockchain, which includes block 1, block 2, block 3, and so on. The node cluster of the first blockchain can obtain the cross-chain resource transfer request, and cross-chain transaction data in the cross-chain resource transfer request is added to the first blockchain. The method comprises the steps that a signature of a common identification node of a first block chain on cross-chain transaction data is obtained, the node cluster of the first block chain sends the cross-chain transaction data and the signature to a node cluster of a second block chain, the node cluster of the second block chain verifies the signature, and after the verification is passed, the cross-chain transaction data is stored in the second block chain.
Please refer to fig. 7, which is an interaction diagram of a resource cross-chain transfer method provided in an embodiment of the present application, the resource cross-chain transfer method relates to a lightweight node, a first consensus node and a second consensus node, and the following embodiment takes an invoice transfer scenario as an example.
Step S401, the lightweight node acquires a cross-link resource transfer request.
Specifically, the block chain nodes may be divided into lightweight nodes (the lightweight nodes may be SPV nodes, simplex policy Verification) and consensus nodes, and the consensus nodes may store complete block chains and participate in consensus; the lightweight nodes can not need to store the block chain and participate in consensus, and when the service requirement exists, the lightweight nodes can synchronize the blocks from the consensus nodes at any time so as to reduce the storage requirement of the lightweight nodes. The lightweight node can be a portable intelligent device such as a smart phone and a tablet computer.
The resource cross-chain transfer of the application relates to a first block chain and a second block chain, wherein the first block chain and the second block chain have an incidence relation, a block chain network corresponding to the first block chain is called a first block chain network, and a block chain network corresponding to the second block chain is called a second block chain network. The lightweight node and the first common node are both nodes in the first block chain network, the first common node is also a common node in the first block chain network, and the lightweight node and the first common node can be called as nodes of the first block chain; the lightweight node and the second consensus node are both nodes in the second blockchain network, the second consensus node is also a consensus node in the second blockchain network, and both the lightweight node and the second consensus node can be referred to as nodes of the second blockchain. Multiple blockchain deployments are in different blockchain networks, but these multiple chains are related and can assist each other to provide cross-chain resource transfer services. Distributed deployment may reduce the storage requirements of each node and improve blockchain performance.
In this embodiment, the first consensus node and the second consensus node cannot communicate directly but can communicate indirectly through the lightweight node, and the lightweight node has the right to submit requests to the first blockchain network and the second blockchain network at the same time.
The first consensus node and the second consensus node exchange respective node public keys with each other through the lightweight nodes.
The lightweight node displays a main interface, and a user inputs a first account, a second account, an invoice transfer amount and an invoice number in the main interface, wherein the first account is a transfer-out account, the second account is a transfer-in account, the first account is an account on a first block chain, and the second account is an account on a second block chain. The light weight node combines the first account, the second account, the invoice transfer amount and the invoice number into cross-chain transaction data, and packages the cross-chain transaction data into a cross-chain resource transfer request.
Step S402, the lightweight node sends the cross-chain resource transfer request to the first common node.
In step S403, the first common node stores the cross-chain transaction data in the cross-chain resource transfer request to the first blockchain.
Specifically, the first common identification node verifies whether the account remaining amount of the first account is not less than the invoice transfer amount (or verifies whether an invoice corresponding to the invoice number exists in the first account), if so, the cross-chain transaction data is added to the first block chain, and the cross-chain transaction data stored on the first block chain is used for indicating that the invoice corresponding to the invoice number is transferred out of the first account.
The specific process of storing the cross-chain transaction data in the cross-chain resource transfer request to the first blockchain may refer to step S102 in the embodiment corresponding to fig. 3.
Step S404, the first consensus node signs the cross-link transaction data to obtain a consensus signature.
If the first block chain adopts a PBFT consensus mechanism, the first consensus node can acquire a consensus signature in a consensus process of submitting cross-chain transaction data to the first block chain; if other consensus mechanisms such as POW are adopted, the first consensus node needs to additionally sign the cross-chain transaction data after submitting the cross-chain transaction data to the first blockchain.
The specific process of acquiring the consensus signature may refer to step S103 in the embodiment corresponding to fig. 3.
In step S405, the first consensus node sends the cross-chain transaction data and the consensus signature to the lightweight node.
In step S406, the lightweight node forwards the cross-chain transaction data and the consensus signature to the second consensus node.
In step S407, the second consensus node verifies the signature, and if the signature passes the verification, stores the cross-chain transaction data in the second blockchain.
Specifically, the second consensus node verifies the consensus signature by using the node public key of the first consensus node, if the consensus signature passes the verification, the cross-chain transaction data is added to the second block chain, and the cross-chain transaction data stored in the second block chain is used for representing that the invoice corresponding to the invoice number is transferred into the second account.
The second consensus node stores the hash value of the cross-chain transaction data or stores the hash value of the cross-chain transaction data + the consensus signature so as to avoid a subsequent request for transferring the invoice to the second account again or to other accounts on the second blockchain, and double flowers are prevented.
The specific process of verifying the consensus signature by the second consensus node and transferring the invoice to the second account may refer to step S202 in the embodiment corresponding to fig. 4.
Please refer to fig. 8, which is a system architecture diagram of cross-chain resource migration according to an embodiment of the present application. The system architecture diagram of fig. 8 may be the system architecture diagram of the corresponding embodiment of fig. 7, and as can be seen from fig. 8, the lightweight node and the first common node cluster may be combined into a first block chain network, where any node in the first common node cluster stores a first block chain, where the first block chain includes block 1, block 2, block 3, and so on; the lightweight node and the second cluster of common nodes may be combined into a second blockchain network, where any node in the second cluster of common nodes stores a second blockchain, which includes block 1, block 2, block 3, and so on. The first common node cluster and the second common node cluster cannot directly communicate with each other, but request forwarding can be carried out through upper layer routing, a client or a lightweight node.
The lightweight node may obtain a cross-chain resource transfer request, send the request to a first cluster of common nodes, and the first cluster of common nodes adds cross-chain transaction data in the cross-chain resource transfer request to the first blockchain. And acquiring a signature of the first common identification node cluster on the cross-chain transaction data, and sending the cross-chain transaction data and the signature to the lightweight node by the first common identification node cluster. The lightweight node forwards the cross-chain transaction data and the signature to a second common node cluster, the second common node cluster verifies the signature, and after the verification is passed, the cross-chain transaction data is stored in a second block chain.
Further, please refer to fig. 9, which is a schematic structural diagram of a resource cross-chain transfer apparatus according to an embodiment of the present application. As shown in fig. 9, the resource cross-chain transferring apparatus 1 may be applied to the node of the first block chain in the embodiment corresponding to fig. 3-6 and the first common node in the embodiment corresponding to fig. 7-8, specifically, the resource cross-chain transferring apparatus 1 may be a computer program (including program code) running in a computer device, for example, the resource cross-chain transferring apparatus 1 is an application software; the resource cross-chain transfer device 1 can be used for executing corresponding steps in the method provided by the embodiment of the application.
The resource cross-chain transfer apparatus 1 may include: a first obtaining module 11, a roll-out module 12, a second obtaining module 13 and a sending module 14.
A first obtaining module 11, configured to obtain cross-chain transaction data on a first blockchain; the cross-chain transaction data comprises a first account on a first blockchain, a second account on a second blockchain and a transfer resource amount;
a roll-out module 12, configured to store the cross-chain transaction data to the first blockchain; the cross-chain transaction data stored onto the first blockchain is used to represent resource data in the first account that is deducted by an amount equal to the amount of the transferred resource;
a second obtaining module 13, configured to obtain a consensus signature of the first consensus node set of the first block chain on the cross-chain transaction data;
a sending module 14, configured to send the cross-chain transaction data and the consensus signature to the node of the second blockchain, so that the node of the second blockchain performs signature verification on the consensus signature, and when the signature verification passes, the node of the second blockchain stores the cross-chain transaction data to the second blockchain; the cross-chain transaction data stored onto the second blockchain is used to represent resource data in the second account that is increased by an amount equal to the amount of the transferred resource.
In one embodiment, the first common node set includes a primary node and N backup nodes, the resource cross-chain transfer method is performed by the primary node, and N is an integer greater than 0;
the roll-out module 12 is specifically configured to package the cross-link transaction data into a first block, and send the first block to each backup node, so that each backup node performs transaction verification on the cross-link transaction data in the block, and acquires transaction confirmation messages of the M backup nodes on the cross-link transaction data; the transaction confirmation message is generated after the cross-link transaction data transaction verification is passed by the backup node, and M is not more than N; and if the M is larger than a quantity threshold value, adding the first block to a first block chain corresponding to the main node.
The resource cross-chain transfer apparatus 1 may include: a first obtaining module 11, a roll-out module 12, a second obtaining module 13 and a sending module 14; the method can also comprise the following steps: a detection module 15.
The detection module 15 is configured to obtain the account remaining resource amount of the first account, and if the account remaining resource amount of the first account is not less than the transfer resource amount, notify the roll-out module to execute storing the cross-chain transaction data to the first block chain.
For specific functional implementation manners of the first obtaining module 11, the roll-out module 12, the second obtaining module 13, the sending module 14, and the detecting module 15, reference may be made to steps S101 to S104 in the embodiment corresponding to fig. 3.
In one embodiment, the transaction confirmation message includes a unit consensus signature, which is a digital signature of the backup node on the cross-chain transaction data;
the second obtaining module 13 may include: a first combining unit 131.
A first combining unit 131, configured to combine the unit consensus signatures in the transaction confirmation messages of the M backup nodes into the consensus signature.
In one embodiment, the transaction confirmation message includes a unit consensus signature, which is a digital signature of the backup node on the cross-chain transaction data;
the second obtaining module 13 may include: a second combining unit 132.
A second combining unit 132, configured to obtain a unit consensus signature of each first consensus node on the cross-link transaction data, and combine multiple unit consensus signatures into the consensus signature.
The specific functional implementation manner of the first combining unit 131 and the second combining unit 132 can refer to step S103 in the embodiment corresponding to fig. 3.
It can be known that if the first combination unit 131 is used to determine the consensus signature, the second combination unit 132 does not perform the corresponding step; if the second combination unit 132 is used to determine the consensus signature, the first combination unit 131 does not perform the corresponding steps.
Further, please refer to fig. 10, which is a schematic structural diagram of a resource cross-chain transfer apparatus according to an embodiment of the present application. As shown in fig. 10, the resource cross-chain transferring apparatus 2 may be applied to the node of the second block chain in the embodiment corresponding to fig. 3 to fig. 6 and the second common node in the embodiment corresponding to fig. 7 to fig. 8, specifically, the resource cross-chain transferring apparatus 2 may be a computer program (including program code) running in a computer device, for example, the resource cross-chain transferring apparatus 2 is an application software; the resource cross-chain transfer device 2 can be used for executing corresponding steps in the method provided by the embodiment of the application.
The resource cross-chain transfer device 2 may include: a third acquisition module 21, a verification module 22 and a transfer-in module 23.
A third obtaining module 21, configured to obtain a cross-chain transaction request on the second blockchain; the cross-chain transaction request comprises cross-chain transaction data and a consensus signature, wherein the cross-chain transaction data comprises a first account on a first blockchain, a second account on a second blockchain and a transfer resource amount, the consensus signature is a digital signature of a first consensus node set of the first blockchain on the cross-chain transaction data, and the cross-chain transaction request is sent after the node of the first blockchain stores the cross-chain transaction data to the first blockchain and acquires the consensus signature; the cross-chain transaction data stored on the first blockchain is used to represent resource data in the first account that is deducted by an amount equal to the amount of the transferred resource;
a verification module 22, configured to perform signature verification on the consensus signature;
a transfer module 23, configured to store the cross-chain transaction data to the second blockchain when the signature verification of the consensus signature passes; the cross-chain transaction data stored onto the second blockchain is used to represent resource data in the second account that is increased by an amount equal to the amount of the transferred resource.
In one embodiment, the resource cross-chain transfer method is performed by a target second consensus node in the second blockchain network, the target second consensus node being the consensus node in the second blockchain network having the largest workload;
and a transfer module 23, configured to pack the cross-chain transaction data into a second block, and add the second block to the second block chain.
The resource cross-chain transfer device 2 may include: a third obtaining module 21, a verification module 22 and a transfer-in module 23; the method can also comprise the following steps: a fourth acquisition module 24 and an output module 25.
A fourth obtaining module 24, configured to obtain a transaction data record table; the transaction data record table comprises a plurality of historical transaction data fingerprints, and each historical transaction data fingerprint is a data fingerprint of historical cross-chain transaction data;
the fourth obtaining module is further configured to obtain the data fingerprint of the cross-chain transaction data, and if the data fingerprint of the cross-chain transaction data does not belong to the multiple historical transaction data fingerprints, notify the verification module to perform signature verification on the consensus signature.
An output module 25, configured to output a notification message that the resource data has been transferred if the data fingerprint of the cross-link transaction data belongs to the multiple historical transaction data fingerprints.
The specific functional implementation manners of the third obtaining module 21, the verifying module 22, the transferring module 23, the fourth obtaining module 24 and the outputting module 25 may refer to steps S201 to S202 in the embodiment corresponding to fig. 4.
In one embodiment, the first set of common nodes comprises a plurality of first common nodes;
the resource cross-chain transfer device 2 may include: a third obtaining module 21, a verification module 22 and a transfer-in module 23; the method can also comprise the following steps: a switching module 26.
An exchanging module 26, configured to obtain node public keys of the plurality of first common nodes;
the verification module 22 is specifically configured to perform signature verification on the consensus signature according to the node public keys of the plurality of first consensus nodes when performing signature verification on the consensus signature.
In one embodiment, the consensus signature comprises a plurality of unit consensus signatures;
the verification module 22 is specifically configured to perform signature verification on each unit consensus signature according to the node public keys of the plurality of first consensus nodes when performing signature verification on the consensus signature according to the node public keys of the plurality of first consensus nodes, and if each unit consensus signature passes the signature verification, determine that the signature of the consensus signature passes the signature verification.
Further, please refer to fig. 11, which is a schematic structural diagram of a computer device according to an embodiment of the present application. The node of the first block chain in the embodiments corresponding to fig. 3 to fig. 6 and the first common node in the embodiments corresponding to fig. 7 to fig. 8 may be the computer device 1000. As shown in fig. 11, the computer device 1000 may include: a user interface 1002, a processor 1004, an encoder 1006, and a memory 1008. Signal receiver 1016 is used to receive or transmit data via cellular interface 1010, WIFI interface 1012. The encoder 1006 encodes the received data into a computer-processed data format. The memory 1008 has stored therein a computer program by which the processor 1004 is arranged to perform the steps of any of the method embodiments described above. The memory 1008 may include volatile memory (e.g., dynamic random access memory DRAM) and may also include non-volatile memory (e.g., one time programmable read only memory OTPROM). In some instances, the memory 1008 can further include memory located remotely from the processor 1004, which can be connected to the computer device 1000 via a network. The user interface 1002 may include: a keyboard 1018, and a display 1020.
In the computer device 1000 shown in fig. 11, the processor 1004 may be configured to call the memory 1008 to store a computer program to implement:
acquiring cross-chain transaction data on a first blockchain; the cross-chain transaction data comprises a first account on a first blockchain, a second account on a second blockchain and a transfer resource amount;
storing the cross-chain transaction data to the first blockchain; the cross-chain transaction data stored onto the first blockchain is used to represent resource data in the first account that is deducted by an amount equal to the amount of the transferred resource;
acquiring a consensus signature of a first consensus node set of the first blockchain on the cross-chain transaction data;
sending the cross-chain transaction data and the consensus signature to the node of the second blockchain, so that the node of the second blockchain performs signature verification on the consensus signature, and storing the cross-chain transaction data to the second blockchain by the node of the second blockchain when the signature verification is passed; the cross-chain transaction data stored onto the second blockchain is used to represent resource data in the second account that is increased by an amount equal to the amount of the transferred resource.
It should be understood that the computer device 1000 described in this embodiment of the present application may perform the description of the resource cross-chain transfer method in the embodiments corresponding to fig. 3 and fig. 5 to fig. 8, and may also perform the description of the resource cross-chain transfer device 1 in the embodiment corresponding to fig. 9, which is not described herein again. In addition, the beneficial effects of the same method are not described in detail.
Further, here, it is to be noted that: an embodiment of the present application further provides a computer storage medium, where the computer storage medium stores the aforementioned computer program executed by the resource cross-chain transfer apparatus 1, and the computer program includes program instructions, and when the processor executes the program instructions, the description of the resource cross-chain transfer method in the embodiments corresponding to fig. 3 and fig. 5 to fig. 8 can be executed, so that details are not repeated here. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in the embodiments of the computer storage medium referred to in the present application, reference is made to the description of the embodiments of the method of the present application. By way of example, program instructions may be deployed to be executed on one computer device or on multiple computer devices at one site or distributed across multiple sites and interconnected by a communication network, and the multiple computer devices distributed across the multiple sites and interconnected by the communication network may be combined into a blockchain network.
Further, please refer to fig. 12, which is a schematic structural diagram of a computer device according to an embodiment of the present application. The node of the second blockchain in the embodiments corresponding to fig. 3-6 and the second common node in the embodiments corresponding to fig. 7-8 may be the computer device 2000. As shown in fig. 12, the computer device 2000 may include: a user interface 2002, a processor 2004, an encoder 2006, and a memory 2008. The signal receiver 2016 is configured to receive or transmit data via the cellular interface 2020, the WIFI interface 2012,.. or the NFC interface 2014. Encoder 2006 encodes the received data into a computer-processed data format. The memory 2008 has stored therein a computer program, and the processor 2004 is arranged to execute the steps of any of the method embodiments described above by means of the computer program. The memory 2008 may include a volatile memory (e.g., dynamic random access memory DRAM) and may also include a non-volatile memory (e.g., an otp rom OTPROM). In some examples, the memory 2008 may further include memory remotely located from the processor 2004, which may be connected to the computer device 2000 via a network. The user interface 2002 may include: a keyboard 2018 and a display 2020.
In the computer device 2000 shown in fig. 12, the processor 2004 may be configured to call the memory 2008 to store a computer program to implement:
acquiring a cross-chain transaction request on a second blockchain; the cross-chain transaction request comprises cross-chain transaction data and a consensus signature, wherein the cross-chain transaction data comprises a first account on a first blockchain, a second account on a second blockchain and a transfer resource amount, the consensus signature is a digital signature of a first consensus node set of the first blockchain on the cross-chain transaction data, and the cross-chain transaction request is sent after the node of the first blockchain stores the cross-chain transaction data to the first blockchain and acquires the consensus signature; the cross-chain transaction data stored on the first blockchain is used to represent resource data in the first account that is deducted by an amount equal to the amount of the transferred resource;
performing signature verification on the consensus signature, and storing the cross-chain transaction data to the second blockchain when the signature verification of the consensus signature passes; the cross-chain transaction data stored onto the second blockchain is used to represent resource data in the second account that is increased by an amount equal to the amount of the transferred resource.
It should be understood that the computer device 2000 described in this embodiment may perform the description of the resource cross-chain transfer method in the embodiments corresponding to fig. 4 and fig. 5 to fig. 8, and may also perform the description of the resource cross-chain transfer device 1 in the embodiment corresponding to fig. 10, which is not described herein again. In addition, the beneficial effects of the same method are not described in detail.
Further, here, it is to be noted that: an embodiment of the present application further provides a computer storage medium, where the computer storage medium stores the aforementioned computer program executed by the resource cross-chain transfer device 2, and the computer program includes program instructions, and when the processor executes the program instructions, the description of the resource cross-chain transfer method in the embodiments corresponding to fig. 4 and fig. 5 to fig. 8 can be executed, so that details are not repeated here. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in the embodiments of the computer storage medium referred to in the present application, reference is made to the description of the embodiments of the method of the present application. By way of example, program instructions may be deployed to be executed on one computer device or on multiple computer devices at one site or distributed across multiple sites and interconnected by a communication network, and the multiple computer devices distributed across the multiple sites and interconnected by the communication network may be combined into a blockchain network.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (15)

1. A method for transferring resources across chains is characterized by comprising the following steps:
acquiring cross-chain transaction data on a first blockchain; the cross-chain transaction data comprises a first account on a first blockchain, a second account on a second blockchain and a transfer resource amount;
storing the cross-chain transaction data to the first blockchain; the cross-chain transaction data stored onto the first blockchain is used to represent resource data in the first account that is deducted by an amount equal to the amount of the transferred resource;
acquiring a consensus signature of a first consensus node set of the first blockchain on the cross-chain transaction data;
sending the cross-chain transaction data and the consensus signature to the node of the second blockchain, so that the node of the second blockchain performs signature verification on the consensus signature, and storing the cross-chain transaction data to the second blockchain by the node of the second blockchain when the signature verification is passed; the cross-chain transaction data stored onto the second blockchain is used to represent resource data in the second account that is increased by an amount equal to the amount of the transferred resource.
2. The method of claim 1, further comprising:
acquiring the account residual resource amount of the first account;
and if the account remaining resource amount of the first account is not less than the transfer resource amount, executing a step of storing the cross-chain transaction data to the first blockchain.
3. The method of claim 1, wherein the first set of common identifying nodes comprises a primary node and N backup nodes, wherein the resource cross-chain transfer method is performed by the primary node, and wherein N is an integer greater than 0;
the storing the cross-chain transaction data to the first blockchain comprises:
packaging the cross-chain transaction data into a first block, and sending the first block to each backup node so that each backup node performs transaction verification on the cross-chain transaction data in the block;
acquiring transaction confirmation messages of the M backup nodes to the cross-link transaction data; the transaction confirmation message is generated after the cross-link transaction data transaction verification is passed by the backup node, and M is not more than N;
if the M is larger than a quantity threshold value, adding the first block to a first block chain corresponding to the main node.
4. The method of claim 3, wherein the transaction confirmation message includes a unit consensus signature, the unit consensus signature being a digital signature of the backup node on the cross-chain transaction data;
the obtaining of the consensus signature of the first consensus node set of the first blockchain on the cross-chain transaction data includes:
and combining the unit consensus signatures in the transaction confirmation messages of the M backup nodes into the consensus signature.
5. The method of claim 1, wherein the first set of common nodes comprises a plurality of first common nodes;
the obtaining of the consensus signature of the first consensus node set of the first blockchain on the cross-chain transaction data includes:
acquiring a unit consensus signature of each first consensus node on the cross-chain transaction data;
combining a plurality of unit consensus signatures into the consensus signature.
6. A method for resource cross-chain transfer, the method comprising:
acquiring a cross-chain transaction request on a second blockchain; the cross-chain transaction request comprises cross-chain transaction data and a consensus signature, wherein the cross-chain transaction data comprises a first account on a first blockchain, a second account on a second blockchain and a transfer resource amount, the consensus signature is a digital signature of a first consensus node set of the first blockchain on the cross-chain transaction data, and the cross-chain transaction request is sent after the node of the first blockchain stores the cross-chain transaction data to the first blockchain and acquires the consensus signature; the cross-chain transaction data stored on the first blockchain is used to represent resource data in the first account that is deducted by an amount equal to the amount of the transferred resource;
performing signature verification on the consensus signature, and storing the cross-chain transaction data to the second blockchain when the signature verification of the consensus signature passes; the cross-chain transaction data stored onto the second blockchain is used to represent resource data in the second account that is increased by an amount equal to the amount of the transferred resource.
7. The method of claim 6, further comprising:
acquiring a transaction data record table; the transaction data record table comprises a plurality of historical transaction data fingerprints, and each historical transaction data fingerprint is a data fingerprint of historical cross-chain transaction data;
acquiring a data fingerprint of the cross-chain transaction data;
and if the data fingerprint of the cross-chain transaction data does not belong to the plurality of historical transaction data fingerprints, executing a step of signature verification on the consensus signature.
8. The method of claim 7, further comprising:
and if the data fingerprints of the cross-link transaction data belong to the plurality of historical transaction data fingerprints, outputting a notification message that the resource data are transferred.
9. The method of claim 6, wherein the first set of common nodes comprises a plurality of first common nodes;
the method further comprises the following steps:
acquiring node public keys of the plurality of first common identification nodes;
then said signature verification of said consensus signature comprises:
and performing signature verification on the consensus signatures according to the node public keys of the plurality of first consensus nodes.
10. The method of claim 9, wherein the consensus signature comprises a plurality of unit consensus signatures;
the signature verification of the consensus signature according to the node public keys of the plurality of first consensus nodes includes:
according to the node public keys of the first consensus nodes, performing signature verification on each unit consensus signature;
and if the signature verification of each unit consensus signature passes, determining that the signature verification of the consensus signature passes.
11. A resource cross-chain transfer apparatus, comprising:
the first acquisition module is used for acquiring cross-chain transaction data on the first blockchain; the cross-chain transaction data comprises a first account on a first blockchain, a second account on a second blockchain and a transfer resource amount;
a roll-out module for storing the cross-chain transaction data to the first blockchain; the cross-chain transaction data stored onto the first blockchain is used to represent resource data in the first account that is deducted by an amount equal to the amount of the transferred resource;
a second obtaining module, configured to obtain a consensus signature of the first consensus node set of the first blockchain on the cross-chain transaction data;
a sending module, configured to send the cross-chain transaction data and the consensus signature to a node of the second blockchain, so that the node of the second blockchain performs signature verification on the consensus signature, and when the signature verification passes, the node of the second blockchain stores the cross-chain transaction data to the second blockchain; the cross-chain transaction data stored onto the second blockchain is used to represent resource data in the second account that is increased by an amount equal to the amount of the transferred resource.
12. A resource cross-chain transfer device, characterized in that the method comprises:
the third acquisition module is used for acquiring the cross-chain transaction request on the second blockchain; the cross-chain transaction request comprises cross-chain transaction data and a consensus signature, wherein the cross-chain transaction data comprises a first account on a first blockchain, a second account on a second blockchain and a transfer resource amount, the consensus signature is a digital signature of a first consensus node set of the first blockchain on the cross-chain transaction data, and the cross-chain transaction request is sent after the node of the first blockchain stores the cross-chain transaction data to the first blockchain and acquires the consensus signature; the cross-chain transaction data stored on the first blockchain is used to represent resource data in the first account that is deducted by an amount equal to the amount of the transferred resource;
the verification module is used for carrying out signature verification on the consensus signature;
a transfer-in module, configured to store the cross-chain transaction data to the second blockchain when signature verification of the consensus signature passes; the cross-chain transaction data stored onto the second blockchain is used to represent resource data in the second account that is increased by an amount equal to the amount of the transferred resource.
13. A resource cross-chain transfer system is characterized by comprising a node of a first blockchain and a node of a second blockchain;
the node of the first blockchain acquires cross-chain transaction data on the first blockchain; the cross-chain transaction data comprises a first account on a first blockchain, a second account on a second blockchain and a transfer resource amount;
the node of the first blockchain stores the cross-chain transaction data to the first blockchain; the cross-chain transaction data stored onto the first blockchain is used to represent resource data in the first account that is deducted by an amount equal to the amount of the transferred resource;
the node of the first block chain acquires a common identification signature of a first common identification node set of the first block chain on the cross-chain transaction data;
the node of the first blockchain sends the cross-chain transaction data and the consensus signature to the node of the second blockchain;
the node of the second block chain carries out signature verification on the consensus signature, and when the signature verification of the consensus signature passes, the cross-chain transaction data is stored in the second block chain; the cross-chain transaction data stored onto the second blockchain is used to represent resource data in the second account that is increased by an amount equal to the amount of the transferred resource.
14. A computer arrangement comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to carry out the steps of the method according to any one of claims 1-10.
15. A computer storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions which, when executed by a processor, perform the method of any one of claims 1-10.
CN202010646649.6A 2020-07-07 2020-07-07 Resource cross-chain transfer method and device, computer equipment and storage medium Active CN111681003B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010646649.6A CN111681003B (en) 2020-07-07 2020-07-07 Resource cross-chain transfer method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010646649.6A CN111681003B (en) 2020-07-07 2020-07-07 Resource cross-chain transfer method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111681003A true CN111681003A (en) 2020-09-18
CN111681003B CN111681003B (en) 2021-06-25

Family

ID=72457205

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010646649.6A Active CN111681003B (en) 2020-07-07 2020-07-07 Resource cross-chain transfer method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111681003B (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112150284A (en) * 2020-09-22 2020-12-29 浙江数秦科技有限公司 Block chain heterogeneous chain cross-chain transaction method
CN112491846A (en) * 2020-11-18 2021-03-12 深圳前海微众银行股份有限公司 Cross-chain block chain communication method and device
CN112637127A (en) * 2020-11-23 2021-04-09 北京邮电大学 Cross-block-chain communication method and device
CN112733178A (en) * 2020-11-23 2021-04-30 腾讯科技(深圳)有限公司 Cross-chain trust method, device, equipment and medium based on digital certificate authentication
CN112861190A (en) * 2021-04-23 2021-05-28 腾讯科技(深圳)有限公司 Data cross-chain cooperation method, system and device
CN113065956A (en) * 2020-12-29 2021-07-02 上海能链众合科技有限公司 Block chain cross-chain asset transfer method
CN113259460A (en) * 2021-06-02 2021-08-13 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device
CN113259453A (en) * 2021-06-02 2021-08-13 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device
CN113259454A (en) * 2021-06-02 2021-08-13 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device
CN113297594A (en) * 2021-05-25 2021-08-24 深圳市华海同创科技有限公司 Cross-chain transaction method and device, electronic equipment and storage medium
CN113627996A (en) * 2021-09-17 2021-11-09 平安普惠企业管理有限公司 Transaction resource amount prediction method and device, computer equipment and storage medium
CN113781228A (en) * 2021-09-18 2021-12-10 北京俩撇科技有限公司 Cross-chain asset transfer method, device, equipment and storage medium
CN114285848A (en) * 2021-12-20 2022-04-05 上海研晓实业发展有限公司 Scalable method, system, electronic device and readable medium for blockchain resources
CN114331718A (en) * 2021-12-21 2022-04-12 弥达斯科技(深圳)有限公司 Cross-chain transaction method, device, equipment, storage medium and computer program product
CN114499869A (en) * 2020-11-13 2022-05-13 顺丰科技有限公司 Resource cross-link exchange method and device based on block chain and computer equipment
CN115701078A (en) * 2021-07-27 2023-02-07 腾讯科技(深圳)有限公司 Cross-chain transaction processing method and device, electronic equipment and storage medium
CN117057807A (en) * 2023-10-11 2023-11-14 腾讯科技(深圳)有限公司 Resource processing method based on block chain architecture and related equipment
CN112150284B (en) * 2020-09-22 2024-04-12 浙江数秦科技有限公司 Blockchain heterogeneous chain cross-chain transaction method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107301536A (en) * 2017-06-12 2017-10-27 腾讯科技(深圳)有限公司 Resource transfers method and device
CN107679857A (en) * 2017-10-10 2018-02-09 马晶瑶 Across the chain method of commerce and storage medium of block chain
CN110597839A (en) * 2019-09-20 2019-12-20 腾讯科技(深圳)有限公司 Transaction data processing method, device, equipment and storage medium
CN111199489A (en) * 2018-11-16 2020-05-26 上海派链信息科技有限公司 Method, apparatus, computer-readable storage medium and computer program product for cross-blockchain asset management
CN111311209A (en) * 2020-02-03 2020-06-19 腾讯科技(深圳)有限公司 Cross-block-chain data processing method, device, equipment and computer storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107301536A (en) * 2017-06-12 2017-10-27 腾讯科技(深圳)有限公司 Resource transfers method and device
CN107679857A (en) * 2017-10-10 2018-02-09 马晶瑶 Across the chain method of commerce and storage medium of block chain
CN111199489A (en) * 2018-11-16 2020-05-26 上海派链信息科技有限公司 Method, apparatus, computer-readable storage medium and computer program product for cross-blockchain asset management
CN110597839A (en) * 2019-09-20 2019-12-20 腾讯科技(深圳)有限公司 Transaction data processing method, device, equipment and storage medium
CN111311209A (en) * 2020-02-03 2020-06-19 腾讯科技(深圳)有限公司 Cross-block-chain data processing method, device, equipment and computer storage medium

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112150284B (en) * 2020-09-22 2024-04-12 浙江数秦科技有限公司 Blockchain heterogeneous chain cross-chain transaction method
CN112150284A (en) * 2020-09-22 2020-12-29 浙江数秦科技有限公司 Block chain heterogeneous chain cross-chain transaction method
CN114499869A (en) * 2020-11-13 2022-05-13 顺丰科技有限公司 Resource cross-link exchange method and device based on block chain and computer equipment
CN112491846A (en) * 2020-11-18 2021-03-12 深圳前海微众银行股份有限公司 Cross-chain block chain communication method and device
CN112491846B (en) * 2020-11-18 2023-04-18 深圳前海微众银行股份有限公司 Cross-chain block chain communication method and device
CN112637127A (en) * 2020-11-23 2021-04-09 北京邮电大学 Cross-block-chain communication method and device
CN112733178A (en) * 2020-11-23 2021-04-30 腾讯科技(深圳)有限公司 Cross-chain trust method, device, equipment and medium based on digital certificate authentication
CN112733178B (en) * 2020-11-23 2022-05-13 腾讯科技(深圳)有限公司 Cross-chain trust method, device, equipment and medium based on digital certificate authentication
CN112637127B (en) * 2020-11-23 2022-05-13 北京邮电大学 Cross-block chain communication method and device
CN113065956A (en) * 2020-12-29 2021-07-02 上海能链众合科技有限公司 Block chain cross-chain asset transfer method
CN112861190B (en) * 2021-04-23 2021-07-16 腾讯科技(深圳)有限公司 Data cross-chain cooperation method, system and device
CN112861190A (en) * 2021-04-23 2021-05-28 腾讯科技(深圳)有限公司 Data cross-chain cooperation method, system and device
CN113297594A (en) * 2021-05-25 2021-08-24 深圳市华海同创科技有限公司 Cross-chain transaction method and device, electronic equipment and storage medium
CN113259460A (en) * 2021-06-02 2021-08-13 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device
CN113259454A (en) * 2021-06-02 2021-08-13 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device
CN113259453A (en) * 2021-06-02 2021-08-13 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device
CN113259453B (en) * 2021-06-02 2021-10-15 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device
CN115701078A (en) * 2021-07-27 2023-02-07 腾讯科技(深圳)有限公司 Cross-chain transaction processing method and device, electronic equipment and storage medium
CN113627996B (en) * 2021-09-17 2023-10-31 黑龙江粮食交易市场股份有限公司 Transaction resource amount prediction method and device, computer equipment and storage medium
CN113627996A (en) * 2021-09-17 2021-11-09 平安普惠企业管理有限公司 Transaction resource amount prediction method and device, computer equipment and storage medium
CN113781228A (en) * 2021-09-18 2021-12-10 北京俩撇科技有限公司 Cross-chain asset transfer method, device, equipment and storage medium
CN114285848A (en) * 2021-12-20 2022-04-05 上海研晓实业发展有限公司 Scalable method, system, electronic device and readable medium for blockchain resources
CN114285848B (en) * 2021-12-20 2024-03-19 上海简苏网络科技有限公司 Quantifiable methods, systems, electronic devices, and readable media for blockchain resources
CN114331718A (en) * 2021-12-21 2022-04-12 弥达斯科技(深圳)有限公司 Cross-chain transaction method, device, equipment, storage medium and computer program product
CN117057807A (en) * 2023-10-11 2023-11-14 腾讯科技(深圳)有限公司 Resource processing method based on block chain architecture and related equipment
CN117057807B (en) * 2023-10-11 2024-02-09 腾讯科技(深圳)有限公司 Resource processing method based on block chain architecture and related equipment

Also Published As

Publication number Publication date
CN111681003B (en) 2021-06-25

Similar Documents

Publication Publication Date Title
CN111681003B (en) Resource cross-chain transfer method and device, computer equipment and storage medium
TWI725655B (en) Method, apparatus and system for program execution and data proof for executing a sub-logic code within a trusted execution environment
AU2019207312B2 (en) Distributed key management for trusted execution environments
EP4120114A1 (en) Data processing method and apparatus, smart device and storage medium
CN109756582B (en) Information recording method, device, node and storage medium in block chain network
US11895248B2 (en) Method and apparatus for generating blockchain transaction
CN110059494B (en) Privacy protection method for block chain transaction data and block chain system
CN109889497B (en) Distrust-removing data integrity verification method
WO2022095244A1 (en) Cross-chain transaction method, system and apparatus, device, and storage medium
US20190295049A1 (en) System and method for secure transaction verification in a distributed ledger system
CN111556120B (en) Data processing method and device based on block chain, storage medium and equipment
CN111445333B (en) Block generation method, device, computer equipment and storage medium
US20230316273A1 (en) Data processing method and apparatus, computer device, and storage medium
CN112749969B (en) Data processing method and device, computer equipment and storage medium
TW202119428A (en) Consenus of shared blockchain data storage based on error correction code
CN111464315B (en) Digital signature processing method, device, computer equipment and storage medium
CN110149323B (en) Processing device with ten-million-level TPS (platform secure protocol) contract processing capacity
CN110336779B (en) Block chain construction method and device and electronic equipment
CN113837760B (en) Data processing method, data processing device, computer equipment and storage medium
CN110096894A (en) A kind of data anonymous shared system and method based on block chain
CN111416709B (en) Voting method, device, equipment and storage medium based on block chain system
CN113706313A (en) Financing method, system and computer readable storage medium based on block chain
CN115705601A (en) Data processing method and device, computer equipment and storage medium
CN111461799B (en) Data processing method, data processing device, computer equipment and medium
US20230259930A1 (en) Cross-chain transaction processing method and apparatus, electronic device, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40028473

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant