Message propagation method and device in block chain based on Internet of Things

By building the network topology and neighbor relationship of the Internet of Things blockchain system, optimizing the adjacent relationship between nodes, solving the data transmission delay and security problems when the traditional blockchain network is combined with the Internet of Things, and achieving efficient and robust data transmission.

CN119906710AActive Publication Date: 2025-04-29COMP NETWORK INFORMATION CENT CHINESE ACADEMY OF SCI
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510118752.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-04-29
Estimated Expiration
2045-01-24

AI Technical Summary

Technical Problem

When traditional blockchain networks are combined with the Internet of Things, they face problems such as delay in randomly selected nodes to transmit data, insufficient bandwidth, and network security risks, and it is difficult to balance data transmission efficiency and decentralization needs.

Method used

By building the network topology and neighbor relationship of the Internet of Things blockchain system, using the preset neighbor recommendation algorithm and the initial neighbor relationship, the optimized neighbor relationship between nodes is determined, and blockchain messages are passed between nodes according to the optimized neighbor relationship.

Benefits of technology

It improves the transmission efficiency and system robustness of IoT devices accessing blockchain networks, reduces network latency and bandwidth consumption, and enhances network security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119906710A_ABST
    Figure CN119906710A_ABST
Patent Text Reader

Abstract

The invention provides a message propagation method in a block chain based on the Internet of Things, and the method comprises the steps: determining nodes included in a target block chain and an initial adjacent relation between the nodes, the nodes being Internet of Things equipment; based on a preset neighbor recommendation algorithm and the initial adjacent relation, determining an optimized adjacent relation between the nodes; and transmitting a block chain message between the nodes according to the optimized adjacent relationship.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of blockchain and Internet of Things, and in particular to a message propagation method and device in a blockchain based on the Internet of Things. Background Art

[0002] In the Internet of Things, the access of a large number of devices and the dynamic changes of nodes bring challenges to data transmission efficiency, trust management, security, etc. Therefore, the introduction of blockchain technology provides a technical foundation for the trustworthiness and reliability of the construction of the Internet of Things. However, in practice, the combination of traditional blockchain networks and the Internet of Things still faces problems such as data transmission delays in randomly selected nodes, insufficient bandwidth, and network security risks. Existing centralized or semi-decentralized solutions are difficult to balance data transmission efficiency and decentralization requirements, making it difficult for the Internet of Things to be combined with the traditional blockchain network layer.

[0003] Therefore, a message propagation method and device in a blockchain based on the Internet of Things is needed. Summary of the invention

[0004] The purpose of the present invention is to provide a message propagation method and device in a blockchain based on the Internet of Things, which improves the transmission efficiency and system robustness of the Internet of Things devices accessing the blockchain network by focusing on the key points of network topology construction and data transmission.

[0005] To achieve the above objectives, in a first aspect, the present invention provides a message propagation method in a blockchain based on the Internet of Things, comprising:

[0006] Determine an initial neighbor relationship between a node included in a target blockchain and the node, wherein the node is an IoT device;

[0007] Determine the optimized neighbor relationship between the nodes based on a preset neighbor recommendation algorithm and an initial neighbor relationship;

[0008] Blockchain messages are transmitted between the nodes according to the optimized neighbor relationship.

[0009] Specifically, based on a preset neighbor recommendation algorithm and an initial neighbor relationship, determining the optimized neighbor relationship between the nodes includes:

[0010] Each node determines the round-trip time of the target node that has an initial neighbor relationship with the node, and recommends candidate neighbor nodes of the target node to the target node based on the round-trip time. The target node merges all the candidate neighbor nodes recommended to the target node into a total candidate neighbor node set; based on the number of outgoing connections of the target node and the number of incoming connections of each node in the total candidate neighbor node set, it is determined whether to convert each node in the total candidate neighbor node set into a neighbor node of the target node.

[0011] Specifically, the blockchain message is a blockchain transaction;

