Data cross-chain method, related equipment, media and products based on multiple blockchains

Through the collaboration of multi-blockchain structures and cross-chain programs, the problem of cross-chain data difficulties in the blockchain electronic invoice platform has been solved, and the secure transmission and storage optimization of data have been achieved.

CN117992534BActive Publication Date: 2025-09-23TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211306695.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-24
Publication Date
2025-09-23
Estimated Expiration
2042-10-24

AI Technical Summary

Technical Problem

The existing blockchain electronic invoice platform is unable to transfer the general business data on the application contract chain back to the bill chain without affecting the original business processing logic, resulting in difficulties in cross-chain data.

Method used

By deploying a multi-blockchain structure and utilizing the collaboration of cross-chain programs and consensus nodes, cross-chain transaction verification and resource mapping can be achieved, ensuring the secure and efficient transmission of data between different chains.

Benefits of technology

It reduces the complexity of data storage on the blockchain, improves data security, and enables effective cross-chain data transmission without affecting the original business logic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117992534B_ABST
    Figure CN117992534B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a data cross-chain method, related equipment, media, and products based on multiple blockchains, which can be applied to the field of blockchain technology. The method includes: receiving a first cross-chain transaction event sent by a target consensus node based on first cross-chain transaction detection information through a first cross-chain program; using a target transaction resource in a locked state as a first transfer transaction resource, verifying the first transfer transaction resource based on the first cross-chain transaction event, and when the verification is successful, constructing a first cross-chain construction transaction corresponding to the first cross-chain transaction based on the first transfer transaction resource; sending the first cross-chain construction transaction to a second consensus node associated with the first business processing subchain based on a second address on the first business processing subchain. The use of this application helps to realize cross-chain data transfer outside the chain for business data in general business scenarios, and can ensure the security of cross-chain data during cross-chain data transfer outside the chain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to a data cross-chain method, related equipment, media, and products based on multiple blockchains. Background Art

[0002] In some multi-blockchain application scenarios, such as a blockchain electronic invoice system based on a three-chain structure, cross-chain relays can be used to transfer data within the three chains. For example, when transferring data between the bill chain and the application contract chain within the three chains, the consensus node on the bill chain needs to send the target data (for example, invoice assets) currently being transferred to the target chain as a transaction to the cross-chain relay, so that the cross-chain relay can further forward the transaction to the consensus node associated with the target chain.

[0003] However, the inventors discovered in practice that because the bill chain involved in existing blockchain electronic invoice platforms is only used to process bill business, it is not possible to use some common business data on the application contract chain as the target data and then transfer it back to the bill chain through cross-chain relay. Based on this, the inventors believe that how to cross-chain data for some common business scenarios without affecting the original business processing logic of the three chains is a technical problem that needs to be solved urgently. Summary of the Invention

[0004] The embodiments of the present application provide a multi-blockchain data cross-chain method, related equipment, media, and products. By deploying multiple blockchains to store data separately, the complexity of data storage on each blockchain can be reduced. In addition, through the mutual collaboration between multiple blockchains, the security of data stored on each chain can be improved.

[0005] On the one hand, an embodiment of the present application provides a data cross-chain method based on multiple blockchains, which is executed by a cross-chain service terminal and includes:

[0006] Receiving, through the first cross-chain program, a first cross-chain transaction event sent by the target consensus node based on the first cross-chain transaction detection information; the first cross-chain transaction detection information is generated by the target consensus node when detecting that a target transaction resource for the first cross-chain transaction associated with the first business exists in the first address on the first chain, and the target transaction resource is in a locked state; the first cross-chain transaction is determined by the first consensus node associated with the first chain based on the target transaction resource submitted by the first business object, and the first cross-chain transaction is used to instruct the transfer of the target transaction resource from the first chain to the first business processing subchain;

[0007] The locked target transaction resource is used as the first transfer transaction resource. The first transfer transaction resource is verified based on the first cross-chain transaction event. When the verification is successful, a first cross-chain constructed transaction corresponding to the first cross-chain transaction is constructed based on the first transfer transaction resource.

[0008] The second address on the first business processing subchain is determined through the first cross-chain program, and the first cross-chain construction transaction is sent to the second consensus node associated with the first business processing subchain based on the second address, so that the second consensus node casts a target transaction mapping resource corresponding to the first cross-chain construction transaction on the first business processing subchain through the second address; the target transaction mapping resource has the same resource data content as the target transaction resource.

[0009] The target consensus node includes N management components associated with the first address, where N is a positive integer; one management component is configured to generate one transaction detection information in the first cross-chain transaction detection information when detecting the presence of the first transfer transaction resource in the first address; one transaction detection information in the first cross-chain transaction detection information corresponds to one transaction event in the first cross-chain transaction event;

[0010] The first transfer transaction resource is verified based on the first cross-chain transaction event, and when the verification is successful, a first cross-chain constructed transaction corresponding to the first cross-chain transaction is constructed based on the first transfer transaction resource, including:

[0011] Determining a first event number of transaction events associated with the N management components from the received first cross-chain transaction event; the first event number is determined by the number of transaction detection information in the first cross-chain transaction detection information associated with the N management components; the first event number is less than or equal to N;

[0012] When the number of first events reaches an event number threshold in N, acquiring transaction detection information corresponding to a number of information equal to the number of first events;

[0013] Using the transaction resource associated with each transaction detection information in the obtained first cross-chain transaction detection information as the first detection resource, performing transaction comparison on each first detection resource to obtain a first transaction comparison result;

[0014] If the first transaction comparison result indicates a successful comparison, verification success indication information is generated to determine that each of the first detection resources is a first transfer transaction resource. When verification is determined to be successful based on the verification success indication information, a first cross-chain construction transaction corresponding to the first cross-chain transaction is constructed based on the first transfer transaction resource.

[0015] The first cross-chain constructed transaction corresponding to the first cross-chain transaction is constructed based on the first transfer transaction resource, including:

[0016] Obtaining dependent data information corresponding to the first transfer transaction resource from the first chain;

[0017] The dependent data information is verified, and when the information verification succeeds, a first cross-chain constructed transaction corresponding to the first cross-chain transaction is constructed based on the dependent data information and the first transfer transaction resource.

[0018] The first chain is deployed with a first universal resource cross-chain bridge contract for data interaction with the first cross-chain program; the first universal resource cross-chain bridge contract is used to instruct the first consensus node to specify the resource usage of the target transaction resource corresponding to the first cross-chain exchange when transferring the target transaction resource to the first address; the dependent data information includes the resource usage;

[0019] Constructing a first cross-chain constructed transaction corresponding to the first cross-chain transaction based on the dependent data information and the first transfer transaction resource, including:

[0020] The resource usage and the first transfer transaction resource are used as transaction parameters, and a first cross-chain construction transaction corresponding to the first cross-chain transaction is constructed based on the transaction parameters.

[0021] Among them, the second address is deployed with the contract name and contract address for calling the resource mapping contract on the first business processing subchain; the second consensus node is used to call the resource mapping contract through the contract name and contract address in the second address when obtaining the first cross-chain construction transaction, and mint the target transaction mapping resource corresponding to the first cross-chain construction transaction on the first business processing subchain.

[0022] The second address is determined by the second private key in the first cross-chain program; the second private key is generated by the master key in the first cross-chain program; the master key is determined by the trusted execution environment in which the first cross-chain program is located; and the method further includes:

[0023] Sign the first cross-chain constructed transaction using the second private key in the first cross-chain program to obtain transaction signature information of the first cross-chain constructed transaction;

[0024] When the first cross-chain construction transaction is sent to the second consensus node associated with the first business processing sub-chain, the transaction signature information of the first cross-chain construction transaction is synchronously sent to the second consensus node, so that the second consensus node verifies the transaction signature information based on the second public key corresponding to the second private key, and when the transaction verification is successful, the first cross-chain construction transaction is obtained.

[0025] The method further includes:

[0026] Receiving, through the first cross-chain program, a second cross-chain transaction event sent by the target consensus node based on the second cross-chain transaction detection information; the second cross-chain transaction detection information is generated by the target consensus node when detecting that a target transaction mapping resource for a second cross-chain transaction associated with the first business exists in a second address on the first business processing subchain, and the target transaction mapping resource is in a destroyed state; the second cross-chain transaction is determined by the second consensus node based on the target transaction mapping resource submitted by the first business object, and the second cross-chain transaction is used to instruct the target transaction mapping resource to be transferred from the first business processing subchain back to the first chain;

[0027] The target transaction mapping resource in the destroyed state is used as the second transfer transaction resource, and the second transfer transaction resource is verified based on the second cross-chain transaction event. When the verification is successful, a second cross-chain constructed transaction corresponding to the second cross-chain transaction is constructed based on the second transfer transaction resource;

[0028] The first address is determined through the first cross-chain program, and the second cross-chain constructed transaction is sent to the first consensus node based on the first address, so that the first consensus node unlocks the first transfer transaction resource on the first chain through the first address to obtain the target transaction resource.

[0029] The target consensus node includes N management components associated with the second address, where N is a positive integer; one management component is configured to generate one transaction detection information in the second cross-chain transaction detection information when detecting the presence of a second transfer transaction resource in the second address; one transaction detection information in the second cross-chain transaction detection information corresponds to one transaction event in the second cross-chain transaction event;

[0030] The second transfer transaction resource is verified based on the second cross-chain transaction event, and when the verification is successful, a second cross-chain constructed transaction corresponding to the second cross-chain transaction is constructed based on the second transfer transaction resource, including:

[0031] Determining a second event number of transaction events associated with the N management components from the received second cross-chain transaction event; the second event number is determined by the number of transaction detection information in the second cross-chain transaction detection information associated with the N management components; the second event number is less than or equal to N;

[0032] When the number of second events reaches an event number threshold in N, acquiring transaction detection information corresponding to a number of information equal to the number of second events;

[0033] Using the transaction resource associated with each transaction detection information in the obtained second cross-chain transaction detection information as the second detection resource, performing transaction comparison on each second detection resource to obtain a second transaction comparison result;

[0034] If the second transaction comparison result indicates that the comparison is successful, verification success indication information is generated to determine that each second detection resource is a second transfer transaction resource. When the verification is successful based on the verification success indication information, a second cross-chain construction transaction corresponding to the second cross-chain transaction is constructed based on the second transfer transaction resource.

[0035] The source data chain includes the second chain; the trusted cross-chain program that interacts with the second chain is the second cross-chain program; the business processing subchain includes the second business processing subchain, and the second business processing subchain is created by the target consensus node according to the second business associated with the second business object; and the method further includes:

[0036] Receiving, through the second cross-chain program, a third cross-chain transaction event sent by the target consensus node based on the third cross-chain transaction detection information; the third cross-chain transaction detection information is generated by the target consensus node when detecting that a target bill resource for a third cross-chain transaction associated with the second business exists in a third address on the second chain, and the target bill resource is in a locked state; the third cross-chain transaction is determined by the third consensus node associated with the second chain based on the target bill resource submitted by the second business object, and the third cross-chain transaction is used to instruct the transfer of the target bill resource from the second chain to the second business processing subchain;

[0037] The locked target bill resource is used as the first transfer bill resource, and the first transfer bill resource is verified based on the third cross-chain transaction event. If the verification is successful, a third cross-chain constructed transaction corresponding to the third cross-chain transaction is constructed based on the first transfer bill resource.

[0038] A fourth address on the second business processing subchain is determined through the second cross-chain program, and a third cross-chain construction transaction is sent to a fourth consensus node associated with the second business processing subchain based on the fourth address, so that the fourth consensus node mints a target bill mapping resource corresponding to the third cross-chain construction transaction on the second business processing subchain through the fourth address; the target bill mapping resource has the same resource data content as the target bill resource.

[0039] The method further includes:

[0040] Receiving, through the second cross-chain program, a fourth cross-chain transaction event sent by the target consensus node based on the fourth cross-chain transaction detection information; the fourth cross-chain transaction detection information is generated by the target consensus node when detecting that a target bill mapping resource for a fourth cross-chain transaction associated with the second business exists at a fourth address on the second business processing subchain, and the target bill mapping resource is in a destroyed state; the fourth cross-chain transaction is determined by the fourth consensus node based on the target bill mapping resource submitted by the second business object, and the fourth cross-chain transaction is used to instruct the target bill mapping resource to be transferred from the second business processing subchain back to the second chain;

[0041] The target bill mapping resource in the destroyed state is used as the second transfer bill resource, and the second transfer bill resource is verified based on the fourth cross-chain transaction event. When the verification is successful, a fourth cross-chain constructed transaction corresponding to the fourth cross-chain transaction is constructed based on the second transfer bill resource;

[0042] The third address is determined through the second cross-chain program, and the fourth cross-chain constructed transaction is sent to the third consensus node based on the third address, so that the third consensus node unlocks the first transferred bill resource on the second chain through the third address to obtain the target bill resource.

[0043] The first address is determined by the first private key in the first cross-chain program; the second address is determined by the second private key in the first cross-chain program; both the first private key and the second private key are generated from the master key in the first cross-chain program; the first private key is different from the second private key; the target consensus node includes N management components; N is a positive integer;

[0044] The method also includes:

[0045] Split the master key to obtain N key fragments corresponding to N management components; one management component corresponds to one key fragment;

[0046] N key fragments are sent to the target consensus node, so that the target consensus node configures a key fragment for each of the N management components; one management component is used to perform key backup for one key fragment.

[0047] The method further includes:

[0048] When the trusted cross-chain program is restarted, it receives M key fragments sent by the target consensus node; one of the M key fragments comes from one of the N management components; M is a positive integer less than or equal to N;

[0049] When M reaches the key quantity threshold corresponding to N, the master key is constructed based on M key fragments.

[0050] On the one hand, an embodiment of the present application provides a data cross-chain method based on multiple blockchains, wherein the method is executed by a second consensus node associated with a first business processing sub-chain, and the method includes:

[0051] Obtain a first cross-chain constructed transaction sent by the first cross-chain program based on the second address on the first business processing subchain; the first cross-chain constructed transaction is constructed by the first cross-chain program when verifying the transfer transaction resource based on the first cross-chain transaction event sent by the target consensus node, and the verification is successful; the transfer transaction resource is a target transaction resource in a locked state; the first cross-chain transaction event is sent by the target consensus node based on the first cross-chain transaction detection information; the first cross-chain transaction detection information is generated by the target consensus node when it detects that the target transaction resource of the first cross-chain transaction associated with the first business exists in the first address on the first chain, and the target transaction resource is in a locked state; the first cross-chain transaction is determined by the first consensus node associated with the first chain based on the target transaction resource submitted by the first business object, and the first cross-chain transaction is used to indicate that the target transaction resource is transferred from the first chain to the first business processing subchain;

[0052] The resource mapping contract used for resource mapping is determined through the second address, and the resource mapping contract is called to cast the target transaction mapping resource corresponding to the first cross-chain construction transaction on the first business processing subchain, and the target transaction mapping resource is written to the second address; the target transaction mapping resource and the target transaction resource have the same resource data content.

[0053] On the one hand, an embodiment of the present application provides a data cross-chain method based on multiple blockchains, which is executed by a target consensus node associated with a target chain, and the method includes:

[0054] First cross-chain transaction detection information generated when it is detected that a target transaction resource of a first cross-chain transaction associated with a first business exists in a first address on a first chain, and the target transaction resource is in a locked state;

[0055] A first cross-chain transaction event for sending to the first cross-chain program is determined based on the first cross-chain transaction detection information, and the first cross-chain transaction event is sent to the first cross-chain program, so that the first cross-chain program verifies the transfer transaction resource based on the first cross-chain transaction event, and when the verification is successful, a first cross-chain constructed transaction corresponding to the first cross-chain transaction for sending to the second consensus node associated with the first business processing subchain is constructed based on the transfer transaction resource; the transfer transaction resource is a target transaction resource in a locked state; the second consensus node is used to cast a target transaction mapping resource corresponding to the first cross-chain constructed transaction on the first business processing subchain through the second address when obtaining the first cross-chain constructed transaction sent by the first cross-chain program based on the second address on the first business processing subchain; the target transaction mapping resource has the same resource data content as the target transaction resource.

[0056] On one hand, an embodiment of the present application provides a data cross-chain device based on multiple blockchains, the device running on a cross-chain service terminal, and the device including:

[0057] An event receiving module, configured to receive, through a first cross-chain program, a first cross-chain transaction event sent by a target consensus node based on first cross-chain transaction detection information; the first cross-chain transaction detection information is generated by the target consensus node when detecting that a target transaction resource for a first cross-chain transaction associated with a first business exists in a first address on the first chain, and the target transaction resource is in a locked state; the first cross-chain transaction is determined by the first consensus node associated with the first chain based on the target transaction resource submitted by the first business object, and the first cross-chain transaction is used to instruct the transfer of the target transaction resource from the first chain to the first business processing subchain;

[0058] a data processing module, configured to use the locked target transaction resource as a first transfer transaction resource, verify the first transfer transaction resource based on the first cross-chain transaction event, and upon successful verification, construct a first cross-chain constructed transaction corresponding to the first cross-chain transaction based on the first transfer transaction resource;

[0059] The data sending module is used to determine the second address on the first business processing subchain through the first cross-chain program, and send the first cross-chain construction transaction to the second consensus node associated with the first business processing subchain based on the second address, so that the second consensus node mints the target transaction mapping resource corresponding to the first cross-chain construction transaction on the first business processing subchain through the second address; the target transaction mapping resource has the same resource data content as the target transaction resource.

[0060] The target consensus node includes N management components associated with the first address, where N is a positive integer; one management component is configured to generate one transaction detection information in the first cross-chain transaction detection information when detecting the presence of the first transfer transaction resource in the first address; one transaction detection information in the first cross-chain transaction detection information corresponds to one transaction event in the first cross-chain transaction event;

[0061] The data processing module includes:

[0062] an event number determining unit, configured to determine a first event number of transaction events associated with the N management components from the received first cross-chain transaction event; the first event number is determined by the number of transaction detection information in the first cross-chain transaction detection information associated with the N management components; the first event number is less than or equal to N;

[0063] a transaction detection information acquisition unit, configured to acquire transaction detection information corresponding to a number of information equal to the number of first events when the number of first events reaches an event number threshold in N;

[0064] a transaction comparison unit, configured to use the transaction resource associated with each transaction detection information in the obtained first cross-chain transaction detection information as a first detection resource, perform transaction comparison on each first detection resource, and obtain a first transaction comparison result;

[0065] The transaction verification unit is configured to generate verification success indication information for determining that each of the first detection resources is a first transfer transaction resource if the first transaction comparison result indicates a successful comparison; and when verification is determined to be successful based on the verification success indication information, construct a first cross-chain constructed transaction corresponding to the first cross-chain transaction based on the first transfer transaction resource.

[0066] The transaction verification unit includes:

[0067] A dependency data acquisition unit, configured to acquire dependency data information corresponding to the first transfer transaction resource from the first chain;

[0068] The information verification unit is configured to verify the dependent data information and, when the information verification succeeds, construct a first cross-chain constructed transaction corresponding to the first cross-chain transaction based on the dependent data information and the first transfer transaction resource.

[0069] The first chain is deployed with a first universal resource cross-chain bridge contract for data interaction with the first cross-chain program; the first universal resource cross-chain bridge contract is used to instruct the first consensus node to specify the resource usage of the target transaction resource corresponding to the first cross-chain exchange when transferring the target transaction resource to the first address; the dependent data information includes the resource usage;

[0070] The information verification unit is further configured to use the resource usage and the first transfer transaction resource as transaction parameters, and construct a first cross-chain construction transaction corresponding to the first cross-chain transaction based on the transaction parameters.

[0071] Among them, the second address is deployed with the contract name and contract address for calling the resource mapping contract on the first business processing subchain; the second consensus node is used to call the resource mapping contract through the contract name and contract address in the second address when obtaining the first cross-chain construction transaction, and mint the target transaction mapping resource corresponding to the first cross-chain construction transaction on the first business processing subchain.

[0072] The second address is determined by the second private key in the first cross-chain program; the second private key is generated by the master key in the first cross-chain program; the master key is determined by the trusted execution environment in which the first cross-chain program is located;

[0073] Among them, the data sending module includes:

[0074] A transaction signing unit, configured to sign the first cross-chain constructed transaction using the second private key in the first cross-chain program to obtain transaction signature information of the first cross-chain constructed transaction;

[0075] The signature sending unit is used to synchronously send the transaction signature information of the first cross-chain construction transaction to the second consensus node when sending the first cross-chain construction transaction to the second consensus node associated with the first business processing sub-chain, so that the second consensus node verifies the transaction signature information based on the second public key corresponding to the second private key, and obtains the first cross-chain construction transaction when the transaction verification is successful.

[0076] Among them, the event receiving module is further used to receive, through the first cross-chain program, a second cross-chain transaction event sent by the target consensus node based on the second cross-chain transaction detection information; the second cross-chain transaction detection information is generated by the target consensus node when detecting that the second address on the first business processing subchain contains a target transaction mapping resource for the second cross-chain transaction associated with the first business, and the target transaction mapping resource is in a destroyed state; the second cross-chain transaction is determined by the second consensus node based on the target transaction mapping resource submitted by the first business object, and the second cross-chain transaction is used to instruct the target transaction mapping resource to be transferred from the first business processing subchain back to the first chain;

