Cross-chain message processing method, supervision system and block chain node

By introducing a regulatory system to the blockchain system to verify the legality of cross-chain messages and transmit the verification results, ensuring the security and compliance of cross-chain transactions, solving the security of cross-chain transactions between blockchain systems and regulatory difficulties.

CN119295081APending Publication Date: 2025-01-10ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411549456.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The security and accuracy of cross-chain transactions between blockchain systems are difficult to guarantee, and the laws and regulations involving multiple jurisdictions are complex, making it difficult to regulate and vulnerable to hackers and fraud.

Method used

Introduce regulatory systems to verify the legitimacy of cross-chain messages, pass the verification results to the relevant blockchain system through the relay system, and execute cross-chain contracts in the blockchain nodes to ensure that the message content complies with preset regulatory policies and prevent malicious behavior. .

Benefits of technology

It has achieved a more secure, accurate and regulated handling of cross-chain transactions, prevented false verification and inconsistent laws and regulations, and enhanced the security and compliance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295081A_ABST
    Figure CN119295081A_ABST
Patent Text Reader

Abstract

A cross-chain message processing method, a supervision system and a block chain node, the method comprising: receiving a verification result corresponding to a cross-chain message from the supervision system, providing the verification result to a first cross-chain contract, the cross-chain message being generated by a second block chain system in a process of executing a first transaction, and the second block chain system being generated by the second block chain system in a process of executing the first transaction; the verification result is obtained by performing legality verification on the cross-chain message by the supervision system, and the legality verification at least comprises verification of whether the message content of the cross-chain message accords with a preset supervision strategy; receiving a first transaction used for calling a first cross-chain contract from the relay system, wherein the first transaction comprises the cross-chain message; and executing the first cross-chain contract according to the first transaction, and processing the cross-chain message according to the verification result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification belong to the field of computer technology, and in particular, to a cross-chain message processing method, a supervision system, and a blockchain node. Background Art

[0002] The blockchain system is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. In the blockchain system, data blocks are combined into a chain data structure in a sequential manner according to time order, and a distributed ledger that cannot be tampered with or forged is guaranteed by cryptography. Due to the characteristics of decentralization, information cannot be tampered with, and autonomy, the blockchain system has received more and more attention and application.

[0003] Multiple different blockchain systems can be connected to the same relay system. For cross-chain messages generated by a blockchain system that need to be sent to other blockchain systems due to executing cross-chain transactions, the relay system can be responsible for verifying the cross-chain messages and passing the cross-chain messages and their corresponding verification results to other blockchain systems.

[0004] It is hoped that there will be a new technical solution that can process cross-chain transactions more securely, accurately and regulatedly. Summary of the invention

[0005] The purpose of the present invention is to provide a cross-chain message processing method, a supervision system and a blockchain node.

[0006] In a first aspect, a method for processing a cross-chain message is provided, the method being executed by a first blockchain system, the method comprising: receiving a verification result corresponding to a cross-chain message from a regulatory system, and providing the verification result to a first cross-chain contract deployed in the first blockchain system, wherein the cross-chain message is generated by a second blockchain system in the process of executing a first transaction, and the verification result is obtained by the regulatory system performing legitimacy verification on the cross-chain message, and the legitimacy verification at least includes verifying whether the message content of the cross-chain message complies with a preset regulatory policy; receiving a first transaction for calling a first cross-chain contract from a relay system, the first transaction including the cross-chain message; executing the first cross-chain contract according to the first transaction, and processing the cross-chain message according to the verification result.

[0007] In a second aspect, a cross-chain message processing method is provided, which is executed by a regulatory system, and the method includes: obtaining a cross-chain message that a second blockchain system is to submit to a first blockchain system through a relay system, wherein the cross-chain message is generated by the second blockchain system in the process of executing a first transaction; performing legitimacy verification on the cross-chain message, wherein the legitimacy verification at least includes verifying whether the message content of the cross-chain message complies with a preset regulatory policy; and sending a verification result corresponding to the cross-chain message to the first blockchain system.

[0008] In a third aspect, a blockchain node is provided, which belongs to a first blockchain system, and the blockchain node includes: a communication processing unit, configured to receive a verification result corresponding to a cross-chain message from a regulatory system, and provide the verification result to a first cross-chain contract deployed in the first blockchain system, wherein the cross-chain message is generated by the second blockchain system in the process of executing a first transaction, and the verification result is obtained by the regulatory system performing a legitimacy verification on the cross-chain message, and the legitimacy verification at least includes verifying whether the message content of the cross-chain message complies with a preset regulatory policy; the communication processing unit is configured to receive a first transaction for calling a first cross-chain contract from a relay system, and the first transaction includes the cross-chain message; a transaction execution unit is configured to execute the first cross-chain contract according to the first transaction, and realize processing of the cross-chain message according to the verification result.

