Application method through ad hoc network protocol
Through the fully peer Mesh structure and master-slave communication mechanism, the problem of fixed center and pre-set device functions in the existing technology is solved, and the centerless, dynamic adaptive network construction and communication is realized, which is suitable for complex and special scenarios.
Patent Information
- Application Number
- CN202411825199.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-12-12
AI Technical Summary
In the prior art, the ad hoc network protocol stack needs to set up device functions in advance, resulting in a fixed central node in the network, making the network inflexible, and in fixed application scenarios where the device location remains unchanged, the advantages of ad hoc network no longer exist, but it is time-consuming and resource-intensive.
Through the fully peer Mesh structure networking, all nodes are completely peer-to-peer, and they collaborate with each other to complete network establishment, routing forwarding and communication; they divide the same equipment in different regions or different devices in the same region into different networks, distinguish them through network IDs, and use different channels for physical isolation in different networks; data interaction with broadcast communication through unicast communication in a single network, broadcast communication is used to use master-slave communication mechanism, and point-to-point communication is performed through regulatory terminal modules.
The networking method is implemented without the need for fixed centers and pre-set device types, so that all nodes in the network can independently form and join the network without manual intervention, and can still operate normally after node failure. It has dynamic adaptability and is suitable for complex and special scenarios.
Smart Images

