Distributed ad hoc network communication method and device, electronic equipment and storage medium

Through the distributed ad hoc network communication method, the packet transmission path is optimized based on the binary tree structure, and the problem of insufficient transmission efficiency and stability of near-domain communication technology in complex environments is solved, and high-efficiency and low-latency large-scale network construction is achieved.

CN119233448APending Publication Date: 2024-12-31E SURFING IOT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411260179.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The existing near-domain communication technology lacks transmission efficiency and stability in complex environments, and the node scale is limited, which cannot meet the low latency requirements of high real-time applications. The end-to-end linkage efficiency is low, which loses spatial information between nodes.

Method used

The distributed self-network communication method is adopted to generate a total binary tree based on multiple nodes, and the nodes are numbered by mid-sequence traversal, and the packet transmission path is optimized. The response packets of the child node and the parent node are judged to stop transmission, and the signal strength and Transmission cost calculation optimization path, supporting large-scale network construction.

Benefits of technology

It improves the efficiency and stability of wireless communication, avoids central node routing scheduling, supports large-scale network construction, and realizes low latency and efficient data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119233448A_ABST
    Figure CN119233448A_ABST
Patent Text Reader

Abstract

The invention discloses a distributed ad hoc network communication method and device, electronic equipment and a storage medium, and relates to the technical field of communication, and the method comprises the steps: generating a total binary tree based on a plurality of nodes; numbering each node in the total binary tree by adopting inorder traversal; transmitting the data packet according to the serial number of the destination node and the serial number of the child node of the node until the data packet is transmitted to the destination node; before the response message of the father node is received, the response message of the child node is firstly received, and the node stops transmitting the data packet; when the serial number of the destination node is smaller than that of the node and a response message of the node with the serial number smaller than that of the father node is received, the node stops transmitting the data packet; and when the serial number of the destination node is greater than that of the node and a response message of the node with the serial number greater than that of the father node is received, the node stops transmitting the data packet. On the basis of the binary tree, the distributed advantage is fully exerted, routing scheduling of a center node is not needed, and the communication efficiency and stability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a distributed self-organizing network communication method, device, electronic device and storage medium. Background Art

[0002] With the rapid development of the Internet of Things and smart devices, the demand for short-range wireless communication between devices is increasing. Although traditional short-range communication technologies, such as Bluetooth, Zigbee and Wi-Fi, can meet certain application requirements, they still have some limitations in certain specific application scenarios, such as:

[0003] Transmission efficiency and stability: The current near-field communication protocols are often disturbed in terms of data transmission efficiency and stability when facing complex environments. For example, in industrial environments, metal equipment and electromagnetic interference can significantly reduce communication performance. Network scale: Most of the current near-field communication protocols have small node scales. In practice, wifi, zigbee, etc. support hundreds of nodes. Communication delay: Some applications with high real-time requirements, such as industrial automation and intelligent transportation systems, require extremely low communication delays. However, traditional near-field communication technologies may not be able to meet the low-latency requirements when dealing with a large number of devices communicating simultaneously. End-to-end linkage: Current technologies have less consideration of end-to-end scenarios. For example, the automatic communication of IP-based networking solutions and devices is mostly achieved through broadcast or multicast, which is inefficient and loses spatial information between nodes. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to propose a distributed ad hoc network communication method, device, electronic device and storage medium to improve the efficiency and stability of wireless communication.

[0005] To achieve the above object, an embodiment of the present application provides a distributed ad hoc network communication method, the method comprising the following steps:

[0006] Generate a total binary tree based on multiple nodes;

[0007] Using in-order traversal to number each node in the total binary tree;

[0008] Repeat the following steps until the data packet is transmitted to the destination node; when the number of the destination node is within the number range of the child nodes of the current node, the data packet is transmitted from the current node to the child nodes of the current node; when the number of the destination node is outside the number range of the child nodes of the current node, the data packet is transmitted from the current node to the parent node of the current node; wherein the node where the data packet is currently located is regarded as the current node;

[0009] The transmission process of the data packet also includes the following steps: before receiving the response message from the parent node, the node receives the response message from the child node first, then the node stops transmitting the data packet; when the number of the destination node is smaller than the number of the current node, and the node receives the response message from the node with a smaller number than the parent node, the node stops transmitting the data packet; when the number of the destination node is greater than the number of the current node, and the node receives the response message from the node with a larger number than the parent node, the node stops transmitting the data packet.

