Internet of Things block chain networking method and device

By combining physical proximity and network topology optimization in the Internet of Things blockchain network, node identification and neighbor nodes are generated, the scalability and security problems of the Internet of Things blockchain network in the existing technology are solved, and more efficient data transmission and propagation path optimization is achieved.

CN120075231APending Publication Date: 2025-05-30COMP NETWORK INFORMATION CENT CHINESE ACADEMY OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510171997.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-17
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The existing blockchain network architecture has problems such as single point of failure, insufficient data security, poor network scalability and low message propagation efficiency in the Internet of Things, especially in the application of DHT structures, the spatial proximity in the physical network is ignored.

Method used

By combining physical proximity and network topology optimization, node identification of IoT devices is generated, and neighbor nodes are determined based on geographical location and logical distance, historical propagation data are collected, reception capabilities are predicted, and propagation paths are optimized.

Benefits of technology

It improves the efficiency and accuracy of Internet of Things device access and data transmission, reduces communication overhead, and builds an efficient and stable blockchain network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075231A_ABST
    Figure CN120075231A_ABST
Patent Text Reader

Abstract

The Internet of Things block chain networking method comprises the steps that geographic positions of a plurality of Internet of Things devices are determined, the geographic positions are coded, node identifiers of the Internet of Things devices are generated based on the codes of the geographic positions, and each node identifier corresponds to one Internet of Things device; determining neighbor nodes of each node, and storing the neighbor nodes in a neighbor node list; historical propagation data of each node is collected, the receiving capability of each node is predicted, and the propagation path is updated. According to the method, physical proximity and network topology optimization can be combined to realize more efficient Internet of Things equipment access and data transmission, the propagation efficiency and accuracy are improved, the communication overhead is effectively reduced, and powerful support is provided for constructing an efficient and stable block chain network in an Internet of Things scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of the Internet of Things and blockchain, and particularly to a method and device for networking an Internet of Things blockchain. Background Art

[0002] With the rapid development of the Internet of Things (IoT) technology, more and more devices are connected to the Internet, forming a huge device network. These devices include sensors, smart home devices, industrial devices, etc. They exchange data and communicate through the Internet to achieve intelligent management and control. However, with the increase in the number of devices, the traditional centralized network architecture faces many challenges, such as single-point failure, insufficient data security, poor network scalability, etc. To solve these problems, blockchain technology has gradually been introduced into the Internet of Things.

[0003] Blockchain is a decentralized distributed ledger technology with characteristics such as data immutability, decentralization, and transparency. Through blockchain technology, IoT devices can perform secure data exchange and communication without a centralized server. The decentralized feature of blockchain can effectively avoid single-point failure and improve the reliability and security of the system. At the same time, the smart contract function of blockchain can also achieve automated device management and control, further enhancing the intelligent level of the IoT system.

[0004] However, although blockchain technology has shown great potential in the Internet of Things, the existing blockchain network architecture still has some deficiencies. Especially in the application of the Distributed Hash Table (DHT) structure, traditional DHT mainly constructs the network topology based on the logical proximity (based on the XOR distance) between hash values, while ignoring the spatial proximity in the physical network. This approach results in the inability to make full use of the geographical location information of IoT devices when constructing the network topology, thus affecting the communication efficiency and robustness of the system. In addition, when traditional DHT structures perform gossip broadcast messages, there is a problem of message redundancy, which not only increases the network load but also reduces the message propagation efficiency. Summary of the Invention

[0005] In order to solve the problems existing in the prior art, the embodiments of the present application provide a method, device, computing device, computer storage medium, and product including a computer program for task scheduling, which can combine physical proximity and network topology optimization to achieve more efficient access and data transmission of IoT devices, improve the propagation efficiency and accuracy, and effectively reduce the communication overhead, providing strong support for building an efficient and stable blockchain network in the IoT scenario.

[0006] In a first aspect, an embodiment of the present application provides an Internet of Things blockchain networking method, including: determining the geographical locations of multiple Internet of Things devices, encoding the geographical locations, and generating node identifiers for each Internet of Things device based on the encoded geographical locations, where each node identifier corresponds to an Internet of Things device; determining the neighbor nodes of each node and storing the neighbor nodes in a neighbor node list; collecting the historical propagation data of each node, predicting the receiving ability of each node, and updating the propagation path.