[0012] According to the optimized neighbor relationship, blockchain messages are transmitted between the nodes, including:

[0013] The first node in the blockchain propagates the blockchain transaction initiated by the node to N second nodes and attaches a propagation stage identifier. Each second node propagates the blockchain transaction to a third node according to the propagation stage identifier and updates the propagation stage identifier. The third node selects a fourth node through a pre-set screening condition and propagates the blockchain transaction to the fourth node.

[0014] Preferably, the IoT devices include edge devices and cloud devices of the IoT.

[0015] Preferably, the round trip time is calculated by the following formula:

[0016]

[0017] Where i represents the first node, j represents the second node, t is the number of measurements, and RTT i,j represents the round trip time, T St Sending time, T Rt The receiving time.

[0018] Specifically, the first node propagates the blockchain transaction to N second nodes with a propagation stage identifier, the second node propagates the blockchain transaction to a third node according to the propagation stage identifier, the third node selects a fourth node according to a preset screening condition and propagates the blockchain transaction to the fourth node, including:

[0019] The first node generates a blockchain transaction, the blockchain transaction has a propagation stage identifier, the propagation stage identifier is used to identify the blockchain transaction propagation stage, the propagation stage identifier is set to 1 to indicate that the node receiving the propagation stage identifier equal to 1 performs the second stage; the first node propagates the blockchain transaction to N second nodes;

[0020] The second node accepts the blockchain transaction, determines whether the propagation stage identifier of the blockchain transaction is 1, and forwards the blockchain transaction to the third node if the propagation stage identifier is equal to 1;

[0021] The third node receives the blockchain transaction, and randomly selects x nodes with the smallest round-trip time and y nodes with the largest round-trip time from neighbor nodes of the third node to forward the blockchain transaction.

[0022] Preferably, x nodes with the shortest round-trip time and y nodes with the longest round-trip time are randomly selected from the neighboring nodes of the third node, which can be expressed as:

[0023]

[0024] in, Sort the neighbor node set in ascending order for the connection of the third node, For the intermediate index, RandomSelect x Indicates randomly selecting x nodes with the shortest round trip time, N RTT-min Represents the set of x nodes with the minimum round trip time;

[0025]

[0026] in, Sort the neighbor node set in ascending order for the connection of the third node, For the intermediate index, RandomSelect y It means randomly selecting y nodes with the largest round-trip time. is the total number of connections to the third node, N RTT-max Represents the set of nodes with the largest y round-trip times.

[0027] Specifically, it also includes:

[0028] The trust scores between the nodes of the blockchain are determined according to a preset inter-node trust optimization model, and the optimized neighbor relationships between the nodes of the blockchain are updated according to the trust scores.

[0029] Preferably, the nodes of the blockchain include a first node and a second node;

[0030] The trust score of the first node to the second node can be expressed as:

[0031]

[0032] Where i represents the first node, j represents the second node, α RTT , β stability , γ history is the weight, Score the round-trip time latency, Score the network stability, Score historical interaction records, RTT ij is the round trip time between the first node and the second node, α is the stability adjustment factor, P loss is the packet loss rate, exp is the exponential function, H ijis the number of times the second node sends messages to the first node, and max(H) represents the total number of transactions of the first node in one cycle;

[0033] Updating the optimized neighbor relationship between nodes of the blockchain according to the trust score includes:

[0034] Set the trust score threshold θ, if S ij <θ, the second node is removed from the neighbor list.

[0035] In a second aspect, the present invention provides a message propagation device in a blockchain based on the Internet of Things, comprising:

[0036] A determination unit is configured to determine an initial neighbor relationship between a node included in a target blockchain and the node, wherein the node is an Internet of Things device;

[0037] An optimization unit configured to determine an optimized neighbor relationship between the nodes based on a preset neighbor recommendation algorithm and an initial neighbor relationship;

