A cross-blockchain transaction method and device based on an open alliance chain

By acquiring and integrating blockchain node status information, the optimal transaction or query node is determined, solving the failure problem caused by network changes and node failures in cross-chain transactions, and achieving more efficient cross-chain transaction processing.

CN118283046BActive Publication Date: 2025-12-05INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410379767.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2025-12-05
Estimated Expiration
2044-03-29

AI Technical Summary

Technical Problem

In existing cross-chain technology solutions, when the processing chain gateway node becomes inaccessible due to node failure or network instability, the requesting chain cannot promptly detect and switch to other available nodes, resulting in cross-chain transaction failures or incorrect processing results.

Method used

By acquiring the state information of each node in the blockchain and integrating and sorting it with the state information obtained from other nodes in the blockchain, the optimal transaction or query node is determined, enabling proactive discovery and resolution of network changes and node anomalies in cross-chain transactions.

Benefits of technology

It improves the success rate of cross-chain transactions, avoids transaction failures or incorrect processing results, and enhances the robustness and reliability of cross-chain interactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118283046B_ABST
    Figure CN118283046B_ABST
Patent Text Reader

Abstract

The application can be applied to the technical field of the application of blockchain processing technology in finance, and provides a cross-blockchain transaction method and device based on an open alliance chain. The method applied to any node of a request blockchain comprises the following steps: obtaining first state information of each node of a processing blockchain; wherein the request blockchain and the processing blockchain are different blockchains; obtaining second state information of each node of the processing blockchain obtained by other nodes in the request blockchain; and processing cross-chain transactions and querying the results of the cross-chain transactions according to the first state information and the second state information. The application enables the request chain to completely participate in the node discovery, transaction consensus and other processes of the processing chain, so that the network changes, node abnormalities and other problems of the processing chain can be actively discovered and solved, thereby avoiding the failure of cross-chain transactions or the error of processing results caused by the fact that the gateway nodes of the processing chain cannot be accessed or cannot normally trade due to node failure or network jitter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of blockchain technology, particularly the field of data interaction technology among multiple blockchains, and can be used in the field of blockchain application in the financial industry. Specifically, it relates to a cross-blockchain transaction method and device based on an open consortium blockchain. Background Technology

[0002] Open consortium blockchains have numerous nodes, and their network structure frequently changes, with nodes constantly joining or leaving the network, and the connectivity between nodes also changing frequently. Furthermore, network transmission latency, packet loss, and other factors can sometimes lead to partial data errors or missing data on some nodes, indicating potential node anomalies. Existing blockchain technologies, such as node discovery and consensus mechanisms, provide a certain degree of fault tolerance; within threshold limits, the aforementioned network changes and node anomalies generally do not affect the normal operation of the entire network. To enable two blockchains with independent business and communication functions to share business operations, the industry has proposed cross-chain technology. Based on cross-chain technology, the request chain can send cross-chain transaction requests to the processing chain and obtain processing results from the processing chain, allowing the request chain to share the processing chain's business.

[0003] In existing cross-chain technology solutions, when the processing chain gateway node is inaccessible or unable to conduct normal transactions due to node failure, network jitter, etc., although the overall function of the processing chain is normal, the requesting chain cannot detect the problem of the processing chain gateway node and switch to other available nodes of the processing chain in time, resulting in cross-chain transaction failure or incorrect processing results. Summary of the Invention

[0004] This invention can be used in the technical field of blockchain processing technology applied in finance, and can also be used in any field other than finance.

[0005] One objective of this invention is to provide a cross-blockchain transaction method based on an open consortium blockchain. This method enables the requesting chain to fully participate in the node discovery and transaction consensus processes of the processing chain. Therefore, it can proactively discover and resolve issues such as network changes and node anomalies in the processing chain, thus avoiding cross-chain transaction failures or errors in processing results when the processing chain gateway node is unable to be accessed or unable to conduct normal transactions due to node failure or network jitter.

[0006] Another object of the present invention is to provide a cross-blockchain transaction device based on an open consortium blockchain. A further object of the present invention is to provide an electronic device comprising a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the aforementioned cross-blockchain transaction method based on an open consortium blockchain. A further object of the present invention is to provide a readable medium storing a computer program thereon, the computer program being executed by a processor to implement the steps of the aforementioned cross-blockchain transaction method based on an open consortium blockchain.

[0007] To address the technical problems in the background section of this application, the present invention provides the following technical solutions:

[0008] In a first aspect, the present invention provides a cross-blockchain transaction method based on an open consortium blockchain, applicable to requesting any node in the blockchain, comprising:

[0009] Obtain the first state information of each node in the processing blockchain; wherein the request blockchain and the processing blockchain are different blockchains;

[0010] Obtain the second state information of each node in the processing blockchain obtained by other nodes in the request blockchain;

[0011] Process cross-chain transactions and query the results of cross-chain transactions based on the first status information and the second status information.

[0012] In some embodiments of the present invention, before obtaining the second state information of each node in the processing blockchain obtained by other nodes in the request blockchain, the method further includes:

[0013] Store the first state information in the local processing chain node list;

[0014] The first status information is periodically retrieved to update the list of processing chain nodes.

[0015] In some embodiments of the present invention, the first state information and the second state information include:

[0016] Blockchain height, key block number, active connectivity, passive connectivity, data integrity, and response time.

[0017] In some embodiments of the present invention, processing cross-chain transactions and querying the results of cross-chain transactions based on the first state information and the second state information includes:

[0018] The local processing chain node list is integrated with the processing chain node lists of other nodes to generate an integrated result;

[0019] The integration results are sorted according to the active connectivity, the passive connectivity, the data integrity, and the response time to generate a sorting result;

[0020] The cross-chain transactions are processed and the results of querying the cross-chain transactions are queried based on the sorting results.

[0021] In some embodiments of the present invention, the integration results are sorted according to the active connectivity, the passive connectivity, the data integrity, and the response time to generate a sorting result, including:

[0022] The nodes of the processing blockchain in the normal state in the integration result are sorted in sequence according to the data integrity, the active connectivity, the blockchain height, and the response time to determine the optimal processing blockchain transaction node;

[0023] Processing the cross-chain transaction according to the sorting result includes:

[0024] Initiate a transaction request to the optimal processing blockchain transaction node.