[0007] In some possible implementation manners, generating the node identifiers for each Internet of Things device specifically includes: concatenating the geographical identifier with the device unique identifier, timestamp, and random number, and generating the node identifier for each Internet of Things device through the Keccak-256 hash function.

[0008] In some possible implementation manners, after determining the neighbor nodes of each node, the method further includes: each node periodically updates the neighbor nodes; the updating of the neighbor nodes specifically includes: checking the reachability and response speed of the neighbor nodes, and deleting the neighbor nodes from the neighbor node list when the status of the neighbor nodes is unstable.

[0009] In some possible implementation manners, determining the neighbor nodes of each node includes: randomly generating a target node identifier and a target geographical identifier; calculating the exclusive-or distance between the current node and the target node in the logical space and the exclusive-or distance in the geographical space; traversing the K-bucket nodes, screening the candidate nodes that meet the logical distance condition and the geographical distance condition; sending a FindNODE request to the candidate nodes, obtaining neighbor information, and updating the local neighbor list.

[0010] In some possible implementation manners, the calculation formula for the exclusive-or distance in the logical space is:

[0011]

[0012] In the formula, represents the exclusive-or operation, NodeHash represents the node hash value, and TargetId represents the target node identifier.

[0013] In some possible implementation manners, the calculation formula for the exclusive-or distance in the geographical space is:

[0014]

[0015] In the formula, represents the exclusive-or operation, GeoHash represents the Geohash encoding of the Internet of Things device, and TargetGeo represents the target geographical identifier.

[0016] In some possible embodiments, predicting the reception capability of each node includes: predicting the probability of each node receiving a message through a prediction model based on historical propagation data.

[0017] In some possible embodiments, the prediction model is a reinforcement learning model based on Q-learning, and the propagation path is optimized through a state-action reward mechanism.

[0018] In some possible embodiments, the prediction model is a classification model based on a multi-layer perceptron, predicting the probability of a node receiving a message.

[0019] In a second aspect, an Internet of Things blockchain networking device provided by an embodiment of the present application includes: an acquisition module, configured to determine the geographical locations of multiple Internet of Things devices, encode the geographical locations, and generate node identifiers for each Internet of Things device based on the encoded geographical locations, where each node identifier corresponds to an Internet of Things device; a processing module, configured to determine the neighbor nodes of each node and store the neighbor nodes in a neighbor node list; the processing module is further configured to collect the historical propagation data of each node, predict the reception capability of each node, and optimize the propagation path.

[0020] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, including computer-readable instructions, which when read and executed by a computer, cause the computer to execute the method according to any one of the first aspect.

[0021] In a fourth aspect, an embodiment of the present application provides a computing device, including a processor and a memory, where computer program instructions are stored in the memory, and when the computer program instructions are run by the processor, the method according to any one of the first aspect is executed.

[0022] In a fifth aspect, an embodiment of the present application provides a product containing a computer program, which when the computer program product runs on a processor, causes the processor to execute the method according to any one of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.

[0024] Figure 1 It is a schematic flowchart of an Internet of Things blockchain networking method provided by an embodiment of the present application;

[0025] Figure 2It is a schematic diagram of an Internet of Things blockchain networking device provided by an embodiment of the present application;

[0026] Figure 3 It is a schematic structural diagram of a computing device provided by an embodiment of the present application. Detailed implementation manners

[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0028] The term "and / or" in this document describes the association relationship of associated objects and indicates that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The symbol " / " in this document indicates that the associated objects are in an "or" relationship. For example, A / B represents A or B.

[0029] The terms "first" and "second" in the description and claims of this document are used to distinguish different objects rather than to describe a specific order of the objects. For example, the first response message and the second response message are used to distinguish different response messages rather than to describe the specific order of the response messages.

[0030] In the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, using words such as "exemplary" or "for example" aims to present relevant concepts in a specific manner.

[0031] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality of" refers to two or more. For example, a plurality of processing units refers to two or more processing units, and a plurality of elements refers to two or more elements.

[0032] To facilitate the understanding of the embodiments of the present application, the following will further explain with specific embodiments in conjunction with the accompanying drawings. The embodiments do not limit the embodiments of the present invention.

[0033] First, the technical terms involved in the present application will be introduced:

[0034] 1. A K-bucket is a data structure used to store information about other nodes that are close to a certain node ID. Each node maintains one or more K-buckets, and each K-bucket contains node information within a certain range. The main function of the K-bucket is to help the node find other nodes close to its ID, so as to efficiently perform data search and transmission.

[0035] Next, for the convenience of understanding the embodiments of the present application, further explanatory descriptions will be given with specific embodiments in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present invention.

[0036] Exemplarily, Figure 1 shows a schematic flowchart of an Internet of Things blockchain networking method provided by an embodiment of the present application. As Figure 1 shown, the method may include the following steps:

[0037] S11: Determine the geographical locations of multiple Internet of Things devices, encode the geographical locations, and generate node identifiers for each Internet of Things device based on the encoded geographical locations. Each node identifier corresponds to an Internet of Things device.

[0038] In this embodiment, Geohash is used to encode the geographical location of each Internet of Things device. Geohash maps geographical coordinates (latitude and longitude) to a short string, so that devices within the same area have similar encodings. The precision of Geohash can be adjusted by selecting different character lengths. For most Internet of Things applications, a 4-bit precision Geohash is sufficient to distinguish physical locations, while taking into account a part of privacy and providing good spatial coverage. Assuming that the geographical location of an Internet of Things device is (lat, lon), the Geohash encoding process can be expressed as: Geohash(lat, lon, n) → geohash. Where n represents the precision of the Geohash encoding, and geohash represents the geographical location string obtained by the Geohash encoding. The node hash value Nodehash of each node is: Nodehash = Keccak256(geohash + Deviceid + Timestamp + Randnum). In the formula, Keccak256 represents the hash function, geohash represents the Geohash encoding, Deviceid represents the ID of the Internet of Things device, Timestamp represents the timestamp, and Randnum represents the random number. This hash value is used as the node identifier of the node.

[0039] For example, in this embodiment, it is assumed that the test node information (node longitude and latitude) is sourced from a real Ethereum environment, and each node generates a 4-digit Geohash code based on its longitude and latitude as a geographical identifier. Suppose the geographical location of device A is (39.9, 116.4), and the Geohash encoding process can be expressed as: Geohash(39.9, 116.4, 4) → geohash = (wx4g). Then the Geohash code geohash of device A is wx4g. The Nodehash of device A is: Nodehash = keccak256(geohash + Deviceid + timestamp + randnum).

[0040] S12: Determine the neighbor nodes of each node.

[0041] In this embodiment, in the DHT structure of a traditional blockchain, node selection is usually based on the XOR distance between hash values. However, in the Internet of Things (IoT) environment, to achieve efficient device networking, it is necessary to fully consider geographical proximity and logical proximity during node selection and maintenance to ensure the stability of the network topology and the efficiency of data transmission. When selecting neighbors, nodes consider both logical proximity in the hash space and physical proximity in the geographical space. Combining the two can optimize the network topology and improve data transmission efficiency. Therefore, in this embodiment, after obtaining the node identifier of the IoT device, the neighbor nodes of each IoT device are determined based on the node identifier and the geographical location of the IoT device.

[0042] Specifically, the system first randomly generates a target node identifier TargetId and a target geographical identifier TargetGeo. The target node identifier is related to the hash value of the node, and the target geographical identifier is related to the Geohash code. The IoT device randomly generates a target node identifier according to the spatial distribution of the hash values of the nodes, and this identifier has a certain association with the hash value (Nodehash) of the current node. For example, a random offset can be added to the hash value of the current node to generate a random target identifier in the same hash value space. By randomly generating the target node identifier, the device can actively explore the network to find other nodes that are logically close to the current node, thereby expanding the scope of the social network and optimizing the network topology structure. Similarly, the target geographical identifier is related to the Geohash code. Then, the distances between the target node and the current node in the logical space and the geographical space are calculated based on the XOR distance respectively. Specifically, the distance between the target node and the current node in the logical space is calculated according to the following formula:

[0043]

[0044] In the formula, Characterize the exclusive OR operation.

[0045] Calculate the distance between the target node and the current node in the geospatial space according to the following formula:

[0046]

[0047] Traverse each node identifier KadId and geographical identifier KadGeo in the K-bucket, and calculate the logical distance Δkt between this node and the target node TargetId and the geographical distance ΔkGt between the target geographical identifier TargetGeo. Specifically, the logical distance between this node and the target node is calculated according to the following formula:

[0048]

[0049] The geographical distance between this node and the target node is calculated according to the following formula:

[0050]

[0051] Respectively select the K-bucket nodes that satisfy Δkt < Δlt and ΔkGt < ΔGt, that is, the nodes with a relatively closer logical position to the target node and the nodes with a relatively closer geographical position to the target node. For these qualified nodes, the current node sends a FindNODE request to query the neighbor node information. After receiving the FindNODE request, the K-bucket nodes repeat the above steps to further query the neighbor nodes of the K-bucket nodes. The query neighbor node information is returned through the Neighbours command. After the current node receives the newly discovered neighbor nodes, it updates the local neighbor list.

[0052] In some possible embodiments, each node periodically updates and optimizes its neighbor nodes.

[0053] With the change of the network and the movement of nodes, the neighbor list of nodes needs to be updated regularly. Nodes will check the reachability and response speed of neighbor nodes through methods such as ICMP ping and UDP probe packets. If the status of a certain neighbor node is unstable (such as too high latency, large packet loss rate, etc.), the node can optimize the network connection by reselecting neighbors to improve the robustness and flexibility of the system. For example, assume that node A detects the latency T A exceeds the preset threshold T MAX , then node B can be removed from the neighbor list to achieve dynamic adjustment.

[0054] In some possible embodiments, the latency is calculated according to the following formula:

[0055]

[0056] wherein, n represents the number of measurements, represents the time delay of the k-th measurement, i represents the i-th node, and j represents the j-th node.

[0057] In some possible embodiments, the dynamic adjustment is performed according to the following formula:

[0058] NeighborList′ = {Node i |T i,j <T max and P i,j <P max}

[0059] wherein, T max represents the maximum dynamic time delay, P max represents the maximum allowable packet loss rate, and NeighborList′ represents the updated neighbor list.

[0060] S13: Collect the historical propagation data of each node, predict the reception ability of each node, and optimize and update the propagation path.

[0061] In this embodiment, the robustness of the system and the efficiency of data transmission can also be improved by means of intelligent propagation optimization. Intelligent propagation can dynamically adjust the message propagation strategy by combining historical propagation data, node characteristics (such as time delay and geographical location information), and prediction models to ensure that information is propagated more efficiently in the network.

[0062] Specifically, by learning the historical propagation behavior of nodes, predicting which neighbor nodes can receive messages earlier, and thus optimizing the message propagation path, it is necessary to first collect the historical propagation data of each node, which can reveal key information such as the message propagation path, node status, and propagation efficiency. Each node records the propagation situation of each transaction in its local storage. The structure of the historical data includes: transaction ID, source node, neighbor node, message status, and node characteristics. Among them, the transaction ID is the unique identifier of each transaction, the source node is the node from which the current message comes, the neighbor node is the neighbor node that receives the message, the message status is whether the node has received the message, and the node characteristics include latency, geographical location information (Geohash), etc.

[0063] To further improve the propagation efficiency, the role of the prediction model is to identify which nodes may receive transaction messages in advance and optimize the propagation path accordingly. By combining historical propagation data with node characteristics (time delay, Geohash location information), this embodiment uses two classic prediction models to judge the reception ability of nodes and optimize the propagation path. The prediction models include the Q-learning model and the multi-layer perceptron (MLP) model.

[0064] Among them, Q-learning is a value-based reinforcement learning method applicable to environments with discrete state spaces and action spaces. In the message propagation optimization of this embodiment, nodes learn how to select the best neighbor nodes to transmit messages through Q-learning. Q-learning iteratively updates the Q-table (the value of each state-action pair), enabling nodes to gradually learn which neighbor nodes can provide the fastest message propagation under what circumstances. The core elements of Q-learning include state, action, reward, and Q-value update. Among them, the state represents the environmental information of nodes in the blockchain network. The state of each node can include the type of message it is currently propagating, latency, the state of neighbor nodes, etc. The action of a node is to select which neighbor node to propagate the message to. The reward is defined based on metrics such as whether the message is successfully propagated, propagation speed, latency, etc. For example, when a node successfully delivers a message to a neighbor, a positive reward is given; otherwise, a negative reward is given. Q-value update means that through Q-learning, nodes adjust the propagation strategy according to environmental feedback (reward) and gradually optimize the decision of selecting neighbor nodes.

