A detectable cross-node message forwarding method based on global consensus

By adopting a detectable cross-node message forwarding method based on global consensus in the blockchain alliance chain, the defects of message forwarding security and network utilization in the prior art are solved, and efficient and secure message transmission and load balancing are achieved.

CN115695286BActive Publication Date: 2025-03-14广东启链科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211351346.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2025-03-14
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

In the existing blockchain alliance chain non-fully connected P2P network, the security and network utilization rate of message forwarding are defective, resulting in high network load and load imbalance, affecting the reliability and security of the network.

Method used

The detectable cross-node message forwarding method based on global consensus is adopted. By deploying a routing maintenance table smart contract, the routing information of each node is on the chain, a traceable and verifiable global routing table is built, and the non-tamperable characteristics of the blockchain are used to verify each node in the message forwarding process, and the node priority is defined according to the network transmission status to realize message detection and load balancing.

Benefits of technology

It improves the security and network utilization of the message transmission process, reduces the transmission of redundant messages, realizes fast message convergence and secure message forwarding, and enhances the reliability and security of the blockchain network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115695286B_ABST
    Figure CN115695286B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of blockchain technology, specifically a probeable cross-node message forwarding method based on global consensus. Addressing the limited research on network transmission in non-fully connected consortium blockchain scenarios, which differ from public blockchains, and the difficulty of meeting the efficiency and security requirements of message forwarding in consortium blockchain environments with existing distributed network transmission algorithms, this invention proposes the following solution: This solution defines node priorities based on node network transmission status, balancing the network transmission load across nodes, and reducing redundant message transmission through a probe method. Regarding security, by constructing a global route for verifying node message forwarding and tracing subsequent issues, rapid message convergence can be achieved, ensuring security during message forwarding, reducing redundant information transmission, and offering high scalability and reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a detectable cross-node message forwarding method based on global consensus. Background Art

[0002] Blockchain communicates through a peer-to-peer (P2P) network. A P2P network is a distributed network in which nodes can directly transmit data to each other without the need for a server to transfer data. In general, nodes in a blockchain alliance chain are interconnected in pairs to build a fully connected P2P network. However, once the number of nodes in a fully connected network increases, the network becomes complex and difficult to deploy. To simplify the network complexity, it is necessary to build a non-fully connected P2P network, in which nodes that are not directly connected forward data through other nodes.

[0003] In a non-fully connected blockchain network, secure message transmission and convergence methods are very important (i.e., allowing messages to be sent to the target node after as few forwardings as possible). Secure transmission can prevent information containing sensitive messages from being transmitted to abnormal nodes (abnormal nodes refer to nodes that aim to destroy the network or steal information); and the performance of the convergence method directly affects the data transmission between the source node and the target node, and thus affects the load of the entire P2P network.

[0004] The existing related technical solutions have proposed a convergence method for a non-fully connected P2P network of a consortium chain. The method first determines whether there is a directly connected node to receive the request, and then implements cross-node forwarding of messages by building and maintaining an adjacency table. The message forwarding strategy in this solution has defects in security and network utilization. On the basis of building an adjacency routing table, when message forwarding is required, the source node broadcasts the message to all nodes in the adjacency routing table. On the one hand, since the solution broadcasts the message directly to the adjacency routing table, it does not take into account the high network load caused by excessively large messages during large-scale message forwarding. When the number of messages is large and the message data is large, it may cause the entire network to be paralyzed. On the other hand, the scheme does not take into account the load imbalance caused by the network status. If there is a cache path to the target node, the scheme will forward directly according to the path. When there are too many messages under the path, it may exceed the processing load on the path node, which will cause the node to fail to process normally. In contrast, other path nodes are idle, and the load of the entire blockchain network is unbalanced. In addition, the construction of the forwarding routing table of the scheme is based on the condition that all nodes are absolutely safe. However, if there are one or more abnormal nodes that propagate the wrong node forwarding route, the message will not be transmitted correctly, which will affect the reliability and security of the entire network.

