Cross-chain method and system, electronic equipment and readable storage medium

By setting anchor nodes in the blockchain system and realizing data interoperability, the problem of data mutual recognition and business collaboration among multiple heterogeneous and homogeneous blockchains in complex scenarios is solved, the cross-chain system structure is simplified, and data and Efficient business collaboration.

CN118784200APending Publication Date: 2024-10-15ACADEMY OF BROADCASTING SCI STATE ADMINISTATION OF PRESS PUBLICATION RADIO FILM & TELEVISION +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310362592.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-06
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

In scenarios where multiple heterogeneous and homogeneous blockchains run simultaneously and the business is complex, the existing blockchain consortium chain system lacks effective business division, load balancing and collaborative management technology, making it difficult to achieve mutual data recognition and business collaboration. .

Method used

By setting up anchor nodes in the base chain and the business chain, and storing each other's IP addresses and port numbers in the anchor nodes, data interoperability between the base chain and the business chain is realized, the cross-chain system structure is simplified, and mutual recognition of data and business are ensured. Collaboration.

Benefits of technology

It realizes the mutual data recognition and business collaboration of each blockchain in the cross-chain system, simplifies the cross-chain system structure, and enables the business chain to directly obtain the transaction data of other business chains from the base chain without the need to communicate directly with other business chains.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118784200A_ABST
    Figure CN118784200A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-chain method and system, an electronic device and a readable storage medium, the method is applied to a cross-chain system, the cross-chain system comprises a base chain and a plurality of service chains registered on the base chain, and the service chains comprise a block chain isomorphic with the base chain and a block chain heterogeneous with the base chain. The method comprises the following steps: calling a communication protocol contract deployed on a service chain by the service chain, and sending transaction data of the service chain to an anchor node of a base chain corresponding to the anchor node of the service chain through the anchor node of the service chain; the base chain synchronizes the transaction data to all nodes of the base chain; and after the base chain receives a transaction data query request initiated by any target service chain in the cross-chain system, the base chain calls a communication protocol contract deployed on the base chain, and transaction data corresponding to the transaction data query request is sent to an anchor node of the target service chain through the anchor node of the base chain corresponding to the anchor node of the target service chain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and more specifically, to a cross-chain method, system, electronic device and readable storage medium. Background Art

[0002] Most of the current blockchain alliance chain systems are independent and closed systems. In order to achieve intercommunication between various blockchains, many cross-chain and multi-chain technologies have been proposed to solve the communication and collaboration between different blockchains. However, in the scenario where multiple heterogeneous and homogeneous blockchains are running at the same time and the business is complex, there is a lack of a technical implementation and management method for effective business division, load balancing and collaborative management for business and region to ensure data mutual recognition and business collaboration of multi-chain systems. Summary of the invention

[0003] One object of the present invention is to provide a new technical solution for cross-chain intercommunication of blockchains.

[0004] According to a first aspect of the present invention, a cross-chain method is provided. The method is applied to a cross-chain system, wherein the cross-chain system includes a base chain and multiple service chains registered on the base chain, wherein the service chains include blockchains that are isomorphic to the base chain and blockchains that are heterogeneous to the base chain, and the method includes:

[0005] The business chain calls the communication protocol contract deployed on the business chain, and sends the transaction data of the business chain to the anchor node of the base chain corresponding to the anchor node of the business chain through the anchor node of the business chain, wherein the anchor node of the business chain stores the IP address and port number of the anchor node of the base chain corresponding to the anchor node of the business chain, and the anchor node of the base chain stores the IP address and port number of the anchor node of the business chain corresponding to the anchor node of the base chain;

[0006] The base chain synchronizes the transaction data to all nodes of the base chain;

[0007] When the base chain receives a transaction data query request initiated by any target business chain in the cross-chain system, the base chain calls the communication protocol contract deployed on the base chain, and sends the transaction data corresponding to the transaction data query request to the anchor node of the target business chain through the anchor node of the base chain corresponding to the anchor node of the target business chain.

[0008] Optionally, before the service chain calls the communication protocol contract deployed on the service chain and sends the transaction data of the service chain to the anchor node of the base chain through the anchor node of the service chain, the method further includes:

[0009] The business chain performs signature authentication on the transaction data according to a private key corresponding to the digital identity information of the target user, wherein the target user is a user registered on the business chain.

[0010] Optionally, the cross-chain system further includes a background management system, and before the business chain calls the communication protocol contract deployed on the business chain and sends the transaction data of the business chain to the anchor node of the base chain corresponding to the anchor node of the business chain through the anchor node of the business chain, the method further includes:

[0011] The backend management system configures the IP address and port number of the anchor node of the service chain and the IP address and port number of the anchor node of the base chain;

