Data transmission method, system, electronic device and storage medium

By constructing a hierarchical connectivity tree and real-time routing tree of IoT nodes and dynamically adjusting routing paths, the problems of energy exhaustion and low flexibility of IoT nodes are solved, and efficient IoT data transmission and network adaptability are achieved.

CN116633967BActive Publication Date: 2025-09-23BEIJING NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310489722.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-04
Publication Date
2025-09-23
Estimated Expiration
2043-05-04

AI Technical Summary

Technical Problem

The use of fixed transmission paths between IoT nodes leads to premature energy depletion and low flexibility and adaptability, which affects the success rate of IoT network deployment tasks.

Method used

By obtaining the IoT subnet topology, building a hierarchical connectivity tree and a real-time routing tree, updating the routing path in real time, using the information of gateway nodes and IoT nodes for dynamic routing adjustment, and using the neighbor information compression reporting mechanism and forwarding labels for data transmission.

Benefits of technology

It improves the flexibility and adaptability of IoT data transmission, avoids premature exhaustion of node energy, and improves the success rate and automation level of IoT deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116633967B_ABST
    Figure CN116633967B_ABST
Patent Text Reader

Abstract

The present invention provides a data transmission method, system, electronic device, and storage medium. The method includes: obtaining an Internet of Things (IoT) subnet topology; constructing a hierarchical connectivity tree based on the number of hops required for each IoT node in the IoT subnet topology to reach a gateway node, wherein the initial level of the hierarchical connectivity tree is the gateway node, and multiple lower levels of the hierarchical connectivity tree are respectively distributed with one or more IoT nodes; the IoT node is used to transmit its node information to the gateway node, and the gateway node is used to construct a real-time routing tree based on the node information and a preset data transmission strategy, wherein the real-time routing tree is updated in real time according to a preset period; and completing IoT data transmission based on the real-time routing tree. This method realizes the real-time definition and update of IoT routing, avoids the premature exhaustion of energy of some IoT nodes due to the use of a fixed transmission path, and avoids the failure of task deployment. The method has high flexibility and strong adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data transmission and communication technology, and in particular to a data transmission method, system, electronic equipment and storage medium. Background Art

[0002] As an extension and expansion of the Internet, the Internet of Things (IoT) is widely being implemented in areas such as environmental monitoring, smart homes, and industrial automation. IoT nodes typically have low processing power and limited storage capacity, making them unsuitable for complex routing calculations and unable to store numerous routing table entries. Furthermore, IoT nodes must function as end devices, performing tasks such as environmental monitoring, while also providing data forwarding services to other nodes. This makes energy consumption a critical issue.

[0003] Currently, data transmission between IoT nodes typically uses fixed transmission paths. However, fixed transmission paths can easily lead to premature energy depletion in some IoT nodes, causing the entire IoT deployment to fail. Furthermore, IoT network environments frequently change, and optimal transmission paths constantly shift. Fixed transmission paths cannot effectively provide optimal routing services, resulting in low flexibility and adaptability. Summary of the Invention

[0004] The present invention provides a data transmission method, system, electronic device and storage medium to solve the problems in the prior art of using a fixed transmission path for data transmission between IoT nodes, which easily leads to premature energy exhaustion of some IoT nodes, causing the deployment task of the entire IoT to fail, as well as low flexibility and poor adaptability.

[0005] The present invention provides a data transmission method, comprising:

[0006] Get the IoT subnet topology;

[0007] A hierarchical connectivity tree is constructed based on the number of hops required for each IoT node to reach the gateway node in the IoT subnet topology, wherein the initial level of the hierarchical connectivity tree is the gateway node, and multiple lower levels of the hierarchical connectivity tree are respectively distributed with one or more IoT nodes; the IoT node is used to transmit its node information to the gateway node, and the gateway node is used to construct a real-time routing tree based on the node information and a preset data transmission strategy, and the real-time routing tree is updated in real time according to a preset period;

[0008] Based on the real-time routing tree, IoT data transmission is completed.

[0009] Optionally, the steps for obtaining the IoT subnet topology include:

[0010] Controlling the gateway node in the IoT subnet to receive the respective adjacency information sent by each IoT node;

[0011] Based on the adjacency information, the IoT subnet topology is determined.

[0012] Optionally, the step of constructing a hierarchical connectivity tree according to the number of hops required for each IoT node to reach a gateway node in the IoT subnet topology includes:

[0013] Determine the level of each IoT node according to the number of hops required for each IoT node to reach the gateway node in the IoT subnet topology, wherein the level increases step by step as the number of hops required increases;

[0014] Control each IoT node to send a notification message to any IoT node through a single hop to determine one or more directly connected neighbor nodes of each IoT node, wherein the notification message includes: the node's own level;

[0015] Determine the directly connected neighbor node with the smallest level among the directly connected neighbor nodes of the IoT node, and use it as the hierarchical parent node of the current IoT node to complete the construction of the hierarchical connectivity tree.

[0016] Optionally, the step of transmitting the node information to the gateway node includes:

[0017] Control each IoT node to transmit its node information to its respective hierarchical parent node, and then upward to the gateway node layer by layer; the node information includes: the IP address of the IoT node, the node's own hierarchy, the node's network status information and the node's neighbor list information, and the node's network status information includes at least one of the following: the node's remaining energy and the node's link bandwidth information; the node's neighbor list information includes: the IP address of each neighbor node of the current IoT node, the neighbor node hierarchy, and the transmission cost from the neighbor node to the current IoT node; the node's neighbor list information is uploaded to the gateway node based on a preset neighbor information compression reporting mechanism.