[0025] In some embodiments of the present invention, sorting the integration results according to the active connectivity, the passive connectivity, the data integrity, and the response time to generate a sorting result further includes:

[0026] The nodes of the processing blockchain in the normal state in the integration result are sorted in sequence according to the data integrity, passive connectivity, blockchain height and response time to determine the optimal processing blockchain query node;

[0027] The results of querying the cross-chain transactions based on the sorting results include:

[0028] Initiate a request to the optimal processing blockchain query node to query the result of the cross-chain transaction.

[0029] In some embodiments of the present invention, the processing chain node list includes: node ID, node IP, blockchain height, block number of key blocks, hash array of key blocks, active connectivity, passive circulation, data integrity, response time, and node status.

[0030] In some embodiments of the present invention, obtaining the active connectivity of the nodes processing the blockchain includes:

[0031] Determine the first query node for the node that is querying the blockchain being processed;

[0032] Determine the first number of all nodes in the blockchain where the first query node is located;

[0033] The active connectivity of the node is determined based on the first quantity.

[0034] In some embodiments of the present invention, obtaining the passive connectivity of the nodes processing the blockchain includes:

[0035] Determine the second query node for querying other nodes in the blockchain being processed;

[0036] Determine the second number of all nodes in the blockchain where the second query node resides;

[0037] The passive connectivity of the node is determined based on the second quantity.

[0038] In some embodiments of the present invention, obtaining the key block number of the node processing the blockchain includes:

[0039] The key block number of a node is obtained based on the blockchain height of each node in the processing blockchain and the total number of key blocks.

[0040] In some embodiments of the present invention, obtaining the data integrity of the node processing the blockchain includes:

[0041] The nodes processing the blockchain are hash-matched with other nodes to generate hash-matching results;

[0042] The data integrity of the node processing the blockchain is obtained based on the hash matching result.

[0043] Secondly, the present invention provides a cross-blockchain transaction device based on an open consortium blockchain, applicable to any node in the requesting blockchain, the device comprising:

[0044] The first state information acquisition module is used to acquire the first state information of each node in the processing blockchain; wherein the request blockchain and the processing blockchain are different blockchains.

[0045] The second state information acquisition module is used to acquire the second state information of each node in the processing blockchain obtained by other nodes in the request blockchain.

[0046] The cross-chain transaction processing module is used to process cross-chain transactions and query the results of the cross-chain transactions based on the first status information and the second status information.

[0047] In some embodiments of the present invention, a cross-blockchain transaction device based on an open consortium blockchain further includes:

[0048] The first state information storage module is used to store the first state information in a local processing chain node list;

[0049] The node list maintenance module is used to periodically obtain the first status information in order to update the processing chain node list.

[0050] In some embodiments of the present invention, the first state information and the second state information include:

[0051] Blockchain height, key block number, active connectivity, passive connectivity, data integrity, and response time.

[0052] In some embodiments of the present invention, the cross-chain transaction processing module includes:

[0053] The integration result generation unit is used to integrate the local processing chain node list with the processing chain node lists of other nodes to generate an integration result;

[0054] The sorting result generation unit is used to sort the integration result according to the active connectivity, the passive connectivity, the data integrity, and the response time to generate a sorting result;

[0055] A cross-chain transaction processing unit is used to process the cross-chain transactions according to the sorting results and to query the results of the cross-chain transactions.

[0056] In some embodiments of the present invention, the sorting result generation unit includes:

[0057] The optimal transaction node determination unit is used to sort multiple nodes of the processing blockchain in the normal state in the integration result according to the data integrity, the active connectivity, the blockchain height and the response time, so as to determine the optimal processing blockchain transaction node.

[0058] The cross-chain transaction processing unit includes:

[0059] The transaction request sending unit is used to initiate a transaction request to the optimal processing blockchain transaction node.

[0060] In some embodiments of the present invention, the sorting result generation unit further includes:

[0061] The optimal query node determination unit is used to sort multiple nodes of the processing blockchain in the normal state in the integration result according to the data integrity, the passive connectivity, the blockchain height and the response time in order to determine the optimal processing blockchain query node.

[0062] The cross-chain transaction processing unit also includes:

[0063] The query request sending unit is used to initiate a request to the optimal processing blockchain query node to query the result corresponding to the cross-chain transaction.

[0064] In some embodiments of the present invention, the processing chain node list includes: node ID, node IP, blockchain height, block number of key blocks, hash array of key blocks, active connectivity, passive circulation, data integrity, response time, and node status.

[0065] In some embodiments of the present invention, the first state information acquisition module and the first state information acquisition module include:

[0066] The first query node determination unit is used to determine the first query node for querying the node processing the blockchain;

[0067] The first quantity determination unit is used to determine the first quantity of all nodes in the blockchain where the first query node is located;

[0068] An active connectivity determination unit is used to determine the active connectivity of the node based on the first quantity.

[0069] In some embodiments of the present invention, the first state information acquisition module and the first state information acquisition module further include:

[0070] The second query node determination unit is used to determine the second query node for querying other nodes in the processed blockchain.

[0071] The second quantity determination unit is used to determine the second quantity of all nodes in the blockchain where the second query node is located;

[0072] A passive connectivity determination unit is used to determine the passive connectivity of the node based on the second quantity.

[0073] In some embodiments of the present invention, the first state information acquisition module and the first state information acquisition module further include:

[0074] The key block number acquisition unit is used to acquire the key block number of the node based on the blockchain height of each node in the processed blockchain and the total number of key blocks.

[0075] In some embodiments of the present invention, the first state information acquisition module and the first state information acquisition module further include:

[0076] The hash matching result generation unit is used to perform hash matching between the nodes processing the blockchain and other nodes to generate hash matching results;

[0077] The data integrity acquisition unit is used to obtain the data integrity of the node processing the blockchain based on the hash matching result.

[0078] Thirdly, the present invention provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of a cross-blockchain transaction method based on an open consortium blockchain.

[0079] Fourthly, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement a cross-blockchain transaction method based on an open consortium blockchain.

[0080] Fifthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a cross-blockchain transaction method based on an open consortium blockchain.

[0081] As described above, embodiments of the present invention provide a cross-blockchain transaction method and apparatus based on an open consortium blockchain, applicable to any node of the requesting blockchain. The corresponding method includes: first, obtaining first state information of each node of the processing blockchain; wherein the requesting blockchain and the processing blockchain are different blockchains; next, obtaining second state information of each node of the processing blockchain obtained by other nodes in the requesting blockchain; and finally, processing cross-chain transactions and querying cross-chain transactions based on the first state information and the second state information.