[0010] In some embodiments, the method further comprises the following steps:

[0011] When the node receives the data packet, it calculates the signal strength of the data packet;

[0012] If the signal strength is greater than a preset threshold, the data packet is transmitted from the local node to the backward node after waiting for a preset delay time;

[0013] Within the preset delay time, if any one of the relay data packet response, transmission suspension response or data packet arrival response sent by the backward node is received, the node stops transmitting the data packet.

[0014] In some embodiments, the method further comprises the following steps:

[0015] When the number of the destination node is outside the number range of the child nodes of the current node, check whether the number of the destination node is in the first number range or the second number range of the nearby nodes; wherein the nearby nodes are nodes that receive data sent by the current node and are excluding the parent node and the child nodes of the current node; the first number range is the number of all the child nodes of the current node, and the second number range is the number of all the child nodes of the nearby nodes;

[0016] If so, the data packet is transmitted from the local node to a nearby node;

[0017] If not, the data packet is transmitted from the current node to the parent node of the current node.

[0018] In some embodiments, the method comprises the following steps:

[0019] Calculate the transmission cost of the node according to the current relay data packet data of the node according to the preset period;

[0020] When there are multiple backward nodes at the current node, the data packet is distributed and transmitted to each of the backward nodes using the inverse of the transmission cost as a weight.

[0021] In some embodiments, the method comprises the following steps:

[0022] When any node fails or goes offline, the parent node and child nodes of the failed or offline node are used to jointly transmit the data packets transmitted by the failed or offline node;

[0023] When a new node is added to the total binary tree, the new node replaces the failed node at the position of the total binary tree or regenerates the total binary tree.

[0024] In some embodiments, generating a total binary tree based on multiple nodes comprises the following steps:

[0025] Determine several root nodes among multiple nodes;

[0026] Generate a sub-binary tree based on each of the root nodes;

[0027] The total binary tree is generated based on each of the sub-binary trees.

[0028] In some embodiments, the step of numbering each node in the total binary tree by using in-order traversal includes the following steps:

[0029] The sub-binary trees are used as subnets, and all nodes in each of the subnets are numbered respectively by in-order traversal, and each of the subnets is numbered by in-order traversal.

[0030] To achieve the above object, another aspect of the embodiment of the present application provides a distributed ad hoc network communication device, the device comprising:

[0031] A binary tree generation unit, used for generating a total binary tree based on a plurality of nodes;

[0032] A node numbering unit, used to number each node in the total binary tree using an in-order traversal;

[0033] The data packet transmission unit is used to repeatedly perform the following steps until the data packet is transmitted to the destination node; when the number of the destination node is within the number range of the child nodes of the current node, the data packet is transmitted from the current node to the child node of the current node; when the number of the destination node is outside the number range of the child nodes of the current node, the data packet is transmitted from the current node to the parent node of the current node; wherein the node where the data packet is currently located is regarded as the current node;

[0034] The transmission path optimization unit is used to further include the following steps in the transmission process of the data packet: before receiving the response message from the parent node, the node first receives the response message from the child node, then the node stops transmitting the data packet; when the number of the destination node is smaller than the number of the current node, and the node receives the response message from the node with a smaller number than the parent node, then the node stops transmitting the data packet; when the number of the destination node is greater than the number of the current node, and the node receives the response message from the node with a larger number than the parent node, then the node stops transmitting the data packet.

[0035] To achieve the above objective, another aspect of an embodiment of the present application provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above method when executing the computer program.

[0036] To achieve the above objective, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.

[0037] The embodiments of the present application include at least the following beneficial effects:

[0038] The present application can generate a total binary tree based on multiple nodes; use in-order traversal to number each node in the total binary tree; repeat the following steps until the data packet is transmitted to the destination node; when the number of the destination node is within the number range of the child nodes of this node, the data packet is transmitted from the current node to the child node of this node; when the number of the destination node is outside the number range of the child nodes of this node, the data packet is transmitted from the current node to the parent node of this node; wherein the node where the data packet is currently located is regarded as the current node; the data packet transmission process also includes the following steps: before receiving the reply message from the parent node, the reply message from the child node is received first, then the current node stops transmitting the data packet; when the number of the destination node is smaller than the number of the current node, and a reply message from a node with a smaller number than the parent node is received, then the current node stops transmitting the data packet; when the number of the destination node is larger than the number of the current node, and a reply message from a node with a larger number than the parent node is received, then the current node stops transmitting the data packet. This application is based on a binary tree, giving full play to the advantages of distribution, and does not require routing scheduling by a central node, thereby improving communication efficiency and stability. Moreover, this application does not rely on routing tables, and routing is negotiated between nodes, which can support large-scale network formation. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0040] Figure 1 A schematic diagram of a distributed ad hoc network communication method provided in an embodiment of the present application;