[0012] The backend management system deploys communication protocol contracts on the base chain and the business chain;

[0013] The backend management system obtains information about the service chain and information about the base chain, wherein the information about the service chain at least includes information about the genesis unit of the service chain, information about the node of the service chain, and the IP address and port number of the anchor node of the service chain, and the information about the base chain at least includes information about the genesis unit of the base chain, information about the node of the base chain, and the IP address and port number of the anchor node of the base chain;

[0014] The background management system writes the information of the service chain into the base chain, and writes the information of the base chain into the service chain.

[0015] Optionally, sending the transaction data of the service chain to the anchor node of the base chain corresponding to the anchor node of the service chain through the anchor node of the service chain includes:

[0016] After each preset time, the business chain sends the transaction data generated within the preset time to the anchor node of the base chain corresponding to the anchor node of the business chain through the anchor node of the business chain.

[0017] Optionally, the cross-chain system further includes a cross-chain gateway, and the method further includes:

[0018] The cross-chain gateway monitors events on the base chain and the business chain;

[0019] In the case where the event is a transaction request event, the cross-chain gateway forwards the transaction data corresponding to the transaction request event to the corresponding business chain;

[0020] In the case where the event is an account operation event, the cross-chain gateway performs the account operation within the cross-chain gateway according to the specific business corresponding to the account operation event, or the cross-chain gateway performs the account operation on the business chain corresponding to the account operation event according to the specific business corresponding to the account operation event;

[0021] When the event is a block event, the cross-chain gateway performs event notification through the event manager registered on the cross-chain gateway.

[0022] Optionally, the method further comprises:

[0023] The cross-chain gateway obtains the transaction data of the business chain, and the transaction data at least includes block height, block hash, previous block hash, timestamp, transaction Merkle tree root, and ID of the business chain;

[0024] The cross-chain gateway generates a transaction hash Merkel tree according to the transaction data of the business chain, and sends the transaction hash Merkel tree to the base chain storage;

[0025] The base chain performs data verification on the transaction data of the business chain according to the transaction hash Merkle tree.

[0026] Optionally, before the base chain calls the communication protocol contract deployed on the base chain and sends the transaction data corresponding to the transaction data query request to the anchor node of the target business chain through the anchor node of the base chain, the method further includes:

[0027] The base chain obtains information of a target account that initiates the transaction data query request;

[0028] The base chain verifies the authority of the target account according to the information of the target account;

[0029] When the target account authority verification is passed, the base chain calls the communication protocol contract deployed on the base chain, and sends the transaction data corresponding to the transaction data query request to the anchor node of the target business chain through the anchor node of the base chain.

[0030] According to a second aspect of the present invention, there is provided a cross-chain system, comprising a base chain and a plurality of business chains registered on the base chain, wherein the business chains include a blockchain isomorphic to the base chain and a blockchain heterogeneous to the base chain;

[0031] The service chain is used to call the communication protocol contract deployed on the service chain, and send the transaction data of the service chain to the anchor node of the base chain corresponding to the anchor node of the service chain through the anchor node of the service chain, wherein the anchor node of the service chain stores the IP address and port number of the anchor node of the base chain corresponding to the anchor node of the service chain, and the anchor node of the base chain stores the IP address and port number of the anchor node of the service chain corresponding to the anchor node of the base chain;

[0032] The base chain is used to synchronize the transaction data to all nodes of the base chain;

[0033] The base chain is used to call the communication protocol contract deployed on the base chain when receiving a transaction data query request initiated by any target business chain in the cross-chain system, and send the transaction data corresponding to the transaction data query request to the anchor node of the target business chain through the anchor node of the base chain corresponding to the anchor node of the target business chain.

[0034] According to a third aspect of the present invention, there is provided an electronic device comprising a processor and a memory, wherein the memory stores programs or instructions executable on the processor, and wherein the programs or instructions, when executed by the processor, implement the steps of the cross-chain method as described in the first aspect of the present invention.

[0035] According to a fourth aspect of the present invention, a readable storage medium is provided, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the cross-chain method as described in the first aspect of the present invention are implemented.

[0036] According to one embodiment of the present invention, the present invention sets anchor nodes in the base chain and the business chain, corresponds the anchor nodes of the base chain and the business chain, stores the information of the anchor nodes of the business chain in the anchor nodes of the base chain, stores the information of the anchor nodes of the base chain in the anchor nodes of the business chain, realizes data intercommunication between the base chain and the business chain through the anchor nodes of the base chain and the anchor nodes of the business chain, and stores the transaction data of the business chain in the base chain. When the business chain needs to use the transaction data of other business chains, it can directly obtain it from the base chain. The business chain only needs to communicate with the base chain to obtain the transaction data of all business chains in the cross-chain system, and does not need to establish communication between the business chain and other business chains, thereby simplifying the structure of the cross-chain system and ensuring data mutual recognition and business collaboration of each blockchain in the cross-chain system.

