A data transmission method, device, terminal and storage medium

By synchronizing node hierarchical levels through broadcasted instructions, the method integrates route discovery and data transmission in LoRaWAN Mesh networks, reducing power consumption and improving efficiency by minimizing control signaling and packet collisions.

CN113645663BActive Publication Date: 2025-07-15SOUTHERN UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110847696.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-27
Publication Date
2025-07-15
Estimated Expiration
2041-07-27

AI Technical Summary

Technical Problem

The existing Mesh network system needs to explore routing paths when transmitting data packets, resulting in a large number of control signaling, increasing network system power consumption and reducing data transmission efficiency.

Method used

Initialization is performed by synchronously obtaining hierarchical information in each node in the network system, and combining the process of exploring routing paths and forwarding data packets, the generation of control signaling and the power consumption of the network system is reduced.

Benefits of technology

While ensuring the effectiveness of data transmission, it saves the process of exploring routing paths, reduces the power consumption of the network system, and improves data transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113645663B_ABST
    Figure CN113645663B_ABST
Patent Text Reader

Abstract

This application is applicable to the field of data transmission, and provides a data transmission method, apparatus, terminal, and storage medium. Among them, the above data transmission method is applied to a first node in a network system. Specifically, the method includes: after a plurality of nodes broadcast hierarchical instructions with the same data content at the same time, receiving the hierarchical instructions broadcast by a second node among them, and determining the hierarchical information of the first node according to the second-level information carried in the hierarchical instructions broadcast by the second node. When there is a first data packet carrying the content to be transmitted at the first node, generating a second data packet carrying the hierarchical information of the first node and the content to be transmitted, and sending the second data packet to the second node to forward the content to be transmitted to the gateway node. On the one hand, the embodiment of this application can avoid the collision of data packets; on the other hand, it can save the process of exploring the routing path using the previous data packets, reduce the generation of control signaling, and reduce the power consumption of the network system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of data transmission, and particularly relates to a data transmission method, apparatus, terminal, and storage medium. Background Art

[0002] The Internet of Things technology is developing rapidly with each passing day. Among numerous Internet of Things technologies, LoRa is a typical low-power wide-area network communication technology, which is widely used in occasions with less data transmission and low energy consumption. Most current LoRa applications are networked based on the LoRaWAN protocol and adopt a star network topology. Although the star network is simple in structure and convenient for management, it has poor flexibility and is not convenient for expansion. The wireless Mesh network is a "multi-hop" network that can flexibly arrange nodes according to actual needs.

[0003] However, when the current Mesh network system transmits data packets, it generally needs to first use the previous data packets to explore the routing paths between various nodes in the network system, and then the nodes forward the data packets based on the explored routing paths. To prevent data packet collisions, the process of exploring the routing paths requires a lot of protocol support, and a large amount of control signaling will be generated during the process, resulting in an increase in the power consumption of the entire network system. Summary of the Invention

[0004] Embodiments of this application provide a data transmission method, apparatus, terminal, and storage medium, which can initialize by enabling each node in the network system to synchronously obtain levels, reduce data packet collisions, accelerate the speed of obtaining levels, and combine the process of exploring routing paths and the process of forwarding data packets, thereby saving the process of using previous data packets to explore routing paths, reducing the generation of control signaling, and reducing the power consumption of the network system.

[0005] A first aspect of an embodiment of this application provides a data transmission method, which is applied to a first node. The first node is configured in a network system. The data transmission method includes:

[0006] Receiving a hierarchical instruction broadcast by a second node. The second node is one of several nodes corresponding to the hierarchical information carried by the hierarchical instruction, and the several nodes broadcast the hierarchical instruction with the same data content at the same moment;

[0007] Determining the hierarchical information of the first node according to the hierarchical information carried by the hierarchical instruction broadcast by the second node;

[0008] If there is a first data packet carrying the content to be transmitted at the first node, generate a second data packet carrying the content to be transmitted and the hierarchical information of the first node, where the content to be transmitted is the data content to be transmitted to the gateway node of the network system;

[0009] Send the second data packet to the second node, so that after receiving the second data packet, the second node forwards the content to be transmitted to the gateway node based on the hierarchical information of the first node carried in the second data packet.

[0010] A data transmission device provided in the second aspect of the embodiments of the present application is configured in a first node, and the first node is configured in a network system. The data transmission device includes:

[0011] A hierarchical instruction receiving unit, configured to receive a hierarchical instruction broadcast by a second node, where the second node is one of several nodes corresponding to the hierarchical information carried in the hierarchical instruction, and the several nodes broadcast the hierarchical instructions with the same data content at the same time;

[0012] A hierarchical information determining unit, configured to determine the hierarchical information of the first node according to the hierarchical information carried in the hierarchical instruction broadcast by the second node;

[0013] A data packet generating unit, configured to generate a second data packet carrying the content to be transmitted and the hierarchical information of the first node if there is a first data packet carrying the content to be transmitted at the first node, where the content to be transmitted is the data content to be transmitted to the gateway node of the network system;