[0077] The data processing module is further configured to use the target transaction mapping resource in the destroyed state as the second transfer transaction resource, verify the second transfer transaction resource based on the second cross-chain transaction event, and construct a second cross-chain constructed transaction corresponding to the second cross-chain transaction based on the second transfer transaction resource when the verification is successful;

[0078] The data sending module is further used to determine the first address through the first cross-chain program, and send the second cross-chain constructed transaction to the first consensus node based on the first address, so that the first consensus node unlocks the first transfer transaction resource on the first chain through the first address to obtain the target transaction resource.

[0079] The target consensus node includes N management components associated with the second address, where N is a positive integer; one management component is configured to generate one transaction detection information in the second cross-chain transaction detection information when detecting the presence of a second transfer transaction resource in the second address; one transaction detection information in the second cross-chain transaction detection information corresponds to one transaction event in the second cross-chain transaction event;

[0080] The data processing module includes:

[0081] The event quantity determining unit is further configured to determine a second event quantity of transaction events associated with the N management components from the received second cross-chain transaction event; the second event quantity is determined by the quantity of transaction detection information in the second cross-chain transaction detection information associated with the N management components; the second event quantity is less than or equal to N;

[0082] The transaction detection information acquisition unit is further configured to acquire transaction detection information corresponding to a number of information equal to the number of second events when the number of second events reaches an event number threshold in N;

[0083] The transaction comparison unit is further configured to use the transaction resource associated with each transaction detection information in the obtained second cross-chain transaction detection information as a second detection resource, perform transaction comparison on each second detection resource, and obtain a second transaction comparison result;

[0084] The transaction verification unit is further configured to generate verification success indication information for determining that each second detection resource is a second transfer transaction resource if the second transaction comparison result indicates a successful comparison; and when the verification is determined to be successful based on the verification success indication information, construct a second cross-chain constructed transaction corresponding to the second cross-chain transaction based on the second transfer transaction resource.

[0085] The source data chain includes the second chain; the trusted cross-chain program that interacts with the second chain is the second cross-chain program; the business processing subchain includes the second business processing subchain, and the second business processing subchain is created by the target consensus node based on the second business associated with the second business object;

[0086] The event receiving module is further configured to receive, through the second cross-chain program, a third cross-chain transaction event sent by the target consensus node based on the third cross-chain transaction detection information; the third cross-chain transaction detection information is generated by the target consensus node when detecting that a target bill resource for a third cross-chain transaction associated with the second business exists in a third address on the second chain, and the target bill resource is in a locked state; the third cross-chain transaction is determined by the third consensus node associated with the second chain based on the target bill resource submitted by the second business object, and the third cross-chain transaction is used to instruct the transfer of the target bill resource from the second chain to the second business processing subchain;

[0087] The data processing module is further configured to use the locked target bill resource as the first transfer bill resource, verify the first transfer bill resource based on the third cross-chain transaction event, and upon successful verification, construct a third cross-chain constructed transaction corresponding to the third cross-chain transaction based on the first transfer bill resource;

[0088] The data processing module is further configured to determine, through a second cross-chain program, a fourth address on the second business processing subchain, and send, based on the fourth address, a third cross-chain construction transaction to a fourth consensus node associated with the second business processing subchain, so that the fourth consensus node mints a target bill mapping resource corresponding to the third cross-chain construction transaction on the second business processing subchain through the fourth address; the target bill mapping resource and the target bill resource have the same resource data content.

[0089] The event receiving module is further configured to receive, through the second cross-chain program, a fourth cross-chain transaction event sent by the target consensus node based on the fourth cross-chain transaction detection information; the fourth cross-chain transaction detection information is generated by the target consensus node when detecting that a target bill mapping resource for a fourth cross-chain transaction associated with the second business exists in a fourth address on the second business processing subchain, and the target bill mapping resource is in a destroyed state; the fourth cross-chain transaction is determined by the fourth consensus node based on the target bill mapping resource submitted by the second business object, and the fourth cross-chain transaction is used to instruct the target bill mapping resource to be transferred from the second business processing subchain back to the second chain;

[0090] The data processing module is further configured to use the target bill mapping resource in the destroyed state as the second transfer bill resource, verify the second transfer bill resource based on the fourth cross-chain transaction event, and upon successful verification, construct a fourth cross-chain constructed transaction corresponding to the fourth cross-chain transaction based on the second transfer bill resource;

[0091] The data processing module determines the third address through the second cross-chain program, and sends the fourth cross-chain constructed transaction to the third consensus node based on the third address, so that the third consensus node unlocks the first transferred bill resource on the second chain through the third address to obtain the target bill resource.

[0092] The first address is determined by the first private key in the first cross-chain program; the second address is determined by the second private key in the first cross-chain program; both the first private key and the second private key are generated from the master key in the first cross-chain program; the first private key is different from the second private key; the target consensus node includes N management components; N is a positive integer;

[0093] The data processing module includes:

[0094] A key splitting unit is used to split the master key to obtain N key fragments corresponding to N management components; one management component corresponds to one key fragment;

[0095] A key sending unit is used to send N key fragments to the target consensus node, so that the target consensus node configures a key fragment for each of the N management components; one management component is used to perform key backup for one key fragment.

[0096] The data processing module includes:

[0097] The key receiving unit is used to receive M key fragments sent by the target consensus node when the trusted cross-chain program is restarted; one of the M key fragments comes from one of the N management components; M is a positive integer less than or equal to N;

[0098] The key receiving unit is used to construct a master key based on M key fragments when M reaches a key quantity threshold corresponding to N.

[0099] On the one hand, an embodiment of the present application provides a data cross-chain device based on multiple blockchains, the device running on a second consensus node associated with a first business processing sub-chain, the device comprising:

[0100] A cross-chain construction transaction acquisition module is used to obtain a first cross-chain construction transaction sent by the first cross-chain program based on the second address on the first business processing subchain; the first cross-chain construction transaction is constructed by the first cross-chain program when verifying the transfer transaction resource based on the first cross-chain transaction event sent by the target consensus node, and the verification is successful; the transfer transaction resource is a target transaction resource in a locked state; the first cross-chain transaction event is sent by the target consensus node based on the first cross-chain transaction detection information; the first cross-chain transaction detection information is generated by the target consensus node when it detects that the target transaction resource of the first cross-chain transaction associated with the first business exists in the first address on the first chain, and the target transaction resource is in a locked state; the first cross-chain transaction is determined by the first consensus node associated with the first chain based on the target transaction resource submitted by the first business object, and the first cross-chain transaction is used to indicate that the target transaction resource is transferred from the first chain to the first business processing subchain;

[0101] The resource casting module is used to determine the resource mapping contract used for resource mapping through the second address, call the resource mapping contract to cast the target transaction mapping resource corresponding to the first cross-chain construction transaction on the first business processing subchain, and write the target transaction mapping resource to the second address; the target transaction mapping resource and the target transaction resource have the same resource data content.

[0102] On one hand, an embodiment of the present application provides a data cross-chain device based on multiple blockchains, the device running on a target consensus node associated with a target chain, and the device including:

[0103] a transaction detection module, configured to generate first cross-chain transaction detection information when detecting that a target transaction resource of a first cross-chain transaction associated with a first business exists in a first address on a first chain and that the target transaction resource is in a locked state;

[0104] A cross-chain transaction event sending unit is configured to determine, based on the first cross-chain transaction detection information, a first cross-chain transaction event to be sent to the first cross-chain program, and send the first cross-chain transaction event to the first cross-chain program, so that the first cross-chain program verifies the transfer transaction resource based on the first cross-chain transaction event, and when the verification is successful, constructs a first cross-chain constructed transaction corresponding to the first cross-chain transaction to be sent to the second consensus node associated with the first business processing subchain based on the transfer transaction resource; the transfer transaction resource is a target transaction resource in a locked state; the second consensus node is configured to, upon obtaining the first cross-chain constructed transaction sent by the first cross-chain program based on the second address on the first business processing subchain, cast a target transaction mapping resource corresponding to the first cross-chain constructed transaction on the first business processing subchain through the second address; the target transaction mapping resource has the same resource data content as the target transaction resource.

[0105] On the one hand, an embodiment of the present application provides a data cross-chain system based on multiple blockchains, the system including: a target consensus node associated with a target chain, a cross-chain service terminal, a first consensus node associated with a first chain, and a first consensus node associated with a first business processing subchain; the cross-chain service terminal is used to isolate the source data chain and the business processing subchain in the multiple blockchains; the trusted cross-chain program for data interaction with the first chain is the first cross-chain program; the first business processing subchain is created by the target consensus node associated with the target chain in the multiple blockchains according to the first business associated with the first business object;

[0106] A target consensus node is configured to send a first cross-chain transaction event based on the first cross-chain transaction detection information; the first cross-chain transaction detection information is generated by the target consensus node when it detects that a target transaction resource for a first cross-chain transaction associated with a first business exists in a first address on the first chain, and the target transaction resource is in a locked state;

[0107] A first consensus node is configured to determine a first cross-chain transaction based on the target transaction resources submitted by the first business object, where the first cross-chain transaction is configured to instruct the transfer of the target transaction resources from the first chain to the first business processing subchain;

[0108] The cross-chain service terminal is configured to receive, through the first cross-chain program, a first cross-chain transaction event sent by the target consensus node based on the first cross-chain transaction detection information;

[0109] The cross-chain service terminal is further configured to use the locked target transaction resource as a first transfer transaction resource, verify the first transfer transaction resource based on the first cross-chain transaction event, and upon successful verification, construct a first cross-chain constructed transaction corresponding to the first cross-chain transaction based on the first transfer transaction resource;

[0110] The cross-chain service terminal is further configured to determine a second address on the first business processing subchain through the first cross-chain program, and send the first cross-chain constructed transaction to a second consensus node associated with the first business processing subchain based on the second address;

[0111] The second consensus node is used to mint a target transaction mapping resource corresponding to the first cross-chain constructed transaction on the first business processing subchain through the second address; the target transaction mapping resource has the same resource data content as the target transaction resource.

[0112] In one aspect, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory is connected to the processor, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method provided in the above aspect of the embodiment of the present application.

[0113] On one hand, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. The computer program is suitable for being loaded and executed by a processor, so that a computer device with a processor executes the method provided in the above aspect of the embodiment of the present application.

[0114] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in the above aspect.

[0115] In an embodiment of the present application, the multi-blockchain may include a source data chain (i.e., an application contract chain and a bill chain) and a management chain under a three-chain system, and may also include a business processing subchain temporarily generated based on the business for business processing. The business processing subchain is an external blockchain relative to the three-chain system. This solution can realize data cross-chain between the source data chain (e.g., the application contract chain) and the chain outside (i.e., the business processing subchain) by deploying a cross-chain service terminal with a trusted cross-chain program. That is, the cross-chain service terminal can receive a first cross-chain transaction event sent by a management consensus node associated with the management chain through a trusted cross-chain program, and use the target transaction resource in a locked state in the first address on the source data chain, such as the application contract chain, as a transfer transaction resource, thereby constructing a corresponding cross-chain construction transaction based on the transfer transaction resource, and then determine the second address on the business processing subchain, such as the first business processing subchain, through the trusted cross-chain program, and send the cross-chain construction transaction to the consensus node associated with the business processing subchain based on the second address to realize data cross-chain for the target transaction resource. In this way, the business data in general business scenarios can be cross-chained outside the chain through the trusted cross-chain program in the cross-chain service terminal. The trusted cross-chain program is in a trusted execution environment and can verify cross-chain transactions, thereby ensuring the correctness of cross-chain data. By deploying multiple blockchains to store data separately, the complexity of data storage on each blockchain can be reduced. In addition, through the mutual cooperation between multiple blockchains, the security of data stored on each chain can also be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0116] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0117] Figure 1 This is a schematic diagram of the hierarchical structure of a blockchain network provided in an embodiment of the present application;

[0118] Figure 2 This is a schematic diagram of a scenario of a blockchain electronic invoice system based on multiple blockchains provided in an embodiment of the present application;

[0119] Figure 3 This is a structural diagram of a data cross-chain processing system based on multiple blockchains provided in an embodiment of the present application;

[0120] Figure 4 This is a schematic diagram of a multi-blockchain data cross-chain processing process provided by an embodiment of the present application;

[0121] Figure 5This is a flowchart of a data cross-chain method based on multiple blockchains provided in an embodiment of the present application;

[0122] Figure 6 This is a multi-blockchain data processing method provided by an embodiment of the present application;

[0123] Figure 7 This is a schematic diagram of a multi-blockchain data cross-chain processing process provided by an embodiment of the present application;

[0124] Figure 8 This is a flowchart of a data cross-chain method based on multiple blockchains provided in an embodiment of the present application;

[0125] Figure 9 This is a flowchart of a data cross-chain method based on multiple blockchains provided in an embodiment of the present application;

[0126] Figure 10 This is a schematic diagram of the structure of a data cross-chain device based on multiple blockchains provided by this application;

[0127] Figure 11 This is a schematic diagram of the structure of a data cross-chain device based on multiple blockchains provided by this application;

[0128] Figure 12 This is a schematic diagram of the structure of a data cross-chain device based on multiple blockchains provided by this application;

[0129] Figure 13 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application;

[0130] Figure 14 This is a schematic diagram of a multi-blockchain data processing system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0131] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0132] See Figure 1 , Figure 1 This is a schematic diagram of the hierarchical structure of a blockchain network provided by an embodiment of the present application. Figure 1 The hierarchical structure shown is applied to the blockchain electronic bill system. The blockchain network corresponding to the blockchain electronic bill system includes a business network deployed in the public network and multiple consensus networks deployed in the private cloud. Figure 1As shown, the business network here can be Figure 1 The business network 100a shown, and the multiple consensus networks here can specifically include Figure 1 Consensus network 100a, consensus network 200a, and consensus network 300a are shown.

[0133] In such Figure 1 In the service network 400a shown, multiple service nodes are deployed. The multiple service nodes here may specifically include Figure 1 The service nodes shown are 110a, 110b, 110c, 110d, 110e, 110f, 110g, ..., 110n. It should be noted that the number of service nodes deployed in the service network 400a is not limited. It should be understood that the service nodes in the service network 400a do not need to participate in accounting. In addition, Figure 1 As shown, each business node running in the business network 400a can access one or more of the aforementioned consensus networks through network communication. There is no limit on the number of consensus networks that each business object can access through a corresponding business node. It is understood that data can also be exchanged between consensus networks through network communication.

[0134] It should be understood that in Figure 1 In the consensus network 100a shown, multiple consensus nodes are deployed. The multiple consensus nodes here can specifically include Figure 1 The consensus nodes 10a, 10b, 10c and 10d are shown. It should be noted that the number of consensus nodes deployed in the consensus network 100a is not limited. Figure 1 As shown, for multiple consensus nodes running in the consensus network 100a, the blockchain they jointly maintain is specifically Figure 1 Blockchain 10e is shown.

[0135] Similarly, in Figure 1 In the consensus network 200a shown, multiple consensus nodes are deployed. The multiple consensus nodes here can specifically include Figure 1 The consensus nodes 11a, 11b, 11c and 11d are shown. It should be noted that the number of consensus nodes deployed in the consensus network 200a is not limited here. Figure 1 As shown, for multiple consensus nodes running in the consensus network 200a, the blockchain maintained together is specifically Figure 1 Blockchain 11e is shown.

[0136] By analogy, in Figure 1 In the consensus network 300a shown, multiple consensus nodes are deployed. The multiple consensus nodes here can specifically include Figure 1 The consensus nodes 12a, 12b, 12c and 12d are shown. It should be noted that the number of consensus nodes deployed in the consensus network 300a is not limited here. Figure 1 As shown, for multiple consensus nodes running in the consensus network 300a, the blockchain maintained together is specifically Figure 1 Blockchain 12e is shown.

[0137] For ease of understanding, the embodiments of the present application may collectively refer to the business nodes and consensus nodes located in the above-mentioned blockchain electronic invoice system as blockchain nodes (referred to as nodes for short), and may collectively refer to the consensus network 100a, consensus network 100b and consensus network 100c participating in the above-mentioned blockchain electronic invoice system as the core consensus network, and may collectively refer to the various nodes in the above-mentioned core consensus network as core nodes.

[0138] It should be understood that the blockchain involved in the embodiments of this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. It is primarily used to organize data in chronological order and encrypt it into a ledger to make it tamper-proof and forge-proof, while also enabling data verification, storage, and updates. Blockchain is essentially a decentralized database in which each node stores an identical blockchain.

[0139] For example, the blockchain stored on each node in the consensus network 100a (for example, core nodes such as consensus node 10a, consensus node 10b, consensus node 10c and consensus node 10d) is blockchain 10e. The blockchain 10e here can be the management chain (also called the target chain) in the above-mentioned blockchain electronic bill system, and the core consensus network corresponding to the management chain (i.e., consensus network 100a) can be a management chain network (also called the target chain network). The consensus nodes (or core nodes) in the management chain network can be collectively referred to as management consensus nodes (also called target consensus nodes). For another example, the blockchain stored on each node in the consensus network 200a (for example, core nodes such as consensus node 11a, consensus node 11b, consensus node 11c and consensus node 11d) is blockchain 11e. The blockchain 11e here can be the bill chain (also called the second chain) in the above-mentioned blockchain electronic bill system, and the core consensus network corresponding to the bill chain (i.e., consensus network 200a) can be the bill chain network (also called the second chain network). The consensus nodes (or core nodes) in the bill chain network can be collectively referred to as bill consensus nodes (also called third consensus nodes). For another example, the blockchain stored on each node in the consensus network 300a (for example, core nodes such as consensus node 12a, consensus node 12b, consensus node 21c and consensus node 12d) is blockchain 12e. The blockchain 12e here can be the application contract chain (also known as the first chain) in the above-mentioned blockchain electronic bill system, and the core consensus network corresponding to the application contract chain (i.e., consensus network 300a) can be an application contract chain network (also known as the first chain network). The consensus nodes (or core nodes) in the application contract chain network can be collectively referred to as application consensus nodes (also known as first consensus nodes).

[0140] In the above-mentioned blockchain electronic invoice system, the core node can be responsible for consensus in the core consensus network where the corresponding blockchain is located. In other words, the core node can be a consensus node in the core consensus network where the corresponding blockchain is located. For any of the three core consensus networks mentioned above, the specific process of writing transaction data in the core consensus network into the corresponding blockchain ledger (e.g., a distributed database) can be: the user client sends transaction data to a business node, and then the transaction data is passed between business nodes in the business network within the above-mentioned blockchain network in a relay manner until the consensus node in the corresponding core consensus network within the above-mentioned blockchain network (e.g., consensus node 11b in consensus network 200a) receives the transaction data. At this time, the consensus node (e.g., consensus node 11b in consensus network 200a) then packages the transaction data into a block so that it can subsequently reach consensus with other consensus nodes. After the consensus is passed, the consensus-passed block can be written into the distributed database of its own core consensus network (e.g., consensus network 200a).

[0141] Optionally, it is understandable that, after consensus is passed, the embodiment of the present application can also write the block carrying the transaction data and multiple other blocks associated with the block into a distributed database in parallel through the storage layer of its own core consensus network (for example, consensus network 200a). This can fundamentally break through the limitations of the blockchain structure of the blockchain, and thus effectively improve the storage efficiency of data storage.

[0142] It is understood that in the aforementioned blockchain electronic invoice system, a smart contract can be deployed on the blockchain of the corresponding core consensus network. In the blockchain electronic invoice system, such a smart contract can be understood as a code executed by each blockchain node (i.e., each consensus node). Through such a smart contract, arbitrary logic can be executed and results can be obtained. For example, a user can initiate a transaction request through a user client to invoke a smart contract deployed on the blockchain (e.g., the aforementioned blockchain 11e) of the corresponding core consensus network (e.g., the aforementioned consensus network 200a).