[0018] Optionally, the neighbor information compression reporting mechanism includes: if the levels of two IoT nodes having a neighbor relationship are different, determining a reporting strategy such that the IoT node with a smaller level reports the corresponding neighbor relationship to the gateway node;

[0019] If the levels of the two IoT nodes having a neighbor relationship are the same, then based on the preset upload rule, a reporting strategy is determined such that the IoT node with the smaller or larger IP address reports the corresponding neighbor relationship to the gateway node;

[0020] Based on the reporting strategy, the content of the node neighbor list information is determined, and the uploading of the node neighbor list information is completed.

[0021] Optionally, the IoT node stores a neighbor sequence number of each neighbor node, where the neighbor sequence number is used to determine the IoT node for next-hop forwarding in downlink transmission; the neighbor sequence number is determined based on the level of the neighbor node and the IP address of the neighbor node, wherein the determining step includes:

[0022] Based on the levels of the neighbor nodes and the IP addresses of the neighbor nodes, the neighbor nodes of the current IoT node are sorted; the sorted neighbor nodes are binary-coded to determine the neighbor sequence numbers.

[0023] Optionally, the step of constructing a real-time routing tree based on the node information and a preset data transmission strategy includes:

[0024] Determining a real-time route for constructing a real-time routing tree based on the node information and a preset data transmission strategy;

[0025] Controlling the gateway node to transmit a message to the next IoT node in the real-time route, wherein the IP header of the message includes the IP address of the destination IoT node, and the message carries a forwarding label, wherein the forwarding label includes a plurality of neighbor sequence numbers for specifying the next hop for the intermediate forwarding node, wherein the plurality of neighbor sequence numbers are arranged in sequence according to a forwarding order, and the number of bits of each neighbor sequence number is determined by the number of neighbor nodes of each intermediate forwarding node; the intermediate forwarding node is a node located before the second-to-last IoT node in the real-time route;

[0026] Control the intermediate forwarding node to match the neighbor sequence number of the forwarding label to determine the next-hop IoT node. After the matching is completed, remove the matched neighbor sequence number from the forwarding label, generate a new forwarding label, and then forward the message and the new forwarding label to the next-hop IoT node.

[0027] When the message is transmitted to the penultimate IoT node in the real-time route, the penultimate IoT node is controlled to determine the destination IoT node based on the IP address of the destination IoT node and complete message forwarding; during the message forwarding process, each IoT node identifies the previous hop IoT node that sent the message as its routing parent node, completing the real-time routing tree construction.

[0028] The present invention also provides a data transmission system, comprising:

[0029] Subnet topology module, used to obtain the IoT subnet topology;

[0030] A routing construction module is configured to construct a hierarchical connectivity tree based on the number of hops required for each IoT node to reach the gateway node in the IoT subnet topology, wherein the initial level of the hierarchical connectivity tree is the gateway node, and each of the multiple lower levels of the hierarchical connectivity tree is distributed with one or more IoT nodes; the IoT node is configured to transmit its node information to the gateway node, and the gateway node is configured to construct a real-time routing tree based on the node information and a preset data transmission strategy, and the real-time routing tree is updated in real time according to a preset period;

[0031] The data transmission module is used to complete the Internet of Things data transmission based on the real-time routing tree.

[0032] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-described data transmission methods is implemented.

[0033] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which implements any of the above-mentioned data transmission methods when executed by a processor.

[0034] Beneficial effects of the present invention: The present invention provides a data transmission method, system, electronic device, and storage medium, which obtains the IoT subnet topology structure; constructs a hierarchical connectivity tree based on the number of hops required for each IoT node in the IoT subnet topology structure to reach the gateway node, wherein the initial level of the hierarchical connectivity tree is the gateway node, and the multiple lower levels of the hierarchical connectivity tree are respectively distributed with one or more IoT nodes; the IoT node is used to transmit its node information to the gateway node, and the gateway node is used to construct a real-time routing tree based on the node information and a preset data transmission strategy, and the real-time routing tree is updated in real time according to a preset period; based on the real-time routing tree, IoT data transmission is completed. The real-time definition and update of IoT routing is realized, avoiding the premature exhaustion of energy of some IoT nodes due to the use of a fixed transmission path, resulting in task deployment failure, and having high flexibility and strong adaptability. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0036] Figure 1 It is a flowchart of the data transmission method provided by the present invention;

[0037] Figure 2 This is a schematic diagram of the process of obtaining the IoT subnet topology structure in the data transmission method provided by the present invention;

[0038] Figure 3 This is an exemplary structural diagram of the IoT subnet topology in the data transmission method provided by the present invention;

[0039] Figure 4 It is a schematic diagram of the process of constructing a hierarchical connectivity tree in the data transmission method provided by the present invention;

[0040] Figure 5 is an exemplary structural diagram of a hierarchical connectivity tree in the data transmission method provided by the present invention;

[0041] Figure 6 It is a schematic diagram of the process of constructing a real-time routing tree in the data transmission method provided by the present invention;

[0042] Figure 7 is an exemplary structural diagram of a real-time routing tree in the data transmission method provided by the present invention;

[0043] Figure 8 It is a structural diagram of the data transmission system provided by the present invention;

[0044] Figure 9 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0045] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0046] In the following examples, Figures 1-9 The present invention describes a data transmission method, system, electronic device and storage medium.

[0047] Please refer to Figure 1 , the data transmission method provided in this embodiment includes:

[0048] S101: Obtain the IoT subnet topology.