[0082] This invention can improve the requesting blockchain's awareness of the processing blockchain in cross-chain interactions, and perfectly solves the problem of transaction failure or incorrect processing results caused by changes in the processing blockchain network or gateway node failure in cross-chain interactions. Attached Figure Description

[0083] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0084] Figure 1 A flowchart illustrating a cross-blockchain transaction method based on an open consortium blockchain, as described in an embodiment of the present invention. Figure 1 ;

[0085] Figure 2 This is a flowchart illustrating a cross-blockchain transaction method based on an open consortium blockchain, as described in an embodiment of the present invention. Figure 2 ;

[0086] Figure 3 This is a flowchart illustrating step 300 of a cross-blockchain transaction method based on an open consortium blockchain, as described in an embodiment of the present invention.

[0087] Figure 4 This is a flowchart illustrating step 302 of a cross-blockchain transaction method based on an open consortium blockchain, as described in an embodiment of the present invention. Figure 1 ;

[0088] Figure 5 This is a flowchart illustrating step 303 of a cross-blockchain transaction method based on an open consortium blockchain, as described in an embodiment of the present invention. Figure 1 ;

[0089] Figure 6 This is a flowchart illustrating step 302 of a cross-blockchain transaction method based on an open consortium blockchain, as described in an embodiment of the present invention. Figure 2 ;

[0090] Figure 7 This is a flowchart illustrating step 303 of a cross-blockchain transaction method based on an open consortium blockchain, as described in an embodiment of the present invention. Figure 2 ;

[0091] Figure 8 This is a flowchart illustrating step 100 of a cross-blockchain transaction method based on an open consortium blockchain, as described in an embodiment of the present invention. Figure 1 ;

[0092] Figure 9 This is a flowchart illustrating step 100 of a cross-blockchain transaction method based on an open consortium blockchain, as described in an embodiment of the present invention. Figure 2 ;

[0093] Figure 10 This is a flowchart illustrating step 100 of a cross-blockchain transaction method based on an open consortium blockchain, as described in an embodiment of the present invention. Figure 3 ;

[0094] Figure 11 This is a flowchart illustrating step 100 of a cross-blockchain transaction method based on an open consortium blockchain, as described in an embodiment of the present invention. Figure 4 ;

[0095] Figure 12 This is a flowchart illustrating a cross-blockchain transaction method based on an open consortium blockchain, as described in a specific embodiment of the present invention.

[0096] Figure 13 This is a flowchart illustrating step S1 of a cross-blockchain transaction method based on an open consortium blockchain, as described in a specific embodiment of the present invention. Figure 4 ;

[0097] Figure 14 This is a flowchart illustrating step S2 of a cross-blockchain transaction method based on an open consortium blockchain, as described in a specific embodiment of the present invention. Figure 4 ;

[0098] Figure 15 This is a flowchart illustrating step S3 of a cross-blockchain transaction method based on an open consortium blockchain, as described in a specific embodiment of the present invention. Figure 4 ;

[0099] Figure 16 A block representing a cross-blockchain transaction device based on an open consortium blockchain, as described in an embodiment of the present invention. Figure 1 ;

[0100] Figure 17 A block representing a cross-blockchain transaction device based on an open consortium blockchain, as described in an embodiment of the present invention. Figure 2 ;

[0101] Figure 18 This is a block diagram of the cross-chain transaction processing module 30 in an embodiment of the present invention;

[0102] Figure 19 The square of the sorting result generation unit 30b in the embodiment of the present invention Figure 1 ;

[0103] Figure 20 The block of the cross-chain transaction processing unit 30c in the embodiment of the present invention Figure 1 ;

[0104] Figure 21 The square of the sorting result generation unit 30b in the embodiment of the present invention Figure 2 ;

[0105] Figure 22 The block of the cross-chain transaction processing unit 30c in the embodiment of the present invention Figure 2 ;

[0106] Figure 23 The blocks shown are the first state information acquisition module 10 and the first state information acquisition module 20 in the embodiments of the present invention. Figure 1 ;

[0107] Figure 24 The blocks shown are the first state information acquisition module 10 and the first state information acquisition module 20 in the embodiments of the present invention. Figure 2 ;

[0108] Figure 25 The blocks shown are the first state information acquisition module 10 and the first state information acquisition module 20 in the embodiments of the present invention. Figure 3 ;

[0109] Figure 26 The blocks shown are the first state information acquisition module 10 and the first state information acquisition module 20 in the embodiments of the present invention. Figure 4 ;

[0110] Figure 27 This is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. Detailed Implementation

[0111] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0112] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0113] It should be noted that the terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or apparatuses. Without conflict, the embodiments and features in the embodiments of this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0114] The acquisition, storage, use, and processing of data in this application all comply with relevant laws and regulations. Specifically:

[0115] First, the information collected is information and data authorized by the user or fully authorized by all parties. The collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, not violate public order and good morals, and provide corresponding operation access points for users to choose to authorize or refuse.

[0116] Second, provide users with corresponding operation entry points for them to choose to agree to or reject the automated decision results; if the user chooses to reject, the process will proceed to the expert decision-making process.

[0117] Understandably, existing request chains typically only access the gateway node of the processing chain, that is, send requests to the gateway node and obtain responses, without fully participating in the node discovery and transaction consensus processes of the processing chain. Therefore, responses to network changes and node anomalies in the processing chain mainly rely on the processing chain's mechanism and cannot proactively discover and resolve problems.

[0118] For the reasons stated above, embodiments of the present invention provide a specific implementation of a cross-blockchain transaction method based on an open consortium blockchain. This method is applied to requesting any node in the blockchain. See [link to relevant documentation]. Figure 1 The method specifically includes the following:

[0119] Step 100: Obtain the first state information of each node in the processing blockchain; wherein the request blockchain and the processing blockchain are different blockchains;

[0120] Step 200: Obtain the second state information of each node in the processing blockchain obtained by other nodes in the request blockchain;

[0121] Step 300: Process cross-chain transactions and query the results of cross-chain transactions based on the first status information and the second status information.