[0041] Figure 2 An example diagram of a self-organizing network structure provided in an embodiment of the present application;

[0042] Figure 3 A schematic diagram of the structure of each node before networking is provided in an embodiment of the present application;

[0043] Figure 4 A schematic diagram of the structure of each node after networking provided in an embodiment of the present application;

[0044] Figure 5 A schematic diagram of the structure of a self-organizing network after encoding provided in an embodiment of the present application;

[0045] Figure 6 A schematic diagram of a transmission path calculated entirely by a binary tree provided in an embodiment of the present application;

[0046] Figure 7 A schematic diagram of a binary tree combined with a jump node to calculate a transmission path provided in an embodiment of the present application;

[0047] Figure 8 A schematic diagram of discovering a jump node provided in an embodiment of the present application;

[0048] Fig. 9 An example diagram of node cost calculation and traffic diversion provided in an embodiment of the present application;

[0049] Fig.10 This is an example diagram of processing when a node goes offline provided in an embodiment of the present application;

[0050] Fig.11 An example diagram of cross-subnet communication provided for an embodiment of the present application;

[0051] Fig.12 A schematic diagram of the structure of a distributed ad hoc network communication device provided in an embodiment of the present application;

[0052] Fig.13 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.

[0054] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".

[0055] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0057] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations:

[0058] Self-Organizing Network (SON) is a network architecture that can automatically configure and manage network resources to adapt to changing environments and needs. The concept of self-organizing networks is widely used in wireless communication systems, especially in mobile networks and the Internet of Things (IoT).

[0059] Ad hoc network node: A member of an ad hoc network that can send, receive, and forward data between nodes. A node can be a pure network member and also a terminal device.

[0060] Network exit: The node that connects the ad hoc network to the external network and is responsible for connecting to other networks.

[0061] Signal Strength (RSSI): is a wireless communication term used to measure the strength of the received wireless signal. RSSI is usually measured in decibel milliwatts (dBm), which indicates the signal strength relative to 1 milliwatt.

[0062] Routing: The process of determining the path that a data packet takes from source to destination when transmitting data over a network.

[0063] Edge node: A node connected to each subnet, responsible for data exchange between subnets.

[0064] In view of the problems existing in the related art, the embodiments of the present application provide a distributed self-organizing network communication method, device, electronic device and storage medium. The technical solution of the present application includes: generating a total binary tree based on multiple nodes; numbering each node in the total binary tree by in-order traversal; repeating the following steps until the data packet is transmitted to the destination node; when the number of the destination node is within the number range of the child node of the present node, the data packet is transmitted from the present node to the child node of the present node; when the number of the destination node is outside the number range of the child node of the present node, the data packet is transmitted from the present node to the parent node of the present node; wherein, the node where the data packet is currently located is the present node; the transmission process of the data packet also includes the following steps: before receiving the reply message of the parent node, the reply message of the child node is received first, then the present node stops transmitting the data packet; when the number of the destination node is less than the number of the present node, and the reply message of the node with a smaller number than the parent node is received, then the present node stops transmitting the data packet; when the number of the destination node is greater than the number of the present node, and the reply message of the node with a larger number than the parent node is received, then the present node stops transmitting the data packet. This application is based on a binary tree, giving full play to the advantages of distribution, and does not require routing scheduling by a central node, thereby improving communication efficiency and stability. Moreover, this application does not rely on routing tables, and routing is negotiated between nodes, which can support large-scale network formation.

[0065] Reference Figure 1 The embodiment of the present application provides a distributed ad hoc network communication method, which may include but is not limited to S100 to S140, as follows:

[0066] S100: Generate a total binary tree based on multiple nodes.

[0067] Specifically, there may be multiple nodes within a certain range, and the nodes may be various types of communication devices. This embodiment may generate a binary tree based on each node as a total binary tree.

[0068] Furthermore, S100 may include:

[0069] Determine several root nodes among multiple nodes;

[0070] Generate a sub-binary tree based on each of the root nodes;

[0071] The total binary tree is generated based on each of the sub-binary trees.

[0072] It can be understood that this embodiment can first select several root nodes with a set probability, and then generate binary trees as sub-binary trees based on each root node and other nodes within its range, and the total binary tree is obtained after connecting each sub-binary tree.

[0073] S110: Numbering each node in the total binary tree by using in-order traversal.

[0074] Specifically, the in-order traversal number is that the number of the current node is greater than the numbers of all child nodes, and the number of the left child node is less than the number of the right child node.

[0075] Furthermore, S110 may include:

[0076] The sub-binary trees are used as subnets, and all nodes in each of the subnets are numbered respectively by in-order traversal, and each of the subnets is numbered by in-order traversal.

[0077] It can be understood that each sub-binary tree is a binary tree formed by a local network, so the sub-binary tree can be used as a subnet. First, all nodes in each subnet are numbered by in-order traversal, and then each subnet is treated as a node and numbered by in-order traversal.

[0078] S120: Repeat the following steps until the data packet is transmitted to the destination node; when the number of the destination node is within the sub-node number range of the current node, the data packet is transmitted from the current node to the sub-node of the current node; when the number of the destination node is outside the sub-node number range of the current node, the data packet is transmitted from the current node to the parent node of the current node; wherein the node where the data packet is currently located is regarded as the current node.

[0079] Specifically, if the number of the destination node is greater than or equal to the minimum number of the child nodes of this node, and less than or equal to the maximum number of the child nodes of this node, it means that the number of the destination node is within the child node number range of this node; otherwise, the number of the destination node is outside the child node number range of this node.

[0080] S130: The transmission process of the data packet also includes the following steps: before receiving the response message from the parent node, the node first receives the response message from the child node, then the node stops transmitting the data packet; when the number of the destination node is smaller than the number of the current node, and the node receives the response message from the node with a smaller number than the parent node, then the node stops transmitting the data packet; when the number of the destination node is greater than the number of the current node, and the node receives the response message from the node with a larger number than the parent node, then the node stops transmitting the data packet.

[0081] Taking into account that the data packet transmitted by this node is transmitted to all surrounding nodes, that is, in addition to the parent node, left child node and right child node of this node, the nearby nodes of this node can also receive the data packet. In this case, this embodiment can further optimize the data packet transmission path and may not transmit according to the path of the total binary tree, that is, jump transmission of data packets, thereby improving the transmission efficiency of data packets.

[0082] As another optional implementation, the embodiment of the present application may further include:

[0083] When the number of the destination node is outside the number range of the child nodes of the current node, check whether the number of the destination node is in the first number range or the second number range of the nearby nodes; wherein the nearby nodes are nodes that receive data sent by the current node and are excluding the parent node and the child nodes of the current node; the first number range is the number of all the child nodes of the current node, and the second number range is the number of all the child nodes of the nearby nodes;

[0084] If so, the data packet is transmitted from the local node to a nearby node;

[0085] If not, the data packet is transmitted from the current node to the parent node of the current node.

[0086] It can be understood that, in this embodiment, data packets can be transmitted through hopping nodes to improve the transmission efficiency of data packets.

[0087] Furthermore, the embodiment of the present application may also include the following steps:

[0088] When the node receives the data packet, it calculates the signal strength of the data packet;

[0089] If the signal strength is greater than a preset threshold, the data packet is transmitted from the local node to the backward node after waiting for a preset delay time;

[0090] Within the preset delay time, if any one of the relay data packet response, transmission suspension response or data packet arrival response sent by the backward node is received, the node stops transmitting the data packet.

[0091] Considering that if the distance between each node is short, after this node transmits the data packet, there is no need for the backward node of the next level to transmit the data packet, and the backward node of the second level can receive the data packet. Therefore, you can wait for the delay time first. If any one of the relay data packet response, transmission termination response or data packet arrival response sent by the backward node of the second level is received during the waiting process, it means that the data packet has been transmitted to the backward node of the second level, and this node can stop transmitting the data packet.

[0092] In order to reduce the situation where a single node transmits a large number of data packets within a certain period of time, the embodiment of the present application may further include the following steps:

[0093] Calculate the transmission cost of the node according to the current relay data packet data of the node according to the preset period;

