Cross-chain transaction verification method and device and electronic equipment

By moving the SPV verification of cross-chain transaction messages from the gateway to the target blockchain, the verification problems caused by computational pressure and consensus node changes in the cross-chain system are solved, achieving gateway lightweighting and improved transaction efficiency.

CN121770752APending Publication Date: 2026-03-31BEIJING MICROCHIP EDGE COMPUTING RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In cross-chain systems, centralized SPV verification puts computational pressure on hardware resources, especially when too many blockchains are connected, affecting system efficiency. Furthermore, the failure to update digital identity credentials in a timely manner when consensus nodes change affects the verification results.

Method used

By moving the SPV verification of cross-chain transaction messages from the gateway to the target blockchain, and updating and maintaining the consensus node digital identity credentials of the source blockchain through the target blockchain, the computational burden on the gateway is reduced and the gateway is made lightweight.

Benefits of technology

It reduces the computational burden on the gateway, lowers resource consumption, solves the problem of digital identity credentials being unusable during gateway updates, and improves the efficiency and reliability of cross-chain transactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121770752A_ABST
    Figure CN121770752A_ABST
Patent Text Reader

Abstract

The invention provides a cross-chain transaction verification method and device and electronic equipment, and relates to the technical field of block chains. According to the specific implementation scheme, in response to change of a consensus node of a source block chain, node change information is sent to a target gateway, and the node change information is used for updating a digital identity certificate of the consensus node of the source block chain locally cached by the target block chain; the cross-chain transaction message and target information required by the SPV corresponding to the cross-chain transaction message are sent to a target gateway, the target information at least comprises a block head and a Merkel tree corresponding to the cross-chain transaction message, and the digital identity credential and the target information are used for performing SPV on the cross-chain transaction message. By moving the SPV of the cross-chain transaction message from the gateway to the target block chain, the calculation pressure of the gateway is reduced, and the target block chain is responsible for updating and maintaining the digital identity credentials of the consensus nodes of the source block chain, so that the functions of the gateway are further reduced, and the lightweight of the gateway can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of blockchain technology, and in particular to a cross-chain transaction verification method, apparatus, and electronic device. Background Technology

[0002] Cross-chain blockchain systems need to maintain transaction consistency and trustworthiness. Transaction trustworthiness is often ensured through Simplified Payment Verification (SPV). In related technologies, SPVs in cross-chain systems are primarily executed in centralized services, such as cross-chain gateways or relay gateways. These two SPV models present the following problem: when too many blockchains are connected to the cross-chain system, it puts significant computational pressure on the hardware resources of the cross-chain gateway or relay gateway, ultimately affecting the efficiency of the entire system. Summary of the Invention

[0003] This disclosure provides a cross-chain transaction verification method, apparatus, and electronic device.

[0004] According to one aspect of this disclosure, a cross-chain transaction verification method is provided, the method comprising: In response to a change in the consensus node of the source blockchain, node change information is sent to the target gateway. The node change information is used to update the digital identity credentials of the consensus node of the source blockchain in the local cache of the target blockchain. A cross-chain transaction message is sent to the target gateway. The target information required for the Simple Payment Verification (SPV) corresponding to the cross-chain transaction message is sent to the target gateway. The target information includes at least the block header and Merkle tree corresponding to the cross-chain transaction message. The digital identity credentials and the target information are used to perform SPV on the cross-chain transaction message.

[0005] According to another aspect of this disclosure, an alternative cross-chain transaction verification method is provided, the method comprising: Receive node change information sent by the target gateway; update the digital identity credentials of the consensus nodes of the source blockchain in the local cache according to the node change information; receive cross-chain transaction messages sent by the target gateway; receive the target information required for the SPV corresponding to the cross-chain transaction message sent by the target gateway, the target information including at least the block header and Merkle tree corresponding to the cross-chain transaction message; perform SPV on the cross-chain transaction message according to the digital identity credentials and the target information.

[0006] According to another aspect of this disclosure, an alternative cross-chain transaction verification method is provided, the method comprising: The system receives node change information from the source blockchain and sends the node change information to the target blockchain, wherein the node change information is used by the target blockchain to update the digital identity credentials of the consensus nodes of the source blockchain in its local cache; it receives cross-chain transaction messages from the source blockchain and sends the cross-chain transaction messages to the target blockchain; it receives target information required by the SPV corresponding to the cross-chain transaction message sent by the source blockchain and sends the target information to the target blockchain, wherein the target information includes at least the block header and Merkle tree corresponding to the cross-chain transaction message.

[0007] According to another aspect of this disclosure, a cross-chain transaction verification device is provided, the device comprising: The first sending module is used to send node change information to the target gateway in response to a change in the consensus node of the source blockchain. The node change information is used to update the digital identity credentials of the consensus node of the source blockchain cached locally on the target blockchain. The second sending module is used to send a cross-chain transaction message to the target gateway, and to send the target gateway the target information required for the Simple Payment Verification (SPV) corresponding to the cross-chain transaction message. The target information includes at least the block header and Merkle tree corresponding to the cross-chain transaction message. The digital identity credentials and the target information are used to perform SPV on the cross-chain transaction message.

[0008] According to another aspect of this disclosure, a cross-chain transaction verification device is provided, the device comprising: The first receiving module is used to receive node change information sent by the target gateway; the update module is used to update the digital identity credentials of the consensus nodes of the source blockchain in the local cache according to the node change information; the second receiving module is used to receive cross-chain transaction messages sent by the target gateway, and to receive the target information required for the SPV corresponding to the cross-chain transaction message sent by the target gateway, wherein the target information includes at least the block header and Merkle tree corresponding to the cross-chain transaction message; the verification module is used to perform SPV on the cross-chain transaction message according to the digital identity credentials and the target information.