[0009] In a fourth aspect, a supervision system is provided, including: a communication processing unit, configured to obtain a cross-chain message that a second blockchain system is to submit to a first blockchain system through a relay system, wherein the cross-chain message is generated by the second blockchain system in the process of executing a first transaction; a verification processing unit, configured to perform legitimacy verification on the cross-chain message, wherein the legitimacy verification at least includes verifying whether the message content of the cross-chain message complies with a preset supervision policy; the communication processing unit is configured to send a verification result corresponding to the cross-chain message to the first blockchain system.

[0010] In a fifth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computing device, the computing device executes the method described in the first aspect or the second aspect.

[0011] In the technical solution provided by the embodiments of this specification, when the second blockchain system generates a cross-chain message to be sent to the second blockchain system through the relay system due to the execution of a cross-chain transaction, the supervision system can verify the legitimacy of the cross-chain message and obtain the verification result corresponding to the cross-chain message, wherein the legitimacy verification performed at least includes verifying whether the message content of the cross-chain message complies with the preset supervision policy; after the verification result corresponding to the cross-chain message is sent to the first blockchain system by the supervision system, the first blockchain system can provide the verification result to the deployed first cross-chain contract; when the first blockchain system receives a second transaction for calling the first cross-chain contract and containing the cross-chain message from the relay system, the first cross-chain contract can be executed according to the second transaction, thereby realizing the processing of the cross-chain message according to the verification result corresponding to the cross-chain message; in this way, it is conducive to more secure, accurate and regulated processing of cross-chain transactions. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0013] Figure 1 This is an architectural diagram of a blockchain system exemplarily provided in the embodiments of this specification;

[0014] Figure 2 A system architecture diagram provided as an example in the embodiments of this specification;

[0015] Figure 3 A flowchart of a method for processing a cross-chain message provided in an embodiment of this specification;

[0016] Figure 4 A schematic diagram of the contract logic required to be implemented for a cross-chain contract provided as an example in the embodiments of this specification;

[0017] Figure 5 A schematic diagram of a message processing window exemplarily provided in an embodiment of this specification;

[0018] Figure 6 This is a schematic diagram of the structure of a blockchain node provided in an embodiment of this specification. DETAILED DESCRIPTION

[0019] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0020] Figure 1 This is an architectural diagram of a blockchain system provided exemplarily in the embodiments of this specification. The blockchain system may include N blockchain nodes, where Figure 1 8 blockchain nodes, i.e., node 1 to node 8, are shown as examples. The lines between the nodes schematically represent the connection between the nodes, and the aforementioned connection is used to support data transmission between different nodes.

[0021] The blockchain system can provide the function of smart contracts. Smart contracts in the blockchain system are contracts that can be triggered and executed by transactions. Smart contracts can be defined in the form of contract code. Calling a smart contract in the blockchain system is to initiate a transaction pointing to the contract address of the smart contract, so that each node in the blockchain system can run the corresponding contract code in a distributed manner.

[0022] The system data that needs to be persistently stored in the blockchain system can be divided into two parts: block data and status data.

[0023] A transaction in a blockchain system refers to a task unit executed and recorded in the blockchain system. A single transaction usually includes a send field (From), a receive field (To), and a data field (Data). The From field includes the account that initiated the transaction (i.e., the sender account), and the To field may include another account involved / pointed to by the transaction.

[0024] Block data includes one or more blocks that increase in accordance with the block height (or block number). A single block may include a block header and a block body. The block header may include the block hash previous_Hash (or parent hash), timestamp Timestamp, block number BlockNum, state root hash State_Root, transaction root hash Transaction_Root, and receipt root hash Receipt_Root of the previous block. The block body may include a transaction set and a receipt set.

[0025] Cross-chain technology refers to the technology for data interaction and / or resource exchange between different blockchain systems. Cross-chain technology can support the free flow of resources and data in different blockchain systems, allowing users to access and use related resources on multiple blockchain systems by initiating cross-chain transactions to a single blockchain system. In a typical implementation, multiple different blockchain systems can be connected to the same relay system. For cross-chain messages generated by a blockchain system due to the execution of cross-chain transactions and need to be sent to other blockchain systems, the relay system can be responsible for verifying the cross-chain messages and passing the cross-chain messages and their corresponding verification results to other blockchain systems.

[0026] Transferring resources or data between different blockchain systems through cross-chain messages is very likely to become a target of hacker attacks and fraud, for example, by providing false verification results for cross-chain messages through malicious relay systems. Moreover, the multiple blockchain systems involved in cross-chain transactions may belong to different jurisdictions, and different jurisdictions have different laws / regulations on the flow of assets and / or data. The cross-chain messages required to interact between different blockchain systems must also comply with the laws and regulations of the relevant jurisdictions. Therefore, a new technical solution is needed to process cross-chain transactions more safely, accurately and in a regulated manner.