[0005] Limited by the shortcomings of traditional distributed networks, the transmission algorithm in existing distributed networks can only be based on the local trust of adjacent nodes, lacking global routing verification, and the trust in the node transmission process is based on the absolute security of the node. To solve the node trust problem, it is necessary to reach a global consensus to verify whether the transmission behavior of each node is normal. This technology builds a routing table that maintains a global consensus on the global trust problem. The routing table has the characteristics of traceability and verifiability, and can be traced when the network is abnormal or the network crashes.

[0006] Unlike other distributed networks, blockchain systems often involve digital economy, finance and other businesses, so they have higher requirements for the security and reliability of the system. In addition, unlike public chain scenarios, there is little research on network transmission in non-fully connected scenarios of alliance chains. The existing distributed network transmission algorithms are difficult to meet the message forwarding efficiency and security requirements in alliance chain scenarios. This invention is the first secure and efficient message forwarding method. Summary of the invention

[0007] The organosilicon-modified polyurethane acrylic sealant provided by the present invention provides a detectable cross-node message forwarding method based on global consensus, improves the security of the message transmission process, constructs a traceable and verifiable global routing table, uploads the routing information of each node to the chain, and utilizes the tamper-proof and traceable characteristics of the blockchain to verify each node in the message forwarding process and improve network utilization.

[0008] In order to achieve the above object, the present invention adopts the following technical solutions:

[0009] A detectable cross-node message forwarding method based on global consensus, specifically comprising the following steps:

[0010] S1. Deploy the routing maintenance table smart contract;

[0011] S2. Each node uploads the routing information table to the chain and maintains it according to the network status. The maintenance according to the network status includes: when a node creates a new connection, if the node adds a new direct connection path, the routing information of the new direct connection path is uploaded; if the node is disconnected, the node uploads the routing information of the disconnected path and deletes it after verification; if the node is offline, after the node is offline, more than half of the directly connected nodes of the node apply for disconnection, then the relevant routing information of the node is deleted. After the node is online, it establishes a direct connection with each node and uploads the routing information. After the routing information is received on the chain, it waits for each node to verify the path addition. After more than half of the directly connected nodes of the node pass the verification, the routing information of the node is updated to the routing information table;

[0012] S3. The source node initializes the message to be transmitted and loads the routing information table from the on-chain information;

[0013] S4, the source node forwards the message according to the directly connected node and the routing information table;

[0014] S5. If there is no path to the target node in the current on-chain routing information table, the target node is detected. If the detection is successful, the message is forwarded according to the detected path. If the detection fails, the target node does not exist.

[0015] The target node detection includes: the source node initializes a detection message, the detection message contains a message id, a node path through which the message passes, and source node information, wherein the message id is used to deduplicate messages, and the node path through which the message passes is used to prevent the same node from repeatedly receiving the same detection message; the source node calculates the network transmission priority of all directly connected nodes in turn, and sends detection messages to the directly connected nodes according to the priority from high to low, and the directly connected nodes that receive the detection message perform message detection processing and reply to the source node;

[0016] S6. After the message is forwarded, processing is performed based on the success or failure of the message sending;

[0017] The processing according to the success or failure of the message sending includes: if the message is sent successfully, caching the forwarding path of the message; if the message fails to be sent, applying for routing disconnection.

[0018] Preferably, in step S4, if there is a unique directly connected target node, the message is directly forwarded to the target node.

[0019] Preferably, if there are multiple directly connected target nodes in step S4, the network transmission priority of each target node is calculated, and the target node with the highest priority is selected for message forwarding.

[0020] Preferably, in step S4, if there is no directly connected target node, it is necessary to filter out the target node transmission path list through the locally cached global routing information. If there is only one unique transmission path, the transmission is performed directly. If there are multiple transmission paths, the transmission is performed according to the network transmission priority.

[0021] Compared with the prior art, the present invention has the following advantages:

[0022] 1. Improve the security of the message transmission process, build a traceable and verifiable global routing table, upload the routing information of each node to the chain, and use the tamper-proof and traceable characteristics of the blockchain to verify each node in the message forwarding process;

[0023] 2. Improve network utilization. The present invention defines the node message transmission priority based on the network transmission status to determine the message forwarding node;

[0024] 3. In order to improve the efficiency of message forwarding, a message detection method is defined to reduce the transmission of redundant messages;

[0025] 4. When the source node forwards a message, it first obtains the target node to be forwarded through the on-chain routing information, and then sends a detection message to the node list in turn according to the target node message transmission priority to determine the link status, and finally forwards the message through the link;

[0026] 5. In view of the defects of low network utilization and security mentioned in Solution 1, this solution has made the following technical improvements. In terms of network utilization, this solution defines node priority based on the node network transmission status, balances the load of network transmission of each node, and reduces redundant transmission of messages through detection methods. In terms of security, by building a global route, node message forwarding verification and subsequent problem tracing are carried out;

[0027] 6. Through the method in this application, rapid message convergence can be achieved, and the security of message forwarding can be guaranteed, the sending of redundant information is reduced, and it is easy to expand and has high reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A framework diagram of the steps of a detectable cross-node message forwarding method based on global consensus provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0029] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0030] Example 1

[0031] A detectable cross-node message forwarding method based on global consensus, characterized in that it specifically comprises the following steps:

[0032] S1. Deploy the routing maintenance table smart contract;

[0033] S2. Each node uploads the routing information table to the chain and maintains it according to the network status, including: when a node creates a new connection, if the node adds a new direct connection path, the routing information of the new direct connection path is uploaded; if the node is disconnected, the node uploads the routing information of the disconnected path and deletes it after verification; if the node is offline, after the node is offline, more than half of the directly connected nodes of the node apply for disconnection, the relevant routing information of the node is deleted. After the node is online, it establishes a direct connection with each node and uploads the routing information. After the routing information is received on the chain, it waits for each node to verify the path addition. After more than half of the directly connected nodes of the node pass the verification, the routing information of the node is updated to the routing information table;

[0034] S3. The source node initializes the message to be transmitted and loads the routing information table from the on-chain information;

[0035] S4, the source node forwards the message according to the directly connected node and the routing information table;

[0036] S5. If there is no path to the target node in the current on-chain routing information table, the target node is detected. If the detection is successful, the message is forwarded according to the detected path. If the detection fails, the target node does not exist.

[0037] Performing target node detection includes: the source node initializes a detection message, the detection message contains a message id, the node path through which the message passes, and the source node information, wherein the message id is used to deduplicate messages, and the node path through which the message passes is used to prevent the same node from repeatedly receiving the same detection message; the source node calculates the network transmission priority of all directly connected nodes in turn, and sends detection messages to the directly connected nodes according to the priority from high to low. The directly connected nodes that receive the detection message perform message detection processing and reply to the source node;

[0038] S6. After the message is forwarded, processing is performed based on the success or failure of the message sending;

[0039] Processing is performed based on the success or failure of message sending, including: if the message is sent successfully, caching the forwarding path of the message; if the message fails to be sent, applying for routing disconnection.

[0040] Example 2

[0041] A detectable cross-node message forwarding method based on global consensus, characterized in that it specifically comprises the following steps:

[0042] S1. Deploy the routing maintenance table smart contract;

[0043] S2. Each node uploads the routing information table to the chain and maintains it according to the network status, including: when a node creates a new connection, if the node adds a new direct connection path, the routing information of the new direct connection path is uploaded; if the node is disconnected, the node uploads the routing information of the disconnected path and deletes it after verification; if the node is offline, after the node is offline, more than half of the directly connected nodes of the node apply for disconnection, the relevant routing information of the node is deleted. After the node is online, it establishes a direct connection with each node and uploads the routing information. After the routing information is received on the chain, it waits for each node to verify the path addition. After more than half of the directly connected nodes of the node pass the verification, the routing information of the node is updated to the routing information table;