[0009] According to another aspect of this disclosure, a cross-chain transaction verification device is provided, the device comprising: The first transceiver module is used to receive node change information sent by the source blockchain and send the node change information to the target blockchain, wherein the node change information is used by the target blockchain to update the digital identity credentials of the consensus nodes of the source blockchain in its local cache; the second transceiver module is used to receive cross-chain transaction messages sent by the source blockchain and send the cross-chain transaction messages to the target blockchain, and to receive the target information required by the SPV corresponding to the cross-chain transaction message sent by the source blockchain and send the target information to the target blockchain, wherein the target information includes at least the block header and Merkle tree corresponding to the cross-chain transaction message.

[0010] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the cross-chain transaction verification method proposed above in this disclosure.

[0011] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided that stores computer instructions for causing a computer to execute the cross-chain transaction verification method proposed above in this disclosure.

[0012] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the cross-chain transaction verification method proposed above in this disclosure.

[0013] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0014] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart illustrating a cross-chain transaction verification method provided according to an embodiment of this disclosure; Figure 2 This is a flowchart illustrating another cross-chain transaction verification method provided according to an embodiment of this disclosure; Figure 3 This is a flowchart illustrating another cross-chain transaction verification method provided according to an embodiment of this disclosure; Figure 4 This is a flowchart illustrating another cross-chain transaction verification method provided according to an embodiment of this disclosure; Figure 5 This is a flowchart illustrating another cross-chain transaction verification method provided according to an embodiment of this disclosure; Figure 6 This is an interactive schematic diagram of another cross-chain transaction verification method provided according to an embodiment of this disclosure; Figure 7 This is a schematic diagram of the structure of a cross-chain transaction verification device provided according to an embodiment of this disclosure; Figure 8 This is a schematic diagram of the structure of a cross-chain transaction verification device provided according to an embodiment of this disclosure; Figure 9 This is a schematic diagram of the structure of a cross-chain transaction verification device provided according to an embodiment of this disclosure; Figure 10 This is a block diagram of an electronic device used to implement the cross-chain transaction verification method of the present disclosure embodiments; Figure 11 This is a block diagram of a chip used to implement the cross-chain transaction verification method of the embodiments of this disclosure. Detailed Implementation

[0015] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0016] Explanation of technical terms: ① Blockchain: It is a decentralized distributed ledger that is stored in a block-chain format, is immutable, secure and reliable. It combines distributed storage, peer-to-peer transmission, consensus mechanisms, cryptography and other technologies to record transactions and information through a continuously growing chain of data blocks, ensuring data security and transparency.

[0017] ② Cross-chain: refers to the interoperability and interaction of assets, data or functions between different blockchain networks.

[0018] ③ SPV verification: Simplified Payment Verification (SPV) is a technology that does not require maintaining complete blockchain information, but only needs to save some information such as the block header to perform payment verification.

[0019] ④ Merkle Tree: Also known as a Merkle tree. The value of a leaf node in a Merkle tree is the data element of the dataset or a hash of the data elements. The value of a non-leaf node is calculated based on the values ​​of all the leaf nodes below it using a hash algorithm.

[0020] ⑤ Merkle Verification: For blockchains with a Merkle tree block structure, Merkle verification is almost entirely equivalent to SPV verification. Most mainnet blockchains use a Merkle tree structure, so unless otherwise stated, Merkle verification is equivalent to SPV verification. The Merkle verification process involves calculating the value of each non-leaf node based on the leaf nodes, finally calculating the value of the root node, and comparing it with the root value in the block header. If they match, the verification passes.

[0021] Cross-chain blockchain systems need to maintain transaction consistency and cross-chain transaction trustworthiness. Transaction trustworthiness is often guaranteed through Simplified Payment Verification (SPV). In related technologies, SPVs in cross-chain systems are primarily executed in centralized services, such as cross-chain gateways or relay gateways. These two SPV models in cross-chain systems present the following problems: 1. When too many blockchains are connected to a cross-chain system, it will put a lot of computational pressure on the hardware resources of the cross-chain gateway or relay gateway, ultimately affecting the efficiency of the entire system.

[0022] 2. When the consensus nodes of the source blockchain change, if the public key or certificate of the changed consensus node is not updated in time, it will affect the verification results of the cross-chain gateway or relay gateway. If updates are too frequent, it may further put pressure on the resources of the cross-chain gateway or relay gateway.

[0023] 3. The SPV verification and certificate public key maintenance functions included in cross-chain gateways or relay gateways will affect the entire cross-chain system during upgrades or iterations.

[0024] To address the aforementioned issues, this disclosure proposes a cross-chain transaction verification method, apparatus, and electronic device. The cross-chain transaction verification method, apparatus, and electronic device are explained below with reference to the accompanying drawings.

[0025] Figure 1 This is a flowchart illustrating a cross-chain transaction verification method according to an embodiment of this disclosure. This cross-chain transaction verification method can be applied to the source blockchain. It should be noted that the cross-chain transaction verification method of this disclosure can be applied to a cross-chain transaction verification device, which can be configured in an electronic device to enable the electronic device to perform cross-chain transaction verification functions. The following embodiments use an electronic device as an example for illustration.

[0026] The electronic device can be any device with communication capabilities, such as a gateway between blockchains.

[0027] The cross-chain transaction verification device can also be software within an electronic device, such as cross-chain transaction verification software. In the following embodiments, an electronic device is used as an example for illustration.

[0028] like Figure 1 As shown, this cross-chain transaction verification method may include the following steps: S101, in response to a change in the consensus node of the source blockchain, sends node change information to the target gateway.

[0029] In some embodiments, cross-chain transactions refer to the interoperability and interaction of assets, data, or functions between different blockchains. Information or data can be transferred between different blockchains via gateways.