[0122] As described above, embodiments of the present invention provide a cross-blockchain transaction method based on an open consortium blockchain, applied to any node of the requesting blockchain, comprising: first, obtaining first state information of each node of the processing blockchain; wherein the requesting blockchain and the processing blockchain are different blockchains; then, obtaining second state information of each node of the processing blockchain obtained by other nodes in the requesting blockchain; and finally, processing cross-chain transactions and querying cross-chain transactions based on the first state information and the second state information.

[0123] The method provided in this invention enables the requesting blockchain to correctly handle transaction failures or processing errors caused by network changes, node malfunctions, and other issues. The method is characterized by its implementation only on the cross-chain interaction module of the requesting blockchain, accessing only ordinary nodes of the processing blockchain, and not requiring the processing blockchain to provide a dedicated cross-chain gateway node or undergo special modifications for cross-chain operations. As long as the processing blockchain supports the two basic blockchain operations of network node information query and blockchain information query, this method has high versatility.

[0124] In some embodiments of the present invention, regarding step 100, an open consortium blockchain refers to a blockchain network form with a large number of nodes, relatively free node joining and leaving, and certain access and management mechanisms. A requesting blockchain refers to the blockchain that sends transaction requests to other blockchains in cross-chain transactions. Correspondingly, a processing blockchain refers to the blockchain that processes transaction requests or query requests sent by other blockchains in cross-chain transactions. Furthermore, the requesting blockchain and the processing blockchain belong to different blockchains.

[0125] In some embodiments of the present invention, for step 200, it is understood that each node in the request blockchain can obtain the status information of each node in the processing blockchain. Since the status information of the nodes in the processing blockchain changes rapidly, each node in the request blockchain can periodically obtain the status information of each node in the processing blockchain. Therefore, the status information of each node in the processing blockchain obtained by each node in the request blockchain may be inconsistent. Therefore, the status information of the nodes in the processing blockchain obtained by the current node can be combined with the status information of the nodes in the processing blockchain obtained by other nodes.

[0126] In some embodiments of the present invention, see Figure 2 Prior to step 200, a cross-blockchain transaction method based on an open consortium blockchain further includes:

[0127] Step 400: Store the first status information in the local processing chain node list;

[0128] Specifically, each node in the request blockchain independently maintains its own list of processing chain nodes. Nodes in the request blockchain need to issue cross-chain transaction requests and query cross-chain transaction results based on the list of processing chain nodes. The list of processing chain nodes includes the node ID, IP address, blockchain height, key block number, key block hash value, active connectivity, passive connectivity, data integrity, response time, and node status of each node in the processing blockchain.

[0129] Step 500: Periodically obtain the first status information to update the processing chain node list.

[0130] The system requests nodes in the blockchain to periodically access and process various nodes in the blockchain, obtain network node information and blockchain information, calculate key block numbers, active connectivity, passive connectivity, and data integrity, and maintain a list of processing chain nodes.

[0131] In some embodiments of the present invention, the first state information and the second state information include: blockchain height, key block number, active connectivity, passive connectivity, data integrity, and response time.

[0132] In some embodiments of the present invention, see Figure 3 Step 300 of a cross-blockchain transaction method based on an open consortium blockchain includes:

[0133] Step 301: Integrate the local processing chain node list with the processing chain node lists of other nodes to generate an integration result;

[0134] Specifically, nodes in the requesting blockchain broadcast information about nodes in normal status from their own processing chain node list. Simultaneously, they receive normal status node information broadcast by other nodes in the requesting blockchain and merge this information: for nodes missing from their own processing chain node list, they add them to the list, but mark their status as unknown; for nodes already in their own processing chain node list, if their status is abnormal, they change it to unknown.

[0135] Step 302: Sort the integration results according to the active connectivity, the passive connectivity, the data integrity, and the response time to generate a sorting result;

[0136] Step 303: Process the cross-chain transaction and query the result of the cross-chain transaction according to the sorting result.

[0137] In some embodiments of the present invention, see Figure 4 Step 302 includes:

[0138] Step 3021: Sort the various nodes of the processing blockchain in the normal state in the integration result according to the data integrity, the active connectivity, the blockchain height, and the response time in sequence to determine the optimal processing blockchain transaction node;

[0139] Specifically, when the requesting blockchain needs to initiate a cross-chain write request to the processing blockchain, the requesting blockchain node sorts the normal state nodes in the processing chain node list according to data integrity (reverse order, first sorting field), active connectivity (reverse order, second sorting field), blockchain height (reverse order, third sorting field), and response time (order, fourth sorting field).

[0140] See Figure 5 Step 303, processing the cross-chain transaction according to the sorting result, includes:

[0141] Step 3031: Initiate a transaction request to the optimal processing blockchain transaction node.

[0142] Specifically, the transaction request is sent to the processing chain node with the highest data integrity, the highest active connectivity, the highest blockchain height, and the shortest response time.

[0143] In some embodiments of the present invention, see Figure 6 Step 302 also includes:

[0144] Step 3022: Sort the various nodes of the processing blockchain in the normal state in the integration result according to the data integrity, the passive connectivity, the blockchain height, and the response time in sequence to determine the optimal processing blockchain query node;

[0145] Specifically, when the requesting blockchain needs to query the processing blockchain for cross-chain transaction results, the nodes in the requesting blockchain sort the normal state nodes in the processing chain node list according to data integrity (reverse order, first sorting field), passive connectivity (reverse order, second sorting field), blockchain height (reverse order, third sorting field), and response time (order, fourth sorting field).

[0146] See Figure 7 Step 303, querying the cross-chain transaction result based on the sorting result, includes:

[0147] Step 3032: Initiate a request to the optimal processing blockchain query node to query the result corresponding to the cross-chain transaction.

[0148] Specifically, the system queries the transaction results from the blockchain processing node with the highest data integrity, highest passive connectivity, highest blockchain height, and shortest response time.

[0149] In some embodiments of the present invention, the processing chain node list includes: node ID, node IP, blockchain height, block number of key blocks, hash array of key blocks, active connectivity, passive circulation, data integrity, response time, and node status.

[0150] The structure of the processing chain node list is shown in Table 1:

[0151] Table 1

[0152]

[0153] For example, the list of processing chain nodes corresponding to a six-node processing chain is shown in Table 2:

[0154] Table 2

[0155]

[0156] In some embodiments of the present invention, see Figure 8 The steps 100 and 200, which involve obtaining the active connectivity of the nodes processing the blockchain, include:

[0157] Step 101: Determine the first query node for querying the blockchain;

[0158] Step 102: Determine the first number of all nodes in the blockchain where the first query node is located;

[0159] Step 103: Determine the active connectivity of the node based on the first quantity.

[0160] In steps 101 to 103, if there are N nodes in the blockchain being processed, numbered from 0 to N-1, then the active connectivity Ca of one of the nodes is equal to the number of nodes in the blockchain network node set returned by querying that node.

[0161] In some embodiments of the present invention, see Figure 9 The passive connectivity of the nodes processing the blockchain in steps 100 and 200 includes:

[0162] Step 104: Determine the second query node for querying other nodes in the processing blockchain;

[0163] Step 105: Determine the second number of all nodes in the blockchain where the second query node resides;

[0164] Step 106: Determine the passive connectivity of the node based on the second quantity.

[0165] Specifically, in steps 104 to 106: the passive connectivity Cp of a node is equal to the number of times that node appears in the set of blockchain network nodes returned by other nodes when querying them. The calculation formula is as follows, where E i This refers to the connectivity between node i and other nodes numbered i. If querying node i returns a blockchain network node set containing that node, then E... i =1, otherwise E i =0.

[0166]

[0167] For steps 101 to 103 and steps 104 to 106: For example, the blockchain network node information and active connectivity and passive connectivity returned by the four nodes node0, node1, node2, and node3 are shown in Table 3:

[0168] Table 3

[0169] node The blockchain network node information returned by this node Active connectivity Ca Passive connectivity Cp node0 {node1} 1 2 node1 {node0, node2} 2 3 node2 {node0, node1, node3} 3 2 node3 {node1, node2} 2 1

[0170] In some embodiments of the present invention, see Figure 10 The key block number of the node processing the blockchain in steps 100 and 200 includes:

[0171] Step 107: Obtain the key block number of the node based on the blockchain height of each node in the processing blockchain and the total number of key blocks.

[0172] Specifically, let the blockchain heights returned by each processing chain node be H0, H1, H2, ..., H... N-1 First, calculate the mean μ and standard deviation δ:

[0173]

[0174] Excluding values ​​in the blockchain height that deviate from the mean by one standard deviation, filter out H0, H1, H2, ..., H N-1 H in the range [μ-δ, μ+δ] x Take the minimum value, that is

[0175] H = min(H) x ); x∈[0,N-1],H x ∈[μ-δ,μ+δ]

[0176] Where H represents the blockchain height used for processing the blockchain. For example, if the blockchain heights of the four nodes are 1, 99, 100, and 101 respectively, then μ = 75.25, δ = 42.87, and H = 99.

[0177] The critical blockchain has several blocks, let the total number of critical blocks be kn, numbered from 0 to kn-1, and the critical block numbered i corresponds to block number K. i The calculation formula is as follows:

[0178]

[0179] For example, if there are 10 key blocks and the blockchain height H is 10000, then the blockchain numbers of each key block are shown in Table 4.

[0180] Table 4

[0181] Key Block Block number 0 0 1 5000 2 7500 3 8750 4 9375 …… …… 9 9980

[0182] In some embodiments of the present invention, see Figure 11 The steps 100 and 200, which involve obtaining the data integrity of the nodes processing the blockchain, include:

[0183] Step 108: Perform hash matching between the node processing the blockchain and other nodes to generate hash matching results;

[0184] Step 109: Obtain the data integrity of the node processing the blockchain based on the hash matching result.

[0185] In steps 108 and 109, the formula for calculating the data integrity I of one node is as follows, where M i,j This refers to the hash matching between this node and the key block j of node i. If the hash value of the key block j of node i is equal to the hash value of the key block j of this node, then M... i,j =1, otherwise M i,j =0.

[0186]

[0187] For example, the hashes (Hash0-Hash9) of the 10 key blocks returned by the four nodes (node0, node1, node2, and node3) and the data integrity are shown in Table 5.

[0188] Table 5

[0189]

[0190] In one specific embodiment, the present invention also provides a specific implementation of a cross-blockchain transaction method based on an open consortium blockchain, see [link to implementation details]. Figure 12 Specifically, it includes the following:

[0191] Terminology Explanation:

[0192] Gateway node: In cross-chain transactions, the node that establishes communication between the request chain and the processing chain, namely, the node in the request chain that issues the cross-chain transaction request, the node in the processing chain that receives the cross-chain transaction request, the node in the request chain that receives the cross-chain transaction processing result, and the node in the processing chain that issues the cross-chain transaction processing result.

[0193] Network node information: Information about other nodes connected to a node in a P2P network and their status. Querying network node information is one of the basic functions of a P2P network node, and all types of blockchain networks (a type of P2P network) provide this function.

[0194] Blockchain information: Information such as the blockchain height, block number, hash value, and data volume of a node in a blockchain network. Querying blockchain information is one of the basic functions of a blockchain node, and all types of blockchain networks provide this function.

[0195] S1: Request the blockchain node to periodically access each node processing the blockchain, obtain the node information and blockchain information, and maintain the list of processing chain nodes.

[0196] Each node in the blockchain is requested to maintain its own list of processing chain nodes, which includes information such as node ID, IP, blockchain height, key block hash value, active connectivity, passive connectivity, data integrity, and response time.

[0197] S2: Request the blockchain node to sort the normal nodes in the processing chain node list, and send the cross-chain write transaction request to the processing blockchain node with high data integrity, high active connectivity, high blockchain height, and short response time.

[0198] Specifically, when initiating a cross-chain transaction, the blockchain node is requested to sort the normal state nodes in the processing chain node list and send the cross-chain transaction request to the processing blockchain node with high data integrity, high active connectivity, high blockchain height, and short response time.

[0199] S3: Request the blockchain node to sort the normal nodes in the processing chain node list and query the transaction results from the processing blockchain nodes with high data integrity, high passive connectivity, high block height, and short response time.

[0200] Specifically, when querying cross-chain transaction results, the blockchain node is requested to sort the normal state nodes in the processing chain node list and query the transaction results from the processing blockchain nodes with high data integrity, high passive connectivity, high blockchain height, and short response time.

[0201] Further, see Figure 13 Step S1 includes:

[0202] Step S101: Request the blockchain nodes to access the processing blockchain nodes in the list that are in normal or unknown states in turn, based on all node information in their respective processing chain node lists, and obtain the network node information of the processing blockchain.