[0027] The embodiments of this specification at least provide a method for processing cross-chain messages, a supervision system, and a blockchain node. When the second blockchain system generates a cross-chain message to be sent to the second blockchain system through the relay system due to the execution of a cross-chain transaction, the supervision system can verify the legitimacy of the cross-chain message and obtain the verification result corresponding to the cross-chain message, wherein the legitimacy verification performed at least includes verifying whether the message content of the cross-chain message complies with the preset supervision policy; after the cross-chain message is sent to the first blockchain system by the supervision system, the first blockchain system can provide the deployed verification contract to the deployed first cross-chain contract; when the first blockchain system receives a second transaction for calling the first cross-chain contract and containing the cross-chain message from the relay system, the first cross-chain contract can be executed according to the second transaction, thereby processing the cross-chain message according to the verification result. In this way, it is conducive to more secure, accurate and regulated processing of cross-chain transactions.

[0028] Figure 2 This is a system architecture diagram provided as an example in the embodiments of this specification. Figure 2As shown, the first blockchain system 11 and the second blockchain system 12 are both connected to the relay system 20 and the supervision system 30; the first business contract, the first verification contract and the first cross-chain contract can be deployed in the first blockchain system 11; the second business contract, the second verification contract and the second cross-chain contract can be deployed in the second blockchain system. The first cross-chain contract and the second cross-chain contract can usually be system contracts. The specific functions of each smart contract in the above examples will be described in detail below.

[0029] Figure 3 This is a flowchart of a method for processing a cross-chain message provided in an embodiment of this specification. The method exemplarily describes the detailed process of the relay system, the supervision system and the first blockchain system jointly processing the cross-chain message after the second blockchain system generates a cross-chain message that needs to be sent by the first blockchain system due to the execution of a cross-chain transaction (i.e., the first transaction).

[0030] Reference Figure 3 As shown, the method may include but is not limited to part or all of the following steps S301 to S315.

[0031] In step S301, the relay system obtains a cross-chain message M1 from the second blockchain system to be sent to the first blockchain system through the relay system. The cross-chain message M1 is generated by the second blockchain system in the process of executing the first transaction.

[0032] Reference Figure 2 As shown, the first transaction can be a cross-chain transaction for calling the second business contract. In the process of executing the first transaction, the second blockchain system 12 can obtain part or all of the message content of the cross-chain message M1 (hereinafter referred to as the message body of the cross-chain message M1) by executing the second business contract; the second business contract can also call the second cross-chain contract, so that the second cross-chain contract generates a cross-chain event E1 containing the cross-chain message M1 based on the message body of the cross-chain message M1. Accordingly, the relay system 20 can monitor the cross-chain event E1 generated by the second cross-chain contract through the corresponding event monitoring mechanism, and obtain the cross-chain message M1 to be sent to the first blockchain system 11 through the relay system 20 from the cross-chain event E1.

[0033] Depending on the specific technical scenario and the transaction that the cross-chain message is expected to execute, the data structure of the message body of different cross-chain messages and the data content contained therein may be different, and they are not limited here. In a typical example, the message body of the cross-chain message M1 is used to call the first business contract; then, the message body of the cross-chain message M1 includes at least the contract address of the first business contract and the calling parameters for the first business contract, and the calling parameters may include but are not limited to one or more of the following information: the sender account address of the first transaction, a target account registered in the first blockchain system, and the resource transfer share of a certain resource S1 expected to be transferred from the sender account address to the target account.

[0034] The message content of the cross-chain message M1, in addition to the message body, may also include the message sequence number of the cross-chain message M1 itself corresponding to the target cross-chain channel to which it belongs, where the target cross-chain channel is used to describe the starting node and ending node of the cross-chain message M1; in addition, it may also include the channel identifier of the target cross-chain channel. Exemplarily, when the second business contract calls the second cross-chain contract to generate the cross-chain event E1, the second cross-chain contract can obtain the contract address of the second business contract. In addition, the second cross-chain contract can also obtain the contract address of the first business contract that the message body expects to call from the cross-chain message M1, thereby determining the second business contract as the starting node of the target cross-chain channel according to the contract address of the second business contract, and determining the first business contract as the ending node of the target cross-chain channel according to the contract address of the first business contract, and then determining the channel identifier of the target cross-chain channel according to the starting node and the ending node of the target cross-chain channel, and determining the message sequence number of the cross-chain message M1 corresponding to the target cross-chain channel to which it belongs; finally, the cross-chain message M1 is composed using the channel identifier of the target cross-chain channel, the message sequence number on the target cross-chain channel corresponding to the cross-chain message M1 itself, and the message body of the cross-chain message M1.

[0035] The above description of the cross-chain channel is exemplary. For example, in some technical scenarios, in the target cross-chain channel to which the cross-chain message M1 belongs, the starting node may be the second blockchain system 12 and the ending node may be the first blockchain system 11.