[0030] In some embodiments, the source blockchain may include the transaction initiation system, the corresponding intermediary system, etc. For example, a cross-chain transaction needs to be completed through three blockchains: blockchain 1, blockchain 2, and blockchain 3. Blockchain 1 and blockchain 2 can serve as source blockchains at different stages of the cross-chain transaction message transmission. For instance, when blockchain 1 sends a cross-chain transaction message to blockchain 2, blockchain 1 can be considered the source blockchain. Similarly, when blockchain 2 sends a cross-chain transaction message to blockchain 3, blockchain 2 can also be considered the source blockchain.

[0031] In some embodiments, node change information is used to update the digital identity credentials of the consensus nodes of the source blockchain in the local cache of the target blockchain.

[0032] In some embodiments, the digital identity credentials of a consensus node include, but are not limited to, the public key or certificate of the consensus node. It should be noted that the public key or certificate of the consensus node is used to verify the signature of the block header of subsequent target information.

[0033] In some embodiments, based on a pre-configured node change mechanism, in response to satisfying the node change mechanism, a consensus node can be triggered to send node change information. For example, a node may need to be rotated upon expiration, or a node may need to be switched due to an anomaly. Optionally, node anomalies may include, but are not limited to, node failure, server crash, network interruption, or a node actively leaving the network.

[0034] In some embodiments, the source blockchain can monitor the status of its associated consensus nodes to determine whether the associated consensus nodes have changed.

[0035] In some embodiments, the status of consensus nodes can be polled periodically. In response to the polling of a consensus node changing from an online state to an offline state or an abnormal state, it can be determined that the associated consensus node of the source blockchain has changed.

[0036] In some embodiments, the heartbeat data packets of consensus nodes can be monitored, and if no heartbeat data packets from consensus nodes are detected within a set time, it can be determined that the associated consensus nodes of the source blockchain have changed.

[0037] In some embodiments, the source blockchain can obtain the node information sent by the consensus node after the change. Further, based on the node information of the consensus node after the change and the node information of the consensus node before the change, the node change information is determined. The node change information may include, but is not limited to, the node information of the consensus node before the change, the node information of the consensus node after the change, the change time, the change reason, etc.

[0038] In some embodiments, the source blockchain can send node change information to the target gateway, and the target gateway can receive the node change information sent by the source blockchain and forward the node change information to the target blockchain.

[0039] In some embodiments, the source blockchain may send a first notification message to the target gateway, wherein the first notification message includes node change information.

[0040] In some embodiments, in response to the target gateway subscribing to a message topic that is a node change topic, the source blockchain can send a second notification message to the target gateway, wherein the second notification message includes node change information; In some embodiments, the source blockchain may receive a polling request sent by the target gateway and send a third notification message to the target gateway based on the polling request, wherein the third notification message includes node change information.

[0041] Furthermore, the target blockchain can update the digital identity credentials of the consensus nodes of the source blockchain in its local cache based on node change information. Optionally, the identity information may include, but is not limited to, at least one of the node identifier of the changed consensus node and its digital identity credentials.

[0042] Optionally, if the identity information only includes the node identifier of the changed consensus node, the digital identity certificate of the consensus node can be obtained based on the node identifier of the changed consensus node, and then the digital identity certificate of the consensus node of the source blockchain cached locally on the target blockchain can be updated based on the digital identity certificate of the changed consensus node.

[0043] S102, send a cross-chain transaction message to the target gateway.

[0044] In some embodiments, the target gateway may include, but is not limited to, a cross-chain gateway and a relay gateway.

[0045] In some embodiments, the source blockchain system can send cross-chain transaction messages to the target gateway, so that the target gateway can send the cross-chain transaction messages to the target blockchain, thereby enabling the corresponding cross-chain transaction to be completed with the target blockchain.

[0046] S103, send the target information required for the SPV corresponding to the cross-chain transaction message to the target gateway, wherein the target information includes at least the block header and Merkle tree corresponding to the cross-chain transaction message, and the digital identity certificate and the target information are used to perform SPV on the cross-chain transaction message.

[0047] It's important to note that for transactions to be completed correctly and securely, verification of transaction consistency and trustworthiness is necessary. Optionally, SPVs can be used to ensure transaction trustworthiness. SPVs can perform compliance, structural, financial, or technical verification of cross-chain transaction messages. SPVs are a verification technology that doesn't require maintaining complete blockchain information; it only needs to store some information such as the block headers to perform payment verification. This not only improves transaction verification efficiency but also ensures transaction trustworthiness.

[0048] In some embodiments, the source blockchain may send the target information required by the SPV corresponding to the cross-chain transaction message to the target gateway, wherein the target information includes at least the block header and Merkle tree corresponding to the cross-chain transaction message.

[0049] In some embodiments, the block header of the source blockchain can be understood as the "identity card" and "summary" of the source blockchain. The block header can be used to verify the legitimacy of the source blockchain without downloading all transactions.

[0050] In some embodiments, the block header may include, but is not limited to, the following information: The block version number (version) indicates the consensus rule version of the verification chain, and can determine whether to accept the block when a soft / hard fork occurs.

[0051] The double SHA-256 hash of the previous block header is used to chain the block headers together to verify whether the "parent block" of the current block header is known and whether the position of the longest chain is correct.

[0052] The Merkle root is used by SPV to confirm that a transaction has indeed been included in the block and has not been tampered with.

[0053] Unix timestamps are used to filter out blocks with abnormal times or too far in the future, reducing the risk of being deceived by malicious chains. They can be compared with network-adjusted time to decide whether to accept the block header.

[0054] The difficulty target bits (nBits) are used to calculate whether the hash of the block header meets the current difficulty target; if it does not, the block is considered invalid.

[0055] A nonce is used in hash verification; without it, it is impossible to verify whether PoW is valid.

[0056] In some embodiments, the value of a leaf node in a Merkle tree is a single data element of the dataset or a hash of that single data element. The value of a non-leaf node is calculated using a hash algorithm based on the values ​​of all the leaf nodes below it.