[0037] Further features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.

[0039] Figure 1 It is a block diagram of the hardware configuration of an electronic device according to a cross-chain method provided in an embodiment of the present application.

[0040] Figure 2 It is a flow chart of the cross-chain method in an embodiment of the present application.

[0041] Figure 3 It is a flowchart of a cross-chain method in another embodiment of the present application.

[0042] Figure 4 It is a schematic diagram of the cross-chain system in an embodiment of the present application.

[0043] Figure 5 It is a schematic diagram of a cross-chain system in another embodiment of the present application. DETAILED DESCRIPTION

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

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

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

[0047] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

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

[0049] Figure 1 It is a block diagram of the hardware configuration of an electronic device for implementing a cross-chain method provided in an embodiment of the present application.

[0050] The electronic device 1000 may be a terminal or a server. Further, the terminal may be a head mounted device, a portable computer, a tablet computer, a palm computer, etc. The server may be a cloud server, etc.

[0051] The electronic device 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and the like. The processor 1100 may be a central processing unit CPU, a microprocessor MCU, and the like. The memory 1200 may include, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, and the like. The interface device 1300 may include, for example, a USB interface, an earphone interface, and the like. The communication device 1400 may, for example, be capable of wired or wireless communication. The display device 1500 may be, for example, a liquid crystal display screen, a touch display screen, and the like. The input device 1600 may include, for example, a touch screen, a keyboard, and the like. The user may input / output voice information through the speaker 1700 and the microphone 1800.

[0052] Despite Figure 1 Multiple devices are shown for the electronic device 1000, but the present application may only involve some of the devices, for example, the electronic device 1000 only involves the memory 1200 and the processor 1100.

[0053] In the embodiment of the present application, the memory 1200 of the electronic device 1000 is used to store instructions, which are used to control the processor 1100 to execute the cross-chain method provided in the embodiment of the present application.

[0054] In the above description, the technician can design instructions according to the scheme disclosed in this application. How instructions control the processor to operate is well known in the art, so it will not be described in detail here.

[0055] like Figure 2 As shown, this embodiment introduces a cross-chain method, which is applied to a cross-chain system. The cross-chain system includes a base chain and multiple business chains registered on the base chain. The business chain in the cross-chain system can be a blockchain isomorphic to the base chain, and the business chain can also be a blockchain heterogeneous to the base chain. Different business chains correspond to different specific businesses. The method includes steps 2100-2300.

[0056] Step 2100: The business chain calls the communication protocol contract deployed on the business chain, and sends the transaction data of the business chain to the anchor node of the base chain corresponding to the anchor node of the business chain through the anchor node of the business chain, wherein the anchor node of the business chain stores the IP address and port number of the anchor node of the base chain corresponding to the anchor node of the business chain, and the anchor node of the base chain stores the IP address and port number of the anchor node of the business chain corresponding to the anchor node of the base chain.

[0057] like Figure 5As shown, each service chain has an anchor node, and any node of the service chain can be designated as the anchor node of the service chain. The base chain can have one anchor node, or multiple anchor nodes, and the anchor node of the base chain can be any node on the base chain.

[0058] An anchor node of a service chain corresponds to an anchor node of a base chain. An anchor node of a base chain can correspond to an anchor node of a service chain, or an anchor node of a base chain can correspond to anchor nodes of multiple service chains. Data can be transmitted between the anchor node of a service chain and the anchor node of the base chain corresponding to the anchor node of the service chain. For other anchor nodes of the base chain, data cannot be transmitted with the anchor node of the service chain.

[0059] For example, there are three business chains, each of which has a node configured as the anchor node of the business chain, and there are three nodes on the base chain configured as the anchor nodes of the base chain. The three anchor nodes of the base chain correspond one to one with the anchor nodes of the three business chains. For another example, there are three business chains, and only one node on the base chain is configured as the anchor node of the base chain. The anchor node of the base chain corresponds to the anchor nodes of the three business chains.

[0060] The IP address and port number of the anchor node of the base chain corresponding to the anchor node of the service chain are stored in the anchor node of the service chain. The IP address and port number of the anchor node of the service chain corresponding to the anchor node of the base chain are stored in the anchor node of the base chain. If the anchor node of the base chain corresponds to the anchor nodes of multiple service chains, the IP addresses and port numbers of the anchor nodes of all corresponding service chains are stored in the anchor node of the base chain.