[0038] A propagation unit is configured to transmit blockchain messages between the nodes according to the optimized neighbor relationship. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A flowchart of a message propagation method in a blockchain based on the Internet of Things provided by an embodiment of the present invention;

[0040] Figure 2 A neighbor node recommendation flow chart provided by an embodiment of the present invention;

[0041] Figure 3 A schematic flow chart of early burst optimization provided by an embodiment of the present invention;

[0042] Figure 4 A structural diagram of a message propagation device in a blockchain based on the Internet of Things provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments.

[0044] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be described below in conjunction with the accompanying drawings. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0045] In the description of the embodiments of the present invention, words such as "exemplary", "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a concrete way.

[0046] In the existing technology, in a centralized solution, the data of all IoT devices are usually aggregated to a central server for processing. This architecture can achieve efficient data transmission and management when the amount of data is small and the number of devices is limited. However, with the explosive growth of IoT devices, a large number of devices transmitting data to the central server at the same time will cause network congestion. For example, in a traffic monitoring system of a large smart city, if all traffic sensor data is centrally transmitted to a data center, during peak traffic hours, the delay in data transmission will increase dramatically, affecting the real-time nature of the data. The processing capacity of the central server will also become a bottleneck. It needs to store, analyze and forward massive amounts of IoT data. When the data flow exceeds the processing limit of the server, the data will be queued for processing, further reducing the efficiency of data transmission.

[0047] Semi-decentralized solutions usually introduce some intermediate nodes or proxy servers to assist in data transmission and management. Although these intermediate nodes can share the pressure of the central server to a certain extent, they also increase the links of data transmission. For example, in some IoT data sharing platforms, data needs to be converted and preliminarily screened by the proxy server before being transmitted to the target node, which increases the risk of additional delays and data loss. The communication between nodes in the semi-decentralized solution may not be flexible enough. Since part of the power is still concentrated in a few nodes, the data transmission path may be restricted, and it is impossible to select the optimal path according to the real-time status of the network (such as node load, link quality, etc.), thus affecting the efficiency of data transmission.

[0048] In order to overcome the deficiencies in the prior art, a message propagation method and device in a blockchain based on the Internet of Things is proposed. The present invention constructs the network topology and neighbor relationship of the Internet of Things blockchain system, takes the random neighbors initially set by the system as the starting point, and uses a unique method based on neighbor recommendation to carry out topology construction. Through the mutual recommendation mechanism between neighbors, more valuable neighbor nodes are selected, and then the transaction is broadcast to the entire network through an efficient data transmission mechanism.

[0049] Figure 1 A flowchart of a message propagation method in a blockchain based on the Internet of Things provided by an embodiment of the present invention. Figure 1As shown, the method comprises at least the following steps:

[0050] S101: Determine an initial neighbor relationship between a node included in a target blockchain and the node, wherein the node is an Internet of Things device.

[0051] In different embodiments, the node may be different devices. In a specific embodiment, the node is an Internet of Things device, which includes an edge device and a cloud device of the Internet of Things.

[0052] For example, in the cloud-edge-end architecture, the edge devices (IoT access devices) and cloud device full nodes in the network are determined as networking nodes, and the IoT end devices are only responsible for collecting data. In the embodiment of the present invention, it can be assumed that there are 2,000 edge devices and cloud devices participating in the networking as full nodes. First, the initial network topology and the neighbor relationship between each node are constructed through traditional network configuration means, that is, each node randomly selects 8 nodes as its neighbors.

[0053] S102: Based on a preset neighbor recommendation algorithm and an initial neighbor relationship, determine an optimized neighbor relationship between the nodes.

