Cross-chain transaction method, device, electronic device and storage medium

By introducing audit blockchain into the blockchain system, cross-chain transactions between the source blockchain and the target blockchain are realized, and cross-chain transactions are solved in the existing technology, and a simpler cross-chain transaction process and better regulatory capabilities are achieved.

CN119398784BActive Publication Date: 2025-03-25CHINA ACADEMY OF INFORMATION & COMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411974972.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-03-25
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

The existing cross-chain technology requires each blockchain to be interconnected with other blockchains, resulting in high protocol complexity, extremely high requirements for data lines and physical equipment, and lacks the traceability function of cross-chain transactions.

Method used

By introducing audit blockchain as an intermediate blockchain, cross-chain transactions between the source blockchain and the target blockchain are realized, avoiding direct connections between two and two, reducing the complexity of cross-chain transactions, and providing traceability functions through audit blockchain storage cross-chain transactions.

Benefits of technology

It reduces the complexity of cross-chain transactions between different blockchains, provides the traceability function of cross-chain transactions, facilitates management agencies to supervise and audit cross-chain transactions, and reduces the size and transmission overhead of cross-chain evidence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119398784B_ABST
    Figure CN119398784B_ABST
Patent Text Reader

Abstract

The embodiment of the present disclosure discloses a cross-chain transaction method, device, electronic device and storage medium, the method includes: when a first new block is detected in the source blockchain, the gateway of the source blockchain generates a first cross-chain evidence; the audit chain node of the audit blockchain verifies the first cross-chain evidence, and when the first cross-chain evidence passes the verification, stores each cross-chain transaction in the first new block; when a second new block is detected in the audit blockchain, the gateway of the audit blockchain generates a second cross-chain evidence; the target chain node of the target blockchain verifies the second cross-chain evidence, and when the second cross-chain evidence passes the verification, stores each cross-chain transaction in the second new block; when a third new block is detected in the target blockchain, executes each cross-chain transaction in the third new block. In the implementation of the present disclosure, the size of the cross-chain evidence is reduced, and the transmission overhead of transmitting the first cross-chain evidence and the second cross-chain evidence is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to cross-chain transaction technology, and in particular to a cross-chain transaction method, device, electronic device and storage medium. Background Art

[0002] With the rapid development of blockchain technology, blockchain projects are becoming more and more abundant and diversified. However, blockchain lacks consideration of interoperability at the beginning of its design, resulting in isolation between different blockchain systems and the formation of information islands. Cross-chain technology builds a bridge for interconnection between blockchains, which can realize data communication and asset transfer between different blockchains, and is an important technical means to realize chain networking.

[0003] In related technologies, cross-chain technology usually directly interconnects different blockchains in pairs, and reconstructs related protocols to enable data communication and asset transfer between different blockchains. However, the cross-chain technology that directly interconnects different blockchains in pairs is relatively complex. Since each blockchain needs to be interconnected with other blockchains, it places extremely high requirements on the data lines and physical equipment of the blockchain, and each blockchain must establish related protocols with other blockchains, resulting in high complexity of the protocol. Summary of the invention

[0004] In order to solve the above technical problems, the embodiments of the present disclosure provide a cross-chain transaction method, device, electronic device and storage medium.

[0005] One aspect of an embodiment of the present disclosure provides a cross-chain transaction method, which is applied to a blockchain system, wherein the blockchain system includes a source blockchain, a target blockchain, and an audit blockchain, and the method includes: in response to monitoring that a first new block is added to the source blockchain, the gateway of the source blockchain generates a first cross-chain evidence, and sends the first cross-chain evidence and each cross-chain transaction in the first new block to the audit blockchain, wherein any cross-chain transaction among the cross-chain transactions is used for a payment direction belonging to the source blockchain to a payee belonging to the target blockchain to perform a cross-chain transfer payment; the audit chain node of the audit blockchain verifies the first cross-chain evidence, and sends the first cross-chain evidence to the audit blockchain. When the evidence passes the verification, each cross-chain transaction in the first new block is stored; in response to monitoring the addition of a second new block in the audit blockchain, the gateway of the audit blockchain generates a second cross-chain evidence, and sends the second cross-chain evidence and each cross-chain transaction in the second new block to the target blockchain; the target chain node of the target blockchain verifies the second cross-chain evidence, and when the second cross-chain evidence passes the verification, stores each cross-chain transaction in the second new block; in response to monitoring the addition of a third new block in the target blockchain, executes each cross-chain transaction in the third new block to complete the transfer and payment operation indicated by each cross-chain transaction included in the third new block.

[0006] Another aspect of the embodiments of the present disclosure provides a cross-chain transaction device, which is applied to a blockchain system, wherein the blockchain system includes a source blockchain, a target blockchain and an audit blockchain, and the device includes: a first evidence generation module, which is used for generating a first cross-chain evidence in response to monitoring a first new block added to the source blockchain, and sending the first cross-chain evidence and each cross-chain transaction in the first new block to the audit blockchain, wherein any cross-chain transaction among the cross-chain transactions is used for a payment direction belonging to the source blockchain to a payee belonging to the target blockchain to perform a cross-chain transfer payment; a first verification module, which is used for the audit chain node of the audit blockchain to verify the first cross-chain evidence, and when the first cross-chain evidence passes During verification, each cross-chain transaction in the first new block is stored; a second evidence generation module is used for, in response to monitoring the addition of a second new block in the audit blockchain, the gateway of the audit blockchain generates a second cross-chain evidence, and sends the second cross-chain evidence and each cross-chain transaction in the second new block to the target blockchain; a second verification module is used for the target chain node of the target blockchain to verify the second cross-chain evidence, and when the second cross-chain evidence is verified, each cross-chain transaction in the second new block is stored; a transaction execution module is used for, in response to monitoring the addition of a third new block in the target blockchain, executing each cross-chain transaction in the third new block to complete the transfer and payment operation indicated by each cross-chain transaction included in the third new block.