[0061] like Figure 4 As shown in the figure, communication protocol contracts are deployed on both the base chain and the business chain. In order to solve the problem of different transaction legitimacy proofs caused by different consensus algorithms and encryption mechanisms among heterogeneous business chains, a general inter-chain transmission protocol that supports multi-level heterogeneous blockchain networks is adopted to ensure the trusted verification and reliable transmission of transactions between heterogeneous blockchains, and promote cross-chain calls of heterogeneous assets, data and services.

[0062] Step 2200: The base chain synchronizes the transaction data to all nodes of the base chain.

[0063] After receiving the transaction data sent by the business chain, the base chain will synchronously store the transaction data to all nodes of the base chain.

[0064] Step 2300: When the base chain receives a transaction data query request initiated by any target business chain in the cross-chain system, the base chain calls the communication protocol contract deployed on the base chain, and sends the transaction data corresponding to the transaction data query request to the anchor node of the target business chain through the anchor node of the base chain corresponding to the anchor node of the target business chain.

[0065] The target business chain is any blockchain in the cross-chain system. The target business chain is also registered on the base chain. There is an anchor node on the base chain corresponding to the anchor node of the target business chain. The data transmission between the target business chain and the base chain is realized through the anchor node of the target business chain and the anchor node of the corresponding base chain.

[0066] When the target business chain needs to use transaction data, the target business chain sends a transaction data query request to the base chain through the anchor node of the target business chain. The transaction data can be the transaction data of the target business chain or the transaction data of other business chains. The base chain queries the transaction data corresponding to the transaction data query request from the base chain according to the transaction data query request sent by the target business chain. The base chain sends the query transaction data to the target business chain.

[0067] This embodiment sets anchor nodes in the base chain and the business chain, and corresponds the anchor nodes of the base chain and the business chain, stores the information of the anchor nodes of the business chain in the anchor nodes of the base chain, and stores the information of the anchor nodes of the base chain in the anchor nodes of the business chain, realizes data intercommunication between the base chain and the business chain through the anchor nodes of the base chain and the anchor nodes of the business chain, and stores the transaction data of the business chain in the base chain. When the business chain needs to use the transaction data of other business chains, it can directly obtain it from the base chain. The business chain only needs to communicate with the base chain to obtain the transaction data of all business chains in the cross-chain system, and does not need to establish communication between the business chain and other business chains, which simplifies the structure of the cross-chain system and ensures data mutual recognition and business collaboration of each blockchain in the cross-chain system.

[0068] In this embodiment, before step 2100, the method further includes: the business chain performs signature authentication on the transaction data according to a private key corresponding to the digital identity information of the target user, wherein the target user is a user registered on the business chain.

[0069] The digital identity information of the target user indicates the real identity of the target user, and a private key is generated based on the real identity of the target user. There can be multiple registered users on a business chain, and a transaction on a business chain refers to a transaction between two users registered on the business chain. The target user can be the user of any transaction party corresponding to the transaction data, or the target user can be another user. For example, there are the first user, the second user, and the third user on the business chain, and a transaction is conducted between the first user and the second user. Then, the private key corresponding to the digital identity information of the first user can be used to sign and authenticate the transaction data, or the private key corresponding to the digital identity information of the second user can be used to sign and authenticate the transaction data, or the private key corresponding to the digital identity information of the third user can be used to sign and authenticate the transaction data.

[0070] Users can sign and authenticate their own transaction data based on their own digital identity information. Users can also sign and authenticate other users' transaction data based on their own digital identity information. Users can also authorize other users to use their own digital identity information. Other users can view the signature information of transaction data and judge the credibility of transaction data based on the signature information.

[0071] For authoritative institutions, the corresponding digital identity of the authoritative institution will also be allocated on the business chain. The digital identity of the authoritative institution can be used to sign and authenticate transaction data, thereby improving the credibility of transaction data.

[0072] The digital identity function in the present invention can be integrated with the CA certificate of the business chain itself, or it can be integrated with the existing general CA (including national secret CA). It can also use the public and private key pairs generated locally by the terminal for signature authentication, without relying on the CA certificate center. It is flexible and convenient while helping to disperse security risks.

[0073] This embodiment uses the private key corresponding to the digital identity information of the target user to sign and authenticate the transaction data. The digital identity information represents the real identity of the target user, thereby improving the credibility of the transaction data.

[0074] like Figure 3 As shown, in this embodiment, the cross-chain system also includes a background management system. Before step 2100, the method also includes steps 3100-3400.

[0075] Step 3100: The background management system configures the IP address and port number of the anchor node of the service chain and the IP address and port number of the anchor node of the base chain.

[0076] Step 3200: The background management system deploys the communication protocol contract on the base chain and the business chain.