[0014] A data packet sending unit, configured to send the second data packet to the second node, so that after receiving the second data packet, the second node forwards the content to be transmitted to the gateway node based on the hierarchical information of the first node carried in the second data packet.

[0015] A terminal provided in the third aspect of the embodiments of the present application includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above method are implemented.

[0016] A computer-readable storage medium provided in the fourth aspect of the embodiments of the present application stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0017] A computer program product provided in the fifth aspect of the embodiments of the present application, when running on a terminal, enables the terminal to implement the steps of the method when executed.

[0018] In an embodiment of the present application, after several nodes broadcast hierarchical instructions with the same data content at the same time, the hierarchical instruction broadcast by the second node among them is received, and the hierarchical information of the first node is determined according to the second-level information carried in the hierarchical instruction broadcast by the second node. When there is a first data packet carrying the content to be transmitted at the first node, a second data packet carrying the hierarchical information of the first node and the content to be transmitted is generated, and the second data packet is sent to the second node, so that after receiving the second data packet, the second node forwards the content to be transmitted to the gateway node based on the hierarchical information of the first node carried in the second data packet. It is possible to combine the process of exploring the routing path and the process of forwarding data packets. There is no need to use the previous data packet to explore the routing path. Only the hierarchical information of itself needs to be obtained in advance, and based on the hierarchical information, the content to be transmitted is forwarded to the gateway node layer by layer during the process of forwarding data packets. While ensuring the effectiveness of data transmission, the process of using the previous data packet to explore the routing path is saved. Therefore, the generation of control signaling is reduced, and the power consumption of the network system is reduced.

[0019] Moreover, since in the process of sending the hierarchical instruction, nodes at the same level broadcast data packets with the same content at the same time, collision of packets is avoided, and the time for nodes at each level to send hierarchical instructions to nodes at the next level is saved, thus improving the efficiency of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0021] Figure 1 is a schematic flowchart of the implementation of a data transmission method provided by an embodiment of the present application;

[0022] Figure 2 is a schematic diagram of the topological structure of the network system provided by an embodiment of the present application;

[0023] Figure 3 is a schematic flowchart of the specific implementation of receiving data packets provided by an embodiment of the present application;

[0024] Figure 4 is a schematic diagram of the network system transmitting data packets provided by an embodiment of the present application;

[0025] Figure 5 is a schematic diagram of the structure of a data transmission device provided by an embodiment of the present application;

[0026] Figure 6 It is a schematic structural diagram of a terminal provided by an embodiment of the present application. Specific implementation manners

[0027] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the protection scope of the present application.

[0028] The Internet of Things technology has developed rapidly and changed with each passing day. Among many Internet of Things technologies, LoRa is a typical low-power wide-area network communication technology, which is widely used in occasions with less data transmission and low energy consumption. Most current LoRa applications are networked based on the LoRaWAN protocol and adopt a star network topology. Although the star network has a simple structure and is convenient for management, it has poor flexibility and is not convenient for expansion. The wireless Mesh network is a "multi-hop" network that can flexibly arrange nodes according to actual needs.

[0029] However, when the current Mesh network system transmits data packets, it generally needs to first use the preamble data packets to explore the routing paths between various nodes in the network system, and then the nodes forward the data packets based on the explored routing paths.

[0030] Research has found that during the process of exploring the routing paths, each node in the network system needs to send preamble data packets carrying its own address. In order to prevent the preamble data packets from colliding, a large number of control signals are generally generated based on many control protocols to control each node to back off for a certain period of time, so that each node sends the preamble data packets at different times, and finally the routing paths between the nodes are explored. Therefore, the generation of a large number of control signals during the process of exploring the routing paths will increase the power consumption of the entire network system. At the same time, each node sending the preamble data packets at different times will also cause the time for exploring the routing paths to be prolonged, reducing the data transmission efficiency.

[0031] In order to illustrate the technical solution of the present application, the following will be described through specific embodiments.

[0032] Figure 1 It shows a schematic implementation flowchart of a data transmission method provided by an embodiment of the present application. The method can be applied to a first node, and the first node is configured in the network system and is applicable to the situation where the power consumption of the network system needs to be reduced.

[0033] In an embodiment of the present application, the above network system may be a Mesh network system, which may include a gateway node and one or more terminal nodes. Among them, the gateway node can be used to connect different network systems. When a terminal node needs to send an outgoing data packet, it can first send the data packet to the gateway node, and then the gateway node forwards the data packet. Each terminal node can be a terminal device such as a computer or a smart phone. Moreover, in some embodiments of the present application, in order to further reduce power consumption, the above terminal node can be a terminal device that supports the LoRaWAN protocol. In an embodiment of the present application, the above first node can be any terminal node in the network system.

[0034] Specifically, the above data transmission method may include the following steps S101 to step S104.

[0035] Step S101, receiving a hierarchical instruction broadcast by a second node.

[0036] In an embodiment of the present application, each terminal node in the above network system has its own level, and the value of the level represents the distance of communication between the terminal node and the gateway node. For example, a terminal node that can directly communicate with the gateway node in the network system can be a node at the first level. Correspondingly, other terminal nodes that can communicate with the terminal node at the first level can be nodes at the second level, and so on. To ensure that the data packet can be effectively transmitted to the gateway node, each terminal node needs to first learn its own level and send the data packet to the node at the upper level corresponding to its own level until the data packet reaches the gateway node.