[0049] Specifically, the IoT subnet usually includes a gateway node (gateway device) and one or more IoT nodes. The IoT node refers to an ordinary node in the IoT subnet other than the gateway node. By obtaining the IoT subnet topology, the gateway node can understand the basic connectivity structure of the IoT subnet, which facilitates real-time control of each IoT node. The IoT subnet topology is a topology that is connected and reachable. The IoT subnet topology can be a known topology directly obtained, or it can be a topology obtained based on the adjacency relationship of each node in the IoT subnet.

[0050] S102: Construct a hierarchical connectivity tree based on the number of hops required for each IoT node to reach the gateway node in the IoT subnet topology structure, wherein the initial level of the hierarchical connectivity tree is the gateway node, and multiple lower levels of the hierarchical connectivity tree are respectively distributed with one or more IoT nodes; the IoT node is used to transmit its node information to the gateway node, and the gateway node is used to construct a real-time routing tree based on the node information and a preset data transmission strategy, and the real-time routing tree is updated in real time according to a preset period.

[0051] It should be noted that the hierarchical connectivity tree includes multiple levels, and each level has a corresponding hierarchical description. The hierarchical connectivity tree supports basic connectivity from IoT nodes to gateway nodes. By constructing a hierarchical connectivity tree, the IoT nodes can report their node information to the gateway nodes in real time, and the gateway nodes complete the construction of a real-time routing tree based on the node information and the preset data transmission strategy. The data transmission strategy can be set according to actual data transmission needs, such as setting a data transmission strategy based on energy balance needs, or setting a data transmission strategy based on bandwidth balance needs. By constructing a real-time routing tree, the customization of the data transmission path in the IoT subnet can be better realized. By periodically updating and adjusting the real-time routing tree, the dynamic transformation of the real-time routing tree is realized, which fully meets the actual needs of real-time routing adjustment caused by frequent changes in the IoT network environment and the continuous changes in the optimal data transmission path, improves the efficiency of IoT deployment, and has a high degree of automation, strong feasibility, and high flexibility.

[0052] S103: Based on the real-time routing tree, IoT data transmission is completed. That is, based on the real-time routing tree, message data transmission is completed, which better meets the IoT data transmission requirements.

[0053] It should be mentioned that the IoT nodes and gateway nodes in the IoT subnet can communicate directly, and devices between different IoT subnets can communicate through gateway devices or routing devices.

[0054] Please refer to Figure 2 In some embodiments, the step of obtaining the IoT subnet topology includes:

[0055] S201: Control the gateway node in the IoT subnet to receive the respective adjacency information sent by each IoT node.

[0056] It should be noted that the adjacency information refers to the neighbor node information of each IoT node, that is, one or more neighbor nodes corresponding to any IoT node, and the connection relationship between different IoT nodes.

[0057] It should be noted that any two nodes need to exchange maintenance messages (such as HELLO messages) to maintain neighbor status. A neighbor relationship is only mutually recognized when both nodes recognize each other as neighbors; there is no unilateral recognition of a neighbor relationship. These maintenance messages are transmitted within a single hop between directly connected neighbors.

[0058] When IoT nodes send their adjacency information to the gateway node, the following methods are used:

[0059] IoT nodes with fewer hops to the gateway node send adjacency information to the gateway node first. They also mark the gateway node as reachable by the current IoT node and the number of hops required to reach it. Subsequent IoT nodes select the IoT node with the fewest hops to reach the gateway node as their superior node, completing the process of sending adjacency information from each IoT node in the IoT subnet to the gateway node.

[0060] S202: Based on the adjacency information, determine the IoT subnet topology. Figure 3 For example, Figure 3 A represents the gateway node, and BK represents the IoT node. Figure 3 The topology of the interconnection between different nodes is shown. In the specific implementation process, it is only necessary to ensure that the IoT subnet topology is a connected and reachable structure.

[0061] Please refer to Figure 4 In some embodiments, the step of constructing a hierarchical connectivity tree according to the number of hops required for each IoT node to reach a gateway node in the IoT subnet topology includes:

[0062] S401: Determine the level of each IoT node based on the number of hops required for each IoT node to reach the gateway node in the IoT subnet topology, with the level increasing progressively as the number of hops required increases. For example, let the gateway node be the initial level (the root of the tree), with the initial level number being 0. From the root to the leaf nodes, the level increases progressively. In this embodiment, the maximum level value is 255 (the maximum value of an 8-bit field, i.e., the maximum value that can be expressed in 8 bits of binary).

[0063] S402: Control each IoT node to send a notification message to any IoT node via a single hop to identify one or more directly connected neighbor nodes of each IoT node. The notification message includes the node's own hierarchy. A directly connected neighbor node refers to an IoT node directly connected to the current IoT node. In specific implementations, nodes already added to the hierarchical connectivity tree (i.e., with a hierarchy level less than 255) can be controlled to send notification messages to other nodes. Starting with the gateway node, notification messages are sent sequentially from the smallest hierarchy level to the largest.

[0064] In some embodiments, if the IPv6 network is used as the background, the notification message also includes the IPv6 prefix of the IoT subnet. Each node in the IoT subnet can obtain its own IPv6 address (64-bit IP prefix + EUI64) according to the preset stateless address generation rules.

[0065] S403: Determine the directly connected neighbor node with the smallest level among the directly connected neighbor nodes of the IoT node, use it as the hierarchical parent node of the current IoT node, and complete the construction of the hierarchical connectivity tree. For example: suppose there is an IoT node m, and the directly connected neighbor node with the smallest level among its directly connected neighbor nodes is n. If the level of n is i, and i<255, then n is the hierarchical parent node of m, and the level of node m is i+1. If the levels of all directly connected neighbor nodes of node m are 255, it means that none of its directly connected neighbor nodes can be directly or multi-hop connected to the gateway node, then the level of m is also 255. The level of the directly connected neighbor node of the gateway node is 1, the level of the 2-hop neighbor node of the gateway is 2, and so on. Obviously, in a connected hierarchical connectivity tree, all IoT nodes can eventually be reachable with the gateway node, that is, a valid level value less than 255 is obtained.