[0007] Another aspect of the embodiments of the present disclosure provides an electronic device, comprising: a memory for storing a computer program; a processor for executing the computer program stored in the memory, and when the computer program is executed, the above-mentioned cross-chain transaction method is implemented.

[0008] Another aspect of the embodiments of the present disclosure provides a computer-readable storage medium on which a computer program is stored, characterized in that when the computer program is executed by a processor, the above-mentioned cross-chain transaction method is implemented.

[0009] In the disclosed embodiment, the audit blockchain is used as the intermediate blockchain between the source blockchain and the target blockchain, and the cross-chain transaction between the source blockchain and the target blockchain is realized through the audit blockchain, thereby avoiding the pairwise connection between the source blockchain and the target blockchain. It is only necessary for the target blockchain to be connected to the source blockchain and the audit blockchain, thereby reducing the complexity of cross-chain transactions between different blockchains. At the same time, the cross-chain transactions between the source blockchain and the target blockchain are also stored in the audit blockchain, thereby providing a traceability function for cross-chain transactions, which is convenient for management agencies to supervise and audit cross-chain transactions.

[0010] In addition, in the embodiments of the present disclosure, each cross-chain transaction is stored in one block (the first new block or the second new block), and only one first cross-chain evidence or second cross-chain evidence needs to be generated for each cross-chain transaction, thereby avoiding the situation where the cross-chain transactions are stored in different blockchains and the corresponding cross-chain evidence needs to be generated for each cross-chain transaction, thereby reducing the size of the cross-chain evidence and reducing the transmission overhead of the first cross-chain evidence and the second cross-chain evidence.

[0011] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0013] The present disclosure may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:

[0014] Figure 1 It is a flowchart of a cross-chain transaction method provided by an exemplary embodiment of the present disclosure;

[0015] Figure 2 is a flowchart of a cross-chain transaction method provided by another exemplary embodiment of the present disclosure;

[0016] Figure 3 It is a flowchart of a cross-chain transaction method provided by another exemplary embodiment of the present disclosure;

[0017] Figure 4 is a flowchart of a cross-chain transaction method provided by another exemplary embodiment of the present disclosure;

[0018] Figure 5 It is a structural schematic diagram of a cross-chain transaction device provided by an exemplary embodiment of the present disclosure;

[0019] Figure 6 The figure is a schematic diagram of the structure of an application embodiment of the electronic device disclosed in the present invention. DETAILED DESCRIPTION

[0020] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.

[0021] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.

[0022] It should also be understood that in the embodiments of the present disclosure, “plurality” may refer to two or more than two, and “at least one” may refer to one, two, or more than two.

[0023] It should also be understood that any component, data or structure mentioned in the embodiments of the present disclosure can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.

[0024] In addition, the term "and / or" in the present disclosure is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present disclosure generally indicates that the associated objects before and after are in an "or" relationship.

[0025] It should also be understood that the description of the various embodiments in the present disclosure focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.

[0026] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0027] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.

[0028] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0029] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0030] The embodiments of the present disclosure can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.

[0031] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.

[0032] In this disclosure:

[0033] Blockchain is a distributed ledger that combines data blocks in a sequential manner in chronological order to form a chain data structure, and uses cryptography to ensure that the data cannot be tampered with or forged. The node of the blockchain usually refers to the computing device in the blockchain network (for example, mobile phones, servers, etc.), that is, any computing device connected to the blockchain network can be called a node, and the node is used to store and run blockchain data.

[0034] Block is the basic data structure of blockchain, which is established in chronological order. A blockchain consists of multiple blocks. Any block in the blockchain includes a block header and a block body. The block header contains: parent block hash value (PreHash), version number, timestamp, difficulty, random number and Merkle root. The parent block hash value is the hash value of the previous block of the block, the version number is the version number of the block header, the timestamp records the creation time of the block, the difficulty is the difficulty target of the proof of work of the blockchain where the block is located, the random number (nonce) is the calculation parameter of the proof of work, and the Merkle root records the Merkle root of the transaction information in the block; the block body stores detailed data generated within a certain period of time, including all transaction records or other information generated during the block creation process that have been verified by the block, which can be understood as a form of account book. For example, the block body can store the hash value of each transaction information within a certain period of time and the transaction information list.

[0035] Merkle Mountain Range (MMR) is a special Merkle tree. Using the special structure of MMR, the prover can effectively add new leaf nodes to the existing tree, and the verifier can also perform member verification efficiently.

[0036] In the disclosed embodiment, the blockchain system may include: a source blockchain, a target blockchain, and an audit blockchain. The audit blockchain is respectively connected to the source blockchain and the target blockchain. The blockchain where the payer in the cross-chain transaction is located can be determined as the source blockchain, that is, the source blockchain stores the relevant information of the payer, the blockchain where the payee in the cross-chain transaction is located can be determined as the target blockchain, that is, the target blockchain stores the relevant information of the payee, and the blockchain used to connect the source blockchain and the target blockchain is determined as the audit blockchain.

[0037] Figure 1 is a flow chart of a cross-chain transaction method provided by an exemplary embodiment of the present disclosure. This embodiment can be applied in a blockchain system, such as Figure 1 As shown, the cross-chain transaction method of this embodiment includes the following steps:

[0038] Step S110, in response to monitoring the addition of a first new block in the source blockchain, the gateway of the source blockchain generates a first cross-chain evidence, and sends the first cross-chain evidence and each cross-chain transaction in the first new block to the audit blockchain.

[0039] Among them, any cross-chain transaction in each cross-chain transaction is used for the payee of the target blockchain to make a cross-chain transfer payment from the payee of the source blockchain to the payee of the target blockchain. The new block in the source blockchain can be called the first new block. The first new block is used to record the cross-chain transaction.