[0037] Specifically, in some embodiments of the present application, the gateway node can generate and broadcast an initial hierarchical instruction. The terminal node that can directly communicate with the gateway node will receive the initial hierarchical instruction broadcast by the gateway node. Then, the terminal node that can directly communicate with the gateway node will also broadcast a hierarchical instruction carrying its own level information, and so on.

[0038] Based on this, the first node in the network system can receive the hierarchical instruction broadcast by the second node. That is to say, the second node is a terminal node at the upper level of the first node and can communicate with the first node, that is, the second node is the parent node of the first node.

[0039] Among them, the second node can be either the gateway node or any terminal node in any level outside the last level in the network system.

[0040] Based on the foregoing description, it can be seen that when the existing Mesh network system explores the routing path using the preamble data packets, since the preamble data packets sent by each node need to carry its own address, the data contents of the preamble data packets of each node are different. If the preamble data packets with different data contents overlap in the sending time, they will interfere with each other and cause packet collisions, resulting in other nodes not being able to effectively receive these preamble data packets. In the embodiment of the present application, the second node is one of several nodes corresponding to the hierarchical information carried by the hierarchical instruction, and the several nodes broadcast hierarchical instructions with the same data content at the same time.

[0041] Among them, the several nodes corresponding to the hierarchical information carried by the hierarchical instruction refer to all nodes at the same level as the second node. The hierarchical information carried in the hierarchical instruction is the hierarchical information of the sender, that is, the hierarchical information carried in the hierarchical instruction broadcast by the second node is the hierarchical information of the second node.

[0042] In the embodiment of the present application, since the hierarchical instruction carries hierarchical information, the data contents of the hierarchical instructions broadcast by all nodes at the same level as the second node can be the same. When broadcasting hierarchical instructions with the same data content at the same time, the hierarchical instructions will not interfere with each other and cause packet collisions. Therefore, when all nodes at the same level as the second node broadcast hierarchical instructions with the same data content at the same time, the first node will receive one or more hierarchical instructions broadcast by the second node.

[0043] Moreover, the network system can broadcast hierarchical instructions layer by layer starting from the gateway node. In addition to receiving the hierarchical instructions broadcast by the second node, the first node can also receive the hierarchical instructions broadcast by the child nodes of the first node. Therefore, in some embodiments of the present application, in order to avoid incorrect hierarchical information of the first node, the first node can only process the first received hierarchical instruction.

[0044] Step S102, determine the hierarchical information of the first node according to the hierarchical information carried in the hierarchical instruction broadcast by the second node.

[0045] In the embodiment of the present application, after receiving the hierarchical instruction broadcast by the second node, the first node can parse the hierarchical instruction to obtain the hierarchical information carried in the hierarchical instruction broadcast by the second node, and this hierarchical information is the hierarchical information of the second node. According to the hierarchical information of the second node, the first node can determine its own hierarchical information.

[0046] More specifically, the first node can add one to the level of the second node pointed to by the hierarchical information of the second node as its own level to obtain its own hierarchical information.

[0047] In some embodiments of the present application, after determining the hierarchical information of the first node, the first node may generate a hierarchical instruction carrying the hierarchical information of the first node and broadcast the hierarchical instruction carrying the hierarchical information of the first node, so that other terminal nodes at the next level corresponding to the level where the first node is located in the network system receive the hierarchical instruction broadcast by the first node. Moreover, the first node will send the hierarchical instruction at the same time as other nodes at the level where the first node is located in the network system. And so on, and finally each terminal node on the network system will determine its own hierarchical information.

[0048] Reference Figure 2 , taking the second node as the gateway node and the first node as the terminal node capable of communicating with the gateway node as an example, the first node may receive the hierarchical instruction broadcast by the second node and obtain its own hierarchical information (that is, its own level is the first level), and then broadcast the hierarchical instruction carrying its own hierarchical information. The terminal nodes located at the second level and capable of communicating with the first node will receive the hierarchical instruction broadcast by the first node and obtain their own hierarchical information (that is, their own level is the second level).

[0049] It should be noted that due to the light speed characteristic of radio propagation, and also because the process of the microcontroller unit (MCU) immediately switching to transmission after receiving a radio frequency interruption is very short, it can be considered that terminal nodes at the same level can receive the hierarchical instructions sent by the terminal nodes at the upper level at the same time and send new hierarchical instructions at the same time. For example, all terminal nodes around the gateway node (that is, all terminal nodes at the first level) receive the initial hierarchical instruction almost simultaneously and send hierarchical instructions with the same data content at the same time.

[0050] Generally, the number and position of each terminal node in the network system are fixed, and the hierarchical structure generally does not change. Therefore, in some embodiments of the present application, the gateway node in the above network system may broadcast the hierarchical instruction only once, so that each terminal node determines its own hierarchical information.

