Cross-chain transaction verification, processing method, device and system
By initializing and optimizing the candidate node set in the blockchain network, a path-weight-based verification network is constructed, which solves the problems of high cost and performance bottleneck in cross-chain transaction verification and achieves efficient cross-chain transaction verification and value transfer.
Patent Information
- Application Number
- CN202111347012.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-15
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2041-11-15
AI Technical Summary
In existing technologies, cross-chain transaction verification via relay chains suffers from high transaction verification costs and performance bottlenecks.
By initializing candidate node sets and verification node sets in the source blockchain and target blockchain networks, candidate nodes are selected as verification nodes based on path weights to construct a verification network for cross-chain transaction verification. Path weights are calculated using the computing power of nodes and network communication latency indicators to optimize the performance of the verification network.
It improves the verification efficiency of cross-chain transactions, reduces transaction verification costs, solves the centralization risks and performance bottlenecks in relay chain verification, and realizes the efficient transfer of value between different blockchains.
Smart Images

Figure CN116128511B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of blockchain technology, and in particular to cross-chain transaction verification, processing methods, devices and systems. Background Technology
[0002] Blockchain technology is a new type of decentralized information technology. Data or information stored in the blockchain has characteristics such as "unforgeable," "fully traceable," "transparent," and "collectively maintained." Based on these characteristics, blockchain technology lays a solid foundation of "trust" and creates a reliable "cooperation" mechanism, which can be applied in many fields such as finance, healthcare, supply chain, and asset management.
[0003] The lack of interoperability between blockchains severely limits their application scope. Therefore, an increasing number of cross-chain projects are emerging. Blockchain cross-chain refers to using technological means to transfer and transmit data and value between different blockchains.
[0004] In related technologies, the verification of cross-chain transactions is mainly achieved by using a relay chain. Summary of the Invention
[0005] Among related technologies, using a relay chain to implement cross-chain transaction verification has problems such as high transaction verification costs and potential performance bottlenecks.
[0006] To address the aforementioned technical issues, this disclosure proposes a solution that can improve the verification efficiency of cross-chain transactions and save on cross-chain transaction verification costs.
[0007] According to a first aspect of this disclosure, a cross-chain transaction verification method is provided, comprising: initializing a candidate node set and a verification node set based on nodes in a source blockchain network and a target blockchain network; selecting candidate nodes as verification nodes from the candidate node set based on path weights from candidate nodes in the candidate node set to the verification node set, and updating the verification node set based on the verification nodes; and constructing a verification network based on the verification node set when the number of verification nodes in the verification node set reaches a preset value, the verification network being used to verify cross-chain transactions between the source blockchain network and the target blockchain network.
[0008] In some embodiments, the method further includes: determining the path weight from the candidate node to each verification node in the verification node set based on the computing power index value of the candidate node and the network communication delay index value between the candidate node and each verification node in the verification node set; and determining the path weight from the candidate node to the verification node set based on the path weight from the candidate node to each verification node in the verification node set.
[0009] In some embodiments, the method further includes: weighting and summing the computing power index value of the candidate node and the network communication delay index value between the candidate node and each verification node in the verification node set to obtain the path weight from the candidate node to each verification node in the verification node set; calculating the arithmetic mean of the path weights from the candidate node to each verification node in the verification node set, and using it as the path weight from the candidate node to the verification node set.
[0010] In some embodiments, selecting a candidate node as a verification node from the candidate node set based on the path weight from the candidate node set to the verification node set includes: selecting the candidate node with the largest path weight from the candidate node set as the verification node.
[0011] In some embodiments, initializing the candidate node set and the verification node set based on the nodes in the source blockchain network and the target blockchain network includes: using the cross-chain transaction initiating node in the source blockchain network as the initial value of the verification node set, and using other nodes in the source blockchain network and the target blockchain network other than the cross-chain transaction initiating node as the initial value of the candidate node set.
[0012] In some embodiments, the preset value is greater than or equal to 4 and less than or equal to the total number of nodes in the source blockchain network and the target blockchain network.
[0013] In some embodiments, the cross-chain transaction verification method is executed by any node in the source blockchain network or the target blockchain network.
[0014] According to a second aspect of this disclosure, a cross-chain transaction processing method is provided, comprising: constructing a verification network according to the cross-chain transaction verification method described in any of the above embodiments; a source blockchain node, located in the source blockchain network, sending a cross-chain transaction initiated by a user terminal to the verification network; a verification node, located in the verification network, verifying the cross-chain transaction, and sending the cross-chain transaction to a target blockchain network after successful verification; and a target blockchain node, located in the target blockchain network, processing the cross-chain transaction and sending the processing result of the cross-chain transaction to the source blockchain network.
[0015] According to a third aspect of this disclosure, a cross-chain transaction verification device is provided, comprising: an initialization module configured to initialize a candidate node set and a verification node set based on nodes in a source blockchain network and a target blockchain network; a selection module configured to select candidate nodes as verification nodes from the candidate node set based on path weights from candidate nodes in the candidate node set to the verification node set, and update the verification node set based on the verification nodes; and a construction module configured to construct a verification network based on the verification node set when the number of verification nodes in the verification node set reaches a preset value, wherein the verification network is used to verify cross-chain transactions between the source blockchain network and the target blockchain network.
[0016] In some embodiments, the system further includes a determining module, which is configured to: determine the path weight from the candidate node to each verification node in the verification node set based on the computing power index value of the candidate node and the network communication delay index value between the candidate node and each verification node in the verification node set; and determine the path weight from the candidate node to the verification node set based on the path weight from the candidate node to each verification node in the verification node set.
[0017] In some embodiments, the determining module is configured to: perform a weighted summation of the computing power index value of the candidate node and the network communication delay index value between the candidate node and each verification node in the verification node set to obtain the path weight from the candidate node to each verification node in the verification node set; calculate the arithmetic mean of the path weights from the candidate node to each verification node in the verification node set, and use it as the path weight from the candidate node to the verification node set.
[0018] In some embodiments, the selection module is configured to select the candidate node with the largest path weight in the candidate node set as the verification node.
[0019] In some embodiments, the initialization module is configured to: use the cross-chain transaction initiating node in the source blockchain network as the initial value of the verification node set, and use other nodes in the source blockchain network and the target blockchain network other than the cross-chain transaction initiating node as the initial value of the candidate node set.
[0020] According to a fourth aspect of this disclosure, a cross-chain transaction verification apparatus is provided, comprising: a memory; and a processor coupled to the memory, the processor being configured to execute the cross-chain transaction verification method described in any of the above embodiments based on instructions stored in the memory.
[0021] According to a fifth aspect of this disclosure, a cross-chain transaction processing system is provided, comprising: a cross-chain transaction verification device as described in any of the foregoing embodiments, configured to construct a verification network; a source blockchain node, located in the source blockchain network, configured to send a cross-chain transaction initiated by a user terminal to the verification network; a verification node, located in the verification network, configured to verify the cross-chain transaction and, after successful verification, send the cross-chain transaction to a target blockchain network, wherein the verification node is selected from the source blockchain network and the target blockchain network; and a target blockchain node, located in the target blockchain network, configured to process the cross-chain transaction and send the processing result of the cross-chain transaction to the source blockchain network.
[0022] According to a sixth aspect of this disclosure, a computer-storeable medium is provided that stores computer program instructions thereon, which, when executed by a processor, implement the cross-chain transaction verification method or cross-chain transaction processing method described in any of the above embodiments.
[0023] In the above embodiments, efficient verification of cross-chain transactions can be achieved, cross-chain costs can be saved, and the efficiency of value transfer between blockchains can be improved. Attached Figure Description
[0024] The accompanying drawings, which form part of this specification, illustrate embodiments of this disclosure and, together with the specification, serve to explain the principles of this disclosure.
[0025] This disclosure will become clearer with reference to the accompanying drawings and the following detailed description, wherein:
[0026] Figure 1 This is a schematic diagram illustrating cross-chain technology based on a relay chain.
[0027] Figure 2 This is a flowchart illustrating a cross-chain transaction verification method according to some embodiments of this disclosure;
[0028] Figure 3 This is a flowchart illustrating a cross-chain transaction verification method according to other embodiments of this disclosure;
[0029] Figure 4 This is a flowchart illustrating the determination of path weights from candidate nodes to a set of verification nodes according to some embodiments of this disclosure;
[0030] Figure 5 This is a schematic diagram illustrating cross-chain operations based on a verification network according to some embodiments of the present disclosure;
[0031] Figure 6 This is a flowchart illustrating a cross-chain transaction processing method according to some embodiments of this disclosure;
[0032] Figure 7 This is a block diagram illustrating a cross-chain transaction verification apparatus according to some embodiments of the present disclosure;
[0033] Figure 8 This is a block diagram illustrating a cross-chain transaction verification apparatus according to other embodiments of this disclosure;
[0034] Figure 9 This is a block diagram illustrating a cross-chain transaction processing system according to some embodiments of the present disclosure;
[0035] Figure 10 This is a block diagram illustrating a computer system for implementing some embodiments of the present disclosure. Detailed Implementation
[0036] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.
[0037] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.
[0038] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.
[0039] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0040] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0041] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0042] Figure 1 This is a schematic diagram illustrating cross-chain technology based on a relay chain. For example... Figure 1As shown, related technologies address cross-chain transaction needs between different blockchains, such as cross-chain transactions between blockchain network A and blockchain network B, by using a relay chain (relay chain network) to perform cross-chain transaction verification. However, these technologies have the following drawbacks: First, building an additional relay chain outside the blockchain network is very costly; second, centralizing cross-chain transactions on the relay chain can easily lead to performance bottlenecks. For example, if there are three blockchain networks, centralizing all cross-chain transactions between these three networks on the relay chain can easily result in performance bottlenecks, thus affecting the processing efficiency of cross-chain transactions; third, the relay chain architecture may pose a risk of centralization.
[0043] To address the shortcomings of existing technologies, this disclosure proposes a cross-chain transaction verification and processing method, apparatus, and system to improve the verification efficiency of cross-chain transactions and save on the verification cost.
[0044] Figure 2 This is a flowchart illustrating a cross-chain transaction verification method according to some embodiments of the present disclosure. In some embodiments, the cross-chain transaction verification method is performed by either a node in the source blockchain network or the target blockchain network. For example, it is performed by the node that initiated the cross-chain transaction. Figure 2 The cross-chain transaction verification method is shown below. Figure 2 As shown, cross-chain transaction verification methods include:
[0045] Step S220: Initialize the candidate node set and the verification node set based on the nodes in the source blockchain network and the target blockchain network.
[0046] The source blockchain network is the blockchain network that initiates the cross-chain transaction, and the target blockchain network is the blockchain network to which the cross-chain transaction needs to be sent.
[0047] In some embodiments, step S220 includes: using the cross-chain transaction initiating node in the source blockchain network as the initial value of the verification node set, and using the other nodes in the source and target blockchain networks, excluding the cross-chain transaction initiating node, as the initial value of the candidate node set. For example, assuming the total number of nodes in the source blockchain network A and blockchain network B is K, and the cross-chain transaction initiating node is node p1 in blockchain network A, then node p1 is used as the initial value of the verification node set (e.g., denoted as set C), and the other nodes among the K nodes, excluding node p1, are used as the initial value of the candidate node set (e.g., denoted as set D).
[0048] In other embodiments, step S220 includes: randomly selecting a blockchain node from the source blockchain network and the target blockchain network as the initial value of the verification node, and using the other nodes in the source blockchain network and the target blockchain network as the initial value of the candidate node set. For example, assuming that the total number of nodes in blockchain network A and blockchain network B is K, a node is randomly selected from these K nodes, such as node p2, as the initial value of the verification node set (e.g., denoted as set C), and the other nodes in the K nodes, excluding node p2, are used as the initial value of the candidate node set (e.g., denoted as set D).
[0049] Step S240: Select candidate nodes from the candidate node set as verification nodes based on the path weights from the candidate nodes in the candidate node set to the verification node set, and update the verification node set based on the verification nodes.
[0050] In step S240, candidate nodes are selected as verification nodes from the candidate node set based on the different path weights from each candidate node to the verification node set. In this embodiment, selecting candidate nodes as verification nodes based on the overall path weights from the candidate nodes to the verification node set improves the performance of the final verification network.
[0051] In some embodiments, a larger path weight from a candidate node to the set of validators indicates better performance when that node is used as a validator. In these embodiments, the candidate node with the largest path weight in the candidate node set is selected as the validator node each time.
[0052] In other embodiments, a larger path weight from a candidate node to the set of validators indicates poorer performance when that node is used as a validator. In these embodiments, the candidate node with the smallest path weight in the candidate node set is selected as the validator node each time.
[0053] Step S260: If the number of verification nodes in the verification node set reaches a preset value, construct a verification network based on the verification node set.
[0054] In step S260, when the number of verification nodes in the verification node set reaches a preset value, the current verification node set is used as the node set of the verification network. Furthermore, embodiments of this disclosure may also include the following step: deploying smart contracts required for the operation of the verification network for each node in the verification node set.
[0055] The verification network is used to verify cross-chain transactions between the source blockchain network and the target blockchain network. For example, according to the method of this embodiment, verification network 1, constructed by selecting nodes from blockchain network A and blockchain network B, is used to verify cross-chain transactions between blockchain network A and blockchain network B; verification network 2, constructed by selecting nodes from blockchain network A and blockchain network C, is used to verify cross-chain transactions between blockchain network A and blockchain network C.
[0056] In this embodiment of the disclosure, an efficient cross-chain transaction verification network is established based on nodes in the source blockchain network and the target blockchain network. By verifying cross-chain transactions through this verification network, the efficiency of cross-chain transaction verification can be improved, enabling efficient transfer of value between different blockchains, saving the cost of cross-chain transaction verification, and solving the problems of high transaction verification cost and performance bottlenecks that exist in related technologies that use relay chains for cross-chain transactions.
[0057] Figure 3 This is a flowchart illustrating a cross-chain transaction verification method according to other embodiments of this disclosure. For example... Figure 3 As shown, cross-chain transaction verification methods include:
[0058] Step S310: Preset the total number of nodes in the verification node set.
[0059] In some embodiments, a preset value for the total number of nodes in the verification node set, i.e., the total number of nodes in the verification network, is greater than or equal to 4 and less than or equal to K, where K is the total number of nodes in the source blockchain network and the target blockchain network. The source blockchain network is the blockchain network initiating the cross-chain transaction, and the target blockchain network is the blockchain network to which the cross-chain transaction needs to be sent. By ensuring that the total number of nodes in the verification network is greater than or equal to 4, the requirements of mainstream blockchain networks using the BFT (Byzantine Fault Tolerance) consensus algorithm can be met, facilitating widespread adoption.
[0060] Step S320: Initialize the candidate node set and the verification node set based on the nodes in the source blockchain network and the target blockchain network.
[0061] In some embodiments, the cross-chain transaction initiating node in the source blockchain network is used as the initial value of the validator node set, and the other nodes in the source and target blockchain networks, excluding the cross-chain transaction initiating node, are used as the initial value of the candidate node set. For example, assuming the total number of nodes in the source blockchain network A and blockchain network B is K, and the cross-chain transaction initiating node is node p1 in blockchain network A, then node p1 is used as the initial value of the validator node set (e.g., denoted as set C), which can be represented as C = {p1}. The other nodes among the K nodes, excluding node p1, are used as the initial value of the candidate node set (e.g., denoted as set D), where D = {p2, p3, ..., pK}.
[0062] In other embodiments, a blockchain node is randomly selected from the source blockchain network and the target blockchain network as the initial value of the verification node, and other nodes in the source blockchain network and the target blockchain network are used as the initial value of the candidate node set.
[0063] Step S330: Determine the path weights from the candidate nodes in the candidate node set to the verification node set according to the path weight algorithm.
[0064] In this step, for each candidate node in the candidate node set, the path weight from the candidate node to each verification node in the verification node set is first determined using the path weight algorithm. Then, based on the path weights from the candidate node to each verification node in the verification node set, the path weight from the candidate node to the verification node set is determined. This process is repeated to determine the path weight from each candidate node to the verification node set.
[0065] In some embodiments, the arithmetic mean of the path weights from the candidate node to each verification node in the verification node set is calculated and used as the path weight from the candidate node to the verification node set. For example, assuming the current candidate node set D = {p3, ..., pK} and the current verification node set C = {p1, p2}, the path weight from candidate node p3 to verification node set C can be expressed as:
[0066]
[0067] Among them, W p3,C W represents the path weight from candidate node p3 to the set of verification nodes C. p3,p1 W represents the path weight from candidate node p3 to verification node p1. p3,p2 This represents the path weight from candidate node p3 to verification node p2.
[0068] In other embodiments, the sum of the path weights from the candidate node to each verification node in the verification node set is calculated and used as the path weight from the candidate node to the verification node set. Those skilled in the art will understand that, without affecting the implementation of this disclosure, other methods may be used to determine the path weight from the candidate node to the verification node set.
[0069] Step S340: Select the candidate node with the largest path weight in the candidate node set as the verification node, and update the verification node set according to the verification node.
[0070] In step S340, the larger the path weight of the candidate node to the set of verification nodes as a whole, the better the performance of using that node as a verification node. In this embodiment of the disclosure, selecting candidate nodes as verification nodes based on the path weight of the candidate node to the set of verification nodes as a whole can improve the performance of the final verification network. By selecting the candidate node with the largest path weight as the verification node, the performance of the final verification network can be further optimized.
[0071] For example, suppose the candidate node set D = {p3, ..., pK} and the current verification node set C = {p1, p2}. If the candidate node with the largest path weight in the candidate node set is calculated in step S330, then p3 is moved from the candidate node set D to the verification node set C, thus obtaining the updated candidate node set D = {p4, ..., pK} and the updated verification node set C = {p1, p2, p3}.
[0072] Step S350: Determine whether the number of verification nodes in the verification node set has reached the preset value.
[0073] If the judgment result of step S350 is yes, proceed to step S360; if the judgment result of step S350 is no, return to step S330 and continue execution until the number of verification nodes in the verification node set reaches a preset value.
[0074] Step S360: Construct a verification network based on the set of verification nodes.
[0075] When the number of verification nodes in the verification node set reaches a preset value, the current verification node set is used as the node set of the verification network. Furthermore, embodiments of this disclosure may also include the following steps: deploying smart contracts required for the operation of the verification network for each node in the verification node set.
[0076] The verification network is used to verify cross-chain transactions between the source blockchain network and the target blockchain network. For example, according to the method of this embodiment, verification network 1, constructed by selecting nodes from blockchain network A and blockchain network B, is used to verify cross-chain transactions between blockchain network A and blockchain network B; verification network 2, constructed by selecting nodes from blockchain network A and blockchain network C, is used to verify cross-chain transactions between blockchain network A and blockchain network C.
[0077] In this embodiment, an efficient cross-chain transaction verification network is established based on nodes in the source blockchain network and the target blockchain network. By verifying cross-chain transactions through this verification network, the verification efficiency of cross-chain transactions can be improved, enabling efficient transfer of value between different blockchains, saving the cost of cross-chain transaction verification, and solving the problems of high transaction verification cost and performance bottlenecks that exist in related technologies that use relay chains for cross-chain transactions.
[0078] Figure 4 This is a flowchart illustrating the determination of path weights from candidate nodes to a set of verification nodes according to some embodiments of this disclosure. The following is in conjunction with... Figure 4 right Figure 3 Step S330 in the illustrated process will be explained in detail. For example... Figure 4 As shown, in some embodiments of this disclosure, the method for determining the path weight from the candidate node to the set of verification nodes includes:
[0079] Step S331: Determine the path weight from the candidate node to each verification node in the verification node set based on the computing power index of the candidate node and the network communication delay index between the candidate node and each verification node in the verification node set.
[0080] In this embodiment of the disclosure, the path weight between nodes is calculated using two metrics: the computing power of the nodes and the network communication latency between the nodes.
[0081] In some embodiments, a higher computing power index value for a node indicates greater computing power, and a higher network communication latency index value between nodes indicates lower network communication latency. In these embodiments, the computing power index value of the candidate node and the network communication latency index value between the candidate node and the verification node can be weighted and summed to obtain the path weight from the candidate node to the verification node.
[0082] In other embodiments, a higher computing power index value for a node indicates greater computing power, and a lower network communication latency index value between nodes indicates lower network communication latency. In these embodiments, the reciprocal of the network communication latency index value between the candidate node and the verification node can be taken, and then a weighted sum of the reciprocal and the computing power index value of the candidate node can be obtained to obtain the path weight from the candidate node to the verification node.
[0083] Those skilled in the art will understand that, without affecting the implementation of this disclosure, other methods can be used to calculate the path weight from the candidate node to the verification node. For example, indicators such as the node's usage credibility and the node's online duration can also be considered when calculating the path weight from the candidate node to the verification node.
[0084] Step S332: Determine the path weight from the candidate node to the set of verification nodes based on the path weights of each verification node in the candidate node to the set of verification nodes.
[0085] In some embodiments, the arithmetic mean of the path weights from the candidate node to each verification node in the verification node set is calculated and used as the path weight from the candidate node to the verification node set. For example, assuming the current candidate node set D = {p3, ..., pK} and the current verification node set C = {p1, p2}, the path weight from candidate node p3 to verification node set C can be expressed as:
[0086]
[0087] Among them, W p3,C W represents the path weight from candidate node p3 to the set of verification nodes C. p3,p1 W represents the path weight from candidate node p3 to verification node p1. p3,p2 This represents the path weight from candidate node p3 to verification node p2.
[0088] In other embodiments, the sum of the path weights from the candidate node to each verification node in the verification node set is calculated and used as the path weight from the candidate node to the verification node set. Those skilled in the art will understand that, without affecting the implementation of this disclosure, other methods may be used to determine the path weight from the candidate node to the verification node set.
[0089] In this embodiment, the path weights from candidate nodes to the set of verification nodes are determined through the above steps. By selecting two indicators—the computing power of the nodes and the network communication latency between nodes—to calculate the path weights between nodes, and then calculating the overall path weights from candidate nodes to the set of verification nodes, the final verification network can achieve better performance and higher verification efficiency.
[0090] Figure 5 This is a schematic diagram illustrating cross-chain operations based on a verification network according to some embodiments of this disclosure. For example... Figure 5 As shown, the cross-chain verification method based on the embodiments of this disclosure can select multiple nodes from blockchain network A and blockchain network B to form a verification network, and then verify cross-chain transactions between blockchain network A and blockchain network B based on the verification network.
[0091] Compared to related technologies that rely on relay chains for cross-chain verification, this disclosure reduces the cost of cross-chain verification by establishing a verification network based on the two parties involved in the cross-chain transaction, eliminating the need for third-party nodes outside the transaction. Furthermore, different verification networks are constructed for different parties involved in cross-chain transactions, such as those consisting of blockchain network A and blockchain network B, or those consisting of blockchain network A and blockchain network C. This addresses the issues of high centralization risk and performance bottlenecks inherent in related technologies, thereby improving the efficiency of cross-chain transaction verification.
[0092] Figure 6 This is a flowchart illustrating a cross-chain transaction processing method according to some embodiments of this disclosure. For example... Figure 6 As shown, cross-chain transaction processing methods include:
[0093] Step S410: Construct the verification network.
[0094] In this step, a verification network can be constructed according to the cross-chain transaction verification method of this disclosure.
[0095] In some embodiments, the cross-chain transaction processing method further includes: updating the verification network periodically or irregularly.
[0096] Step S420: The source blockchain node, located in the source blockchain network, sends the cross-chain transaction initiated by the user terminal to the verification network.
[0097] In this step, the source blockchain node sends the cross-chain transaction to the corresponding verification network based on the information of both parties. For example, suppose a user terminal initiates a cross-chain transaction from blockchain network A to blockchain network B. Blockchain network A is the source blockchain network, and blockchain network B is the target blockchain network. After receiving the cross-chain transaction, the nodes in blockchain network A send it to the corresponding verification network based on the information of both parties. This verification network is built based on the nodes in blockchain networks A and B.
[0098] For example, a cross-chain transaction includes the transaction initiator, recipient, transaction amount, timestamp, transaction proof, version number, and other custom fields. Without affecting the implementation of this disclosure, those skilled in the art can flexibly adjust the field information included in a cross-chain transaction according to business needs.
[0099] Step S430: The verification node, located in the verification network, verifies the cross-chain transaction and sends it to the target blockchain network after successful verification.
[0100] In this step, each node in the verification network verifies the cross-chain transaction according to the verification rules. For example, verifying the cross-chain transaction includes verifying the legitimacy of the accounts involved in the cross-chain transaction and verifying the legitimacy of the transaction rules.
[0101] In some embodiments, a cross-chain transaction is considered to have passed the verification network if more than a predetermined proportion of verification nodes in the verification network pass its verification; otherwise, the cross-chain transaction is considered to have failed the verification network. If a cross-chain transaction passes the verification network, then consensus is reached within the verification network.
[0102] In some embodiments, after a cross-chain transaction is verified by a verification network, the verification nodes in the verification network perform multi-party signatures on the cross-chain transaction and then send the cross-chain transaction carrying the multi-party signatures to the target blockchain network. In specific implementations, the verification node can randomly select one or more target blockchain nodes from the target blockchain network to send the cross-chain transaction, or it can select one or more target blockchain nodes from the target blockchain network according to certain rules.
[0103] In some embodiments, after a cross-chain transaction is verified by the verification network, the verification node sends the cross-chain transaction to the cross-chain gateway. The cross-chain gateway performs normalization processing on the cross-chain transaction and then forwards the normalized cross-chain transaction to the target blockchain network.
[0104] Step S440: The target blockchain node, located in the target blockchain network, processes the cross-chain transaction and sends the processing result of the cross-chain transaction to the source blockchain network.
[0105] After receiving a cross-chain transaction, the target blockchain node processes the transaction and sends the transaction processing result to the cross-chain gateway, which then forwards the transaction processing result to the source blockchain network.
[0106] In some embodiments, the cross-chain transaction processing method further includes the following steps: if the transaction processing result indicates that the transaction is successful, the source blockchain node reaches consensus on the cross-chain transaction in the source blockchain network; if the transaction processing result indicates that the transaction fails, the source blockchain node performs a rollback operation on the transaction.
[0107] In this embodiment of the disclosure, by establishing an efficient verification network based on the nodes of both parties in a cross-chain transaction, and by verifying the cross-chain transaction based on the verification network, the processing efficiency of cross-chain transactions can be improved and the processing cost of cross-chain transactions can be reduced.
[0108] Figure 7 This is a block diagram illustrating a cross-chain transaction verification apparatus according to some embodiments of this disclosure. Figure 7 As shown, the cross-chain transaction verification device includes: an initialization module 510, a selection module 520, and a construction module 530.
[0109] Initialization module 510 is configured to initialize the candidate node set and the verification node set based on the nodes in the source blockchain network and the target blockchain network.
[0110] The source blockchain network is the blockchain network that initiates the cross-chain transaction, and the target blockchain network is the blockchain network to which the cross-chain transaction needs to be sent.
[0111] In some embodiments, the initialization module 510 uses the cross-chain transaction initiating node in the source blockchain network as the initial value of the verification node set, and uses other nodes in the source blockchain network and the target blockchain network other than the cross-chain transaction initiating node as the initial value of the candidate node set.
[0112] In other embodiments, the initialization module 510 randomly selects a blockchain node from the source blockchain network and the target blockchain network as the initial value of the verification node, and uses other nodes from the source blockchain network and the target blockchain network as the initial value of the candidate node set.
[0113] The selection module 520 is configured to select candidate nodes as verification nodes from the candidate node set based on the path weights from the candidate nodes in the candidate node set to the verification node set, and update the verification node set based on the verification nodes.
[0114] In some embodiments, a larger path weight from a candidate node to the set of verification nodes indicates better performance when using that node as a verification node. In these embodiments, the selection module 520 selects the candidate node with the largest path weight from the candidate node set as the verification node each time.
[0115] In other embodiments, a larger path weight from a candidate node to the set of verification nodes indicates poorer performance when that node is used as a verification node. In these embodiments, the selection module 520 selects the candidate node with the smallest path weight from the candidate node set as the verification node each time.
[0116] In some embodiments, the cross-chain transaction verification device includes, in addition to, Figure 7 In addition to the module shown, there is also a determination module, which is configured to: determine the path weight from the candidate node to each verification node in the verification node set based on the computing power index value of the candidate node and the network communication delay index value between the candidate node and each verification node in the verification node set; and determine the path weight from the candidate node to the verification node set based on the path weight from the candidate node to each verification node in the verification node set.
[0117] In some embodiments, a higher computing power index value for a node indicates greater computing power, and a higher network communication latency index value between nodes indicates lower network communication latency. In these embodiments, the determining module performs a weighted summation of the computing power index value of the candidate node and the network communication latency index value between the candidate node and the verification node to obtain the path weight from the candidate node to the verification node.
[0118] In other embodiments, a higher computing power index value for a node indicates greater computing power, and a lower network communication latency index value between nodes indicates lower network communication latency. In these embodiments, the determining module takes the reciprocal of the network communication latency index value between the candidate node and the verification node, and then performs a weighted summation of the reciprocal with the computing power index value of the candidate node to obtain the path weight from the candidate node to the verification node.
[0119] In some embodiments, the determining module calculates the arithmetic mean of the path weights from the candidate node to each verification node in the verification node set, and uses it as the path weight from the candidate node to the verification node set.
[0120] In other embodiments, the determining module calculates the sum of the path weights from the candidate node to each verification node in the verification node set, and uses this sum as the path weight from the candidate node to the verification node set. Those skilled in the art will understand that, without affecting the implementation of this disclosure, other methods may be used to determine the path weight from the candidate node to the verification node set.
[0121] Module 530 is configured to construct a verification network based on the set of verification nodes when the number of verification nodes in the set of verification nodes reaches a preset value.
[0122] In some embodiments, when the number of verification nodes in the verification node set reaches a preset value, the construction module 530 uses the current verification node set as the node set of the verification network.
[0123] The verification network is used to verify cross-chain transactions between the source blockchain network and the target blockchain network. For example, according to the method of this embodiment, verification network 1, constructed by selecting nodes from blockchain network A and blockchain network B, is used to verify cross-chain transactions between blockchain network A and blockchain network B; verification network 2, constructed by selecting nodes from blockchain network A and blockchain network C, is used to verify cross-chain transactions between blockchain network A and blockchain network C.
[0124] In this embodiment of the disclosure, an efficient cross-chain transaction verification network is established based on nodes in the source blockchain network and the target blockchain network. By verifying cross-chain transactions through this verification network, the efficiency of cross-chain transaction verification can be improved, enabling efficient transfer of value between different blockchains, saving the cost of cross-chain transaction verification, and solving the problems of high transaction verification cost and performance bottlenecks that exist in related technologies that use relay chains for cross-chain transactions.
[0125] Figure 8 This is a block diagram illustrating a cross-chain transaction verification apparatus according to other embodiments of this disclosure. Figure 8 As shown, the cross-chain transaction verification device 600 includes a memory 610 and a processor 620 coupled to the memory 610. The memory 610 is used to store instructions for executing corresponding embodiments of the cross-chain transaction verification device. The processor 620 is configured to execute cross-chain transaction verification methods in any of the embodiments of this disclosure based on the instructions stored in the memory 610.
[0126] Figure 9 This is a block diagram illustrating a cross-chain transaction processing system according to some embodiments of this disclosure. Figure 9 As shown, the cross-chain transaction processing system includes: a cross-chain transaction verification device 710, a source blockchain network 720, a verification network 730, and a target blockchain network 740.
[0127] Cross-chain transaction verification device 710, for Figure 7 or Figure 8 The cross-chain transaction verification device in the illustrated embodiment is configured to build a verification network.
[0128] The source blockchain node, located in the source blockchain network 720, is configured to send cross-chain transactions initiated by user terminals to the verification network 730.
[0129] For example, suppose a user terminal initiates a cross-chain transaction from blockchain network A to blockchain network B. Blockchain network A is the source blockchain network, and blockchain network B is the target blockchain network. After receiving the cross-chain transaction, the nodes in blockchain network A send the cross-chain transaction to the corresponding verification network based on the information of the two parties in the cross-chain transaction. That is, the verification network is built based on the nodes in blockchain networks A and B.
[0130] For example, a cross-chain transaction includes the transaction initiator, recipient, transaction amount, timestamp, transaction proof, version number, and other custom fields. Without affecting the implementation of this disclosure, those skilled in the art can flexibly adjust the field information included in a cross-chain transaction according to business needs.
[0131] Verification nodes, located in verification network 730, are configured to verify cross-chain transactions and, upon successful verification, send the cross-chain transaction to the target blockchain network 740. Verification nodes are selected from the source blockchain network 720 and the target blockchain network 740.
[0132] Each node in the verification network 730 verifies cross-chain transactions according to verification rules. For example, the verification of cross-chain transactions by the verification nodes includes: verifying the legitimacy of the accounts involved in the cross-chain transaction, and verifying the legitimacy of the transaction rules.
[0133] In some embodiments, a cross-chain transaction is considered to have passed the verification network if more than a predetermined proportion of verification nodes in the verification network pass its verification; otherwise, the cross-chain transaction is considered to have failed the verification network. If a cross-chain transaction passes the verification network, then consensus is reached within the verification network.
[0134] In some embodiments, after a cross-chain transaction is verified by the verification network 730, the verification nodes in the verification network 730 perform multi-party signatures on the cross-chain transaction and then send the cross-chain transaction carrying the multi-party signatures to the target blockchain network. In specific implementations, the verification node can randomly select one or more target blockchain nodes from the target blockchain network 740 to send the cross-chain transaction, or it can select one or more target blockchain nodes from the target blockchain network according to certain rules to send the transaction.
[0135] In some embodiments, after a cross-chain transaction is verified by the verification network, the verification node sends the cross-chain transaction to the cross-chain gateway, which performs normalization processing on the cross-chain transaction and then forwards the normalized cross-chain transaction to the target blockchain network 740.
[0136] The target blockchain node, located in the target blockchain network 740, is configured to process cross-chain transactions and send the processing results of the cross-chain transactions to the source blockchain network 720.
[0137] After receiving a cross-chain transaction, the target blockchain node processes the transaction and sends the transaction processing result to the cross-chain gateway, which then forwards the transaction processing result to the source blockchain network.
[0138] In this embodiment of the disclosure, the processing efficiency of cross-chain transactions can be improved and the processing cost of cross-chain transactions can be reduced.
[0139] Figure 10 This is a block diagram illustrating a computer system for implementing some embodiments of the present disclosure. Figure 10 As shown, the computer system 800 can be represented in the form of a general computing device. The computer system 800 includes a memory 810, a processor 820, and a bus 830 connecting different system components.
[0140] The memory 810 may include, for example, system memory, non-volatile storage media, etc. The system memory may store, for example, an operating system, applications, a boot loader, and other programs. The system memory may include volatile storage media, such as random access memory (RAM) and / or cache memory. The non-volatile storage media may store, for example, instructions for executing at least one of the corresponding embodiments of cross-chain transaction verification methods or cross-chain transaction processing methods. Non-volatile storage media include, but are not limited to, disk storage, optical storage, flash memory, etc.
[0141] The processor 820 can be implemented using a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete hardware components such as discrete gates or transistors. Accordingly, each module, such as the initialization module and the selection module, can be implemented by the central processing unit (CPU) running instructions in memory to execute the corresponding steps, or by dedicated circuitry to execute the corresponding steps.
[0142] Bus 830 can use any of a variety of bus architectures. For example, bus architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, and Peripheral Component Interconnect (PCI) bus.
[0143] The computer system 800 may also include an input / output interface 840, a network interface 850, and a storage interface 860. These interfaces 840, 850, and 860, as well as the memory 810 and processor 820, can be connected via a bus 830. The input / output interface 840 provides a connection interface for input / output devices such as a monitor, mouse, and keyboard. The network interface 850 provides a connection interface for various networked devices. The storage interface 860 provides a connection interface for external storage devices such as floppy disks, USB flash drives, and SD cards.
[0144] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations thereof, can be implemented by computer-readable program instructions.
[0145] These computer-readable program instructions are provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable device to produce a machine, such that execution of the instructions by the processor produces means for implementing the functions specified in one or more boxes of the flowchart and / or block diagram.
[0146] These computer-readable program instructions may also be stored in a computer-readable storage medium. These instructions cause a computer to work in a particular manner to produce an article of manufacture, including instructions that implement the functions specified in one or more boxes in a flowchart and / or block diagram.
[0147] This disclosure may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects.
[0148] The broadcasting method, device, system, and computer storage medium described in the above embodiments can improve the verification efficiency of cross-chain transactions and save on the verification cost of cross-chain transactions.
[0149] This concludes the detailed description of the cross-chain transaction verification, processing methods, apparatus, and system according to this disclosure. To avoid obscuring the concept of this disclosure, some details known in the art have not been described. Those skilled in the art can fully understand how to implement the technical solutions disclosed herein based on the above description.
Claims
1. A cross-chain transaction verification method, comprising: Based on the nodes in the source blockchain network and the target blockchain network, initialize the candidate node set and the verification node set, including using the cross-chain transaction initiating node in the source blockchain network as the initial value of the verification node set, and using other nodes in the source blockchain network and the target blockchain network other than the cross-chain transaction initiating node as the initial value of the candidate node set. Based on the computing power index of the candidate nodes and the network communication delay index between the candidate nodes and each verification node in the verification node set, the path weight from the candidate node in the candidate node set to the verification node set is determined. Based on the path weights from the candidate nodes in the candidate node set to the verification node set, candidate nodes are selected from the candidate node set as verification nodes, and the verification node set is updated based on the verification nodes. When the number of verification nodes in the set of verification nodes reaches a preset value, a verification network is constructed based on the set of verification nodes. The verification network is used to verify cross-chain transactions between the source blockchain network and the target blockchain network.
2. The cross-chain transaction verification method according to claim 1, determining the path weight from the candidate node in the candidate node set to the verification node set based on the computing power index value of the candidate node and the network communication latency index value between the candidate node and each verification node in the verification node set includes: The path weight from the candidate node to each verification node in the verification node set is determined based on the computing power index of the candidate node and the network communication delay index between the candidate node and each verification node in the verification node set. The path weight from the candidate node to the set of verification nodes is determined based on the path weight from the candidate node to each verification node in the set of verification nodes.
3. The cross-chain transaction verification method according to claim 1, wherein determining the path weight from the candidate node in the candidate node set to the verification node set based on the computing power index value of the candidate node and the network communication latency index value between the candidate node and each verification node in the verification node set includes: The computing power index of the candidate node and the network communication delay index between the candidate node and each verification node in the set of verification nodes are weighted and summed to obtain the path weight from the candidate node to each verification node in the set of verification nodes. Calculate the arithmetic mean of the path weights from the candidate node to each verification node in the verification node set, and use this as the path weight from the candidate node to the verification node set.
4. The cross-chain transaction verification method according to claim 1, wherein, Selecting candidate nodes as verification nodes from the candidate node set based on the path weights from the candidate nodes in the candidate node set to the verification node set includes: The candidate node with the largest path weight in the candidate node set is selected as the verification node.
5. The cross-chain transaction verification method according to claim 1, wherein, The preset value is greater than or equal to 4 and less than or equal to the total number of nodes in the source blockchain network and the target blockchain network.
6. The cross-chain transaction verification method according to claim 1, wherein, The cross-chain transaction verification method is executed by any node in the source blockchain network or the target blockchain network.
7. A cross-chain transaction processing method, comprising: A verification network is constructed according to any one of the cross-chain transaction verification methods described in claims 1-6; The source blockchain node, located in the source blockchain network, sends cross-chain transactions initiated by the user terminal to the verification network; Verification nodes, located in the verification network, verify the cross-chain transactions and, after successful verification, send the cross-chain transactions to the target blockchain network. The target blockchain node, located in the target blockchain network, processes the cross-chain transaction and sends the processing result of the cross-chain transaction to the source blockchain network.
8. A cross-chain transaction verification device, comprising: The initialization module is configured to initialize a candidate node set and a verification node set based on nodes in the source blockchain network and the target blockchain network, including using the cross-chain transaction initiating node in the source blockchain network as the initial value of the verification node set, and using other nodes in the source blockchain network and the target blockchain network other than the cross-chain transaction initiating node as the initial value of the candidate node set. The determination module is configured to determine the path weight from the candidate node in the candidate node set to the verification node set based on the computing power index value of the candidate node and the network communication delay index value between the candidate node and each verification node in the verification node set. The selection module is configured to select candidate nodes as verification nodes from the candidate node set based on the path weights from the candidate nodes in the candidate node set to the verification node set, and update the verification node set based on the verification nodes. The building module is configured to build a verification network based on the verification node set when the number of verification nodes in the verification node set reaches a preset value. The verification network is used to verify cross-chain transactions between the source blockchain network and the target blockchain network.
9. The cross-chain transaction verification device according to claim 8, wherein the determining module is configured as follows: The path weight from the candidate node to each verification node in the verification node set is determined based on the computing power index of the candidate node and the network communication delay index between the candidate node and each verification node in the verification node set. The path weight from the candidate node to the set of verification nodes is determined based on the path weight from the candidate node to each verification node in the set of verification nodes.
10. The cross-chain transaction verification device according to claim 8, wherein, The determining module is configured as follows: The computing power index of the candidate node and the network communication delay index between the candidate node and each verification node in the set of verification nodes are weighted and summed to obtain the path weight from the candidate node to each verification node in the set of verification nodes. Calculate the arithmetic mean of the path weights from the candidate node to each verification node in the verification node set, and use this as the path weight from the candidate node to the verification node set.
11. The cross-chain transaction verification device according to claim 8, wherein, The selection module is configured as follows: The candidate node with the largest path weight in the candidate node set is selected as the verification node.
12. A cross-chain transaction verification device, comprising: Memory; as well as A processor coupled to the memory, the processor being configured to execute the cross-chain transaction verification method as described in any one of claims 1 to 6 based on instructions stored in the memory.
13. A cross-chain transaction processing system, comprising: The cross-chain transaction verification device according to any one of claims 8-12 is configured to construct a verification network; The source blockchain node, located in the source blockchain network, is configured to send cross-chain transactions initiated by the user terminal to the verification network; A verification node, located in the verification network, is configured to verify the cross-chain transaction and, after successful verification, send the cross-chain transaction to the target blockchain network, wherein the verification node is selected from the source blockchain network and the target blockchain network; The target blockchain node, located in the target blockchain network, is configured to process the cross-chain transaction and send the processing result of the cross-chain transaction to the source blockchain network.
14. A computer-storable medium having stored thereon computer program instructions that, when executed by a processor, implement the cross-chain transaction verification method as described in any one of claims 1 to 6 or the cross-chain transaction processing method as described in claim 7.
Citation Information
Patent Citations
Block chain cross-chain processing method and device, equipment and storage medium
CN111769958A
Cross-chain communication method and device, network node and storage medium
CN112104607A