[0057] In some embodiments, the source blockchain can send cross-chain transaction messages and target information to the target gateway separately. For example, it can send the cross-chain transaction message to the target gateway first, and then send the target information. Optionally, the target gateway can receive the cross-chain transaction message and target information separately. For example, the target gateway can receive the cross-chain transaction message first, and then receive the target information.

[0058] In some embodiments, the source blockchain may simultaneously send cross-chain transaction messages and target information to the target gateway. Optionally, the target gateway may simultaneously receive a first cross-chain transaction message and a first target information.

[0059] In some embodiments, the source blockchain can send the block header and Merkle tree corresponding to the cross-chain transaction message to the target gateway separately. For example, it can send the block header first, then the Merkle tree; or it can send the Merkle tree first, then the block header. Optionally, the target gateway can receive the block header and the Merkle tree separately; for example, the target gateway can receive the block header first, then the Merkle tree; or it can receive the Merkle tree first, then the block header.

[0060] In some embodiments, the source blockchain can simultaneously send the block header and Merkle tree corresponding to the cross-chain transaction message to the target gateway, meaning it reuses the same information to send the block header and Merkle tree. Optionally, the target gateway can simultaneously receive the block header and Merkle tree, meaning it can receive both from the same information.

[0061] In some embodiments, after obtaining node change information, the target gateway can forward the node change information to the target blockchain. Based on the node change information, the target blockchain updates the digital identity credentials of the consensus nodes of the source blockchain in its local cache.

[0062] In some embodiments, after obtaining the cross-chain transaction message and target information, the target gateway can send the cross-chain transaction message and target information to the target blockchain.

[0063] In some embodiments, after obtaining the block header and Merkle tree of the source blockchain, the target blockchain first performs signature verification on the block header based on digital identity credentials. After verifying the signature of the block header, the target blockchain can verify the workload and chain order based on the block header. Furthermore, it uses the Merkle tree to verify that the transaction indicated by the cross-chain transaction message is indeed contained in the block header. Through the above two verifications, the SPV of the cross-chain transaction message is completed.

[0064] The cross-chain transaction verification method of this disclosure reduces the computational burden on the gateway by moving the SPV of cross-chain transaction messages from the gateway to the target blockchain. Furthermore, the target blockchain is responsible for updating and maintaining the digital identity credentials of the consensus nodes of the source blockchain, further reducing the functions of the gateway and enabling the gateway to be lightweight.

[0065] Figure 2 This is a flowchart illustrating a cross-chain transaction verification method provided in an embodiment of this application. This cross-chain transaction verification method is applicable to the source blockchain, such as... Figure 2 As shown, this cross-chain transaction verification method may include, but is not limited to, the following steps: S201, Determine the target pattern corresponding to the cross-chain transaction message.

[0066] S202, based on the target pattern, determine the target gateway corresponding to the cross-chain transaction message.

[0067] In some embodiments, the target gateway may include, but is not limited to, a cross-chain gateway and a relay gateway.

[0068] In some embodiments, the cross-chain gateway is suitable for notary mode business. In response to the target mode corresponding to the cross-chain transaction message being notary mode, the target gateway can be determined to be a cross-chain gateway.

[0069] In some embodiments, the relay gateway is suitable for services in relay chain mode. In response to a cross-chain transaction message corresponding to a target mode that is relay chain mode, the target gateway can be determined to be a relay gateway.

[0070] S203, in response to a change in the consensus node of the source blockchain, sends node change information to the target gateway.

[0071] In some embodiments, node change information is used by the target blockchain to update the digital identity credentials of the consensus nodes of the source blockchain in its local cache. S204, send a cross-chain transaction message to the target gateway.

[0072] S205, send the target information required for the SPV corresponding to the cross-chain transaction message to the target gateway, wherein the target information includes at least the block header and Merkle tree corresponding to the cross-chain transaction message, and the digital identity certificate and the target information are used to perform SPV on the cross-chain transaction message.

[0073] For a detailed description of steps S203 and S205, please refer to the relevant content in the above embodiments, which will not be repeated here.

[0074] In some embodiments, the target gateway can send cross-chain transaction information and target information to the target blockchain. The target blockchain can perform SPV on the cross-chain transaction message based on the target information to identify the legitimacy of the source blockchain and the trustworthiness of the cross-chain transaction message.

[0075] S206, in response to the SPV passing the cross-chain transaction message, proceeds with the subsequent cross-chain process with the target blockchain through the target gateway.

[0076] In some embodiments, in response to the SPV passing the cross-chain transaction message, the source blockchain can also perform subsequent cross-chain processes such as confirmation, triggering, mapping / execution, settlement, receipt, and fault tolerance with the target blockchain through the target gateway, thereby landing the cross-chain transaction message on the target blockchain.

[0077] The cross-chain transaction verification method disclosed in this embodiment reduces the computational burden on the gateway by moving the SPV for cross-chain transaction messages from the gateway to the target blockchain. When the consensus nodes of the source blockchain change, if the digital identity credentials of the changed consensus nodes are not updated in a timely manner, it will affect the verification results of the SPV. In this application, the digital identity credentials of the consensus nodes of the source blockchain are updated and maintained in a timely manner by the target blockchain, which can reduce the function of the gateway, facilitate the lightweighting of the gateway, and further reduce the resource consumption of the grid. Updating and maintaining the digital identity credentials of the consensus nodes of the source blockchain by the target blockchain can solve the problem that the digital identity credentials become unusable when the gateway is updated and iterated, thus affecting the entire cross-chain system.

[0078] Figure 3 This is a flowchart illustrating another cross-chain transaction verification method provided in an embodiment of this application. This cross-chain transaction verification method can be applied to the target blockchain, such as... Figure 3 As shown, this cross-chain transaction verification method may include, but is not limited to, the following steps: S301 receives node change information sent by the target gateway.

[0079] S302, update the digital identity credentials of the consensus nodes of the source blockchain in the local cache according to the node change information.

[0080] For a detailed description of steps S301 to S302, please refer to the relevant content in the above embodiments, which will not be repeated here.