[0036] In some technical scenarios, the first blockchain system and the second blockchain system can be two shards / subnets of the same blockchain system. In this case, if the account status corresponding to the account address of the initiator of the first transaction is stored in the second blockchain system, and the account status corresponding to the account address of the recipient of the first transaction is stored in the first blockchain system. Then, the first transaction may be a transfer transaction rather than a contract call transaction. Correspondingly, in the process of executing the first transaction, the second blockchain system may also directly generate a cross-chain message that is expected to be sent to the first blockchain system through the relay system.

[0037] Step S303: The supervision system obtains the cross-chain message M1.

[0038] Reference Figure 2 As shown, the second cross-chain contract, under the call of the second business contract, can not only generate a cross-chain event E1, but also call the second verification contract, so that the second verification contract generates a verification event E2 containing a cross-chain message M1; the supervision system 30 can monitor the verification event E2 generated by the second verification contract through the corresponding event monitoring mechanism, and then obtain the cross-chain message M1 to be sent to the first blockchain system 11 through the relay system 20 from the verification event E2.

[0039] Alternatively, the second verification contract may not be deployed in the second blockchain system 12, and the supervision system 30 may monitor the cross-chain event E1 generated by the second cross-chain contract through a corresponding event monitoring mechanism, and obtain the cross-chain message M1 from the cross-chain event E1.

[0040] Alternatively, the supervision system 30 may also obtain the cross-chain message M1 from the relay system 20. For example, after the relay system 20 obtains the cross-chain message M1, the relay system 20 may distribute the obtained cross-chain message M1 to the supervision system 30.

[0041] Step S305: The regulatory system verifies the legitimacy of the cross-chain message M1, which at least includes verifying whether the message content of the cross-chain message M1 complies with the preset regulatory policy.

[0042] The preset regulatory strategy should at least comply with the regulatory requirements of the jurisdiction to which the second blockchain system belongs, and may also need to comply with the regulatory requirements of the jurisdiction to which the first blockchain system belongs; in short, the preset regulatory strategy can be reasonably set in combination with the actual regulatory requirements. For example, the regulatory requirements of the jurisdiction to which the second blockchain system 12 belongs for the second blockchain system 12 may include prohibiting some high-risk accounts from transferring resources or data to other blockchain systems. The message content (such as the message body) of the cross-chain message M1 may include the sender account address of the first transaction. If the sender account address belongs to a high-risk account, it can be confirmed that the cross-chain message M1 does not comply with the preset regulatory strategy; for another example, the regulatory requirements of the jurisdiction to which the second blockchain system 12 belongs for the second blockchain system 12 may limit the resource transfer amount of a certain resource S1. The message content of the cross-chain message M1 may include the resource transfer share of the resource S1. If the resource transfer share included in the message content is greater than a certain preset amount, it can be confirmed that the cross-chain message M1 does not comply with the preset regulatory strategy.

[0043] The legitimacy verification of the cross-chain message M1 by the regulatory system can not only verify whether the message content of the cross-chain message M1 complies with the preset regulatory policy, but also verify the validity of the cross-chain message M1 in the second blockchain system. The purpose of verifying the validity of the cross-chain message M1 in the second blockchain system is to confirm that the cross-chain message M1 is indeed generated by the second blockchain system correctly executing a cross-chain transaction, and the target transaction that needs to be executed in the second blockchain system in the cross-chain transaction has been completed, and the execution result of the target transaction is already unchangeable in the second blockchain system. Validity verification can avoid providing the first blockchain system with a cross-chain message M1 whose integrity has been compromised, thereby avoiding various possible security risks caused by the first blockchain system correctly executing the cross-chain message M1 whose integrity has been compromised.

[0044] The cross-chain event E1 and / or the verification event E2 usually exist in the receipt of the first transaction. Therefore, when verifying the validity of the cross-chain message M1, the regulatory system can obtain the block content of the target block of the first transaction in the second blockchain system by pulling blocks, as well as the signature set of the blockchain node in the second blockchain system for the target block. In addition, the regulatory system can also obtain the consensus node list corresponding to the target block from any blockchain node in the second blockchain system, and then perform the following verification items 1 to 3 based on the above-mentioned information obtained:

[0045] Verification Item 1: Verify whether the cross-chain message M1 exists in the receipt of the first transaction. If so, verification item 1 passes verification;

[0046] Verification Item 2: Calculate the receipt root (Receipt_Root) based on the receipt of the first transaction to which the cross-chain message M1 belongs and the receipts of other transactions in the target block. Determine whether the receipt of the first transaction to which the cross-chain message M1 belongs is indeed anchored by the target block based on the calculated receipt root. If so, Verification Item 2 passes verification;

[0047] Verification Item 3: Verify whether the signature set of the target block is legal based on the consensus node list. If so, it means that the cross-chain message M1 has existence and integrity in the second blockchain system, and Verification Item 3 passes verification.

[0048] When the aforementioned verification items 1 to 3 are all verified, the cross-chain message M1 passes the validity verification in the regulatory system.

