Cross-chain transaction method, cross-chain system construction method and related equipment
By deploying cross-chain components in the blockchain network, efficient data synchronization and cross-chain transactions of heterogeneous blockchain networks are solved, and the transaction performance and security are improved.
Patent Information
- Application Number
- CN202311861705.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-30
- Publication Date
- 2025-07-01
AI Technical Summary
Existing cross-chain technologies rely on trusted third-party endorsement or relay chains, resulting in transactions being restricted by third parties and it is difficult to meet business needs, especially in terms of transaction performance and security.
By deploying cross-chain components in the blockchain network, efficient data synchronization between heterogeneous blockchain networks is achieved, and relay chain modality and cross-chain component networks are used to interact directly between blockchain network nodes to avoid dependence on third parties and realize cross-chain transactions.
It realizes efficient data synchronization and cross-chain transactions between heterogeneous blockchain networks, meets the business needs of transaction performance and security, and improves transaction efficiency and reliability.
Smart Images

Figure CN120238540A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular, to a cross-chain transaction method, a cross-chain system construction method, a cross-chain system, a cross-chain management system, a computing device cluster, a computer-readable storage medium, and a computer program product. Background Art
[0002] A blockchain (blockchain or block chain) network is a peer-to-peer network system that uses technologies such as cryptography and consensus mechanisms to establish and store a large chain of transaction data blocks. Currently, there are thousands of open-running blockchain networks, and these blockchain networks vary in terms of security and privacy mechanisms, transaction throughput, scalability, etc., resulting in isolation between blockchain networks and forming data and value islands. The inter-chain barriers and trust gaps caused by the island effect also greatly restrict the large-scale development of blockchain applications and hinder the interoperability and liquidity among blockchain ecosystems.
[0003] Blockchains with different architectures are based on different consensus algorithms, data structures, security algorithms, and ledger types, resulting in the inability of different architectures of blockchains to interoperate. For this reason, the industry has proposed cross-chain technology to promote the value flow and transaction interaction among various blockchain ecosystems in order to maximize the application value among blockchain networks.
[0004] Currently, related cross-chain technologies rely on the endorsement of a trusted third party or require a third-party relay chain to achieve cross-chain capabilities, resulting in transactions being restricted by the third party and making it difficult to meet business requirements. Summary of the Invention
[0005] This application provides a cross-chain transaction method and a cross-chain system construction method. This method improves the component mode of heterogeneous chain cross-chain, constructs a layer of node network based on any heterogeneous chain, and realizes efficient data synchronization between heterogeneous blockchain networks by using the relay chain mode. This method uses cross-chain components on nodes and does not rely on a third party, solving the problem that related cross-chain technologies rely on the endorsement of a trusted third party or require a third-party relay chain to achieve cross-chain capabilities, and can meet business requirements, especially the requirements for transaction performance and transaction security. This application also provides a cross-chain system, a cross-chain management system, a computing device cluster, a computer-readable storage medium, and a computer program product corresponding to the above method.
[0006] In a first aspect, this application provides a cross-chain transaction method. This method is applied to a cross-chain system, which includes a first blockchain network, a second sub-blockchain network, and a third blockchain network. The second blockchain network and the third blockchain network are heterogeneous blockchain networks, and cross-chain components are respectively deployed on the first blockchain network, the second blockchain network, and the third blockchain network.
[0007] Specifically, the cross-chain component of the first blockchain network can obtain a cross-chain transaction request, which is used to request the execution of a cross-chain transaction from the second blockchain network to the third blockchain network. Then, the cross-chain component of the first blockchain network performs identity verification and permission verification based on the cross-chain transaction request to obtain a verification result. When the verification result indicates that the verification is passed, the cross-chain component of the first blockchain network can record the transaction information of the cross-chain transaction in the ledger of the first blockchain network when the nodes of the first blockchain network reach a consensus on the cross-chain transaction. Then, the cross-chain component of the first blockchain network notifies the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
[0008] In this method, the cross-chain components of the blockchain network are deployed in the blockchain network and can directly interact with the nodes in the blockchain network. Moreover, the cross-chain components of different blockchain networks can interact through the protocols between the components. Therefore, the interaction between different blockchain networks can be realized. When a cross-chain transaction is carried out, after cross-chain messages such as the cross-chain transaction request are monitored by the cross-chain component of the blockchain network where the transaction initiator is located (such as the second blockchain network), they can be transferred to the first blockchain network through the communication between the cross-chain components. The nodes of the first blockchain network reach a consensus on the cross-chain transaction, and the cross-chain component of the first blockchain network can record the transaction information of the cross-chain transaction in the ledger of the first blockchain. Then, the cross-chain component of the first blockchain network notifies the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network through the communication between the cross-chain components. This method improves the component mode of heterogeneous chain cross-chain and constructs a layer of node network based on any heterogeneous chain, specifically a cross-chain node network based on cross-chain components, also known as a cross-chain component network, and realizes efficient data synchronization between heterogeneous blockchain networks by using the relay chain mode.
[0009] In some possible implementation manners, the cross-chain component of the first blockchain network, the second blockchain network component, and the third blockchain network component form a synchronization network. Correspondingly, the cross-chain component of the first blockchain network broadcasts a notification message through the synchronization network, and the notification message is used to notify the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
[0010] This method ensures the reachability of messages through the synchronization network, ensures that the cross-chain component of the first blockchain network can notify the cross-chain component of the third blockchain network to perform the cross-chain transaction recording operation, and realizes the consistency of data between multiple chains.
[0011] In some possible implementation manners, cross-chain components in a synchronous network perform message synchronization through a gossip protocol. Through the gossip protocol, messages can spread quickly. In this way, cross-chain components in a third blockchain network can be notified as soon as possible to perform cross-chain transaction record operations, improving the synchronization efficiency.
[0012] In some possible implementation manners, a direct connection channel is established between the cross-chain component of a first blockchain network and the cross-chain component of a third blockchain network. Accordingly, the cross-chain component of the first blockchain network can notify the cross-chain component of the third blockchain network through the direct connection channel to record transaction information of a cross-chain transaction in the ledger of the third blockchain network.
[0013] This method can notify the cross-chain component of the third blockchain network through the direct connection channel to record transaction information of a cross-chain transaction in the ledger of the third blockchain network, which can further improve the synchronization efficiency. Especially in the scenario of consecutive cross-chain transactions, subsequent cross-chain transactions can utilize the link established by a previous transaction, significantly improving the synchronization efficiency, such as the efficiency of synchronizing cross-chain transactions.
[0014] In some possible implementation manners, the cross-chain component of the first blockchain network identifies the transaction type of a cross-chain transaction. Accordingly, when the transaction type is cross-chain write, the cross-chain component of the first blockchain network records the transaction information of the cross-chain transaction in the ledger of the first blockchain network. By distinguishing different transaction types, for cross-chain write, the first blockchain can record the transaction information of the cross-chain transaction in the ledger to achieve the consistency of data between different chains.
[0015] In some possible implementation manners, after the cross-chain component of the third blockchain network successfully records the transaction information of a cross-chain transaction in the ledger of the third blockchain network, it notifies the cross-chain component of the second blockchain network to record the transaction information of the cross-chain transaction in the ledger of the second blockchain network. In this way, the second blockchain network can record the transaction information in its ledger based on the execution status of the cross-chain transaction in the third blockchain network, improving the synchronization efficiency while ensuring atomicity.
[0016] In some possible implementation manners, the cross-chain component of the first blockchain network can receive the chain information and cross-chain access permission information of the second blockchain network and the chain information and cross-chain access permission information of the third blockchain network, and record the chain information and cross-chain access permission information of the second blockchain network and the chain information and cross-chain access permission information of the third blockchain network in the ledger of the first blockchain network.
[0017] By recording the registered chain information and cross-chain access permission information in the ledger of the first blockchain network, this method can be used to audit or query the status (valid or invalid, or whether it has lost activity) or permission information of nodes (such as cross-chain nodes) in the registered blockchain network.
[0018] In some possible implementation manners, the cross-chain component of the first blockchain network detects the validity of the third blockchain network according to the chain information of the third blockchain network. When the third blockchain network is valid, the cross-chain component of the first blockchain network notifies the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction into the ledger of the third blockchain network.
[0019] In this method, by first detecting the validity of the third blockchain network and then notifying the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction, the cross-chain component of the first blockchain network can reduce the risk of cross-chain transaction failure.
[0020] In some possible implementation manners, the cross-chain component of the first blockchain network receives a cross-chain transaction request routed by the cross-chain component of the second blockchain network according to the routing address. In this way, the cross-chain transaction request can be transferred between different blockchain networks through the cross-chain component, laying a foundation for cross-chain transactions.
[0021] In some possible implementation manners, the cross-chain component includes an agent and a controller (such as a cross-chain controller). The agent encapsulates the interaction interfaces of the heterogeneous blockchain networks based on a general interaction protocol. Correspondingly, the cross-chain component of the second blockchain network listens for the cross-chain transaction request through the general interaction protocol. In this way, the differences between different heterogeneous chains can be shielded, and listening for heterogeneous chains is supported.
[0022] In a second aspect, the present application provides a method for constructing a cross-chain system. The method is applied to a cross-chain management system for constructing a cross-chain system. The cross-chain system includes a first blockchain network, a second sub-blockchain network, and a third sub-blockchain network. The second blockchain network and the third blockchain network are heterogeneous blockchain networks. The method includes:
[0023] Deploying cross-chain components on at least one node of the first blockchain network, deploying the cross-chain components on at least one node of the second blockchain network, and deploying the cross-chain components on at least one node of the third blockchain network;
[0024] Registering the chain information and cross-chain access permission information of the second blockchain network in the first blockchain network, and registering the chain information and cross-chain access permission information of the third blockchain network in the first blockchain network. The chain information of the second blockchain network is used for the cross-chain component of the third blockchain network to discover the second blockchain network, and the chain information of the third blockchain network is used for the cross-chain component of the second blockchain network to discover the third blockchain network.
[0025] This method deploys cross-chain components on at least one node of the blockchain network to build or enhance the cross-chain capabilities of the nodes, forming cross-chain nodes. The cross-chain components of the cross-chain nodes can be constructed into a synchronous network layer based on any heterogeneous blockchain network through a registration discovery mechanism. This synchronous network can use the relay chain mode to achieve efficient data synchronization of heterogeneous blockchain networks. This method uses the cross-chain components on the nodes and does not rely on a third party, solving the problem that related cross-chain technologies rely on the endorsement of a trusted third party or require a third-party relay chain to achieve cross-chain capabilities, and can meet business requirements, especially the requirements for transaction performance and transaction security.
[0026] In some possible implementation manners, deploying the cross-chain components on at least one node of the third blockchain network includes:
[0027] Downloading the cross-chain components from the first blockchain network;
[0028] Adapting the cross-chain components to the third blockchain network;
[0029] Deploying the adapted cross-chain components on at least one node of the third blockchain network.
[0030] In some possible implementation manners, the method further includes:
[0031] Checking the status of the cross-chain components deployed on at least one node in the first blockchain network;
[0032] Determining the availability of the first blockchain network according to the number of nodes with normal status of the cross-chain components.
[0033] In some possible implementation manners, the method further includes:
[0034] Configuring the first blockchain network as the main chain, and the main chain is used to relay cross-chain transactions between the second blockchain network and the third blockchain network.
[0035] In some possible implementation manners, the method further includes:
[0036] Creating the second blockchain network using a first blockchain service, and creating the third blockchain network using a second blockchain service, where the second blockchain network and the third blockchain network are heterogeneous blockchain networks.
[0037] In some possible implementation manners, the first blockchain service and the second blockchain service provide standardized interfaces. Creating the second blockchain network using the first blockchain service and creating the second blockchain network using the second blockchain service includes:
[0038] Call the first blockchain service through the standardized interface to create the second blockchain network, and call the second blockchain service through the standardized interface to create the third blockchain network.
[0039] In some possible implementation manners, creating the second blockchain network by using the first blockchain service includes:
[0040] Use the first blockchain service to create the second blockchain network that is independent of the organization of the first blockchain network.
[0041] In a third aspect, the present application provides a cross-chain system. The cross-chain system includes a first blockchain network, a second sub-blockchain network, and a third blockchain network. The second blockchain network and the third blockchain network are heterogeneous blockchain networks. Cross-chain components are respectively deployed on the first blockchain network, the second blockchain network, and the third blockchain network;
[0042] The cross-chain component of the first blockchain network is configured to obtain a cross-chain transaction request, where the cross-chain transaction request is used to request to execute a cross-chain transaction from the second blockchain network to the third blockchain network, perform identity verification and permission verification according to the cross-chain transaction request, and obtain a verification result;
[0043] The cross-chain component of the first blockchain network is further configured to, when the verification result indicates that the verification is passed and a consensus is reached on the cross-chain transaction at a node of the first blockchain network, record transaction information of the cross-chain transaction in the ledger of the first blockchain network, and notify the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
[0044] In some possible implementation manners, the cross-chain component of the first blockchain network, the second blockchain network component, and the third blockchain network component form a synchronization network. The cross-chain component of the first blockchain network is specifically configured to:
[0045] Broadcast a notification message through the synchronization network, where the notification message is used to notify the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
[0046] In some possible implementation manners, the cross-chain components in the synchronization network perform message synchronization through a gossip protocol.
[0047] In some possible implementation manners, a direct connection channel is established between the cross-chain component of the first blockchain network and the cross-chain component of the third blockchain network;
[0048] The cross-chain component of the first blockchain network is specifically configured to:
[0049] Notify the cross-chain component of the third blockchain network through the direct connection channel to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
[0050] In some possible implementation manners, the cross-chain component of the first blockchain network is further configured to:
[0051] The cross-chain component of the first blockchain network identifies the transaction type of the cross-chain transaction;
[0052] Specifically, the cross-chain component of the first blockchain network is configured to:
[0053] When the transaction type is cross-chain write, record the transaction information of the cross-chain transaction in the ledger of the first blockchain network.
[0054] In some possible implementation manners, the cross-chain component of the third blockchain network is specifically configured to:
[0055] When the transaction information of the cross-chain transaction is successfully recorded in the ledger of the third blockchain network, notify the cross-chain component of the second blockchain network to record the transaction information of the cross-chain transaction in the ledger of the second blockchain network.
[0056] In some possible implementation manners, the cross-chain component of the first blockchain network is further configured to:
[0057] Receive the chain information and cross-chain access permission information of the second blockchain network and the chain information and the cross-chain access permission information of the third blockchain network, and record the chain information and cross-chain access permission information of the second blockchain network and the chain information and the cross-chain access permission information of the third blockchain network in the ledger of the first blockchain network.
[0058] In some possible implementation manners, the cross-chain component of the first blockchain network is further configured to:
[0059] Detect the effectiveness of the third blockchain network according to the chain information of the third blockchain network;
[0060] Specifically, the cross-chain component of the first blockchain network is configured to:
[0061] When the third blockchain network is effective, the cross-chain component of the first blockchain network notifies the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
[0062] In some possible implementation manners, the cross-chain component of the first blockchain network is specifically configured to:
[0063] Receive the cross-chain transaction request routed by the cross-chain component of the second blockchain network according to the routing address.
[0064] In some possible implementation manners, the cross-chain component includes an agent and a controller. The agent encapsulates the interaction interfaces of the heterogeneous blockchain networks based on a general interaction protocol.
[0065] The cross-chain component of the second blockchain network is used for:
[0066] Listen for the cross-chain transaction request through the general interaction protocol.
[0067] Fourthly, the present application provides a cross-chain management system. The cross-chain management system is used to construct a cross-chain system. The cross-chain system includes a first blockchain network, a second sub-blockchain network, and a third sub-blockchain network. The second blockchain network and the third blockchain network are heterogeneous blockchain networks. The cross-chain management system includes:
[0068] A deployment module, configured to deploy cross-chain components on at least one node of the first blockchain network, and deploy the cross-chain components on at least one node of the second blockchain network, and deploy the cross-chain components on at least one node of the third blockchain network.
[0069] A registration module, configured to register the chain information and cross-chain access permission information of the second blockchain network in the first blockchain network, and register the chain information and cross-chain access permission information of the third blockchain network in the first blockchain network. The chain information of the second blockchain network is used for the cross-chain components of the third blockchain network to discover the second blockchain network, and the chain information of the third blockchain network is used for the cross-chain components of the second blockchain network to discover the third blockchain network.
[0070] In some possible implementation manners, the deployment module is specifically configured to:
[0071] Download the cross-chain component from the first blockchain network.
[0072] Adapt the cross-chain component to the third blockchain network.
[0073] Deploy the adapted cross-chain component on at least one node of the third blockchain network.
[0074] In some possible implementation manners, the system further includes:
[0075] A status management module, configured to check the status of the cross-chain components deployed on at least one node in the first blockchain network, and determine the availability of the first blockchain network according to the number of nodes with normal status of the cross-chain components.
[0076] In some possible implementations, the system further includes:
[0077] a configuration module, configured to configure the first blockchain network as a main chain, and the main chain is used to relay cross-chain transactions between the second blockchain network and the third blockchain network.
[0078] In some possible implementations, the system further includes:
[0079] a creation module, configured to create the second blockchain network using a first blockchain service and create the third blockchain network using a second blockchain service, and the second blockchain network and the third blockchain network are heterogeneous blockchain networks.
[0080] In some possible implementations, the first blockchain service and the second blockchain service provide standardized interfaces, and the creation module is specifically configured to:
[0081] invoke the first blockchain service through the standardized interface to create the second blockchain network, and invoke the second blockchain service through the standardized interface to create the third blockchain network.
[0082] In some possible implementations, the creation module is specifically configured to:
[0083] create the second blockchain network that has nothing to do with the organization of the first blockchain network using the first blockchain service.
[0084] In a fifth aspect, the present application provides a computing device cluster. The computing device cluster includes at least one computing device, and the at least one computing device includes at least one processor and at least one memory. The at least one processor and the at least one memory communicate with each other. The at least one processor is configured to execute instructions stored in the at least one memory, so that the computing device or the computing device cluster executes the method according to any one of the implementations in the first aspect or the second aspect.
[0085] In a sixth aspect, the present application provides a computer-readable storage medium, in which instructions are stored, and the instructions instruct a computing device or a computing device cluster to execute the method according to any one of the implementations in the first aspect or the second aspect.
[0086] In a seventh aspect, the present application provides a computer program product containing instructions, which when running on a computing device or a computing device cluster, causes the computing device or the computing device cluster to execute the method according to any one of the implementations in the first aspect or the second aspect.
[0087] Based on the implementation manners provided in the above aspects, the present application can be further combined to provide more implementation manners. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below.
[0089] Figure 1 It is an exemplary diagram of the system architecture in an intelligent city scenario provided by the present application;
[0090] Figure 2 It is a schematic diagram of constructing a cross-chain node network by deploying cross-chain components at nodes provided by the present application;
[0091] Figure 3 It is a network schematic diagram of a cross-chain system provided by the present application;
[0092] Figure 4 It is a schematic diagram of the general architecture of a cross-chain system provided by the present application;
[0093] Figure 5 It is a schematic diagram of the architecture of a cross-chain system provided by the present application;
[0094] Figure 6 It is a flowchart of a cross-chain transaction method provided by the present application;
[0095] Figure 7 It is a flowchart of a cross-chain system construction method provided by the present application;
[0096] Figure 8 It is a schematic diagram of an application scenario of constructing a cross-chain system and implementing cross-chain transactions based on the cross-chain system provided by the present application
[0097] Figure 9 It is a schematic diagram of the structure of a cross-chain management system provided by the present application;
[0098] Figure 10 It is a schematic diagram of the structure of a computing device provided by the present application;
[0099] Figure 11 It is a schematic diagram of the structure of a computing device provided by the present application;
[0100] Figure 12 It is a schematic diagram of the structure of a computing device cluster provided by the present application;
[0101] Figure 13 It is a schematic diagram of the structure of a computing device cluster provided by the present application;
[0102] Figure 14 It is a schematic diagram of the structure of a computing device cluster provided by the present application;
[0103] Figure 15 This is a schematic structural diagram of a computing device cluster provided for this application. Specific implementation manners
[0104] In the embodiments of this application, the terms "first" and "second" are only used for descriptive purposes, and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features.
[0105] First, some technical terms involved in the embodiments of this application are introduced.
[0106] A blockchain network, which can also be simply referred to as a blockchain, refers to a peer-to-peer (P2P) network constructed based on blockchain technology. The blockchain network includes multiple blockchain nodes, and each blockchain node is a peer node (for the sake of convenience of description, this application may also simply refer to a blockchain node as a node). In the blockchain network, multiple blockchain nodes jointly maintain a continuously growing blockchain ledger constructed by ordered data blocks. Each blockchain node stores a copy of the above blockchain ledger and maintains the consistency between the copies. Therefore, the blockchain ledger is a public ledger of the blockchain network. Since this public ledger is a distributed ledger, the blockchain network can essentially be regarded as a distributed ledger system.
[0107] A distributed ledger system is a special type of distributed database system that only performs append operations and is suitable for use in an untrusted environment. Specifically, in a distributed ledger system, new data can be appended to the local copy of each node in the form of a transaction, and through a certain encryption mechanism, it is ensured that the data in the ledger cannot be randomly deleted or modified. It should be noted that the distributed ledger system allows for Byzantine faults, including but not limited to node crashes, inaccessibility, network delays, or Byzantine faults caused by malicious behaviors of nodes. Among them, the Byzantine fault is also called the Byzantine problem, which refers to the problem of how to reach a consensus in a scenario where a small number of nodes may act maliciously (messages may be forged). In order to achieve the consistency of data among various nodes in a distributed ledger system, each distributed ledger system will use a consensus mechanism.
[0108] A consensus mechanism is an algorithm for negotiating the effective state of the current ledger among different nodes in a distributed ledger system. Due to some trade-offs in terms of security and consistency to reach a consensus in a distributed system, the consensus either reaches eventual consistency or probabilistic eventual consistency. If all nodes can successfully commit blocks and store the same ledger copy, it means that the distributed ledger system has reached eventual consistency.
[0109] Based on permission levels, blockchain networks can be classified into public blockchains and consortium blockchains. In some cases, blockchain networks can also be classified into public blockchains, consortium blockchains, and private blockchains. In a public blockchain, anyone can join the distributed ledger system and has read and write permissions to the distributed ledger. In contrast, the distributed ledger design of a consortium blockchain excludes nodes from operations (such as transaction verification and joining the distributed ledger), and instead uses a permission model or a permissioned model for operations such as joining the distributed ledger and accessing the distributed ledger. In order to enhance usability, performance, etc. in a consortium blockchain, relevant characteristics of the distributed system are fully weighed, such that the permission model strongly affects the applicability of the consensus mechanism. For example, public blockchain designs mainly adopt a consensus mechanism that only achieves probabilistic eventual consistency, while the consensus mechanisms of most consortium blockchain designs require full eventual consistency, resulting in only a limited number of nodes being included in the consensus discovery.
[0110] The design of the distributed ledger supports the deployment and execution of custom programs (such as software programs, simply referred to as software or programs), and such custom programs are called smart contracts. Smart contracts allow transactions to be triggered by defining a standard expression in the program code. Smart contracts can not only unlock assets stored on the distributed ledger (for example, using hash locks, time locks, and multi-signatures), but also store assets, and once the conditions agreed upon by the smart contract are met, a transaction can be triggered. Among them, the conditions agreed upon by the smart contract are related to the data stored in the unified distributed ledger and external data (such as off-chain data).
[0111] Different distributed ledgers (such as heterogeneous distributed ledgers) can communicate through smart contracts, thereby enabling operations on different distributed ledgers (such as interoperability between distributed ledgers). Among them, the interoperability between different distributed ledgers can be called cross-chain. For a blockchain network (distributed ledger system), cross-chain capabilities include the ability to retrieve data from external systems or exchange data with external systems. The cross-chain system helps to achieve the ability of interoperability by enabling data exchange between different distributed ledgers and external systems. By exchanging data with external systems, the flexibility of the distributed ledger can be improved, performance issues caused by its own limitations can be overcome, and the security of the distributed ledger can be enhanced.
[0112] Cross-chain systems can achieve cross-chain through the notary mechanism or a third-party relay chain (such as relay-chain). The notary mechanism is a simple cross-chain mechanism that is widely used in digital currency exchanges. Essentially, the notary mechanism is a form of intermediary. Suppose blockchains A and B cannot directly interoperate with each other. A commonly trusted third party can be introduced as an intermediary to verify and forward cross-chain transactions. A relay chain, also known as a repeater, aims to construct a third-party public blockchain that connects other chains in the blockchain network through a cross-chain message passing protocol. Specifically, when implementing, a channel can be added to two blockchain networks, and a specific data structure is created within the channel, enabling the two chains to perform cross-chain data interaction through the data structure within the channel. This newly added channel is called a relay chain.
[0113] Notaries act as transaction confirmers and conflict arbitrators during the transaction process, replacing technical credit guarantees with a centralized institution. Although this mode has a fast transaction processing speed, strong compatibility, and a simple technical architecture, the security of the central node has become a key bottleneck for system stability. The relay chain is a combination of a side chain and the notary mechanism and can be regarded as a decentralized notary mechanism. Currently, many cross-chain projects adopt a multi-chain architecture based on the relay chain. However, cross-chain interactions under this multi-chain architecture all rely on the security of the relay part.
[0114] To solve the problem that cross-chain technology depends on the endorsement of a trusted third party or requires a third-party relay chain to achieve cross-chain capabilities, resulting in transactions being restricted by the third party and difficult to meet business requirements, this application provides a cross-chain transaction method. This method can be executed by a cross-chain system. The cross-chain system of this application includes a first blockchain network, a second sub-blockchain network, and a third blockchain network. Among them, the second blockchain network and the third blockchain network are heterogeneous blockchain networks, and cross-chain components are respectively deployed in the first blockchain network, the second blockchain network, and the third blockchain network. The cross-chain components are used to provide cross-chain capabilities for the nodes in the blockchain network, forming cross-chain nodes, and thus achieving cross-chain transactions. Among them, the cross-chain components can be software, such as software formed by encapsulating the methods and data required for cross-chain. The cross-chain software is deployed in the blockchain network, and the blockchain network runs the cross-chain software to execute the cross-chain transaction method. In some examples, the cross-chain components can also be hardware, and this hardware can execute the cross-chain transaction method when running. It should be noted that when executing the cross-chain transaction method, the cross-chain components deployed in different blockchain networks cooperate with each other to complete the cross-chain transaction method.
[0115] Specifically, the cross-chain component of the first blockchain network can obtain a cross-chain transaction request, which is used to request the execution of a cross-chain transaction from the second blockchain network to the third blockchain network. Then, the cross-chain component of the first blockchain network performs identity verification and permission verification based on the cross-chain transaction request to obtain a verification result. When the verification result indicates that the verification is passed, the cross-chain component of the first blockchain network can record the transaction information of the cross-chain transaction in the ledger of the first blockchain network, specifically a distributed ledger, when the nodes of the first blockchain network reach a consensus on the cross-chain transaction. Subsequently, the cross-chain component of the first blockchain network notifies the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
[0116] In this method, the cross-chain components of the blockchain network are deployed in the blockchain network and can directly interact with the nodes in this blockchain network. Moreover, the cross-chain components of different blockchain networks can interact through the protocols between the components. Therefore, the interaction between different blockchain networks can be achieved. When a cross-chain transaction occurs, after cross-chain messages such as a cross-chain transaction request are monitored by the cross-chain component of the blockchain network where the transaction initiator is located (such as the second blockchain network), they can be transferred to the first blockchain network through the communication between the cross-chain components. The nodes of the first blockchain network reach a consensus on the cross-chain transaction, and the cross-chain component of the first blockchain network can record the transaction information of the cross-chain transaction in the ledger of the first blockchain. Then, the cross-chain component of the first blockchain network notifies the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network through the communication between the cross-chain components. This method improves the component mode of heterogeneous chain cross-chain and constructs a layer of node network based on any heterogeneous chain, specifically a cross-chain node network based on cross-chain components, also known as a cross-chain component network, and realizes efficient data synchronization between heterogeneous blockchain networks by using the relay chain mode.
[0117] Among them, the communication between cross-chain components can be based on permissions and point-to-point encryption to ensure the security of cross-chain transactions. It should be noted that this method uses the cross-chain components on the nodes and does not rely on a third party, solving the problem that relevant cross-chain technologies rely on the endorsement of a trusted third party or require a third-party relay chain to achieve cross-chain capabilities, and can meet business requirements, especially the requirements for transaction performance and transaction security.
[0118] This application can be applied to scenarios where multiple inter-chain data interactions need to be implemented in blockchain (such as consortium blockchain, public blockchain) services. Among them, multiple inter-chain data interactions can include cross-chain transactions, and cross-chain transactions require multi-chain data consistency processing to achieve data consistency among multiple chains. For example, this method can be applicable to the management of a multi-chain management platform around multiple blockchain-based application services in a smart city scenario, and can be used by relevant parties of the multi-chain management platform, such as the management party, design party, and blockchain solution provider of the smart city multi-business system, to carry out the construction, application, and audit of the blockchain management platform.
[0119] For ease of understanding, the system architecture of this application will be illustrated by taking the smart city scenario as an example below.
[0120] As Figure 1 shown, in the smart city scenario, urban blockchain applications can include various blockchain-based application services, such as public services, public security services, urban governance services, and business environment management services. Among them, public services are used to provide electronic certificates and electronic bills. Public security services are used to provide dangerous goods traceability or emergency command capabilities. Urban governance services are used to provide intelligent transportation services, judicial evidence storage services, and public finance services. Business environment management services are used to provide capabilities such as data sharing, government affairs approval, and government affairs publicity.
[0121] Among them, urban blockchain applications can be created based on unified blockchain as a service (uBaaS). Correspondingly, urban blockchain applications can be docked with the unified blockchain infrastructure to achieve corresponding functions. Among them, the unified blockchain infrastructure can be logically divided into a business layer, an adaptation layer, and a chain data layer. The functions of the business layer, the adaptation layer, and the chain data layer will be introduced separately below.
[0122] The business layer can be divided into a tenant side and a management side. Among them, the tenant side can be used to provide at least one of chain management capabilities, smart contract management capabilities, application ecosystem and integration capabilities, data asset and configuration management capabilities, or operation and maintenance monitoring capabilities. It should be noted that the chain management capabilities, operation and maintenance monitoring capabilities, etc. on the tenant side can be global capabilities. For example, the chain management capabilities support the management of blockchains with different architectures. The management side is used to provide at least one of resource governance and operation monitoring capabilities, identity and process management capabilities, or business ecosystem management capabilities. Among them, resources can be software and hardware resources, including but not limited to computing power resources, storage resources, and network resources.
[0123] The adaptation layer includes an authentication service, a certificate management service, a heterogeneous access service, and a cross-chain service. Among them, the authentication service is used to manage tenants or users. Further, the authentication service also supports permission management, such as assigning permissions to tenants or users. The authentication service can also interface with third-party authentication services to use the third-party authentication services for authentication. The certificate management service can include certificate issuance, certificate update, and certificate revocation (such as certificate deletion or destruction). The heterogeneous access service is used to provide access to basic blockchain services (blockchain as a service, BaaS) and basic BaaS adaptation.
[0124] The cross-chain service includes heterogeneous chain cross-chain, specifically cross-chain between heterogeneous blockchain networks. Further, the cross-chain service also supports homogeneous cross-chain, which refers to cross-chain between homogeneous blockchain networks, such as cross-chain between blockchain networks built based on the same BaaS. It should be noted that the cross-chain service also provides an oracle mechanism. An oracle is to write external information (off-chain data, data outside the chain) into the blockchain to complete the data interconnection between the blockchain and the real world. The oracle allows deterministic smart contracts to respond to the uncertain external world, is a way for smart contracts to interact with the outside, and is also an interface for the blockchain to interact with the real world.
[0125] The chain data layer includes a chain management platform. The chain management platform provides blockchain underlying technologies, blockchain management, and operation and maintenance monitoring capabilities. Different from the chain management capabilities and operation and maintenance monitoring capabilities on the tenant side of the business layer, the blockchain management and operation and maintenance monitoring capabilities of the chain management platform are partial capabilities, such as the management and operation and maintenance monitoring of the blockchain by this platform. The chain data layer is also compatible with other standardized blockchains. Among them, the chain data layer can also provide standardized interfaces to shield the differences of different blockchain interfaces (such as Figure 1 the service interfaces in).
[0126] The cross-chain system of this application can be constructed through Figure 1 the cross-chain service in. Among them, the cross-chain service can deploy cross-chain components at at least one node (Node) of the blockchain network according to the configuration of the user (such as an administrator) to form a cross-chain node (cross chain node, CC Node). As Figure 2As shown, the node deploys a smart contract and maintains a distributed ledger. When conducting a transaction, the node can, based on a consensus algorithm, reach a consensus with other nodes participating in the consensus in the blockchain network, and then record the transaction in the form of a block in the distributed ledger. Among them, the node can process the transaction through a cryptographic mechanism and then record it in the distributed ledger to ensure security. The cross-chain component is used to provide cross-chain management capabilities, such as implementing cross-chain transactions. Among them, the cross-chain component also provides cross-chain identity management and cross-chain permission management. Among them, cross-chain identity management includes managing the identity information (chain information) of the registered blockchain network, and cross-chain permission management includes managing the cross-chain access permission information of the registered blockchain network. The cross-chain component can execute cross-chain transactions when the cross-chain identity authentication is passed and / or the cross-chain permission authentication is passed. For example, when the transaction type of the cross-chain transaction is a query, the cross-chain component can forward the cross-chain transaction request to execute the cross-chain transaction. Another example is that when the transaction type of the cross-chain transaction is cross-chain write, such as cross-chain adding data, the cross-chain component can record the transaction information of the cross-chain transaction in the distributed ledger. Among them, the transaction information can include the source address and the destination address. Further, the transaction information can also include the transaction object, such as digital assets and data.
[0127] In some possible implementation manners, the cross-chain component may further include an agent. This agent is mainly used to listen for cross-chain transaction requests. Therefore, it is also called a cross-chain agent (cc agent). The cc agent can act as an agent for different heterogeneous blockchain networks, support encapsulating the existing heterogeneous blockchain network (abbreviated as heterogeneous chain) interaction interfaces based on a general interaction protocol, and shield the differences between different blockchain networks. This method decouples the function of listening for cross-chain transaction requests from other functions. When a cross-chain transaction request is listened for, other function modules are then awakened, which can reduce the overall power consumption (or resource consumption) of the cross-chain component and improve availability.
[0128] By deploying a cross-chain component on the node, the heterogeneous blockchain network can interact through the protocol of the cross-chain component, such as the gossip protocol. Among them, the gossip protocol is a communication protocol that allows sharing state in a distributed system. Through this communication protocol, information can be spread to all members in the network or cluster. The principle of the gossip protocol can be to randomly select some nodes periodically and pass the information to the selected nodes. The nodes that receive the information continue to perform the operations of selecting nodes and passing the information to the selected nodes.
[0129] Specifically, the cross-chain components of cross-chain nodes can discover other cross-chain nodes based on the registration discovery mechanism, and then form a synchronization network (or cross-chain node network) with the cross-chain components of other cross-chain nodes. Specifically, the registration discovery mechanism can include registration and discovery. Among them, registration can be to register the chain information of the blockchain network providing a certain service, such as at least one of the blockchain address or certificate, to a public component. For the sake of convenience of description, the blockchain network deploying the public component in this application can be called the main blockchain network, simply referred to as the main chain, and the blockchain network registered in this main chain is the sub-blockchain network, simply referred to as the sub-chain. The public component can be the cross-chain component of the main blockchain network. Discovery can be that the sub-blockchain network (or the cross-chain nodes of the sub-blockchain network) registered in the main blockchain network can be discovered by other callers in a timely manner. It should be noted that discovery can include discovering that the nodes (such as cross-chain nodes) of the sub-blockchain network go online, or discovering that the nodes (such as cross-chain nodes) of the sub-blockchain network go offline.
[0130] For the convenience of understanding, this application also provides an example of constructing a cross-chain system based on the main and sub-chains. As Figure 3 shown, the cross-chain system includes the first blockchain network, the second blockchain network, and the third blockchain network. Among them, the first blockchain network is the main blockchain network, hereinafter referred to as the main chain A, and the second blockchain network and the third blockchain network are sub-blockchain networks, hereinafter referred to as the sub-chain A and the sub-chain B. Among them, the main chain, the sub-chain A, and the sub-chain B can all achieve data synchronization within the blockchain network through the gossip network. In this example, the sub-chain A and the sub-chain B can be heterogeneous blockchain networks. Cross-chain components are deployed on the nodes of the main chain, the sub-chain A, and the sub-chain B, and the above cross-chain components can form a synchronization network. The synchronization network can broadcast through the gossip protocol to ensure message reachability among cross-chain components. It should be noted that a direct connection channel can also be established in the synchronization network. In the case of an unknown address (for example, the destination address), it can be broadcast through the gossip protocol, and a direct connection channel can be established when the address is synchronized. This direct connection channel can be used to transmit cross-chain transactions. For example, if both parties conducting cross-chain transactions initiate cross-chain transactions multiple times within a period of time, then after establishing a direct connection channel, subsequent transactions in multiple cross-chain transactions can be transmitted through the direct connection channel.
[0131] Next, the architecture of the cross-chain system will be introduced in combination with the application scenario. A general architecture of the cross-chain system is as Figure 4 shown. Figure 4Taking the example of application in a smart city, the cross-chain system includes multiple business chains for different services, and each business chain can be a consortium chain managed by different organizations. In this example, the public security business chain includes nodes managed by Organization A of the enterprise, nodes managed by Organization C of the enterprise, and nodes managed by the public security organization. The market supervision business chain includes nodes managed by Organization B of the enterprise, nodes managed by Organization D of the enterprise, and nodes managed by the tax organization. In addition to the public security business chain and the market supervision business chain, there is also a business chain that can serve as a relay chain for the public security business chain and the market supervision business chain. The relay chain can include nodes managed by other organizations, such as nodes managed by the finance organization and nodes managed by the civil affairs organization.
[0132] The above-mentioned business chains can be connected to business applications. For example, the public security business chain can be connected to the public security system application, and the market supervision business chain can be connected to the tax system application. The above-mentioned business applications can be developed based on the software development kit (SDK) or application programming interface (API) of the corresponding business chain. The business chain is deployed with business contracts, specifically smart contracts related to the business. At least one node in the business chain is deployed with cross-chain components and cross-chain contracts. Among them, the cross-chain components include agents, such as cross-chain agents, for communicating with cross-chain components deployed on nodes of other business chains, or communicating with the relay chain, for example, communicating with the relay chain through the cross-chain components of the relay chain.
[0133] Among them, after the nodes of the business chain are deployed with cross-chain components and cross-chain contracts, the chain information and cross-chain access permission information of the above-mentioned business chain can be registered on the main blockchain network side. The main blockchain network can maintain the registration information (such as the above-mentioned chain information and cross-chain access permission information) and routing information, and perform permission management. Among them, the routing information can include the routing path or routing address of the business chain.
[0134] In Figure 4 there are no shared nodes among different types of blockchain networks, and all message interactions can be achieved through cross-chain components. For example, message interactions between business chains or between a business chain and the relay chain can be achieved through cross-chain components (or agents of cross-chain components, such as cross-chain agents). Among them, the relay chain is deployed with cross-chain components, and each business chain adapts to the deployment components of the relay chain and registers chain information on the relay chain to achieve interactions based on cross-chain components. It should be noted that when the cross-chain components or agents perform message interactions, they can also forward messages through a router. In addition, the router can also be connected to the management plane to facilitate the management of the cross-chain system.
[0135] It should be noted that the sub-blockchain network and the main blockchain network in the cross-chain system have no shared nodes, which means that there are no common nodes between the sub-blockchain network and the main blockchain network, but it does not mean that the main blockchain network or the sub-blockchain network itself has no shared nodes. In some possible implementation manners, the main blockchain network or the sub-blockchain network can share nodes with other blockchain networks outside the cross-chain system.
[0136] For the sake of easy understanding, an example is given below for illustration. As Figure 5 shown, cross-chain components and cross-chain contracts are deployed on the main chain, sub-chain 1, sub-chain 2, and sub-chain 3. Among them, there are no shared nodes between sub-chain 1 and 3 and the main chain, while there are shared nodes between sub-chain 2 and the main chain. The cross-chain management system or cross-chain service can register the chain information of sub-chain 1 and sub-chain 3 on the main chain (for example, the cross-chain component of the main chain) based on the configuration of the user (such as the administrator), so as to form a cross-chain system. The cross-chain system includes the above-mentioned main chain, sub-chain 1, and sub-chain 3. Among them, the main chain addresses and certificates can also be configured in the cross-chain components of sub-chain 1 and sub-chain 3. The certificate can include, but is not limited to, Transport Layer Security (TLS). The TLS certificate protects the Internet connection by encrypting the data sent between the browser, the website being accessed, and the website server, ensuring that the data will be transmitted privately and will not be modified, lost, or stolen.
[0137] In the cross-chain system, the blockchain application docked with the sub-chain can initiate a cross-chain transaction by calling the cross-chain contract through the API. For example, the blockchain application docked with sub-chain 1 can initiate a cross-chain transaction from sub-chain 1 to sub-chain 3 by calling the cross-chain contract through the API. The cross-chain component of sub-chain 1 monitors the cross-chain transaction request and can route the cross-chain transaction request to the main chain. The main chain can perform identity verification and permission verification on the cross-chain transaction request, specifically verifying whether the identity information of both parties to the transaction is legal, such as whether it is registered on the main chain, and verifying the permission of sub-chain 1 to access sub-chain 3. When the verification passes, the cross-chain component of the main chain will transfer the cross-chain transaction request to the nodes of the main chain for consensus. When the nodes of the main chain reach a consensus on the cross-chain transaction, the transaction information of the cross-chain transaction can be recorded in the ledger of the main chain (block settlement). Among them, the cross-chain component of the main chain can synchronize the execution status of the cross-chain transaction on the main chain to the cross-chain component of sub-chain 3, so as to notify sub-chain 3 to record the transaction information of the cross-chain transaction in the ledger of the main chain. Further, when sub-chain 3 successfully records the transaction information of the cross-chain transaction in the ledger of sub-chain 3, it can also notify sub-chain 1 to record the transaction information of the cross-chain transaction in the ledger of sub-chain 1.
[0138] It should be noted that when there is a shared node between a blockchain network and the above cross-chain system, the blockchain network can also achieve cross-chain. For example, there is a shared node between Sub-chain 2 and the Main Chain. The blockchain application connected to Sub-chain 2 can initiate a cross-chain transaction from Sub-chain 2 to Sub-chain 3 by calling the cross-chain contract through the API. Since there is a shared node between Sub-chain 2 and the Main Chain, the shared node can obtain the above cross-chain transaction request, and the cross-chain transaction request is transferred to the Main Chain. The cross-chain component of the Main Chain can perform identity verification and permission verification on the cross-chain transaction request. When the verification passes, the nodes of the Main Chain can reach a consensus on the cross-chain transaction. When the consensus is reached, the transaction information of the cross-chain transaction can be recorded in the ledger of the Main Chain. The cross-chain component of the Main Chain can notify Main Chain 3 to record the transaction information of the cross-chain transaction in the ledger of the Main Chain.
[0139] For a blockchain network with shared nodes, cross-chain can also be achieved through other means, and this embodiment does not limit this.
[0140] Based on the above cross-chain system, the present application also provides a cross-chain transaction method. The cross-chain transaction method of the present application will be introduced below with reference to the accompanying drawings.
[0141] See Figure 6 The flowchart of a cross-chain transaction method shown in the figure. This method is applied to a cross-chain system. The cross-chain system includes a first blockchain network, a second blockchain network, and a third blockchain network. The second blockchain network and the third blockchain network are heterogeneous blockchain networks. The method includes the following steps:
[0142] S602. The cross-chain component of the second blockchain network listens for cross-chain transaction requests.
[0143] Cross-chain means spanning different blockchain networks. A cross-chain transaction means conducting a transaction between different blockchain networks. For example, a cross-chain transaction can be transferring a first quantity of digital assets from a banking business chain and transferring a second quantity of digital assets to a live broadcast business chain. A cross-chain transaction request is used to request the execution of a cross-chain transaction, such as a request to execute a cross-chain transaction from the second blockchain network to the third blockchain network. The cross-chain transaction request can be generated by a blockchain application calling a cross-chain contract. The cross-chain transaction request can include the transaction information of the cross-chain transaction, such as the source address and destination address of the cross-chain transaction. Among them, the source address can be the address of the cross-chain transaction initiator, and the destination address can be the peer address of the cross-chain transaction initiator. For example, the source address can be an address in the second blockchain network, and the destination address can be an address in the third blockchain network.
[0144] In specific implementation, the cross-chain component of the second blockchain network can obtain the transaction information of all transactions synchronized by the second blockchain network. By identifying the transaction information of all transactions, cross-chain transaction requests can be identified. Among them, when the cross-chain node runs, it can load the cross-chain contract. The cross-chain contract supports hash locking for the current cross-chain transaction and marks any cross-chain transaction with the attribute of cross-chain type. Based on this, the cross-chain component can identify cross-chain transaction requests based on the cross-chain contract. The cross-chain transaction request is generated by calling the cross-chain contract. The cross-chain component of the second blockchain network can identify the cross-chain transaction request by listening to the contract information in the cross-chain transaction request. Or the cross-chain component of the second blockchain network can also listen to the cross-chain contract call interface and listen to cross-chain contract requests.
[0145] Among them, the cross-chain component can include an agent, such as a cross-chain agent. As an agent for different heterogeneous blockchain networks of users, the cross-chain agent supports encapsulating the interaction interfaces of heterogeneous blockchain networks based on a general interaction protocol, shielding the differences between different blockchain networks, and thus realizing support for listening to heterogeneous blockchain networks.
[0146] S604. The cross-chain component of the second blockchain network routes the cross-chain transaction request to the cross-chain component of the first blockchain network according to the routing address.
[0147] Specifically, the cross-chain component of the second blockchain network can parse the cross-chain transaction request to obtain the routing address, and then route the cross-chain transaction request to the cross-chain component of the first blockchain network according to the routing address. Further, the cross-chain component of the second blockchain network can also query the execution status of the cross-chain transaction, such as the execution status of the cross-chain transaction in the current blockchain network, trigger synchronization based on the execution status, and route the cross-chain transaction request to the cross-chain component of the first blockchain network.
[0148] It should be noted that the above S602 to S604 are an implementation manner for the cross-chain component of the first blockchain network to obtain cross-chain transaction requests. In other possible implementation manners of the embodiments of the present application, the cross-chain component of the first blockchain network can also obtain cross-chain transaction requests through other means. For example, when there are shared nodes between the first blockchain network and other blockchain networks, cross-chain transaction requests can also be obtained through the shared nodes, as Figure 5 shown.
[0149] S606. The cross-chain component of the first blockchain network performs identity verification and permission verification according to the cross-chain transaction request to obtain a verification result. When the verification result indicates that the verification is passed, execute S608.
[0150] Specifically, the cross-chain component of the first blockchain network can monitor a cross-chain transaction request, parse the cross-chain transaction request, and obtain the source address and destination address of the cross-chain transaction. The cross-chain component of the first blockchain network can compare the source address and / or destination address with the addresses in the registration information for authentication. When the source address and destination address are found in the registration information, it indicates that the authentication is successful. When the source address or destination address is not found in the registration information, it indicates that the authentication fails. Similarly, the cross-chain component of the first blockchain network can match the source address, destination address, and information of the contract (information of the distributed ledger) authorized for access in the registration information. When the match is successful, it indicates that the trading parties have deployed the same cross-chain contract and can access through this cross-chain contract, thereby determining that the permission verification is successful. When the match is unsuccessful, it indicates that the permission verification fails.
[0151] Among them, the cross-chain component of the first blockchain network can store the chain information and cross-chain access permission information of the second blockchain network, and store the chain information and cross-chain access permission information of the third blockchain network when registering the second blockchain network and the third blockchain network. Among them, the chain information can be address information, such as an address in the blockchain network. It should be noted that the first blockchain network can record the chain information and cross-chain access permission information of the second blockchain network and the chain information and cross-chain access permission information of the third blockchain network in the ledger of the first blockchain network for auditing or querying the status (valid or invalid, or whether it has lost activity) or permission information of nodes (such as cross-chain nodes) in the registered blockchain network.
[0152] S608. When the cross-chain component of the first blockchain network reaches a consensus on a cross-chain transaction at a node of the first blockchain network, it records the transaction information of the cross-chain transaction in the ledger of the first blockchain network.
[0153] Specifically, the cross-chain component of the first blockchain network can identify the transaction type of the cross-chain transaction. The transaction type can include cross-chain query (such as cross-chain read) and cross-chain write (such as cross-chain adding data). Then, the cross-chain component of the first blockchain network can execute the cross-chain transaction according to the transaction type. When the transaction type is cross-chain query, the cross-chain component of the first blockchain network forwards the cross-chain transaction request, for example, forwards the cross-chain transaction request according to the destination address of the cross-chain transaction request, and does not need to perform a transaction record operation on the cross-chain transaction request (that is, does not need to commit a block). When the transaction type is cross-chain write, the cross-chain component of the first blockchain network can perform a transaction record operation on the cross-chain transaction. The process of the cross-chain component of the first blockchain network performing a transaction record operation on the cross-chain transaction will be described below.
[0154] Specifically, the cross-chain component of the first blockchain network can trigger consensus on a cross-chain transaction request in the first blockchain network. When the nodes of the first blockchain network reach consensus on the cross-chain transaction in the cross-chain transaction request, the transaction information of the cross-chain transaction can be recorded in the ledger of the first blockchain network. Among them, the transaction information recorded in the ledger of the first blockchain network can be complete information. For example, the cross-chain transaction is to transfer a first quantity of a first digital asset from account A of the second blockchain network and transfer a second quantity of a second digital asset to account B of the third blockchain network. Then the ledger of the first blockchain network can record the following transaction information: account A of the first blockchain network transfers a first quantity of the first digital asset, and account B of the second blockchain network transfers a second quantity of the second digital asset.
[0155] In some possible implementation manners, the cross-chain component of the first blockchain network can first query the execution status of the cross-chain transaction. For example, it communicates with the cross-chain component of the second blockchain network to obtain the execution status of the cross-chain transaction in the second blockchain network. Then the cross-chain component of the first blockchain network can perform the operation of recording the cross-chain transaction according to the execution status of the cross-chain transaction in the second blockchain network. For example, the cross-chain component of the first blockchain network can perform the operation of recording the cross-chain transaction when the cross-chain transaction is locked in the second blockchain network.
[0156] To improve reliability, the first blockchain network usually can set two or more cross-chain nodes. In this way, when one cross-chain node fails, other cross-chain nodes can still execute cross-chain transactions.
[0157] S608. The cross-chain component of the first blockchain network notifies the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
[0158] The cross-chain component of the first blockchain network can, after successfully recording the transaction information of the cross-chain transaction in the ledger of the first blockchain network, notify the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network, so as to achieve data consistency among multiple chains.
[0159] Among them, the first blockchain network successfully recording the transaction information of the cross-chain transaction in the ledger of the first blockchain network means that the execution status of the cross-chain transaction in the first blockchain network is execution completed or execution successful. The cross-chain component of the first blockchain network can send the execution status to the second blockchain network to notify the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
[0160] In some possible implementation manners, the cross-chain component of the first blockchain network, the second blockchain network component, and the third blockchain network component form a synchronization network. For example, the cross-chain components can form a synchronization network (or a gossip network) through the gossip protocol. The cross-chain component of the first blockchain network can broadcast a notification message through the synchronization network, and the notification message is used to notify the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network. In some examples, the notification message can include the execution status of the cross-chain transaction in the first blockchain network. In other examples, the notification message can include indication information, and the indication information is used to indicate to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
[0161] In other possible implementation manners, a direct connection channel is established between the cross-chain component of the first blockchain network and the cross-chain component of the third blockchain network. For example, during the previous cross-chain transaction process, the address is synchronized, and a direct connection channel between the cross-chain component of the first blockchain network and the cross-chain component of the third blockchain network can be established based on the address. Accordingly, the cross-chain component of the first blockchain network can notify the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network through the direct connection channel.
[0162] Considering that the blockchain network or the cross-chain nodes in the blockchain network may be invalid or inactive, in order to ensure the verification accuracy, the cross-chain component of the first blockchain network can also detect the activity of the third blockchain network according to the blockchain network registered in the first blockchain network, such as the chain information of the third blockchain network. Specifically, the cross-chain component of the first blockchain network can detect the state of the cross-chain component in the third blockchain network through heartbeat detection, so as to detect the activity of the third blockchain network. When the third blockchain network becomes inactive or has abnormal activity, the chain information and cross-chain access permission information of the sub-blockchain network can be deleted or removed on the first blockchain network side. Among them, the cross-chain component of the first blockchain network can periodically detect the activity of the registered blockchain network, so as to periodically update the chain information and cross-chain access permission information registered on the first blockchain network side. When the third blockchain network is valid, the cross-chain component of the first blockchain network notifies the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
[0163] S610. The cross-chain component of the third blockchain network records the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
[0164] Specifically, the cross-chain component of the third blockchain network can transfer the cross-chain transaction request to the third blockchain network, and the nodes of the third blockchain network can record the transaction information of the cross-chain transaction in the ledger of the third blockchain network. Among them, the third blockchain network can obtain the execution status of the cross-chain transaction in the first blockchain network, and the third blockchain network can trust the first blockchain network, so as to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
[0165] In some possible implementation manners, the cross-chain component of the third blockchain network records the transaction information related to the third blockchain network in the transaction of the cross-chain transaction in the ledger of the third blockchain network. Still taking the cross-chain transaction as an example where the first digital asset of the first quantity is transferred out from the A account of the second blockchain network and the second digital asset of the second quantity is transferred into the B account of the third blockchain network, the cross-chain component of the third blockchain network can record the following transaction information: The second digital asset of the second quantity is transferred into the B account.
[0166] S612. The cross-chain component of the third blockchain network notifies the cross-chain component of the second blockchain network to record the transaction information of the cross-chain transaction in the ledger of the second blockchain network.
[0167] Among them, when the cross-chain component of the third blockchain network successfully records the transaction information of the cross-chain transaction in the ledger of the third blockchain network, it can notify the cross-chain component of the second blockchain network to record the transaction information of the cross-chain transaction in the ledger of the second blockchain network. The successful recording of the transaction information of the cross-chain transaction in the ledger of the third blockchain network indicates that the execution status of the cross-chain transaction in the third blockchain network is execution completed or execution successful. The cross-chain component of the third blockchain network can send the execution status to the second blockchain network to notify the cross-chain component of the second blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
[0168] Similar to the first blockchain network notifying the third blockchain network, the cross-chain component of the third blockchain network can broadcast the notification message through the synchronization network. The notification message is used to notify the cross-chain component of the second blockchain network to record the transaction information of the cross-chain transaction in the ledger of the second blockchain network. Or, the cross-chain component of the third blockchain network can also establish a direct connection channel between the cross-chain component of the third blockchain network and the cross-chain component of the second blockchain network, and notify the cross-chain component of the second blockchain network to record the transaction information of the cross-chain transaction in the ledger of the second blockchain network through the direct connection channel.
[0169] Among them, the cross-chain component of the third blockchain network can first obtain the liveness (or status) of the second blockchain network. For example, it queries the liveness of the second blockchain network from the first blockchain network. When the second blockchain network has not lost its liveness or is in a valid state, the cross-chain component of the third blockchain network notifies the cross-chain component of the second blockchain network to record the transaction information of the cross-chain transaction into the ledger of the second blockchain network. Among them, the first blockchain network can check the liveness of the second blockchain network in a similar manner to detecting the liveness of the third blockchain network and store the liveness of the second blockchain network.
[0170] S614. The cross-chain component of the second blockchain network records the transaction information of the cross-chain transaction into the ledger of the second blockchain network.
[0171] Specifically, the cross-chain component of the second blockchain network can forward the cross-chain transaction request to the second blockchain network, and the nodes of the second blockchain network can record the transaction information of the cross-chain transaction into the ledger of the second blockchain network. Among them, the second blockchain network can obtain the execution status of the cross-chain transaction in the third blockchain network, and the third blockchain network can trust the second blockchain network, so as to record the transaction information of the cross-chain transaction into the ledger of the third blockchain network.
[0172] In some possible implementation manners, the cross-chain component of the second blockchain network records the transaction information related to the second blockchain network in the cross-chain transaction into the ledger of the second blockchain network. Still taking the cross-chain transaction as an example where the first quantity of the first digital asset is transferred out from the A account of the second blockchain network and the second quantity of the second digital asset is transferred into the B account of the third blockchain network, the cross-chain component of the second blockchain network can record the following transaction information: The A account transfers out the first quantity of the first digital asset.
[0173] It should be noted that the above S610, S612, and S614 are optional steps of the embodiments of the present application. When implementing the cross-chain transaction method of the embodiments of the present application, the above steps may not be executed, or may be executed in other ways. For example, the second blockchain network and the third blockchain network can also record the transaction information of the cross-chain transaction through a consensus algorithm respectively.
[0174] Based on the above description, the cross-chain transaction method of the present application constructs a layer of node network based on any heterogeneous chain by improving the component mode of heterogeneous chain cross-chain. Specifically, it is a cross-chain node network based on cross-chain components. By using the relay chain mode, it realizes efficient data synchronization between heterogeneous blockchain networks. This method uses the cross-chain components on the nodes and does not rely on a third party, solving the problem that related cross-chain technologies rely on the endorsement of a trusted third party or require a third-party relay chain to achieve cross-chain capabilities, and can meet business requirements, especially the requirements for transaction performance and transaction security.
[0175] Figure 6 The cross-chain transaction method is introduced from the perspective of interaction. The above cross-chain transaction method depends on a cross-chain system, and this application also provides a method for constructing a cross-chain system. This method can be executed by a cross-chain management system. Below, the cross-chain transaction method is introduced from the perspective of the cross-chain management system.
[0176] See Figure 7 The flowchart of a cross-chain transaction method shown in the figure. This method is applied to a cross-chain system, which includes a first blockchain network, a second blockchain network, and a third blockchain network. The second blockchain network and the third blockchain network are heterogeneous blockchain networks. This method includes the following steps:
[0177] S702. The cross-chain management system deploys cross-chain components on at least one node of the first blockchain network.
[0178] S703. The cross-chain management system configures the first blockchain network as the main blockchain network.
[0179] The cross-chain component is a component for implementing cross-chain functions. Among them, a component is an encapsulation of data and methods. Based on this, the cross-chain component can be an encapsulation of chain information representing identity, cross-chain access permission information, and cross-chain methods. Further, the cross-chain method can also include a method for listening to cross-chain requests, and this method can be decoupled from other methods to form a proxy of the cross-chain component. As Figure 2 shown in the figure, when the cross-chain component includes a proxy, the cross-chain component also supports the management of the proxy. For example, the listening period of the proxy can be configured, etc.
[0180] Specifically, the cross-chain management system can obtain the cross-chain component, and then send the cross-chain component to at least one node of the first blockchain network, so as to remotely deploy the cross-chain component. In some examples, the cross-chain management system can also obtain the cross-chain component, send the cross-chain component to at least one node of the first blockchain network, and then the user deploys the cross-chain component at at least one node.
[0181] In some possible implementation manners, the cross-chain management system can also deploy cross-chain contracts on at least one node of the first blockchain network. The cross-chain contract is specifically a smart contract for implementing cross-chain or cross-chain transactions. The cross-chain contract can usually be combined with the business contract to implement cross-chain transactions. For example, a blockchain application (a blockchain application of a business, simply referred to as a business application) can initiate a transaction through the business contract, and the business contract calls the cross-chain contract to implement cross-chain transactions.
[0182] Specifically, the cross-chain management system can receive the node information of the first blockchain network configured by a user (e.g., a user of the first blockchain network), where the node information is used to identify the nodes participating in cross-chain in the first blockchain network, and deploy cross-chain contracts and cross-chain components on the corresponding nodes according to the node information. Among them, the cross-chain management system can pre-set cross-chain contracts and cross-chain components, or remotely download cross-chain contracts and cross-chain components, and then deploy cross-chain contracts and cross-chain components on the nodes corresponding to the node information. The nodes deployed with cross-chain contracts and cross-chain components can be used as cross-chain nodes.
[0183] The cross-chain management system can also receive the type information configured by the user and configure the first blockchain network as the main blockchain network (or main chain, cross-chain main chain). The main blockchain network can be used as a registration center to register the chain information of other blockchain networks so that the blockchain networks can discover each other.
[0184] Among them, the first blockchain network can be a consortium chain jointly managed by multiple organizations. Specifically, the cross-chain management system can first create an organization, and then create the first blockchain network according to the created organization. For example, the cross-chain management system can use the blockchain service BaaS to create the first blockchain network. The blockchain service (or blockchain architecture) used to create the first blockchain network (or main chain) can be the default or configured by the user according to requirements, and this embodiment does not limit this.
[0185] Considering reliability issues, the cross-chain management system can deploy cross-chain contracts and cross-chain components on multiple nodes, so as to avoid a single point of failure of the cross-chain nodes in the first blockchain network, resulting in the failure of the entire cross-chain system. Based on this, the cross-chain management system can also check the status of the cross-chain components deployed on at least one node in the first blockchain network. Among them, the cross-chain management system can detect the status of the cross-chain components through heartbeat detection. The cross-chain management system can count the number of nodes with normal status of the cross-chain components. Accordingly, the cross-chain management system determines the availability (or called liveness, effectiveness) of the first blockchain network according to the number of nodes with normal status of the cross-chain components. For example, if the number of nodes with normal status of the cross-chain components is less than or equal to 1, it means that the cross-chain ability of the first blockchain network is unavailable (losing liveness, or failing). Further, the cross-chain ability is also affected by the node status of the cross-chain nodes. Based on this, the cross-chain management system can also detect the status of the cross-chain nodes. Accordingly, the cross-chain management system can determine the availability of the first blockchain network according to the status of the cross-chain nodes and the status of the cross-chain components in the first blockchain network.
[0186] S704. The cross-chain management system deploys cross-chain components on at least one node of the second blockchain network.
[0187] Specifically, the cross-chain management system can receive the node information of the second blockchain network configured by a user (such as a user of the second blockchain network), where the node information is used to identify the nodes participating in cross-chain in the second blockchain network, and then deploy a cross-chain contract and cross-chain components on the corresponding nodes according to the node information. By deploying the cross-chain components, the cross-chain capabilities of the nodes can be built or enhanced, making the nodes become cross-chain nodes. Among them, the cross-chain management system can also deploy cross-chain contracts on at least one node of the second blockchain network. The deployment process can refer to the deployment process of the first blockchain network and will not be elaborated here.
[0188] Similar to the first blockchain network, the second blockchain network can be a consortium chain jointly managed by multiple organizations. Specifically, the cross-chain management system can first create an organization, and then create the second blockchain network according to the created organization. Among them, the cross-chain management system can use the blockchain service BaaS to create the second blockchain network. The blockchain service used to create the second blockchain network can be the default one, or configured by the user according to requirements.
[0189] It should be noted that the main chain, as a relay chain, is used to implement cross-chain transactions between different sub-chains (heterogeneous chains), which does not mean that the main chain and the sub-chains are heterogeneous blockchain networks. The main chain and the sub-chains can be homogeneous blockchain networks or heterogeneous blockchain networks. Correspondingly, the blockchain service used to create the second blockchain network can be the same as or different from the blockchain service used to create the first blockchain network. In addition, when the cross-chain management system uses the blockchain service to create the second blockchain network, it can create a blockchain network independent of the main chain organization. In this way, there are no shared nodes between the first blockchain network and the second blockchain network.
[0190] S706. The cross-chain management system deploys cross-chain components on at least one node of the third blockchain network to obtain a second sub-blockchain network.
[0191] Specifically, the cross-chain management system can receive the node information of the third blockchain network configured by a user (such as a user of the second blockchain network), where the node information is used to identify the nodes participating in cross-chain in the third blockchain network, and deploy cross-chain components on the corresponding nodes according to the node information. The cross-chain management system can also deploy cross-chain contracts on at least one node of the third blockchain network.
[0192] Among them, the third blockchain network and the second blockchain network are heterogeneous blockchain networks. The cross-chain management system can initialize the nodes of the third blockchain network in different ways. In some possible implementation manners, the cross-chain management system can adopt a blockchain service (blockchain architecture) different from the blockchain service (blockchain architecture) used to create the second blockchain network to create the third blockchain network. For example, when the cross-chain management system uses the first blockchain service to create the second blockchain network, it can use the second blockchain service to create the third blockchain network. The first blockchain service and the second blockchain service are blockchain services with different architectures. In some possible implementation manners, the cross-chain management system can create the second blockchain network through a blockchain service and create the third blockchain network through a non-blockchain service.
[0193] Further, when the third blockchain network and the first blockchain network are heterogeneous blockchain networks, when the cross-chain management system deploys cross-chain components or cross-chain contracts, it can also first perform adaptation of the cross-chain components or cross-chain contracts. Specifically, the cross-chain management system can download the cross-chain components from the first blockchain network, adapt the cross-chain components to the third blockchain network, and then deploy the adapted cross-chain components on at least one node of the third blockchain network. Similarly, the third blockchain network can download the cross-chain contract from the first blockchain network, adapt the cross-chain contract to the third blockchain network, and then deploy the adapted cross-chain contract on at least one node of the third blockchain network.
[0194] The above S704 and S706 can be executed in parallel or in a set order successively. The embodiments of the present application do not limit this. In addition, when the first blockchain network and the second blockchain network are created using the same blockchain service, the above S702 and S704 can be executed in parallel or in a set order successively.
[0195] S708. The cross-chain management system registers the chain information and cross-chain access permission information of the first sub-blockchain network in the first blockchain network.
[0196] S710. The cross-chain management system registers the chain information and cross-chain access permission information of the second sub-blockchain network in the first blockchain network.
[0197] For a blockchain network, the chain information may include the address of the blockchain network. Further, the chain information may also include the certificate of the sub-blockchain network. The cross-chain access permission information includes information on the distributed ledger authorized to be accessed or information on the contract authorized to be accessed. For example, the cross-chain access permission information may include the identifier of the contract authorized to be accessed.
[0198] Specifically, the cross-chain management system can, in response to a registration request from a user (such as a user of the second blockchain network), send the chain information and cross-chain access permission information of the second blockchain network to the first blockchain network, for example, to the cross-chain component of the first blockchain network, for registration. The registration process of the third blockchain network is similar to that of the second blockchain network and will not be elaborated here. The cross-chain nodes can perform registration discovery among different nodes based on the registration information (such as chain information) of the main chain.
[0199] In some possible implementation manners, the cross-chain management system can also construct a synchronization network based on the gossip protocol. The synchronization network includes cross-chain components deployed by at least one node and is used to implement cross-chain transactions between the first sub-blockchain network and the second sub-blockchain network. Specifically, the cross-chain management system can receive protocol information configured by the user. The protocol information can include the protocol type used for cross-chain component interaction, for example, the gossip protocol. Correspondingly, the cross-chain management system can configure the communication protocol of the cross-chain components according to the above protocol information, for example, the gossip protocol, to construct the synchronization network.
[0200] Based on the above description, the present application provides a method for constructing a cross-chain system. This method deploys cross-chain components and cross-chain contracts on at least one node of the blockchain network to construct or enhance the cross-chain capabilities of the nodes, forming cross-chain nodes. The cross-chain components of the cross-chain nodes can be constructed into a layer of synchronization network based on any heterogeneous blockchain network through a registration discovery mechanism. This synchronization network can use the relay chain mode to achieve efficient data synchronization of heterogeneous blockchain networks. This method uses the cross-chain components on the nodes and does not rely on a third party, solving the problem that related cross-chain technologies rely on the endorsement of a trusted third party or require a third-party relay chain to achieve cross-chain capabilities, and can meet business requirements, especially the requirements for transaction performance and transaction security.
[0201] To make the technical solution of the present application clearer and easier to understand, the present application also provides an application scenario to illustrate the cross-chain system construction method and the cross-chain transaction method.
[0202] See Figure 8 The schematic diagram of an application scenario for cross-chain system construction and cross-chain transaction implementation based on the cross-chain system is shown. In this scenario, administrators of different blockchain networks can complete the creation of the main blockchain network and sub-blockchain networks, and complete the deployment of cross-chain contracts and cross-chain components to form cross-chain nodes. Among them, the more available cross-chain nodes, the higher the reliability. And the administrator can register the chain information and cross-chain access permission information of the sub-blockchain network in the main blockchain network to support the discovery and broadcast of nodes in different sub-blockchain networks.
[0203] Among them, the main execution process of cross-chain system construction is as follows:
[0204] 1. The main-chain A user creates an organization, creates a blockchain network jointly managed by multiple organizations, configures cross-chain contracts and cross-chain components to be deployed on multiple nodes in the blockchain network, and configures the current blockchain network as the main chain.
[0205] Among them, creating an organization, creating a blockchain network, deploying cross-chain contracts and cross-chain components, and configuring the main chain can be achieved through a blockchain as a service-domain controller (BaaS-DOMC). BaaS-DOMC can provide cross-chain services. Specifically, BaaS-DOMC can receive the configuration information of the main-chain A user, create an organization, create a blockchain network jointly managed by multiple organizations, deploy cross-chain contracts and cross-chain components, and configure the current blockchain network as the main chain.
[0206] 2. BaaS-DOMC checks the status of nodes and the status of cross-chain components running in the nodes to determine the availability of the main chain.
[0207] Among them, BaaS-DOMC can detect the node status and cross-chain component status through heartbeat detection. If the detection result indicates that there is only one normally running cross-chain component on the main chain, or there is no normally running cross-chain component, it means that the cross-chain ability of the main chain is unavailable.
[0208] 3. The sub-chain B user constructs a sub-chain B independent of the main-chain organization based on the same BaaS-DOMC, deploys cross-chain components on the sub-chain B, and registers the chain information and authorized access permission information of the sub-chain B on the main chain A.
[0209] 4. The sub-chain C user initializes the nodes of the sub-chain C.
[0210] Among them, the sub-chain C is a blockchain network constructed by a method other than BaaS-DOMC. Moreover, compared with the nodes of the main chain A and the sub-chain B, the nodes of the sub-chain C are heterogeneous. The architecture, protocols used, and data structures of the sub-chain C are different from those of the main chain A and the sub-chain B.
[0211] 5. The sub-chain C user downloads cross-chain components and cross-chain contracts from the main chain A, adapts the cross-chain components, cross-chain contracts, and the sub-chain C, completes the deployment of cross-chain contracts and cross-chain components on the sub-chain C side, registers the chain information of the sub-chain C on the main chain A side, and configures cross-chain access permission information.
[0212] Among them, downloading cross-chain components and cross-chain contracts, adapting and deploying cross-chain components / cross-chain contracts, and sub-chain registration can also be achieved through BaaS-DOMC. The specific implementation process can refer to the relevant content described above.
[0213] After the cross-chain system is built, cross-chain transactions can be realized based on the cross-chain system. Among them, cross-chain transactions rely on cross-chain components to achieve. The cross-chain components include a controller and an agent, such as a cross-chain controller (CC-controller) and a cross-chain agent (CC-agent).
[0214] Among them, the main role of the cross-chain controller is to ensure the execution of the cross-chain process, support the query or writing of inter-chain data, control the transaction status of cross-chain transactions, and achieve multi-modal network synchronization with other cross-chain components. Its main execution process includes:
[0215] 1. The cross-chain controller of the main chain receives the registration information of sub-chain B and sub-chain C and saves the registration information.
[0216] 2. The cross-chain controller of the main chain checks the liveness of sub-chain B and sub-chain C based on the registration information.
[0217] The registration information can include chain information and cross-chain access permission information. The cross-chain controller of the main chain can write the above registration information into the ledger of main chain A for auditing. And the cross-chain controller of the main chain can build communication between cross-chain components based on the chain information, and then periodically detect the liveness of the registered sub-chains based on heartbeat messages. The cross-chain controller of the main chain can support querying the permissions and status of cross-chain nodes in the registered sub-chains.
[0218] 3. The cross-chain controller of the main chain listens for cross-chain transaction requests, communicates with the cross-chain agent to query the cross-chain transaction execution status, and processes cross-chain transactions according to the cross-chain transaction execution status.
[0219] Among them, query-type cross-chain transactions are not recorded in the local ledger, but are directly forwarded to the sub-blockchain network identified by the destination address. The specific implementation of cross-chain write-type cross-chain transactions can be seen in Figure 6 the relevant content description of the embodiments.
[0220] As an agent for different heterogeneous sub-chains, the cross-chain agent supports encapsulating the interaction interfaces of heterogeneous chains based on a general interaction protocol, shielding the differences of different heterogeneous chains, and supporting the listening of heterogeneous chains. Its main execution process includes:
[0221] The cross-chain agents of sub-chain B and sub-chain C listen for all cross-chain transaction requests on the current chain, and route the cross-chain transaction requests to main chain A based on the routing address of the cross-chain transaction requests after being triggered by the status.
[0222] Among them, the cross-chain agents of sub-chain B and sub-chain C establish connections with the cross-chain components of the cross-chain peer at the same time, and establish connections with the cross-chain components of the main chain. Cross-chain transactions can be directly transmitted through the above connections. And cross-chain transactions can be stored in the ledger of the main chain after hash operation for auditing.
[0223] Based on the above description, the cross-chain transaction method of this application can deploy cross-chain components at the nodes of the blockchain network (as a sub-chain) that needs to execute cross-chain transactions, and deploy cross-chain components at the nodes of other blockchain networks (as a main chain). Data interaction between different blockchain networks is achieved through the synchronization network between cross-chain components. For example, it is cross-chain interoperability such as the transfer of assets between different blockchain networks, cross-chain payment settlement, decentralized transactions, cross-chain reading and verification of the status or value of other chains (such as trusted forensics across chains in judicial applications). This method does not need to introduce a third-party centralized node, and provides reliable, trustworthy and efficient guarantees through the synchronization network between cross-chain components. This method can also freeze or lock data (on-chain data) in the blockchain network. Taking the financial scenario as an example, this method can provide the ability to freeze or lock certain on-chain data based on information on a specific chain. Further, the locking conditions and unlocking conditions of on-chain data (such as assets) can be set. Among them, the locking conditions and unlocking conditions can be associated with events or behaviors on other chains.
[0224] In addition, this method can break through the performance and function bottlenecks of the public chain by adopting a two-layer architecture. The transaction speed and performance can meet business requirements, providing more optimized choices and higher scalability.
[0225] Based on the aforementioned cross-chain transaction method and cross-chain system construction method, this application provides a cross-chain system and a cross-chain management system. Next, with reference to the accompanying drawings, the cross-chain system and cross-chain management system of the embodiments of this application will be introduced.
[0226] See Figure 3 The schematic diagram of the architecture of a cross-chain system shown. The cross-chain system includes a first blockchain network (such as Figure 3 main chain A in Figure 3 sub-chain B in Figure 3 ), a second sub-blockchain network (such as
[0227] The cross-chain component of the first blockchain network is used to obtain a cross-chain transaction request, which is used to request the execution of a cross-chain transaction from the second blockchain network to the third blockchain network, perform identity verification and permission verification according to the cross-chain transaction request, and obtain a verification result;
[0228] The cross-chain component of the first blockchain network is further configured to, when the verification result indicates successful verification and the nodes of the first blockchain network reach a consensus on the cross-chain transaction, record the transaction information of the cross-chain transaction in the ledger of the first blockchain network and notify the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
[0229] In some possible implementation manners, the cross-chain component of the first blockchain network, the second blockchain network component, and the third blockchain network component form a synchronization network. Specifically, the cross-chain component of the first blockchain network is configured to:
[0230] Broadcast a notification message through the synchronization network, where the notification message is used to notify the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
[0231] In some possible implementation manners, the cross-chain components in the synchronization network perform message synchronization through a gossip protocol.
[0232] In some possible implementation manners, a direct connection channel is established between the cross-chain component of the first blockchain network and the cross-chain component of the third blockchain network;
[0233] Specifically, the cross-chain component of the first blockchain network is configured to:
[0234] Notify the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network through the direct connection channel.
[0235] In some possible implementation manners, the cross-chain component of the first blockchain network is further configured to:
[0236] Identify the transaction type of the cross-chain transaction;
[0237] Specifically, the cross-chain component of the first blockchain network is configured to:
[0238] When the transaction type is cross-chain write, record the transaction information of the cross-chain transaction in the ledger of the first blockchain network.
[0239] In some possible implementation manners, specifically, the cross-chain component of the third blockchain network is configured to:
[0240] When successfully recording the transaction information of the cross-chain transaction in the ledger of the third blockchain network, notify the cross-chain component of the second blockchain network to record the transaction information of the cross-chain transaction in the ledger of the second blockchain network.
[0241] In some possible implementation manners, the cross-chain component of the first blockchain network is further configured to:
[0242] Receive the chain information and cross-chain access permission information of the second blockchain network, as well as the chain information and the cross-chain access permission information of the third blockchain network, and record the chain information and cross-chain access permission information of the second blockchain network, as well as the chain information and the cross-chain access permission information of the third blockchain network, into the ledger of the first blockchain network.
[0243] In some possible implementation manners, the cross-chain component of the first blockchain network is further configured to:
[0244] Detect the validity of the third blockchain network according to the chain information of the third blockchain network;
[0245] Specifically, the cross-chain component of the first blockchain network is configured to:
[0246] When the third blockchain network is valid, notify the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction into the ledger of the third blockchain network.
[0247] In some possible implementation manners, specifically, the cross-chain component of the first blockchain network is configured to:
[0248] Receive the cross-chain transaction request routed by the cross-chain component of the second blockchain network according to the routing address.
[0249] In some possible implementation manners, the cross-chain component includes an agent and a controller, and the agent encapsulates the interaction interfaces of the heterogeneous blockchain networks based on a general interaction protocol;
[0250] The cross-chain component of the second blockchain network is configured to:
[0251] Listen for the cross-chain transaction request through the general interaction protocol.
[0252] Next, refer to Figure 9 As shown in the schematic structural diagram of a cross-chain management system, the cross-chain management system 900 is used to construct a cross-chain system. The cross-chain system includes a first blockchain network, a second sub-blockchain network, and a third sub-blockchain network. The second blockchain network and the third blockchain network are heterogeneous blockchain networks. The cross-chain management system 900 includes:
[0253] A deployment module 902, configured to deploy cross-chain components on at least one node of the first blockchain network, and deploy the cross-chain components on at least one node of the second blockchain network, and deploy the cross-chain components on at least one node of the third blockchain network;
[0254] A registration module 904, configured to register the chain information and cross-chain access permission information of the second blockchain network in the first blockchain network, and register the chain information and cross-chain access permission information of the third blockchain network in the first blockchain network. The chain information of the second blockchain network is used by the cross-chain component of the third blockchain network to discover the second blockchain network, and the chain information of the third blockchain network is used by the cross-chain component of the second blockchain network to discover the third blockchain network.
[0255] Exemplarily, the above deployment module 902 and registration module 904 may be implemented by hardware or may be implemented by software.
[0256] When implemented by software, the deployment module 902 and the registration module 904 are application programs running on a computing device, such as a computing engine. The application program may be provided in the form of a virtualization service. The virtualization service may include a virtual machine (VM) service, a bare metal server (BMS) service, and a container service. Among them, the VM service is a service that virtualizes a virtual machine resource pool on multiple physical hosts to provide VMs for users on demand. The BMS service is a service that virtualizes a BMS resource pool on multiple physical hosts to provide BMSs for users on demand. The container service is a service that virtualizes a container resource pool on multiple physical hosts to provide containers for users on demand. A VM is a simulated virtual computer, that is, a computer logically. A BMS is a highly scalable high-performance computing service, with computing performance no different from that of a traditional physical machine, and has the characteristics of secure physical isolation. A container is a kernel virtualization technology that can provide lightweight virtualization to achieve the purpose of isolating user space, processes, and resources. It should be understood that the VM service, BMS service, and container service in the above virtualization service are only specific examples. In actual applications, the virtualization service may also be other lightweight or heavyweight virtualization services, which are not specifically limited here.
[0257] When implemented by hardware, the deployment module 902 and the registration module 904 may include at least one computing device, such as a server. Alternatively, the deployment module 902 and the registration module 904 may also be devices implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). Among them, the above PLD may be implemented by a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0258] In some possible implementation manners, the deployment module 902 is specifically configured to:
[0259] Download the cross-chain component from the first blockchain network;
[0260] Adapt the cross-chain component to the third blockchain network;
[0261] Deploy the adapted cross-chain component to at least one node of the third blockchain network.
[0262] In some possible implementation manners, the system 900 further includes:
[0263] A status management module 906, configured to check the status of the cross-chain components deployed on at least one node in the first blockchain network, and determine the availability of the first blockchain network according to the number of nodes with normal status of the cross-chain components.
[0264] Among them, the status management module 906 may be implemented by hardware or by software. When implemented by software, the status management module 906 may be an application program running on a computing device, such as a computing engine. The application program may be provided in the form of a virtualization service, for example, provided through a VM or container service. When implemented by hardware, the status management module 906 may include at least one computing device, such as a server. Alternatively, the status management module 906 may also be a device implemented using an ASIC or a programmable logic device (PLD).
[0265] In some possible implementation manners, the system 900 further includes:
[0266] A configuration module 908 is configured to configure the first blockchain network as a main chain, and the main chain is used to relay cross-chain transactions between the second blockchain network and the third blockchain network.
[0267] Among them, the configuration module 908 can be implemented by hardware or by software. When implemented by software, the configuration module 908 can be an application program running on a computing device, such as a computing engine, etc. The application program can be provided in the form of a virtualization service, for example, provided through a VM or container service. When implemented by hardware, the configuration module 908 can include at least one computing device, such as a server, etc. Alternatively, the configuration module 908 can also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), etc.
[0268] In some possible implementation manners, the system 900 further includes:
[0269] A creation module 909 is configured to create the second blockchain network using a first blockchain service and create the third blockchain network using a second blockchain service, where the second blockchain network and the third blockchain network are heterogeneous blockchain networks.
[0270] Among them, the cross-chain management system 900 can be applied to a cloud scenario (or cloud architecture) or a non-cloud scenario (or non-cloud architecture). The application of the cross-chain management system 900 to a cloud scenario and a non-cloud scenario will be respectively illustrated below.
[0271] When applied to a cloud scenario, the cross-chain management system 900 can cooperate with blockchain services to construct a cross-chain system. Specifically, the cross-chain management system 900 can further include a creation module 909, and the creation module 909 is configured to create the second blockchain network using a first blockchain service and create the third blockchain network using a second blockchain service, where the second blockchain network and the third blockchain network are heterogeneous blockchain networks. Specifically, when implemented, the first blockchain service can be a basic BaaS service (such as a BaaS service built into the system or platform), and the second blockchain service can be a third-party BaaS service.
[0272] Furthermore, the first blockchain service and the second blockchain service can provide standardized interfaces. Correspondingly, the creation module 909 can call the first blockchain service through the standardized interface to create the second blockchain network and call the second blockchain service through the standardized interface to create the third blockchain network.
[0273] The above blockchain network can be a consortium blockchain among multiple organizations. A consortium blockchain can be regarded as a cluster formed by multiple private blockchains and is a blockchain network jointly managed by multiple organizations (or institutions). Each organization manages one or more nodes, and the data stored in the consortium blockchain only allows the organizations participating in the management to read, write, and send. Each node of the consortium blockchain usually has a corresponding organization, and the organization can only join or exit the network after authorization. It should be noted that when creating the first blockchain network or the second blockchain network, a blockchain network independent of the organizations of the main blockchain network can be created. This means that the first blockchain network, the second blockchain network, and the main blockchain network have no shared nodes.
[0274] When applied to a non-cloud scenario, the cross-chain management system can deploy cross-chain contracts and cross-chain components for the created blockchain network, and configure one of the blockchain networks as the main blockchain network, and register the chain information and cross-chain access permission information of other blockchain networks (sub-blockchain networks) to the cross-chain components of the main blockchain network.
[0275] In some possible implementation manners, the first blockchain service and the second blockchain service provide standardized interfaces, and the creation module 909 is specifically configured to:
[0276] Call the first blockchain service through the standardized interface to create the second blockchain network, and call the second blockchain service through the standardized interface to create the third blockchain network.
[0277] In some possible implementation manners, the creation module 909 is specifically configured to:
[0278] Use the first blockchain service to create the second blockchain network independent of the organization of the first blockchain network.
[0279] This application also provides a computing device 1000. As Figure 10 shown, the computing device 1000 includes: a bus 1002, a processor 1004, a memory 1006, and a communication interface 1008. The processor 1004, the memory 1006, and the communication interface 1008 communicate with each other through the bus 1002. The computing device 1000 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 1000.
[0280] The bus 1002 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation,Figure 10 It is represented by only one line in the figure, but it does not mean that there is only one bus or one type of bus. The bus 1002 may include a path for transmitting information between various components of the computing device 1000 (e.g., the memory 1006, the processor 1004, the communication interface 1008).
[0281] The processor 1004 may include any one or more of processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0282] The memory 1006 may include a volatile memory, such as a random access memory (RAM). The memory 1006 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0283] The memory 1006 stores executable program code, and the processor 1004 executes the executable program code to implement the foregoing cross-chain transaction method. Specifically, the memory 1006 stores instructions for the cross-chain system to execute the cross-chain transaction method. For example, the memory 1006 may store instructions for the cross-chain component of the first blockchain network in the cross-chain system to execute the cross-chain transaction method, or may store instructions for the cross-chain components of the second blockchain network or the third blockchain network in the cross-chain system to execute the cross-chain transaction method.
[0284] The communication interface 1008 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 1000 and other devices or communication networks.
[0285] This application also provides another computing device. As Figure 11 shown, the difference between this computing device and Figure 10 lies in the memory. Figure 11The memory 1006 of the computing device may also store instructions for the cross-chain management system 900 to execute the cross-chain system construction method. For example, it may store instructions for the deployment module 902 and the registration module 904. Further, the memory 1006 may also store instructions for the status management module 906, the configuration module 908, and the creation module 909.
[0286] An embodiment of this application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device may be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device may also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.
[0287] As Figure 12 shown, the computing device cluster includes multiple computing devices 1000. Instructions for the same cross-chain system to execute the cross-chain transaction method may be stored in the memory 1006 of the computing devices 1000 in the computing device cluster. Among them, at least one computing device stores instructions for the cross-chain system to execute the cross-chain transaction method to implement the functions of the first blockchain network, at least one computing device stores instructions for the cross-chain system to execute the cross-chain transaction method to implement the functions of the first blockchain network, and at least one computing device stores instructions for the cross-chain system to execute the cross-chain transaction method.
[0288] In some possible implementation manners, one or more of the computing devices 1000 in the computing device cluster may also be used to execute some instructions of the cross-chain system for executing the cross-chain transaction method. In other words, a combination of one or more computing devices 1000 may jointly execute the instructions of the cross-chain system for executing the cross-chain transaction method.
[0289] As Figure 13 shown, the computing device cluster includes multiple computing devices 1000. Instructions for the same cross-chain management system 900 to execute the cross-chain system construction method may be stored in the memory 1006 of the computing devices 1000 in the computing device cluster.
[0290] It should be noted that the memories 1006 in different computing devices 1000 in the computing device cluster may store different instructions for executing some functions of the cross-chain management system 900.
[0291] Figure 14 shows a possible implementation manner. As Figure 14As shown, two computing devices 1000A and 1000B are connected through a communication interface 1008. Instructions for executing the functions of the deployment module 902 are stored in the memory of the computing device 1000A. Instructions for executing the functions of the registration module 904 are stored in the memory of the computing device 1000B. In other words, the memories 1006 of the computing devices 1000A and 1000B jointly store the instructions for the cross-chain management system 900 to execute the cross-chain system construction method. Further, the computing device 1000A may also store instructions for the functions of the status management module 906 and the configuration module 908, and the computing device 1000B may also store instructions for the function of the creation module 909.
[0292] Figure 14 The connection method between the computing device clusters shown can be considered because the cross-chain system construction method provided in this application needs to deploy cross-chain components for more nodes. Therefore, it is considered to hand over the functions implemented by the deployment module 902 and the registration module 904 to different computing devices for execution.
[0293] It should be understood that Figure 14 the functions of the computing device 1000A shown in can also be completed by multiple computing devices 1000. Similarly, the functions of the computing device 1000B can also be completed by multiple computing devices 1000.
[0294] In some possible implementation manners, one or more computing devices in the computing device cluster can be connected through a network. Among them, the network can be a wide area network or a local area network, etc. Figure 15 shows a possible implementation manner. As Figure 15 shown, two computing devices 1000C and 1000D are connected through a network. Specifically, they are connected to the network through the communication interfaces in each computing device. In this type of possible implementation manner, instructions for executing the functions of the deployment module 902 are stored in the memory 1006 of the computing device 1000C. At the same time, instructions for executing the functions of the registration module 904 are stored in the memory 1006 of the computing device 1000D. Further, the computing device 1000A may also store instructions for the functions of the status management module 906 and the configuration module 908, and the computing device 1000B may also store instructions for the function of the creation module 909.
[0295] It should be understood that Figure 15 the functions of the computing device 1000C shown in can also be completed by multiple computing devices 1000. Similarly, the functions of the computing device 1000D can also be completed by multiple computing devices 1000.
[0296] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium may be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc. The computer-readable storage medium includes instructions that direct the computing device to execute the above-mentioned method for cross-chain transactions applied to a cross-chain system. The embodiments of the present application also provide another computer-readable storage medium. The computer-readable storage medium includes instructions that direct the computing device to execute the above-mentioned method for constructing a cross-chain system applied to a cross-chain management system.
[0297] The embodiments of the present application also provide a computer program product containing instructions. The computer program product may be software or a program product containing instructions that can run on a computing device or be stored in any available medium. When the computer program product runs on at least one computing device, it causes at least one computing device to execute the above-mentioned cross-chain transaction method. The embodiments of the present application also provide a computer program product containing instructions. When the computer program product runs on at least one computing device, it causes at least one computing device to execute the above-mentioned method for constructing a cross-chain system.
[0298] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or equivalently replace some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. A cross-chain transaction method, characterized in that, Applied to a cross-chain system, the cross-chain system includes a first blockchain network, a second sub-blockchain network, and a third blockchain network. The second blockchain network and the third blockchain network are heterogeneous blockchain networks. Cross-chain components are respectively deployed on the first blockchain network, the second blockchain network, and the third blockchain network. The method includes: The cross-chain component of the first blockchain network obtains a cross-chain transaction request, which is used to request the execution of a cross-chain transaction from the second blockchain network to the third blockchain network; The cross-chain component of the first blockchain network performs identity verification and permission verification according to the cross-chain transaction request to obtain a verification result; When the verification result indicates that the verification is passed, when the cross-chain component of the first blockchain network reaches a consensus on the cross-chain transaction at the nodes of the first blockchain network, the transaction information of the cross-chain transaction is recorded in the ledger of the first blockchain network; The cross-chain component of the first blockchain network notifies the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
2. The method according to claim 1, characterized in that The cross-chain component of the first blockchain network, the cross-chain component of the second blockchain network, and the cross-chain component of the third blockchain network form a synchronization network. The cross-chain component of the first blockchain network notifies the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network, including: The cross-chain component of the first blockchain network broadcasts a notification message through the synchronization network. The notification message is used to notify the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
3. The method according to claim 2, wherein The cross-chain components in the synchronization network perform message synchronization through a gossip protocol.
4. The method according to claim 1, characterized in that, A direct connection channel is established between the cross-chain component of the first blockchain network and the cross-chain component of the third blockchain network; The cross-chain component of the first blockchain network notifies the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network, including: The cross-chain component of the first blockchain network notifies the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network through the direct connection channel.
5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The cross-chain component of the first blockchain network identifies the transaction type of the cross-chain transaction; The cross-chain component of the first blockchain network records the transaction information of the cross-chain transaction in the ledger of the first blockchain network, including: When the transaction type is cross-chain write, the cross-chain component of the first blockchain network records the transaction information of the cross-chain transaction in the ledger of the first blockchain network.
6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: After the cross-chain component of the third blockchain network successfully records the transaction information of the cross-chain transaction in the ledger of the third blockchain network, it notifies the cross-chain component of the second blockchain network to record the transaction information of the cross-chain transaction in the ledger of the second blockchain network.
7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: The cross-chain component of the first blockchain network receives the chain information and cross-chain access permission information of the second blockchain network, as well as the chain information and cross-chain access permission information of the third blockchain network, and records the chain information and cross-chain access permission information of the second blockchain network, as well as the chain information and cross-chain access permission information of the third blockchain network, into the ledger of the first blockchain network.
8. The method according to claim 7, characterized in that, The method further includes: The cross-chain component of the first blockchain network detects the validity of the third blockchain network according to the chain information of the third blockchain network; The cross-chain component of the first blockchain network notifies the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction into the ledger of the third blockchain network, including: When the third blockchain network is valid, the cross-chain component of the first blockchain network notifies the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction into the ledger of the third blockchain network.
9. The method according to any one of claims 1 to 8, characterized in that The cross-chain component of the first blockchain network obtains a cross-chain transaction request, including: The cross-chain component of the first blockchain network receives the cross-chain transaction request routed by the cross-chain component of the second blockchain network according to the routing address.
10. The method according to claim 9, characterized in that, The cross-chain component includes an agent and a controller, and the agent encapsulates the interaction interfaces of the heterogeneous blockchain networks based on a general interaction protocol; The method further includes: The cross-chain component of the second blockchain network listens for the cross-chain transaction request through the general interaction protocol.
11. A method for constructing a cross-chain system, characterized in that, Applied to a cross-chain management system, the cross-chain management system is used to construct a cross-chain system, the cross-chain system includes a first blockchain network, a second sub-blockchain network, and a third sub-blockchain network, the second blockchain network and the third blockchain network are heterogeneous blockchain networks, and the method includes: Deploying cross-chain components at at least one node of the first blockchain network, and deploying the cross-chain components at at least one node of the second blockchain network, and deploying the cross-chain components at at least one node of the third blockchain network; Registering the chain information and cross-chain access permission information of the second blockchain network in the first blockchain network, and registering the chain information and cross-chain access permission information of the third blockchain network in the first blockchain network, where the chain information of the second blockchain network is used for the cross-chain component of the third blockchain network to discover the second blockchain network, and the chain information of the third blockchain network is used for the cross-chain component of the second blockchain network to discover the third blockchain network.
12. The method according to claim 11, wherein The deploying the cross-chain components at at least one node of the third blockchain network includes: Downloading the cross-chain components from the first blockchain network; Adapting the cross-chain components to the third blockchain network; Deploying the adapted cross-chain components at at least one node of the third blockchain network.
13. The method according to claim 11 or 12, characterized in that The method further includes: Checking the status of the cross-chain components deployed at at least one node in the first blockchain network; Determining the availability of the first blockchain network according to the number of nodes with normal status of the cross-chain components.
14. The method according to any one of claims 11 to 13, characterized in that, The method further includes: Configure the first blockchain network as the main chain, and the main chain is used to relay cross-chain transactions between the second blockchain network and the third blockchain network.
15. The method according to any one of claims 11 to 14, characterized in that The method further includes: Create the second blockchain network using a first blockchain service, and create the third blockchain network using a second blockchain service, where the second blockchain network and the third blockchain network are heterogeneous blockchain networks.
16. The method according to claim 15, wherein The first blockchain service and the second blockchain service provide standardized interfaces. The creating of the second blockchain network using the first blockchain service and the creating of the second blockchain network using the second blockchain service include: Invoke the first blockchain service through the standardized interface to create the second blockchain network, and invoke the second blockchain service through the standardized interface to create the third blockchain network.
17. The method according to claim 15 or 16, characterized in that, The creating of the second blockchain network using the first blockchain service includes: Use the first blockchain service to create the second blockchain network that is independent of the organization of the first blockchain network.
18. A cross-chain system, characterized in that, The cross-chain system includes a first blockchain network, a second sub-blockchain network, and a third blockchain network. The second blockchain network and the third blockchain network are heterogeneous blockchain networks. Cross-chain components are respectively deployed in the first blockchain network, the second blockchain network, and the third blockchain network; The cross-chain component of the first blockchain network is used to obtain a cross-chain transaction request, where the cross-chain transaction request is used to request the execution of a cross-chain transaction from the second blockchain network to the third blockchain network, perform identity verification and permission verification according to the cross-chain transaction request, and obtain a verification result; The cross-chain component of the first blockchain network is further used to, when the verification result indicates that the verification is passed and a consensus is reached among the nodes of the first blockchain network for the cross-chain transaction, record the transaction information of the cross-chain transaction in the ledger of the first blockchain network, and notify the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
19. The system according to claim 18, characterized in that, The cross-chain component of the first blockchain network, the second blockchain network component, and the third blockchain network component form a synchronization network. The cross-chain component of the first blockchain network is specifically used for: Broadcast a notification message through the synchronization network, where the notification message is used to notify the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
20. The system according to claim 18 or 19, wherein The cross-chain components in the synchronization network perform message synchronization through a gossip protocol.
21. The system according to claim 18, wherein A direct connection channel is established between the cross-chain component of the first blockchain network and the cross-chain component of the third blockchain network; The cross-chain component of the first blockchain network is specifically used for: Notify the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network through the direct connection channel.
22. The system according to any one of claims 18 to 21, characterized in that, The cross-chain component of the first blockchain network is further used for: Identify the transaction type of the cross-chain transaction; The cross-chain component of the first blockchain network is specifically used for: When the transaction type is cross-chain write, record the transaction information of the cross-chain transaction in the ledger of the first blockchain network.
23. The system according to any one of claims 18 to 22, characterized in that, The cross-chain component of the third blockchain network is specifically used for: When the transaction information of the cross-chain transaction is successfully recorded in the ledger of the third blockchain network, notify the cross-chain component of the second blockchain network to record the transaction information of the cross-chain transaction in the ledger of the second blockchain network.
24. The system according to any one of claims 18 to 23, characterized in that, The cross-chain component of the first blockchain network is further used for: Receive the chain information and cross-chain access permission information of the second blockchain network and the chain information and cross-chain access permission information of the third blockchain network, and record the chain information and cross-chain access permission information of the second blockchain network and the chain information and cross-chain access permission information of the third blockchain network in the ledger of the first blockchain network.
25. The system according to claim 24, wherein The cross-chain component of the first blockchain network is further used for: Detect the validity of the third blockchain network according to the chain information of the third blockchain network; The cross-chain component of the first blockchain network is specifically used for: When the third blockchain network is valid, the cross-chain component of the first blockchain network notifies the cross-chain component of the third blockchain network to record the transaction information of the cross-chain transaction in the ledger of the third blockchain network.
26. The system according to any one of claims 18 to 25, characterized in that, The cross-chain component of the first blockchain network is specifically used for: Receive the cross-chain transaction request routed by the cross-chain component of the second blockchain network according to the routing address.
27. The system according to claim 26, wherein The cross-chain component includes an agent and a controller, and the agent encapsulates the interaction interfaces of the heterogeneous blockchain networks based on a general interaction protocol; The cross-chain component of the second blockchain network is used for: Listen for the cross-chain transaction request through the general interaction protocol.
28. A cross-chain management system, characterized in that, The cross-chain management system is used to construct a cross-chain system, which includes a first blockchain network, a second sub-blockchain network, and a third sub-blockchain network. The second blockchain network and the third blockchain network are heterogeneous blockchain networks. The cross-chain management system includes: A deployment module, which is used to deploy cross-chain components on at least one node of the first blockchain network, and deploy the cross-chain components on at least one node of the second blockchain network and at least one node of the third blockchain network; A registration module, which is used to register the chain information and cross-chain access permission information of the second blockchain network in the first blockchain network, and register the chain information and cross-chain access permission information of the third blockchain network in the first blockchain network. The chain information of the second blockchain network is used for the cross-chain component of the third blockchain network to discover the second blockchain network, and the chain information of the third blockchain network is used for the cross-chain component of the second blockchain network to discover the third blockchain network.
29. The system according to claim 28, wherein, The deployment module is specifically used for: Download the cross-chain component from the first blockchain network; Adapt the cross-chain component to the third blockchain network; Deploy the adapted cross-chain component on at least one node of the third blockchain network.
30. The system according to claim 28 or 29, characterized in that, The system further includes: A status management module, configured to check the status of cross-chain components deployed on at least one node in the first blockchain network, and determine the availability of the first blockchain network according to the number of nodes with normal status of the cross-chain components.
31. The system according to any one of claims 28 to 30, characterized in that, The system further includes: A configuration module, configured to configure the first blockchain network as a main chain, and the main chain is used to relay cross-chain transactions between the second blockchain network and the third blockchain network.
32. The system according to any one of claims 28 to 31, characterized in that, The system further includes: A creation module, configured to create the second blockchain network using a first blockchain service and create the third blockchain network using a second blockchain service, and the second blockchain network and the third blockchain network are heterogeneous blockchain networks.
33. The system according to claim 32, characterized in that, The first blockchain service and the second blockchain service provide standardized interfaces, and specifically, the creation module is configured to: Call the first blockchain service through the standardized interface to create the second blockchain network, and call the second blockchain service through the standardized interface to create the third blockchain network.
34. The system according to claim 32 or 33, characterized in that, Specifically, the creation module is configured to: Use the first blockchain service to create the second blockchain network that is independent of the organization of the first blockchain network.
35. A cluster of computing devices, characterized in that, The computing device cluster includes at least one computing device, the at least one computing device includes at least one processor and at least one memory, and computer-readable instructions are stored in the at least one memory; the at least one processor executes the computer-readable instructions to cause the computing device cluster to execute the method according to any one of claims 1 to 17.
36. A computer-readable storage medium, characterized in that, Including computer-readable instructions; the computer-readable instructions are used to implement the method according to any one of claims 1 to 17.
37. A computer program product, characterized in that, Including computer-readable instructions; the computer-readable instructions are used to implement the method according to any one of claims 1 to 17.