[0081] S303 receives cross-chain transaction messages sent by the target gateway.

[0082] In some embodiments, the target blockchain may include a transaction settlement system, a corresponding intermediary system, etc. For example, a cross-chain transaction needs to be completed through three blockchains: blockchain 1, blockchain 2, and blockchain 3. Blockchain 2 and blockchain 3 can serve as the target blockchain at different stages of the cross-chain transaction message transmission. For instance, when blockchain 1 sends a cross-chain transaction message to blockchain 2, blockchain 2 can serve as the target blockchain. Similarly, when blockchain 2 sends a cross-chain transaction message to blockchain 3, blockchain 3 can serve as the target blockchain.

[0083] In some embodiments, the target blockchain can receive cross-chain transaction messages sent by the target gateway. These cross-chain transaction messages are sent from the source blockchain to the target gateway.

[0084] S304, Receive the target information required by the SPV corresponding to the cross-chain transaction message sent by the target gateway, wherein the target information includes at least the block header and Merkle tree corresponding to the cross-chain transaction message.

[0085] For a detailed description of step S304, please refer to the relevant content in the above embodiments, which will not be repeated here.

[0086] In some embodiments, the target blockchain can receive the target information required by the SPV corresponding to the cross-chain transaction message sent by the target gateway. This target information is sent from the source blockchain to the target gateway.

[0087] S305 performs SPV on cross-chain transaction messages based on digital identity credentials and target information.

[0088] In some embodiments, the target blockchain verifies the block header based on digital identity credentials. Further, in response to the block header's successful verification, it performs SPV (Signal-Purpose Verification) on the cross-chain transaction message based on the block header and Merkle tree. That is, after obtaining the block header and Merkle tree from the source blockchain, the target blockchain first verifies the block header's signature based on the digital identity credentials. After verifying the block header's signature, it can verify the workload and chain order based on the block header. Furthermore, it uses a Merkle tree to verify that the transaction indicated by the cross-chain transaction message is indeed contained in the block header. Through these two verification methods, the SPV of the cross-chain transaction message is completed.

[0089] The cross-chain transaction verification method of this disclosure reduces the computational burden on the gateway by moving the SPV of cross-chain transaction messages from the gateway to the target blockchain. Furthermore, the target blockchain is responsible for updating and maintaining the digital identity credentials of the consensus nodes of the source blockchain, further reducing the functions of the gateway and enabling the gateway to be lightweight.

[0090] Figure 4 This is a flowchart illustrating another cross-chain transaction verification method provided in an embodiment of this application. This cross-chain transaction verification method can be applied to the target blockchain, such as... Figure 4 As shown, this cross-chain transaction verification method may include, but is not limited to, the following steps: S401 receives node change information sent by the target gateway.

[0091] S402, based on node change information, update the digital identity credentials of the consensus nodes of the source blockchain in the local cache of the target blockchain.

[0092] S403 receives cross-chain transaction messages sent by the target gateway.

[0093] S404 Receive the target information required by the SPV corresponding to the cross-chain transaction message sent by the target gateway, wherein the target information includes at least the block header and Merkle tree corresponding to the cross-chain transaction message.

[0094] S405 performs SPV on cross-chain transaction messages based on digital identity credentials and target information.

[0095] For a detailed description of steps S401 to 403, please refer to the relevant content in the above embodiments, which will not be repeated here.

[0096] S406, in response to the SPV passing the cross-chain transaction message, proceeds with the subsequent cross-chain process with the source blockchain through the target gateway.

[0097] In some embodiments, in response to the SPV passing the cross-chain transaction message, the source blockchain can also perform subsequent cross-chain processes such as confirmation, triggering, mapping / execution, settlement, receipt, and fault tolerance with the target blockchain through the target gateway, thereby landing the cross-chain transaction message on the target blockchain.

[0098] S407, in response to the SPV failing to pass the cross-chain transaction message, the cross-chain transaction message is discarded.

[0099] In some embodiments, if the SPV for a cross-chain transaction message fails, it may indicate that the source blockchain to which the cross-chain transaction message belongs is not trusted, and / or confirm that the transaction indicated by the cross-chain transaction message is on the blockchain. In the above cases, the target blockchain discards the cross-chain transaction message, meaning it will no longer conduct subsequent cross-chain processes with the source blockchain through the target gateway.

[0100] In some embodiments, the target blockchain can send SPV failure feedback information to the source blockchain through the target gateway.

[0101] The cross-chain transaction verification method disclosed in this embodiment reduces the computational burden on the gateway by moving the SPV for cross-chain transaction messages from the gateway to the target blockchain. When the consensus nodes of the source blockchain change, if the digital identity credentials of the changed consensus nodes are not updated in a timely manner, it will affect the verification results of the SPV. In this application, the digital identity credentials of the consensus nodes of the source blockchain are updated and maintained in a timely manner by the target blockchain, which can reduce the function of the gateway, facilitate the lightweighting of the gateway, and further reduce the resource consumption of the grid. Updating and maintaining the digital identity credentials of the consensus nodes of the source blockchain by the target blockchain can solve the problem that the digital identity credentials become unusable when the gateway is updated and iterated, thus affecting the entire cross-chain system.

[0102] Figure 5 This is a flowchart illustrating another cross-chain transaction verification method provided in an embodiment of this application. This cross-chain transaction verification method can be applied to a target gateway, such as... Figure 5 As shown, this cross-chain transaction verification method may include, but is not limited to, the following steps: S501 receives node change information sent by the source blockchain and sends node change information to the target blockchain.

[0103] Among them, node change information is used to update the digital identity credentials of the consensus nodes of the source blockchain in the local cache of the target blockchain.

[0104] S502 receives cross-chain transaction messages from the source blockchain and sends cross-chain transaction messages to the target blockchain.

[0105] S503 receives the target information required by the SPV corresponding to the cross-chain transaction message sent by the source blockchain, and sends the target information to the target blockchain.