[0040] In one embodiment, a cross-chain transaction may include cross-chain transaction information, which includes: the identifier of the cross-chain transaction, the identifier of the source blockchain, the identifier of the target blockchain, the public key in the public-private key pair of the payer, the transaction amount and the signature information. The signature information is obtained by signing the cross-chain transaction information using the private key in the public-private key pair of the payer. The public-private key pair includes a public key and a private key. The public key in the public-private key pair is used to verify the signature generated by the private key in the public-private key pair, and the private key in the public-private key pair is used to sign data or information. The public-private key pair can be generated using the national secret SM2 algorithm, a symmetric encryption algorithm or an asymmetric encryption algorithm.

[0041] The first cross-chain evidence is used to prove the validity of each cross-chain transaction in the first new block. In one embodiment, when the gateway of the source blockchain monitors the addition of the first new block on the source blockchain, the gateway of the source blockchain generates the first cross-chain evidence.

[0042] Step S120: the audit chain node of the audit blockchain verifies the first cross-chain evidence, and when the first cross-chain evidence passes the verification, stores each cross-chain transaction in the first new block.

[0043] Among them, the nodes of the audit blockchain can be called audit chain nodes.

[0044] In one embodiment, when the audit chain node receives the first cross-chain evidence and each cross-chain transaction in the first new block, it verifies the first cross-chain evidence. When the first cross-chain evidence passes the verification, the audit chain node stores each cross-chain transaction in the first new block in the local transaction pool, and when the block generation (new block generation) conditions are met, the audit chain node writes each cross-chain transaction in the first new block into the audit blockchain.

[0045] Step S130, in response to monitoring the addition of a second new block in the audit blockchain, the gateway of the audit blockchain generates a second cross-chain evidence, and sends the second cross-chain evidence and each cross-chain transaction in the second new block to the target blockchain.

[0046] Among them, the new block in the audit blockchain can be called the second new block. The second new block is used to record cross-chain transactions. The second cross-chain evidence is used to prove the validity of each cross-chain transaction in the second new block. In one embodiment, when the gateway of the audit blockchain monitors the addition of the second new block on the audit blockchain, the gateway of the audit blockchain generates the second cross-chain evidence.

[0047] Step S140: The target chain node of the target blockchain verifies the second cross-chain evidence, and when the second cross-chain evidence is verified, stores each cross-chain transaction in the second new block.

[0048] Among them, the node of the target blockchain can be called the target chain node.

[0049] In one embodiment, when the target chain node receives the second cross-chain evidence and each cross-chain transaction in the second new block, the second cross-chain evidence is verified. When the second cross-chain evidence passes the verification, the target chain node stores each cross-chain transaction in the second new block in the local transaction pool, and writes each cross-chain transaction into the target blockchain when the block generation conditions are met.

[0050] Step S150, in response to monitoring the addition of a third new block in the target blockchain, executing each cross-chain transaction in the third new block to complete the transfer and payment operations indicated by each cross-chain transaction included in the third new block.

[0051] The new block in the target blockchain may be referred to as a third new block. The third new block is used to record cross-chain transactions. When the target chain node detects that the third new block is newly added in the target blockchain, the target chain node executes each cross-chain transaction in the third new block to complete the transfer and payment operations indicated by each cross-chain transaction included in the third new block.

[0052] In the disclosed embodiment, the audit blockchain is used as the intermediate blockchain between the source blockchain and the target blockchain, and the cross-chain transaction between the source blockchain and the target blockchain is realized through the audit blockchain, avoiding the pairwise connection between the source blockchain and the target blockchain. It is only necessary for the target blockchain to be connected to the source blockchain and the audit blockchain, thereby reducing the complexity of cross-chain transactions between different blockchains. At the same time, the audit blockchain also stores the cross-chain transactions between the source blockchain and the target blockchain, thereby providing a traceability function for cross-chain transactions, which is convenient for the management agency to supervise and audit cross-chain transactions. In addition, in the disclosed embodiment, each cross-chain transaction is stored in a block (the first new block or the second new block), and only a first cross-chain evidence or a second cross-chain evidence for each cross-chain transaction needs to be generated, avoiding the situation where the cross-chain transaction is stored in different blockchains and the corresponding cross-chain evidence needs to be generated for each cross-chain transaction, thereby reducing the size of the cross-chain evidence and reducing the transmission overhead of the first cross-chain evidence and the second cross-chain evidence.

[0053] In some optional implementations, in the disclosed embodiments, the first cross-chain evidence includes the first transaction validity evidence corresponding to each cross-chain transaction in the first new block, the block header of the first new block, and the hash value of each cross-chain transaction in the first new block. The second cross-chain evidence includes the second transaction validity evidence corresponding to each cross-chain transaction in the second new block, the block header of the second new block, and the hash value of each cross-chain transaction in the second new block.

[0054] In one embodiment, the gateway of the source blockchain generates the first cross-chain evidence based on the blocks of the source blockchain using the evidence generation algorithm of the Flyclient protocol. Specifically, logn1 block headers are selected on the source blockchain, and the Merkle path of each cross-chain transaction in the first new block in the first new block header, and the first cross-chain evidence is formed by the logn1 block headers and the Merkle path, where n1 is the chain length of the source blockchain. The block header of the first new block includes the Merkle mountain root (MMR Root) generated by each cross-chain transaction in the first new block based on the MMR algorithm.

[0055] In one embodiment, the gateway of the audit blockchain generates the second cross-chain evidence based on the block of the audit blockchain using the evidence generation algorithm of the Flyclient protocol. Specifically, logn2 block headers are selected on the audit blockchain, and the Merkle path of each cross-chain transaction in the second new block in the second new block header, and the logn2 block headers and the Merkle path constitute the second cross-chain evidence, where n2 is the chain length of the audit blockchain. The block header of the second new block includes the Merkle mountain root generated by each cross-chain transaction in the second new block based on the MMR algorithm.