[0051] Considering that there are also network systems in practical applications where the number or position of terminal nodes often changes, therefore, in some other embodiments of the present application, the gateway node in the above network system may also repeatedly broadcast the hierarchical instruction at a preset period to continuously maintain the accuracy of the network hierarchy.

[0052] Step S103, if the first node has a first data packet carrying the content to be transmitted, generate a second data packet carrying the content to be transmitted and the hierarchical information of the first node.

[0053] Among them, the content to be transmitted above is the data content to be transmitted to the gateway node of the network system.

[0054] In an embodiment of the present application, when the first node has a first data packet carrying the content to be transmitted, the first node will send the data packet to its parent node, that is, to the terminal node at the upper level of the first node, so that the content to be transmitted is sent to the gateway node level by level.

[0055] Specifically, in some embodiments of the present application, before generating a second data packet carrying the content to be transmitted and the hierarchical information of the first node, the first node may generate a first data packet. That is to say, the first data packet may be a data packet generated by the first node to be transmitted to the gateway node.

[0056] In some other embodiments of the present application, the first data packet may also be a data packet broadcast by a terminal node at the next lower level corresponding to the level where the first node is located.

[0057] Specifically, as Figure 3 shown, before generating the second data packet carrying the hierarchical information of the first node, the following steps S301 to S303 may also be included.

[0058] Step S301, receive a fourth data packet sent by a third node.

[0059] Among them, the above fourth data packet carries the hierarchical information of the third node and the content to be transmitted.

[0060] In some embodiments of the present application, the above third node is a node at the next lower level corresponding to the level where the first node is located and can communicate with the first node. That is, the third node is a child node of the first node.

[0061] Specifically, in some embodiments of the present application, the third node may also generate the fourth data packet to be transmitted to the gateway node by itself, or generate the fourth data packet based on the data packet broadcast by the child node of the third node after receiving the data packet broadcast by the child node of the third node.

[0062] Step S302, determine whether the fourth data packet is a data packet that the first node needs to forward according to the hierarchical information of the first node and the hierarchical information of the third node carried in the fourth data packet.

[0063] In some embodiments of the present application, since the first node knows its own hierarchical information and the fourth data packet carries the hierarchical information of the third node, the first node can detect whether the fourth data packet is a data packet broadcast by a node at the next lower level corresponding to the level where the first node is located.

[0064] If the fourth data packet is a data packet sent by a node located at the next lower level corresponding to the level where the first node is located, it can be determined whether the fourth data packet is a data packet that the first node needs to forward; if the fourth data packet is not a data packet sent by a node located at the next lower level corresponding to the level where the first node is located, then the fourth data packet can be not further processed.

[0065] That is to say, any terminal node in the network system can forward the data packets from its child nodes.

[0066] Step S303, if the fourth data packet is a data packet that the first node needs to forward, then use the fourth data packet as the first data packet, and confirm that the first node has a first data packet carrying the content to be transmitted.

[0067] In some embodiments of the present application, when the fourth data packet is a data packet that the first node needs to forward, then use the fourth data packet as the first data packet, and confirm that the first node has a first data packet carrying the content to be transmitted, so that the first node forwards the content to be transmitted until the content to be transmitted is transmitted to the gateway.

[0068] Since each node transmits data packets in a broadcast manner, the first node may actually also receive data packets broadcast by the second node or neighbor nodes at the same level. Therefore, for each node, after receiving a data packet, it is necessary to generate a data packet carrying its own level information. Taking the foregoing third node and the first node as an example, the third node broadcasts a fourth data packet carrying its own level information. Only after the first node receives the fourth data packet can it determine whether the fourth data packet is a data packet that the first node needs to forward based on the level information of the third node and its own level information.

[0069] Based on this, in the embodiments of the present application, for the first node, when the first node has a first data packet to be transmitted to the gateway node, it can also generate a second data packet carrying the level information of the first node.

[0070] Step S104, send the second data packet to the second node.

[0071] In the embodiments of the present application, since the first node has a first data packet carrying the content to be transmitted, in order for the gateway to receive the content to be transmitted, the first node can send the second data packet to the second node. If the second node is the gateway node, the second node can directly receive the second data packet; if the second node is not the gateway node, after receiving the second data packet, the second node can forward the content to be transmitted based on the level information of the first node carried by the second data packet, and finally make the content to be transmitted reach the gateway node.

[0072] Specifically, in some embodiments of the present application, when the second node is not a gateway node, the second node may generate a data packet carrying its own hierarchical information and the content to be transmitted in the manner described in the above steps S101 to S104, and continue to send the data packet to the parent node of the second node until the gateway node receives the content to be transmitted.

[0073] In the embodiments of the present application, after broadcasting hierarchical instructions with the same data content by several nodes at the same time, receiving the hierarchical instructions broadcast by the second node among them, and determining the hierarchical information of the first node according to the second hierarchical information carried in the hierarchical instructions broadcast by the second node, when there is a first data packet carrying the content to be transmitted at the first node, generating a second data packet carrying the hierarchical information of the first node and the content to be transmitted, and sending the second data packet to the second node, so that after receiving the second data packet, the second node forwards the content to be transmitted to the gateway node based on the hierarchical information of the first node carried in the second data packet, which can combine the process of exploring the routing path and the process of forwarding data packets, without the need to explore the routing path using previous data packets, only need to obtain its own hierarchical information in advance, and based on the hierarchical information, layer by layer forward the content to be transmitted to the gateway node during the process of forwarding data packets. While ensuring the effectiveness of data transmission, it saves the process of exploring the routing path using previous data packets, thus reducing the generation of control signaling and lowering the power consumption of the network system.