[0049] It can be understood that the aforementioned process of verifying the validity of the cross-chain message M1 is exemplary, and it can obviously also be implemented by other verification methods based on Simplified Payment Verification (SPV).

[0050] The supervision system may adopt a multi-node verification mode, that is, the supervision system may include M verification nodes greater than 1, and preset supervision policies may be deployed in some or all of the M verification nodes, and the M nodes may respectively implement relevant verification operations on the cross-chain message M1. Exemplarily, the M verification nodes may be divided into N first verification nodes and MN second verification nodes deployed with preset supervision policies; wherein the first verification node is used to verify the validity of the cross-chain message in the second blockchain system, and the second verification node is not only used to verify the validity of the cross-chain message in the second blockchain system, but also used to verify whether the message content of the cross-chain message complies with the preset supervision policy.

[0051] For any verification node among the N first verification nodes, if the cross-chain message M1 passes the validity verification in the verification node, it can be confirmed that the cross-chain message M1 has passed the legality verification in the verification node; for any verification node among the MN second verification nodes, if the cross-chain message M1 passes the validity verification in the verification node, and the verification node confirms that the cross-chain message M1 complies with the preset regulatory policy, it can be confirmed that the cross-chain message M1 has passed the legality verification in the verification node.

[0052] After completing the legitimacy verification of the cross-chain message M1, any verification node can submit to the first blockchain system through a corresponding second transaction, voting information indicating whether the cross-chain message M1 has passed the legitimacy verification in the verification node, so that the first blockchain system will use part or all of the voting information corresponding to the cross-chain message M1 as the verification result of the cross-chain message M1.

[0053] Step S307: The first blockchain system receives a verification result corresponding to the cross-chain message M1 from the supervision system, and provides the verification result to the first cross-chain contract deployed in the first blockchain system.

[0054] Reference Figure 2 As shown, the first verification contract can be deployed in the first blockchain system. Continuing with the previous example, when the regulatory system 30 adopts a multi-node verification mode, the first blockchain system may receive a second transaction for calling the first verification contract from the verification node in the regulatory system, and the second transaction includes voting information corresponding to the cross-chain message M1, which is used to indicate whether the cross-chain message M1 has passed the legitimacy verification in the corresponding verification node; then, the first verification contract can be executed according to the second transaction to record the voting information in the first verification contract. When the number of recorded voting information corresponding to the cross-chain message is a first preset number, the first preset number of recorded voting information corresponding to the cross-chain message is determined as the verification result corresponding to the cross-chain message M1, and the first cross-chain contract is called to store the verification result.

[0055] Here, the multi-node verification mode adopted by the regulatory system is mainly used as an example for description. In actual technical scenarios, a single-node verification mode may also be adopted, that is, the regulatory system initiates a single transaction to the first blockchain system, and directly submits the verification result corresponding to the cross-chain message M1 to the first blockchain system through the transaction. In some technical scenarios, the first blockchain system may not need to deploy the first verification contract. For example, the various functions implemented by the first verification contract can also be implemented by the first cross-chain contract.

[0056] Step S309: The relay system sends a query request corresponding to the cross-chain message M1 to the first blockchain system.

[0057] Step S311, the first blockchain system sends a query response corresponding to the query request to the relay system, and the query response is used to indicate whether a verification result corresponding to the cross-chain message M1 already exists in the first blockchain system.

[0058] The relay system can send a contract call transaction for calling the first cross-chain contract to the first blockchain system, and the first blockchain system can execute the first cross-chain contract according to the contract call transaction, thereby querying whether the verification result corresponding to the cross-chain message M1 already exists in the first cross-chain contract, and returning the corresponding query response to the relay system. Alternatively, the relay system can also complete the query request corresponding to the cross-chain message M1 sent to the first blockchain system by calling other data query interfaces provided by the first blockchain system, and obtain the corresponding query response from the first blockchain system.

[0059] Continuing with the previous example, when the first blockchain system obtains the verification result corresponding to the cross-chain message M1, it needs to provide the obtained verification result to the first cross-chain contract, for example, storing the verification result corresponding to the cross-chain message M1 in the contract state of the first cross-chain contract; the relay system can periodically or intermittently implement the aforementioned step S309 until the query response obtained indicates that the verification result corresponding to the cross-chain message M1 already exists in the first blockchain system, and then execute step S313.

[0060] Specifically, in step S313, the relay system sends a second transaction for calling the first cross-chain contract to the first blockchain system, and the second transaction includes a cross-chain message M1.

[0061] Step S315, the first blockchain system executes the first cross-chain contract according to the second transaction, and at least implements: processing the cross-chain message M1 according to the verification result corresponding to the cross-chain message M1.