[0054] In one embodiment, the optimized neighbor relationship between the nodes can be determined in the following manner: all round-trip times between each first node and the second node in the initial neighbor relationship are measured, a first candidate set of all node sets recommended by the first node to the second node is obtained according to a preset neighbor recommendation algorithm, and all first candidate sets recommended by all neighbor nodes in the initial neighbor relationship of the second node are combined to obtain a second candidate set; it is determined whether the number of connections of the second node and the number of connections of the nodes in the second candidate set are both less than a preset number of connections N, if both are less than, the nodes in the second candidate set are added to the connection set of the second node, otherwise they are discarded, and when all nodes in the second candidate set have been judged but the number of connections of the second node is still less than the number of connections N, a node is randomly selected from the blockchain as a neighbor node of the second node until the number of connections of the second node is equal to the number of connections N.

[0055] In one embodiment, the round trip time is calculated by the following formula:

[0056]

[0057] Where i represents the first node, j represents the second node, t is the number of measurements, and RTT i,j represents the round trip time, T St Sending time, T Rt The receiving time.

[0058] Figure 2A neighbor node recommendation flow chart provided by an embodiment of the present invention is as follows: Figure 2 As shown, the target outgoing connection number of each node in the embodiment of the present invention is first set to 64, and the maximum number of incoming connections of each node is also 64. After connecting to the initial neighbor, each node starts to perform RTT (Round-Trip Time) measurement to obtain network delay information with each neighbor. Taking node i as an example, the number of measurements T is set to 10 times. For node i and its neighbor j, the RTT value is calculated using the following formula:

[0059]

[0060] Where i represents node i, j represents neighbor j, t is the number of measurements, and RTT i,j represents the round trip time, T St Sending time, T Rt is the receiving time. Each node calculates the corresponding RTT value for all its neighbors in this way.

[0061] First, the similarity range can be set to 80%-120% of RTT. For another neighbor k of node i, if the RTT between neighbor k and node i is i,k satisfy:

[0062] RTT i,k ∈[80%·RTT i,j ,120%·RTT i,j ]

[0063] That is, the RTT between node k and node i i,k RTT values ​​between i and j i,j The RTT is considered similar if k is within the range of 80%-120% of the value. If it is in the candidate neighbor set recommended by node i to node j, it will be added, otherwise it will be skipped.

[0064] Through the above steps, we can get the candidate set of similar neighbors returned by each neighbor of node j: Traverse all neighbors of node j and obtain the total similar neighbor candidate set according to the following formula:

[0065]

[0066] Where N j is the set of neighbors of j, is the candidate neighbor set recommended by node i to j, is the total similar neighbor candidate set of j.

[0067] Traversal The candidate nodes in It is known that the target number of outgoing connections n of node j is 64, and each candidate node n i The maximum number of incoming connections m is 64. If the number of outgoing connections of node j is less than 64, and node n i The number of incoming neighbors is less than 64, and n i If node j is not in j's neighbor set, then node j will i Add it to your neighbor set, otherwise discard it.

[0068] After node j has added recommended neighbors through the above steps, if the number of neighbors has not reached the target number of 64, a circular recommendation process will be started. That is, the neighbors newly added to the neighbor list in the previous step are used to recommend similar neighbors. If no new recommended neighbors are generated in this round, a node is randomly selected from the DNS as a neighbor, and then the recommendation operation is repeated again, and this process is repeated until the target number of connections, 64, is finally reached.

[0069] S103: According to the optimized neighbor relationship, blockchain messages are transmitted between the nodes.

[0070] In different embodiments, the specific type of blockchain message may be different. In one embodiment, the blockchain message may be a blockchain transaction.

[0071] Specifically, in one embodiment, the first node in the blockchain can propagate the blockchain transaction initiated by the node to N second nodes with a propagation stage identifier, each second node propagates the blockchain transaction to a third node according to the propagation stage identifier, and updates the propagation stage identifier, and the third node selects a fourth node through a pre-set screening condition and propagates the blockchain transaction to the fourth node. Among them, the first node propagates the blockchain transaction to N second nodes with a propagation stage identifier, the second node propagates the blockchain transaction to the third node according to the propagation stage identifier, and the third node selects the fourth node through a pre-set screening condition and propagates the blockchain transaction to the fourth node.