[0066] It should be noted that if an IoT node X that has not yet joined the hierarchical connectivity tree receives one or more notification messages within a specified time period, it selects the IoT node with the lowest level from the IoT nodes that sent the notification messages as its hierarchical parent node, joins the hierarchical connectivity tree, and sets its own level to the level of the parent node plus 1. At the same time, IoT node X sends a neighbor joining message to the IoT node that sent the notification message. The IoT node that receives the neighbor joining message sends a response message, confirming that the receiving IoT node X is a neighbor node at the next level.

[0067] by Figure 5 For example, the hierarchical connectivity tree includes four levels: Level0, Level1, Level2, and Level3. The gateway node A is located at the initial level Level0. The remaining IoT nodes BK have corresponding level values ​​and are reachable to the gateway node A through corresponding paths. Figure 5 The size of the IP address of each node corresponds to the alphabetical order of the nodes.

[0068] In some embodiments, the step of transmitting the node information of the IoT node to the gateway node includes:

[0069] Control each IoT node to transmit its node information to its respective hierarchical parent node, and then to the gateway node layer by layer; the node information includes: the IP address of the IoT node, the node's own hierarchy, the node network status information and the node neighbor list information, and the node network status information includes at least one of the following: node remaining energy and node link bandwidth information; the node neighbor list information includes: the IP address of each neighbor node of the current IoT node, the neighbor node hierarchy, and the transmission cost from the neighbor node to the current IoT node (the distance between the two nodes); the node neighbor list information is uploaded to the gateway node based on a preset neighbor information compression reporting mechanism.

[0070] Regarding the IP addresses of IoT nodes, it's important to note that after an IoT node connects to a gateway node, i.e., after it joins the hierarchical connectivity tree, the gateway node assigns a unified IP address. Assuming the IoT subnet is an IPv6 subnet, the IoT node can obtain the 64-bit prefix of the IoT subnet and automatically generate an IPv6 address based on its own MAC (physical) address.

[0071] Regarding the node network status information, this information is closely related to the data transmission strategy of the IoT subnet. For example, when the data transmission strategy focuses on energy consumption, the node network status information at least includes the node's remaining energy. If the data transmission strategy focuses on bandwidth, the node network status information at least includes the node link bandwidth information, etc.

[0072] In the above steps, the IoT nodes in the control hierarchical connectivity tree transmit their node information to the gateway node, so that the subsequent gateway node can define real-time routes and build a real-time routing tree based on the node information and the preset data transmission strategy.

[0073] Furthermore, the neighbor information compression reporting mechanism includes:

[0074] If the levels of the two IoT nodes having a neighbor relationship are different, the reporting strategy is determined to be that the IoT node with a smaller level reports the corresponding neighbor relationship to the gateway node.

[0075] If the levels of two IoT nodes having a neighbor relationship are the same, based on a preset upload rule, a reporting strategy is determined such that the IoT node with a smaller or larger IP address reports the corresponding neighbor relationship to the gateway node.

[0076] Finally, based on the reporting strategy, the content of the node's neighbor list information is determined, and the node's neighbor list information is uploaded. As can be understood, since IoT nodes typically have a large number of neighbors, if both end nodes of each link report neighbor information, a large amount of redundant neighbor information will be introduced. Therefore, this embodiment, by adopting the aforementioned neighbor information compression reporting mechanism, can effectively avoid neighbor information redundancy, reduce the storage burden and data processing complexity of the gateway node.

[0077] In some embodiments, the IoT node stores a neighbor sequence number of each neighbor node, and the neighbor sequence number is used to determine the IoT node for next-hop forwarding in downlink transmission (sent from the gateway node to the IoT node); the neighbor sequence number is determined based on the hierarchy of the neighbor node and the IP address of the neighbor node, wherein the determination step includes: sorting the neighbor nodes of the current IoT node based on the hierarchy of the neighbor node and the IP address of the neighbor node; binary encoding the sorted neighbor nodes to determine the neighbor sequence number. Specifically, if the hierarchies of multiple neighbor nodes are different, the neighbor sequence number of the neighbor node with a smaller hierarchy is smaller; if the hierarchies of multiple neighbor nodes are the same, the neighbor sequence number of the neighbor node with a smaller IP address is smaller, thereby completing the sorting of the neighbor nodes of the current IoT node. In the specific implementation process, other sorting methods can also be used to set the neighbor sequence number of the neighbor node, which will not be repeated here. Figure 5 For example, Figure 5 The neighbor numbers of the neighbor nodes of the middle node D are arranged in the order from small to large: A (level 0), C (level 1), G (level 2, IP address is smaller than H), H (level 2, IP address is larger than G).

[0078] Please refer to Figure 6 In some embodiments, the step of constructing a real-time routing tree by the gateway node based on the node information and a preset data transmission strategy includes:

[0079] S601: Based on the node information and the preset data transmission strategy, determine the real-time route for building a real-time routing tree. The data transmission strategy can be formulated based on factors such as energy, transmission bandwidth, and transmission quality. For ease of understanding, take the formulation of an energy-balanced data transmission strategy as an example. Starting from the gateway node, select the node with the most remaining energy as its child node, and then go down in order by level. Each node selects the node with the most remaining energy as its child node among the unselected nodes. In this way, the closer the node is to the gateway node, the more energy it usually has; at the same time, the closer the node is to the gateway node, the more forwarding tasks it has and the faster it consumes energy. Based on this, determining the forwarding path for building a real-time routing tree can achieve energy balance for the entire IoT subnet.