[0056] In some optional embodiments, step S120 in the embodiment of the present disclosure may include: in response to the first transaction validity evidence passing verification, and the first verification Merkle tree root and the Merkle tree root in the block header of the first new block are the same, determining that the first cross-chain evidence passes verification.

[0057] Among them, the first verification Merkle mountain root is generated based on the hash value of each cross-chain transaction in the first new block.

[0058] In one embodiment, the audit chain node verifies whether each block header in the first cross-chain evidence is a valid block header, that is, verifies the validity of each block header. When each block header is a valid block header, it is determined that the first transaction validity evidence has passed the verification.

[0059] Using the MMR algorithm, the first verification Merkle mountain root is calculated based on the hash value of each cross-chain transaction in the first new block.

[0060] In some optional embodiments, step S140 in the embodiment of the present disclosure may include: in response to the second transaction validity evidence passing verification, and the second verification Merkle tree root is the same as the Merkle tree root in the block header of the second new block, determining that the second cross-chain evidence passes verification.

[0061] Among them, the second verification Merkle root is generated based on the hash value of each cross-chain transaction in the second new block.

[0062] In one embodiment, the target chain node verifies whether each block header in the second cross-chain evidence is a valid block header, that is, verifies the validity of each block header. When each block header is a valid block header, it is determined that the second transaction validity evidence passes the verification.

[0063] Using the MMR algorithm, the second verification Merkle mountain root is calculated based on the hash value of each cross-chain transaction in the second new block.

[0064] In some optional implementations, before step S110 in the embodiment of the present disclosure, the method also includes: in response to the gateway of the source blockchain detecting that the first new block has stabilized, the gateway of the source blockchain generates a first cross-chain evidence.

[0065] Among them, when the gateway of the source blockchain detects the first new block, it continuously links a preset number of blocks to determine that the first new block is stable. The preset number can be set according to actual needs. For example, the preset number can be set according to the security requirements of the blockchain system.

[0066] Before step S130 in the embodiment of the present disclosure, it also includes: in response to the gateway of the audit blockchain monitoring that the second new block has stabilized, the gateway of the audit blockchain generates a second cross-chain evidence.

[0067] In which, in response to the gateway of the audit chain monitoring the second new block, it continuously links a preset number of blocks and determines that the second new block has stabilized.

[0068] Figure 2 FIG. 1 is a flow chart of a cross-chain transaction method provided by another exemplary embodiment of the present disclosure. Figure 2 As shown, the cross-chain transaction method in the embodiment of the present disclosure also includes the following steps:

[0069] Step S210, in response to the source chain node of the source blockchain receiving the cross-chain transaction sent by the payer, the signature information in the cross-chain transaction is verified.

[0070] The signature information is obtained by signing the cross-chain transaction information in the cross-chain transaction using the private key in the public-private key pair of the payer, and the cross-chain transaction information includes the transaction amount. The node of the source blockchain can be called the source chain node.

[0071] In one embodiment, the user calls a preset cross-chain service application (client) to generate a cross-chain transaction based on the cross-chain transfer requirements, and based on the identifier of the source blockchain, uses the mapping relationship between the preset identifier and the Internet Protocol (IP) address to determine the IP address of the gateway of the source blockchain, and transmits the cross-chain transaction to the source blockchain through the IP address.

[0072] The source chain node obtains the public key of the payer's public-private key pair from the cross-chain transaction information, and uses the public key to verify the signature information in the cross-chain transaction information. When the signature information is verified, the source node determines that the cross-chain transaction is valid.

[0073] Step S220, in response to the signature information passing verification, the source chain node obtains the payer's account balance.

[0074] Exemplarily, the cross-chain transaction information may also include the payer's identifier. The payer's account balance may be pre-stored in the local transaction pool of the source chain node, and the payer's account balance may be obtained from the local transaction pool of the source chain node based on the payer's identifier.

[0075] Step S230, in response to the account balance being greater than or equal to the transaction amount, the source chain node determines that the verification has passed and stores the cross-chain transaction.

[0076] When it is determined that the cross-chain transaction passes the verification, the cross-chain transaction is stored in the local transaction pool of the source chain node.

[0077] In one embodiment, when the account balance of the payer is less than the transaction amount in the cross-chain transaction, the cross-chain transaction is determined to be an invalid cross-chain transaction and the cross-chain transaction is terminated.

[0078] In some optional embodiments, the cross-chain transaction method in the embodiment of the present disclosure also includes: in response to the source chain node of the source blockchain monitoring that the first new block has stabilized, for each cross-chain transaction in the first new block, the source chain node deducts the transaction amount in the cross-chain transaction from the account balance of the payer corresponding to the cross-chain transaction.

[0079] Exemplarily, for each cross-chain transaction in the first new block, the source chain node deducts the transaction amount in the cross-chain transaction from the account balance of the payer of the cross-chain transaction stored in its local transaction pool.

[0080] In the disclosed embodiment, step S150 may include: in response to the target chain node detecting that the third new block has stabilized, for each cross-chain transaction in the third new block, the target chain node adds the transaction amount in the cross-chain transaction to the account balance of the payee corresponding to the cross-chain transaction.

[0081] Exemplarily, the target chain node detects that the third new block has stabilized. For each cross-chain transaction in the third new block, the target chain node adds the transaction amount in the cross-chain transaction to the account balance of the recipient of the cross-chain transaction stored in its local transaction pool to complete the transfer payment operation indicated by the cross-chain transaction.

[0082] In some optional embodiments, the source chain node of the source blockchain in the embodiment of the present disclosure includes multiple first transaction pools, and the identifier of the target blockchain included in each cross-chain transaction stored in each first transaction pool is the same.