[0077] Step 3300: The background management system obtains the information of the business chain and the information of the base chain, wherein the information of the business chain at least includes the genesis unit information of the business chain, the node information of the business chain, and the IP address and port number of the anchor node of the business chain; the information of the base chain at least includes the genesis unit information of the base chain, the node information of the base chain, and the IP address and port number of the anchor node of the base chain.

[0078] Step 3400: The background management system writes the information of the business chain into the base chain, and writes the information of the base chain into the business chain.

[0079] like Figure 3As shown, the network communication parameters of the base chain node and the business chain node are configured through the background management system. The network communication parameters include IP address and port number.

[0080] The communication protocol contract of the base chain and the communication protocol contract of the business chain are deployed through the background management system, and the communication between the base chain and the business chain is realized by calling the communication protocol contract. Figure 4 As shown in the figure, a business chain management contract is also deployed on the base chain, which is used for operations such as registration and deregistration of the business chain.

[0081] like Figure 3 As shown, the base chain information can be obtained through the background management system. After the background management system obtains the base chain information, the background management system writes the base chain information into the business chain. For example, the base chain has anchor node 1 and anchor node 2. The anchor node 1 of the base chain corresponds to the anchor node of business chain 1, and the anchor node 2 of the base chain corresponds to the anchor node of business chain 2. Then the background management system writes the information of anchor node 1 of the base chain into the anchor node of business chain 1, and the background management system writes the information of anchor node 2 of the base chain into the anchor node of business chain 2.

[0082] The business chain information can also be obtained through the background management system. After the background management system obtains the business chain information, the background management system writes the business chain information into the base chain. For example, the base chain has anchor node 1 and anchor node 2. The anchor node 1 of the base chain corresponds to the anchor node of business chain 1, and the anchor node 2 of the base chain corresponds to the anchor node of business chain 2. Then the background management system writes the information of the anchor node of business chain 1 into the anchor node 1 of the base chain, and the background management system writes the information of the anchor node of business chain 2 into the anchor node 2 of the base chain.

[0083] In this embodiment, the step of sending the transaction data of the business chain to the anchor node of the base chain corresponding to the anchor node of the business chain through the anchor node of the business chain includes: after each preset time, the business chain sends the transaction data generated within the preset time to the anchor node of the base chain corresponding to the anchor node of the business chain through the anchor node of the business chain.

[0084] The business chain sends transaction data to the base chain at preset intervals. Figure 3 As shown in the figure, the business chain periodically synchronizes transaction data to the base chain. For example, if the preset time is one hour, the business chain will synchronize data every hour and send transaction data to the base chain. The synchronized transaction data is the new transaction data generated within one hour.

[0085] In this embodiment, the cross-chain system also includes a cross-chain gateway, and the method also includes steps 4100-4400.

[0086] Step 4100: The cross-chain gateway monitors events on the base chain and the business chain.

[0087] Step 4200: When the event is a transaction request event, the cross-chain gateway forwards the transaction request to the corresponding business chain.

[0088] Step 4300: When the event is an account operation event, the cross-chain gateway performs an account operation within the cross-chain gateway according to the specific business corresponding to the account operation event, or the cross-chain gateway performs an account operation on the business chain corresponding to the account operation event according to the specific business corresponding to the account operation event.

[0089] Step 4400: When the event is a block event, the cross-chain gateway performs event notification through the event manager registered on the cross-chain gateway.

[0090] The cross-chain gateway can be used for cross-chain connection between the base chain and the business chain. It can configure the business chain and the base chain for global connection or specify the connection between different business chains according to business needs. The cross-chain gateway has made plug-in dynamic adaptation for different blockchain systems. It is composed of various blockchain adapters and cross-chain buses to complete the interface call with the blockchain of different underlying architectures, and support the expansion and docking of other third-party blockchain systems. The cross-chain gateway realizes the cross-chain evidence storage, cross-chain verification, data intercommunication and smart contract linkage interaction between the base chain and other isomorphic or heterogeneous blockchains.

[0091] The cross-chain gateway system performs interface adaptation, cross-chain communication, mutual registration, account mapping and scheduling management for the mutual docking of different business chains. In the scenario of data verification, the business chain and the base chain can obtain global data verification services by connecting. In the scenario of specific transaction data synchronization and cross-chain contract calls, the business chain and the blockchain outside the cross-chain system need to be scheduled through the cross-chain gateway to achieve direct interaction, and submit the transaction verification information of cross-chain processing on the base chain to ensure that all data on the base chain can be verified.

[0092] The cross-chain gateway can monitor events on the base chain and business chain. When an event occurs on the base chain or business chain, the cross-chain gateway can obtain event information. Event types include transaction request events, account operation events, block events, etc. Event types can also include other types. The cross-chain gateway handles various event types accordingly.