[0072] Figure 3 A schematic flow chart of early burst optimization provided by an embodiment of the present invention is as follows: Figure 3 As shown in the first stage, at the initial stage of the transaction, when node i generates a transaction, the transaction not only contains the transaction itself, but also comes with a propagation record Stage (T i ), used to identify the transaction propagation stage. i ) is set to 1, indicating that Stage(T i ) nodes need to proceed to the second phase.

[0073] At this time, node i has 64 outgoing neighbors after recommendation, denoted as {N1,N2,N3,…,N 64}, node i broadcasts the generated transaction to all its outgoing neighbors The broadcast of node i can be expressed by the following formula:

[0074]

[0075] The goal of this stage is to minimize propagation delays and spread messages quickly so that transactions can quickly cover the entire network.

[0076] After the initial full push is completed, the second phase begins, where the node selects only a portion of its neighbors for message propagation. i After that, we need to determine the propagation record of the transaction. If Stage(T i )=1, indicating that it has entered the second stage, and node j decides whether to forward the transaction based on the following judgment.

[0077] When node j selects neighbors for transmission, it avoids sending messages to the same nodes as the outgoing neighbors of node i. Let node k be a candidate sending neighbor, is the outgoing neighbor set of node i. The propagation strategy of node j can be expressed as:

[0078]

[0079] Compare whether node k is in the outgoing neighbor set of node i. If not, send it, otherwise skip it.

[0080] In the third stage, node k will continue to propagate messages, but only select a part of neighbors for push. The strategy is: select a part of neighbors with small delay to push, and a part of neighbors with large delay to push.

[0081] Specifically, four neighbors with smaller RTTs are selected (ie, x=4): neighbors with smaller RTTs are preferentially selected for transmission, to ensure that the message can be quickly transmitted to the local network, thereby improving transmission efficiency.

[0082] In different embodiments, the selection method may be different formulas. In a specific embodiment, the random selection of x fourth nodes with the smallest round-trip time and y fourth nodes with the largest round-trip time is performed by the formula:

[0083]

[0084] in, Sort the neighbor node set in ascending order for the connection of the third node, For the intermediate index, RandomSelect x Indicates randomly selecting x nodes with the shortest round trip time, NRTT-min Represents the set of x nodes with the smallest round trip time;

[0085]

[0086] in, Sort the neighbor node set in ascending order for the connection of the third node, For the intermediate index, RandomSelect y It means randomly selecting y nodes with the largest round-trip time. is the total number of connections to the third node, N RTT-max Represents the set of nodes with the largest y round-trip times.

[0087] For example, you can set the RTT k,l Represents the RTT value between node k and neighbor l. The node will sort the set of its neighbors in ascending order. , take the middle index RandomSelect x Indicates randomly selecting x neighbor nodes, through the formula:

[0088]

[0089] in, Sort the neighbor node set of k nodes in ascending order, RandomSelect4 means randomly selecting 4 nodes with the smallest round-trip time, N RTT-min Represents the set of 4 nodes with the smallest round trip time;

[0090]

[0091] in, Sort the neighbor node set in ascending order for the connection of the kth node, For the intermediate index, RandomSelect y It means randomly selecting y nodes with the largest round-trip time. is the total number of connections of k nodes, N RTT-max Represents the set of nodes with the largest round-trip time y

[0092] In the embodiment of the present invention, four neighbors with the smallest RTT are randomly selected for transmission.

[0093] At the same time, four neighbors with larger RTT (i.e., y=4) are selected for transmission to ensure that the message can cover a wider area and avoid the formation of information islands in the local area. The formula for node selection is:

[0094]

[0095] In one embodiment, the method may also determine the trust scores between the nodes of the blockchain according to a preset inter-node trust optimization model, and update the optimized neighbor relationship between the nodes of the blockchain according to the trust scores.

[0096] Wherein, the nodes of the blockchain are composed of a first node and a second node;

[0097] The trust score of the first node to the second node can be expressed as:

[0098]

[0099] Where i represents the first node, j represents the second node, α RTT , β stability , γ history is the weight, Score the round-trip time latency, Score the network stability, Score historical interaction records, RTT ij is the round trip time between the first node and the second node, α is the stability adjustment factor, P loss is the packet loss rate, exp is the exponential function, H ij is the number of times the second node sends messages to the first node, and max(H) represents the total number of transactions of the first node in one cycle;

[0100] Updating the optimized neighbor relationship between nodes of the blockchain according to the trust score may include:

[0101] Set the trust score threshold θ, if S ij <θ, the second node is removed from the neighbor list.

[0102] For example, a dynamic trust score S can be defined for each neighbor node ij , where i represents the current node and j represents the neighbor node. Taking node i's rating of a neighbor j as an example, the trust scoring model integrates the following factors:

[0103] RTT Latency Rating Neighbors with low latency have higher scores, and the weight factor is inversely proportional to the RTT. ij =500ms, then

[0104] Network Stability Rating Combined with the packet loss rate P of node j within a period (set to 2 hours) loss(Assume the packet loss rate is 0.1) and connection stability. Set the stability adjustment factor α = 0.5 (can be adjusted according to the actual network conditions), defined as follows:

[0105]

[0106] Historical interaction record scoring The more transactions node i receives from node j, the higher its trust score is. Assume that within a period (set to 2 hours), H ij represents the number of transactions j sends to i (assuming 500 times), max(H) represents the total number of transactions i makes in a cycle (assuming 5000 times), and the formula is:

[0107]

[0108] The comprehensive scoring formula is: Assuming α RTT =0.4,β stability =0.3, (The weight can be adjusted according to actual needs), then the comprehensive scoring formula of node i to a neighbor j is:

[0109]

[0110] Then remove low-scoring neighbors: Set the trust score threshold θ = 0.8. If S ij <0.8, then node j is removed from the neighbor list.

[0111] According to yet another embodiment, a device for message propagation in a blockchain based on the Internet of Things is provided. Figure 4 A structural diagram of a message propagation device in a blockchain based on the Internet of Things provided by an embodiment of the present invention, such as Figure 4 As shown, the device 400 includes:

[0112] The determining unit 401 is configured to determine a node included in a target blockchain and an initial neighbor relationship between the nodes, wherein the nodes are IoT devices;

[0113] The optimization unit 402 is configured to determine the optimized neighbor relationship between the nodes based on a preset neighbor recommendation algorithm and an initial neighbor relationship;

[0114] The propagation unit 403 is configured to transmit blockchain messages between the nodes according to the optimized neighbor relationship.

[0115] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A message propagation method in a blockchain based on the Internet of Things, comprising: Determine an initial neighbor relationship between a node included in a target blockchain and the node, wherein the node is an IoT device; Determine the optimized neighbor relationship between the nodes based on a preset neighbor recommendation algorithm and an initial neighbor relationship; Blockchain messages are transmitted between the nodes according to the optimized neighbor relationship.

2. The method according to claim 1, wherein: Determining the optimized neighbor relationship between the nodes based on a preset neighbor recommendation algorithm and the initial neighbor relationship includes: Each node determines the round-trip time of the target node that has an initial neighbor relationship with the node, and recommends candidate neighbor nodes of the target node to the target node based on the round-trip time. The target node merges all the candidate neighbor nodes recommended to the target node into a total candidate neighbor node set; based on the number of outgoing connections of the target node and the number of incoming connections of each node in the total candidate neighbor node set, it is determined whether to convert each node in the total candidate neighbor node set into a neighbor node of the target node.

3. The method according to claim 1, wherein: The blockchain message is a blockchain transaction; According to the optimized neighbor relationship, blockchain messages are transmitted between the nodes, including: The first node in the blockchain propagates the blockchain transaction initiated by the node to N second nodes and attaches a propagation stage identifier. Each second node propagates the blockchain transaction to a third node according to the propagation stage identifier and updates the propagation stage identifier. The third node selects a fourth node through a pre-set screening condition and propagates the blockchain transaction to the fourth node.