[0074] Moreover, since in the process of sending hierarchical instructions, nodes at the same level broadcast data packets with the same content at the same time, thus, while avoiding packet collisions, it saves the time for nodes at each level to send hierarchical instructions to nodes at the next level, improving the efficiency of data transmission.

[0075] It should be noted that the present application does not further limit the specific implementation manner of sending the second data packet to the second node. In some embodiments of the present application, the above first node may send the second data packet to the second node by broadcasting; or, send the second data packet to the second node according to the address information of the second node.

[0076] Among them, the address information of the second node may refer to the routing path between the first node and the second node, or may be an identification number used to represent the node address of the second node.

[0077] Specifically, in some embodiments of the present application, the first node may detect whether it stores the address information of the second node. If the first node stores the address information of the second node, it unicasts the second data packet to the second node according to the address information of the second node; if the first node does not store the address information of the second node, it broadcasts the second data packet to the second node.

[0078] Based on the foregoing description, in the embodiments of the present application, although the first node determines its own hierarchical information, since the hierarchical instruction does not carry the address information of the second node, after receiving the hierarchical instruction, the first node does not know which second nodes there are. Therefore, the first node can broadcast the second data packet so that the second node can receive the second data packet.

[0079] In some embodiments of the present application, after sending the second data packet to the second node in a broadcast manner, the first node can listen for the third data packet forwarded by the second node after receiving the first data packet. Each third data packet carries the hierarchical information of the second node and the address information of the second node, and stores the address information of the second node according to the hierarchical information of the first node and the hierarchical information of the second node carried in the third data packet.

[0080] Specifically, according to the hierarchical information of the first node and the hierarchical information of the second node carried in the third data packet, the first node can determine whether the third data packet is a data packet sent by a node in the upper layer corresponding to the layer where the first node is located. If the third data packet is a data packet sent by a node in the upper layer corresponding to the layer where the first node is located, it means that the terminal node or the gateway node sending the third data packet is the parent node of the first node, that is, the second node is the parent node of the first node. Therefore, the address information of the second node can be stored.

[0081] After storing the address information of the second node, when the first node has a first data packet carrying the content to be transmitted next time, it can send the second data packet to the second node according to the address information.

[0082] That is to say, when each terminal node generates the data packet to be forwarded by itself, it can carry its own (i.e., the sending node) address information in the data packet. Thus, in the process of forwarding the data packet, each terminal node can obtain and store the address information of its own parent node.

[0083] Furthermore, the data packet generated by each terminal node can also carry information such as its own (i.e., the sending node) identification number and the source information of the content to be transmitted.

[0084] More specifically, each terminal node can add hierarchical information, address information, source information, etc. to the packet header of the data packet.

[0085] For example, as Figure 4As shown, if a first node at the third level with an address information of "11" has a first data packet carrying the content to be transmitted "XXXXXX", it can generate a second data packet with a data content of "001103XXXXXX" or a second data packet with a data content of "131103XXXXXX". Among them, the first two bits of the packet header are used to represent the source information of the data packet. "00" indicates that the data packet is generated by the first node itself, that is, the first node is the data source node. "13" indicates that the data packet is sent by a node at the fourth level with an address information of "13". The middle two bits of the packet header are used to represent its own address information. The last two bits of the packet header are used to represent its own level information. When the first node broadcasts the second data packet, each node within the communication range of the first node (i.e., neighbor nodes) will receive the second data packet. Among them, a second node at the third level with an address information of "08" and a second node at the third level with an address information of "09" can both confirm the need to forward the content to be transmitted based on the level information in the second data packet, and respectively generate a third data packet with a data content of "110802XXXXXX" and a third data packet with a data content of "110902XXXXXX". The two second nodes respectively broadcast the third data packets they generate, and the content to be transmitted "XXXXXX" can be sent to the gateway level by level. Moreover, the first node at the third level with an address information of 11 can receive the third data packet with a data content of "110802XXXXXX" and the third data packet with a data content of "110902XXXXXX", and based on the level information "02" of the second node carried in the third data packet and its own level "03", it can determine that the terminal nodes (i.e., the second nodes) with an address information of "08" and an address information of "09" are its parent nodes and store the address information of the second nodes.

[0086] It should be noted that when terminal nodes at the same level forward data packets carrying the data to be transmitted, the forwarding times can be different. For example, after the second nodes with an address information of "08" and an address information of "" send the third data packets they generate and delay for a period of time, the second nodes with an address information of "09" and an address information of "" send the third data packets they generate.