[0080] S602: Control the gateway node to transmit a message to the next IoT node in the real-time route, where the IP header of the message includes the IP address of the destination IoT node, and the message carries a forwarding label. The forwarding label includes several neighbor sequence numbers used to specify the next hop for the intermediate forwarding node. The several neighbor sequence numbers are arranged in sequence according to the forwarding order, and the number of bits of each neighbor sequence number is determined by the number of neighbor nodes of each intermediate forwarding node (for example: if the number of neighbor nodes of any intermediate forwarding node is less than or equal to 4, the neighbor sequence number corresponding to the intermediate forwarding node in the forwarding label requires 2 bits; if the number of neighbor nodes is less than or equal to 8, the corresponding neighbor sequence number requires 3 bits); the intermediate forwarding node is the node located before the second-to-last IoT node in the real-time route.

[0081] It should be noted that the neighbor number is compressed and stored in the forwarding label in the form of the minimum number of bits, that is, the number that the neighbor number can express is not less than the number of neighbors. For example, 2 bits can describe 4 neighbors, 3 bits can describe 8 neighbors, 4 bits can describe 16 neighbors, and so on. Figure 5 For BK nodes, the number of bits of neighbor sequence numbers required are: 2, 3, 2, 2, 2, 3, 1, 0, 1, 1. The length (number of bits) of each neighbor sequence number in the forwarding label adaptively corresponds to the number of neighbor nodes of the corresponding intermediate forwarding node.

[0082] S603: Controlling the intermediate forwarding nodes to match neighbor sequence numbers against the forwarding label to determine the next-hop IoT node. Once the matching is complete, the matched neighbor sequence numbers in the forwarding label are removed, a new forwarding label is generated, and the message and the new forwarding label are forwarded to the next-hop IoT node. Specifically, according to the forwarding order in real-time routing, several intermediate forwarding nodes are sequentially controlled to match neighbor sequence numbers against the forwarding label. Once the matching is complete, the next-hop IoT node is determined. Simultaneously, the matched neighbor sequence numbers in the forwarding label are removed, and the remaining label is used as a new forwarding label. The message and the new forwarding label are then forwarded to the next-hop IoT node.

[0083] S604: When the message is transmitted to the penultimate IoT node in the real-time routing, the penultimate IoT node is controlled to determine the destination IoT node based on the IP address of the destination IoT node and complete message forwarding. During the message forwarding process, each IoT node identifies the previous hop IoT node that sent the message as its routing parent node, completing the construction of the real-time routing tree. It can be understood that the essence of building a real-time routing tree is to allow each node to determine its direct parent node (routing parent node), and on this basis, complete the construction of the real-time routing tree. Subsequent message forwarding can be performed based on the real-time routing tree.

[0084] It should be mentioned that by carrying forwarding labels in messages and using forwarding labels to specify the next hop for IoT nodes, the routing table storage overhead and query overhead of IoT nodes are greatly reduced. In addition, during the construction of the real-time routing tree, the transmitted message is a real-time routing tree construction message, and the real-time routing tree is constructed through the real-time routing tree construction message. It can be understood that the gateway node sends a "real-time routing tree construction message" to each leaf node, and the passing nodes obtain the parent node information in turn. In the real-time routing tree, there is no restriction on the level gradually increasing from the gateway node to the leaf node. As long as it complies with the data transmission strategy at the time, the level of the child node does not necessarily need to be greater than the level of the parent node. For example Figure 7 As shown, Figure 7 It is aimed at Figure 3 A real-time routing tree topology, node H is a child of G, but both nodes are at the same level. For example Figure 7 In the example, gateway node A sends a "real-time routing tree construction message" to leaf node I along the ABEI path. After receiving this message, node E uses the source link layer address in the real-time routing tree construction message to determine that node B is its routing parent in the new real-time routing tree. Similarly, node I can determine that node E is its routing parent.

[0085] Below is Figure 7 Taking the ADGJ forwarding path in the example, the forwarding label carried by the packet can be 10100. The specific steps are as follows:

[0086] First, since gateway node A knows all transmission paths, it can directly send the message to D. Therefore, the forwarding label carried by the message does not need to limit the relevant neighbor sequence number forwarded from A to D.

[0087] Secondly, after receiving the message, D takes the first two bits (10) of the forwarding label according to the number of bits of its neighbor sequence number (2), removes 10 from the forwarding label, and then forwards the message to D's second (corresponding to binary 10) neighbor node G.

[0088] Then, after receiving the message, G takes the first three bits of the forwarding label (100) based on the number of bits of its neighbor sequence number (3), removes 100 from the label, and then forwards the message to G's fourth neighbor node (corresponding to binary 100), thus completing the message forwarding.

[0089] Because the IP header of the message contains the IP address of the destination IoT node, the neighbor sequence number bit of the penultimate hop can be omitted. That is, IoT node G directly queries its neighbor list based on the IP address of the destination IoT node and then forwards the message to J. Therefore, the forwarding label of the forwarding path ADGJ in this embodiment can be compressed to 10.

[0090] It is understandable that after the gateway node calculates the real-time routing tree in a new cycle, if the path from the gateway node to a leaf node is exactly the same as that in the previous cycle, there is no need to send the "real-time routing tree construction message".