[0203] During periods when no cross-chain transactions occur, the requesting blockchain node periodically accesses all processing blockchain nodes in its list, sequentially checking both those in normal and unknown states, to obtain network node information for the processing blockchain. If the number of nodes in the normal state in the list is zero, then nodes in the abnormal state are also accessed.

[0204] Step S102: Request the blockchain node to update the processing chain node list information and mark the node status.

[0205] The system requests the blockchain node to update the list of processing chain nodes, and marks the nodes that can respond to the access request as normal and the nodes that cannot be accessed as abnormal.

[0206] Step S103: Add the new node from the network node information to the processing chain node list.

[0207] If a node in the network node information returned by the processing chain node is not in the processing chain node list, then the node's ID, IP, and other information are added to the processing chain node list, its status is marked as unknown, and its response time is marked as infinite.

[0208] Step S104: Request the synchronization of node information in normal state among blockchain nodes.

[0209] Specifically, the requesting blockchain node broadcasts the information of nodes in normal status from its processing chain node list within the request chain. Simultaneously, it receives normal status node information broadcast by other nodes in the requesting blockchain and merges the information: for nodes missing from its own processing chain node list, it adds them to the list, but marks their status as unknown; for nodes already in its own processing chain node list, if their status is abnormal, it changes it to unknown. After merging the information, if the number of normal status nodes in the processing chain node list is greater than zero, the information of nodes still in abnormal status can be deleted, and subsequent operations can be performed; if the number of normal status nodes is zero, the information of abnormal status nodes is not deleted, and after a period of time, subsequent operations are not performed, but the process returns to step S101 to re-check the status of the processing blockchain nodes.

[0210] Step S105: Request the blockchain node to calculate and process the active connectivity and passive connectivity of each normal node in the blockchain.

[0211] Step S106: Request the blockchain node to obtain the blockchain height of the processing blockchain node and calculate the key block number.

[0212] The request blockchain nodes access the normal state nodes sequentially according to their respective processing chain node lists to obtain the blockchain height and update the blockchain height of the processing chain node list; based on the blockchain height returned by each processing blockchain node, the blockchain height and key block number of the processed blockchain are calculated.

[0213] Step S107: Request the blockchain node to obtain the key block hash value of the processing blockchain node in order to calculate the data integrity.

[0214] Specifically, the request blockchain nodes sequentially access the normal state nodes to obtain the key block hash values ​​of each node in order to calculate and process the data integrity of each normal state node in the blockchain.

[0215] Further, see Figure 14 Step S2 includes:

[0216] Step S201: Request the blockchain node to sort the normal nodes in the processing chain node list according to data integrity, active connectivity, block height, and response time.

[0217] When a requesting blockchain needs to initiate a cross-chain write request to the processing blockchain, the requesting blockchain node sorts the normal state nodes in the processing chain node list according to data integrity (reverse order, first sorting field), active connectivity (reverse order, second sorting field), blockchain height (reverse order, third sorting field), and response time (order, fourth sorting field).

[0218] Step S202: Send the transaction request to the processing blockchain node with high data integrity, high active connectivity, high block height, and short response time.

[0219] Further, see Figure 15 Step S3 includes:

[0220] Step S301: Request the blockchain node to sort the normal nodes in the processing chain node list according to data integrity, passive connectivity, block height, and response time.

[0221] Specifically, when the requesting blockchain needs to query the processing blockchain for cross-chain transaction results, the requesting blockchain node sorts the normal state nodes in the processing chain node list according to data integrity (reverse order, first sorting field), passive connectivity (reverse order, second sorting field), blockchain height (reverse order, third sorting field), and response time (order, fourth sorting field).

[0222] Step S302: Send the query request to the processing blockchain node with high data integrity, high passive connectivity, high block height, and short response time.

[0223] Query transaction results from blockchain nodes that have high data integrity, high passive connectivity, high blockchain height, and short response time.

[0224] As described above, the specific embodiments of the present invention provide a cross-blockchain transaction method based on an open consortium blockchain, applied to any node of the requesting blockchain, comprising: first, obtaining first state information of each node of the processing blockchain; wherein, the requesting blockchain and the processing blockchain are different blockchains; then, obtaining second state information of each node of the processing blockchain obtained by other nodes in the requesting blockchain; and finally, processing cross-chain transactions and querying cross-chain transactions based on the first state information and the second state information.

[0225] First, this invention enables the request blockchain to correctly handle issues such as network changes and node failures in the blockchain, and the method has high versatility.

[0226] Secondly, regardless of how nodes that request the blockchain or process the blockchain join or leave their blockchain network, as long as at least one node requesting the blockchain can access at least one node processing the blockchain, the relationship between other nodes requesting the blockchain and other nodes processing the blockchain can be gradually established, thereby ensuring the continuity of cross-chain transactions and giving cross-chain interaction a strong ability to resist network jitter.

[0227] Finally, this invention prioritizes sending cross-chain transaction requests and cross-chain result query requests to nodes with better connectivity and data integrity based on the node's connectivity and data integrity, thereby ensuring that cross-chain transactions are highly efficient.

[0228] Based on the same inventive concept, this application also provides a cross-blockchain transaction device based on an open consortium blockchain, which can be used to implement the method described in the above embodiments, as shown in the following embodiments. Since the principle of the cross-blockchain transaction device based on an open consortium blockchain is similar to that of the cross-blockchain transaction method based on an open consortium blockchain, the implementation of the cross-blockchain transaction device based on an open consortium blockchain can refer to the implementation of the cross-blockchain transaction method based on an open consortium blockchain, and repeated details will not be elaborated further. As used below, the terms "unit" or "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0229] This invention provides a specific implementation of a cross-blockchain transaction device based on an open consortium blockchain, capable of implementing a cross-blockchain transaction method based on an open consortium blockchain. See [link to relevant documentation]. Figure 16 A cross-blockchain transaction device based on an open consortium blockchain, applicable to any node in the requesting blockchain, the device comprising:

[0230] The first state information acquisition module 10 is used to acquire the first state information of each node in the processing blockchain; wherein the request blockchain and the processing blockchain are different blockchains.

[0231] The second state information acquisition module 20 is used to acquire the second state information of each node in the processing blockchain obtained by other nodes in the request blockchain.