[0087] In the embodiments of the present application, by broadcasting data packets carrying its own address information at each terminal node, the first node can determine that the second node is its parent node based on the third data packet forwarded by the second node, and thus store the address information of the second node. That is to say, the first node can explore the parent node information while broadcasting data packets. By listening to the data packets forwarded by the second node and analyzing the hierarchical information in the data packets, it can be confirmed that the second node is the parent node of the first node. When there is a first data packet carrying the content to be transmitted next time, the first node can unicast the data packet according to the address information of the second node. Therefore, the present application does not need to additionally send special preamble data packets or generate additional control signaling to explore the path, and can obtain the address information of their respective parent nodes during the data packet transmission process, which can reduce the power consumption of the entire network system and improve the data transmission efficiency.

[0088] Since the first node stores the address information of the second node, and the number of second nodes can be multiple, in some embodiments of the present application, the first node can select one of the second nodes and unicast the second data packet to the second node according to the address information of the selected second node.

[0089] At this time, for the first node with multiple second nodes, it can use multiple different routing paths when forwarding data packets.

[0090] Furthermore, while sending data packets through multi-path routing, the entire network system can also further avoid data packet conflicts by means of multi-frequency point forwarding.

[0091] In some embodiments of the present application, each third data packet also carries an identification number of the second node; then the above-mentioned sending the second data packet to the second node according to the address information of the second node may include: determining the listening frequency band of the second node according to the identification number of the second node, and sending the second data packet to the second node according to the address information of the second node and the listening frequency band of the second node.

[0092] Specifically, in some embodiments of the present application, each terminal node can be pre-configured with two listening frequency bands. When the terminal node is working, it needs to listen to the data of the two listening frequency bands respectively. Among them, one is the public listening frequency band, and each terminal node can broadcast data packets based on the public listening frequency band; the other is the private listening frequency band, which is mainly used for unicast communication between terminal nodes. The staff can pre-configure a private listening frequency band associated with its own identification number for each terminal node. When the first node stores the storage address information of the second node, it can also store the identification number of the second node. When the first node has a first data packet carrying the content to be transmitted next time, the first node can determine the listening frequency band of the second node based on the identification number of the second node, and send the second data packet to the second node according to the address information of the second node and the listening frequency band of the second node. That is, the first node can send the second data packet to the second node on the private listening frequency band associated with the identification number of the second node. Correspondingly, the second node will also receive the second data packet on its own private listening frequency band.

[0093] Since each terminal node only maintains a fixed private listening frequency band, multiple child nodes of a terminal node may happen to use the same private listening frequency band before the terminal node. Therefore, data packets transmitted on the same private listening frequency band may still conflict.

[0094] Based on this, in some other embodiments of the present application, sending the second data packet to the second node according to the address information of the second node may further include: determining the signal frequency band for sending the second data packet, sending a handshake message carrying the signal frequency band to the second node according to the address information, and sending the second data packet to the second node according to the address information of the second node and the signal frequency band. Among them, the above handshake message is used to instruct the second node to listen for data packets on the signal frequency band.

[0095] Among them, the signal frequency band can be one of multiple frequency bands pre-set by the administrator.

[0096] In some embodiments of the present application, when the first node sends the second data packet, it can freely determine the signal frequency band for sending the second data packet, and then send a handshake message carrying the signal frequency band to the second node based on the public listening frequency band. After receiving the handshake message, the second node can feedback an Acknowledge character (ACK) data packet and switch the private listening frequency to the signal frequency band carried in the handshake message to listen for data packets on the signal frequency band. Therefore, the first node can flexibly select the signal frequency band used to send the second data packet.

[0097] It should be noted that, in order to prevent the same signal frequency band from being occupied, before sending a handshake message carrying the signal frequency band to the second node, the first node can first listen for whether there is data packet transmission on the signal frequency band. If there is no data packet transmission on the signal frequency band, it means that the signal frequency band is not occupied, so the first node can send a handshake message carrying the signal frequency band to the second node; if there is data packet transmission on the signal frequency band, it means that the signal frequency band has been occupied, then the first node needs to reselect a new signal frequency band and re-listen for whether there is data packet transmission on the signal frequency band until there is an unoccupied signal frequency band, and then send a handshake message carrying the unoccupied signal frequency band to the second node.

[0098] In the embodiments of the present application, by combining the multi-routing path and multi-band forwarding methods, it is possible to balance the data traffic of each routing path in the network system, improve the throughput of the entire network, and avoid the occurrence of data packet conflicts to the greatest extent.

[0099] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, some steps can be performed in other sequences.

[0100] As Figure 5 shown is a schematic structural diagram of a data transmission device 500 provided by an embodiment of the present application. The data transmission device 500 is configured on the first node.

[0101] Specifically, the data transmission device 500 may include:

[0102] A hierarchical instruction receiving unit 501, configured to receive a hierarchical instruction broadcast by the second node, where the second node is one of a plurality of nodes corresponding to the hierarchical information carried in the hierarchical instruction, and the plurality of nodes broadcast the hierarchical instruction with the same data content at the same time;

[0103] A hierarchical information determining unit 502, configured to determine the hierarchical information of the first node according to the hierarchical information carried in the hierarchical instruction broadcast by the second node;