[0091] Based on the above embodiments, IoT data transmission is completed by utilizing the real-time routing tree at each moment. Specifically, for uplink transmission (from IoT nodes to gateway nodes), since the gateway node at any moment constructs the IoT subnet into a real-time routing tree with the gateway node as the root, each IoT node only needs to send the message to the routing parent node of the real-time routing tree. For downlink transmission, the gateway node is controlled to transmit a message to the IoT node of the next level, where the IP header of the message includes the IP address of the destination IoT node, and the message carries a forwarding label, where the forwarding label includes several neighbor sequence numbers for specifying the next hop for the first forwarding node, and the several neighbor sequence numbers are arranged in sequence according to the forwarding order, and the first forwarding node is the node before the second-to-last IoT node in the message transmission path; then one or more first forwarding nodes are controlled to match the neighbor sequence numbers of the forwarding label to determine the next-hop IoT node, and after the matching is completed, the matched neighbor sequence numbers in the forwarding label are removed to generate a new forwarding label, and then the message and the new forwarding label are forwarded to the next-hop IoT node; finally, when the message is transmitted to the second-to-last IoT node in the message transmission path, the second-to-last IoT node is controlled to determine the destination IoT node based on the IP address of the destination IoT node and complete the message forwarding.

[0092] It should also be noted that the data transmission method in this embodiment supports routing fault tolerance, primarily for uplink data transmission. If an IoT node M does not update its parent routing node in the real-time routing tree and sends data to its parent routing node P from the previous cycle, node P will continue to transmit data uplink. It should be noted that to avoid routing loops, if node P discovers that the previous and next hop nodes of a data transmission are the same, it terminates data forwarding.

[0093] The data transmission method of this embodiment has the following advantages: First, high-performance gateway nodes collect node information, calculate, and define real-time routes. This process forms a locally centralized routing system, enabling more accurate and rapid construction and adjustment of subnet routes. Second, different real-time routing trees can be constructed based on data transmission strategies, and real-time routing trees can be reconstructed based on the network status of each IoT node to meet network requirements such as energy conservation and bandwidth balancing. Finally, IoT nodes do not store routing information, only information such as neighbor sequence numbers, and forward messages according to the instructions of the message forwarding label. This reduces the workload and is well suited to the characteristics of IoT networks.

[0094] The data transmission system provided by the present invention is described below in the form of an embodiment. The data transmission system described below and the data transmission method described above can be referenced to each other.

[0095] Please refer to Figure 8 , the data transmission system provided in this embodiment includes:

[0096] The subnet topology module 801 is used to obtain the IoT subnet topology structure;

[0097] The routing construction module 802 is configured to construct a hierarchical connectivity tree based on the number of hops required for each IoT node to reach the gateway node in the IoT subnet topology. The initial level of the hierarchical connectivity tree is the gateway node, and each of the multiple lower levels of the hierarchical connectivity tree is distributed with one or more IoT nodes. The IoT node is configured to transmit its node information to the gateway node. The gateway node is configured to construct a real-time routing tree based on the node information and a preset data transmission strategy. The real-time routing tree is updated in real time according to a preset period.

[0098] Data transmission module 803 is used to complete IoT data transmission based on the real-time routing tree. The subnet topology construction module 801, routing construction module 802, and data transmission module 803 are connected. This system enables real-time definition and updating of IoT routes, avoiding the premature energy depletion of some IoT nodes and the resulting task deployment failures caused by the use of fixed transmission paths. It offers high flexibility, adaptability, feasibility, and low cost.

[0099] In some embodiments, the step of the subnet topology module 801 obtaining the IoT subnet topology structure includes:

[0100] Controlling the gateway node in the IoT subnet to receive the respective adjacency information sent by each IoT node;

[0101] Based on the adjacency information, the IoT subnet topology is determined.

[0102] In some embodiments, the routing construction module 802 constructs a hierarchical connectivity tree according to the number of hops required for each IoT node to reach the gateway node in the IoT subnet topology, including:

[0103] Determine the level of each IoT node according to the number of hops required for each IoT node to reach the gateway node in the IoT subnet topology, wherein the level increases step by step as the number of hops required increases;

[0104] Control each IoT node to send a notification message to any IoT node through a single hop to determine one or more directly connected neighbor nodes of each IoT node, wherein the notification message includes: the node's own level;

[0105] Determine the directly connected neighbor node with the smallest level among the directly connected neighbor nodes of the IoT node, and use it as the hierarchical parent node of the current IoT node to complete the construction of the hierarchical connectivity tree.

[0106] In some embodiments, the step of transmitting the node information of the routing construction module 802 to the gateway node includes:

[0107] Control each IoT node to transmit its node information to its respective hierarchical parent node, and then upward to the gateway node layer by layer; the node information includes: the IP address of the IoT node, the node's own hierarchy, the node's network status information and the node's neighbor list information, and the node's network status information includes at least one of the following: the node's remaining energy and the node's link bandwidth information; the node's neighbor list information includes: the IP address of each neighbor node of the current IoT node, the neighbor node hierarchy, and the transmission cost from the neighbor node to the current IoT node; the node's neighbor list information is uploaded to the gateway node based on a preset neighbor information compression reporting mechanism.

[0108] In some embodiments, the neighbor information compression reporting mechanism includes: if the levels of two IoT nodes having a neighbor relationship are different, determining a reporting strategy such that the IoT node with a smaller level reports the corresponding neighbor relationship to the gateway node;

[0109] If the levels of the two IoT nodes having a neighbor relationship are the same, then based on the preset upload rule, a reporting strategy is determined such that the IoT node with the smaller or larger IP address reports the corresponding neighbor relationship to the gateway node;