[0065] In some possible embodiments, the formula for Q-value update is as follows:

[0066]

[0067] Among them, Q(s t ,a t ) represents the current estimated value of taking action a t under state s t . α represents the learning rate, indicating the influence degree of new information on Q-value update. r t+1 represents the reward obtained after taking action a t under state s t . γ represents the discount factor, indicating the value of future rewards. represents the maximum Q-value among all possible actions in the next state s t+1 . State s t includes the type of message currently being propagated (transaction or block), information of the source node (nodehash, latency, geohash), and information of neighbor nodes (nodehash, latency, geohash). Action a t is for the node to select a neighbor node to propagate the message. Reward r t+1 is decreased by one in the case of message redundancy and increased by one in the case of non-redundant messages.

[0068] At each step, the node selects an action according to the ε-greedy policy, that is, selects the action with the maximum Q-value with probability 1 - ε, or randomly selects an action with probability ε.

[0069] A multi-layer perceptron (MLP) is a common feedforward neural network, especially suitable for dealing with complex non-linear relationships. In intelligent propagation optimization, the MLP can predict whether a certain node has received the message by learning features such as the historical propagation data, time delay, and geographical location information of the nodes. Compared with traditional classification models (decision trees or support vector machines), the MLP can capture more complex feature relationships, thus improving the prediction accuracy. The MLP usually includes an input layer, hidden layers, and an output layer. The input layer receives the feature inputs of the nodes, and the features include latency, geographical location (Geohash encoding), and the historical propagation behavior of the nodes. There are one or more hidden layers, each layer contains multiple neurons, and a non-linear activation function (ReLU) is used to process the complex relationships of the input data. The output layer is used to output the prediction result, indicating the probability that the target node can receive the transaction message in advance. By learning the historical propagation data and node features, a classification model is trained to predict the receiving ability of the nodes. Through this model, the nodes can dynamically adjust their propagation paths according to the prediction results, and preferentially select those neighbor nodes that have not received the transaction, thereby improving the efficiency of data propagation.

[0070] Exemplarily, assume there is an input vector X = {x 1 , x 2 , …, x n} composed of n node features. The task of the neural network is to adjust the network weights through training to predict whether the target node can receive the message in advance. Then in each layer, the input vector undergoes a linear transformation through the weight matrix, and a bias term is added, and then a non-linear transformation is performed through the activation function (ReLU) and passed to the next layer.

[0071] The representation from the input layer to the first hidden layer is:

[0072] z (1) = W (1) X + b (1)

[0073] a (1) = ReLU(z (1) )

[0074] In the formula, W (1) represents the weight matrix of the first layer, b (1) represents the bias term, and a (1) represents the activation output of the first layer, using the ReLU activation function.

[0075] The representation from the hidden layer to the output layer is

[0076] z (2) = W (2) a (1) + b(2)

[0077]

[0078] Wherein, W (2) represents the weight matrix of the output layer, b (2) represents the bias term, σ(·) is the Sigmoid activation function, and the output prediction value represents the probability that the target node can receive the transaction message in advance.

[0079] The goal of the MLP network is to adjust the weights and biases by minimizing the loss function, so that the prediction result is closer to the true label y. The loss function uses cross-entropy loss, expressed as

[0080]

[0081] Wherein, y represents the actual label (1 or 0, indicating whether the node can receive the message in advance), represents the predicted output of the model.

[0082] Next, through the backpropagation algorithm, calculate the gradients of the loss function with respect to each parameter (weights and biases), and use the gradient descent method to update the weights, expressed as

[0083]

[0084] Wherein, η represents the learning rate, represents the gradient of the loss function with respect to the weight W (k) of.

[0085] In this embodiment, the MLP is trained to determine which nodes are more likely to receive the transaction message in advance. The features of the nodes include their latency, geographical location (Geohash), historical propagation data, etc. Through these features, the MLP can learn the most effective propagation path in the network. Specifically, the model prediction output is:

[0086] P T (S)=σ(W (2) ·ReLU(W (1) ·X + b (1) ) + b (2) )

[0087] Always, P T (S) represents the probability that the target node T receives the transaction message in advance.

[0088] Through the prediction model, nodes can dynamically select the propagation path according to the prediction results, and preferentially select those neighbor nodes that are predicted to be more likely to receive messages, thereby optimizing the message propagation efficiency.