[0143] Specifically, the business node in the business network can send the transaction business request to the consensus node in the corresponding core consensus network (for example, Figure 1 The consensus node 11a shown in the figure authenticates the user who sent the transaction request through the chain entrance of the corresponding core consensus network, and allows the transaction request sent by the user to be sent to other consensus nodes in the corresponding core consensus network (for example, Figure 1 Consensus nodes 11b shown) to call these consensus nodes (e.g., Figure 1 The smart contracts running in the consensus nodes 11a and 11b shown execute the transaction business requested by the user.

[0144] It should be understood that one or more smart contracts can be deployed on the blockchain (e.g., the blockchain 11e) of the above-mentioned core consensus network (e.g., the above-mentioned consensus network 200a). These smart contracts can be distinguished by the contract call address (also called contract address), contract identification number (Identity document, ID) or contract name. The transaction service request initiated by the user client can also carry the contract call address or contract identification number or contract name of the smart contract to specify the smart contract to be run.

[0145] It should be understood that in the aforementioned blockchain electronic invoice system, any two blockchain nodes in any consensus network (e.g., consensus network 100a, consensus network 200a, or consensus network 300a) can form a peer-to-peer (P2P) network. This peer-to-peer network can utilize the P2P protocol, which is an application layer protocol running on top of the Transmission Control Protocol (TCP). In a distributed system, any device, such as a server or terminal, can join and become a blockchain node. Each blockchain node can include a hardware layer, an intermediate layer, an operating system layer, and an application layer.

[0146] It is understood that the embodiment of the present application can configure a blockchain node for any role (for example, any individual user, any enterprise, any organization, etc.) that accesses the blockchain network through the management consensus node in the management chain network. Figure 1 In the business network 400a shown, business node 110a, business node 110b, business node 110c, business node 110d, ..., business node 110n can have a one-to-one correspondence with the corresponding roles that need to access the blockchain network.

[0147] It is understandable that when the consensus network 100a is used as the management chain network, the consensus nodes in the management chain network (for example, the management consensus nodes, which can be Figure 1 The consensus node 10a shown can provide registration and authorization services for corresponding roles (or corresponding objects) that access the management chain network through the management chain network entrance, and can then perform identity management and permission management on the corresponding roles (i.e., corresponding objects) that need to access the above-mentioned blockchain network (for example, the above-mentioned management chain network, bill chain network, or application contract chain network). In addition, the management consensus node located in the management chain network can also be used to manage the relevant metadata information in the above-mentioned blockchain electronic bill system. For example, it can manage and update the contract templates on the management chain (it should be understood that the contract templates on the management chain can specifically include the management contract templates of the smart contract deployed on the management chain and the application contract templates of the smart contract deployed on the application contract chain), manage and update the bill templates recorded on the management chain, manage and update the tax calculation rules associated with the bill template, etc., control the access traffic at the chain entrance corresponding to the bill chain, control the number of consensus nodes participating in the consensus on each chain, etc.

[0148] For example, when developers and tax business participants need to deploy a smart contract corresponding to a derivative business on the application contract chain, they can access the application contract chain network through the chain entry corresponding to the application contract chain (i.e., the application contract chain entry), read the application contract template corresponding to the derivative business from the management chain indicated by the contract template reading method, and deploy the smart contract corresponding to the derivative business on the application contract chain based on the read application contract template. In this way, when subsequent tax business participants need to execute derivative business on the application contract chain, they can use the smart contract corresponding to the already deployed derivative business to execute the corresponding derivative business.

[0149] It should be understood that when the above-mentioned consensus network 200a is used as the above-mentioned bill chain network, the consensus nodes located in the bill chain network can be used to provide bill services. The bill services here may include but are not limited to electronic bill issuance services, electronic bill circulation services, electronic bill redemption services, electronic bill archiving services and other electronic bill-related services.

[0150] In addition, it can also be understood that when the above-mentioned consensus network 300a is used as the above-mentioned application contract chain network, the consensus nodes located in the application contract chain network can be used to provide derivative businesses (for example, credit business, loss-making business, corporate qualification business, social business, credit purchase business and tax refund business, lottery business, etc.).

[0151] It can be understood that, since each entity object can correspond to a blockchain node, the embodiment of the present application can take the entity object as the above-mentioned enterprise user (i.e., the aforementioned enterprise) as an example. In this case, the blockchain node associated with each enterprise user can be the same blockchain node (for example, the above-mentioned Figure 1 The business node 110c shown can interact with the user terminals corresponding to multiple enterprise users for data exchange. For example, in the above-mentioned blockchain electronic bill system, the business requested by each enterprise user (for example, credit business, loss-in-and-loss business, enterprise qualification business, social business, credit purchase business, tax refund business, electronic bill issuance business, electronic bill circulation business, electronic bill red-off business, electronic bill archiving business, etc.) can be collectively referred to as a transaction business. Among them, when the above-mentioned enterprise user is a tax refund enterprise A that requests a tax refund through the application contract chain network (for example, the above-mentioned consensus network 300a), it can be processed through Figure 1 The business node 110c shown in the figure interacts with the consensus node (e.g., consensus node 11b) in the consensus network 300a to request the completion of the corresponding transaction; similarly, the tax refund company B can also Figure 1The business node 110c shown in the figure interacts with the consensus node (e.g., consensus node 11b) in the consensus network 300a to request the completion of the corresponding transaction; similarly, the tax refund company C can also complete the transaction through Figure 1 The business node 110c shown interacts with the consensus node (eg, consensus node 11b) in the consensus network 300a to request completion of the corresponding transaction.

[0152] It is understood that when the business consensus node associated with the above-mentioned business object receives a transaction request, it can forward the transaction request initiated by the business object to the consensus node associated with the application contract chain, so that the consensus node associated with the application contract chain can verify the legitimacy of the transaction request initiated by the business object. In this way, the consensus node associated with the application contract chain can process the transaction if the legitimacy verification passes.

[0153] For further understanding, please see Figure 2 , Figure 2 This is a schematic diagram of a scenario of a blockchain electronic bill system based on multiple blockchains provided by an embodiment of the present application. It should be understood that in this blockchain electronic bill system, in order to reduce the complexity of on-chain data storage, a new multi-chain system based on blockchain electronic bills is proposed, and this multi-chain system may include but is not limited to Figure 2 The blockchain electronic bill three-chain network shown. Figure 2 As shown, the blockchain electronic invoice three-chain network is deployed with a target chain (also known as the management chain), a first chain (also known as the application contract chain), and a second chain (also known as the invoice chain). The invoice chain and the application contract chain can be collectively referred to as the source data chain. It is understood that in business scenarios where blockchain is used as the core data flow for blockchain electronic invoices, the mutual collaboration between the management chain, the invoice chain, and the application contract chain can provide the entire blockchain electronic invoice system with the functional characteristics of independently executing different businesses. Thus, a secure and efficient business flow system can be constructed under the premise of mutual collaboration among the three chains. It should be understood that, taking the example of a multi-chain system including a three-chain system, in this three-chain system, the management chain, the invoice chain, and the application contract chain are all independently built. That is, the consensus node used to maintain the management chain is different from the consensus node used to maintain the invoice chain, and different from the consensus node used to maintain the application contract chain.

[0154] For example, the management chain here can be used to provide management functional characteristics for the entire blockchain electronic bill system, and the bill chain here can provide the functional characteristics of bill business with different business permission types for the entire blockchain electronic bill system. It should be understood that in the embodiment of the present application, in order to ensure the security and independence of the electronic bill written into the bill chain, the embodiment of the present application proposes that another blockchain (i.e. Figure 2 The application contract chain shown in the figure can provide more standardized, flexible and fully functional derivative businesses. That is, the application contract chain here can provide the entire blockchain electronic bill system with the functional characteristics of conducting derivative businesses based on the core data in the electronic bill.

[0155] For ease of understanding, the core consensus network where the management chain is located (i.e. the above management chain network) is used as the above Figure 1 Taking the consensus network 100a shown as an example, the consensus nodes participating in maintaining the management chain can be the above-mentioned management consensus nodes. Figure 2 As shown, there are multiple smart contracts deployed on the management chain, and these smart contracts can run on the management consensus node. Specifically, it can be understood that the multiple smart contracts here can specifically include Figure 2 The object rights management contract, object identity management contract, metadata management contract and internal management contract shown in the figure should be understood as the smart contracts deployed on the management chain are Figure 2 The internal participants shown (i.e., tax management departments) are determined by the corresponding management contract templates deployed on their own chains (i.e., management chains).

[0156] It is understood that the aforementioned tax administration department can exercise management responsibilities through the management consensus node deployed in the management chain network. For example, these management responsibilities may include managing internal government information (e.g., information on tax administration personnel), managing the business logic rules of the overall business (e.g., the derivative business contracts running on the application contract chain that execute the business logic of the derivative business), managing the metadata information of the overall business (e.g., access traffic at the entrances of each chain in the three-chain system), and managing the identities and permissions of participants in the overall business (e.g., individual users, corporate users, tax business participants, and other business objects). It should be understood that within the blockchain network corresponding to the overall business, the management chain maintained by the management consensus node is a relatively stable blockchain with the smallest data size and the highest security.

[0157] In addition, for ease of understanding, Figure 2 The core consensus network where the bill chain shown is located (i.e. the above bill chain network) is the above Figure 1 As an example, the consensus network 200a shown in FIG. Figure 2 As shown, there are multiple smart contracts deployed on the bill chain, which can run on the consensus nodes of the bill chain network. Specifically, it can be understood that the multiple smart contracts here can specifically include Figure 2 The electronic bill issuance contract, electronic bill circulation contract, electronic bill redemption contract, and electronic bill archiving contract shown are similar. Similarly, it should be understood that these smart contracts deployed on the bill chain are Figure 2 The internal participants shown (eg, the tax department associated with the electronic invoice data center) are determined by the corresponding invoice business contract template deployed on the management chain.

[0158] It is understood that the consensus nodes deployed in the bill chain network can maintain the business logic of electronic bills throughout their entire lifecycle through the bill chain. For example, the bill chain can manage the entire lifecycle of all issued electronic bills. For example, the entire lifecycle of an electronic bill here includes the issuance, circulation, and reimbursement of electronic bills. It should be understood that within the blockchain network corresponding to the overall business, the bill chain maintained by the consensus nodes of the bill chain network has the characteristics of high performance and low latency.

[0159] Similarly, for ease of understanding, the core consensus network where the application contract chain is located (that is, the above-mentioned application contract chain network) is used as the above Figure 1 As an example, the consensus network 300a shown in FIG. Figure 2 As shown, there are multiple smart contracts deployed on the application contract chain, and these smart contracts can be run on the consensus nodes of the application contract chain network. Specifically, it can be understood that the multiple smart contracts here can specifically include Figure 2 The virtual machine compatibility contract, open contract deployment contract, and derivative business contract are shown.

[0160] It is understandable that the consensus node deployed in the application contract chain network can carry the derivative business corresponding to the variable bill business through the application contract chain. For example, the derivative business here can specifically include the above-mentioned credit investigation business, the above-mentioned qualification identification business, etc. It should be understood that in the blockchain network corresponding to the overall business, the application contract chain maintained by the consensus node of the application contract chain network can support Figure 2 The government cooperation departments and alliance chain partners shown (i.e. Figure 2 business related departments shown), through Figure 2 The tax application contract (open contract deployment contract) shown above reads the management application contract template to develop smart contracts related to derivative business (for example, Figure 2 The derivative business contract shown in the figure can be deployed on the application contract chain after review by the tax administration department. It should be understood that smart contracts deployed on the application contract chain can be flexibly upgraded and changed through virtual machine compatible contracts.

[0161] Among them, it is understandable that Figure 2 In the three-chain network of blockchain electronic bills shown, the consensus algorithm used by the management chain is different from the consensus algorithm used by the bill chain and the consensus algorithm used by the application contract chain.

[0162] Specifically, 1.1) the consensus algorithm associated with the management chain is an immediate deterministic consensus algorithm, for example, the immediate deterministic consensus algorithm here can be a PBFT (Practical Byzantine Fault Tolerance) consensus algorithm, through which the status of a proposed block to be put on the chain can be immediately determined. It should be understood that the management chain is the blockchain in the above-mentioned management chain network, and the consensus nodes in the management chain network (i.e., the above-mentioned management consensus nodes) can be Figure 2 The tax administration departments shown are involved in management.

[0163] It should be understood that the internal parties associated with this management chain can be Figure 2 For example, when the tax management department participates in the management chain as an internal participant, it can manage some of its internal states through the internal management contract on the management chain. For example, it can manage the various personnel in the tax management department. For example, it can configure specific tax management personnel, tax development personnel, tax auditors, etc. among these personnel in the tax management department. In addition, when the tax management department participates in the management chain as an internal participant, it can also manage some parameters in the three-chain system through the internal management contract on the management chain. For example, it can manage Figure 2 The access traffic parameters corresponding to the access traffic at the bill chain entrance shown can be restricted. For example, a time-sharing access mechanism can be used to control the access traffic at the bill chain entrance within certain time periods to no more than the access traffic threshold. For another example, when the tax administration department participates in the management chain as an internal participant, it can also use the internal management contract on the management chain to limit the node quantity parameters corresponding to the number of consensus nodes on each chain participating in the consensus.

[0164] 1.2) The consensus algorithm associated with the bill chain is another instant deterministic consensus algorithm. For example, the instant deterministic consensus algorithm here can be the TBFT (Tower Byzantine Fault Tolerance) consensus algorithm. The TBFT consensus algorithm is a Byzantine fault-tolerant algorithm that can ensure the safe operation of the entire bill chain network system when the number of Byzantine nodes (i.e., the number of malicious nodes in the bill chain network) is less than 1 / 3 of the total number of nodes in the bill chain network. It should be understood that the consensus nodes in the bill chain network can be managed by the aforementioned tax administration department. For example, specific tax personnel in the tax administration department can control the number of consensus nodes in the bill chain network through the internal management contract in the aforementioned management chain. For another example, the tax bureau terminal corresponding to a specific tax personnel in the tax administration department can participate in the formation of the bill chain network.

[0165] It should be understood that the biggest difference between the TBFT consensus algorithm and the PBFT consensus algorithm is that the PBFT consensus algorithm has a fixed leader node (i.e., the master node) for packaging transactions in the transaction pool. When the leader node fails, the view-change subprotocol (i.e., a master node switching subprotocol) is used to replace the leader node. In the TBFT consensus algorithm, the leader node is rotated based on a rotation mechanism. For example, when the current node is the leader node, it will automatically rotate to the next node after submitting X blocks (the value of X is configurable). This means that the consensus nodes in the bill chain network corresponding to the bill chain can be used to continuously produce blocks.

[0166] 1.3) The consensus algorithm associated with the application contract chain is another instant deterministic consensus algorithm. For example, the instant deterministic consensus algorithm here can be a PoS (proof-of-stake) consensus algorithm. Through this proof-of-stake consensus algorithm, the network security of the application contract chain network where the application contract chain is located can be maintained, and the status of a proposed block to be put on the chain can be immediately determined through this proof-of-stake consensus algorithm. It is understandable that the consensus nodes in the application contract chain network can be composed of Figure 2 The tax administration departments and government cooperation departments and large participating institutions (i.e. the large enterprises in the aforementioned alliance chain, which are the aforementioned Figure 2 The business-related departments shown in the figure) and others participate in the management.

[0167] It should be understood that in the embodiments of the present application, a large number of electronic bills generated on the bill chain can be indirectly transferred to the application contract chain through cross-chain relay between the three chains involved in the blockchain electronic bill system. It should be understood that the embodiment of the present application transfers electronic bills from the bill chain to the application contract chain, which is essentially a cross-chain transfer within the chain. That is, the cross-chain transfer within the chain is intended to emphasize that electronic bills can be transferred from one main chain (for example, the bill chain) to another main chain (for example, the application contract chain).

[0168] It should be understood that the following differences exist with respect to smart contracts in the blockchain electronic bill triple-chain network:

[0169] 2.1) It should be understood that Figure 2 The management chain shown can support a specific language smart contract engine. The above management consensus node can deploy a specific language smart contract on the management chain through the specific language smart contract engine. For example, the above Figure 2The object rights management contract, object identity management contract, metadata management contract, and internal management contract shown are shown. It should be understood that these smart contracts can be developed and managed by specific tax management personnel in the tax management department.

[0170] 2.2) If Figure 2 The bill chain shown has built-in smart contracts for specific bill business logic. These smart contracts (for example, Figure 2 The electronic bill issuance contract, electronic bill circulation contract, electronic bill redemption contract, and electronic bill archiving contract shown in the figure can be upgraded as the bill business is updated. For example, the embodiment of the present application can update the bill business logic in the electronic bill issuance contract through the metadata information read from the management chain, and then update and process the above-mentioned bill business according to the updated electronic bill issuance contract. This means that the bill chain does not support an independent smart contract engine, and naturally does not support the deployment of other contracts unrelated to the bill business on the bill chain. The advantage of doing this is that the bill chain only runs the business logic related to the electronic bill and is not affected by other smart contracts, thereby making the operation of the bill chain more independent, stable, and more resistant to attacks.

[0171] 2.3) The application contract chain supports multi-language, Turing-complete smart contracts for developers, such as Figure 2 As shown, when developers access the application contract chain through the application contract chain entrance, they can use the virtual machine compatibility contract to be compatible with mainstream EVM virtual machines, so that they can deploy and run various new business contracts on compatible virtual machines. For example, a derivative business contract associated with a derivative business (for example, the above-mentioned lottery business) can be deployed on the application contract chain. For another example, a derivative application contract associated with another derivative business (for example, the above-mentioned tax refund business) can be deployed on the application contract chain.

[0172] It should be understood that both the bill chain and the application contract chain in the blockchain electronic bill three-chain network have the cross-chain capability to conduct cross-chain transactions with the management chain. It should be understood that the cross-chain capability involved in the embodiments of this application specifically refers to the ability to transfer data between the main chains involved in the blockchain electronic bill system (i.e., the bill chain, the application contract chain, and the management chain). For example, bill assets on the bill chain can be transferred to the application contract chain. For another example, some metadata information on the management chain can be transferred across chains to the bill chain or the application contract chain.

[0173] It should be understood that Figure 2 As shown, in the blockchain electronic bill three-chain network, the public network participants associated with the management chain can be Figure 2 Individual users and corporate users as shown. Figure 2 As shown, the public network participants associated with the bill chain can be Figure 2 The local electronic invoice data flow system shown here specifically includes local electronic invoice business issuance systems (for example, local tax bureau systems), electronic invoice issuance service providers, large enterprise finance and taxation related systems, etc. Figure 2 As shown, the public network participants associated with the application contract chain can be Figure 2 Tax business participants and developers shown.

[0174] Specifically, 3.1) the chain entry associated with the management chain can be Figure 2 The management chain entry is shown. Figure 2 When individual users (e.g., user A) and corporate users (e.g., corporate B) are participants in the public network, they can access the management chain through the management chain entrance, and then perform identity registration and identity authorization services through the management chain. 3.2) The chain entrance associated with the bill chain can be Figure 2 The bill chain entry shown. Figure 2 When the local electronic bill data flow systems (e.g., large enterprise users) shown in the figure act as public network participants, they can access the bill chain through the bill chain entry, and then perform electronic bill issuance, electronic bill circulation, electronic bill redemption, and electronic bill archiving services through the bill chain. 3.3) The chain entry associated with the application contract chain can be Figure 2 The application contract chain entry shown. Figure 2 When the tax business participants and developers shown as public network participants can access the application contract chain through the application contract chain entrance, and then can deploy derivative business contracts on the application contract chain to execute derivative business related to electronic invoices through the deployed derivative business contracts. It should be understood that Figure 2 The developer shown can also deploy derivative business contracts corresponding to other derivative businesses (or exploratory businesses) on the application contract chain when accessing the application contract chain. There is no limit on the number of derivative business contracts deployed on the application contract chain.

[0175] Among them, it is understandable that Figure 2 The management chain entrance shown may specifically be a tax administration department entrance, through which the identity identification and business guidance of individuals, legal persons, and entities that need to access the management chain can be performed.

[0176] Among them, it is understandable that Figure 2The bill chain entry shown can specifically be an electronic bill business entry, through which the transaction business data (also referred to as transaction data) of the electronic bill requested by a certain business object (for example, Enterprise B mentioned above) can be received. In this way, when the consensus node of the above-mentioned bill chain network receives the transaction business data submitted by Enterprise B through the electronic bill business entry, it can also verify through the electronic bill business entry whether the access identity and access permissions of the data sender of the transaction business data (i.e., Enterprise B as the first business object) meet the identity and permission contract status requirements in the management chain. If the verification is passed, Enterprise B as the first business object can be determined as the authorized object.