[0110] Based on the reporting strategy, the content of the node neighbor list information is determined, and the uploading of the node neighbor list information is completed.

[0111] In some embodiments, the IoT node stores a neighbor sequence number of each neighbor node, where the neighbor sequence number is used to determine the next-hop forwarding IoT node in downlink transmission; the neighbor sequence number is determined based on the level of the neighbor node and the IP address of the neighbor node, wherein the determining step includes:

[0112] Based on the levels of the neighbor nodes and the IP addresses of the neighbor nodes, the neighbor nodes of the current IoT node are sorted; the sorted neighbor nodes are binary-coded to determine the neighbor sequence numbers.

[0113] In some embodiments, the routing construction module 802 constructs a real-time routing tree based on the node information and a preset data transmission strategy, including the following steps:

[0114] Determining a real-time route for constructing a real-time routing tree based on the node information and a preset data transmission strategy;

[0115] Controlling the gateway node to transmit a message to the next IoT node in the real-time route, wherein the IP header of the message includes the IP address of the destination IoT node, and the message carries a forwarding label, wherein the forwarding label includes a plurality of neighbor sequence numbers for specifying the next hop for the intermediate forwarding node, wherein the plurality of neighbor sequence numbers are arranged in sequence according to a forwarding order, and the number of bits of each neighbor sequence number is determined by the number of neighbor nodes of each intermediate forwarding node; the intermediate forwarding node is a node located before the second-to-last IoT node in the real-time route;

[0116] Control the intermediate forwarding node to match the neighbor sequence number of the forwarding label to determine the next-hop IoT node. After the matching is completed, remove the matched neighbor sequence number from the forwarding label, generate a new forwarding label, and then forward the message and the new forwarding label to the next-hop IoT node.

[0117] When the message is transmitted to the penultimate IoT node in the real-time route, the penultimate IoT node is controlled to determine the destination IoT node based on the IP address of the destination IoT node and complete message forwarding; during the message forwarding process, each IoT node identifies the previous hop IoT node that sent the message as its routing parent node, completing the real-time routing tree construction.

[0118] Figure 9 An example of a physical structure diagram of an electronic device is shown below. Figure 9 As shown, the electronic device may include: a processor 910, a communication interface 920, a memory 930, and a communication bus 940, wherein the processor 910, the communication interface 920, and the memory 930 communicate with each other via the communication bus 940. The processor 910 may call the logic instructions in the memory 930 to execute a data transmission method, which includes: obtaining an IoT subnet topology; constructing a hierarchical connectivity tree based on the number of hops required for each IoT node in the IoT subnet topology to reach a gateway node, wherein the initial level of the hierarchical connectivity tree is the gateway node, and each of the multiple lower levels of the hierarchical connectivity tree is distributed with one or more IoT nodes; the IoT node is used to transmit its node information to the gateway node, and the gateway node is used to construct a real-time routing tree based on the node information and a preset data transmission strategy, and the real-time routing tree is updated in real time according to a preset period; based on the real-time routing tree, IoT data transmission is completed.

[0119] In addition, the logic instructions in the above-mentioned memory 930 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0120] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the data transmission method provided by the above methods, which includes: obtaining the Internet of Things subnet topology structure; constructing a hierarchical connectivity tree based on the required number of hops for each Internet of Things node in the Internet of Things subnet topology structure to reach the gateway node, the initial level of the hierarchical connectivity tree is the gateway node, and the multiple lower levels of the hierarchical connectivity tree are respectively distributed with one or more Internet of Things nodes; the Internet of Things node is used to transmit its node information to the gateway node, and the gateway node is used to construct a real-time routing tree based on the node information and a preset data transmission strategy, and the real-time routing tree is updated in real time according to a preset period; based on the real-time routing tree, the Internet of Things data transmission is completed.

[0121] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data transmission method provided by the above-mentioned methods, the method comprising: obtaining the Internet of Things subnet topology; constructing a hierarchical connectivity tree according to the required number of hops for each Internet of Things node in the Internet of Things subnet topology to reach the gateway node, the initial level of the hierarchical connectivity tree being the gateway node, and the multiple lower levels of the hierarchical connectivity tree being respectively distributed with one or more Internet of Things nodes; the Internet of Things node being used to transmit its node information to the gateway node, the gateway node being used to construct a real-time routing tree based on the node information and a preset data transmission strategy, the real-time routing tree being updated in real time according to a preset period; based on the real-time routing tree, completing Internet of Things data transmission.

[0122] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0123] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A data transmission method, characterized in that: include: Get the IoT subnet topology; Constructing a hierarchical connectivity tree based on the number of hops required for each IoT node to reach the gateway node in the IoT subnet topology, wherein the initial level of the hierarchical connectivity tree is the gateway node, and each of the multiple lower levels of the hierarchical connectivity tree is distributed with one or more IoT nodes; The IoT node is used to transmit its node information to the gateway node, and the gateway node is used to build a real-time routing tree based on the node information and a preset data transmission strategy. The real-time routing tree is updated in real time according to a preset period; Based on the real-time routing tree, complete the Internet of Things data transmission; The step of constructing a real-time routing tree based on the node information and the preset data transmission strategy includes: Determining a real-time route for constructing a real-time routing tree based on the node information and a preset data transmission strategy; Controlling the gateway node to transmit a message to the next IoT node in the real-time route, wherein the IP header of the message includes the IP address of the destination IoT node, and the message carries a forwarding label, wherein the forwarding label includes a plurality of neighbor sequence numbers for specifying the next hop for the intermediate forwarding node, wherein the plurality of neighbor sequence numbers are arranged in sequence according to a forwarding order, and the number of bits of each neighbor sequence number is determined by the number of neighbor nodes of each intermediate forwarding node; the intermediate forwarding node is a node located before the second-to-last IoT node in the real-time route; Control the intermediate forwarding node to match the neighbor sequence number of the forwarding label to determine the next-hop IoT node. After the matching is completed, remove the matched neighbor sequence number from the forwarding label, generate a new forwarding label, and then forward the message and the new forwarding label to the next-hop IoT node. When the message is transmitted to the penultimate IoT node in the real-time route, the penultimate IoT node is controlled to determine the destination IoT node based on the IP address of the destination IoT node and complete message forwarding; during the message forwarding process, each IoT node identifies the previous hop IoT node that sent the message as its routing parent node, completing the real-time routing tree construction.