[0083] Among them, the local transaction pool of the source chain node can be called the first transaction pool, each first transaction pool is used to store cross-chain transactions, and the identifiers of the target blockchains in the cross-chain transactions stored in the first transaction pool are the same.

[0084] Figure 3 FIG. 1 is a flow chart of a cross-chain transaction method provided by another exemplary embodiment of the present disclosure. Figure 3 As shown, the cross-chain transaction method in the embodiment of the present disclosure also includes the following steps:

[0085] Step S310, for multiple first transaction pools, in response to the number of cross-chain transactions in the first transaction pool being a preset number, the source chain node generates a first initial new block including each cross-chain transaction in the first transaction pool, and broadcasts the first initial new block to each source chain node of the source blockchain.

[0086] The preset number can be set according to actual needs. The cross-chain transactions in the first transaction pool are stored in the form of MMR. The block header of the first initial new block includes the Merkle mountain root generated by each cross-chain transaction in the first initial new block based on the MMR algorithm.

[0087] In one embodiment, when the number of cross-chain transactions in the first transaction pool is less than a preset number, the MMR algorithm is used to store the cross-chain transactions newly entering the first transaction pool and the cross-chain transactions stored in the first transaction pool in the form of MMR. Using the unique data structure of MMR, new cross-chain transactions can be effectively added to the existing MMR tree without the need to reconstruct a new tree, thereby reducing the time for the first memory pool to generate new blocks.

[0088] In step S320, each source chain node performs consensus processing on the first initial new block, and determines whether the first verification Merkle tree root is consistent with the Merkle tree root in the block header of the first initial new block.

[0089] Among them, the first verification Merkle mountain root is generated based on each cross-chain transaction in the first initial new block.

[0090] In one embodiment, each source chain node may perform consensus processing on the first initial new block based on a preset consensus mechanism, wherein the preset consensus mechanism may be a proof-of-work (PoW) mechanism, a proof-of-stake (PoS) mechanism, or a Byzantine fault-tolerant consensus (Practical Byzantine Fault Tolerance, PBFT) mechanism, etc.

[0091] Using the MMR algorithm, the Merkle root of each cross-chain transaction in the first initial new block is calculated, and the Merkle root is determined as the first verification Merkle root.

[0092] Step S330, in response to the first initial new block passing the consensus, and the first verification Merkle tree root is consistent with the Merkle tree root in the block header of the first initial new block, the first initial new block is linked to the source blockchain as the first new block.

[0093] Among them, when the first initial new block passes the consensus of each source chain node, and the first verification Merkle mountain root is consistent with the Merkle mountain root in the block header of the first initial new block, the first initial new block is linked to the main chain tail of the source blockchain as the first new block to add the first new blockchain to the source blockchain.

[0094] In some optional implementations, the audit chain node in the embodiment of the present disclosure includes multiple second transaction pools, and the identifiers of the target blockchains included in each cross-chain transaction stored in each second transaction pool are the same.

[0095] Among them, the local transaction pool of the audit chain node can be called the second transaction pool, each second transaction pool is used to store cross-chain transactions, and the identifiers of the target blockchains in the cross-chain transactions stored in the second transaction pool are the same.

[0096] Figure 4 FIG. 1 is a flow chart of a cross-chain transaction method provided by another exemplary embodiment of the present disclosure. Figure 4 As shown, the cross-chain transaction method in the embodiment of the present disclosure also includes the following steps:

[0097] Step S410, for multiple second transaction pools, in response to the number of cross-chain transactions in the second transaction pool being a preset number, the audit chain node generates a second initial new block including each cross-chain transaction in the second transaction pool, and broadcasts the second initial new block to each audit chain node of the audit blockchain.

[0098] The cross-chain transactions stored in the second transaction pool are stored in the form of MMR. The block header of the second initial new block includes the Merkle mountain root generated by each cross-chain transaction in the second initial new block based on the MMR algorithm.

[0099] In one embodiment, when the number of cross-chain transactions in the second transaction pool is less than a preset number, the MMR algorithm is used to store the cross-chain transactions newly entering the second transaction pool and the cross-chain transactions stored in the second transaction pool in the form of MMR.

[0100] In step S420, each audit chain node performs consensus processing on the second initial new block, and determines whether the second verification Merkle tree root is consistent with the Merkle tree root in the block header of the second initial new block.

[0101] Among them, the second verification Merkle mountain root is generated based on each cross-chain transaction in the second initial new block.

[0102] In one embodiment, each audit chain node can perform consensus processing on the second initial new block based on a pre-set consensus mechanism. Using the MMR algorithm, the Merkle root of each cross-chain transaction in the second initial new block is calculated, and the Merkle root is determined as the second verification Merkle root.

[0103] Step S430, in response to the second initial new block passing consensus, and the second verification Merkle tree root is consistent with the Merkle tree root in the block header of the second initial new block, the second initial new block is linked to the audit blockchain as the second new block.

[0104] Among them, when the second initial new block passes the consensus of each audit chain node, and the second verification Merkle mountain root is consistent with the Merkle mountain root in the block header of the first initial new block, the second initial new block is linked to the main chain tail of the audit blockchain as the second new block to add the second new blockchain to the source blockchain.

[0105] The following is an example of verifying the size of the target cross-chain proof.

[0106] The experiment uses C language to implement the verification example. Assume that the honest node ratio of the source blockchain, target blockchain and audit blockchain in the blockchain system is 0.7, the number of cross-chain transactions is t, the size of each block header is 508 bytes, the length of each cross-chain transaction is 250 bytes, and a hash function with an output length of 256 bits is used to form the Merkle tree of the transaction.