[0089] The above is the introduction of the Internet of Things blockchain networking method provided by the embodiments of this application. Each device encodes its geographical location into a short string through Geohash, and then combines the device ID, timestamp, and random number to generate a unique node identifier through a hash function. Then, the nodes select neighbors based on logical proximity and geographical proximity to construct the network topology. Combining the two proximities, the nodes respectively construct a neighbor list that is close in the hash space and a neighbor list that is close in the geographical space. Ensure that the topology of the network is both logically efficient and can fully consider the geographical location in the physical network. In this process, the nodes will regularly update the neighbor list, removing unreachable or slow-responsive neighbors to ensure the stability and flexibility of the network. On this basis, intelligent propagation optimization records historical propagation data and uses Q-learning and multi-layer perceptron (MLP) to predict which neighbor nodes can receive messages earlier. Q-learning dynamically adjusts the propagation strategy according to the state, action, and reward in the propagation process, while MLP determines whether a node can receive messages in advance by learning node features and historical propagation data. By combining GeoHash encoding and intelligent propagation optimization technology, the embodiments of this application significantly improve the efficiency and reliability of message propagation in the Internet of Things blockchain network. GeoHash encoding can accurately map the geographical location of nodes into short codes, facilitating the rapid calculation of the spatial distance between nodes. This spatial awareness ability enables the priority selection of nodes with close geographical locations during the message propagation process, effectively shortening the propagation path and thus reducing the message transmission delay. By combining intelligent propagation optimization algorithms (MLP and reinforcement learning), nodes can dynamically adjust the propagation strategy and intelligently select the propagation neighbor nodes. This intelligent propagation decision reduces redundant transmissions and reduces the communication overhead of the network, especially suitable for scenarios where Internet of Things devices have limited computing and storage resources. Compared with traditional rule-based propagation strategies, this solution uses machine learning models to dynamically adapt to changes in the network environment. Even in the case of frequent node changes or unstable network topologies, the system can still maintain efficient propagation, improving the overall robustness and scalability of the system. It can be understood that the magnitudes of the sequence numbers of the steps in the above various embodiments do not mean the order of execution, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of this application. In addition, in some possible implementation manners, the steps in the above embodiments can be selectively executed according to the actual situation, can be partially executed, or can be fully executed, which is not limited here. Any feature of any embodiment of this application can be freely and arbitrarily combined in whole or in part on the premise of not being contradictory. The combined technical solutions are also within the scope of this application.

[0090] Based on the method in the above embodiments, the embodiments of the present application further provide an Internet of Things blockchain networking device. Exemplarily, Figure 2 shows an Internet of Things blockchain networking device deployed in a computing device. The data transmission device 200 includes: an acquisition module 201 and a processing module 202.

[0091] Among them, the acquisition module 201 is used to determine the geographical locations of multiple Internet of Things devices, encode the geographical locations, and generate node identifiers for each Internet of Things device based on the encoded geographical locations. Each node identifier corresponds to an Internet of Things device.

[0092] The processing module 202 is used to determine the neighbor nodes of each node and store the neighbor nodes in a neighbor node list;

[0093] The processing module 202 is further used to collect the historical propagation data of each node, predict the reception capabilities of each node, and optimize the propagation paths.

[0094] It should be understood that the above device is used to execute the method in the above embodiments. For the corresponding program modules in the device, their implementation principles and technical effects are similar to those described in the above method. The working process of the device can refer to the corresponding process in the above method, which will not be elaborated here.

[0095] The present application further provides a computing device 300. As Figure 3 shown, the computing device 300 includes: a bus 302, a processor 304, a memory 306, and a communication interface 308. The processor 304, the memory 306, and the communication interface 308 communicate with each other through the bus 302. The computing device 300 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 300.

[0096] The bus 302 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 3 only one line is shown in the figure, but it does not mean that there is only one bus or one type of bus. The bus 304 can include a path for transmitting information between various components (such as the memory 306, the processor 304, and the communication interface 308) of the computing device 300.