[0177] Among them, it is understandable that Figure 2 The application contract chain entry shown may specifically be a tax derivative business entry, through which a business object (for example, Figure 2 The derivative business associated with the bill business requested by the tax business participant shown in the figure. Figure 2 The tax business participants and developers shown can, after obtaining the business participation license certificate of the authorized object issued by the tax management department, verify the business participation license certificate submitted by the second business object (for example, the tax business participant or developer) through the application contract chain entrance, and then allow the second business object to access the application contract chain when the verification is successful, so as to execute derivative business related to the aforementioned bill business on the application contract chain.

[0178] Among them, such as Figure 2 As shown, the internal participants in the maintenance management chain can be Figure 2 The tax management department shown here is mainly used to configure and manage internal status parameters on the management chain. It can also be used to change the above metadata information (for example, tax metadata) on the chain (such as updating electronic invoice templates, updating tax calculation rules, etc.), and manage the identities and permissions of various business participants maintained on the management chain (such as freezing the company's invoicing qualifications, limiting the company's invoicing quota, etc.).

[0179] Among them, such as Figure 2 As shown, the internal participants involved in maintaining the bill chain can be Figure 2The electronic bill data center shown here can specifically be an electronic invoice data center. This electronic bill data center (e.g., an electronic invoice data center) can be used to perform off-chain backup, statistics, data analysis, and review of the massive amount of ledger data recorded on the bill chain (e.g., the electronic bill flow generated by the above-mentioned real-time bill business flow). Specifically, the electronic bill data center can be used to count the number of invoices issued by time, and then, based on the counted number of invoices issued by time, risky bills (e.g., risky invoices) and risky enterprises can be identified. It can also perform data analysis on relevant financial and economic data.

[0180] Among them, Figure 2 As shown, the internal participants involved in maintaining the application contract chain can be Figure 2 The government cooperation departments and business-related departments shown. It should be understood that, in addition to the tax management department, the internal participants involved in maintaining the application contract chain, other departments (i.e. the aforementioned government cooperation departments) and participants (i.e. the aforementioned business-related departments) in the system alliance chain can further execute corresponding derivative businesses through the derivative business contracts on the application contract chain when connected to the application contract chain. It should be understood that in order to avoid the waste of limited on-chain space on the application contract chain, the embodiment of the present application proposes that based on certain derivative businesses on the aforementioned application contract chain, additional business sub-chains that can be started with the start of the derivative business can be deployed on the basis of the three-chain system, so that certain derivative businesses originally executed on the application contract chain can be further improved in business execution efficiency through the additional deployed business sub-chains.

[0181] Among them, it is understandable that Figure 2 The three blockchain electronic bill networks shown can all have built-in corresponding smart contracts.

[0182] Among them, 4.1) for the smart contract built into the management chain, such as Figure 2As shown, the object identity management contract embedded in the management chain can specifically be a user management contract, which manages the identities of accessors (e.g., public network participants) and participants (e.g., internal participants) across the entire three-chain system. It should be understood that accessors and participants here can specifically include tax management personnel (referred to as administrators), government collaboration departments, local tax bureaus, invoicing service providers, reimbursement service providers, tax audit departments, and so on. Furthermore, the object permission management contract embedded in the management chain can specifically be an enterprise identity management contract, which manages the business permissions and tax status of certain enterprises. Similarly, the metadata management contract embedded in the management chain can specifically be a tax metadata management contract, which manages metadata information such as tax rules. For example, it can centrally manage contract modules, tax calculation logic, and the latest policy rules across the three-chain system. By analogy, the internal management contract built into the management chain can be used to manage some internal states of the tax administration department, and can manage some internal parameters of each chain under the three-chain system. For example, the internal management contract can be used to limit the access traffic parameters at the above-mentioned bill chain entrance (for example, the electronic invoice business entrance), as well as the number of consensus nodes in the three-chain system.

[0183] Similarly, the subnet creation management contract built into the management chain can be used to temporarily create a subchain independent of the three main chains mentioned above based on a temporary business requested by a user. Here, a subchain can be used to handle a temporary business.

[0184] It should be understood that, in this embodiment of the present application, the consensus network corresponding to the sub-chain may be collectively referred to as a sub-chain consensus network. This means that, based on the needs of temporary services such as dedicated or special services, this embodiment of the present application can instantly build a sub-chain independent of the three main chains on the basis of the aforementioned three-chain system. After the aforementioned dedicated or special services are completed on the instantly built sub-chain, the data on the sub-chain can be extracted and destroyed. For ease of understanding, in this embodiment of the present application, the sub-chains created based on the aforementioned temporary services may be collectively referred to as business processing sub-chains.

[0185] Among them, 4.2) for the smart contract built into the bill chain, such as Figure 2As shown, the smart contract built into the bill chain can include a bill chain universal resource cross-chain bridge contract and a bill business contract associated with the electronic bill lifecycle. The bill chain universal resource cross-chain bridge contract can be used to transfer bill resources to a bill chain transfer address on the bill chain based on a cross-chain transaction. The bill chain transfer address can be an address that can be detected by the consensus node of the management chain, so that the management chain can generate a cross-chain transaction event based on the detection information of the bill transfer address, thereby realizing cross-chain data transfer of resources on the bill chain.