4. The method according to claim 1, wherein: The IoT devices include edge devices and cloud devices of the IoT.

5. The method according to claim 2, wherein: The round trip time is calculated by the following formula: Where i represents the first node, j represents the second node, t is the number of measurements, and RTT i,j represents the round trip time, T St Sending time, T Rt The receiving time.

6. The method according to claim 3, wherein: The first node propagates the blockchain transaction to N second nodes with a propagation stage identifier, the second node propagates the blockchain transaction to a third node according to the propagation stage identifier, the third node selects a fourth node according to a preset screening condition and propagates the blockchain transaction to the fourth node, including: The first node generates a blockchain transaction, the blockchain transaction has a propagation stage identifier, the propagation stage identifier is used to identify the blockchain transaction propagation stage, the propagation stage identifier is set to 1 to indicate that the node receiving the propagation stage identifier equal to 1 performs the second stage; the first node propagates the blockchain transaction to N second nodes; The second node accepts the blockchain transaction, determines whether the propagation stage identifier of the blockchain transaction is 1, and forwards the blockchain transaction to the third node if the propagation stage identifier is equal to 1; The third node receives the blockchain transaction, and randomly selects x nodes with the smallest round-trip time and y nodes with the largest round-trip time from neighbor nodes of the third node to forward the blockchain transaction.

7. The method according to claim 6, wherein: Randomly selecting x nodes with the shortest round-trip time and y nodes with the longest round-trip time from the neighboring nodes of the third node can be expressed as: in, Sort the neighbor node set in ascending order for the connection of the third node, For the intermediate index, RandomSelect x Indicates randomly selecting x nodes with the shortest round trip time, N RTT-min Represents the set of x nodes with the minimum round trip time; in, Sort the neighbor node set in ascending order for the connection of the third node, For the intermediate index, RandomSelect y It means randomly selecting y nodes with the largest round-trip time. is the total number of connections to the third node, N RTT-max Represents the set of nodes with the largest y round-trip times.

8. The method according to claim 1, further comprising: The trust scores between the nodes of the blockchain are determined according to a preset inter-node trust optimization model, and the optimized neighbor relationships between the nodes of the blockchain are updated according to the trust scores.

9. The method according to claim 8, wherein: The nodes of the blockchain include a first node and a second node; The trust score of the first node to the second node can be expressed as: Where i represents the first node, j represents the second node, α RTT , β stability , γ history is the weight, Score the round-trip time latency, Score the network stability, Score historical interaction records, RTT ij is the round trip time between the first node and the second node, α is the stability adjustment factor, P loss is the packet loss rate, exp is the exponential function, H ij is the number of times the second node sends messages to the first node, and max(H) represents the total number of transactions of the first node in one cycle; Updating the optimized neighbor relationship between nodes of the blockchain according to the trust score includes: Set the trust score threshold θ, if S ij <θ, then the second node is removed from the neighbor list.

10. A message propagation device in a blockchain based on the Internet of Things, comprising: A determining unit configured to determine an initial neighbor relationship between a node included in a target blockchain and the node, wherein the node is an IoT device; An optimization unit configured to determine an optimized neighbor relationship between the nodes based on a preset neighbor recommendation algorithm and an initial neighbor relationship; A propagation unit is configured to transmit blockchain messages between the nodes according to the optimized neighbor relationship.

Citation Information

Patent Citations

  • Method and device for sending information in block chain

    CN110875938A

  • Medical Internet of Things transaction system based on block chain

    CN111913833A

  • Method and device for optimizing neighbor nodes in block chain network

    CN114143367A

  • Block chain network topology dynamic establishment and data transmission optimization method

    CN115314391A

  • Block transmission method based on neighbor node clustering

    CN117176736A