[0097] The processor 304 may include any one or more of processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0098] The memory 306 may include volatile memory, such as random access memory (RAM). The processor 304 may also include non-volatile memory, such as read-only memory (ROM), flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0099] The memory 306 stores executable program code, and the processor 304 executes the executable program code to respectively implement the functions of the aforementioned acquisition module 201 and processing module 203, thereby implementing all or part of the steps of the method in the above embodiments. That is, the memory 306 stores instructions for executing all or part of the steps of the method in the above embodiments.

[0100] Alternatively, the memory 306 stores executable code, and the processor 304 executes the executable code to respectively implement the functions of the aforementioned Internet of Things blockchain networking device 200, thereby implementing all or part of the steps of the method in the above embodiments. That is, the memory 306 stores instructions for executing all or part of the steps of the method in the above embodiments.

[0101] The communication interface 308 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 300 and other devices or communication networks.

[0102] Based on the method in the above embodiments, an embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program runs on a processor, the processor is caused to execute the methods in the above embodiments.

[0103] Based on the method in the above embodiments, an embodiment of the present application provides a computer program product. When the computer program product runs on a processor, the processor is caused to execute the methods in the above embodiments.

[0104] It can be understood that the processor in the embodiments of the present application may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.

[0105] The method steps in the embodiments of the present application may be implemented in a hardware manner or by a processor executing software instructions. The software instructions may be composed of corresponding software modules, and the software modules may be stored in a random access memory (RAM), flash memory, read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), registers, hard disks, removable hard disks, CD-ROMs, or any other form of storage medium well-known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium may also be a component of the processor. The processor and the storage medium may be located in the ASIC.

[0106] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more integrated available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)), etc.

[0107] It can be understood that the various digital numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application.

Claims

1. A method for networking blockchains of the Internet of Things, characterized in that: The method comprises: Determine the geographic locations of multiple IoT devices, encode the geographic locations, and generate node identifiers of each IoT device based on the encoding of the geographic locations, where each node identifier corresponds to an IoT device; Determine neighbor nodes of each node and store the neighbor nodes in a neighbor node list; Collect the historical propagation data of each node, predict the receiving capacity of each node, and update the propagation path.

2. The method according to claim 1, characterized in that The node identification of each IoT device is generated as follows: The geographic identifier is concatenated with the device unique identifier, timestamp and random number, and the node identifier of each IoT device is generated through the Keccak-256 hash function.

3. The method according to claim 1, characterized in that: After determining the neighbor nodes of each node, the method further includes: each node periodically updating the neighbor nodes; The updating of neighbor nodes is specifically as follows: Check the reachability and response speed of the neighbor node, and if the state of the neighbor node is unstable, delete the neighbor node from the neighbor node list.

4. The method according to claim 1, characterized in that: The step of determining the neighbor nodes of each node includes: Randomly generate target node identifier and target geographic identifier; Calculate the XOR distance between the current node and the target node in the logical space and the XOR distance in the geographic space; Traverse the K-bucket nodes and select candidate nodes that meet the logical distance conditions and geographical distance conditions; Send a FindNODE request to the candidate node to obtain neighbor information and update the local neighbor list.

5. The method according to claim 4, characterized in that The calculation formula of the XOR distance of the logic space is: In the formula, Represents the XOR operation, NodeHash represents the node hash value, and TargetId represents the target node identifier.

6. The method according to claim 4, characterized in that The calculation formula of the XOR distance of the geographic space is: In the formula, Represents the XOR operation, GeoHash represents the Geohash code of the IoT device, and TargetGeo represents the target geographic identification.

7. The method according to claim 1, characterized in that The predicting of the receiving capability of each node includes: Based on historical propagation data, the probability of each node receiving a message is predicted by a prediction model.

8. The method according to claim 7, characterized in that The prediction model is a reinforcement learning model based on Q-learning, which optimizes the propagation path through the state-action reward mechanism.

9. The method according to claim 7, characterized in that: The prediction model is a classification model based on a multi-layer perceptron, which predicts the probability of a node receiving a message.

10. An IoT blockchain networking device, characterized in that: The device comprises: An acquisition module is used to determine the geographic locations of multiple IoT devices, encode the geographic locations, and generate node identifiers of each IoT device based on the encoding of the geographic locations, where each node identifier corresponds to an IoT device; A processing module, used for determining neighbor nodes of each node and storing the neighbor nodes in a neighbor node list; The processing module is also used to collect historical propagation data of each node, predict the receiving capacity of each node, and update the propagation path.