[0104] A data packet generating unit 503, configured to generate a second data packet carrying the content to be transmitted and the hierarchical information of the first node if the first node has a first data packet carrying the content to be transmitted, where the content to be transmitted is the data content to be transmitted to the gateway node of the network system;

[0105] A data packet sending unit 504 is configured to send the second data packet to the second node, so that after receiving the second data packet, the second node forwards the content to be transmitted to the gateway node based on the hierarchical information of the first node carried in the second data packet.

[0106] In some embodiments of the present application, the above-mentioned data packet sending unit 504 may specifically be configured to: send the second data packet to the second node in a broadcast manner; or send the second data packet to the second node according to the address information of the second node.

[0107] In some embodiments of the present application, the above-mentioned data transmission device 500 may further include a storage unit, configured to: listen for a third data packet forwarded by the second node after receiving the first data packet, each of the third data packets carrying the hierarchical information of the second node and the address information of the second node; store the address information of the second node according to the hierarchical information of the first node and the hierarchical information of the second node carried in the third data packet.

[0108] In some embodiments of the present application, each third data packet further carries an identification number of the second node; the above-mentioned data packet sending unit 504 may further specifically be configured to: determine the listening frequency band of the second node according to the identification number of the second node; send the second data packet to the second node according to the address information of the second node and the listening frequency band of the second node.

[0109] In some embodiments of the present application, the above-mentioned data packet sending unit 504 may further specifically be configured to: determine the signal frequency band for sending the second data packet; send a handshake message carrying the signal frequency band to the second node according to the address information; the handshake message is used to instruct the second node to listen for data packets on the signal frequency band; send the second data packet to the second node according to the address information of the second node and the signal frequency band.

[0110] In some embodiments of the present application, the above-mentioned data transmission device 500 may further include a data packet receiving unit, configured to: receive a fourth data packet sent by a third node, the fourth data packet carrying the hierarchical information of the third node and the content to be transmitted; determine whether the fourth data packet is a data packet that the first node needs to forward according to the hierarchical information of the first node and the hierarchical information of the third node carried in the fourth data packet; if the fourth data packet is a data packet that the first node needs to forward, then use the fourth data packet as the first data packet and confirm that the first node has a first data packet carrying the content to be transmitted.

[0111] In some embodiments of the present application, the data transmission device 500 may further include a hierarchical instruction generating unit, configured to: generate a hierarchical instruction carrying the hierarchical information of the first node; broadcast the hierarchical instruction carrying the hierarchical information of the first node.

[0112] It should be noted that, for the convenience and brevity of description, the specific working process of the above data transmission device 500 may refer to Figures 1 to 4 the corresponding process of the method, which will not be elaborated here.

[0113] As Figure 6 shown, it is a schematic diagram of a terminal provided by an embodiment of the present application. This terminal can be used as a terminal node in a network system, that is, it can be the aforementioned first node.

[0114] The terminal 6 may include: a processor 60, a memory 61, and a computer program 62 stored in the memory 61 and executable on the processor 60, such as a data transmission program. When the processor 60 executes the computer program 62, the steps in the above embodiments of each data transmission method are implemented, such as Figure 1 the steps S101 to S104 shown. Alternatively, when the processor 60 executes the computer program 62, the functions of each module / unit in the above device embodiments are implemented, such as Figure 5 the hierarchical instruction receiving unit 501, the hierarchical information determining unit 502, the data packet generating unit 503, and the data packet sending unit 504 shown.

[0115] The computer program may be divided into one or more modules / units, and the one or more modules / units are stored in the memory 61 and executed by the processor 60 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the terminal.

[0116] For example, the computer program may be divided into: a hierarchical instruction receiving unit, a hierarchical information determining unit, a data packet generating unit, and a data packet sending unit.

[0117] The specific functions of each unit are as follows: a hierarchical instruction receiving unit, configured to receive a hierarchical instruction broadcast by a second node, where the second node is one of several nodes corresponding to the hierarchical information carried by the hierarchical instruction, and the several nodes broadcast the hierarchical instruction with the same data content at the same time; a hierarchical information determining unit, configured to determine the hierarchical information of the first node according to the hierarchical information carried by the hierarchical instruction broadcast by the second node; a data packet generating unit, configured to generate a second data packet carrying the content to be transmitted and the hierarchical information of the first node if there is a first data packet carrying the content to be transmitted in the first node, where the content to be transmitted is the data content to be transmitted to the gateway node of the network system; a data packet sending unit, configured to send the second data packet to the second node, so that after receiving the second data packet, the second node forwards the content to be transmitted to the gateway node based on the hierarchical information of the first node carried by the second data packet.

[0118] The terminal may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art can understand that Figure 6 These are merely examples of the terminal and do not constitute a limitation on the terminal. It may include more or fewer components than shown in the figure, or combine certain components, or have different components. For example, the terminal may also include input / output devices, network access devices, buses, etc.

[0119] The so-called processor 60 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, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0120] The memory 61 may be an internal storage unit of the terminal, such as the hard disk or memory of the terminal. The memory 61 may also be an external storage device of the terminal, such as a plug-in hard disk equipped on the terminal, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory 61 may also include both the internal storage unit of the terminal and the external storage device. The memory 61 is used to store the computer program and other programs and data required by the terminal. The memory 61 may also be used to temporarily store the data that has been output or will be output.