[0186] Among them, 4.3) for the smart contract built into the application contract chain, such as Figure 2 As shown, the smart contract built on the bill chain can include the application contract chain universal resource cross-chain bridge contract, and can also include the tax derivative business participants (i.e. derivative business objects, for example, Figure 2 The tax business participants shown in the figure) participate in the deployment of various contracts (for example, Figure 2 (See the virtual machine compatibility contract, tax application contract, and derivative business contract shown.) For example, a derivative business contract here can specifically be a credit reporting business contract based on electronic invoices, through which a company's credit data can be analyzed. Another example of a derivative business contract here can specifically be an on-chain lottery business contract, talent incentive contract, or tax refund business contract deployed to encourage invoicing. The application contract chain-to-chain resource cross-chain bridge contract can be used to transfer invoice resources to the application contract chain transfer address on the invoice chain based on a cross-chain transaction. The application contract chain transfer address can be an address that can be detected by the consensus node of the management chain, so that the management chain can generate cross-chain transaction events based on the detection information of the application contract chain transfer address, thereby realizing cross-chain data transfer of resources on the application contract chain.

[0187] It should be understood that for the above Figure 2 As for the management chain shown, it is mainly used to process management business flows with small data volume and relatively constant status. The openness of the entire management chain is relatively low and can be used for internal management of some tax data. Figure 2 As for the bill chain shown, it can be used to process some real-time bill business flows with a high-frequency request state for a long time. The entire bill chain is relatively open and can allow relevant authoritative institutions in the life cycle of the electronic bill to participate in the corresponding bill business. For example, the consensus node corresponding to the agent service provider can be allowed to issue an electronic bill for a user who is currently requesting an invoice. In addition, for Figure 2As for the application contract chain shown, the amount of data can be unlimited, and the frequency of business changes fluctuates relatively greatly. It is mainly possible to process various types of cooperative businesses, derivative businesses, exploratory businesses, etc. through the application contract chain. It should be understood that the application contract chain has the highest openness, and can run participants authorized by the management chain to deploy smart contracts on the application contract chain, run exploratory derivative businesses, etc. It should be understood that in the embodiment of the present application, considering that the application contract chain has a high degree of openness and flexibility in business changes, the smart contract built into the application contract chain can have more contract security restrictions when executed. For example, the number of contract execution steps can be limited (for example, for the above Figure 2 For the derivative business contract shown, it is possible to limit which contract methods in the derivative business contract the current business object (i.e., the second business object mentioned above) can access, and to restrict the storage resource data required to access the derivative business contract (i.e., the call of the smart contract on the application contract requires a certain amount of storage resource data).

[0188] It can be understood that the consensus node under the three-chain system involved in the embodiment of the present application can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms.

[0189] It should be noted that when the consensus node in the embodiment of the present application obtains the registration data information, business participation license certificate, bill information in the electronic bill and other data of the business object (for example, the above-mentioned individual user or corporate user) across the chain, it can display a prompt interface or pop-up window. The prompt interface or pop-up window is used to prompt the business object that it is currently collecting registration data information, business participation license certificate, bill information in the electronic bill and other data. Only after the business object issues a confirmation operation on the prompt interface or pop-up window, the relevant steps of data acquisition are started, otherwise it ends.

[0190] In addition, it can be understood that in the specific implementation of this application, business data of business objects such as users, enterprises, and institutions may be involved (for example, users' invoicing information, credit information, tax refund information, etc., and enterprises' income and expenditure, enterprise qualifications, etc.). When the above embodiments of this application are applied to specific products or technologies, it is necessary to obtain the permission or consent of business objects such as users, enterprises, and institutions, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0191] Further, it can be understood that, based on the business processing architecture of the above-mentioned multi-blockchain, the embodiment of the present application proposes a data cross-chain solution based on multiple blockchains, which can include a source data chain (i.e., an application contract chain and a bill chain, also referred to as a first chain and a second chain) and a management chain (also referred to as a target chain), and can also include a business processing subchain for business processing. The data cross-chain solution can be executed by a cross-chain service terminal deployed with a trusted cross-chain program to realize the data cross-chain between the source data chain (such as the application contract chain and the bill chain) under the three-chain system and the chain outside, i.e., the business processing subchain. That is, the cross-chain service terminal can receive the first cross-chain transaction event sent by the management consensus node associated with the management chain through the trusted cross-chain program, and use the target transaction resource in the locked state in the first address on the source data chain, such as the application contract chain, as a transfer transaction resource, thereby constructing a corresponding cross-chain construction transaction based on the transfer transaction resource, and then determine the second address on the business processing subchain, such as the first business processing subchain, through the trusted cross-chain program, and send the cross-chain construction transaction to the consensus node associated with the business processing subchain based on the second address to realize the data cross-chain of the target transaction resource. In this way, the business data in general business scenarios can be cross-chained outside the chain through the trusted cross-chain program in the cross-chain service terminal. The trusted cross-chain program is in a trusted execution environment and can verify cross-chain transactions, thereby ensuring the correctness of cross-chain data. By deploying multiple blockchains to store data separately, the complexity of data storage on each blockchain can be reduced. In addition, through the mutual cooperation between multiple blockchains, the security of data stored on each chain can also be improved.

[0192] In one possible implementation, the present application also provides a data cross-chain processing system based on multiple blockchains. Figure 3 , Figure 3 This is a schematic diagram of the structure of a data cross-chain processing system based on multiple blockchains provided by an embodiment of the present application. Figure 1 As shown, the data cross-chain processing system based on multiple blockchains may include a consensus node associated with the management chain 301, a consensus node associated with the bill chain (also called the invoice chain) 302, a consensus node associated with the application contract chain 303, a consensus node associated with the business processing sub-chain 304, a cross-chain service terminal 305, and a user terminal 306.

[0193] Among them, the consensus node associated with the management chain 301 (also called the target chain) can be used to maintain the data on the management chain. The consensus node associated with the management chain can be deployed with a subnet creation management contract to manage the creation of the business processing subchain, which will not be described in detail here. The consensus node of the management chain can also be used to manage the startup of the trusted cross-chain program of the cross-chain service terminal. It can be understood that a corresponding business processing subchain can be created for a business, and a trusted cross-chain program for realizing the data link between the source data chain (such as the smart contract chain and the bill chain) and the business processing subchain can be started to ensure the security of the data cross-chain between the blockchain in the three-chain system and the external blockchain (i.e., the business processing subchain). The consensus node associated with the management chain can also be deployed with a management component management contract to manage multiple management components, so that the source data chain, such as the application contract chain on the application contract chain, can be detected through the management component. After the management component generates transaction detection information, the consensus node associated with the management chain can send a cross-chain transaction event to the cross-chain service terminal.

[0194] The consensus nodes associated with the bill chain 302 (also known as the second chain) can be used to maintain data on the bill chain, such as the full life cycle and various attributes of invoice data on the bill chain. The bill chain can be deployed with bill business contracts, which will not be described in detail here. The bill chain can also be deployed with a bill chain universal resource cross-chain bridge contract, which can be used to instruct the consensus nodes associated with the bill chain to interact with the trusted cross-chain program in the cross-chain service terminal to complete data cross-chain between the bill chain data and the business processing sub-chain.

[0195] The consensus node associated with the application contract chain 303 (also referred to as the first chain) can be used to maintain data on the application contract chain, such as deploying business-related smart contracts. Smart contracts deployed on the application contract chain may include derivative business contracts, which will not be described in detail here. A general resource cross-chain bridge contract can also be deployed on the application contract chain. The general resource cross-chain bridge contract can be used to instruct the consensus node associated with the application contract chain to interact with the trusted cross-chain program in the cross-chain service terminal to complete data cross-chain between the data on the application contract chain and the business processing sub-chain.

[0196] The consensus node associated with the business processing subchain 304 can be used to maintain data on the business processing subchain. The business processing subchain can be created by the consensus node associated with the management chain, that is, the creation of the business processing subchain needs to be authorized by the consensus node associated with the management chain, and then the consensus node associated with the management chain can create a business processing subchain based on the business processing subchain creation service. The consensus nodes in the consensus network of the created business processing subchain can reuse the nodes in the consensus network associated with the bill chain or the application contract chain, such as Figure 3The business processing subchain shown in 304 can form a consensus network of the business processing subchain by determining the multiple bill chain validators and application contract chain validators. It can be understood that when determining the consensus network of the business processing subchain, the consensus nodes associated with the business processing subchain can be determined based on the idleness of the consensus nodes in the consensus networks of the bill chain and the application contract chain. For example, relatively idle nodes can be selected as consensus nodes of the business processing subchain, thereby reducing the data processing pressure of busier nodes, thereby helping to improve the efficiency of business processing. In addition, a subchain universal cross-chain bridge contract can be deployed on the business processing subchain. The subchain universal resource cross-chain bridge contract can be used to instruct the consensus node associated with the business processing subchain to interact with the trusted cross-chain program in the cross-chain service terminal to complete data cross-chain between the business processing subchain and the bill chain or application contract chain. The business processing sub-chain is a sub-chain built immediately due to the needs of dedicated or special businesses. Data can also be extracted and destroyed after the business is completed. By building a business processing sub-chain to process the business, compared with directly processing the business based on the source data chain, the space occupied on the source data chain during business processing can be reduced.

[0197] The cross-chain service terminal 305 can be deployed with a trusted cross-chain program, which is in a trusted execution environment, thereby ensuring the security of cross-chain data operations. The cross-chain service terminal is used to isolate the source data chain and the business processing subchain in multiple blockchains. It can be used to implement the above-mentioned multi-blockchain-based data cross-chain solution to achieve cross-chain data between the source data chain and the business processing subchain. The cross-chain service terminal can provide application contract chain cross-chain services to achieve cross-chain data between the application contract chain and the business processing subchain, and can also provide bill chain cross-chain services to achieve cross-chain data between the bill chain and the business processing subchain. The core technology used by the cross-chain service terminal to provide cross-chain services is Intel SGX (software guard extensions, a processor technology). It aims to use hardware security as a mandatory guarantee, independent of the security status of firmware and software, and provide a trusted execution environment in user space. Through a set of new instruction set extensions and access control mechanisms, it can achieve isolated operation between different programs, protecting the confidentiality and integrity of user critical code and data from malware. Unlike other security technologies, SGX's trusted computing base (TCB) only includes hardware, avoiding the software security vulnerabilities and threats inherent in software-based TCBs, greatly improving system security. In addition, SGX can ensure a trusted execution environment at runtime, preventing malicious code from accessing or tampering with the protected content of other programs at runtime, further enhancing system security.

[0198] The user terminal 306 can be used to interact with the consensus nodes of multiple blockchains in the above-mentioned multi-blockchain-based data cross-chain processing system. For example, the user terminal can request the consensus node of the management chain to create a business processing subchain, as shown in steps S31 and S32, so that the management chain can create a business processing subchain based on the subnet management creation contract; for example, it can initiate a data cross-chain transfer request to the consensus node of the bill chain or application contract chain, perform relevant business contract calls, and realize cross-chain resource transfer to the business processing subchain, as shown in steps S33 and S34; for example, it can interact with the consensus node of the business processing subchain, as shown in step S35, and so on, and there are no restrictions here.

[0199] This article introduces the data processing process in the data cross-chain processing system based on multiple blockchains with diagrams. Here, the source data chain is taken as the first chain (i.e., the application contract chain mentioned above) and the business sub-processing sub-chain is taken as the first business processing sub-chain as an example to explain the data cross-chain process between the application contract chain and the first business processing sub-chain. Figure 4 , Figure 4This is a schematic diagram of a data cross-chain processing process based on multiple blockchains provided by an embodiment of the present application. First, the management component 402 in the consensus node of the management chain 401 (also known as the target chain) can detect the application contract chain 403 and the first business processing sub-chain 404. Specifically, it can detect the first address in the application contract chain and the second address in the first business processing sub-chain 404. The first address is the aforementioned application contract chain transit address, and the second address is also equivalent to the transit address on the first business processing sub-chain for resource transfer with the consensus node of the application contract chain. The consensus node of the management chain 401 can also be deployed with a management component management contract to manage the management component, such as the blockchain address that can be used to configure the management component for detection; the consensus node of the management chain 401 can also be deployed with a trusted cross-chain program management contract to interact with the cross-chain service terminal for data, such as when receiving a first business object request to create a first business processing sub-chain 404, it can notify the cross-chain service terminal 405 to start the first cross-chain program for realizing data between the first business processing sub-chain and the application contract chain. When the management component 402 detects that there are transaction resources in the first address of the application contract chain, and the transaction resources are in a locked state, the management consensus node of the management chain 401 can send a cross-chain transaction event to the cross-chain service terminal 405, and then the cross-chain service terminal 405 can transfer the transaction resources in the locked state in the first address to the first business processing sub-chain 404 through the first cross-chain program. When the management component 402 detects that there are transaction mapping resources in the second address of the first business processing sub-chain 404, and the transaction resources are in a destroyed state, the management consensus node of the management chain 401 can send a cross-chain transaction event to the cross-chain service terminal 405, and then the cross-chain service terminal 405 can transfer the transaction mapping resources in the destroyed state in the second address back to the application contract chain 403 through the first cross-chain program. The specific process of cross-chain transactions based on the cross-chain service terminal 405 can be found as follows: Figures 5 to 9 The corresponding embodiment.

[0200] It should be noted that before collecting the user's relevant data and during the process of collecting the user's relevant data, this application can display a prompt interface, pop-up window or output voice prompt information. The prompt interface, pop-up window or voice prompt information is used to remind the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining the user's relevant data after obtaining the user's confirmation operation on the prompt interface or pop-up window. Otherwise (that is, when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining the user's relevant data are terminated, that is, the user's relevant data is not obtained. In other words, all user data collected by this application are collected with the user's consent and authorization, and the collection, use and processing of relevant user data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0201] The technical solution of this application can be applied to electronic devices, such as the cross-chain service terminal mentioned above. The electronic device can be a terminal, a server, or other device used for data processing, which is not limited in this application. It is optional. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Terminals include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, smart speakers, smart home appliances, etc.

[0202] It is understood that the above scenarios are merely examples and do not limit the application scenarios of the technical solutions provided in the embodiments of this application. The technical solutions of this application can also be applied to other scenarios. For example, those skilled in the art will appreciate that with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application will also be applicable to similar technical problems.

[0203] Based on the above description, this application embodiment proposes a data cross-chain method based on multiple blockchains. Figure 5 , Figure 5 This is a flow chart of a multi-blockchain data cross-chain method provided in an embodiment of the present application. This multi-blockchain data cross-chain method can be executed by a cross-chain service terminal, and the trusted cross-chain program deployed by the cross-chain service terminal can be a first cross-chain program. Here, taking the source data chain as the first chain (also known as the application contract chain) and the business sub-processing sub-chain as the first business processing sub-chain as an example, the process of transferring resources from the source data chain to the business processing sub-chain is explained. This multi-blockchain data cross-chain method can include the following steps.

[0204] S501. Receive, through a first cross-chain program, a first cross-chain transaction event sent by a target consensus node based on first cross-chain transaction detection information; the first cross-chain transaction detection information is generated by the target consensus node when detecting that a target transaction resource for a first cross-chain transaction associated with a first business exists in a first address on the first chain, and the target transaction resource is in a locked state; the first cross-chain transaction is determined by the first consensus node associated with the first chain based on the target transaction resource submitted by the first business object, and the first cross-chain transaction is used to instruct the transfer of the target transaction resource from the first chain to the first business processing sub-chain.

[0205] It is understood that the first cross-chain program can be a trusted cross-chain program for implementing cross-chain data between the first chain (also known as the application contract chain) and the first business processing sub-chain, and the first cross-chain program is in a trusted execution environment. The target consensus node (also known as the management consensus node) can be a consensus node associated with the above-mentioned target chain (i.e., the management chain), which will not be described in detail here.

[0206] It should be understood that the first cross-chain transaction event is used to indicate that the management consensus node has detected a cross-chain transaction that transfers transaction resources from the application contract chain to the first business processing sub-chain based on the first address, so that after receiving the first cross-chain transaction event through the first cross-chain program, the cross-chain transaction indicated by the first cross-chain transaction event (i.e., the first cross-chain transaction) can be executed. The first address is determined by the first private key in the first cross-chain program, that is, the first cross-chain program can determine a corresponding first address on the application contract chain through the first private key. The first private key is generated in a trusted execution environment. Using the first address as a transit address in the cross-chain transaction process reduces the conditions that need to be met for cross-chain transfer of on-chain resources, allowing some common business data to be transferred across chains and ensuring the security of cross-chain resource transfers. The management consensus node can then determine whether it is necessary to send a cross-chain transaction event to the first cross-chain program by detecting the transaction resources in the first address and the status of the transaction resources.

[0207] Among them, it can be understood that when the management consensus node detects that there is a transaction resource that needs to be cross-chain in the first address on the application contract chain, it generates a first cross-chain transaction detection information. The transaction resource that needs to be cross-chain is the target transaction resource to be transferred to the first address, and the target transaction resource is in a locked state. Further, the management consensus node can determine a first cross-chain transaction event to be sent to the first cross-chain program based on the first cross-chain transaction detection information, and send the first cross-chain transaction event to the first cross-chain program, so that the first cross-chain program in the cross-chain service terminal can perform data cross-chain on the target transaction resource based on the instruction of the first cross-chain transaction event.

[0208] It can be understood that the management consensus node includes N management components associated with the first address, where N is a positive integer; one management component is used to generate a transaction detection information in the first cross-chain transaction detection information when detecting that the first address contains a target transaction resource in a locked state; and one transaction detection information in the first cross-chain transaction detection information corresponds to a transaction event in the first cross-chain transaction event. In other words, the management consensus node detects the transaction resources and the status of the transaction resources in the first address through the N management components. When the management component detects that the first address contains a target transaction resource in a locked state, it generates a transaction detection information in the first cross-chain transaction detection information, so that the management consensus node can send the first cross-chain transaction event to the cross-chain service terminal based on the first cross-chain transaction detection information detected by the management component.

[0209] It should be understood that the first business processing subchain is created by the management consensus node associated with the management chain in the multi-blockchain based on the first business associated with the first business object. The first business object can be an object requesting the execution of the first business. The first business requires the construction of a first business processing subchain to process the first business in order to obtain the corresponding business processing results and implement the processing of the first business. In one embodiment, the management consensus node receives the business subchain creation request from the first business object and verifies the business permissions of the first business object. If the verification is successful, the management consensus node can create the first business processing subchain for processing the first business. It is understood that the first business processing subchain is established when the first business is to be processed, thereby transferring the data required to process the first business from the application contract link to the first business processing subchain, and performing business processing based on the first business processing subchain, reducing the space occupied by the business processing process on the first business processing subchain and improving the processing efficiency of the first business.

[0210] It should be understood that the target transaction resource may be a resource that needs to be transferred to the first business processing subchain. The target transaction resource may be business data on the application contract chain. For example, in some scenarios, the first business may be used to process the credit data of the first business object within a certain period of time to obtain the credit rating of the first business object. In this case, the target transaction resource may be the credit data of the first business object within the certain period of time.

[0211] Among them, it should be understood that when the first business object needs to transfer the target transaction resources on the application contract chain to the first business processing sub-chain for processing, the first business object can initiate a first cross-chain transaction to the first consensus node associated with the application contract chain, and then the first consensus node transfers the target transaction resources of the first business object from the contract chain user address on the application contract chain to the first address, and adjusts the target transaction resources to a locked state.

[0212] Optionally, it is understandable that the first consensus node can transfer the target transaction resources that the first business object needs to transfer to the first business processing subchain from the contract chain user address on the application contract chain to the first address by calling the first general resource cross-chain bridge contract deployed on the application contract chain, and determine the target transaction resources transferred to the first address as a locked state, so that the first cross-chain program in the subsequent cross-chain service terminal can transfer the target transaction resources from the first address to the first business processing subchain. Target transaction resources in a locked state cannot be used to construct other transactions. It is understandable that this application is equivalent to using the first address as a transit address for resources, so that the first cross-chain program in the cross-chain service terminal can quickly detect cross-chain transactions based on the transaction detection information of the management consensus node for the first address, thereby realizing the cross-chain transfer of target transaction mapping resources from the application contract chain to the first business processing subchain.

[0213] S502: Use the locked target transaction resource as the first transfer transaction resource, verify the first transfer transaction resource based on the first cross-chain transaction event, and if the verification is successful, construct a first cross-chain constructed transaction corresponding to the first cross-chain transaction based on the first transfer transaction resource.

[0214] The first cross-chain construction transaction is used to instruct the transfer of the first transfer transaction resource from the first address on the first chain (also known as the application contract chain) to the first business processing subchain. It is understood that by verifying the first transfer transaction resource and only constructing the cross-chain construction transaction when the verification is successful, it helps to ensure the accuracy and security of transaction resources during the cross-chain data transfer process.

[0215] It can be understood that verifying the first transferred transaction resource based on the first cross-chain transaction event may include comparing and verifying the transaction resources associated with the transaction detection information corresponding to each transaction event in the first cross-chain transaction event, and may also include verifying the dependent data information associated with the first transferred transaction resource, which is not limited here.

[0216] Specifically, the first cross-chain program can determine the first event number of transaction events associated with N management components from the received first cross-chain transaction event; the first event number is determined by the number of transaction detection information in the first cross-chain transaction detection information associated with the N management components; the first event number is less than or equal to N; further, when the first event number reaches the event number threshold in N, transaction detection information corresponding to the same number of information as the first event number is obtained; further, the transaction resource associated with each transaction detection information in the obtained first cross-chain transaction detection information is used as the first detection resource, and each first detection resource is compared to obtain a first transaction comparison result; further, if the first transaction comparison result indicates that the comparison is successful, verification success indication information is generated for determining that each first detection resource is a first transfer transaction resource. When the verification is determined to be successful based on the verification success indication information, a first cross-chain construction transaction corresponding to the first cross-chain transaction is constructed based on the first transfer transaction resource.

[0217] It is understood that the event number threshold can be a preset threshold. Generally speaking, the event number threshold can be greater than half of N, thereby ensuring the accuracy of the first cross-chain transaction event received by the cross-chain service terminal. For example, if only one management component performs detection, if the transaction detection information corresponding to the management component is tampered with, the cross-chain transaction event received by the cross-chain service terminal will be erroneous, resulting in the failure or error of the cross-chain transaction. However, using multiple management components to detect and send corresponding transaction events increases the difficulty of transaction event tampering, thereby ensuring the accuracy of cross-chain events. For example, when it is determined that transaction events exceeding the event number threshold among the received cross-chain transaction events indicate the transfer of the same transaction resource, even if the transaction event corresponding to the transaction detection information detected by one management component may have been tampered with during transmission, the remaining transaction events can still be used to determine that data cross-chain transfer of the target transaction resource is required. Moreover, it is more difficult to tamper with the transaction events corresponding to the transaction detection information detected by each management component during transmission. This ensures that the cross-chain service terminal can accurately detect cross-chain transactions, thereby improving the accuracy and security of data cross-chain transfer.

[0218] It is understandable that the first transaction comparison result can be used to indicate a successful comparison or a failed comparison. If the first detection resources are the same transaction resources, the first transaction comparison result indicates a successful comparison. Conversely, if the first detection resources are not the same transaction resources, the first transaction comparison result indicates a failed comparison. Thus, by comparing and verifying the various detection resources, it is possible to determine that the transaction detection information-associated transaction resources corresponding to the transaction events received that are greater than or equal to the event quantity threshold are all the same and are all the first transferred transaction resources, thereby constructing the first cross-chain construction transaction, which helps to improve the accuracy of the first cross-chain program's detection of the first cross-chain transaction, thereby better ensuring the security of data cross-chain.

[0219] For example, the management consensus node may include four management components, and the event quantity threshold is 3. Then, when it is detected that the first event quantity of the transaction event in the first cross-chain transaction event reaches 3, the transaction resources associated with the transaction detection information corresponding to the three transaction events may be compared and verified. When it is verified that the transaction resources associated with the transaction detection information corresponding to the three transaction events are the same, the same transaction resource is the first transferred transaction resource, and then the first cross-chain constructed transaction may be constructed based on the first transferred transaction resource.

[0220] Specifically, the cross-chain service terminal may also obtain dependent data information corresponding to the first transfer transaction resource from the first chain; further, perform information verification on the dependent data information, and when the information verification is successful, construct a first cross-chain construction transaction corresponding to the first cross-chain transaction based on the dependent data information and the first transfer transaction resource.

[0221] It is understood that the dependent data information may include the resource usage of the first transfer transaction resource that may be included in the first transfer transaction resource. For example, if the first business may be used to process the credit investigation data of the first business object within a certain period of time to obtain the creditworthiness of the first business object, the resource usage of the first transfer transaction resource may be to calculate the creditworthiness. Therefore, the integrity of the first transfer transaction resource can be ensured by verifying the dependent data information, such as verifying whether the first transfer transaction resource contains the data required for the resource usage of the first transfer transaction resource.

[0222] Optionally, it is understandable that the dependent data information may also include associated data of the first transfer transaction. For example, the first transfer transaction resource is the credit data of the first business object within a certain period of time. The credit data may include information such as the loan time and repayment time of each loan transaction. The dependent data information of the credit data may include information such as the purpose of the loan funds of each loan transaction and the transaction serial number involved. Therefore, the validity and integrity of the credit data can be verified through the dependent data information.

[0223] Among them, it can be understood that a first general resource cross-chain bridge contract for data interaction with the first cross-chain program is deployed on the application contract chain; the first general resource cross-chain bridge contract is used to instruct the first consensus node to specify the resource usage of the target transaction resource corresponding to the first cross-chain exchange when transferring the target transaction resource to the first address; the dependent data information includes the resource usage. Specifically, the cross-chain service terminal can use the resource usage and the first transferred transaction resource as transaction parameters, and construct a first cross-chain construction transaction corresponding to the first cross-chain transaction based on the transaction parameters. In this way, after receiving and parsing the first cross-chain construction transaction, the second consensus node can determine the resource usage through the transaction parameters of the first cross-chain construction transaction, and then the second consensus node can determine the business processing method for the first transfer transaction resource based on the resource usage.

[0224] Among them, it can be understood that the first general resource cross-chain bridge contract can be called by the first consensus node when the first business object submits the first cross-chain transaction, thereby transferring the target transaction resources that need to be transferred across the chain to the first business processing sub-chain to the first address, and specifying the resource usage of the target transaction resources.

[0225] S503. Determine a second address on the first business processing subchain through the first cross-chain program, and send the first cross-chain constructed transaction to a second consensus node associated with the first business processing subchain based on the second address, so that the second consensus node mints a target transaction mapping resource corresponding to the first cross-chain constructed transaction on the first business processing subchain through the second address; the target transaction mapping resource has the same resource data content as the target transaction resource.

[0226] It is understood that the second address is determined by the second private key in the first cross-chain program; the second private key is generated by the master key in the first cross-chain program; and the master key is determined by the trusted execution environment in which the first cross-chain program resides. The master key may be the highest-level key in the key hierarchy, based on which the first and second private keys can be generated. Furthermore, because the master key is determined by the trusted execution environment in which the first cross-chain program resides, the security of the master key and the security and privacy of the first and second private keys generated based on the master key can be guaranteed, thereby ensuring the security of the entire data cross-chain process to a certain extent.

[0227] Specifically, the cross-chain service terminal can use the second private key in the first cross-chain program to sign the first cross-chain constructed transaction and obtain the transaction signature information of the first cross-chain constructed transaction; further, when the first cross-chain constructed transaction is sent to the second consensus node associated with the first business processing sub-chain, the transaction signature information of the first cross-chain constructed transaction is synchronously sent to the second consensus node, so that the second consensus node verifies the transaction signature information based on the second public key corresponding to the second private key, and when the transaction verification is successful, the first cross-chain constructed transaction is obtained.

[0228] Among them, it can be understood that when the cross-chain service terminal sends the first cross-chain construction transaction to the second consensus node, it signs the transaction using the second private key, and then the second consensus node can perform transaction verification on the transaction signature information, thereby verifying whether the cross-chain construction transaction is sent by an authorized cross-chain service terminal, and whether it has been tampered with during the transmission of the first cross-chain construction transaction. When the second consensus node succeeds in verifying the transaction signature, it indicates that the cross-chain construction transaction is sent by an authorized cross-chain service terminal and has not been tampered with during the transmission of the first cross-chain construction transaction, and then it can obtain the first cross-chain construction transaction to achieve cross-chain transfer of the first transfer transaction resource. It can be further understood that if the second consensus node fails in verifying the transaction signature, it indicates that the cross-chain construction transaction is not sent by an authorized cross-chain service terminal, or has been tampered with during the transmission of the first cross-chain construction transaction, and then it cannot obtain the first cross-chain construction transaction to achieve cross-chain transfer of the first transfer transaction resource. Optionally, if the second consensus node fails to verify the transaction signature, it may also return a prompt message indicating the transaction signature failure to the cross-chain service terminal, prompting the cross-chain service terminal that the first cross-chain constructed transaction signature verification failed. In this way, the transaction signature can be signed using the second private key of the cross-chain service terminal, ensuring the security and legitimacy of the first cross-chain constructed transaction.

[0229] Among them, it can be understood that the second address is deployed with the contract name and contract address for calling the resource mapping contract on the first business processing sub-chain; the second consensus node is used to call the resource mapping contract through the contract name and contract address in the second address when obtaining the first cross-chain construction transaction, and cast the target transaction mapping resource corresponding to the first cross-chain construction transaction on the first business processing sub-chain.

[0230] Among them, it can be understood that the resource mapping contract (specifically the resource casting method therein) can be used to cast the transaction mapping resource corresponding to the transfer transaction resource indicated by the cross-chain construction transaction, such as the target transaction mapping resource corresponding to the first transfer transaction resource indicated by the first cross-chain construction transaction. It can be understood that the first cross-chain construction transaction is sent to the second consensus node through the second address, that is, the first cross-chain construction transaction is sent to the second consensus node through the contract name and contract address of the resource mapping contract deployed in the second address.

[0231] It can be further understood that the second consensus node casts the target transaction mapping resource corresponding to the first cross-chain construction transaction on the first business processing subchain through the second address, and can cast the target transaction mapping resource corresponding to the first cross-chain construction transaction on the first business processing subchain, and write the target transaction mapping resource into the second address.

[0232] Optionally, it is understood that both the first private key and the second private key are generated from the master key in the first cross-chain program; the first private key is different from the second private key. Specifically, the cross-chain service terminal may further perform key splitting on the master key to obtain N key fragments corresponding to N management components; each management component corresponds to one key fragment; the N key fragments are sent to the target consensus node, so that the target consensus node configures a key fragment for each of the N management components; and one management component is used to perform key backup for one key fragment.

[0233] It is understood that by splitting the master key into N key fragments and then backing up one key fragment by each management component, it is possible to ensure that the first cross-chain program can restore the master key based on the key fragments backed up by the management component after restart, thereby obtaining the first private key and the second private key. This prevents the loss of the first cross-chain program's keys after a power outage, thereby improving the reliability of the cross-chain service provided by the cross-chain service terminal. It is understood that when the first cross-chain program is started based on the first service, the cross-chain service terminal can send the master key to the management consensus node for backup. For example, if there are four management components, the master key can be split into four key fragments: {x1, x2, x3, x4}. After sending these four key fragments to the management consensus node, the management consensus node can configure a key fragment for each management component, such as management component a being assigned key fragment x1, management component b being assigned key fragment x2, management component c being assigned key fragment x3, and management component d being assigned key fragment x4.

[0234] Optionally, it is understandable that when the trusted cross-chain program is restarted, M key fragments sent by the target consensus node are received; one key fragment among the M key fragments comes from one management component among N management components; M is a positive integer less than or equal to N; when M reaches the key quantity threshold corresponding to N, the master key is constructed based on the M key fragments.

[0235] Among them, it can be understood that the key quantity threshold can be determined based on N. For example, the key quantity threshold can be a target ratio of N. For example, the key quantity threshold can be 3 / 4 of N, then when N is 4, the key quantity threshold can be 3, and when N is 8, the key quantity threshold can be 6. It can be understood that the key quantity threshold can be used to indicate the minimum key fragments required to recover the master key. The key quantity threshold can be determined when the key is split. When the cross-chain service terminal obtains a key fragment greater than or equal to the key quantity threshold, it can recover the master key based on the multiple key fragments obtained. This method of backing up the master key can also be called the Shamir (a key sharing method) method.

[0236] Among them, it can be understood that after the second consensus node casts the target transaction mapping resource in the first business processing subchain, the second consensus node can perform corresponding business processing based on the target transaction resource. Optionally, the second consensus node can transfer the target transaction mapping resource in the second address to the subchain user address corresponding to the first business object on the first business processing subchain, and then the second consensus node can process based on the target transaction mapping resource in the subchain user address of the first business object. How the second consensus node performs business processing on the target transaction mapping resource can be indicated by the resource usage in the first cross-chain construction transaction; the second consensus node may also not transfer the target transaction mapping resource to the subchain user address, but directly process based on the target transaction mapping resource in the second address, which is not limited here.

[0237] Among them, it can be understood that, as mentioned above, after the second consensus node performs business processing based on the target transaction mapping resources, it can extract and destroy the resources on the first business processing subchain, and return the target transaction mapping resources to the application contract chain. Optionally, by performing business processing based on the target transaction mapping resources on the first business processing subchain, the business processing result corresponding to the first business can be obtained, and the business processing result can be written to the first business processing subchain. Furthermore, when returning the resources on the first business processing subchain to the application contract chain, the obtained business processing result can also be sent to the first consensus node so that the first consensus node can respond accordingly based on the business processing result. For example, the business processing result is sent to the user terminal of the first business object so that the first business object can clearly understand the processing result of the first business. For example, the first business is used to indicate the creditworthiness of the first business object within a certain period of time, and the loan authority of the first business object can be adjusted according to the creditworthiness indicated by the business processing result.

[0238] In an embodiment of the present application, the multi-blockchain may include a source data chain (i.e., an application contract chain and a bill chain) and a management chain under a three-chain system, and may also include a business processing subchain temporarily generated based on the business for business processing. The business processing subchain is an external blockchain relative to the three-chain system. This solution can realize data cross-chain between the source data chain (e.g., the application contract chain) and the chain outside (i.e., the business processing subchain) by deploying a cross-chain service terminal with a trusted cross-chain program. That is, the cross-chain service terminal can receive a first cross-chain transaction event sent by a management consensus node associated with the management chain through a trusted cross-chain program, and use the target transaction resource in a locked state in the first address on the source data chain, such as the application contract chain, as a transfer transaction resource, thereby constructing a corresponding cross-chain construction transaction based on the transfer transaction resource, and then determine the second address on the business processing subchain, such as the first business processing subchain, through the trusted cross-chain program, and send the cross-chain construction transaction to the consensus node associated with the business processing subchain based on the second address to realize data cross-chain for the target transaction resource. Therefore, the business data in general business scenarios can be transferred across chains outside the chain through the trusted cross-chain program in the cross-chain service terminal. The trusted cross-chain program is in a trusted execution environment and can verify cross-chain transactions, thereby ensuring the correctness of cross-chain data and helping to ensure the security of cross-chain data during the cross-chain transfer of data outside the chain.

[0239] For further information, see Figure 6 , Figure 6 This is a multi-blockchain data processing method provided by the embodiment of the present application, such as Figure 6 As shown, the method can be executed by the above-mentioned cross-chain service terminal. The method can specifically include the following steps S601-S606.

[0240] S601. Receive, through a first cross-chain program, a first cross-chain transaction event sent by a target consensus node based on first cross-chain transaction detection information; the first cross-chain transaction detection information is generated by the target consensus node when detecting that a target transaction resource for a first cross-chain transaction associated with a first business exists in a first address on the first chain, and the target transaction resource is in a locked state; the first cross-chain transaction is determined by the first consensus node associated with the first chain based on the target transaction resource submitted by the first business object, and the first cross-chain transaction is used to instruct the transfer of the target transaction resource from the first chain to the first business processing sub-chain.

[0241] S602: Use the locked target transaction resource as the first transfer transaction resource, verify the first transfer transaction resource based on the first cross-chain transaction event, and if the verification is successful, construct a first cross-chain constructed transaction corresponding to the first cross-chain transaction based on the first transfer transaction resource.

[0242] S603. Determine a second address on the first business processing subchain through the first cross-chain program, and send the first cross-chain constructed transaction to a second consensus node associated with the first business processing subchain based on the second address, so that the second consensus node mints a target transaction mapping resource corresponding to the first cross-chain constructed transaction on the first business processing subchain through the second address; the target transaction mapping resource has the same resource data content as the target transaction resource.

[0243] It is understandable that the specific implementation of steps S601 to S603 can refer to the above steps S501 to S503, and will not be further described here.

[0244] S604. Receive, through the first cross-chain program, a second cross-chain transaction event sent by the target consensus node based on the second cross-chain transaction detection information; the second cross-chain transaction detection information is generated by the target consensus node when detecting that a target transaction mapping resource for a second cross-chain transaction associated with the first business exists in a second address on the first business processing subchain, and the target transaction mapping resource is in a destroyed state; the second cross-chain transaction is determined by the second consensus node based on the target transaction mapping resource submitted by the first business object, and the second cross-chain transaction is used to instruct the target transaction mapping resource to be transferred from the first business processing subchain back to the first chain.

[0245] It can be understood that the second cross-chain transaction event is used to instruct the management consensus node to detect a cross-chain transaction that transfers transaction resources from the first business processing subchain to the application contract chain based on the second address, so that after receiving the second cross-chain transaction event through the first cross-chain program, the cross-chain transaction indicated by the second cross-chain transaction event (i.e., the second cross-chain transaction) can be executed. The second address is determined by the second private key in the first cross-chain program, that is, the first cross-chain program can determine a corresponding second address on the first business processing subchain through the second private key. The management consensus node can then determine whether it is necessary to send a cross-chain transaction event to the first cross-chain program by detecting the transaction mapping resources in the second address and the status of the transaction mapping resources.

[0246] Among them, it can be understood that when the management consensus node detects that there is a transaction mapping resource that needs to be cross-chain in the second address on the first business processing sub-chain, it generates a second cross-chain transaction detection information. The transaction mapping resource that needs to be cross-chain is the target transaction mapping resource transferred to the second address, and the target transaction mapping resource is in a destroyed state. Further, the management consensus node can determine a second cross-chain transaction event to be sent to the first cross-chain program based on the second cross-chain transaction detection information, and send the second cross-chain transaction event to the first cross-chain program, so that the first cross-chain program in the cross-chain service terminal can perform data cross-chain on the target transaction mapping resource based on the instruction of the second cross-chain transaction event.

[0247] It can be understood that the management consensus node includes N management components associated with the second address, where N is a positive integer; one management component is used to generate a transaction detection information in the second cross-chain transaction detection information when detecting that the second address contains a target transaction mapping resource in a destroyed state; and one transaction detection information in the first cross-chain transaction detection information corresponds to a transaction event in the first cross-chain transaction event. In other words, the management consensus node detects the transaction resources and the status of the transaction resources in the second address through N management components. When the management component detects that the second address contains a target transaction mapping resource in a destroyed state, it generates a transaction detection information in the second cross-chain transaction detection information, so that the management consensus node can send the second cross-chain transaction event to the cross-chain service terminal based on the second cross-chain transaction detection information detected by the management component.

[0248] It is understood that the target transaction mapping resource may be a transaction mapping resource minted by the second consensus node based on the target transaction resource associated with the first cross-chain transaction. The target transaction mapping resource and the target transaction resource have the same resource data content.

[0249] Among them, it should be understood that when the first business object needs to return the target transaction mapping resource on the first business processing chain to the application contract chain, the first business object can initiate a second cross-chain transaction to the second consensus node, and then the second consensus node adjusts the target transaction mapping resource existing in the second address to a destroyed state. Optionally, if the target transaction mapping resource is transferred to the sub-chain user address of the first business object on the first business processing sub-chain during business processing, then when the first business object initiates a second cross-chain transaction to the second consensus node, the second consensus node can transfer the target transaction mapping resource in the sub-chain user address to the second address and adjust the target transaction mapping resource to a destroyed state; if the target transaction mapping resource is not transferred to the sub-chain user address of the first business object on the first business processing sub-chain during business processing, then when the first business object initiates a second cross-chain transaction to the second consensus node, the second consensus node directly adjusts the target transaction mapping resource in the second address to a destroyed state.

[0250] Optionally, it is understandable that the second consensus node can transfer the target transaction mapping resource that the first business object needs to return to the application contract chain from the subchain user address on the first business subchain to the second address by calling the second general resource cross-chain bridge contract deployed on the first business processing subchain, and determine the target transaction mapping resource transferred to the second address as a destroyed state, so that the first cross-chain program in the subsequent cross-chain service terminal can transfer the target transaction mapping resource from the second address to the application contract chain. The target transaction mapping resource in the second address is in a destroyed state, but the destruction has not been completed, so the management consensus node can detect the resource information of the target transaction mapping resource in the destroyed state. Optionally, the second consensus node can destroy the target transaction mapping resource transferred to the second address by calling the second general resource cross-chain to indirectly call the resource mapping contract (specifically the resource destruction method therein), so that the target transaction mapping resource in the second address is in a destroyed state. It can be understood that this application is equivalent to using the second address as a transit address for the mapping resource, so that the first cross-chain program in the cross-chain service terminal can quickly detect the cross-chain transaction based on the transaction detection information of the management consensus node for the second address, thereby realizing the cross-chain transfer of the target transaction mapping resource from the first business processing sub-chain to the application contract chain.

[0251] Among them, it can be understood that after the second consensus node performs business processing based on the target transaction mapping resources, it can obtain the business processing results corresponding to the first business, and the second cross-chain transaction can also instruct the business processing results to be transferred from the first business processing sub-chain to the application contract chain. Furthermore, after the first business object submits the second cross-chain transaction to the second consensus node, the second consensus node can also write the business processing results to the second address and determine the business processing results in the second address as a destroyed state, so that the first cross-chain program in the subsequent cross-chain service terminal can transfer the business processing results from the second address to the application contract chain, so that the subsequent first consensus node can make a corresponding response based on the business processing results.

[0252] S605: Mapping the target transaction resource in the destroyed state as a second transfer transaction resource, verifying the second transfer transaction resource based on the second cross-chain transaction event, and constructing a second cross-chain constructed transaction corresponding to the second cross-chain transaction based on the second transfer transaction resource when the verification succeeds.

[0253] It is understood that verifying the second transferred transaction resource based on the second cross-chain transaction event may include comparing and verifying the transaction resources associated with the transaction detection information corresponding to each transaction event in the second cross-chain transaction event. The management consensus node includes N management components associated with the second address, where N is a positive integer; one management component is configured to generate one transaction detection information in the second cross-chain transaction detection information upon detecting the presence of the second transferred transaction resource in the second address; and one transaction detection information in the second cross-chain transaction detection information corresponds to one transaction event in the second cross-chain transaction event. The N management components associated with the second address may be the same as or different from the N management components associated with the first address, and this is not a limitation herein.

[0254] Specifically, the cross-chain service terminal determines a second event number of transaction events associated with N management components from the received second cross-chain transaction event; the second event number is determined by the number of transaction detection information in the second cross-chain transaction detection information associated with the N management components; the second event number is less than or equal to N; further, when the second event number reaches an event number threshold in N, a number of transaction detection information corresponding to the second event number is obtained; further, the transaction resource associated with each transaction detection information in the obtained second cross-chain transaction detection information is used as a second detection resource, and each second detection resource is subjected to a transaction comparison to obtain a second transaction comparison result; further, if the second transaction comparison result indicates a successful comparison, verification success indication information is generated to determine that each second detection resource is a second transfer transaction resource. When verification is determined to be successful based on the verification success indication information, a second cross-chain constructed transaction corresponding to the second cross-chain transaction is constructed based on the second transfer transaction resource. Reference may be made to the process of verifying the first transfer transaction resource based on the first cross-chain transaction event, which will not be repeated here.

[0255] Among them, it is understandable that the cross-chain service terminal can use the second transfer transaction resource as a transaction parameter, and then construct a second cross-chain construction transaction corresponding to the second cross-chain transaction based on the transaction parameter. Optionally, the cross-chain service terminal can also be used to transfer the business processing result to the application contract chain, that is, the cross-chain service terminal can use the second transfer transaction resource (i.e., the target transaction mapping resource in the destroyed state) and the business processing result as transaction parameters, and then construct a second cross-chain construction transaction corresponding to the second cross-chain transaction based on the transaction parameter.

[0256] Among them, it can be understood that the cross-chain service terminal can use the first private key in the first cross-chain program to sign the second cross-chain constructed transaction and obtain the transaction signature information of the second cross-chain constructed transaction; further, when the second cross-chain constructed transaction is sent to the first consensus node associated with the application contract chain, the transaction signature information of the second cross-chain constructed transaction is synchronously sent to the first consensus node, so that the first consensus node verifies the transaction signature information based on the first public key corresponding to the first private key, and when the transaction verification is successful, the second cross-chain constructed transaction is obtained.

[0257] S606. Determine the first address through the first cross-chain program, and send the second cross-chain constructed transaction to the first consensus node based on the first address, so that the first consensus node unlocks the first transfer transaction resource on the first chain through the first address to obtain the target transaction resource.

[0258] Among them, it can be understood that the first cross-chain construction transaction instructs the target transaction mapping resources to be transferred back to the first chain (i.e., the application contract chain). That is, when the first consensus node receives the second cross-chain construction transaction sent by the first cross-chain program of the cross-chain service terminal, it unlocks the target transaction resources in the first address that are in a locked state, thereby obtaining the target transaction resources.

[0259] It is understandable that when the target transaction resources in the first address that are locked are unlocked, the first consensus node can transfer the target transaction resources in the first address back to the contract user address on the application contract chain. This is equivalent to simply transferring the target transaction resources (such as business data) that need to be processed to the first business processing subchain for data processing. After the business processing is completed, the target transaction resources transferred to the first business processing subchain can be transferred back to the original contract user address, thereby reducing the space occupied by the business processing process on the application contract chain and improving the efficiency of the business processing process.

[0260] Among them, it can be understood that when the first consensus node receives the second cross-chain construction transaction, it can also cast the business processing result indicated by the second cross-chain construction transaction on the application contract chain through the first address, thereby enabling the first consensus node to obtain the processing result of the first business associated with the first business object, thereby achieving the purpose of business processing, and by transferring business data to the additional business processing sub-chain added on the basis of the three-chain system, it can improve business processing efficiency to a certain extent and reduce the on-chain space on the application contract chain.

[0261] Optionally, it is understandable that the embodiments of the present application can also be used to implement cross-chain data between the second chain (i.e., the bill chain) contained in the source data chain and the business processing sub-chain. The management consensus node creates a second business processing sub-chain based on the second business associated with the second business object. The second business processing sub-chain can be used to process the second business (such as electronic bill issuance business, electronic bill circulation business, electronic bill redemption business, electronic bill archiving business, and other electronic bill-related businesses). Generally speaking, the second chain (i.e., the bill chain) can include bill data, such as invoice data of some electronic invoices. When the second business object needs to process the bill data, the bill data to be processed can be transferred to the second business processing sub-chain for processing, thereby reducing the waste of space on the bill chain and improving the efficiency of business processing.

[0262] This article introduces the data processing process in the data cross-chain processing system based on multiple blockchains with diagrams. Here, we take the source data chain as the second chain (i.e., the bill chain) and the business sub-processing sub-chain as the second business processing sub-chain as an example to explain the data cross-chain process between the bill chain and the second business processing sub-chain. Figure 7 , Figure 7 This is a schematic diagram of a data cross-chain processing process based on multiple blockchains provided by an embodiment of the present application. First, the management component 702 in the consensus node of the management chain 701 can detect the bill chain 703 and the second business processing sub-chain 704. Specifically, it can detect the third address in the bill chain and the fourth address in the second business processing sub-chain 704. The third address is the aforementioned bill chain transit address, and the fourth address is also equivalent to the transit address on the second business processing sub-chain for transferring resources with the consensus node of the bill chain. The consensus node of the management chain 701 can also be deployed with a management component management contract to manage the management component, such as configuring the blockchain address that the management component uses for detection; the consensus node of the management chain 701 can also be deployed with a trusted cross-chain program management contract to interact with the cross-chain service terminal 705 for data exchange. For example, when the second business object requests to create a second business processing sub-chain 704, the cross-chain service terminal 705 is notified to start the second cross-chain program for realizing data between the second business processing sub-chain and the bill chain. When the management component 702 detects that a bill resource exists at the third address in the bill chain and that the bill resource is in a locked state, the management consensus node of the management chain 701 may send a cross-chain transaction event to the cross-chain service terminal 705, and the cross-chain service terminal 705 may transfer the locked bill resource at the third address to the second business processing sub-chain 704 through the second cross-chain program. When the management component 702 detects that a bill mapping resource exists at the fourth address in the second business processing sub-chain 704 and that the bill resource is in a destroyed state, the management consensus node of the management chain 701 may send a cross-chain transaction event to the cross-chain service terminal 705, and the cross-chain service terminal 705 may transfer the destroyed bill mapping resource at the fourth address back to the bill chain 703 through the second cross-chain program.

[0263] Specifically, it can be understood that the cross-chain service terminal can receive the third cross-chain transaction event sent by the target consensus node based on the third cross-chain transaction detection information through the second cross-chain program; the third cross-chain transaction detection information is generated by the target consensus node when it detects that the target bill resource of the third cross-chain transaction associated with the second business exists in the third address on the second chain, and the target bill resource is in a locked state; the third cross-chain transaction is determined by the third consensus node associated with the second chain based on the target bill resource submitted by the second business object, and the third cross-chain transaction is used to instruct the transfer of the target bill resource from the second chain to the second business processing subchain; the target bill resource in the locked state The target bill resource in the state is used as the first transfer bill resource, and the first transfer bill resource is verified based on the third cross-chain transaction event. When the verification is successful, a third cross-chain construction transaction corresponding to the third cross-chain transaction is constructed based on the first transfer bill resource; the fourth address on the second business processing subchain is determined through the second cross-chain program, and the third cross-chain construction transaction is sent to the fourth consensus node associated with the second business processing subchain based on the fourth address, so that the fourth consensus node casts the target bill mapping resource corresponding to the third cross-chain construction transaction on the second business processing subchain through the fourth address; the target bill mapping resource and the target bill resource have the same resource data content.

[0264] It can be understood that after the fourth consensus node performs corresponding business processing based on the target bill mapping resource, the target bill mapping resource can be transferred back to the second chain (ie, the bill chain). Specifically, the cross-chain service terminal may receive, through the second cross-chain program, a fourth cross-chain transaction event sent by the target consensus node based on the fourth cross-chain transaction detection information; the fourth cross-chain transaction detection information is generated by the target consensus node when detecting that a target bill mapping resource for a fourth cross-chain transaction associated with the second business exists at a fourth address on the second business processing subchain, and the target bill mapping resource is in a destroyed state; the fourth cross-chain transaction is determined by the fourth consensus node based on the target bill mapping resource submitted by the second business object, and the fourth cross-chain transaction is used to instruct the target bill mapping resource to be transferred from the second business processing subchain back to the second chain; further, the target bill mapping resource in the destroyed state is used as the second transfer bill resource, the second transfer bill resource is verified based on the fourth cross-chain transaction event, and when the verification is successful, a fourth cross-chain construction transaction corresponding to the fourth cross-chain transaction is constructed based on the second transfer bill resource; further, a third address is determined through the second cross-chain program, and the fourth cross-chain construction transaction is sent to the third consensus node based on the third address, so that the third consensus node unlocks the first transfer bill resource on the second chain through the third address to obtain the target bill resource.

[0265] It is understandable that the data cross-chain process between the bill chain and the second business processing subchain can refer to the relevant description of the data cross-chain process between the application contract chain and the first business processing subchain. The relevant description of the second business processing subchain can refer to the first business processing subchain, and the relevant description of the fourth address on the second business processing subchain can refer to the second address on the first business processing subchain. The bill chain corresponds to the application contract chain, and the relevant description of the third address on the bill chain can refer to the first address on the application contract chain. The difference is that the first business and the second business can be different, and the content of the resource data to be transferred can also be different. The resources that need to be transferred by the application contract chain are some general resources on the application contract chain (such as credit data, tax information, etc.), and the resources that need to be transferred by the bill chain are bill resources on the bill chain (such as the invoice code, invoice time, invoice amount and other data of the electronic invoice).

[0266] In an embodiment of the present application, the multi-blockchain may include a source data chain (i.e., an application contract chain and a bill chain) and a management chain under a three-chain system, and may also include a business processing subchain temporarily generated based on the business for business processing. The business processing subchain is an external blockchain relative to the three-chain system. This solution can realize data cross-chain between the source data chain (e.g., the application contract chain) and the chain outside (i.e., the business processing subchain) by deploying a cross-chain service terminal with a trusted cross-chain program. That is, the cross-chain service terminal can receive a first cross-chain transaction event sent by a management consensus node associated with the management chain through a trusted cross-chain program, and use the target transaction resource in a locked state in the first address on the source data chain, such as the application contract chain, as a transfer transaction resource, thereby constructing a corresponding cross-chain construction transaction based on the transfer transaction resource, and then determine the second address on the business processing subchain, such as the first business processing subchain, through the trusted cross-chain program, and send the cross-chain construction transaction to the consensus node associated with the business processing subchain based on the second address to realize data cross-chain for the target transaction resource. Therefore, the business data in general business scenarios can be transferred across chains outside the chain through the trusted cross-chain program in the cross-chain service terminal. The trusted cross-chain program is in a trusted execution environment and can verify cross-chain transactions, thereby ensuring the correctness of cross-chain data and helping to ensure the security of cross-chain data during the cross-chain transfer of data outside the chain.

[0267] Based on the above description, the embodiment of this application proposes a data cross-chain method based on multiple blockchains. Here, the source data chain is taken as the first chain (i.e., the application contract chain) and the business sub-processing sub-chain is taken as the first business processing sub-chain as an example to explain the process of transferring resources from the source data chain to the business processing sub-chain. Figure 8 , Figure 8This is a flow chart of a data cross-chain method based on multiple blockchains provided in an embodiment of the present application. The multiple blockchains include a source data chain, a business processing subchain, and a target chain. Data is exchanged between the source data chain and the business processing subchain via a trusted cross-chain program. The source data chain includes a first chain, and the trusted cross-chain program for data exchange with the first chain is the first cross-chain program. The business processing subchain includes a first business processing subchain, which is created by a target consensus node associated with the target chain based on a first business associated with a first business object. The data cross-chain method based on multiple blockchains can be executed by a second consensus node associated with the first business processing subchain. The data cross-chain method based on multiple blockchains can include the following steps.

[0268] S801. Obtain a first cross-chain constructed transaction sent by the first cross-chain program based on the second address on the first business processing subchain; the first cross-chain constructed transaction is constructed by the first cross-chain program when verifying the transfer transaction resource based on the first cross-chain transaction event sent by the target consensus node, and the verification is successful; the transfer transaction resource is a target transaction resource in a locked state; the first cross-chain transaction event is sent by the target consensus node based on the first cross-chain transaction detection information; the first cross-chain transaction detection information is generated by the target consensus node when it detects that the target transaction resource of the first cross-chain transaction associated with the first business exists in the first address on the first chain, and the target transaction resource is in a locked state; the first cross-chain transaction is determined by the first consensus node associated with the first chain based on the target transaction resource submitted by the first business object, and the first cross-chain transaction is used to indicate the transfer of the target transaction resource from the first chain to the first business processing subchain.

[0269] S802: Determine the resource mapping contract for resource mapping through the second address, call the resource mapping contract to mint a target transaction mapping resource corresponding to the first cross-chain constructed transaction on the first business processing subchain, and write the target transaction mapping resource to the second address; the target transaction mapping resource and the target transaction resource have the same resource data content.

[0270] It is understood that the specific implementation of steps S801-S802 can be found in the above Figure 5 The description of the second consensus node in the corresponding embodiment will not be repeated here.

[0271] In an embodiment of the present application, the multi-blockchain may include a source data chain (i.e., an application contract chain and a bill chain) and a management chain under a three-chain system, and may also include a business processing subchain temporarily generated based on the business for business processing. The business processing subchain is an external blockchain relative to the three-chain system. This solution can realize data cross-chain between the source data chain (e.g., the application contract chain) and the chain outside (i.e., the business processing subchain) by deploying a cross-chain service terminal with a trusted cross-chain program. That is, the cross-chain service terminal can receive a first cross-chain transaction event sent by a management consensus node associated with the management chain through a trusted cross-chain program, and use the target transaction resource in a locked state in the first address on the source data chain, such as the application contract chain, as a transfer transaction resource, thereby constructing a corresponding cross-chain construction transaction based on the transfer transaction resource, and then determine the second address on the business processing subchain, such as the first business processing subchain, through the trusted cross-chain program, and send the cross-chain construction transaction to the consensus node associated with the business processing subchain based on the second address to realize data cross-chain for the target transaction resource. Therefore, the business data in general business scenarios can be transferred across chains outside the chain through the trusted cross-chain program in the cross-chain service terminal. The trusted cross-chain program is in a trusted execution environment and can verify cross-chain transactions, thereby ensuring the correctness of cross-chain data and helping to ensure the security of cross-chain data during the cross-chain transfer of data outside the chain.

[0272] Based on the above description, this application embodiment proposes a data cross-chain method based on multiple blockchains. Figure 9 , Figure 9 : This is a flow chart of a data cross-chain method based on multiple blockchains provided in an embodiment of the present application. The multiple blockchains include a source data chain, a business processing subchain, and a target chain. The source data chain and the business processing subchain interact with data through a trusted cross-chain program; the source data chain includes a first chain, and the trusted cross-chain program that interacts with the first chain is a first cross-chain program; the business processing subchain includes a first business processing subchain, and the first business processing subchain is created by a target consensus node associated with the target chain according to a first business associated with a first business object. The data cross-chain method based on multiple blockchains can be executed by a target consensus node associated with the target chain. Here, the source data chain is the first chain (i.e., the application contract chain) and the business sub-processing subchain is the first business processing subchain. As an example, the process of transferring resources from the source data chain to the business processing subchain is explained. The data cross-chain method based on multiple blockchains can include the following steps.

[0273] S901: First cross-chain transaction detection information generated when it is detected that a target transaction resource of a first cross-chain transaction associated with a first business exists in a first address on a first chain, and the target transaction resource is in a locked state;

[0274] S902. Determine, based on the first cross-chain transaction detection information, a first cross-chain transaction event to be sent to the first cross-chain program, and send the first cross-chain transaction event to the first cross-chain program, so that the first cross-chain program verifies the transfer transaction resource based on the first cross-chain transaction event. When the verification is successful, construct, based on the transfer transaction resource, a first cross-chain constructed transaction corresponding to the first cross-chain transaction to be sent to the second consensus node associated with the first business processing subchain; the transfer transaction resource is a target transaction resource in a locked state; the second consensus node is used to, upon obtaining the first cross-chain constructed transaction sent by the first cross-chain program based on the second address on the first business processing subchain, mint a target transaction mapping resource corresponding to the first cross-chain constructed transaction on the first business processing subchain through the second address; the target transaction mapping resource has the same resource data content as the target transaction resource.

[0275] It is understood that the specific implementation of steps 901 to 902 can be found in the above Figure 5 The description of the management consensus node in the corresponding embodiment will not be repeated here.

[0276] In an embodiment of the present application, the multi-blockchain may include a source data chain (i.e., an application contract chain and a bill chain) and a management chain under a three-chain system, and may also include a business processing subchain temporarily generated based on the business for business processing. The business processing subchain is an external blockchain relative to the three-chain system. This solution can realize data cross-chain between the source data chain (e.g., the application contract chain) and the chain outside (i.e., the business processing subchain) by deploying a cross-chain service terminal with a trusted cross-chain program. That is, the cross-chain service terminal can receive a first cross-chain transaction event sent by a management consensus node associated with the management chain through a trusted cross-chain program, and use the target transaction resource in a locked state in the first address on the source data chain, such as the application contract chain, as a transfer transaction resource, thereby constructing a corresponding cross-chain construction transaction based on the transfer transaction resource, and then determine the second address on the business processing subchain, such as the first business processing subchain, through the trusted cross-chain program, and send the cross-chain construction transaction to the consensus node associated with the business processing subchain based on the second address to realize data cross-chain for the target transaction resource. Therefore, the business data in general business scenarios can be transferred across chains outside the chain through the trusted cross-chain program in the cross-chain service terminal. The trusted cross-chain program is in a trusted execution environment and can verify cross-chain transactions, thereby ensuring the correctness of cross-chain data and helping to ensure the security of cross-chain data during the cross-chain transfer of data outside the chain.

[0277] For further information, see Figure 10 , Figure 10 This is a schematic diagram of the structure of a data cross-chain device based on multiple blockchains provided by this application. Figure 10As shown, the multi-blockchain data processing device 1 can be applied to a cross-chain service terminal, which is used to isolate the source data chain and the business processing sub-chain in the multi-blockchain; the source data chain includes a first chain, and the trusted cross-chain program that interacts with the first chain for data is the first cross-chain program; the business processing sub-chain includes a first business processing sub-chain, and the first business processing sub-chain is a target consensus node associated with the target chain in the multi-blockchain created according to the first business associated with the first business object. It should be understood that the multi-blockchain data processing device 1 can be a computer program (including program code) running in the cross-chain service terminal, for example, the multi-blockchain data processing device 1 can be an application software; it can be understood that the multi-blockchain data processing device 1 can be used to execute the corresponding steps in the method provided in the embodiment of the present application. As Figure 10 As shown, the multi-blockchain data processing device 1 may include: an event receiving module 11, a data processing module 12 and a data sending module 13;

[0278] The event receiving module 11 is configured to receive, through the first cross-chain program, a first cross-chain transaction event sent by the target consensus node based on the first cross-chain transaction detection information; the first cross-chain transaction detection information is generated by the target consensus node when detecting that a target transaction resource for a first cross-chain transaction associated with a first business exists in a first address on the first chain, and the target transaction resource is in a locked state; the first cross-chain transaction is determined by the first consensus node associated with the first chain based on the target transaction resource submitted by the first business object, and the first cross-chain transaction is used to instruct the transfer of the target transaction resource from the first chain to the first business processing subchain;

[0279] The data processing module 12 is configured to use the locked target transaction resource as a first transfer transaction resource, verify the first transfer transaction resource based on the first cross-chain transaction event, and, if the verification is successful, construct a first cross-chain constructed transaction corresponding to the first cross-chain transaction based on the first transfer transaction resource;

[0280] The data sending module 13 is used to determine the second address on the first business processing subchain through the first cross-chain program, and send the first cross-chain construction transaction to the second consensus node associated with the first business processing subchain based on the second address, so that the second consensus node mints the target transaction mapping resource corresponding to the first cross-chain construction transaction on the first business processing subchain through the second address; the target transaction mapping resource has the same resource data content as the target transaction resource.

[0281] The target consensus node includes N management components associated with the first address, where N is a positive integer; one management component is configured to generate one transaction detection information in the first cross-chain transaction detection information when detecting the presence of the first transfer transaction resource in the first address; one transaction detection information in the first cross-chain transaction detection information corresponds to one transaction event in the first cross-chain transaction event;

[0282] The data processing module 12 includes: an event quantity determination unit 121, a transaction detection information acquisition unit 122, a transaction comparison unit 123, and a transaction verification unit 124;

[0283] An event number determining unit 121 is configured to determine a first event number of transaction events associated with N management components from the received first cross-chain transaction event; the first event number is determined by the number of transaction detection information in the first cross-chain transaction detection information associated with the N management components; the first event number is less than or equal to N;

[0284] The transaction detection information acquisition unit 122 is configured to acquire transaction detection information corresponding to a number of information equal to the number of first events when the number of first events reaches an event number threshold in N;

[0285] The transaction comparison unit 123 is configured to use the transaction resource associated with each transaction detection information in the obtained first cross-chain transaction detection information as a first detection resource, perform transaction comparison on each first detection resource, and obtain a first transaction comparison result;

[0286] The transaction verification unit 124 is configured to generate verification success indication information for determining that each of the first detection resources is a first transfer transaction resource if the first transaction comparison result indicates a successful comparison; and when verification is determined to be successful based on the verification success indication information, construct a first cross-chain constructed transaction corresponding to the first cross-chain transaction based on the first transfer transaction resource.

[0287] The transaction verification unit 124 includes: a dependency data acquisition unit 1241 and an information verification unit 1242;

[0288] The dependency data acquisition unit 1241 is configured to acquire dependency data information corresponding to the first transfer transaction resource from the first chain;

[0289] The information verification unit 1242 is configured to verify the dependent data information and, when the information verification succeeds, construct a first cross-chain constructed transaction corresponding to the first cross-chain transaction based on the dependent data information and the first transfer transaction resource.

[0290] The first chain is deployed with a first universal resource cross-chain bridge contract for data interaction with the first cross-chain program; the first universal resource cross-chain bridge contract is used to instruct the first consensus node to specify the resource usage of the target transaction resource corresponding to the first cross-chain exchange when transferring the target transaction resource to the first address; the dependent data information includes the resource usage;

[0291] The information verification unit 1242 is further configured to use the resource usage and the first transfer transaction resource as transaction parameters, and construct a first cross-chain construction transaction corresponding to the first cross-chain transaction based on the transaction parameters.

[0292] Among them, the second address is deployed with the contract name and contract address for calling the resource mapping contract on the first business processing subchain; the second consensus node is used to call the resource mapping contract through the contract name and contract address in the second address when obtaining the first cross-chain construction transaction, and mint the target transaction mapping resource corresponding to the first cross-chain construction transaction on the first business processing subchain.

[0293] The second address is determined by the second private key in the first cross-chain program; the second private key is generated by the master key in the first cross-chain program; the master key is determined by the trusted execution environment in which the first cross-chain program is located;

[0294] The data sending module 13 includes a transaction signature unit 131 and a signature sending unit 132 .

[0295] The transaction signing unit 131 is configured to sign the first cross-chain constructed transaction using the second private key in the first cross-chain program to obtain transaction signature information of the first cross-chain constructed transaction;

[0296] The signature sending unit 132 is used to synchronously send the transaction signature information of the first cross-chain constructed transaction to the second consensus node when sending the first cross-chain constructed transaction to the second consensus node associated with the first business processing sub-chain, so that the second consensus node can verify the transaction signature information based on the second public key corresponding to the second private key, and obtain the first cross-chain constructed transaction when the transaction verification is successful.

[0297] Among them, the event receiving module 11 is further used to receive, through the first cross-chain program, a second cross-chain transaction event sent by the target consensus node based on the second cross-chain transaction detection information; the second cross-chain transaction detection information is generated by the target consensus node when detecting that the second address on the first business processing subchain contains a target transaction mapping resource of the second cross-chain transaction associated with the first business, and the target transaction mapping resource is in a destroyed state; the second cross-chain transaction is determined by the second consensus node based on the target transaction mapping resource submitted by the first business object, and the second cross-chain transaction is used to instruct the target transaction mapping resource to be transferred from the first business processing subchain back to the first chain;

[0298] The data processing module 12 is further configured to use the target transaction mapping resource in the destroyed state as a second transfer transaction resource, verify the second transfer transaction resource based on the second cross-chain transaction event, and, if the verification is successful, construct a second cross-chain constructed transaction corresponding to the second cross-chain transaction based on the second transfer transaction resource;

[0299] The data sending module 13 is further used to determine the first address through the first cross-chain program, and send the second cross-chain constructed transaction to the first consensus node based on the first address, so that the first consensus node unlocks the first transfer transaction resource on the first chain through the first address to obtain the target transaction resource.

[0300] The target consensus node includes N management components associated with the second address, where N is a positive integer; one management component is configured to generate one transaction detection information in the second cross-chain transaction detection information when detecting the presence of a second transfer transaction resource in the second address; one transaction detection information in the second cross-chain transaction detection information corresponds to one transaction event in the second cross-chain transaction event;

[0301] The data processing module 12 includes: an event quantity determination unit 121, a transaction detection information acquisition unit 122, a transaction comparison unit 123, and a transaction verification unit 124;

[0302] The event number determining unit 121 is further configured to determine a second event number of transaction events associated with the N management components from the received second cross-chain transaction event; the second event number is determined by the number of transaction detection information in the second cross-chain transaction detection information associated with the N management components; the second event number is less than or equal to N;

[0303] The transaction detection information acquisition unit 122 is further configured to acquire transaction detection information corresponding to a number of information equal to the number of second events when the number of second events reaches an event number threshold in N;

[0304] The transaction comparison unit 123 is further configured to use the transaction resource associated with each transaction detection information in the obtained second cross-chain transaction detection information as a second detection resource, perform transaction comparison on each second detection resource, and obtain a second transaction comparison result;

[0305] The transaction verification unit 124 is further configured to generate verification success indication information for determining that each second detection resource is a second transfer transaction resource if the second transaction comparison result indicates a successful comparison; and when verification is determined to be successful based on the verification success indication information, construct a second cross-chain constructed transaction corresponding to the second cross-chain transaction based on the second transfer transaction resource.

[0306] The source data chain includes the second chain; the trusted cross-chain program that interacts with the second chain is the second cross-chain program; the business processing subchain includes the second business processing subchain, and the second business processing subchain is created by the target consensus node based on the second business associated with the second business object;

[0307] The event receiving module 11 is further configured to receive, through the second cross-chain program, a third cross-chain transaction event sent by the target consensus node based on the third cross-chain transaction detection information; the third cross-chain transaction detection information is generated by the target consensus node when detecting that a target bill resource for a third cross-chain transaction associated with the second business exists in a third address on the second chain, and the target bill resource is in a locked state; the third cross-chain transaction is determined by the third consensus node associated with the second chain based on the target bill resource submitted by the second business object, and the third cross-chain transaction is used to instruct the transfer of the target bill resource from the second chain to the second business processing subchain;

[0308] The data processing module 12 is further configured to use the locked target bill resource as the first transfer bill resource, verify the first transfer bill resource based on the third cross-chain transaction event, and, if the verification is successful, construct a third cross-chain constructed transaction corresponding to the third cross-chain transaction based on the first transfer bill resource;

[0309] The data processing module 13 is further configured to determine, through the second cross-chain program, a fourth address on the second business processing subchain, and send, based on the fourth address, the third cross-chain construction transaction to a fourth consensus node associated with the second business processing subchain, so that the fourth consensus node mints a target bill mapping resource corresponding to the third cross-chain construction transaction on the second business processing subchain through the fourth address; the target bill mapping resource and the target bill resource have the same resource data content.

[0310] Among them, the event receiving module 11 is further used to receive, through the second cross-chain program, a fourth cross-chain transaction event sent by the target consensus node based on the fourth cross-chain transaction detection information; the fourth cross-chain transaction detection information is generated by the target consensus node when detecting that a target bill mapping resource of a fourth cross-chain transaction associated with the second business exists in the fourth address on the second business processing subchain, and the target bill mapping resource is in a destroyed state; the fourth cross-chain transaction is determined by the fourth consensus node based on the target bill mapping resource submitted by the second business object, and the fourth cross-chain transaction is used to instruct the target bill mapping resource to be transferred from the second business processing subchain back to the second chain;

[0311] The data processing module 12 is further configured to use the target bill mapping resource in the destroyed state as the second transfer bill resource, verify the second transfer bill resource based on the fourth cross-chain transaction event, and, if the verification is successful, construct a fourth cross-chain constructed transaction corresponding to the fourth cross-chain transaction based on the second transfer bill resource;

[0312] The data processing module 13 determines the third address through the second cross-chain program, and sends the fourth cross-chain constructed transaction to the third consensus node based on the third address, so that the third consensus node unlocks the first transferred bill resource on the second chain through the third address to obtain the target bill resource.

[0313] The first address is determined by the first private key in the first cross-chain program; the second address is determined by the second private key in the first cross-chain program; both the first private key and the second private key are generated from the master key in the first cross-chain program; the first private key is different from the second private key; the target consensus node includes N management components; N is a positive integer;

[0314] The data processing module 12 includes: a key splitting unit 125 and a key sending unit 126;

[0315] The key splitting unit 125 is used to split the master key to obtain N key fragments corresponding to N management components; one management component corresponds to one key fragment;

[0316] The key sending unit 126 is used to send N key fragments to the target consensus node, so that the target consensus node configures a key fragment for each of the N management components; one management component is used to perform key backup for one key fragment.

[0317] The data processing module 12 includes: a key receiving unit 127 and a key building unit 128;

[0318] The key receiving unit 127 is configured to receive M key fragments sent by the target consensus node when the trusted cross-chain program is restarted; one of the M key fragments comes from one of the N management components; M is a positive integer less than or equal to N;

[0319] The key construction unit 128 is configured to construct a master key based on the M key fragments when M reaches a key quantity threshold corresponding to N.

[0320] For further information, see Figure 11 , Figure 11 This is a schematic diagram of the structure of a data cross-chain device based on multiple blockchains provided by this application. Figure 11As shown, the multi-blockchain data processing device 2 can be applied to the second consensus node associated with the first business processing sub-chain. The multi-blockchain includes a source data chain, a business processing sub-chain and a target chain. The source data chain and the business processing sub-chain interact with data through a trusted cross-chain program; the source data chain includes the first chain, and the trusted cross-chain program that interacts with the first chain is the first cross-chain program; the business processing sub-chain includes the first business processing sub-chain, and the first business processing sub-chain is the target consensus node associated with the target chain created according to the first business associated with the first business object. It should be understood that the multi-blockchain data processing device 2 can be a computer program (including program code) running in a cross-chain service terminal. For example, the multi-blockchain data processing device 2 can be an application software; it can be understood that the multi-blockchain data processing device 2 can be used to execute the corresponding steps in the method provided in the embodiment of the present application. As Figure 11 As shown, the multi-blockchain data processing device 2 may include: a cross-chain construction transaction acquisition module 21, a resource casting module 22;

[0321] The cross-chain construction transaction acquisition module 21 is used to obtain the first cross-chain construction transaction sent by the first cross-chain program based on the second address on the first business processing subchain; the first cross-chain construction transaction is constructed by the first cross-chain program when verifying the transfer transaction resource based on the first cross-chain transaction event sent by the target consensus node, and the verification is successful; the transfer transaction resource is the target transaction resource in a locked state; the first cross-chain transaction event is sent by the target consensus node based on the first cross-chain transaction detection information; the first cross-chain transaction detection information is generated by the target consensus node when it detects that the target transaction resource of the first cross-chain transaction associated with the first business exists in the first address on the first chain, and the target transaction resource is in a locked state; the first cross-chain transaction is determined by the first consensus node associated with the first chain based on the target transaction resource submitted by the first business object, and the first cross-chain transaction is used to indicate that the target transaction resource is transferred from the first chain to the first business processing subchain;

[0322] The resource casting module 22 is used to determine the resource mapping contract used for resource mapping through the second address, call the resource mapping contract to cast the target transaction mapping resource corresponding to the first cross-chain construction transaction on the first business processing subchain, and write the target transaction mapping resource to the second address; the target transaction mapping resource and the target transaction resource have the same resource data content.

[0323] For further information, see Figure 12 , Figure 12 This is a schematic diagram of the structure of a data cross-chain device based on multiple blockchains provided by this application. Figure 12As shown, the multi-blockchain data processing device 3 can be applied to the target consensus node. The multi-blockchain includes a source data chain, a business processing sub-chain and a target chain. The source data chain and the business processing sub-chain interact with data through a trusted cross-chain program; the source data chain includes a first chain, and the trusted cross-chain program that interacts with the first chain is a first cross-chain program; the business processing sub-chain includes a first business processing sub-chain, and the first business processing sub-chain is created by the target consensus node associated with the target chain according to the first business associated with the first business object. It should be understood that the multi-blockchain data processing device 3 can be a computer program (including program code) running in a cross-chain service terminal. For example, the multi-blockchain data processing device 3 can be an application software; it can be understood that the multi-blockchain data processing device 3 can be used to execute the corresponding steps in the method provided in the embodiment of the present application. As Figure 12 As shown, the multi-blockchain data processing device 3 may include: a transaction detection module 31, an event sending unit 32;

[0324] The transaction detection module 31 is configured to generate first cross-chain transaction detection information when detecting that a target transaction resource of a first cross-chain transaction associated with a first business exists in a first address on a first chain and that the target transaction resource is in a locked state;

[0325] The event sending unit 32 is used to determine a first cross-chain transaction event to be sent to the first cross-chain program based on the first cross-chain transaction detection information, and send the first cross-chain transaction event to the first cross-chain program, so that the first cross-chain program verifies the transfer transaction resource based on the first cross-chain transaction event, and when the verification is successful, constructs a first cross-chain construction transaction corresponding to the first cross-chain transaction to be sent to the second consensus node associated with the first business processing subchain based on the transfer transaction resource; the transfer transaction resource is a target transaction resource in a locked state; the second consensus node is used to, when obtaining the first cross-chain construction transaction sent by the first cross-chain program based on the second address on the first business processing subchain, cast a target transaction mapping resource corresponding to the first cross-chain construction transaction on the first business processing subchain through the second address; the target transaction mapping resource has the same resource data content as the target transaction resource.

[0326] Further, see Figure 13 , Figure 13 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 13As shown, the computer device 1000 can be a user terminal or a server, and will not be limited here. For ease of understanding, this application takes the computer device as an example of a server. The computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, the user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. As Figure 12 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application.

[0327] The network interface 1004 in the computer device 1000 can also provide network communication functions. Figure 12 In the computer device 1000 shown, the network interface 1004 can provide network communication functions; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to execute the above Figure 5 、 Figure 6 、 Figure 8 or Figure 9 The description of the multi-blockchain data method in the corresponding embodiment can also be performed as described above. Figure 5 、 Figure 6 、 Figure 8 or Figure 9 The description of the multi-blockchain data processing device (i.e., the multi-blockchain data processing device 1, the multi-blockchain data processing device 2, or the multi-blockchain data processing device 3) in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated here.

[0328] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores the computer program executed by the multi-blockchain data processing device 1, the multi-blockchain data processing device 2 or the multi-blockchain data processing device 3 mentioned above, and the computer program includes computer instructions. When the processor executes the computer instructions, it can execute the above-mentioned Figure 5 、 Figure 6、 Figure 8 or Figure 9 The description of the multi-blockchain data processing method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application. As an example, computer instructions can be deployed and executed on a computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed in multiple locations and interconnected by a communication network. Multiple computing devices distributed in multiple locations and interconnected by a communication network can constitute a blockchain system.

[0329] In addition, it should be noted that: the embodiment of the present application also provides a computer program product or computer program, which may include computer instructions, which may be stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions, so that the computer device performs the above Figure 5 、 Figure 6 、 Figure 8 or Figure 9 The description of the multi-blockchain data processing method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated here. For technical details not disclosed in the computer program product or computer program embodiments involved in this application, please refer to the description of the method embodiments of this application.

[0330] For further information, see Figure 14 , Figure 14 This is a schematic diagram of a multi-blockchain data processing system provided by an embodiment of the present application. The multi-blockchain data processing system 4 may include consensus nodes 4a, consensus nodes 4b, consensus nodes 4c and cross-chain service terminals 4d; wherein, consensus node 4a may be the above-mentioned Figure 2 The target consensus node in the target chain network described in the corresponding embodiment can be the target consensus node Figure 1 Any blockchain node in the consensus network 100a shown in FIG. 1 will not be further described here. Among them, the consensus node 4b can be the above Figure 2 The first consensus node in the first chain network described in the corresponding embodiment can be the above Figure 1 Any blockchain node in the consensus network 300a shown will not be described in detail here. Figure 2The second consensus node in the first business processing subchain, cross-chain service terminal 4d, described in the corresponding embodiment, can achieve cross-chain data through a trusted cross-chain program, which will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated.

[0331] It should be noted that for the aforementioned various method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0332] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.

[0333] The modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.

[0334] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0335] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A data cross-chain method based on multiple blockchains, characterized in that: The method is performed by a cross-chain service terminal deployed with a trusted cross-chain program, and the cross-chain service terminal is used to isolate the source data chain and the business processing subchain in the multi-blockchain; the source data chain includes a first chain, and the trusted cross-chain program that interacts with the first chain for data is the first cross-chain program; the business processing subchain includes a first business processing subchain, and the first business processing subchain is created by a target consensus node associated with a target chain in the multi-blockchain according to a first business associated with a first business object; the method includes: Receiving, through the first cross-chain program, a first cross-chain transaction event sent by the target consensus node based on the first cross-chain transaction detection information; the first cross-chain transaction detection information is generated by the target consensus node when detecting that a target transaction resource for the first cross-chain transaction associated with the first business exists in the first address on the first chain, and the target transaction resource is in a locked state; the first cross-chain transaction is determined by the first consensus node associated with the first chain based on the target transaction resource submitted by the first business object, and the first cross-chain transaction is used to instruct the transfer of the target transaction resource from the first chain to the first business processing subchain; Using the locked target transaction resource as the first transfer transaction resource, verifying the first transfer transaction resource based on the first cross-chain transaction event, and constructing a first cross-chain constructed transaction corresponding to the first cross-chain transaction based on the first transfer transaction resource if the verification succeeds; Determine a second address on the first business processing subchain through the first cross-chain program, and send the first cross-chain construction transaction to a second consensus node associated with the first business processing subchain based on the second address, so that the second consensus node mints a target transaction mapping resource corresponding to the first cross-chain construction transaction on the first business processing subchain through the second address; the target transaction mapping resource has the same resource data content as the target transaction resource.