[0044] S3. The source node initializes the message to be transmitted and loads the routing information table from the on-chain information;

[0045] S4, the source node forwards the message according to the directly connected node and the routing information table;

[0046] S5. If there is no path to the target node in the current on-chain routing information table, the target node is detected. If the detection is successful, the message is forwarded according to the detected path. If the detection fails, the target node does not exist.

[0047] Performing target node detection includes: the source node initializes a detection message, the detection message contains a message id, the node path through which the message passes, and the source node information, wherein the message id is used to deduplicate messages, and the node path through which the message passes is used to prevent the same node from repeatedly receiving the same detection message; the source node calculates the network transmission priority of all directly connected nodes in turn, and sends detection messages to the directly connected nodes according to the priority from high to low. The directly connected nodes that receive the detection message perform message detection processing and reply to the source node;

[0048] S6. After the message is forwarded, processing is performed based on the success or failure of the message sending;

[0049] Processing is performed based on the success or failure of message sending, including: if the message is sent successfully, caching the forwarding path of the message; if the message fails to be sent, applying for routing disconnection.

[0050] Furthermore, in a newly created node connection, if only one of the two nodes in the direct path uploads new path information, a 10-minute waiting period will begin, waiting for the other node to verify. If both nodes in the direct path have uploaded new path information, the new path will be added to the routing table of the corresponding node. Node v uploads disconnection information and waits for verification on the chain by another node u. If the other node u uploads the same disconnection information, the on-chain routing table deletes the corresponding connection. If the other node u does not upload disconnection information, the node will enter the offline processing state. After node v comes online, it will upload routing information after establishing a direct connection with each node. The specific process is as follows: node v establishes a connection with the node in accordance with the blockchain network protocol. After the connection is established, it uploads routing information. After receiving the routing information on the chain, it waits for each node to perform path addition verification. After more than half of the direct connection nodes of node v have passed the verification, the routing information of the node is updated to the routing table.

[0051] In step S3, if the routes of all nodes have not changed, the locally cached information remains unchanged. If the routes of any nodes have changed, the latest routing information is loaded from the chain and cached locally.

[0052] In step S4, if there is a unique directly connected target node, the message is directly forwarded to the target node.

[0053] In step S4, if there are multiple directly connected target nodes, the network transmission priority of each target node is calculated, and the target node with the highest priority is selected for message forwarding.

[0054] Furthermore, the priority calculation rules are as follows: Define D as the processing capacity of the node, that is, the number of messages that can be processed per second, and define F as the number of messages sent from the sending node to the target node, that is, the flow rate. F will be reset to 0 every hour. Define R as the message delay between the sending node and the target node, where are weights, set to 0.1, 0.3, and 0.6 respectively;

[0055] Network transmission priority calculation: the sending node sends a detection message to the candidate node list, and the candidate node returns the processing capacity of the current node (the number of messages that can be processed per second). The sending node calculates the network transmission priority x according to the return message of the candidate node and the number of sent messages F and message delay R recorded locally;

[0056] When the message is sent successfully, the message forwarding flow record F sent by the source node to the target node is updated.

[0057] If there is no directly connected target node in step S4, it is necessary to filter out the target node transmission path list through the global routing information cached locally. If there is only one unique transmission path, the transmission is performed directly. If there are multiple transmission paths, the transmission is performed according to the network transmission priority.

[0058] Furthermore, the node transmission path list calculation process is as follows: from the global routing information table on the chain, the routing table RS of the target node is obtained, and all nodes in the routing table are directly connected to the target node;

[0059] Get the routing table SRS of all nodes in RS in turn;

[0060] Step 1: If there is a source node in the SRS node, a message transmission path from the source node to the target node is obtained;

[0061] Step 2: If there is no source node in the SRS node, the routing tables of all target nodes in the SRS are loaded in sequence, and the processed nodes are no longer processed;