[0107] Specifically, this experiment includes a control group and an experimental group. The cross-chain transactions in the control group are stored in different blocks in the source blockchain and the audit blockchain. The generated cross-chain transaction evidence includes transaction validity evidence corresponding to each cross-chain transaction, the hash value of each cross-chain transaction, and the block header of the block where each cross-chain transaction is located. The transaction validity evidence is generated by the evidence generation algorithm based on the Flyclient protocol, and the rest of the cross-chain transaction process is the same as that of this embodiment. The experimental group constructs cross-chain transactions in the manner of this embodiment. The sizes of the cross-chain evidences produced by the control group and the experimental group are detailed in Table 1. It can be seen from Table 1 that when t takes different values, the disclosed embodiments all achieve smaller cross-chain evidence sizes with lower communication and storage overheads.

[0108] Table 1

[0109]

[0110] Figure 5 1 is a schematic diagram of the structure of a cross-chain transaction device provided by an exemplary embodiment of the present disclosure. The cross-chain transaction device is applied to a blockchain system, and the blockchain system includes a source blockchain, a target blockchain, and an audit blockchain. Figure 5 As shown, the cross-chain transaction device may include:

[0111] A first evidence generation module 510 is configured to generate a first cross-chain evidence in response to monitoring that a first new block is newly added to the source blockchain, and to send the first cross-chain evidence and each cross-chain transaction in the first new block to the audit blockchain, wherein any cross-chain transaction among the cross-chain transactions is used for a payment direction belonging to the source blockchain to a payee belonging to the target blockchain to perform a cross-chain transfer payment;

[0112] A first verification module 520, configured for the audit chain node of the audit blockchain to verify the first cross-chain evidence, and when the first cross-chain evidence passes the verification, store each cross-chain transaction in the first new block;

[0113] A second evidence generation module 530 is configured to generate a second cross-chain evidence in response to monitoring that a second new block is added to the audit blockchain, and send the second cross-chain evidence and each cross-chain transaction in the second new block to the target blockchain;

[0114] A second verification module 540 is used for the target chain node of the target blockchain to verify the second cross-chain evidence, and when the second cross-chain evidence is verified, store each cross-chain transaction in the second new block;

[0115] The transaction execution module 550 is used to execute each cross-chain transaction in the third new block in response to monitoring the addition of a third new block in the target blockchain, so as to complete the transfer and payment operations indicated by each cross-chain transaction included in the third new block.

[0116] In some possible implementations of the present disclosure, the first cross-chain evidence in the embodiments of the present disclosure includes the first transaction validity evidence corresponding to each cross-chain transaction in the first new block, the block header of the first new block, and the hash value of each cross-chain transaction in the first new block; the second cross-chain evidence includes the second transaction validity evidence corresponding to each cross-chain transaction in the second new block, the block header of the second new block, and the hash value of each cross-chain transaction in the second new block.

[0117] In some possible implementations of the present disclosure, the first verification module 520 in the embodiment of the present disclosure is specifically used to determine that the first cross-chain evidence passes verification in response to the first transaction validity evidence passing verification, and the first verification Merkle root is the same as the Merkle root in the block header of the first new block, and the first verification Merkle root is generated based on the hash value of each cross-chain transaction in the first new block.

[0118] In some possible implementations of the present disclosure, the second verification module 540 in the embodiment of the present disclosure is specifically used to determine that the second cross-chain evidence passes verification in response to the second transaction validity evidence passing verification, and the second verification Merkle tree root is the same as the Merkle tree root in the block header of the second new block, and the second verification Merkle tree root is generated based on the hash value of each cross-chain transaction in the second new block.

[0119] In some possible implementations of the present disclosure, the first evidence generation module 510 in the embodiment of the present disclosure is further configured to generate a first cross-chain evidence in response to the gateway of the source blockchain detecting that the first new block has stabilized;

[0120] The second evidence generation module 530 is also used to generate a second cross-chain evidence in response to the gateway of the audit blockchain detecting that the second new block has stabilized.

[0121] In some possible implementations of the present disclosure, the cross-chain transaction device in the embodiment of the present disclosure further includes:

[0122] A signature verification module, configured to verify, in response to a source chain node of the source blockchain receiving a cross-chain transaction sent by a payer, signature information in the cross-chain transaction, the signature information being obtained by signing the cross-chain transaction information in the cross-chain transaction using a private key in a public-private key pair of the payer, the cross-chain transaction information including a transaction amount;

[0123] A balance acquisition module, configured to, in response to the signature information being verified, enable the source chain node to acquire the account balance of the payer;

[0124] A storage module is used for, in response to the account balance being greater than or equal to the transaction amount, the source chain node determining that the cross-chain transaction has passed the verification, and storing the cross-chain transaction.

[0125] In some possible implementations of the present disclosure, the cross-chain transaction device in the embodiment of the present disclosure further includes:

[0126] a balance deduction module, configured to, in response to a source chain node of the source blockchain detecting that the first new block has stabilized, deduct, by the source chain node, for each cross-chain transaction in the first new block, a transaction amount in the cross-chain transaction from an account balance of a payer corresponding to the cross-chain transaction;

[0127] The executing each cross-chain transaction included in the third new block is further used to:

[0128] In response to the target chain node detecting that the third new block has stabilized, for each cross-chain transaction in the third new block, the target chain node adds the transaction amount in the cross-chain transaction to the account balance of the payee corresponding to the cross-chain transaction.

[0129] In some possible implementations of the present disclosure, the source chain node of the source blockchain in the embodiment of the present disclosure includes multiple first transaction pools, and the identifiers of the target blockchains included in each cross-chain transaction stored in each first transaction pool are the same;

[0130] The device also includes:

[0131] A first block-producing node, configured to generate, for the plurality of first transaction pools, in response to the number of cross-chain transactions in the first transaction pool being a preset number, a first initial new block including each cross-chain transaction in the first transaction pool by the source chain node, and broadcast the first initial new block to each source chain node of the source blockchain;