[0093] When the event type is a transaction request event, the transaction request is forwarded through the cross-chain gateway. For example, a transaction request is generated on business chain A, and the transaction object of the transaction request is business chain B. The transaction needs to be traded between business chain A and business chain B. After the cross-chain gateway monitors the transaction request event, it forwards the transaction request to business chain B.

[0094] The event type can be an account operation event. An account operation event can be an update of account data. For example, if the account data of a user on a business chain is updated, after the cross-chain gateway monitors the account operation event, it performs the account operation on the business chain through the adapter interface of the business chain.

[0095] When a transaction is generated on the business chain, the business chain will generate a new block, triggering a block event. After the cross-chain gateway monitors the block event, it will notify the event through the event manager on the cross-chain gateway.

[0096] The cross-chain gateway can also obtain the transaction data of the business chain, which includes block height, block hash, previous block hash, timestamp, transaction Merkle tree root, and business chain ID. The cross-chain gateway generates a transaction hash Merkle tree based on the transaction data of the business chain and sends the transaction hash Merkle tree to the base chain for storage. After the base chain receives the transaction hash Merkle tree sent by the cross-chain gateway, the base chain verifies the transaction data of the business chain based on the transaction hash Merkle tree.

[0097] In this embodiment, the base chain calls the communication protocol contract deployed on the base chain, and before sending the transaction data corresponding to the transaction data query request to the anchor node of the target business chain through the anchor node of the base chain, the method also includes steps 2310-2330.

[0098] Step 2310: The base chain obtains information of the target account that initiated the transaction data query request.

[0099] Step 2320: The base chain performs authority verification on the target account according to the information of the target account.

[0100] Step 2330: When the target account authority verification is passed, the base chain calls the communication protocol contract deployed on the base chain, and sends the transaction data corresponding to the transaction data query request to the anchor node of the target business chain through the anchor node of the base chain.

[0101] When the target business chain needs to use transaction data, the target business chain can send a transaction data query request to the base chain through the target account. The base chain verifies the permissions of the target account to determine whether the target account has access rights to the transaction data. If the target account has the corresponding permissions, the base chain sends the transaction data to the target business chain. The transaction data can be transaction data generated on the target business chain or on other business chains.

[0102] The base chain can also realize the intercommunication of application data between various business chains. For example, an organization is not a participant in a certain business chain, but needs to access the application data on the business chain. At this time, the business chain where the application data to be accessed is located can be queried through the base chain, and then the data access rights of the organization can be reviewed. The data party can conduct the rights review. After obtaining the permission of the data party, the application data can be obtained through the scheduling function of the base chain.

[0103] For example, institution A is a participant of business chain A, and institution B is a parameter party of business chain B. Institution B generates application data on business chain B, and institution A needs to access the application data generated by institution B. Institution A initiates an access request to the base chain, and the base chain queries the data to be accessed in business chain B based on the access request. The base chain forwards the access request to business chain B. After business chain B receives the access request, institution B conducts a permission review to determine whether institution A has data access rights. After the permission review is passed, business chain B sends the application data to the base chain. The base chain then forwards the application data to business chain A, completing institution A's reading of the application data.

[0104] The present invention combines multi-chain, cross-chain, digital identity and other technologies, cooperates with background management, and realizes a flexible and open base chain plus business chain operation system, which can well realize the integration and collaborative operation of isomorphic and heterogeneous blockchain systems, facilitate business management and data isolation, reduce the load of a single chain, and can integrate various existing blockchain systems for collaborative operation. The present invention can open up and integrate various external and internal blockchain systems, and can perform interface adaptation, cross-chain communication, mutual registration, account mapping and scheduling management for the mutual docking of different business chains, solving the problems of user mutual recognition, data mutual trust and business intercommunication of different chains.

[0105] This embodiment introduces a cross-chain system, including a base chain and at least one service chain registered on the base chain;

[0106] The service chain is used to call the communication protocol contract deployed on the service chain, and send the transaction data of the service chain to the anchor node of the base chain corresponding to the anchor node of the service chain through the anchor node of the service chain, wherein the anchor node of the service chain stores the IP address and port number of the anchor node of the base chain corresponding to the anchor node of the service chain, and the anchor node of the base chain stores the IP address and port number of the anchor node of the service chain corresponding to the anchor node of the base chain;

[0107] The base chain is used to synchronize the transaction data to all nodes of the base chain;

[0108] The base chain is used to call the communication protocol contract deployed on the base chain when receiving a transaction data query request initiated by any target business chain in the cross-chain system, and send the transaction data corresponding to the transaction data query request to the anchor node of the target business chain through the anchor node of the base chain corresponding to the anchor node of the target business chain.