[0106] The target information includes at least the block header and Merkle tree corresponding to the cross-chain transaction message.

[0107] For a detailed description of steps S501 to S503, please refer to the relevant content in the above embodiments, which will not be repeated here.

[0108] In some embodiments, the target gateway includes a cross-chain gateway and a relay gateway, and the target gateway is determined based on the message pattern corresponding to the cross-chain transaction message.

[0109] The cross-chain transaction verification method of this disclosure reduces the computational burden on the gateway by moving the SPV of cross-chain transaction messages from the gateway to the target blockchain. Furthermore, the target blockchain is responsible for updating and maintaining the digital identity credentials of the consensus nodes of the source blockchain, further reducing the functions of the gateway and enabling the gateway to be lightweight.

[0110] Figure 6 This is an interactive diagram illustrating a cross-chain transaction verification method provided in an embodiment of this application. For example... Figure 6 As shown, this cross-chain transaction verification method may include, but is not limited to, the following steps: S601 identifies a change in the consensus node of the source blockchain and sends the node change information to the target gateway.

[0111] Among them, node change information is used to update the digital identity credentials of the consensus nodes of the source blockchain in the local cache of the target blockchain.

[0112] S602, the target gateway sends node change information to the target blockchain.

[0113] S603, the source blockchain sends a cross-chain transaction message to the target gateway.

[0114] S604, the target gateway sends a cross-chain transaction message to the target blockchain.

[0115] S605, the source blockchain sends the target information required by the SPV corresponding to the cross-chain transaction message to the target gateway.

[0116] The target information includes at least the block header and Merkle tree corresponding to the cross-chain transaction message.

[0117] S606, the target gateway sends target information to the target blockchain.

[0118] S607, the target blockchain performs SPV on cross-chain transaction messages based on node change information and target information.

[0119] S608, in response to the SPV passing the cross-chain transaction message, proceeds with the subsequent cross-chain process with the source blockchain through the target gateway.

[0120] S609, in response to the SPV failing to pass the cross-chain transaction message, the cross-chain transaction message is discarded.

[0121] For a detailed description of steps S601 to 609, please refer to the relevant content in the above embodiments, which will not be repeated here.

[0122] The cross-chain transaction verification method disclosed in this embodiment reduces the computational burden on the gateway by moving the SPV for cross-chain transaction messages from the gateway to the target blockchain. When the consensus nodes of the source blockchain change, if the digital identity credentials of the changed consensus nodes are not updated in a timely manner, it will affect the verification results of the SPV. In this application, the digital identity credentials of the consensus nodes of the source blockchain are updated and maintained in a timely manner by the target blockchain, which can reduce the function of the gateway, facilitate the lightweighting of the gateway, and further reduce the resource consumption of the grid. Updating and maintaining the digital identity credentials of the consensus nodes of the source blockchain by the target blockchain can solve the problem that the digital identity credentials become unusable when the gateway is updated and iterated, thus affecting the entire cross-chain system.

[0123] To implement the above embodiments, this disclosure also provides a cross-chain transaction verification device. For example... Figure 7 As shown, Figure 7 This is a schematic diagram of a cross-chain transaction verification device according to an embodiment of the present disclosure. The cross-chain transaction verification device 700 may include: a first sending module 701 and a second sending module 702.

[0124] The first sending module 701 is used to send node change information to the target gateway in response to a change in the consensus node of the source blockchain. The node change information is used to update the digital identity credentials of the consensus node of the source blockchain cached locally in the target blockchain. The second sending module 702 is used to send a cross-chain transaction message to the target gateway, and to send the target information required for the Simple Payment Verification (SPV) corresponding to the cross-chain transaction message to the target gateway. The target information includes at least the block header and Merkle tree corresponding to the cross-chain transaction message. The digital identity credential and the target information are used to perform SPV on the cross-chain transaction message.

[0125] In some embodiments, the first sending module 701 is further configured to perform the following operations: A first notification message is sent to the target gateway, the first notification message including the node change information; in response to the target gateway subscribing to a message topic that is a node change topic, a second notification message is sent to the target gateway, the second notification message including the node change information; In some embodiments, the first sending module 701 is further configured to perform the following operations: The system receives a polling request from the target gateway and sends a third notification message to the target gateway based on the polling request. The third notification message includes the node change information.

[0126] In some embodiments, the second sending module 702 is further configured to perform the following operations: Before sending a cross-chain transaction message to the target gateway, the target pattern corresponding to the cross-chain transaction message is determined; based on the target pattern, the target gateway corresponding to the cross-chain transaction message is determined.

[0127] In some embodiments, the cross-chain transaction verification device 700 further includes an interaction module and a discard module.

[0128] The interaction module is used to respond to the SPV's approval of the cross-chain transaction message, determine the target blockchain corresponding to the cross-chain transaction message, and conduct subsequent cross-chain processes with the target blockchain; or... The discard module is used to discard cross-chain transaction messages in response to the failure of the SPV for any cross-chain transaction message.

[0129] The cross-chain transaction verification device of this disclosure performs cross-chain SPV verification through a gateway, discarding the SPV light node verification and SPV contract verification in the prior art. The SPV verification process is executed in the gateway, which does not require the use of blockchain computing resources. Moreover, the information required for SPV verification does not need to be stored on the blockchain, thereby reducing the resource consumption of the blockchain.

[0130] Figure 8 This is a schematic diagram of another cross-chain transaction verification device provided according to an embodiment of the present disclosure. The cross-chain transaction verification device 800 may include: a first receiving module 801, an update module 802, a second receiving module 803, and a verification module 804.

[0131] The first receiving module 801 is used to receive node change information sent by the target gateway; Update module 802 is used to update the digital identity credentials of the consensus nodes of the source blockchain in the local cache according to the node change information; The second receiving module 803 is used to receive the cross-chain transaction message sent by the target gateway, and to receive the target information required by the SPV corresponding to the cross-chain transaction message sent by the target gateway. The target information includes at least the block header and Merkle tree corresponding to the cross-chain transaction message. The verification module 804 is used to perform SPV on the cross-chain transaction message based on the digital identity credential and target information.