[0094] When there are multiple backward nodes at the current node, the data packet is distributed and transmitted to each of the backward nodes using the inverse of the transmission cost as a weight.

[0095] Reasonably diverting data packets to various backward nodes according to the transmission cost can reduce the transmission pressure of a single node and improve transmission efficiency.

[0096] Considering that each node may be offline or fail, resulting in the loss of the total binary tree, thereby reducing the transmission efficiency, the embodiment of the present application may further include the following steps:

[0097] When any node fails or goes offline, the parent node and child nodes of the failed or offline node are used to jointly transmit the data packets transmitted by the failed or offline node;

[0098] When a new node is added to the total binary tree, the new node replaces the failed node at the position of the total binary tree or regenerates the total binary tree.

[0099] Next, the solution of the embodiment of the present application will be described in detail and explained in conjunction with specific application examples:

[0100] Figure 2 This is a diagram showing an example of a self-organizing network structure provided in this embodiment.

[0101] Specifically, this embodiment may include the following contents: communication method, structure of ad hoc network, network coding method, and network routing solution.

[0102] 1. Communication method:

[0103] The network adopts a unified mediation method, ASK / FSK / PSK / GFSK / OFDM / QAM are optional, and the appropriate method is selected according to the actual situation.

[0104] Each node uses the same encryption and decryption The nodes can coordinate with each other and automatically adjust the signal transmission power according to the node density.

[0105] Each node can automatically negotiate data and use fixed time slices, which does not conflict with data transmission. Before data transmission, the node ID can be converted into an address in the ad hoc network. The query capability of address conversion is generally undertaken by the exit node. The exit node will record the mapping relationship between the node ID and address within a certain range of the exit. When a node in the ad hoc network needs to send data to a fixed node, the node needs to query the exit node for the node address before transmitting. Each node can store the address of the node that needs to be contacted.

[0106] 2. The structure of ad hoc network: 1. Global structure 2. Subnet structure 3. Network exit.

[0107] Each root node first generates a binary tree structure subnet, and each subnet forms a binary tree structure with other subnets. Each subnet independently maintains the node management within the scope, fault recovery and other intelligent negotiation mechanisms. The two-level binary tree is a logical relationship. As the basis of the routing algorithm, the actual network is a grid-like structure, and the node can connect to all nodes within the nearby communication distance. In the two-layer tree structure, the exit node can be flexibly selected, and the pure intranet structure without an exit method is also supported.

[0108] For example, Figure 3 This is a schematic diagram of the structure of each node before networking. Figure 4 This is a schematic diagram of the structure of each node after networking.

[0109] 3. Network coding method:

[0110] Address Code:

[0111] This embodiment may use a non-IP network address, where the network address includes a node address and a multicast address.

[0112] The address is divided into long address and short address, the long address is 32 bits and the short address is 16 bits.

[0113] Short URL:

[0114] 1 bit: fixed value 0;

[0115] 2 bits: 0 node address 2 group report address;

[0116] 3-6 digits: subnet number, ranging from 0 to 15;

[0117] 7-16: Node number.

[0118] Long address:

[0119] 1 bit: fixed value 1;

[0120] 2 bits: 0 node address 2 group report address;

[0121] 3-14 bits: subnet number, value range 0-4096;

[0122] Bits 15-32: Node number, ranging from 0 to 262143.

[0123] Data frame encoding:

[0124] During data transmission, the data packet header contains the source address, destination address, relay address, and expected address, and the above address parameters are used for routing path selection.

[0125] 4. Network routing solution:

[0126] 4.1 Generation of routing and addresses:

[0127] After the subnet is formed, the in-order traversal method is used to number each node in the subnet from small to large, and each node records the minimum and maximum values ​​of its own child node numbers.

[0128] All subnets are also numbered in order from small to large using the in-order traversal method. The subnet number and node number required for the root node address have been generated.

[0129] For example, Figure 5 This is a schematic diagram of the encoded ad hoc network structure.

[0130] 4.2 Data addressing:

[0131] 4.2.1 Basic addressing:

[0132] The data transmission within the subnet uses the characteristics of the binary tree to determine whether the destination node is in the child nodes of this node. If not, search upward. If the following conditions are met, the destination node is in the child nodes of this node: when the number of the destination node is greater than or equal to the minimum number of the subnet where the node is located, and less than or equal to the maximum number of the subnet where the node is located, search for the destination node in each child node of this node. In the child node search process, if the number of the destination node is less than the number of this node, search for the child node on the left; if the number of the destination node is greater than the number of this node, search for the child node on the right. When the destination node is found, compare the device ID of the destination node with that of this node to see if it matches. If it matches, the destination node receives the data packet; if it does not match, it is forwarded to the nearest node.

[0133] For example, Figure 6 This is a schematic diagram of the transmission path calculated entirely by a binary tree. For transmitting a data packet from node 19 to node 1, the path is 19, 20, 21, 23, 18, 10, 4, 2, 1.

[0134] 4.2.2 Subnet path optimization:

[0135] When this node transmits a data packet, in addition to the parent node, left child node, and right child node of this node, nearby nodes may receive the data packet. If a nearby node receives a data packet, it can determine whether the destination node is in its own child node. If so, it transmits the data packet to the child node. When other nodes receive a data packet of jump transmission, the data transmission is stopped. The conditions for stopping transmission include: 1. Stop transmission when the response message from the child node is received first, that is, the data packet has skipped the parent node and transmitted to the destination node. 2. When the number of the destination node is smaller than that of this node, and a response from a node with a smaller number than the parent-child node is received, the transmission is stopped. 3. When the number of the destination node is larger than that of this node, and a response from a node with a larger number than the parent-child node is received, the transmission is stopped. Each node records the destination and ID of the last few broadcast messages received, and stops transmission when the broadcast message has been transmitted by other nodes.

[0136] In wireless transmission, the actual transmission range of a signal will exceed multiple nodes of the total binary tree. When a node receives the RSSI of a data packet, it is calculated according to the RSSI optimization formula f. If the RSSI is greater than the preset threshold, the node that receives the data packet will generate a delay time T, and then transmit to the next node after time T. If any of the responses of the backward node relaying the data packet, terminating the transmission, and the data packet arriving is received during the delay time, the backward transmission of the data packet will be stopped.

[0137] For example, Figure 7 This is a schematic diagram of calculating the transmission path using a binary tree combined with jump nodes. The path for transmitting a data packet from node 19 to node 1 is 19, 21, 18, 2, 1.

[0138] 4.2.3 Routing hop discovery:

[0139] The node sends the child node number range S1 (i.e., the first number range) of the node and the child node S2 (i.e., the second number range) of the next hop node passing through the node to nearby nodes through the network coordination channel. The node records the S1 and S2 of nearby non-child and non-parent nodes according to its own memory usage. When receiving a data packet, if the destination is not a child node of the node, first check the nearby S1 and S2. If the destination node is in S1 or S2, transmit the data packet to the nearby node, otherwise transmit the data packet to the parent node.

[0140] For example, Figure 8 As a schematic diagram of discovering hopping nodes, node 23 can discover hopping nodes 15, 17, 13, 8, and 9. Taking node 8 as an example of a secondary hopping node, the hopping nodes of node 8 include 6, 4, 5, and 11, and the path range of node 8 includes 5 and 8. Therefore, when node 23 transmits a data packet to node 5, the path of the binary tree is 23, 18, 10, 4, 7, 6, and 5, and the hopping path is 23, 8, and 5.

[0141] 4.2.4 Diversion and cost calculation:

[0142] Each node periodically calculates the cost of the node, using the relay packet data as the main parameter, and synchronizes it with the surrounding nodes in the network negotiation channel. When there are multiple paths, the inverse of the cost is used as the weight for diversion.

[0143] For example, Fig. 9 This is an example diagram of node cost calculation and traffic diversion.

[0144] 4.2.5 Node failure and backup node:

[0145] When a node is temporarily offline, its parent, left, and right nodes share the relay traffic and report to the egress through the negotiated channel. Fig.10 This is an example diagram of processing when a node goes offline. When node 18 goes offline, its parent node 10, left child node 13, and right child node 23 together form a virtual node to bear the traffic originally relayed by node 18.

[0146] After the node is back online, it will directly use the original number and self-organizing network relationship. When a new node is added, it will directly replace the faulty node. When the fault exceeds the time threshold, the total binary tree will be fine-tuned locally. The steps of fine-tuning are as follows:

[0147] When there is a node that can directly connect to the parent, left, and right nodes, the node is used to replace the faulty node. At this time, only the node and the faulty node are swapped in the network. When the surrounding left and right nodes are full, the child nodes need to be disbanded for re-growth and re-encoding.