[0232] The cross-chain transaction processing module 30 is used to process cross-chain transactions and query the results of the cross-chain transactions based on the first status information and the second status information.

[0233] In some embodiments of the present invention, see Figure 17 A cross-blockchain transaction device based on an open consortium blockchain also includes:

[0234] The first state information storage module 40 is used to store the first state information in a local processing chain node list;

[0235] The node list maintenance module 50 is used to periodically obtain the first status information in order to update the processing chain node list.

[0236] In some embodiments of the present invention, the first state information and the second state information include:

[0237] Blockchain height, key block number, active connectivity, passive connectivity, data integrity, and response time.

[0238] In some embodiments of the present invention, see Figure 18 The cross-chain transaction processing module 30 includes:

[0239] The integration result generation unit 30a is used to integrate the local processing chain node list with the processing chain node lists of other nodes to generate an integration result;

[0240] The sorting result generation unit 30b is used to sort the integration result according to the active connectivity, the passive connectivity, the data integrity and the response time to generate a sorting result;

[0241] The cross-chain transaction processing unit 30c is used to process the cross-chain transaction according to the sorting result and to query the result of the cross-chain transaction.

[0242] In some embodiments of the present invention, see Figure 19 The sorting result generation unit 30b includes:

[0243] The optimal transaction node determination unit 30b1 is used to sort multiple nodes of the processing blockchain in the normal state in the integration result according to the data integrity, the active connectivity, the blockchain height and the response time, so as to determine the optimal processing blockchain transaction node.

[0244] See Figure 20 The cross-chain transaction processing unit 30c includes:

[0245] The transaction request sending unit 30c1 is used to initiate a transaction request to the optimal processing blockchain transaction node.

[0246] In some embodiments of the present invention, see Figure 21 The sorting result generation unit 30b further includes:

[0247] The optimal query node determination unit 30b2 is used to sort the various nodes of the processing blockchain in the normal state in the integration result according to the data integrity, the passive connectivity, the blockchain height and the response time in order to determine the optimal processing blockchain query node.

[0248] See Figure 22 The cross-chain transaction processing unit 30c further includes:

[0249] The query request sending unit 30c2 is used to initiate a request to the optimal processing blockchain query node to query the result corresponding to the cross-chain transaction.

[0250] In some embodiments of the present invention, the processing chain node list includes: node ID, node IP, blockchain height, block number of key blocks, hash array of key blocks, active connectivity, passive circulation, data integrity, response time, and node status.

[0251] In some embodiments of the present invention, see Figure 23 The first status information acquisition module 10 and the first status information acquisition module 20 include:

[0252] The first query node determination unit 10a is used to determine the first query node for querying the node processing the blockchain;

[0253] The first quantity determination unit 10b is used to determine the first quantity of all nodes in the blockchain where the first query node is located.

[0254] Active connectivity determination unit 10c is used to determine the active connectivity of the node based on the first quantity.

[0255] In some embodiments of the present invention, see Figure 24 The first status information acquisition module 10 and the first status information acquisition module 20 further include:

[0256] The second query node determination unit 10d is used to determine the second query node for querying other nodes in the processing blockchain.

[0257] The second quantity determination unit 10e is used to determine the second quantity of all nodes in the blockchain where the second query node is located;

[0258] The passive connectivity determination unit 10f is used to determine the passive connectivity of the node based on the second quantity.

[0259] In some embodiments of the present invention, see Figure 25 The first status information acquisition module 10 and the first status information acquisition module 20 further include:

[0260] The key block number acquisition unit 10g is used to acquire the key block number of the node based on the blockchain height of each node in the processed blockchain and the total number of key blocks.

[0261] In some embodiments of the present invention, see Figure 26 The first status information acquisition module 10 and the first status information acquisition module 20 further include:

[0262] The hash matching result generation unit 10h is used to perform hash matching between the nodes processing the blockchain and other nodes to generate hash matching results;

[0263] The data integrity acquisition unit 10i is used to acquire the data integrity of the node processing the blockchain based on the hash matching result.

[0264] As described above, embodiments of the present invention provide a cross-blockchain transaction device based on an open consortium blockchain, applied to any node of the requesting blockchain, comprising: a first state information acquisition module, used to acquire first state information of each node of the processing blockchain; wherein the requesting blockchain and the processing blockchain are different blockchains; a second state information acquisition module, used to acquire second state information of each node of the processing blockchain acquired by other nodes in the requesting blockchain; and a cross-chain transaction processing module, used to process cross-chain transactions and query cross-chain transactions based on the first state information and the second state information.

[0265] This invention can improve the requesting blockchain's awareness of the processing blockchain in cross-chain interactions, and perfectly solves the problem of transaction failure or incorrect processing results caused by changes in the processing blockchain network or gateway node failure in cross-chain interactions.

[0266] The embodiments of this application also provide a specific implementation of an electronic device capable of implementing all steps of the cross-blockchain transaction method based on an open consortium blockchain as described in the above embodiments. See [link to implementation details]. Figure 27 The electronic devices specifically include the following:

[0267] Processor 1201, memory 1202, communications interface 1203, and bus 1204;

[0268] The processor 1201, memory 1202, and communication interface 1203 communicate with each other via bus 1204; the communication interface 1203 is used to realize information transmission between server-side devices and user-side devices and other related devices.

[0269] The processor 1201 is used to call the computer program stored in the memory 1202. When the processor executes the computer program, it implements all the steps in the cross-blockchain transaction method based on the open consortium blockchain in the above embodiments. For example, when the processor executes the computer program, it implements the following steps:

[0270] Step 100: Obtain the first state information of each node in the processing blockchain; wherein the request blockchain and the processing blockchain are different blockchains;

[0271] Step 200: Obtain the second state information of each node in the processing blockchain obtained by other nodes in the request blockchain;

[0272] Step 300: Process cross-chain transactions and query the results of cross-chain transactions based on the first status information and the second status information.

[0273] Embodiments of this application also provide a computer-readable storage medium capable of implementing all steps of the cross-blockchain transaction method based on an open consortium blockchain as described in the above embodiments. The computer-readable storage medium stores a computer program that, when executed by a processor, implements all steps of the cross-blockchain transaction method based on an open consortium blockchain as described in the above embodiments. For example, when the processor executes the computer program, it implements the following steps:

[0274] Step 100: Obtain the first state information of each node in the processing blockchain; wherein the request blockchain and the processing blockchain are different blockchains;

[0275] Step 200: Obtain the second state information of each node in the processing blockchain obtained by other nodes in the request blockchain;

[0276] Step 300: Process cross-chain transactions and query the results of cross-chain transactions based on the first status information and the second status information.

[0277] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. In particular, hardware + program embodiments are relatively simple in description because they are fundamentally similar to method embodiments; relevant parts can be referred to the descriptions in the method embodiments.

[0278] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0279] While this application provides method operation steps as shown in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-inventive labor. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only execution order. In actual device or user terminal product execution, the method can be executed in the order shown in the embodiments or drawings or in parallel (e.g., in a parallel processor or multi-threaded processing environment).

[0280] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, in implementing the embodiments of this specification, the functions of each module can be implemented in one or more software and / or hardware components, or a module that performs the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms.

[0281] Those skilled in the art will also know that, besides implementing the controller using purely computer-readable program code, the same functions can be achieved by logically programming the method steps, making the controller function as logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers (PLCs), and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the devices within it used to implement various functions can also be considered structures within that hardware component. Alternatively, the devices used to implement various functions can be considered as both software modules implementing the method and structures within a hardware component.

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

[0283] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0284] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, system embodiments are basically similar to method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. In the description of this specification, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the embodiments in this specification. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0285] The above description is merely an embodiment of the embodiments in this specification and is not intended to limit the embodiments of this specification. For those skilled in the art, various modifications and variations can be made to the embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the embodiments of this specification should be included within the scope of the claims of the embodiments of this specification.

Claims

1. A cross-blockchain transaction method based on an open consortium blockchain, characterized in that, Applied to requesting any node in the blockchain, including: Obtain the first state information of each node in the processing blockchain; wherein the request blockchain and the processing blockchain are different blockchains; Obtain the second state information of each node in the processing blockchain obtained by other nodes in the request blockchain; Process cross-chain transactions and query the results of cross-chain transactions based on the first status information and the second status information; The process of processing cross-chain transactions based on the first status information and the second status information, and querying the results of the cross-chain transactions, includes: Based on the first state information and the second state information, the optimal blockchain transaction node and the optimal blockchain query node are determined respectively. A transaction request is initiated to the optimal processing blockchain transaction node to process the cross-chain transaction; a request is initiated to the optimal processing blockchain query node to query the result of the cross-chain transaction.

2. The cross-blockchain transaction method according to claim 1, characterized in that, Before obtaining the second state information of each node in the processing blockchain obtained by other nodes in the request blockchain, the process further includes: Store the first state information in the local processing chain node list; The first status information is periodically retrieved to update the list of processing chain nodes.

3. The cross-blockchain transaction method according to claim 2, characterized in that, The first status information and the second status information include: The blockchain height, key block number, active connectivity, passive connectivity, data integrity, and response time are defined as follows: active connectivity represents the number of other nodes a node can access; passive connectivity represents the number of other nodes that can access this node; and data integrity represents the degree to which the hash value of a node's key block matches the hash values ​​of other nodes' key blockchains in the network.

4. The cross-blockchain transaction method according to claim 3, characterized in that, Processing cross-chain transactions and querying the results of cross-chain transactions based on the first and second status information includes: The local processing chain node list is integrated with the processing chain node lists of other nodes to generate an integrated result; The integration results are sorted according to the active connectivity, the passive connectivity, the data integrity, and the response time to generate a sorting result; The cross-chain transactions are processed and the results of querying the cross-chain transactions are queried based on the sorting results.

5. The cross-blockchain transaction method according to claim 4, characterized in that, The integration results are sorted according to the active connectivity, the passive connectivity, the data integrity, and the response time to generate a sorting result, including: The nodes of the processing blockchain in the normal state in the integration result are sorted in sequence according to the data integrity, the active connectivity, the blockchain height, and the response time to determine the optimal processing blockchain transaction node.

6. The cross-blockchain transaction method according to claim 4, characterized in that, The integration results are sorted according to the active connectivity, passive connectivity, data integrity, and response time to generate a sorted result, which also includes: The nodes of the processing blockchain in the normal state in the integration result are sorted in sequence according to the data integrity, passive connectivity, blockchain height, and response time to determine the optimal processing blockchain query node.

7. The cross-blockchain transaction method according to claim 4, characterized in that, The processing chain node list includes: node ID, node IP, blockchain height, block number of key blocks, hash array of key blocks, active connectivity, passive circulation, data integrity, response time, and node status.

8. The cross-blockchain transaction method according to claim 3, characterized in that, The process of obtaining the key block number of the node processing the blockchain includes: The key block number of a node is obtained based on the blockchain height of each node in the processing blockchain and the total number of key blocks.

9. The cross-blockchain transaction method according to claim 3, characterized in that, The process of obtaining the data integrity of the nodes processing the blockchain includes: The nodes processing the blockchain are hash-matched with other nodes to generate hash-matching results; The data integrity of the node processing the blockchain is obtained based on the hash matching result.

10. A cross-blockchain transaction device based on an open consortium blockchain, characterized in that, Applied to requesting any node in the blockchain, including: The first state information acquisition module is used to acquire the first state information of each node in the processing blockchain; wherein the request blockchain and the processing blockchain are different blockchains. The second state information acquisition module is used to acquire the second state information of each node in the processing blockchain obtained by other nodes in the request blockchain. A cross-chain transaction processing module is used to process cross-chain transactions and query the results of the cross-chain transactions based on the first status information and the second status information. The process of processing cross-chain transactions based on the first status information and the second status information, and querying the results of the cross-chain transactions, includes: Based on the first state information and the second state information, the optimal blockchain transaction node and the optimal blockchain query node are determined respectively. A transaction request is initiated to the optimal processing blockchain transaction node to process the cross-chain transaction; a request is initiated to the optimal processing blockchain query node to query the result of the cross-chain transaction.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the cross-blockchain transaction method based on any one of claims 1 to 9.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the cross-blockchain transaction method based on an open consortium blockchain as described in any one of claims 1 to 9.

13. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the cross-blockchain transaction method based on any one of claims 1 to 9.

Citation Information

Patent Citations

  • Block chain cross-chain method and device, computer equipment and storage medium

    CN111770102A

  • Block chain cross-chain interaction method and system suitable for satellite internet

    CN117527040A