[0062] Repeat steps 1 and 2 until all target node information is traversed.

[0063] In step S5, the source node initializes a detection message, which includes a message id, a message node path, and source node information. The message id is used to deduplicate messages, and the message node path is used to prevent the same node from receiving the same message repeatedly. The source node calculates the network transmission priority x of all directly connected nodes in turn, and sends a detection request to the directly connected nodes according to the priority from high to low. The relay node that receives the detection message performs message detection processing and replies to the source node.

[0064] If there is a directly connected target node or a target node of a local cache path, a detection message is sent according to the strategy for sending detection messages mentioned in the above process;

[0065] If there is no directly connected target node or a target node in the local cache path, add the relay node information to the node path of the detection message, and then perform message detection according to the network transmission priority of the directly connected node.

[0066] In step S5, if the message is sent successfully, the forwarding path related to the message is cached; if the message fails to be sent, a routing disconnection is applied.

[0067] If the path based on the global routing table fails, v will apply for a disconnection request to the chain between the two nodes v and u where the transmission failed.

[0068] The above are only preferred specific implementation modes of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical solutions and inventive concepts of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A detectable cross-node message forwarding method based on global consensus, characterized in that: The specific steps include: S1. Deploy the routing maintenance table smart contract; S2. Each node uploads the routing information table to the chain and maintains it according to the network status. The maintenance according to the network status includes: when a node creates a new connection, if the node adds a new direct connection path, the routing information of the new direct connection path is uploaded; if the node is disconnected, the node uploads the routing information of the disconnected path and deletes it after verification; if the node is offline, after the node is offline, more than half of the directly connected nodes of the node apply for disconnection, then the relevant routing information of the node is deleted. After the node is online, it establishes a direct connection with each node and uploads the routing information. After the routing information is received on the chain, it waits for each node to verify the path addition. After more than half of the directly connected nodes of the node pass the verification, the routing information of the node is updated to the routing information table; S3. The source node initializes the message to be transmitted and loads the routing information table from the on-chain information; S4, the source node forwards the message according to the directly connected node and the routing information table; S5. If there is no path to the target node in the current on-chain routing information table, the target node is detected. If the detection is successful, the message is forwarded according to the detected path. If the detection fails, the target node does not exist. The target node detection includes: the source node initializes a detection message, the detection message contains a message id, a node path through which the message passes, and source node information, wherein the message id is used to deduplicate messages, and the node path through which the message passes is used to prevent the same node from repeatedly receiving the same detection message; the source node calculates the network transmission priority of all directly connected nodes in turn, and sends detection messages to the directly connected nodes according to the priority from high to low, and the directly connected nodes that receive the detection message perform message detection processing and reply to the source node; S6. After the message is forwarded, processing is performed based on the success or failure of the message sending; The processing according to the success or failure of the message sending includes: if the message is sent successfully, caching the forwarding path of the message; if the message fails to be sent, applying for routing disconnection.

2. According to the method of detectable cross-node message forwarding based on global consensus according to claim 1, it is characterized in that: In step S4, if there is a unique directly connected target node, the message is directly forwarded to the target node.

3. According to the method of detectable cross-node message forwarding based on global consensus according to claim 1, it is characterized in that: In step S4, if there are multiple directly connected target nodes, the network transmission priority of each target node is calculated, and the target node with the highest priority is selected for message forwarding.

4. According to a method for detectable cross-node message forwarding based on global consensus according to claim 1, it is characterized in that: If there is no directly connected target node in step S4, it is necessary to filter out the target node transmission path list through the global routing information cached locally. If there is only one unique transmission path, the transmission is performed directly. If there are multiple transmission paths, the transmission is performed according to the network transmission priority.

Citation Information

Patent Citations

  • Data transmission method and device

    CN106954245A

  • Data processing method and device based on block chain network, equipment and storage medium

    CN112995211A