[0148] 4.2.6 Cross-subnet communication:

[0149] The addressing of the subnet adopts the same implementation method as the node addressing. The node can store the edge nodes of the subnet that connect to other subnets, and record the left and right parent relationships and ranges of nearby subnets and other subnets, and then transmit the data packets that do not belong to the subnet where the node is located to the most appropriate subnet, and finally transmit the data packets to the destination node.

[0150] For example, Fig.11 The following is an example diagram of cross-subnet communication.

[0151] In the related art, the protocol design of near-area networking is complex, the implementation cost is high, the configuration is complex, and there are many problems in the project implementation. Compared with the related art, this embodiment performs a distributed design for the Internet of Things scenario and constructs a large regional network in a simple way. Compared with the related art, the beneficial effects of this embodiment include:

[0152] 1. The routing method based on binary tree gives full play to the advantages of distribution. It does not require routing scheduling of central nodes. Routing is negotiated by nodes and points, which can support large-scale network formation. The logical structure of binary tree and mesh structure are combined to obtain self-organizing network. The topological structure of binary tree is used as the basis of routing, which improves the transmission efficiency of data. Developing redundant paths based on binary tree can ensure traffic balance.

[0153] 2. The routing algorithm is simple, does not rely on routing tables, and has low hardware requirements, so it has the characteristics of lower power consumption and lower cost.

[0154] 3. The self-organizing network of this embodiment has a grid network and does not rely on flooding transmission mode, realizing directional data transmission and intelligent linkage with devices within the communication distance. For example, nodes of technologies such as WIFI or ZigBee need to use multicast technology for broadcasting, which is very inefficient. However, the nodes of this embodiment can automatically subscribe to the events of the attached nodes to realize intelligent collaboration.

[0155] 4. The data signal strength is not lost during data transmission, and intelligent collaboration with spatial information can be achieved based on the signal strength.

[0156] Reference Fig.12 The embodiment of the present application further provides a distributed self-organizing network communication device, which can implement the above-mentioned distributed self-organizing network communication method, and the device includes:

[0157] A binary tree generation unit, used for generating a total binary tree based on a plurality of nodes;

[0158] A node numbering unit, used to number each node in the total binary tree using an in-order traversal;

[0159] The data packet transmission unit is used to repeatedly perform the following steps until the data packet is transmitted to the destination node; when the number of the destination node is within the number range of the child nodes of the current node, the data packet is transmitted from the current node to the child node of the current node; when the number of the destination node is outside the number range of the child nodes of the current node, the data packet is transmitted from the current node to the parent node of the current node; wherein the node where the data packet is currently located is regarded as the current node;

[0160] The transmission path optimization unit is used to further include the following steps in the transmission process of the data packet: before receiving the response message from the parent node, the node first receives the response message from the child node, then the node stops transmitting the data packet; when the number of the destination node is smaller than the number of the current node, and the node receives the response message from the node with a smaller number than the parent node, then the node stops transmitting the data packet; when the number of the destination node is greater than the number of the current node, and the node receives the response message from the node with a larger number than the parent node, then the node stops transmitting the data packet.

[0161] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0162] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned distributed ad hoc network communication method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0163] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0164] See also Fig.13 , Fig.13 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0165] The processor 1301 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0166] The memory 1302 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1302 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1302, and the processor 1301 is called to execute the distributed ad hoc network communication method of the embodiment of this application;

[0167] Input / output interface 1303, used to implement information input and output;

[0168] The communication interface 1304 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

[0169] A bus 1305 that transmits information between the various components of the device (e.g., the processor 1301, the memory 1302, the input / output interface 1303, and the communication interface 1304);

[0170] The processor 1301 , the memory 1302 , the input / output interface 1303 and the communication interface 1304 are connected to each other in communication within the device via a bus 1305 .

[0171] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned distributed self-organizing network communication method is implemented.