[0062] When the verification result indicates that the cross-chain message M1 has not passed the legitimacy verification in the regulatory system, the processing of the cross-chain message M1 can be directly terminated; for example, when the number of voting information used to indicate that the cross-chain message M1 has passed the legitimacy verification in the verification result does not reach the second preset number, it means that the cross-chain message M1 has failed to pass the legitimacy verification in the regulatory system, and the processing of the cross-chain message M1 can be terminated without continuing to execute the transaction that the cross-chain message M1 expects to execute, such as no longer continuing to call the first business contract that the cross-chain message M1 expects to call according to the message body in the cross-chain message M1.

[0063] When the verification result indicates that the cross-chain message M1 has passed the legitimacy verification in the regulatory system, the transaction that the cross-chain message M1 expects to execute can continue to be executed; for example, when the number of voting information in the verification result used to indicate that the cross-chain message M1 has passed the legitimacy verification has reached a second preset number, it means that the cross-chain message M1 has passed the legitimacy verification in the regulatory system, and the transaction that the cross-chain message M1 expects to execute can continue to be executed, such as continuing to execute the first business contract that the message body in the cross-chain message M1 expects to call.

[0064] When the regulatory system includes M verification nodes, and there are N first verification nodes among the M verification nodes that are only used to verify the validity of the cross-chain message M1: if the aforementioned second preset number is not greater than N, it may result in the voting information that indicates that the cross-chain message M1 has passed the legitimacy verification all coming from the first verification node that only verifies the validity of the cross-chain message M1. Accordingly, in order to ensure that the cross-chain message M1 does comply with the preset regulatory policy deployed on the remaining MN second verification nodes, the value of the aforementioned second preset number can be greater than N.

[0065] The first blockchain system wants to send a cross-chain message M1 to the second blockchain system, which needs to be submitted to the first blockchain system by the relay system; therefore, the relay system may do evil and not submit the cross-chain message M1 normally, that is, the relay system may maliciously discard part of the cross-chain message. In order to avoid the relay system from discarding the cross-chain message due to evil, the first cross-chain contract can set a corresponding message processing window for the target cross-chain channel to which the cross-chain message M1 belongs, and the message processing window can accommodate a preset number of message sequence numbers; the cross-chain message M1 should include its own message sequence number corresponding to the target cross-chain channel to which it belongs.

[0066] Correspondingly, the contract logic that needs to be implemented in the process of the first blockchain system executing the first cross-chain contract according to the second transaction may include but is not limited to part or all of the following steps S401 to S409.

[0067] Step S401, determine whether the message sequence number in the cross-chain message M1 belongs to the message processing window corresponding to the target cross-chain channel to which the cross-chain message M1 belongs. If yes, continue to execute steps S403 and S405. If not, it means that the relay system has discarded the cross-chain message belonging to the target cross-chain channel and whose message sequence number is before the cross-chain message M1, and the current process can be terminated.

[0068] Step S403: Process the cross-chain message M1 according to the verification result corresponding to the cross-chain message M1.

[0069] Step S405, setting the message processing status corresponding to the message sequence number in the cross-chain message M1 to processed.

[0070] Reference Figure 5 As shown, it is assumed that the message numbers included in the relevant message processing window are 11, 12, 13 and 14; if the message number included in the cross-chain message M1 is 14, then in the message processing window, the message processing status corresponding to the message number 14 can be set to processed, for example, the status flag corresponding to the sequence number 14 is set to the status value 1 representing the processed state.

[0071] Step S407, determining whether the message processing statuses corresponding to all message sequence numbers in the message processing window have all been processed. If yes, then proceed to step S409.

[0072] Step S409: The message processing window is sequentially moved backward by a preset number of message sequence numbers.

[0073] Reference Figure 5 As shown, if the relay system selectively discards the cross-chain message belonging to the target cross-chain channel, for example, discards the cross-chain message with message sequence number 14 and does not submit it to the first blockchain system, it will cause the message processing status corresponding to message sequence number 14 in the message processing window corresponding to the target cross-chain channel to never be updated to processed. In this case, even if the relay system submits other cross-chain messages belonging to the target cross-chain channel to the first blockchain system in the subsequent process, such as the cross-chain message with message sequence number 15, the cross-chain message with message sequence number 15 will not be correctly processed because the message sequence number 15 is not located in the message processing window corresponding to the target cross-chain channel, that is, the first blockchain system will no longer continue to execute the transaction that the cross-chain message with message sequence number 15 expects to execute, thereby restricting the relay system from maliciously discarding cross-chain messages.

[0074] Reference Figure 5As shown, if the message sequence number in the cross-chain message M1 is 14, the message sequence number 14 belongs to the message processing window corresponding to the target cross-chain channel, and the message processing status corresponding to the message sequence number 14 will be set to processed, so that the message processing status corresponding to the message sequence numbers 11 to 14 in the message processing window are all processed. The message processing window can be moved back by 4 message sequence numbers in sequence, and the message sequence numbers in the message processing window corresponding to the target cross-chain channel will change to 15 to 18.