2. The method according to claim 1, characterized in that The target consensus node includes N management components associated with the first address, where N is a positive integer; one management component is configured to generate one transaction detection information in the first cross-chain transaction detection information upon detecting the presence of the first transfer transaction resource in the first address; one transaction detection information in the first cross-chain transaction detection information corresponds to one transaction event in the first cross-chain transaction event; The verifying the first transfer transaction resource based on the first cross-chain transaction event, and constructing a first cross-chain constructed transaction corresponding to the first cross-chain transaction based on the first transfer transaction resource when the verification is successful, includes: Determining a first event number of transaction events associated with the N management components from the received first cross-chain transaction events; the first event number is determined by the number of transaction detection information in the first cross-chain transaction detection information associated with the N management components; the first event number is less than or equal to N; When the number of the first events reaches a threshold number of events in N, acquiring transaction detection information corresponding to a number of information equal to the number of the first events; Using the transaction resources associated with each transaction detection information in the obtained first cross-chain transaction detection information as first detection resources, performing transaction comparison on each first detection resource to obtain a first transaction comparison result; If the first transaction comparison result indicates a successful comparison, verification success indication information is generated to determine that each of the first detection resources is the first transfer transaction resource. When verification is successful based on the verification success indication information, a first cross-chain construction transaction corresponding to the first cross-chain transaction is constructed based on the first transfer transaction resource.