[0109] The present invention sets anchor nodes in the base chain and the business chain, corresponds the anchor nodes of the base chain and the business chain, stores the information of the anchor nodes of the business chain in the anchor nodes of the base chain, stores the information of the anchor nodes of the base chain in the anchor nodes of the business chain, realizes data intercommunication between the base chain and the business chain through the anchor nodes of the base chain and the anchor nodes of the business chain, and stores the transaction data of the business chain in the base chain. When the business chain needs to use the transaction data of other business chains, it can directly obtain it from the base chain. The business chain only needs to communicate with the base chain to obtain the transaction data of all business chains in the cross-chain system, and does not need to establish communication between the business chain and other business chains, thereby simplifying the structure of the cross-chain system and ensuring data mutual recognition and business collaboration of each blockchain in the cross-chain system.

[0110] Optionally, the business chain is further used to perform signature authentication on the transaction data according to a private key corresponding to the digital identity information of a target user, wherein the target user is a user registered on the business chain.

[0111] Optionally, the cross-chain system further includes a background management system, which is used to configure the IP address and port number of the anchor node of the service chain and the IP address and port number of the anchor node of the base chain;

[0112] The backend management system is used to deploy communication protocol contracts on the base chain and the business chain;

[0113] The backend management system is used to obtain information about the service chain and the base chain, wherein the information about the service chain at least includes the genesis unit information of the service chain, the node information of the service chain, and the IP address and port number of the anchor node of the service chain; and the information about the base chain at least includes the genesis unit information of the base chain, the node information of the base chain, and the IP address and port number of the anchor node of the base chain;

[0114] The background management system is used to write the information of the service chain into the base chain, and write the information of the base chain into the service chain.

[0115] Optionally, the business chain is also used to send the transaction data generated within the preset time to the anchor node of the base chain corresponding to the anchor node of the business chain through the anchor node of the business chain after each preset time.

[0116] Optionally, the cross-chain system further includes a cross-chain gateway;

[0117] The cross-chain gateway is used to monitor events on the base chain and the business chain;

[0118] In the case where the event is a transaction request event, the cross-chain gateway is used to forward the transaction data corresponding to the transaction request event to the corresponding business chain;

[0119] In the case where the event is an account operation event, the cross-chain gateway is used to perform an account operation within the cross-chain gateway according to the specific business corresponding to the account operation event, or the cross-chain gateway performs an account operation on the business chain corresponding to the account operation event according to the specific business corresponding to the account operation event;

[0120] When the event is a block event, the cross-chain gateway is used to perform event notification through an event manager registered on the cross-chain gateway.

[0121] Optionally, the cross-chain gateway is used to obtain transaction data of the business chain, and the transaction data at least includes block height, block hash, previous block hash, timestamp, transaction Merkle tree root, and ID of the business chain;

[0122] The cross-chain gateway is used to generate a transaction hash Merkel tree according to the transaction data of the business chain, and send the transaction hash Merkel tree to the base chain storage;

[0123] The base chain is used to perform data verification on the transaction data of the business chain according to the transaction hash Merkle tree.

[0124] Optionally, the base chain is used to obtain information of a target account that initiates the transaction data query request;

[0125] The base chain is used to verify the authority of the target account according to the information of the target account;

[0126] The base chain is used to call the communication protocol contract deployed on the base chain when the target account authority verification is passed, and send the transaction data corresponding to the transaction data query request to the anchor node of the target business chain through the anchor node of the base chain.

[0127] This embodiment introduces an electronic device, including a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the cross-chain method described in any embodiment of the present invention are implemented.

[0128] This embodiment introduces a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the cross-chain method described in any embodiment of the present invention are implemented.

[0129] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.

[0130] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0131] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0132] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.

[0133] Various aspects of the present invention are described herein with reference to the flow charts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flow chart and / or block diagram and the combination of each box in the flow chart and / or block diagram can be implemented by computer-readable program instructions.

[0134] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0135] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0136] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.

[0137] Embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.

Claims

1. A cross-chain method, It is characterized in that The method is applied to a cross-chain system, the cross-chain system includes a base chain and multiple business chains registered on the base chain, the business chains include blockchains that are isomorphic to the base chain and blockchains that are heterogeneous to the base chain, and the method includes: The business chain calls the communication protocol contract deployed on the business chain, and sends the transaction data of the business chain to the anchor node of the base chain corresponding to the anchor node of the business chain through the anchor node of the business chain, wherein the anchor node of the business chain stores the IP address and port number of the anchor node of the base chain corresponding to the anchor node of the business chain, and the anchor node of the base chain stores the IP address and port number of the anchor node of the business chain corresponding to the anchor node of the base chain; The base chain synchronizes the transaction data to all nodes of the base chain; When the base chain receives a transaction data query request initiated by any target business chain in the cross-chain system, the base chain calls the communication protocol contract deployed on the base chain, and sends the transaction data corresponding to the transaction data query request to the anchor node of the target business chain through the anchor node of the base chain corresponding to the anchor node of the target business chain.