[0075] Through the technical solution provided in the embodiments of this specification, the relay system and the supervision system are used to implement the transmission and legitimacy verification of cross-chain messages respectively. The relay system cannot affect the processing of cross-chain messages in the first blockchain system by tampering with the verification results of cross-chain messages; the first blockchain system sets the corresponding message processing window for the cross-chain channel to which the cross-chain message belongs, and the cross-chain message adds its own message sequence number corresponding to the target cross-chain channel to which it belongs. By setting the corresponding mobile strategy for the message processing window, it can be realized that the relay system will not maliciously discard the cross-chain message; by introducing the corresponding supervision strategy in the supervision system, it is ensured that the user uses a single blockchain system to access and use related resources on multiple blockchain systems in accordance with the supervision requirements of the relevant jurisdictions, which is conducive to preventing and avoiding malicious users from implementing malicious behaviors through cross-chain transactions. In summary, it is conducive to more secure, accurate and regulated processing of cross-chain transactions.

[0076] Based on the same concept as the aforementioned method embodiment, this specification embodiment also provides a blockchain node, which belongs to the first blockchain system. Figure 6 As shown, the blockchain node 600 includes: a communication processing unit 601, configured to receive a verification result corresponding to a cross-chain message from a regulatory system, and provide the verification result to a first cross-chain contract, wherein the cross-chain message is generated by a second blockchain system in the process of executing a first transaction, and the verification result is obtained by the regulatory system performing a legitimacy verification on the cross-chain message, and the legitimacy verification at least includes verifying whether the message content of the cross-chain message complies with a preset regulatory policy; the communication processing unit 601 is also configured to receive a first transaction for calling a first cross-chain contract from a relay system, and the first transaction includes the cross-chain message; a transaction execution unit 603 is configured to execute the first cross-chain contract according to the first transaction, so as to realize processing of the cross-chain message according to the verification result.

[0077] Based on the same concept as the aforementioned method embodiment, a supervision system is also provided in the embodiment of this specification, and the supervision system includes: a communication processing unit, configured to obtain a cross-chain message that the second blockchain system is to submit to the first blockchain system through a relay system, and the cross-chain message is generated by the second blockchain system in the process of executing the first transaction; a verification processing unit, configured to perform legitimacy verification on the cross-chain message, and the legitimacy verification at least includes verifying whether the message content of the cross-chain message complies with a preset supervision policy; the communication processing unit is configured to send a verification result corresponding to the cross-chain message to the first blockchain system.

[0078] A computer-readable storage medium is also provided in an embodiment of the present specification, on which a computer program / instruction is stored. When the computer program / instruction is executed in a computer, the computer is caused to execute the method steps performed by the relay system, the supervision system or the first blockchain system in the aforementioned embodiments.

[0079] A computing device is also provided in an embodiment of the present specification, including a memory and a processor, wherein the memory stores a computer program / instruction, and when the processor executes the computer program / instruction, the method steps performed by the relay system, the supervision system or the first blockchain system in the aforementioned embodiments are implemented.

[0080] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0081] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0082] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a server system. Of course, the present application does not exclude that with the development of computer technology in the future, the computer that implements the functions of the above embodiments may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0083] Although one or more embodiments of the present specification provide method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps, and does not represent the only execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, product or equipment. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or equipment including the elements. For example, if the words first, second, etc. are used to represent the name, they do not represent any specific order.

[0084] For the convenience of description, the above devices are described in various modules according to their functions. Of course, when implementing one or more of the present specification, the functions of each module can be implemented in the same or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0085] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0086] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0087] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0088] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0089] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0090] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage, graphene storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0091] It should be understood by those skilled in the art that one or more embodiments of the present specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of the present specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0092] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0093] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of this specification, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, in the absence of mutual contradiction, a person skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0094] The above description is only an example of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. For those skilled in the art, one or more embodiments of the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims.

Claims

1. A method for processing a cross-chain message, the method being executed by a first blockchain system, the method comprising: Receiving a verification result corresponding to a cross-chain message from a regulatory system, and providing the verification result to the first cross-chain contract, wherein the cross-chain message is generated by the second blockchain system in the process of executing the first transaction, and the verification result is obtained by the regulatory system performing a legitimacy verification on the cross-chain message, wherein the legitimacy verification at least includes verifying whether the message content of the cross-chain message complies with a preset regulatory policy; Receive a second transaction for calling the first cross-chain contract from the relay system, wherein the second transaction includes the cross-chain message; The first cross-chain contract is executed according to the second transaction, so as to process the cross-chain message according to the verification result.

2. The method according to claim 1, wherein the supervision system comprises M verification nodes; in, The receiving, from the regulatory system, a verification result corresponding to the cross-chain message includes: Receiving, from the verification node, a second transaction for invoking the first verification contract, wherein the second transaction includes voting information corresponding to the cross-chain message, and is used to indicate whether the cross-chain message has passed the legitimacy verification in the corresponding verification node; Executing the first verification contract according to the second transaction to achieve: recording the voting information in the first verification contract, and when the number of recorded voting information corresponding to the cross-chain message is a first preset number, determining the first preset number of recorded voting information corresponding to the cross-chain message as a verification result corresponding to the cross-chain message, and calling the first cross-chain contract to enable the first cross-chain contract to store the verification result.