[0132] A first consensus node, used for the source chain nodes to perform consensus processing on the first initial new block, and to determine whether a first verification Merkle root is consistent with a Merkle root in a block header of the first initial new block, wherein the first verification Merkle root is generated based on each cross-chain transaction in the first initial new block;

[0133] A first on-chain node is configured to, in response to the first initial new block passing consensus and the first verification Merkle tree root being consistent with the Merkle tree root in a block header of the first initial new block, link the first initial new block to the source blockchain as the first new block.

[0134] In some possible implementations of the present disclosure, the audit chain node in the embodiment of the present disclosure includes multiple second transaction pools, and the identifiers of the target blockchains included in each cross-chain transaction stored in each second transaction pool are the same;

[0135] The device also includes:

[0136] A first block-producing node, configured to generate, for the plurality of second transaction pools, in response to the number of cross-chain transactions in the second transaction pool being a preset number, a second initial new block including each cross-chain transaction in the second transaction pool by the audit chain node, and broadcast the second initial new block to each audit chain node of the audit blockchain;

[0137] A second consensus node, used for the audit chain nodes to perform consensus processing on the second initial new block, and determine whether a second verification Merkle root is consistent with a Merkle root in a block header of the second initial new block, wherein the second verification Merkle root is generated based on each cross-chain transaction in the second initial new block;

[0138] A third on-chain node is configured to, in response to the second initial new block passing consensus and the second verification Merkle tree root being consistent with the Merkle tree root in the block header of the second initial new block, link the second initial new block as the second new block to the audit blockchain.

[0139] The cross-chain transaction device of the embodiment of the present disclosure corresponds to the embodiment of the cross-chain transaction method of the present disclosure, and the relevant contents can be referenced to each other and will not be repeated here.

[0140] The beneficial technical effects corresponding to the exemplary embodiments of the cross-chain transaction device of the disclosed embodiment can be found in the corresponding beneficial technical effects of the above-mentioned corresponding exemplary method part, which will not be repeated here.

[0141] In addition, an embodiment of the present disclosure further provides an electronic device, including:

[0142] Memory for storing computer programs;

[0143] The processor is used to execute the computer program stored in the memory, and when the computer program is executed, the cross-chain transaction method described in any of the above embodiments of the present disclosure is implemented.

[0144] Figure 6 This is a schematic diagram of the structure of an application embodiment of the electronic device disclosed in the present invention. Figure 6 The electronic device according to the embodiment of the present disclosure is described. The electronic device may be any one or both of the first device and the second device, or a stand-alone device independent of them, and the stand-alone device may communicate with the first device and the second device to receive the collected input signals from them.

[0145] like Figure 6 As shown, the electronic device includes one or more processors and memory.

[0146] The processor may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.

[0147] The memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor may run the program instructions to implement the cross-chain transaction method of each embodiment of the present disclosure described above and / or other desired functions.

[0148] In one example, the electronic device may further include: an input device and an output device, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0149] In addition, the input device may also include, for example, a keyboard, a mouse, and the like.

[0150] The output device can output various information to the outside, including the determined distance information, direction information, etc. The output device can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.

[0151] Of course, to simplify, Figure 6Only some of the components related to the present disclosure in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device may further include any other appropriate components.

[0152] In addition to the above-mentioned methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the cross-chain transaction method according to various embodiments of the present disclosure described in the above part of this specification.

[0153] The computer program product may be written in any combination of one or more programming languages ​​to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0154] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the processor executes the steps of the cross-chain transaction method according to various embodiments of the present disclosure described in the above part of this specification.

[0155] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0156] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes.

[0157] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.

[0158] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0159] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.

[0160] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

[0161] It should also be noted that in the apparatus, device and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.

[0162] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0163] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A cross-chain transaction method, characterized in that: Applied to a blockchain system, the blockchain system includes a source blockchain, a target blockchain, and an audit blockchain, the method includes: In response to monitoring the addition of a first new block in the source blockchain, the gateway of the source blockchain generates a first cross-chain evidence, and sends the first cross-chain evidence and each cross-chain transaction in the first new block to the audit blockchain, wherein any cross-chain transaction among the cross-chain transactions is used for a payee belonging to the target blockchain to make a cross-chain transfer payment from a payee belonging to the source blockchain to a payee belonging to the target blockchain, and the first cross-chain evidence includes a first transaction validity evidence corresponding to each cross-chain transaction in the first new block, a block header of the first new block, and a hash value of each cross-chain transaction in the first new block; The audit chain node of the audit blockchain verifies the first cross-chain evidence, and when the first cross-chain evidence passes the verification, stores each cross-chain transaction in the first new block; In response to monitoring that a second new block is added to the audit blockchain, the gateway of the audit blockchain generates a second cross-chain evidence, and sends the second cross-chain evidence and each cross-chain transaction in the second new block to the target blockchain, where the second cross-chain evidence includes a second transaction validity evidence corresponding to each cross-chain transaction in the second new block, a block header of the second new block, and a hash value of each cross-chain transaction in the second new block; The target chain node of the target blockchain verifies the second cross-chain evidence, and stores each cross-chain transaction in the second new block when the second cross-chain evidence is verified; In response to monitoring the addition of a third new block in the target blockchain, each cross-chain transaction in the third new block is executed to complete the transfer and payment operations indicated by each cross-chain transaction included in the third new block.

2. The method according to claim 1, characterized in that The audit chain node of the audit blockchain verifies the first cross-chain evidence, including: In response to the first transaction validity evidence passing verification, and the first verification Merkle tree root is the same as the Merkle tree root in the block header of the first new block, it is determined that the first cross-chain evidence passes verification, and the first verification Merkle tree root is generated based on the hash value of each cross-chain transaction in the first new block.