2. The method according to claim 1, It is characterized in that The service chain calls the communication protocol contract deployed on the service chain, and before sending the transaction data of the service chain to the anchor node of the base chain through the anchor node of the service chain, the method further includes: The business chain performs signature authentication on the transaction data according to a private key corresponding to the digital identity information of the target user, wherein the target user is a user registered on the business chain.

3. The method according to claim 1, It is characterized in that The cross-chain system further includes a background management system. Before the business chain calls the communication protocol contract deployed on the business chain and sends the transaction data of the business chain to the anchor node of the base chain corresponding to the anchor node of the business chain through the anchor node of the business chain, the method further includes: The backend management system configures the IP address and port number of the anchor node of the service chain and the IP address and port number of the anchor node of the base chain; The backend management system deploys communication protocol contracts on the base chain and the business chain; The backend management system obtains information about the service chain and information about the base chain, wherein the information about the service chain at least includes information about the genesis unit of the service chain, information about the node of the service chain, and the IP address and port number of the anchor node of the service chain, and the information about the base chain at least includes information about the genesis unit of the base chain, information about the node of the base chain, and the IP address and port number of the anchor node of the base chain; The background management system writes the information of the service chain into the base chain, and writes the information of the base chain into the service chain.

4. The method according to claim 1, It is characterized in that The sending, through the anchor node of the service chain, the transaction data of the service chain to the anchor node of the base chain corresponding to the anchor node of the service chain, comprises: After each preset time, the business chain sends the transaction data generated within the preset time to the anchor node of the base chain corresponding to the anchor node of the business chain through the anchor node of the business chain.

5. The method according to claim 1, It is characterized in that The cross-chain system further includes a cross-chain gateway, and the method further includes: The cross-chain gateway monitors events on the base chain and the business chain; In the case where the event is a transaction request event, the cross-chain gateway forwards the transaction request to the corresponding business chain; In the case where the event is an account operation event, the cross-chain gateway performs the account operation within the cross-chain gateway according to the specific business corresponding to the account operation event, or the cross-chain gateway performs the account operation on the business chain corresponding to the account operation event according to the specific business corresponding to the account operation event; When the event is a block event, the cross-chain gateway performs event notification through the event manager registered on the cross-chain gateway.

6. The method according to claim 5, It is characterized in that The method further comprises: The cross-chain gateway obtains the transaction data of the business chain, and the transaction data at least includes block height, block hash, previous block hash, timestamp, transaction Merkle tree root, and ID of the business chain; The cross-chain gateway generates a transaction hash Merkel tree according to the transaction data of the business chain, and sends the transaction hash Merkel tree to the base chain storage; The base chain performs data verification on the transaction data of the business chain according to the transaction hash Merkle tree.

7. The method according to claim 1, It is characterized in that Before the base chain calls the communication protocol contract deployed on the base chain and sends the transaction data corresponding to the transaction data query request to the anchor node of the target business chain through the anchor node of the base chain, the method further includes: The base chain obtains information of a target account that initiates the transaction data query request; The base chain verifies the authority of the target account according to the information of the target account; When the target account authority verification is passed, the base chain calls the communication protocol contract deployed on the base chain, and sends the transaction data corresponding to the transaction data query request to the anchor node of the target business chain through the anchor node of the base chain.

8. A cross-chain system, It is characterized in that It includes a base chain and multiple business chains registered on the base chain, wherein the business chains include blockchains that are isomorphic to the base chain and blockchains that are heterogeneous to the base chain; The service chain is used to call the communication protocol contract deployed on the service chain, and send the transaction data of the service chain to the anchor node of the base chain corresponding to the anchor node of the service chain through the anchor node of the service chain, wherein the anchor node of the service chain stores the IP address and port number of the anchor node of the base chain corresponding to the anchor node of the service chain, and the anchor node of the base chain stores the IP address and port number of the anchor node of the service chain corresponding to the anchor node of the base chain; The base chain is used to synchronize the transaction data to all nodes of the base chain; The base chain is used to call the communication protocol contract deployed on the base chain when receiving a transaction data query request initiated by any target business chain in the cross-chain system, and send the transaction data corresponding to the transaction data query request to the anchor node of the target business chain through the anchor node of the base chain corresponding to the anchor node of the target business chain.

9. An electronic device, It is characterized in that It includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the cross-chain method as described in any one of claims 1 to 7 are implemented.

10. A readable storage medium, It is characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the cross-chain method according to any one of claims 1 to 7 are implemented.