[0132] In some embodiments, the verification module 804 is further configured to verify the block header based on the digital identity credential; and in response to the block header being verified, to perform SPV on the cross-chain transaction message based on the block header and the Merkle tree.

[0133] In some embodiments, the cross-chain transaction verification device 800 further includes an interaction module and a discard module.

[0134] The interaction module is used to respond to the SPV passing the cross-chain transaction message and conduct subsequent cross-chain processes with the source blockchain through the target gateway; The discard module is used to discard the cross-chain transaction message in response to the failure of the SPV for the cross-chain transaction message.

[0135] Figure 9 This is a schematic diagram of another cross-chain transaction verification device provided according to an embodiment of the present disclosure. The cross-chain transaction verification device 900 may include: a first transceiver module 901 and a second transceiver module 902.

[0136] The first transceiver module 901 is used to receive node change information sent by the source blockchain and send the node change information to the target blockchain, wherein the node change information is used by the target blockchain to update the digital identity credentials of the consensus nodes of the source blockchain in its local cache. The second transceiver module 902 is used to receive cross-chain transaction messages sent by the source blockchain and send the cross-chain transaction messages to the target blockchain, as well as to receive the target information required by the SPV corresponding to the cross-chain transaction messages sent by the source blockchain and send the target information to the target blockchain, wherein the target information includes at least the block header and Merkle tree corresponding to the cross-chain transaction messages.

[0137] The cross-chain transaction verification device of this disclosure reduces the computational burden on the gateway by moving the SPV for cross-chain transaction messages from the gateway to the target blockchain. When the consensus nodes of the source blockchain change, if the digital identity credentials of the changed consensus nodes are not updated in time, it will affect the verification results of the SPV. In this application, the digital identity credentials of the consensus nodes of the source blockchain are updated and maintained in a timely manner by the target blockchain, which can reduce the function of the gateway, facilitate the lightweighting of the gateway, and further reduce the resource consumption of the grid. Updating and maintaining the digital identity credentials of the consensus nodes of the source blockchain on the target blockchain can solve the problem that the digital identity credentials become unusable when the gateway is updated and iterated, thus affecting the entire cross-chain system.

[0138] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision, and disclosure of users' personal information are all carried out with the consent of the users, and all comply with the provisions of relevant laws and regulations, and do not violate public order and good morals.

[0139] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0140] Figure 10 As shown, the electronic device 1000 includes one or more processors 1001. The processor 1001 can be a general-purpose processor or a dedicated processor, such as a baseband processor or a central processing unit (CPU). The baseband processor can be used to process communication protocols and communication data, while the CPU can be used to control communication devices (e.g., base stations, baseband chips, terminal devices, terminal device chips, DUs or CUs, etc.), execute programs, and process program data. The electronic device 1000 is used to perform any of the above methods.

[0141] In some embodiments, the electronic device 1000 further includes one or more memories 1002 for storing instructions. Optionally, all or part of the memories 1002 may be located outside the electronic device 1000.

[0142] In some embodiments, the electronic device 1000 further includes one or more transceivers 1003. When the electronic device 1000 includes one or more transceivers 1003, the transceivers 1003 perform the communication steps such as sending and / or receiving in the above-described method.

[0143] In some embodiments, a transceiver may include a receiver and / or a transmitter, which may be separate or integrated. Optionally, the terms transceiver, transceiver unit, transceiver, transceiver circuit, etc., may be used interchangeably; the terms transmitter, transmitting unit, transmitter, transmitting circuit, etc., may be used interchangeably; and the terms receiver, receiving unit, receiver, receiving circuit, etc., may be used interchangeably.

[0144] In some embodiments, the electronic device 1000 may include one or more interface circuits 1004. Optionally, the interface circuit 1004 is connected to the memory 1002, and the interface circuit 1004 can be used to receive signals from the memory 1002 or other devices, and can be used to send signals to the memory 1002 or other devices. For example, the interface circuit 1004 can read instructions stored in the memory 1002 and send the instructions to the processor 1001.

[0145] The electronic device 1000 described in the above embodiments may be a terminal, a network device, or a third entity, but the scope of the electronic device 1000 described in this disclosure is not limited thereto, and the structure of the electronic device 1000 may vary. Figure 10 The limitations. The communication device can be a standalone device or part of a larger device. For example, the communication device can be: (1) a standalone integrated circuit IC, or chip, or chip system or subsystem; (2) a collection of one or more ICs, optionally including storage components for storing data and programs; (3) an ASIC, such as a modem; (4) a module that can be embedded in other devices; (5) a receiver, terminal device, smart terminal device, cellular phone, wireless device, handheld device, mobile unit, vehicle device, network device, cloud device, artificial intelligence device, etc.; (6) others, etc.

[0146] Figure 11 This is a schematic diagram of the structure of the chip 1100 according to an embodiment of this disclosure. For cases where the electronic device 600 can be a chip or a chip system, please refer to... Figure 11 The diagram shown is a schematic representation of the structure of chip 1100, but it is not limited to this.

[0147] Chip 1100 includes one or more processors 1101, which are used to perform any of the above methods.

[0148] In some embodiments, chip 1100 further includes one or more interface circuits 1102. Optionally, the interface circuit 1102 is connected to memory 1103, and the interface circuit 1102 can be used to receive signals from memory 1103 or other devices, and the interface circuit 1102 can be used to send signals to memory 1103 or other devices. For example, the interface circuit 1102 can read instructions stored in memory 1103 and send the instructions to processor 1101.

[0149] In some embodiments, the interface circuit 1102 performs the communication steps such as sending and / or receiving in the above method.