3. The method according to claim 1, characterized in that The target chain node of the target blockchain verifies the second cross-chain evidence, including: In response to the second transaction validity evidence passing verification, and the second verification Merkle tree root is the same as the Merkle tree root in the block header of the second new block, it is determined that the second cross-chain evidence passes verification, and the second verification Merkle tree root is generated based on the hash value of each cross-chain transaction in the second new block.

4. The method according to claim 1, characterized in that: Before the gateway of the source blockchain generates the first cross-chain evidence, it also includes: In response to the gateway of the source blockchain detecting that the first new block has stabilized, the gateway of the source blockchain generates a first cross-chain evidence; Before the gateway of the audit blockchain generates the second cross-chain evidence, it also includes: In response to the gateway of the audit blockchain detecting that the second new block has stabilized, the gateway of the audit blockchain generates a second cross-chain evidence.

5. The method according to claim 1, characterized in that Also includes: In response to the source chain node of the source blockchain receiving the cross-chain transaction sent by the payer, verifying the signature information in the cross-chain transaction, the signature information is obtained by signing the cross-chain transaction information in the cross-chain transaction using the private key in the public-private key pair of the payer, and the cross-chain transaction information includes the transaction amount; In response to the signature information being verified, the source chain node obtains the account balance of the payer; In response to the account balance being greater than or equal to the transaction amount, the source chain node determines that the cross-chain transaction passes verification and stores the cross-chain transaction.

6. The method according to claim 4, characterized in that Also includes: In response to the source chain node of the source blockchain detecting that the first new block has stabilized, for each cross-chain transaction in the first new block, the source chain node deducts the transaction amount in the cross-chain transaction from the account balance of the payer corresponding to the cross-chain transaction; The executing each cross-chain transaction included in the third new block includes: In response to the target chain node detecting that the third new block has stabilized, for each cross-chain transaction in the third new block, the target chain node adds the transaction amount in the cross-chain transaction to the account balance of the payee corresponding to the cross-chain transaction.

7. The method according to claim 6, characterized in that The source chain node of the source blockchain includes multiple first transaction pools, and the identifiers of the target blockchains included in each cross-chain transaction stored in each first transaction pool are the same; The method further comprises: For the multiple first transaction pools, in response to the number of cross-chain transactions in the first transaction pool being a preset number, the source chain node generates a first initial new block including each cross-chain transaction in the first transaction pool, and broadcasts the first initial new block to each source chain node of the source blockchain; The source chain nodes perform consensus processing on the first initial new block, and determine whether a first verification Merkle tree root is consistent with a Merkle tree root in a block header of the first initial new block, wherein the first verification Merkle tree root is generated based on each cross-chain transaction in the first initial new block; In response to the first initial new block passing consensus and the first verification Merkle tree root being consistent with the Merkle tree root in the block header of the first initial new block, the first initial new block is linked to the source blockchain as the first new block.

8. The method according to claim 7, characterized in that The audit chain node includes a plurality of second transaction pools, and the identifiers of the target blockchains included in each cross-chain transaction stored in each second transaction pool are the same; The method further comprises: For the multiple second transaction pools, in response to the number of cross-chain transactions in the second transaction pool being a preset number, the audit chain node generates a second initial new block including each cross-chain transaction in the second transaction pool, and broadcasts the second initial new block to each audit chain node of the audit blockchain; The audit chain nodes perform consensus processing on the second initial new block, and determine whether a second verification Merkle root is consistent with a Merkle root in a block header of the second initial new block, wherein the second verification Merkle root is generated based on each cross-chain transaction in the second initial new block; In response to the second initial new block passing consensus and the second verification Merkle tree root being consistent with the Merkle tree root in the block header of the second initial new block, the second initial new block is linked to the audit blockchain as the second new block.

9. A cross-chain transaction device, characterized in that: Applied to a blockchain system, the blockchain system includes a source blockchain, a target blockchain and an audit blockchain, and the device includes: A first evidence generation module, configured to generate a first cross-chain evidence in response to monitoring a new first new block in the source blockchain, and send the first cross-chain evidence and each cross-chain transaction in the first new block to the audit blockchain, wherein any cross-chain transaction among the cross-chain transactions is used for a payment direction belonging to the source blockchain to a payee belonging to the target blockchain to make a cross-chain transfer payment, and the first cross-chain evidence includes a first transaction validity evidence corresponding to each cross-chain transaction in the first new block, a block header of the first new block, and a hash value of each cross-chain transaction in the first new block; A first verification module, configured for the audit chain node of the audit blockchain to verify the first cross-chain evidence, and when the first cross-chain evidence passes the verification, store each cross-chain transaction in the first new block; A second evidence generation module, configured to generate a second cross-chain evidence in response to monitoring that a second new block is added to the audit blockchain, and send the second cross-chain evidence and each cross-chain transaction in the second new block to the target blockchain, wherein the second cross-chain evidence includes a second transaction validity evidence corresponding to each cross-chain transaction in the second new block, a block header of the second new block, and a hash value of each cross-chain transaction in the second new block; A second verification module, configured for the target chain node of the target blockchain to verify the second cross-chain evidence, and when the second cross-chain evidence is verified, to store each cross-chain transaction in the second new block; The transaction execution module is used to execute each cross-chain transaction in the third new block in response to monitoring the addition of a third new block in the target blockchain, so as to complete the transfer and payment operations indicated by each cross-chain transaction included in the third new block.

10. An electronic device, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program stored in the memory, and when the computer program is executed, the cross-chain transaction method described in any one of claims 1 to 8 is implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the cross-chain transaction method described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Cross-chain information security interaction method, equipment and medium

    CN118337363A

  • Cross-account cross-block chain platform data transaction auditing method

    CN118967316A