3. The method according to claim 2, characterized in that The constructing of the first cross-chain construction transaction corresponding to the first cross-chain transaction based on the first transfer transaction resource includes: Obtaining dependent data information corresponding to the first transfer transaction resource from the first chain; The dependent data information is verified, and when the information verification succeeds, a first cross-chain constructed transaction corresponding to the first cross-chain transaction is constructed based on the dependent data information and the first transfer transaction resource.

4. The method according to claim 3, characterized in that A first universal resource cross-chain bridge contract for data interaction with the first cross-chain program is deployed on the first chain; the first universal resource cross-chain bridge contract is used to instruct the first consensus node to specify the resource usage of the target transaction resource corresponding to the first cross-chain exchange when transferring the target transaction resource to the first address; the dependency data information includes the resource usage; The constructing a first cross-chain constructed transaction corresponding to the first cross-chain transaction based on the dependent data information and the first transfer transaction resource includes: The resource usage and the first transfer transaction resource are used as transaction parameters, and a first cross-chain construction transaction corresponding to the first cross-chain transaction is constructed based on the transaction parameters.

5. The method according to claim 1, characterized in that: The second address contains a contract name and a contract address for calling a resource mapping contract on the first business processing subchain. The second consensus node is configured to, upon obtaining the first cross-chain construction transaction, call the resource mapping contract using the contract name and the contract address in the second address, and mint the target transaction mapping resource corresponding to the first cross-chain construction transaction on the first business processing subchain.