[0172] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0173] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0174] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0175] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0176] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0177] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0178] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0179] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0180] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0182] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0183] If the integrated 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, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0184] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A distributed ad hoc network communication method, characterized in that: The method comprises the following steps: Generate a total binary tree based on multiple nodes; Using in-order traversal to number each node in the total binary tree; Repeat the following steps until the data packet is transmitted to the destination node; when the number of the destination node is within the number range of the child nodes of the current node, the data packet is transmitted from the current node to the child nodes of the current node; when the number of the destination node is outside the number range of the child nodes of the current node, the data packet is transmitted from the current node to the parent node of the current node; wherein the node where the data packet is currently located is regarded as the current node; The transmission process of the data packet also includes the following steps: before receiving the response message from the parent node, the node receives the response message from the child node first, then the node stops transmitting the data packet; when the number of the destination node is smaller than the number of the current node, and the node receives the response message from the node with a smaller number than the parent node, the node stops transmitting the data packet; when the number of the destination node is greater than the number of the current node, and the node receives the response message from the node with a larger number than the parent node, the node stops transmitting the data packet.

2. A distributed ad hoc network communication method according to claim 1, characterized in that: The method further comprises the following steps: When the node receives the data packet, it calculates the signal strength of the data packet; If the signal strength is greater than a preset threshold, the data packet is transmitted from the local node to the backward node after waiting for a preset delay time; Within the preset delay time, if any one of the relay data packet response, transmission suspension response or data packet arrival response sent by the backward node is received, the node stops transmitting the data packet.

3. A distributed ad hoc network communication method according to claim 1, characterized in that: The method further comprises the following steps: When the number of the destination node is outside the number range of the child nodes of the current node, check whether the number of the destination node is in the first number range or the second number range of the nearby nodes; wherein the nearby nodes are nodes that receive data sent by the current node and are excluding the parent node and the child nodes of the current node; the first number range is the number of all the child nodes of the current node, and the second number range is the number of all the child nodes of the nearby nodes; If so, the data packet is transmitted from the local node to a nearby node; If not, the data packet is transmitted from the current node to the parent node of the current node.

4. A distributed ad hoc network communication method according to claim 1, characterized in that: The method comprises the following steps: Calculate the transmission cost of the node according to the current relay data packet data of the node according to the preset period; When there are multiple backward nodes at the current node, the data packet is distributed and transmitted to each of the backward nodes using the inverse of the transmission cost as a weight.

5. A distributed ad hoc network communication method according to claim 1, characterized in that: The method comprises the following steps: When any node fails or goes offline, the parent node and child nodes of the failed or offline node are used to jointly transmit the data packets transmitted by the failed or offline node; When a new node is added to the total binary tree, the new node replaces the failed node at the position of the total binary tree or regenerates the total binary tree.

6. A distributed ad hoc network communication method according to claim 1, characterized in that: The method of generating a total binary tree based on multiple nodes comprises the following steps: Determine several root nodes among multiple nodes; Generate a sub-binary tree based on each of the root nodes; The total binary tree is generated based on each of the sub-binary trees.

7. A distributed ad hoc network communication method according to claim 6, characterized in that: The method of numbering each node in the total binary tree by in-order traversal includes the following steps: The sub-binary trees are used as subnets, and all nodes in each of the subnets are numbered respectively by in-order traversal, and each of the subnets is numbered by in-order traversal.

8. A distributed ad hoc network communication device, characterized in that: The device comprises: A binary tree generation unit, used for generating a total binary tree based on a plurality of nodes; A node numbering unit, used to number each node in the total binary tree using an in-order traversal; The data packet transmission unit is used to repeatedly perform the following steps until the data packet is transmitted to the destination node; when the number of the destination node is within the number range of the child nodes of the current node, the data packet is transmitted from the current node to the child node of the current node; when the number of the destination node is outside the number range of the child nodes of the current node, the data packet is transmitted from the current node to the parent node of the current node; wherein the node where the data packet is currently located is regarded as the current node; The transmission path optimization unit is used to further include the following steps in the transmission process of the data packet: before receiving the response message from the parent node, the node first receives the response message from the child node, then the node stops transmitting the data packet; when the number of the destination node is smaller than the number of the current node, and the node receives the response message from the node with a smaller number than the parent node, then the node stops transmitting the data packet; when the number of the destination node is greater than the number of the current node, and the node receives the response message from the node with a larger number than the parent node, then the node stops transmitting the data packet.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements a distributed ad hoc network communication method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, a distributed ad hoc network communication method as claimed in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Order-preserving encryption method with low adjustment rate for cloud computing environment

    CN107292192A

  • Table look-up method and device based on binary tree, equipment, storage medium and vehicle

    CN117294647A

  • Ad hoc network

    EP2930976A1