2. The data transmission method according to claim 1, wherein: The steps to obtain the IoT subnet topology include: Controlling a gateway node in the Internet of Things subnet to receive respective adjacency information sent by each Internet of Things node; and determining a topology structure of the Internet of Things subnet based on the adjacency information.

3. The data transmission method according to claim 1, wherein: According to the number of hops required for each IoT node to reach the gateway node in the IoT subnet topology, the steps of constructing a hierarchical connectivity tree include: Determine the level of each IoT node according to the number of hops required for each IoT node to reach the gateway node in the IoT subnet topology, wherein the level increases step by step as the number of hops required increases; Control each IoT node to send a notification message to any IoT node through a single hop to determine one or more directly connected neighbor nodes of each IoT node, wherein the notification message includes: the node's own level; Determine the directly connected neighbor node with the smallest level among the directly connected neighbor nodes of the IoT node, and use it as the hierarchical parent node of the current IoT node to complete the construction of the hierarchical connectivity tree.

4. The data transmission method according to claim 1, wherein: The step of transmitting its node information to the gateway node includes: Control each IoT node to transmit its node information to its respective hierarchical parent node, and then upward to the gateway node layer by layer; the node information includes: the IP address of the IoT node, the node's own hierarchy, the node's network status information and the node's neighbor list information, and the node's network status information includes at least one of the following: the node's remaining energy and the node's link bandwidth information; the node's neighbor list information includes: the IP address of each neighbor node of the current IoT node, the neighbor node hierarchy, and the transmission cost from the neighbor node to the current IoT node; the node's neighbor list information is uploaded to the gateway node based on a preset neighbor information compression reporting mechanism.

5. The data transmission method according to claim 4, characterized in that: The neighbor information compression reporting mechanism includes: If the levels of the two IoT nodes having a neighbor relationship are different, determining a reporting strategy in which the IoT node with a smaller level reports the corresponding neighbor relationship to the gateway node; If the levels of the two IoT nodes having a neighbor relationship are the same, then based on the preset upload rule, a reporting strategy is determined such that the IoT node with the smaller or larger IP address reports the corresponding neighbor relationship to the gateway node; Based on the reporting strategy, the content of the node neighbor list information is determined, and the uploading of the node neighbor list information is completed.

6. The data transmission method according to claim 1, wherein: The IoT node stores a neighbor sequence number of each neighbor node, and the neighbor sequence number is used to determine the IoT node for next-hop forwarding in downlink transmission; The neighbor sequence number is determined based on the level of the neighbor node and the IP address of the neighbor node, wherein the determination step includes: sorting the neighbor nodes of the current IoT node based on the level of the neighbor node and the IP address of the neighbor node; binary encoding the sorted neighbor nodes to determine the neighbor sequence number.

7. A data transmission system, characterized in that: Subnet topology module, used to obtain the IoT subnet topology; a routing construction module, configured to construct a hierarchical connectivity tree based on the number of hops required for each IoT node to reach the gateway node in the IoT subnet topology, wherein the initial level of the hierarchical connectivity tree is the gateway node, and each of the multiple lower levels of the hierarchical connectivity tree is distributed with one or more IoT nodes; The IoT node is used to transmit its node information to the gateway node, and the gateway node is used to build a real-time routing tree based on the node information and a preset data transmission strategy. The real-time routing tree is updated in real time according to a preset period; A data transmission module, used to complete IoT data transmission based on the real-time routing tree; The step of constructing a real-time routing tree based on the node information and the preset data transmission strategy includes: Determining a real-time route for constructing a real-time routing tree based on the node information and a preset data transmission strategy; Controlling the gateway node to transmit a message to the next IoT node in the real-time route, wherein the IP header of the message includes the IP address of the destination IoT node, and the message carries a forwarding label, wherein the forwarding label includes a plurality of neighbor sequence numbers for specifying the next hop for the intermediate forwarding node, wherein the plurality of neighbor sequence numbers are arranged in sequence according to a forwarding order, and the number of bits of each neighbor sequence number is determined by the number of neighbor nodes of each intermediate forwarding node; the intermediate forwarding node is a node located before the second-to-last IoT node in the real-time route; Control the intermediate forwarding node to match the neighbor sequence number of the forwarding label to determine the next-hop IoT node. After the matching is completed, remove the matched neighbor sequence number from the forwarding label, generate a new forwarding label, and then forward the message and the new forwarding label to the next-hop IoT node. When the message is transmitted to the penultimate IoT node in the real-time route, the penultimate IoT node is controlled to determine the destination IoT node based on the IP address of the destination IoT node and complete message forwarding; during the message forwarding process, each IoT node identifies the previous hop IoT node that sent the message as its routing parent node, completing the real-time routing tree construction.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the data transmission method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data transmission method according to any one of claims 1 to 6 is implemented.