3. According to the method of claim 2, processing the cross-chain message according to the verification result comprises: When the number of voting information in the verification result indicating that the cross-chain message has passed the legitimacy verification reaches a second preset number, the transaction that the cross-chain message expects to execute is executed.

4. The method according to claim 3, wherein the M verification nodes include N first verification nodes and MN second verification nodes; wherein, The first verification node is used to verify the validity of the cross-chain message in the second blockchain system; the second verification node is used to verify whether the message content of the cross-chain message complies with a preset regulatory policy, and to verify the validity of the cross-chain message in the second blockchain system; the second preset number is greater than N.

5. The method according to claim 1, further comprising: Receiving a query request corresponding to the cross-chain message from the relay system; Return a query response corresponding to the query request to the relay system, where the query response is used to indicate whether a verification result corresponding to the cross-chain message already exists in the first blockchain system.

6. According to the method of claim 1, a message processing window is set in the first cross-chain contract for the target cross-chain channel to which the cross-chain message belongs, and the cross-chain message includes its own message sequence number corresponding to the target cross-chain channel; wherein, The executing the first cross-chain contract according to the second transaction is specifically implemented as follows: when the message sequence number included in the cross-chain message belongs to the message processing window, processing the cross-chain message according to the verification result.

7. The method according to claim 6, wherein executing the first cross-chain contract according to the second transaction further implements: When the message sequence number included in the cross-chain message belongs to the message processing window, the message processing status corresponding to the message sequence number is set to processed, and when the message processing statuses corresponding to all the message sequence numbers in the message processing window are processed, the message processing window is moved back by a preset number of message sequence numbers.

8. According to the method of claim 1, the cross-chain message is used to call a first business contract deployed in the first blockchain system, and a second business contract is deployed in the second blockchain system. The cross-chain message is generated by the second blockchain system in the process of executing the second business contract according to the first transaction.

9. A cross-chain message processing method, the method being executed by a regulatory system, the method comprising: Obtain a cross-chain message that the second blockchain system is to submit to the first blockchain system through the relay system, where the cross-chain message is generated by the second blockchain system in the process of executing the first transaction; Performing legitimacy verification on the cross-chain message, wherein the legitimacy verification at least includes verifying whether the message content of the cross-chain message complies with a preset regulatory policy; Send a verification result corresponding to the cross-chain message to the first blockchain system.

10. According to the method of claim 9, the regulatory system includes M verification nodes; wherein the sending of the verification result corresponding to the cross-chain message to the first blockchain system comprises: The verification node sends a second transaction for calling a first verification contract to the first blockchain system, wherein the second transaction includes voting information corresponding to the cross-chain message, and is used to indicate whether the cross-chain message has passed the legitimacy verification in the corresponding verification node, and the verification result includes a first preset number of voting information provided by a first preset number of verification nodes and corresponding to the cross-chain message.

11. The method according to claim 10, wherein the M verification nodes include N first verification nodes and MN second verification nodes; wherein, The legitimacy verification of the cross-chain message includes: The first verification node verifies the validity of the cross-chain message in the second blockchain system; The second verification node verifies whether the message content of the cross-chain message complies with a preset regulatory policy, and verifies the validity of the cross-chain message in the second blockchain system.

12. A blockchain node, the blockchain node belonging to a first blockchain system, the blockchain node comprising: A communication processing unit is configured to receive a verification result corresponding to a cross-chain message from a supervision system, and provide the verification result to the first cross-chain contract, wherein the cross-chain message is generated by the second blockchain system in the process of executing the first transaction, and the verification result is obtained by the supervision system performing a legitimacy verification on the cross-chain message, wherein the legitimacy verification at least includes verifying whether the message content of the cross-chain message complies with a preset supervision policy; The communication processing unit is configured to receive a first transaction for invoking a first cross-chain contract from a relay system, wherein the first transaction includes the cross-chain message; A transaction execution unit is configured to execute the first cross-chain contract according to the first transaction, and process the cross-chain message according to the verification result.

13. A supervision system, comprising: A communication processing unit, configured to obtain a cross-chain message that the second blockchain system is to submit to the first blockchain system through the relay system, wherein the cross-chain message is generated by the second blockchain system in the process of executing the first transaction; A verification processing unit, configured to perform legitimacy verification on the cross-chain message, wherein the legitimacy verification at least includes verifying whether the message content of the cross-chain message complies with a preset regulatory policy; The communication processing unit is configured to send a verification result corresponding to the cross-chain message to the first blockchain system.

14. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed in a computing device, the computing device executes the method according to any one of claims 1 to 11.