6. The method according to claim 1, characterized in that The second address is determined by the second private key in the first cross-chain program; the second private key is generated by the master key in the first cross-chain program; The master key is determined by the trusted execution environment in which the first cross-chain program is located; the method further includes: Signing the first cross-chain constructed transaction using the second private key in the first cross-chain program to obtain transaction signature information of the first cross-chain constructed transaction; When the first cross-chain construction transaction is sent to the second consensus node associated with the first business processing sub-chain, the transaction signature information of the first cross-chain construction transaction is synchronously sent to the second consensus node, so that the second consensus node verifies the transaction signature information based on the second public key corresponding to the second private key, and when the transaction verification is successful, the first cross-chain construction transaction is obtained.

7. The method according to claim 1, characterized in that: The method further comprises: Receiving, through the first cross-chain program, a second cross-chain transaction event sent by the target consensus node based on the second cross-chain transaction detection information; the second cross-chain transaction detection information is generated by the target consensus node when detecting that a target transaction mapping resource for a second cross-chain transaction associated with the first business exists in a second address on the first business processing subchain, and the target transaction mapping resource is in a destroyed state; the second cross-chain transaction is determined by the second consensus node based on the target transaction mapping resource submitted by the first business object, and the second cross-chain transaction is used to instruct the transfer of the target transaction mapping resource from the first business processing subchain back to the first chain; The target transaction mapping resource in the destroyed state is used as the second transfer transaction resource, and the second transfer transaction resource is verified based on the second cross-chain transaction event. If the verification is successful, a second cross-chain constructed transaction corresponding to the second cross-chain transaction is constructed based on the second transfer transaction resource; The first address is determined through the first cross-chain program, and the second cross-chain constructed transaction is sent to the first consensus node based on the first address, so that the first consensus node unlocks the first transfer transaction resource on the first chain through the first address to obtain the target transaction resource.

8. The method according to claim 7, characterized in that: The target consensus node includes N management components associated with the second address, where N is a positive integer; one management component is configured to generate one transaction detection information in the second cross-chain transaction detection information upon detecting the presence of the second transfer transaction resource in the second address; one transaction detection information in the second cross-chain transaction detection information corresponds to one transaction event in the second cross-chain transaction event; The verifying the second transfer transaction resource based on the second cross-chain transaction event, and constructing a second cross-chain constructed transaction corresponding to the second cross-chain transaction based on the second transfer transaction resource when the verification is successful, includes: Determining a second event number of transaction events associated with the N management components from the received second cross-chain transaction events; the second event number is determined by the number of transaction detection information in the second cross-chain transaction detection information associated with the N management components; the second event number is less than or equal to N; When the number of the second events reaches the event number threshold in N, acquiring transaction detection information corresponding to a number of information equal to the number of the second events; Using the transaction resource associated with each transaction detection information in the obtained second cross-chain transaction detection information as the second detection resource, performing transaction comparison on each second detection resource to obtain a second transaction comparison result; If the second transaction comparison result indicates a successful comparison, verification success indication information is generated to determine that each of the second detection resources is the second transfer transaction resource. When verification is successful based on the verification success indication information, a second cross-chain construction transaction corresponding to the second cross-chain transaction is constructed based on the second transfer transaction resource.

9. The method according to claim 1, characterized in that The source data chain includes a second chain; the trusted cross-chain program that interacts with the second chain is a second cross-chain program; the business processing subchain includes a second business processing subchain, and the second business processing subchain is created by the target consensus node according to the second business associated with the second business object; the method further includes: Receiving, through the second cross-chain program, a third cross-chain transaction event sent by the target consensus node based on the third cross-chain transaction detection information; the third cross-chain transaction detection information is generated by the target consensus node when detecting that a target bill resource for a third cross-chain transaction associated with the second business exists in a third address on the second chain, and the target bill resource is in a locked state; the third cross-chain transaction is determined by the third consensus node associated with the second chain based on the target bill resource submitted by the second business object, and the third cross-chain transaction is used to instruct the transfer of the target bill resource from the second chain to the second business processing subchain; Using the locked target bill resource as the first transfer bill resource, verifying the first transfer bill resource based on the third cross-chain transaction event, and constructing a third cross-chain constructed transaction corresponding to the third cross-chain transaction based on the first transfer bill resource if the verification succeeds; A fourth address on the second business processing subchain is determined through the second cross-chain program, and the third cross-chain construction transaction is sent to a fourth consensus node associated with the second business processing subchain based on the fourth address, so that the fourth consensus node mints a target bill mapping resource corresponding to the third cross-chain construction transaction on the second business processing subchain through the fourth address; the target bill mapping resource has the same resource data content as the target bill resource.

10. The method according to claim 9, characterized in that: The method further comprises: Receiving, through the second cross-chain program, a fourth cross-chain transaction event sent by the target consensus node based on the fourth cross-chain transaction detection information; the fourth cross-chain transaction detection information is generated by the target consensus node when detecting that a target bill mapping resource for a fourth cross-chain transaction associated with the second business exists in a fourth address on the second business processing subchain, and the target bill mapping resource is in a destroyed state; the fourth cross-chain transaction is determined by the fourth consensus node based on the target bill mapping resource submitted by the second business object, and the fourth cross-chain transaction is used to instruct the target bill mapping resource to be transferred from the second business processing subchain back to the second chain; Using the target bill mapping resource in the destroyed state as the second transfer bill resource, verifying the second transfer bill resource based on the fourth cross-chain transaction event, and constructing a fourth cross-chain constructed transaction corresponding to the fourth cross-chain transaction based on the second transfer bill resource when the verification is successful; The third address is determined through the second cross-chain program, and the fourth cross-chain construction transaction is sent to the third consensus node based on the third address, so that the third consensus node unlocks the first transfer bill resource on the second chain through the third address to obtain the target bill resource.

11. The method according to claim 1, characterized in that: The first address is determined by the first private key in the first cross-chain program; the second address is determined by the second private key in the first cross-chain program; the first private key and the second private key are both generated by the master key in the first cross-chain program; the first private key is different from the second private key; The target consensus node includes N management components; Said N is a positive integer; The method further comprises: Splitting the master key to obtain N key fragments corresponding to the N management components; one management component corresponds to one key fragment; The N key fragments are sent to the target consensus node, so that the target consensus node configures a key fragment for each of the N management components; one management component is used to perform key backup for one key fragment.

12. The method according to claim 11, characterized in that: The method further comprises: When the trusted cross-chain program is restarted, M key fragments are received from the target consensus node; one of the M key fragments comes from one of the N management components; and M is a positive integer less than or equal to N. When M reaches the key quantity threshold corresponding to N, the master key is constructed based on the M key fragments.

13. A data cross-chain method based on multiple blockchains, characterized in that: The multi-blockchain includes a source data chain, a business processing subchain, and a target chain, wherein the source data chain and the business processing subchain interact with each other through a trusted cross-chain program; the source data chain includes a first chain, and the trusted cross-chain program that interacts with the first chain is a first cross-chain program; the business processing subchain includes a first business processing subchain, and the first business processing subchain is created by a target consensus node associated with the target chain according to a first business associated with a first business object; the method is executed by a second consensus node associated with the first business processing subchain, and the method includes: Obtain a first cross-chain constructed transaction sent by the first cross-chain program based on the second address on the first business processing subchain; the first cross-chain constructed transaction is constructed by the first cross-chain program when verifying the transfer transaction resource based on the first cross-chain transaction event sent by the target consensus node, and the verification is successful; the transfer transaction resource is a target transaction resource in a locked state; the first cross-chain transaction event is sent by the target consensus node based on the first cross-chain transaction detection information; the first cross-chain transaction detection information is generated by the target consensus node when it detects that the target transaction resource of the first cross-chain transaction associated with the first business exists in the first address on the first chain, and the target transaction resource is in a locked state; the first cross-chain transaction is determined by the first consensus node associated with the first chain based on the target transaction resource submitted by the first business object, and the first cross-chain transaction is used to instruct the transfer of the target transaction resource from the first chain to the first business processing subchain; The resource mapping contract used for resource mapping is determined through the second address, the resource mapping contract is called to mint a target transaction mapping resource corresponding to the first cross-chain construction transaction on the first business processing subchain, and the target transaction mapping resource is written into the second address; the target transaction mapping resource has the same resource data content as the target transaction resource.

14. A data cross-chain method based on multiple blockchains, characterized in that: The multi-blockchain includes a source data chain, a business processing subchain, and a target chain. The source data chain and the business processing subchain interact with each other through a trusted cross-chain program. The source data chain includes a first chain, and the trusted cross-chain program that interacts with the first chain is a first cross-chain program. The business processing subchain includes a first business processing subchain, and the first business processing subchain is created by a target consensus node associated with the target chain according to a first business associated with a first business object. The method is executed by the target consensus node, and the method includes: First cross-chain transaction detection information generated when it is detected that a target transaction resource of a first cross-chain transaction associated with the first business exists in a first address on the first chain, and the target transaction resource is in a locked state; A first cross-chain transaction event for sending to the first cross-chain program is determined based on the first cross-chain transaction detection information, and the first cross-chain transaction event is sent to the first cross-chain program, so that the first cross-chain program verifies the transfer transaction resource based on the first cross-chain transaction event, and when the verification is successful, a first cross-chain constructed transaction corresponding to the first cross-chain transaction is constructed based on the transfer transaction resource for sending to the second consensus node associated with the first business processing subchain; the transfer transaction resource is a target transaction resource in a locked state; the second consensus node is used to cast a target transaction mapping resource corresponding to the first cross-chain constructed transaction on the first business processing subchain through the second address when obtaining the first cross-chain constructed transaction sent by the first cross-chain program based on the second address on the first business processing subchain; the target transaction mapping resource has the same resource data content as the target transaction resource.

15. A data cross-chain device based on multiple blockchains, characterized in that: The device runs on a cross-chain service terminal deployed with a trusted cross-chain program, and the cross-chain service terminal is used to isolate the source data chain and the business processing sub-chain in the multi-blockchain; the source data chain includes a first chain, and the trusted cross-chain program that interacts with the first chain for data is the first cross-chain program; the business processing sub-chain includes a first business processing sub-chain, and the first business processing sub-chain is created by a target consensus node associated with a target chain in the multi-blockchain according to a first business associated with a first business object; the device includes: An event receiving module, configured to receive, through the first cross-chain program, a first cross-chain transaction event sent by the target consensus node based on first cross-chain transaction detection information; the first cross-chain transaction detection information is generated by the target consensus node when detecting that a target transaction resource for a first cross-chain transaction associated with the first business exists in a first address on the first chain, and the target transaction resource is in a locked state; the first cross-chain transaction is determined by the first consensus node associated with the first chain based on the target transaction resource submitted by the first business object, and the first cross-chain transaction is used to instruct the transfer of the target transaction resource from the first chain to the first business processing subchain; a data processing module, configured to use the locked target transaction resource as a first transfer transaction resource, verify the first transfer transaction resource based on the first cross-chain transaction event, and upon successful verification, construct a first cross-chain constructed transaction corresponding to the first cross-chain transaction based on the first transfer transaction resource; A data sending module is configured to determine a second address on the first business processing subchain through the first cross-chain program, and send the first cross-chain constructed transaction to a second consensus node associated with the first business processing subchain based on the second address, so that the second consensus node mints a target transaction mapping resource corresponding to the first cross-chain constructed transaction on the first business processing subchain through the second address; the target transaction mapping resource has the same resource data content as the target transaction resource.

16. A data cross-chain device based on multiple blockchains, characterized in that: The multi-blockchain includes a source data chain, a business processing subchain, and a target chain, wherein the source data chain and the business processing subchain interact with each other through a trusted cross-chain program; the source data chain includes a first chain, and the trusted cross-chain program that interacts with the first chain is a first cross-chain program; the business processing subchain includes a first business processing subchain, and the first business processing subchain is created by a target consensus node associated with the target chain according to a first business associated with a first business object; The device runs on a second consensus node associated with the first business processing sub-chain, and includes: A cross-chain construction transaction acquisition module is used to obtain a first cross-chain construction transaction sent by the first cross-chain program based on the second address on the first business processing subchain; the first cross-chain construction transaction is constructed by the first cross-chain program when verifying the transfer transaction resource based on the first cross-chain transaction event sent by the target consensus node, and the verification is successful; the transfer transaction resource is a target transaction resource in a locked state; the first cross-chain transaction event is sent by the target consensus node based on the first cross-chain transaction detection information; the first cross-chain transaction detection information is generated by the target consensus node when it detects that the target transaction resource of the first cross-chain transaction associated with the first business exists in the first address on the first chain, and the target transaction resource is in a locked state; the first cross-chain transaction is determined by the first consensus node associated with the first chain based on the target transaction resource submitted by the first business object, and the first cross-chain transaction is used to instruct the transfer of the target transaction resource from the first chain to the first business processing subchain; A resource casting module is configured to determine a resource mapping contract for resource mapping through the second address, call the resource mapping contract to cast a target transaction mapping resource corresponding to the first cross-chain constructed transaction on the first business processing subchain, and write the target transaction mapping resource to the second address; the target transaction mapping resource has the same resource data content as the target transaction resource.

17. A data cross-chain device based on multiple blockchains, characterized in that: The multi-blockchain includes a source data chain, a business processing subchain, and a target chain. The source data chain and the business processing subchain interact with each other through a trusted cross-chain program. The source data chain includes a first chain, and the trusted cross-chain program that interacts with the first chain is a first cross-chain program. The business processing subchain includes a first business processing subchain, and the first business processing subchain is created by a target consensus node associated with the target chain according to a first business associated with a first business object. The device runs on the target consensus node, and the device includes: a transaction detection module, configured to generate first cross-chain transaction detection information when detecting that a target transaction resource of a first cross-chain transaction associated with the first business exists in a first address on the first chain and that the target transaction resource is in a locked state; An event sending unit is configured to determine a first cross-chain transaction event to be sent to the first cross-chain program based on the first cross-chain transaction detection information, and send the first cross-chain transaction event to the first cross-chain program, so that the first cross-chain program verifies the transfer transaction resource based on the first cross-chain transaction event, and when the verification is successful, constructs a first cross-chain constructed transaction corresponding to the first cross-chain transaction for sending to the second consensus node associated with the first business processing subchain based on the transfer transaction resource; the transfer transaction resource is a target transaction resource in a locked state; the second consensus node is configured to, when obtaining the first cross-chain constructed transaction sent by the first cross-chain program based on the second address on the first business processing subchain, cast a target transaction mapping resource corresponding to the first cross-chain constructed transaction on the first business processing subchain through the second address; the target transaction mapping resource has the same resource data content as the target transaction resource.

18. A data cross-chain system based on multiple blockchains, characterized by: The system includes: a target consensus node associated with a target chain, a cross-chain service terminal, a first consensus node associated with a first chain, and a first consensus node associated with a first business processing subchain; the cross-chain service terminal is used to isolate the source data chain and the business processing subchain in the multi-blockchain; a trusted cross-chain program for data interaction with the first chain is a first cross-chain program; the first business processing subchain is created by the target consensus node associated with the target chain in the multi-blockchain according to a first business associated with a first business object; The target consensus node is configured to send a first cross-chain transaction event based on the first cross-chain transaction detection information; the first cross-chain transaction detection information is generated by the target consensus node when detecting that a target transaction resource for the first cross-chain transaction associated with the first business exists in the first address on the first chain, and the target transaction resource is in a locked state; The first consensus node is configured to determine the first cross-chain transaction based on the target transaction resource submitted by the first business object, where the first cross-chain transaction is configured to instruct the transfer of the target transaction resource from the first chain to the first business processing subchain; The cross-chain service terminal is configured to receive, through the first cross-chain program, a first cross-chain transaction event sent by the target consensus node based on the first cross-chain transaction detection information; The cross-chain service terminal is further configured to use the locked target transaction resource as a first transfer transaction resource, verify the first transfer transaction resource based on the first cross-chain transaction event, and upon successful verification, construct a first cross-chain constructed transaction corresponding to the first cross-chain transaction based on the first transfer transaction resource; The cross-chain service terminal is further configured to determine a second address on the first business processing subchain through the first cross-chain program, and send the first cross-chain constructed transaction to a second consensus node associated with the first business processing subchain based on the second address; The second consensus node is used to mint a target transaction mapping resource corresponding to the first cross-chain constructed transaction on the first business processing subchain through the second address; the target transaction mapping resource has the same resource data content as the target transaction resource.

19. A computer device, characterized in that: including memory and processor; The memory is connected to the processor, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method according to any one of claims 1 to 14.

20. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 14.

21. A computer program product, characterized in that The method comprises a computer program / instruction, which implements the method according to any one of claims 1 to 14 when executed by a processor.

Citation Information

Patent Citations

  • Cross-chain data transmission method and device, computer equipment and storage medium

    CN112804354A

  • Cross-chain communication method and apparatus for internal network and external network, computer device, and storage medium

    WO2022142405A1