[0150] In some embodiments, the terms interface circuit, interface, transceiver pin, transceiver, etc., can be used interchangeably.

[0151] In some embodiments, chip 1100 further includes one or more memories 1103 for storing instructions. Optionally, all or part of the memories 1103 may be located outside of chip 1100.

[0152] This disclosure also proposes a storage medium storing instructions that, when executed on an electronic device 1000, cause the electronic device 1000 to perform any of the above methods. Optionally, the storage medium is an electronic storage medium. Optionally, the storage medium is a computer-readable storage medium, but not limited thereto; it may also be a storage medium readable by other devices. Optionally, the storage medium may be a non-transitory storage medium, but not limited thereto; it may also be a temporary storage medium.

[0153] This disclosure also provides a program product that, when executed by electronic device 1000, causes electronic device 600 to perform any of the above methods. Optionally, the program product is a computer program product.

[0154] This disclosure also proposes a computer program that, when run on a computer, causes the computer to perform any of the above methods.

[0155] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0156] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A cross-chain transaction verification method, characterized in that, The method is executed by a source blockchain, and the method comprises: in response to a change of a consensus node of the source blockchain, sending node change information to a target gateway, the node change information being used to update a digital identity credential of the consensus node of the source blockchain cached locally by the target blockchain; sending a cross-chain transaction message to the target gateway; sending target information required for simple payment verification (SPV) corresponding to the cross-chain transaction message to the target gateway, the target information at least comprising a block header and a Merkle tree corresponding to the cross-chain transaction message, and the digital identity credential and the target information being used to perform SPV on the cross-chain transaction message.

2. The method of claim 1, wherein, The sending of the node change information to the target gateway comprises at least one of the following operations: sending a first notification message to the target gateway, the first notification message comprising the node change information; in response to a message topic subscribed by the target gateway being a node change topic, sending a second notification message to the target gateway, the second notification message comprising the node change information; receiving a polling request sent by the target gateway, and sending a third notification message to the target gateway based on the polling request, the third notification message comprising the node change information.

3. The method of claim 1, wherein, Before the sending of the cross-chain transaction message to the target gateway, the method further comprises: determining a target mode corresponding to the cross-chain transaction message; based on the target mode, determining a target gateway corresponding to the cross-chain transaction message.

4. A cross-chain transaction verification method, characterized in that, The method is executed by a target blockchain, and the method comprises: receiving node change information sent by a target gateway; updating a digital identity credential of a consensus node of a source blockchain cached locally according to the node change information; receiving a cross-chain transaction message sent by the target gateway; receiving target information required for SPV corresponding to the cross-chain transaction message sent by the target gateway, the target information at least comprising a block header and a Merkle tree corresponding to the cross-chain transaction message; performing SPV on the cross-chain transaction message according to the digital identity credential and the target information.

5. The method of claim 4, wherein, The performing of the SPV on the cross-chain transaction message according to the digital identity credential and the target information comprises: verifying the block header according to the digital identity credential; in response to the block header passing the verification, performing the SPV on the cross-chain transaction message according to the block header and the Merkle tree.

6. The method of claim 5, wherein, After the performing of the SPV on the cross-chain transaction message according to the digital identity credential and the target information, the method further comprises: in response to the SPV on the cross-chain transaction message passing, performing a subsequent cross-chain process with the source blockchain through the target gateway; in response to the SPV on the cross-chain transaction message failing, discarding the cross-chain transaction message.

7. A cross-chain transaction verification method, characterized in that, The method is executed by a target gateway, and the method comprises: receiving node change information sent by a source blockchain, and sending the node change information to a target blockchain, wherein the node change information is used to update a digital identity credential of a consensus node of the source blockchain cached locally by the target blockchain; receiving a cross-chain transaction message sent by the source blockchain, and sending the cross-chain transaction message to a target blockchain; receive target information required by a simple payment verification (SPV) corresponding to the cross-chain transaction message sent by the source blockchain, and send the target information to the target blockchain, wherein the target information at least includes a block header and a Merkle tree corresponding to the cross-chain transaction message.

8. A cross-chain transaction verification apparatus, characterized by, The apparatus is suitable for a source blockchain, and the apparatus comprises: a first sending module configured to, in response to a change of a consensus node of the source blockchain, send node change information to a target gateway, the node change information being used to update a digital identity credential of the consensus node of the source blockchain cached locally by the target blockchain; a second sending module configured to send a cross-chain transaction message to the target gateway, and send target information required by an SPV corresponding to the cross-chain transaction message to the target gateway, the target information at least including a block header and a Merkle tree corresponding to the cross-chain transaction message, the digital identity credential and the target information being used to perform the SPV on the cross-chain transaction message.

9. A cross-chain transaction verification apparatus, characterized by, The apparatus is suitable for a target blockchain, and the apparatus comprises: a first receiving module configured to receive node change information sent by a target gateway; an updating module configured to update a digital identity credential of a consensus node of the source blockchain cached locally according to the node change information; a second receiving module configured to receive a cross-chain transaction message sent by the target gateway, and receive target information required by an SPV corresponding to the cross-chain transaction message sent by the target gateway, the target information at least including a block header and a Merkle tree corresponding to the cross-chain transaction message; a verifying module configured to perform the SPV on the cross-chain transaction message according to the digital identity credential and the target information.

10. A cross-chain transaction verification apparatus, characterized by, The method is suitable for a target gateway, and the method comprises: a first receiving module configured to receive node change information sent by a source blockchain, and send the node change information to a target blockchain, wherein the node change information is used to update a digital identity credential of a consensus node of the source blockchain cached locally by the target blockchain; a second receiving module configured to receive a cross-chain transaction message sent by the source blockchain, and send the cross-chain transaction message to a target blockchain, and receive target information required by an SPV corresponding to the cross-chain transaction message sent by the source blockchain, and send the target information to the target blockchain, wherein the target information at least includes a block header and a Merkle tree corresponding to the cross-chain transaction message.