Figure CN119676641A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of self-organizing networks, and in particular relates to an application method through a self-organizing network protocol. Background Art
[0002] Currently, building a complete Zigbee network includes two steps: network initialization and node (router or terminal) joining the network. The standard Zigbee network protocol includes a coordinator, a router, and a terminal node. In addition to the coordinator, building a Zigbee network only requires a router or a terminal node.
[0003] In a network, the short address of each device must be unique. When a node joins the network, it is assigned by its parent node and communicates using the short address. For the coordinator, the short address is usually set to 0x0000. After completing the above steps, the Zigbee mesh network is successfully initialized, and then waits for other nodes to join. There are two steps for a node to join the network: connecting to the coordinator and connecting to the network through an existing parent node. Summary of the invention
[0004] The present invention proposes an application method through a self-organizing network protocol, which solves the problem that the existing protocol stack in the prior art needs to pre-set device functions, and all devices cannot have the same function, which may lead to the defect that the network has a fixed central node, making the network inflexible; and for fixed application scenarios, the location of the device remains unchanged, the advantages of the self-organizing network no longer exist, but the time and resources consumed by the self-organizing network are still high.
[0005] The technical solution of the present invention is implemented as follows: an application method through a self-organizing network protocol, the method comprising the following steps: S1: networking through a fully peer-to-peer Mesh structure, all nodes are completely peer-to-peer, and cooperate with each other to complete network formation, routing forwarding and communication; S2: dividing the same devices in different areas or different devices in the same area into different networks, distinguishing different networks through network IDs, and using different channels in different networks for physical network isolation; S3: a single network interacts with data through unicast communication and broadcast communication. When unicast communication is selected, unicast communication is performed through a unique ID set in each device as a communication address; S4: when broadcast communication is used, interaction is performed through a master-slave communication mechanism, the communication is initiated by a set host, and interaction is performed through nodes. The nodes wait for the host command to respond, and the slave end does not exchange data with other slave nodes; S5: when the supervisory end module is running, it does not participate in the network access process, and exchanges data through a point-to-point communication mechanism that quickly binds the slave and communicates with the communication. The host manages the node through a management process, and adjusts the node status according to the host's needs to complete the data interaction between the host and the slave.
[0006] Currently, the general process of network initialization is as follows:
[0007] 1) Determine the network coordinator. First determine whether the node is an FFD node, and then determine whether the FFD node is in other networks or whether there is already a coordinator in the network. Through active scanning, send a beacon request command (Beaconrequest command), and then set a scanning period. If no beacon is detected within the scanning period, it is considered that the FFD has no coordinator in its POS. At this time, you can establish your own Zigbee network and continuously generate beacons and broadcast them as the coordinator of this network.
[0008] 2) Perform channel scanning. This includes two processes: energy scanning and active scanning. First, perform energy detection on the specified channel or the default channel to avoid possible interference. Sort the channels in ascending order based on the measured energy values, discard channels whose energy values exceed the allowable energy level, select channels with allowable energy levels and mark them as available channels. Then perform active scanning to search for network information within the communication radius of the node. This information is broadcast in the network in the form of beacon frames. Nodes obtain these beacon frames through active channel scanning, and then find the best and relatively quiet channel based on this information. Select a channel based on the recorded results. The channel should have the least Zigbee network, preferably no Zigbee devices. During active scanning, the mac layer will discard all frames except beacons received by the phy layer data service.
[0009] 3) Configure network parameters (set network ID). After finding a suitable channel, the coordinator will select a network identifier (PAN ID, value <= 0x3FFF) for the network. This ID must be unique in the channel used and cannot conflict with other Zigbee networks. The PAN ID can be obtained by listening to the IDs of other networks and then selecting an ID that will not conflict. You can also manually specify the scan channel and then determine the PAN ID that does not conflict with other networks. There are two address modes in the Zigbee network: extended address (64 bits) and short address (16 bits). The extended address is assigned by the IEEE organization and is used for unique device identification; the short address is used for device identification in the local network.
[0010] As a preferred implementation, the Mesh structure networking in step S1 adopts a full peer-to-peer network state network protocol stack, and uses a discrete routing algorithm and encrypted transmission data at the bottom layer and during data transmission to ensure the security of transmitted data. Through the Mesh structure networking, only adjacent information is recorded, stored and updated during networking.
[0011] As a preferred implementation, in step S2, several routing nodes are set in different networks, and the routing nodes have the autonomy to choose the next hop for transmitting data packets. When the network topology changes and the path is lost, the routing nodes will try their best to transmit it to the optimal next hop node.
[0012] As a preferred implementation, in step S2, when performing physical isolation, isolation is performed by setting a physical channel. When setting the physical channel, the user can set the range to 0x00~0x7F. When the highest bit 7 of the user-set value is set to 1, the values of bit0~bit6 are invalid, and the channel is automatically configured according to the network ID.
[0013] As a preferred implementation, when broadcast communication is adopted in step S4, if the Zigbee module is set as the host side, data forwarding is performed according to the address specified by the collector, and when the slave side module is running, it only accepts data from the host side and the supervisor side, and forwards the data to each other, and the slave side does not exchange data with other slave nodes.
[0014] As a preferred implementation, the management process of the host in step S5 is as follows: S51: first perform a reset and power-on serial port adapter operation, and then synchronize the list; S52: determine the connection status of the test whitelist node, update its connection status, and update the topology relationship. After updating the topology relationship, cache the original topology relationship; S53: after completing the topology relationship update, the host sends a heartbeat process, followed by data communication processing, and then updates the connection status while performing data communication processing; S54: finally enter the network maintenance process.
[0015] As a preferred implementation, the node includes three states, state one is off-network, unregistered state, state two is off-network, registered state, and state three is on-network, registered state; where off-network means that the node has not found the host heartbeat since power-on, has not tested the host connection or the host connection test has failed; unregistered means that the node has no host information record saved and is a blank node; whether the node is on the network is based on the recorded host and network information, and whether the host exists, thereby confirming whether the local machine has been on the network, and at the same time, the host is notified of the network status of the node through this process.
[0016] After adopting the above technical solution, the beneficial effects of the present invention are as follows: based on the existing protocol stack, the device functions need to be pre-set, and all devices cannot have the same function, resulting in the defect that the network has a fixed central node, making the network inflexible. The present invention provides a networking method based on ZigBee that does not require a fixed center and pre-set device types, so that all nodes can independently form and join the network without any human intervention and ensure that the network can still operate normally after any node failure occurs. In the present invention, each device can dynamically identify network information and dynamically adjust its own identity to work normally, and dynamic fusion can also be achieved in multiple networks so that network information does not cross. Therefore, the present invention can dynamically and adaptively form a centerless dynamic network in complex environments and special scenarios, ensuring that the network can still communicate normally in the case of dynamic failures without any human intervention. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0018] Figure 1 This is a diagram of the full peer-to-peer distributed network structure of the present invention;
[0019] Figure 2 This is a network structure diagram of the invention's rapid topology adaptation (when a node moves, a new path can be quickly established);
[0020] Figure 3 This is a network structure diagram of the fast path repair (when the node path fails, the node directly reroutes) of the present invention;
[0021] Figure 4 This is a schematic diagram of network division of the present invention;
[0022] Figure 5 This is a host management flow chart of the present invention;
[0023] Figure 6 This is a flowchart of node registration and network access processing of the present invention. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] Example:
[0026] like Figures 1 to 6 As shown, an application method through a self-organizing network protocol, the method includes the following steps: S1: networking through a fully peer-to-peer Mesh structure, all nodes are completely peer-to-peer, and cooperate with each other to complete network formation, routing forwarding and communication; S2: dividing the same devices in different areas or different devices in the same area into different networks, distinguishing different networks through network IDs, and using different channels in different networks for physical network isolation; S3: a single network interacts with data through unicast communication and broadcast communication. When unicast communication is selected, unicast communication is performed through the unique ID set in each device as the communication address; S4: when broadcast communication is used, interaction is performed through a master-slave communication mechanism, the communication is initiated by the set host, and interaction is performed through the nodes. The nodes wait for the host command to respond, and the slave end does not exchange data with other slave nodes; S5: when the supervisory end module is running, it does not participate in the network access process, and exchanges data through a point-to-point communication mechanism that quickly binds the slave and communicates. The host manages the node through the management process, and adjusts the node status according to the host's needs to complete the data interaction between the host and the slave.
[0027] This application document adopts a discrete routing algorithm, which has fast networking speed, fast network topology response, efficient and stable communication; it uses encrypted transmission in the underlying layer and during data transmission, and the data transmission is safe and reliable.
[0028] Different from the traditional Zigbee self-organizing network protocol, by adopting a fully peer-to-peer Mesh structure, all nodes are completely equal and work together to complete network formation, routing forwarding and communication. It adopts a distributed routing algorithm. When networking, it only records, stores and updates neighbor information. Therefore, it has the following characteristics: 1. Large network capacity and convenient network expansion; 2. Rapid response to topology changes and strong adaptability to poor signal environment. Fast path repair speed, high data transmission efficiency and reliability; 3. Support rapid changes and adaptation of network topology; 4. Support fast routing repair; 5. The communication process is not sensitive to routing changes.
[0029] For the convenience of management, in networking applications, the same devices in different areas or different devices in the same area are usually divided into different networks. In this way, devices in the same network can communicate with each other, while devices in different networks are isolated from each other. Use "network ID" to uniquely distinguish different networks. If the "network ID" is different, then logically, devices with different "network IDs" are completely isolated. In order to further isolate different network devices, it also supports setting different channels to achieve physical network isolation. When setting the physical channel, the user can set the range: 0x00~0x7F. When the highest bit 7 of the user-set value is set to 1, the values of bit0~bit6 are invalid, and the module will automatically configure the channel according to the "network ID". By default, the channel value is 0x80. The module logically divides the network uniquely according to the "network ID" and automatically uses different (or the same) channels to isolate the network physically.
[0030] Supports unicast communication and broadcast communication. When unicast communication is performed, the destination address needs to be specified. Therefore, a unique ID is assigned to each device, which is called the "local ID". When performing unicast communication, the "local ID" of the destination ID is specified as the destination address to achieve unicast communication. The specific network division is as follows Figure 4 shown.
[0031] Figure 4 The available channels shown in the table are to physically divide different nodes, the network ID will logically divide different nodes, and the local ID and destination ID will specify the sender and receiver. For practical applications, the above features are not fully adapted. There are mainly the following problems. If there are too many nodes initiating communication at the same time in the network, the network will be blocked or lose data. In some applications, network authorization is required, and unnecessary nodes are not allowed to participate in communication. It is hoped that the nodes can be automatically configured and automatically divided into different networks and channels without user participation. (Dividing the network well can avoid overcrowding in the same area). Some communications do not require cross-routing and only need to be carried out locally. In order to adapt to the above situation, this module has a built-in network management function. The master-slave communication mechanism is the communication method of most data acquisition systems at present. Each operation process of it is initiated by the host, and the node only waits for the host command and responds. Therefore, in the network, it can be guaranteed that only one node is communicating at any time, thereby ensuring the stability of the network. If the Zigbee module is set as the host end, it forwards data according to the address specified by the collector. When the slave end module is running, it only accepts data from the host end and the supervisor end, and forwards data to each other. The slave node does not communicate data with other slave nodes.
[0032] When the supervisory module is running, it does not participate in the network access process, nor does it need to perform multi-relay routing forwarding. Therefore, the supervisory communication adopts a point-to-point communication mechanism that quickly binds the slave and communicates to exchange data. This module is based on the HYXQ-053B protocol stack and supports both routing and non-routing communication methods. For this solution, this design uses a master-slave communication mechanism + point-to-point communication mechanism to combine with each other. The host management network host completes the following functions:
[0033] 1. Generate a unique and random network ID and set the network ID of the managed node to this ID.
[0034] 2. Send the host heartbeat so that the node can actively try to connect.
[0035] 3. Manage the whitelist to allow nodes with network access permissions to join the network.
[0036] 4. Management proactively reports and allows all devices to access the network as required.
[0037] 5. Manage and update the online status of the node. The host management process is as follows Figure 5 shown.
[0038] In the step S1, the Mesh structure networking adopts a full peer-to-peer network state network protocol stack, and adopts encrypted data transmission through a discrete routing algorithm and in the underlying layer and data transmission process to ensure the security of the transmitted data. Through the Mesh structure networking, only adjacent information is recorded, stored and updated during networking.
[0039] In step S2, several routing nodes are set in different networks. The routing nodes have the autonomy to choose the next hop for transmitting data packets. When the network topology changes and the path is lost, the routing nodes will try their best to transmit it to the optimal next hop node.
[0040] In the step S2, when physical isolation is performed, isolation is performed by setting a physical channel. When setting the physical channel, the user can set the range to 0x00 to 0x7F. When the highest bit 7 of the user-set value is set to 1, the values of bit 0 to bit 6 are invalid, and the channel is automatically configured according to the network ID.
[0041] When broadcast communication is adopted in step S4, if the Zigbee module is set as the host end, data forwarding is performed according to the address specified by the collector, and when the slave end module is running, it only accepts data from the host end and the supervisor end, and forwards the data to each other, and the slave end does not exchange data with other slave nodes.
[0042] The management process of the host in step S5 is as follows: S51: first perform a reset and power-on serial port adapter operation, and then synchronize the list; S52: determine the connection status of the test whitelist node, update its connection status, and update the topology relationship. After updating the topology relationship, cache the original topology relationship; S53: after completing the topology relationship update, the host sends a heartbeat process, then performs data communication processing, and then updates the connection status while performing data communication processing; S54: finally enter the network maintenance process.
[0043] The node includes three states, state one is off-network and unregistered state, state two is off-network and registered state, and state three is on-network and registered state; where off-network means that the node has not found the host heartbeat, has not tested the host connection or has failed to test the host connection since it was powered on; unregistered means that the node has not saved the host information record and is a blank node; whether the node is on the network is based on the recorded host and network information, and the host is tested to see whether it exists, so as to confirm whether the machine has been on the network, and the host is notified of the network status of the node through this process. Off-network means that the node has not found the host heartbeat, has not tested the host connection or has failed to test the host connection since it was powered on. Unregistered means that the node has not saved the host information record and is a blank node. For an unregistered node, node access to the network refers to the process of searching for the host, requesting a connection and obtaining approval, and finally obtaining the corresponding network information.
[0044] For a registered node, node access means that it tests the existence of the host based on the recorded host and network information to confirm whether the node has accessed the network. At the same time, it notifies the host of the node's network access status through this process. If the node has been registered but not accessed the network, but its host test fails, after a specified number of retries, the node will think that the network information is incorrect or the host has been lost, and will enter the registration process.
[0045] The node access logic needs to be processed in conjunction with the host, and its logic is divided into node processing logic and host processing logic. This design supports two network access management methods: whitelist management and active reporting management. In order to better ensure the accuracy and reliability of network access, the registration process for network access is divided into two methods: whitelist registration and active reporting registration. When a node accesses the network, it is preferred to search for the host in whitelist mode. If it fails (and the time for accessing the network by active reporting is reached), it will start searching for hosts that support active reporting and access the network. That is, the priority of whitelist access is higher than active reporting.
[0046] like Figure 6As shown in the figure, this module uses a whitelist mechanism to manage the network and communication. When the whitelist manages the network, it is used to determine the legitimacy of the node. According to the whitelist given by the user (when reporting autonomously, if the network is successfully connected, the host will also add the node to the list), automatic networking is realized. When the network is working, only the nodes that exist in the host list can test the host status normally and realize data communication normally. During communication, the data sent by the node will be filtered by the whitelist, and the data that does not exist in the list will be ignored. The host sends data according to the whitelist, and the data request that does not exist in the list will return an error.
[0047] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An application method through a self-organizing network protocol, characterized in that: The method comprises the following steps: S1: Through the full peer-to-peer Mesh structure networking, all nodes are completely equal and work together to complete network establishment, routing forwarding and communication; S2: Divide the same devices in different areas or different devices in the same area into different networks, distinguish different networks by network ID, and use different channels in different networks for physical network isolation; S3: A single network exchanges data through unicast communication and broadcast communication. When unicast communication is selected, the unique ID set in each device is used as the communication address for unicast communication. S4: When broadcast communication is adopted, the interaction is carried out through the master-slave communication mechanism. The communication is initiated by the set host and interacted through the nodes. The nodes wait for the host command to respond, and the slave end does not exchange data with other slave nodes; S5: When the supervisory module is running, it does not participate in the network access process, and exchanges data through a point-to-point communication mechanism that quickly binds the slaves and communicates. The host manages the nodes through the management process, adjusts the node status according to the host's needs, and completes the data interaction between the host and the slaves.
2. The application method according to claim 1, characterized in that: In the step S1, the Mesh structure networking adopts a full peer-to-peer network state network protocol stack, and adopts encrypted data transmission through a discrete routing algorithm and in the underlying layer and data transmission process to ensure the security of the transmitted data. Through the Mesh structure networking, only adjacent information is recorded, stored and updated during networking.
3. The application method according to claim 1, characterized in that: In step S2, several routing nodes are set in different networks. The routing nodes have the autonomy to choose the next hop for transmitting data packets. When the network topology changes and the path is lost, the routing nodes will try their best to transmit it to the optimal next hop node.
4. The application method according to claim 1, characterized in that: In the step S2, when physical isolation is performed, isolation is performed by setting a physical channel. When setting the physical channel, the user can set the range to 0x00 to 0x7F. When the highest bit 7 of the user-set value is set to 1, the values of bit 0 to bit 6 are invalid, and the channel is automatically configured according to the network ID.
5. The application method according to claim 1, characterized in that: When broadcast communication is adopted in step S4, if the Zigbee module is set as the host end, data forwarding is performed according to the address specified by the collector, and when the slave end module is running, it only accepts data from the host end and the supervisor end, and forwards the data to each other, and the slave end does not exchange data with other slave nodes.
6. The application method according to claim 1, characterized in that: The management process of the host in step S5 is as follows: S51: Firstly, the serial port adapter operation of resetting and powering on is performed, and then the list is synchronized; S52: Determine the connection status of the test whitelist node, update its connection status, and update the topological relationship. After the topological relationship is updated, cache the original topological relationship; S53: After completing the topology update, the host sends a heartbeat process, then performs data communication processing, and then updates the connection status while performing the data communication processing; S54: Finally, enter the network maintenance process.
7. The application method according to claim 1, characterized in that: The node includes three states, state 1 is off-network and unregistered state, state 2 is off-network and registered state, and state 3 is on-network and registered state; off-network means that the node has not found the host heartbeat since it was powered on, has not tested the host connection or has failed to test the host connection; unregistered means that the node has no host information record saved and is a blank node; Whether the node is connected to the network is determined by testing the existence of the host based on the recorded host and network information, thereby confirming whether the local machine has been connected to the network. At the same time, this process notifies the host of the network status of the node.
Citation Information
Patent Citations
Active protection system for wireless self-organizing network
CN101355416A
Wireless Mesh network multicasting communication method of AC-AP (Access Controller-Access Point) framework
CN102158812A
Method for realizing peer-to-peer network based on IEEE (Institute of Electrical and Electronic Engineers) 802.15.4
CN102665247A
Micropower wireless network ad-hoc networking method based on multi-channel frequency hopping
CN103428899A
Networking method and system for software-defined wireless ad hoc network controlled by unmanned aerial vehicles
CN110167032A
Cited By
Networking main control equipment, networking sub-equipment and wireless networking establishment method
CN122227441A
Networking master device, networking sub-device and wireless networking establishment method
CN122227441B