[0121] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is used as an example. In practical applications, the above-mentioned functions can be assigned to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of the present application. The specific working process of the units and modules in the above system can refer to the corresponding process in the foregoing method embodiment and will not be described herein again.

[0122] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0123] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0124] In the embodiments provided in this application, it should be understood that the disclosed device / terminal and method can be implemented in other ways. For example, the device / terminal embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.

[0125] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0126] In addition, in each embodiment of this application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0127] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above method embodiments of this application, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0128] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A data transmission method, characterized in that, Applied to a first node, the first node being configured in a network system, the method for transmitting data includes: Receiving a hierarchical instruction broadcast by a second node, the second node being one of a plurality of nodes corresponding to the hierarchical information carried by the hierarchical instruction, and the plurality of nodes broadcasting the hierarchical instructions with the same data content at the same time; Determining the hierarchical information of the first node according to the hierarchical information carried in the hierarchical instruction broadcast by the second node that is first received by the first node; Receiving a fourth data packet sent by a third node, the fourth data packet carrying the hierarchical information of the third node and the content to be transmitted; Determining whether the fourth data packet is a data packet that needs to be forwarded by the first node according to the hierarchical information of the first node and the hierarchical information of the third node carried in the fourth data packet; If the fourth data packet is a data packet that needs to be forwarded by the first node, then taking the fourth data packet as a first data packet and confirming that there is a first data packet carrying the content to be transmitted at the first node; If there is a first data packet carrying the content to be transmitted at the first node, then generating a second data packet carrying the content to be transmitted and the hierarchical information of the first node, where the content to be transmitted is the data content to be transmitted to the gateway node of the network system; Sending the second data packet to the second node, so that after receiving the second data packet, the second node forwards the content to be transmitted to the gateway node based on the hierarchical information of the first node carried in the second data packet.

2. The data transmission method according to claim 1, wherein The sending the second data packet to the second node includes: Sending the second data packet to the second node in a broadcast manner; Or, Sending the second data packet to the second node according to the address information of the second node.

3. The data transmission method according to claim 2, characterized in that, After sending the second data packet to the second node in a broadcast manner, it includes: Listening for a third data packet forwarded by the second node after receiving the first data packet, each third data packet carrying the hierarchical information and the address information of the second node; Storing the address information of the second node according to the hierarchical information of the first node and the hierarchical information of the second node carried in the third data packet.

4. The data transmission method according to claim 3, characterized in that, Each of the third data packets further carries the identification number of the second node; The sending the second data packet to the second node according to the address information of the second node includes: Determining the listening frequency band of the second node according to the identification number of the second node; Sending the second data packet to the second node according to the address information of the second node and the listening frequency band of the second node.

5. The data transmission method according to claim 2, wherein The sending the second data packet to the second node according to the address information of the second node includes: Determining the signal frequency band for sending the second data packet; Sending a handshake message carrying the signal frequency band to the second node according to the address information; the handshake message is used to instruct the second node to listen for data packets on the signal frequency band. Send the second data packet to the second node according to the address information of the second node and the signal frequency band.

6. The data transmission method according to any one of claims 1 to 5, characterized in that, After determining the hierarchical information of the first node, it further includes: Generate a hierarchical instruction carrying the hierarchical information of the first node; Broadcast the hierarchical instruction carrying the hierarchical information of the first node.

7. A data transmission device, characterized in that, Configured in the first node, the first node is configured in the network system, and the data transmission device includes: A hierarchical instruction receiving unit, configured to receive a hierarchical instruction broadcast by a second node, where the second node is one of several nodes corresponding to the hierarchical information carried by the hierarchical instruction, and the several nodes broadcast the hierarchical instruction with the same data content at the same time; A hierarchical information determining unit, configured to determine the hierarchical information of the first node according to the hierarchical information carried by the hierarchical instruction broadcast by the second node received first by the first node; A data packet receiving unit, configured to receive a fourth data packet sent by a third node, where the fourth data packet carries the hierarchical information of the third node and the content to be transmitted; determine whether the fourth data packet is a data packet that needs to be forwarded by the first node according to the hierarchical information of the first node and the hierarchical information of the third node carried by the fourth data packet; if the fourth data packet is a data packet that needs to be forwarded by the first node, then use the fourth data packet as the first data packet, and confirm that the first node has a first data packet carrying the content to be transmitted; A data packet generating unit, configured to, if the first node has a first data packet carrying the content to be transmitted, generate a second data packet carrying the content to be transmitted and the hierarchical information of the first node, where the content to be transmitted is the data content to be transmitted to the gateway node of the network system; A data packet sending unit, configured to send the second data packet to the second node, so that after receiving the second data packet, the second node forwards the content to be transmitted to the gateway node based on the hierarchical information of the first node carried by the second data packet.

8. A terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Dynamic self-organizing hierarchical routing method applied to wireless sensor network

    CN102711209A

  • Self-networking method and communication system based on tree network as well as node and gateway

    CN107579915A