Communication method and system of wireless ad hoc network
By adopting the time division multiple access channel access method in the wireless ad hoc network, the nodes communicate in the listening and sending mode according to the time frame period, which solves the implementation problem of the centerless network, realizes the decentralized wireless ad hoc network, and improves the communication reliability and network robustness.
Patent Information
- Application Number
- CN202510914756.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-09-16
AI Technical Summary
Existing wireless ad hoc network technology cannot achieve a truly decentralized network, which requires unified clocks and central nodes or virtual central nodes between nodes, affecting the decentralization and efficiency of the network.
Using the time division multiple access channel access method, nodes communicate according to the time frame period, including listening mode and sending mode. The data sending time is determined by the node neighbor table to avoid channel conflicts and realize decentralized wireless ad hoc network.
It realizes a decentralized wireless ad hoc network, which does not require time slot synchronization and complex protocols between nodes, improves communication reliability and network robustness, and supports mesh network structure.
Smart Images

Figure CN120659161A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of wireless ad hoc networks, and in particular to a communication method for wireless ad hoc networks and a communication system for wireless ad hoc networks. Background Art
[0002] Ad hoc wireless network, also known as multi-hop wireless network, is a multi-hop temporary centerless network composed of a group of mobile terminal nodes with wireless communication transceivers. It can quickly build a mobile communication network at any time and any place, and does not require the support of existing information infrastructure. Each terminal in the network can move freely and has equal status.
[0003] Time Division Multiple Access (TDMA) is a commonly used channel access method in wireless ad hoc networks. TDMA channel access requires maintaining a common time reference to achieve conflict-free TDMA communication. In wireless ad hoc networks, nodes lack a unified clock, while TDMA channel access requires a unified clock. Therefore, traditional methods use a central node or automatically construct a virtual central node to unify clocks. However, these wireless ad hoc network communication methods do not achieve a truly decentralized network. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide a communication method for a wireless ad hoc network and a communication system for a wireless ad hoc network, so as to solve the problem that a truly complete decentralized network cannot be achieved in the prior art.
[0005] To achieve the above-mentioned object, the first aspect of the present application provides a communication method for a wireless ad hoc network, which is applied to the data link layer of the wireless ad hoc network, wherein the wireless ad hoc network includes a plurality of nodes, each node communicating according to a time frame period, and each node includes a listening mode and a sending mode, and the method includes: In the current time frame period, each node performs the following steps: receiving data in the listening mode and updating a node neighbor table based on the received data; Determine whether the data sending time has arrived based on the information of each neighbor node in the node neighbor table; When it is determined that the data transmission time has arrived, the mode is switched to the transmission mode to transmit the data, and after the data is successfully transmitted, the mode is switched to the listening mode.
[0006] In the embodiment of the present application, the information of each neighbor node includes the network ID and data packet sending status of each neighbor node; The determining whether the data sending time has arrived according to the information of each neighbor node in the node neighbor table includes: Determine the nearest neighbor node based on the network ID of each neighbor node in the node neighbor table; Based on the data packet sending status of the nearest neighbor node, it is determined whether the data sending time has arrived.
[0007] In the embodiment of the present application, the determining whether the data transmission time has arrived based on the data packet transmission status of the nearest neighbor node includes: When it is determined that the data packet sending state of the nearest neighbor node is sent, determining whether the channel is idle; When it is determined that the channel is idle, the arrival data transmission time is determined.
[0008] In an embodiment of the present application, when determining that the data packet sending status of the nearest neighbor node is sent, determining whether the channel is idle includes: When it is determined that the data packet sending state of the nearest neighbor node is sent, judging whether the node is a minimum node based on the network ID of each neighbor node in the node neighbor table; When the node is determined to be the minimum node, it waits for the protection interval and then determines whether the channel is idle.
[0009] In the embodiment of the present application, the determining whether the data transmission time has arrived based on the data packet transmission status of the nearest neighbor node includes: When it is determined that the data packet sending state of the nearest neighbor node is unsent, determining whether the reception has timed out based on a first timeout period; When it is determined that the reception has timed out, determining whether the channel is idle; When it is determined that the channel is idle, the arrival data transmission time is determined.
[0010] In the embodiment of the present application, it also includes: When it is determined that the channel is not idle, determining whether the transmission has timed out based on a second timeout period; If the transmission timeout is determined, the arrival data transmission time is determined.
[0011] In the embodiment of the present application, when it is determined that the data transmission time has arrived, switching to the transmission mode to send data, and after successfully sending the data, switching to the listening mode, includes: When it is determined that the data transmission time has arrived, switching to the transmission mode to send the data, and clearing the data packet transmission status of each neighbor node in the node neighbor table; After the data is successfully sent, the mode is switched to the listening mode.
[0012] In an embodiment of the present application, the method further includes: The node to be connected to the network detects the wireless ad hoc network in the listening mode; When the wireless ad hoc network is detected, the node to be networked switches to the sending mode during an idle time slot of the time frame period to send data to join the wireless ad hoc network.
[0013] In the embodiment of the present application, the detecting of the wireless ad hoc network by the node to be networked in the listening mode includes: The node to be networked switches to the listening mode after initialization to obtain data of multiple time frame periods, and constructs a neighbor table of the node to be networked based on the data of the multiple time frame periods; The node to be networked detects the wireless ad hoc network based on the neighbor table of the node to be networked.
[0014] In the embodiment of the present application, the node to be networked switches to the sending mode to send data to join the wireless ad hoc network during the idle time slot phase of the time frame period, including: After the node to be networked obtains data sent by the last neighbor node in the neighbor table of the node to be networked, the node to be networked switches to the sending mode to send data in the idle time slot phase of the current time frame period to join the wireless ad hoc network.
[0015] In the embodiment of the present application, the node to be networked switches to the sending mode to send data to join the wireless ad hoc network during an idle time slot of the current time frame period, including: The node to be connected to the network determines whether the channel is idle; When it is determined that the channel is idle, the node to be networked switches to the sending mode to send data in an idle time slot phase of the current time frame period to join the wireless ad hoc network.
[0016] In the embodiment of the present application, the detecting of the wireless ad hoc network by the node to be networked in the listening mode includes: After initialization, the node to be networked generates a random factor, and obtains a delay time based on the random factor and the time frame period; After the delay time, the node to be networked switches to the listening mode to detect the wireless ad hoc network.
[0017] In the embodiment of the present application, the node to be networked switches to the sending mode to send data to join the wireless ad hoc network during the idle time slot phase of the time frame period, including: The node to be connected to the network determines whether the number of nodes in the wireless ad hoc network reaches a preset node number threshold; When it is determined that the number of nodes in the wireless ad hoc network has not reached a preset node number threshold, the node to be networked switches to the sending mode to send data in an idle time slot phase of the time frame period to join the wireless ad hoc network.
[0018] In the embodiment of the present application, the node to be networked switches to the sending mode to send data to join the wireless ad hoc network during the idle time slot phase of the time frame period, including: The node to be connected to the network determines whether there is an identical node in the wireless ad hoc network; When it is determined that the same node does not exist in the wireless ad hoc network, the node to be networked switches to the sending mode to send data in an idle time slot phase of the time frame period to join the wireless ad hoc network.
[0019] In an embodiment of the present application, the method further includes: In the case that the wireless ad hoc network is not detected, the node to be networked switches to the sending mode to periodically send data to establish a new wireless ad hoc network.
[0020] In the embodiment of the present application, it also includes: After the data is successfully sent, the current timestamp is compared with the data packet receiving timestamp of each node in the node neighbor table to obtain the comparison results of each node; Determine the node to be de-networked based on the comparison results of the nodes; The node that has left the network is deleted from the node neighbor table to update the node neighbor table.
[0021] In the embodiment of the present application, when it is determined that the data transmission time has arrived, switching to the transmission mode to send data includes: When the arrival data transmission time is determined, the number of data transmission times is determined; Based on the number of data transmissions, determining whether a preset data transmission condition is met, the preset data transmission condition being that data is transmitted only once within a time frame period; When it is determined that the preset data sending condition is met, the data is switched to the sending mode.
[0022] A second aspect of the present application provides a wireless ad hoc network communication system, comprising a plurality of radio stations, each of which communicates using the above-mentioned wireless ad hoc network communication method, and each of which is a node of the wireless ad hoc network.
[0023] In the embodiment of the present application, each of the radio stations includes: a control module and a radio frequency module, the control module is connected to the radio frequency module, and the control module is used to run the above-mentioned wireless ad hoc network communication method.
[0024] Through the above technical solution, at the data link layer of the wireless ad hoc network, the wireless ad hoc network includes multiple nodes, each of which communicates according to a time frame period, and each node includes a listening mode and a sending mode. In the current time frame period, each node performs the following steps: receiving data in the listening mode and updating the node neighbor table based on the received data; determining whether the data transmission time has arrived based on the information of each neighbor node in the node neighbor table; switching to the sending mode to send data when it is determined that the data transmission time has arrived, and switching to the listening mode after successfully sending the data. Each node in the network receives data in the listening mode and updates the node neighbor table based on the received data. The node neighbor table can be used to detect in real time whether other nodes have completed sending data packets, and when it is the node's turn to send data, it sends data. The communication process does not require the configuration or election of a master node, does not require a virtual center, and each slave node does not need to strictly synchronize time slots with the master node. Each node also does not need strict time slot management time granularity. The entire wireless ad hoc network does not require complex interactive protocols such as time slot allocation and time slot recovery, thereby realizing a truly decentralized wireless ad hoc network and supporting mesh networks.
[0025] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following detailed description, they are used to explain the embodiments of the present application but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings: Figure 1 The following schematically illustrates a flow chart of a communication method for a wireless ad hoc network according to an embodiment of the present application; Figure 2 A flowchart of determining the timing of sending a data packet of a local node according to the MAC protocol of an embodiment of the present application is schematically shown; Figure 3 Schematically shows a schematic diagram of a MAC protocol network maintenance state machine according to an embodiment of the present application; Figure 4 The following schematically shows a flow chart of network construction according to an embodiment of the present application; Figure 5 A schematic diagram illustrating a situation in which a node does not receive broadcast data within a single time frame period according to an embodiment of the present application is shown; Figure 6 Schematically illustrates a schematic diagram of multiple nodes not receiving broadcast data within a single time frame period according to an embodiment of the present application; Figure 7A schematic diagram of a hidden node scenario according to an embodiment of the present application is shown schematically; Figure 8 The following schematically shows a radio station architecture diagram of a tower group anti-collision wireless ad hoc network according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] To make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0028] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of laws and regulations. In the embodiments of this application, certain software, components, models, and other existing solutions in the industry may be mentioned. These should be considered as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of this application, but it does not mean that the applicant has or will necessarily use such solutions.
[0029] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back, etc.), such directional indications are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0030] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the fact that they can be implemented by ordinary technicians in this field. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0031] This embodiment provides a communication method for a wireless ad hoc network, which can be a communication method based on the Time Division Multiple Access (TDMA) Medium Access Control Protocol (MAC) or the Carrier Sense Multiple Access Protocol (CSMA). It should be noted that this embodiment mainly describes the solution based on the Time Division Multiple Access MAC protocol. This method is applied to the data link layer of the wireless ad hoc network, and is mainly responsible for network construction and maintenance, collision avoidance when multiple nodes send data, etc. It is mainly responsible for data collision prevention when nodes enter and exit the network, network maintenance, and multi-node data is sent. Regardless of data packet splitting and aggregation, each data packet sent is always complete. It should be noted that the network mentioned separately in this embodiment refers to the current wireless ad hoc network.
[0032] To facilitate illustration, this embodiment primarily uses a scenario involving multiple tower cranes operating in a cluster (a tower cluster) as an example. Specifically, the solution is described using the communication process of a wireless ad hoc network constructed by anti-collision radios within the cluster. A node in the wireless ad hoc network can be an anti-collision radio on a tower crane within the cluster.
[0033] During tower cluster operations, there's a risk of collision between cranes. The tower cluster anti-collision function prevents collisions between cranes during operation. Currently, there are two main types of anti-collision: passive and active. This embodiment primarily uses passive anti-collision, where the crane senses the static structural parameters and real-time attitude data of other cranes in the cluster. Active anti-collision is typically achieved by installing a lidar or camera on the crane to collect and process real-time attitude and structural data from surrounding cranes. In the tower cluster anti-collision function, wireless ad hoc network radios are used to share real-time attitude data and static structural parameters between cranes, enabling a mesh network for the tower cluster. This multi-transmission and multi-reception of wireless data is crucial to the overall anti-collision function. Parameters such as the wireless ad hoc network radio's topology, network capacity, data latency, data rate, anti-interference capability, and transmission distance all impact the anti-collision function. A well-designed wireless ad hoc network radio makes tower cluster anti-collision safer, more convenient, and more intelligent when implemented on tower cranes.
[0034] Figure 1 The following schematically shows a flow chart of a communication method for a wireless ad hoc network according to an embodiment of the present application. Figure 1As shown, this embodiment provides a communication method for a wireless ad hoc network, which is applied to the data link layer of the wireless ad hoc network. The wireless ad hoc network includes multiple nodes, each node communicates according to a time frame period, and each node includes a listening mode and a sending mode. The method includes the following steps: In the current time frame period, each node performs the following steps: Step 210: receiving data in the listening mode, and updating the node neighbor table based on the received data; In this embodiment, the time frame period refers to the time required for all nodes in the current wireless ad hoc network to complete a data transmission plus the guard interval, which can be pre-set based on actual needs. The time frame period includes the actual and guard interval times for all nodes to transmit data. The time required for a single node to transmit data can be considered fixed, as the size of the transmitted data packet is fixed. Therefore, the guard interval is related to the number of nodes in the current wireless ad hoc network. The fewer the number of nodes in the current network, the longer the guard interval, with the shortest being one frame guard interval, where the frame guard interval is a pre-set minimum guard interval. Each node communicates periodically according to the time frame period. Each node has a listening mode and a transmitting mode. In transmitting mode, it can send data, and in listening mode, it can receive data. A single node periodically switches between transmitting and listening modes. In a wireless ad hoc network, the node neighbor table is a list or data structure maintained by the node, which records the set of nodes with which the node can perform single-hop data transmission and reception. Each node has its own corresponding node neighbor table. The node neighbor table can record the information of each neighbor node, receive data in listening mode, and determine which neighbor node the data is from based on the data, and then update the corresponding neighbor node information in the node neighbor table based on the received data.
[0035] Among them, the above-mentioned neighbor node information may include the network ID and data packet transmission status of each node. The data packet transmission status is used to record the data packet transmission status of the neighbors of this node within a single time frame period, including two states: "sent" and "not sent". The network ID refers to a unique identity identifier set for each node, which can be set in advance. For example, the network ID of the node can be set, which is configured at the factory and has a value range of 1-65534. After receiving data in listening mode, the neighbor node corresponding to the received data is found according to the network ID, and the data packet transmission status of the neighbor node is updated to the "sent" state, thereby updating the node neighbor table.
[0036] Step 220: Determine whether the data sending time has arrived based on the information of each neighbor node in the node neighbor table; In this embodiment, since each node queues to send data, it can be determined based on the information of each neighboring node whether it is the node's turn to send data, that is, whether the data sending time has arrived.
[0037] In some embodiments, the information of each neighbor node includes a network ID and a data packet sending status of each neighbor node; accordingly, determining whether the data sending time has arrived based on the information of each neighbor node in the node neighbor table includes: First, based on the network ID of each neighbor node in the node neighbor table, determine the nearest neighbor node; In this embodiment, data packets can be sent sequentially within a time frame according to the size of the node's network ID. Therefore, the node's nearest neighbor node can be determined first. After the nearest neighbor node has sent data, the node's next neighbor node is ready to send data. Determining the nearest neighbor node can be accomplished by first sorting the nodes in ascending order, and then determining the nearest neighbor node based on the sorted neighbor nodes. In a specific implementation, the node's network ID can also be directly compared with the network IDs of each neighbor node, with the neighbor node with the closest network ID being determined as the nearest neighbor node.
[0038] Then, based on the data packet sending status of the nearest neighbor node, it is determined whether the data sending time has arrived.
[0039] In this embodiment, after determining the nearest neighbor node, it is determined whether its data packet sending status is "sent". If so, it means that the nearest neighbor node has sent all the data and it is the turn of this node to send, that is, the data sending time has arrived; otherwise, it means that the data sending time has not yet arrived.
[0040] In some embodiments, to improve network robustness, a node determines whether other nodes are currently sending data before sending data. If so, the node waits; otherwise, the node sends data immediately. Specifically, determining whether the data transmission time has arrived based on the data packet transmission status of the nearest neighbor node includes: The first step is to determine whether the channel is idle when determining that the data packet sending status of the nearest neighbor node is sent; The second step is to determine the time when the arriving data is sent when the channel is determined to be idle.
[0041] In this embodiment, after determining that the data packet transmission status of the nearest neighbor node is sent, it is possible to further determine whether the channel is idle, that is, whether other nodes are currently sending data. If not, the channel is idle, and the data transmission time is determined to have arrived. Data can be sent. Otherwise, it is necessary to wait until the channel is idle before the data transmission time arrives. Determining whether the channel is idle can be achieved using existing technologies. For example, for Long Range Radio (LoRa), the physical layer module provides a function called preamble detection. If a preamble is detected, it is determined that a node is sending data.
[0042] By determining that the data packet sending status of the nearest neighbor node is sent, further judging whether the channel is idle, and determining the arrival data sending time when the channel is determined to be idle, it can be ensured that the channel is idle when this node sends data, thereby ensuring that this node can send data normally and improving communication reliability.
[0043] In some embodiments, the determining whether the data transmission time has arrived based on the data packet transmission status of the nearest neighbor node includes: When it is determined that the data packet sending state of the nearest neighbor node is unsent, determining whether the reception has timed out based on a first timeout period; When it is determined that the reception has timed out, determining whether the channel is idle; When it is determined that the channel is idle, the arrival data transmission time is determined.
[0044] In this embodiment, if the nearest neighbor node's data packet transmission status is not sent, the node continues to wait. If the node remains in the receiving state for more than one time frame period, it can be considered that the node has experienced a transmission timeout, which may be caused by a node in the network leaving the network or a poor wireless link signal. If a node has a transmission timeout, if it determines that no other nodes in the current network are sending data, it determines that the data transmission time has arrived and can immediately send the data packet to avoid affecting subsequent nodes. If a node is sending data, the node waits.
[0045] By further judging whether the reception has timed out when the data packet sending status of the nearest neighbor node is not sent, and determining the arrival data sending time when the reception has timed out and the channel is idle, the impact on subsequent nodes is avoided and the communication reliability is further improved.
[0046] In some embodiments, when determining that the data packet sending status of the nearest neighbor node is sent, determining whether the channel is idle includes: When it is determined that the data packet sending state of the nearest neighbor node is sent, judging whether the node is a minimum node based on the network ID of each neighbor node in the node neighbor table; When the node is determined to be the minimum node, it waits for the protection interval and then determines whether the channel is idle.
[0047] In this embodiment, when it is determined that the data packet sending status of the nearest neighbor node is sent, if this node is the smallest node, a protection time is reserved before sending data. This protection interval is used to provide a new node for network access. If a node does not wait for the opportunity to send for some reason, it will time out and send after waiting for more than one time frame period. The above-mentioned protection interval can be determined by subtracting the timestamp recorded when the data packet of this node was sent in the previous time frame period from the current system timestamp to see whether it exceeds one time frame period, so as to determine whether the data sending time has arrived. The waiting time in this process is the system protection interval. The above-mentioned protection interval can also be determined based on the time frame period and the number of nodes in the current wireless ad hoc network. The fewer the number of nodes, the longer the protection interval.
[0048] In some embodiments, further comprising: When it is determined that the channel is not idle, determining whether the transmission has timed out based on a second timeout period; If the transmission timeout is determined, the arrival data transmission time is determined.
[0049] In this embodiment, since all nodes can queue and transmit data in a time-sharing manner based on the node network ID within a time frame period, there is a time difference in data transmission between nodes. Therefore, the data transmission timeout period of each node can be designed to be the same, that is, the second timeout period can be pre-set. For example, the timeout period can be designed to be one time frame period plus three frame protection intervals, that is, 390ms. When it is determined that the channel is not idle, the second timeout period is used to determine whether the transmission has timed out. If the transmission timeout is determined, the arrival time of the data transmission is determined, thereby avoiding the impact on subsequent nodes.
[0050] It should be noted that the above judgment of whether the data transmission time has arrived can also be obtained by combining multiple judgment conditions. For example: please refer to Figure 2 . Figure 2The flowchart of the MAC protocol according to the embodiment of the present application is schematically shown. It is judged in turn whether the data of the neighbor whose network ID is closest to the node has been sent. If not, it is judged whether there is a node currently sending data after waiting until the timeout; if so, it is judged whether the network ID of the node is the smallest? If so, it is judged whether there is a node currently sending data after the delay protection interval t; if not, it is directly judged whether there is a node currently sending data; if no node is sending data, it sends a data packet and clears the neighbor data packet sending status flag. If a node is sending data, it waits until the timeout to send a data packet and clears the neighbor data packet sending status flag.
[0051] Step 230: When it is determined that the data transmission time has arrived, switch to the transmission mode to transmit data, and after the data is successfully transmitted, switch to the listening mode.
[0052] In this embodiment, when a node's turn to transmit data arrives, it first checks whether a service data packet issued by the application layer exists in its cache queue. If so, it sends the service data packet. If not, it sends a fixed-size empty data packet to identify its presence and maintain the network. When multiple nodes form a network, all nodes in the network sequentially transmit data in transmit mode during each time frame. After transmission is complete, they immediately enter listen mode and receive data from other nodes.
[0053] In one embodiment, when it is determined that the data transmission time has arrived, switching to the transmission mode to transmit the data, and after successfully transmitting the data, switching to the listening mode, includes: When it is determined that the data transmission time has arrived, switching to the transmission mode to send the data, and clearing the data packet transmission status of each neighbor node in the node neighbor table; After the data is successfully sent, the mode is switched to the listening mode.
[0054] In this embodiment, while sending data in the sending mode, the data packet sending status of each neighbor node in the node neighbor table may be cleared, so that the node neighbor table can be updated in the listening mode in the next time frame period.
[0055] In some embodiments, when it is determined that the data transmission time has arrived, switching to the transmission mode to transmit the data includes: First, when the arrival data sending time is determined, the number of data sending times is determined; In this embodiment, after each data transmission is completed, the timestamp of the current system can be recorded, and the number of data transmission times can be determined based on the recorded timestamp.
[0056] Then, based on the number of data transmissions, determining whether a preset data transmission condition is met, the preset data transmission condition being that data is transmitted only once within a time frame period; Then, when it is determined that the preset data sending condition is met, the data is switched to the sending mode.
[0057] In this embodiment, considering that some special reasons may cause the node data transmission order in a single time frame period to be disordered, a data transmission constraint condition can be designed, that is, a node is only allowed to send data once in a time frame period. If more than one transmission opportunity is obtained, it will not be processed. This can be implemented through the network maintenance state machine, please refer to Figure 3 , Figure 3 The figure schematically shows a MAC protocol network maintenance state machine diagram according to an embodiment of the present application.
[0058] By determining the number of times data is sent, based on the number of times data is sent, it is judged whether the condition of sending data only once within a time frame period is met. When it is determined that the preset data sending conditions are met, the sending mode is switched to send data, thereby avoiding the problem of disordered node data sending order and further improving communication reliability.
[0059] In the above implementation process, at the data link layer of the wireless ad hoc network, the wireless ad hoc network includes multiple nodes, each of which communicates according to a time frame period. Each node includes a listening mode and a sending mode. In the current time frame period, each node performs the following steps: receiving data in the listening mode and updating the node neighbor table based on the received data; determining whether the data transmission time has arrived based on the information of each neighbor node in the node neighbor table; switching to the sending mode to send data when the data transmission time has arrived, and switching to the listening mode after successfully sending the data. Each node in the network receives data in the listening mode and updates the node neighbor table based on the received data. The node neighbor table can be used to detect in real time whether other nodes have completed data transmission. When it is the node's turn to transmit, it transmits data. The communication process does not require the configuration or election of a master node, does not require a virtual center, and each slave node does not need to strictly synchronize time slots with the master node. Each node also does not require strict time slot management granularity. The entire wireless ad hoc network does not require complex interactive protocols such as time slot allocation and time slot recycling, thereby realizing a truly decentralized wireless ad hoc network and supporting mesh networks.
[0060] Please see Figure 4 , Figure 4 The flowchart of network construction according to an embodiment of the present application is schematically shown.
[0061] In some embodiments, the method further includes a process of node joining the network, comprising the following steps: First, the node to be connected to the network detects the wireless ad hoc network in the listening mode; In this embodiment, the node to be connected enters a listening mode to check whether there is an established network in the current environment, that is, to detect the wireless ad hoc network. The above detection can be determined based on the content of the current node neighbor table. If the node neighbor table is empty, it means that there is no wireless ad hoc network; if it is not empty, it means that a wireless ad hoc network has been detected.
[0062] Then, when the wireless ad hoc network is detected, the node to be networked switches to the sending mode to send data in an idle time slot phase of the time frame period to join the wireless ad hoc network.
[0063] In this embodiment, the idle time slot phase of the time frame period refers to a phase in which no node sends data, and the node to be networked joins the wireless ad hoc network by sending data in a sending mode.
[0064] The node to be networked detects the wireless self-organizing network in the listening mode. When the wireless self-organizing network is detected, the node to be networked switches to the sending mode to send data to join the wireless self-organizing network during the idle time slot phase of the time frame period, thereby enabling the new node to enter the network normally.
[0065] In some embodiments, detecting the wireless ad hoc network in the listening mode by the node to be networked includes: In the first step, the node to be networked switches to the listening mode after initialization to obtain data of multiple time frame periods, and constructs a neighbor table of the node to be networked based on the data of the multiple time frame periods; In the second step, the node to be networked detects the wireless ad hoc network based on the neighbor table of the node to be networked.
[0066] In this embodiment, when a node joining an existing network first completes driver initialization and reads its network ID from flash memory, it then senses the network IDs of other nodes in the network. Specifically, this can involve acquiring data from multiple timeframes. For example, the node can construct a neighbor table by receiving data from three timeframes to confirm the network IDs of all nodes in the current network. The node can also sort the nodes in ascending order and attempt to join the network during an idle time slot in the fourth timeframe. A node neighbor table, i.e., a neighbor table of the node joining the network, can be constructed based on the acquired data. The neighbor table is determined based on the contents of the neighbor table. If the neighbor table of the node joining the network is empty, it indicates that no wireless ad hoc network is currently present; if it is not empty, it indicates that a wireless ad hoc network has been detected.
[0067] By switching to the listening mode after initialization to obtain data of multiple time frame periods, and constructing a neighbor table of nodes to be networked based on the data of the multiple time frame periods, neighbor node information can be obtained as much as possible to accurately detect wireless ad hoc networks.
[0068] In some embodiments, considering the situation where multiple nodes are connected to the network at the same time, which mainly occurs in the scenario where multiple nodes are powered on at the same time, in order to avoid multiple nodes from connecting to the network at the same time, the node to be connected to the network detects the wireless ad hoc network in the listening mode, including: In the first step, after initialization, the node to be connected to the network generates a random factor and obtains a delay time based on the random factor and the time frame period; In this embodiment, a random factor n may be generated according to the network ID, and the delay time may be obtained by multiplying the random factor by the time frame period.
[0069] In the second step, after the delay time, the node to be networked switches to the listening mode to detect the wireless ad hoc network.
[0070] In this embodiment, before the MAC protocol is started, a delay of "random factor*frame period" may be performed, and the network-entering node may enter the listening mode to check whether there is an established network in the current environment.
[0071] After initialization, the node to be networked generates a random factor, and based on the random factor and the time frame period, obtains a delay time. After the delay time, the node to be networked switches to the listening mode to detect the wireless ad hoc network. Since each node to be networked generates a different random factor, the obtained delay time is also different. This ensures that the nodes enter the network in different time frame periods, avoids the situation where multiple nodes enter the network at the same time, and ensures that the nodes can enter the network accurately.
[0072] In some embodiments, the node to be networked switches to the transmission mode to send data to join the wireless ad hoc network during an idle time slot of the time frame period, including: After the node to be networked obtains data sent by the last neighbor node in the neighbor table of the node to be networked, the node to be networked switches to the sending mode to send data in the idle time slot phase of the current time frame period to join the wireless ad hoc network.
[0073] In this embodiment, to ensure that data sent by a node upon network entry is not interfered with by data sent by other nodes in the network, the node with the smallest network ID in the network always delays data transmission for a guard interval after receiving data from the node with the largest network ID. The fewer nodes in the network, the longer the guard interval, with a minimum of one frame guard interval. This interval is the idle time slot period. When a new node joins the network, after receiving a data packet from the largest node in the neighbor list of the node to be joined, it transmits a data packet within this guard interval in an attempt to join the network.
[0074] After obtaining the data sent by the last neighbor node in the neighbor table of the node to be networked, the node to be networked switches to the sending mode to send data to join the wireless ad hoc network during the idle time slot phase of the current time frame period, thereby ensuring that the node to be networked can accurately enter the network.
[0075] In some embodiments, considering that when multiple nodes simultaneously join the network, there may be a problem of data packet transmission conflicts between the joining nodes, the node to be joined switches to the transmission mode to send data to join the wireless ad hoc network during an idle time slot of the current time frame period, including: First, the node to be connected to the network determines whether the channel is idle; Then, when it is determined that the channel is idle, the node to be networked switches to the sending mode to send data in an idle time slot phase of the current time frame period to join the wireless ad hoc network.
[0076] In this embodiment, when a new node joins the network, it is necessary to determine whether there is already a node sending a network access request data packet. If it is, it means that the channel is not idle, and then it will wait until the next time frame period to join the network; on the contrary, if the channel is idle, then in the idle time slot phase of the current time frame period, it will switch to the sending mode to send data to join the wireless ad hoc network.
[0077] By judging whether the channel is idle, if it is determined that the channel is idle, the node to be networked switches to the sending mode to send data to join the wireless ad hoc network during the idle time slot of the current time frame period. This can effectively avoid the problem of data packet sending conflicts between networked nodes due to multiple nodes joining the network at the same time, thereby ensuring the reliability of node access to the network.
[0078] In some embodiments, the node to be networked switches to the transmission mode to send data to join the wireless ad hoc network during an idle time slot of the time frame period, including: First, the node to be connected to the network determines whether the number of nodes in the wireless ad hoc network has reached a preset node number threshold; In this embodiment, the number of nodes in the wireless ad hoc network can be obtained based on each node in the neighbor table of the node to be added to the network, and the above-mentioned preset node number threshold can be pre-set according to actual conditions.
[0079] Then, when it is determined that the number of nodes in the wireless ad hoc network has not reached a preset node number threshold, the node to be networked switches to the sending mode to send data to join the wireless ad hoc network during an idle time slot of the time frame period.
[0080] In this embodiment, if the number of nodes exceeds a preset node number threshold, the node will not be allowed to join the network, and an alarm may be issued to alert the user. If the number of nodes does not exceed the preset node number threshold, the node can join the network. For example, if a node detects that 20 nodes already exist in the current network when joining the network, the node will not be allowed to join the network, and an alarm indicating that the number of nodes exceeds the limit will be issued to the external device.
[0081] It should be noted that the time frame period and frame protection interval mentioned in this embodiment can be determined based on the functions and performance parameters of the entire communication system and business requirements. For example, the time frame period is 300ms and the frame protection interval is 30ms, and the maximum number of network nodes supported is 20.
[0082] By judging whether the number of nodes in the wireless ad hoc network has reached a preset node number threshold, if it is determined that the number of nodes in the wireless ad hoc network has not reached the preset node number threshold, the node to be joined will switch to the sending mode to send data to join the wireless ad hoc network during the idle time slot phase of the time frame period, thereby ensuring that the number of nodes in the wireless ad hoc network will not exceed the limit and ensuring normal communication of the wireless ad hoc network.
[0083] In some embodiments, the node to be networked switches to the transmission mode to send data to join the wireless ad hoc network during an idle time slot of the time frame period, including: First, the node to be connected to the network determines whether there is an identical node in the wireless ad hoc network; Then, when it is determined that the same node does not exist in the wireless ad hoc network, the node to be networked switches to the sending mode to send data in an idle time slot phase of the time frame period to join the wireless ad hoc network.
[0084] In this embodiment, considering that two or more nodes with the same network ID may appear in the network due to a configuration error, each node needs to check whether there is a neighbor with the same network ID as this node after obtaining all neighbor nodes in the network during the initial monitoring phase. If so, it will not join the network and periodically report the alarm information to the external device through the serial port. After obtaining the alarm information, the external human-computer interaction interface modifies the network ID of the node through the host computer software. Similarly, if the node finds that its own network ID is illegal during the initial monitoring phase, it will not join the network, and the alarm information can be periodically reported to the external device through the serial port, and the network ID can be reconfigured by the external host computer.
[0085] By judging whether there are identical nodes in the wireless ad hoc network, if it is determined that there are no identical nodes in the wireless ad hoc network, the node to be joined switches to the sending mode to send data to join the wireless ad hoc network during the idle time slot phase of the time frame period, thereby avoiding illegal nodes or conflicts and further improving the reliability of the wireless ad hoc network.
[0086] In some embodiments, the method further comprises: In the case that the wireless ad hoc network is not detected, the node to be networked switches to the sending mode to periodically send data to establish a new wireless ad hoc network.
[0087] In this embodiment, if no wireless ad hoc network is detected, it means that there is no wireless ad hoc network at present, and then the sending mode is entered, and data is sent at a period T to identify its own existence. After the node started later receives the data, it joins this network, thereby establishing a new wireless ad hoc network.
[0088] In some embodiments, considering that a node does not send data after being offline, the method further includes: First, after successfully sending data, the current timestamp is compared with the data packet receiving timestamp of each node in the node neighbor table to obtain the comparison results of each node; In this embodiment, the neighbor node information also records the time when each node completes receiving data, that is, the data packet receiving timestamp of each node.
[0089] Then, based on the comparison results of the various nodes, a node to be de-networked is determined; In this embodiment, the comparison result can be the difference between the packet's received timestamp and the current timestamp. A determination is then made as to whether this difference exceeds a preset time threshold. If so, the node has not sent data within that time period and is therefore considered disconnected, thus identifying the node as a disconnected node. For example, the preset time threshold could be 12 time frames. If other nodes in the current network perceive that the node has not sent data for 12 consecutive time frames, they consider the node to be offline. If this threshold does not exceed the threshold, the node is not a disconnected node.
[0090] Finally, the node that has left the network is deleted from the node neighbor table to update the node neighbor table.
[0091] In this embodiment, after the node to be delisted is determined, the node is deleted from the node neighbor table, thereby realizing the node delisting.
[0092] By comparing the current timestamp with the data packet reception timestamp of each node in the node neighbor table, the comparison results of each node are obtained; based on the comparison results of each node, the node to be delisted is determined; the node to be delisted is deleted from the node neighbor table to update the node neighbor table, thereby realizing the node delisting.
[0093] It should be noted that when a node leaves the network, nodes with a larger network ID than it in the current network will be in a waiting state because they cannot receive data from this node. In order not to affect the data transmission of these nodes within a single time frame period, a timeout mechanism is designed to solve this problem. The timeout period is greater than a time frame period, but it cannot be too long, otherwise when the node leaves the network, it will affect the data transmission delay of the current entire network. Since all nodes in a time frame period can queue up to send data according to the size of the node network ID, there is a time difference in data transmission between nodes. Therefore, the data transmission timeout period of each node can be designed to be the same size. For example, the timeout period is one time frame period plus 3 frame protection intervals, that is, 390ms.
[0094] The following example illustrates this. When a node joins the network, it first listens to see if a network exists. If so, it obtains the network IDs of all nodes in the network and sorts them. If not, it periodically broadcasts data packets, inviting other nodes to join the network. After each node senses the network IDs of all nodes in the network, it sends data packets in ascending order within a time frame. Each node in the network senses in real time whether other nodes have completed sending their data packets. When it is its turn to send, it sends data. If the node is the smallest, it reserves a protection interval before sending data. This protection interval is provided for new nodes to join the network. If, for some reason, a node does not receive a transmission opportunity, it will time out after waiting for more than one time frame. For network robustness, before sending data, a node checks whether other nodes are currently sending data. If so, it waits; otherwise, it sends immediately.
[0095] It's important to note that a time-division multiple access (MAC) protocol using a sorting mechanism requires that all nodes in the network receive packets in the same state. If a node sends a packet, but some other nodes in the network receive it while others don't, data collisions may occur. In practice, due to factors such as long communication distances or building obstructions, it's possible that when one node broadcasts data, other nodes in the network may receive packets in different states, leading to data collisions.
[0096] Please see Figure 5 , Figure 5 This schematic diagram illustrates a situation where a node fails to receive broadcast data within a single time frame according to an embodiment of the present application. Black dots represent different nodes. If node 1 sends data but node 3 doesn't, but node 2 does, and then node 2 sends data, node 3 receives it. Node 3 can then sense its own data transmission timing without affecting the data transmission sequence of each node within the entire period.
[0097] Please see Figure 6 , Figure 6 The schematic diagram shows that multiple nodes do not receive broadcast data within a single time frame period according to an embodiment of the present application, where black dots represent different nodes. At T1, nodes 2, 3, and 4 did not receive the data, but nodes 5 and 6 did receive the data; at T2, node 2 timed out and the timeout period was T_frame+90ms, that is, one time frame period plus 90ms; at T3, node 3 timed out and the timeout period was also T_frame+90ms. Since the transmission interval of each adjacent node always differs by one time slot, there will be no confusion in the transmission timing at T2 and T3.
[0098] Please see Figure 7 , Figure 7 The following schematic diagram shows a hidden node scenario according to an embodiment of the present application, where black dots represent different nodes. Node 1 can send and receive data with node 2 and node 3, but node 2 and node 3 cannot sense each other's presence due to occlusion, and thus do not know whether the other party has completed sending the data. After node 1 has sent the data, if node 2 and node 3 both believe that they can send data, a collision will occur after the two send the data. Considering the above scenario, node 3 can be configured as a different channel to solve this problem.
[0099] It should be noted that the MAC protocol in this method does not require additional network entry, exit and network maintenance protocols. It only needs to encapsulate a layer of MAC header information on the basis of the service data packet. The network management is flexible and robust, and the network capacity is configurable and determined according to the physical layer parameters.
[0100] This embodiment provides a wireless ad hoc network communication system, including a plurality of radio stations, each of which communicates using the above-mentioned wireless ad hoc network communication method, and each of which is a node of the wireless ad hoc network.
[0101] In this embodiment, the radio can be configured and queried via a serial port by an external human-computer interaction host computer, which can view the radio's node neighbor table information, determine the wireless signal strength and packet loss rate of data received by the node, and perform online software upgrades on the radio via the external host computer. Furthermore, the radio periodically reports alarm information via the serial port. If an alarm occurs, the operator can view it through the human-computer interaction interface. The radio's specific data processing functions enable the aforementioned wireless ad hoc network communication method.
[0102] Wherein, each of the radio stations includes: a control module and a radio frequency module, the control module is connected to the radio frequency module, and the control module is used to run the above-mentioned wireless ad hoc network communication method.
[0103] In this embodiment, the control module may be an MCU chip, and the radio frequency module includes a physical layer radio frequency (RF) chip and an antenna, etc.
[0104] Please see Figure 8 , Figure 8The following diagram schematically illustrates the architecture of a wireless ad hoc radio station for tower cluster collision avoidance according to an embodiment of the present application. Taking the tower cluster collision avoidance scenario as an example, the wireless ad hoc radio station primarily consists of a microcontroller unit (MCU) chip, a physical layer radio frequency (RF) chip, and an antenna. From top to bottom, it is divided into the application layer, the MAC layer, and the physical layer. The MCU uses an STM32F103C8T6 microcontroller, responsible for driving the RF chip, running the MAC protocol, and interacting with the RF chip and external devices. The RF chip is an SX1268, responsible for physical layer signal modulation and demodulation, wireless data transmission and reception, etc. The physical layer uses a LoRa module, which has strong anti-interference capabilities, long communication range, high data transmission rate, and low data transmission latency.
[0105] The process of sending data packets from the external equipment of this tower crane to other tower crane radio stations through the anti-collision radio is as follows: 1) The external device packages the data according to the protocol and sends it to the radio MCU via the serial port. The external device needs to ensure the integrity of the data packets sent; 2) The MCU receives data via interrupts and caches it in a circular queue, capable of caching up to three packets. When the cache is full, the old data is cleared and new data is inserted. Because the RF chip also uses interrupts for data transmission and reception, which have the highest priority, serial port data reception uses Direct Memory Access (DMA) plus a serial port idle interrupt. Otherwise, the serial port may experience packet loss. 3) When the MAC protocol in the MCU detects that it is the node's turn to send data, it removes the data from the queue, packages it, and sends it to the RF chip via the Serial Peripheral Interface (SPI). The RF chip modulates the data and transmits it to the air interface via the antenna. If the queue is empty when the node needs to send data, it sends an empty data packet to the RF chip for network maintenance.
[0106] The process of the external equipment of the tower crane receiving data packets sent by other tower cranes from the anti-collision radio is as follows: 1) After the anti-collision radio receives data sent by other tower crane radios, it first completes data demodulation in the RF chip and then caches the data in the queue of the SPI interface; 2) The MCU detects through an interrupt signal that the RF chip has received a complete data packet. It then reads the data from the RF chip into the MCU memory cache via the SPI interface and analyzes the packet for completeness and correctness. After receiving the correct and complete packet, it identifies the node as having sent the packet based on the source ID. 3) After the MCU chip reads the correct and complete data packet from the RF chip, it removes the MAC protocol header. If the data packet is business data, it sends the data packet to the external device through the serial port. If it is empty data, it does not process it.
[0107] This system supports multiple data transmission and reception during multi-node networking and supports dynamic network entry and exit of tower crane nodes. This effectively resolves the issue of data collisions occurring during wireless link transmission during the ad hoc wireless networking of tower crane anti-collision radio stations, making it suitable for tower crane anti-collision wireless ad hoc networking applications. The system boasts high network capacity, long communication range, and strong anti-interference capabilities, supporting networks of up to 20 nodes and a communication range of 2-3 kilometers, meeting the operational requirements of large-scale construction sites. The data rate and latency meet the real-time data transmission requirements of tower crane anti-collision, ensuring the safety of the tower crane anti-collision function. Network management is convenient and efficient, with strong robustness, and supports dynamic network entry and exit of tower crane anti-collision radio nodes to meet the actual operational needs of construction sites.
[0108] In this implementation, each radio station communicates using the aforementioned wireless ad hoc network communication method. The MAC protocol requires no additional network entry, exit, or maintenance protocols; it simply encapsulates a layer of MAC header information within the service data packet. This provides flexible and robust network management, and configurable network capacity, determined by physical layer parameters. The network boasts large capacity, long communication distances, and strong anti-interference capabilities, meeting the needs of a variety of scenarios. The system also features low system complexity, simple implementation, convenient installation and maintenance, and high cost-effectiveness.
[0109] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0110] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.
[0111] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0112] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0113] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0114] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0115] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can be implemented using any method or technology for information storage. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change RAM (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.
[0116] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0117] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A communication method for a wireless ad hoc network, characterized in that: Applied to the data link layer of the wireless ad hoc network, the wireless ad hoc network includes a plurality of nodes, each node communicates according to a time frame period, each node includes a listening mode and a transmitting mode, the method comprising: In the current time frame period, each node performs the following steps: receiving data in the listening mode and updating a node neighbor table based on the received data; Determine whether the data sending time has arrived based on the information of each neighbor node in the node neighbor table; When it is determined that the data transmission time has arrived, the mode is switched to the transmission mode to transmit the data, and after the data is successfully transmitted, the mode is switched to the listening mode.
2. The method according to claim 1, characterized in that The information of each neighbor node includes the network ID and data packet sending status of each neighbor node; The determining whether the data sending time has arrived according to the information of each neighbor node in the node neighbor table includes: Determine the nearest neighbor node based on the network ID of each neighbor node in the node neighbor table; Based on the data packet sending status of the nearest neighbor node, it is determined whether the data sending time has arrived.
3. The method according to claim 2, characterized in that The determining whether a data transmission time has arrived based on the data packet transmission status of the nearest neighbor node includes: When it is determined that the data packet sending state of the nearest neighbor node is sent, determining whether the channel is idle; When it is determined that the channel is idle, the arrival data transmission time is determined.
4. The method according to claim 3, characterized in that When determining that the data packet sending status of the nearest neighbor node is sent, determining whether the channel is idle includes: When it is determined that the data packet sending state of the nearest neighbor node is sent, judging whether the node is a minimum node based on the network ID of each neighbor node in the node neighbor table; When the node is determined to be the minimum node, it waits for the protection interval and then determines whether the channel is idle.
5. The method according to claim 2, characterized in that The determining whether a data transmission time has arrived based on the data packet transmission status of the nearest neighbor node includes: When it is determined that the data packet sending state of the nearest neighbor node is unsent, determining whether the reception has timed out based on a first timeout period; When it is determined that the reception has timed out, determining whether the channel is idle; When it is determined that the channel is idle, the arrival data transmission time is determined.
6. The method according to any one of claims 3 to 5, characterized in that Also includes: When it is determined that the channel is not idle, determining whether the transmission has timed out based on a second timeout period; If the transmission timeout is determined, the arrival data transmission time is determined.
7. The method according to claim 2, characterized in that The step of switching to the sending mode to send data when it is determined that the data sending time has arrived, and switching to the listening mode after the data has been successfully sent, comprises: When it is determined that the data transmission time has arrived, switching to the transmission mode to send the data, and clearing the data packet transmission status of each neighbor node in the node neighbor table; After the data is successfully sent, the mode is switched to the listening mode.
8. The method according to claim 1, characterized in that The method further comprises: The node to be connected to the network detects the wireless ad hoc network in the listening mode; When the wireless ad hoc network is detected, the node to be networked switches to the sending mode during an idle time slot of the time frame period to send data to join the wireless ad hoc network.
9. The method according to claim 8, characterized in that The detecting of the wireless ad hoc network by the node to be networked in the listening mode includes: The node to be networked switches to the listening mode after initialization to obtain data of multiple time frame periods, and constructs a neighbor table of the node to be networked based on the data of the multiple time frame periods; The node to be networked detects the wireless ad hoc network based on the neighbor table of the node to be networked.
10. The method according to claim 9, characterized in that The node to be networked switches to the sending mode to send data to join the wireless ad hoc network during the idle time slot phase of the time frame period, including: After the node to be networked obtains data sent by the last neighbor node in the neighbor table of the node to be networked, the node to be networked switches to the sending mode to send data in the idle time slot phase of the current time frame period to join the wireless ad hoc network.
11. The method according to claim 8, characterized in that The node to be networked switches to the sending mode to send data in an idle time slot phase of the current time frame period to join the wireless ad hoc network, including: The node to be connected to the network determines whether the channel is idle; When it is determined that the channel is idle, the node to be networked switches to the sending mode to send data in an idle time slot phase of the current time frame period to join the wireless ad hoc network.
12. The method according to claim 8, characterized in that The detecting of the wireless ad hoc network by the node to be networked in the listening mode includes: After initialization, the node to be networked generates a random factor, and obtains a delay time based on the random factor and the time frame period; After the delay time, the node to be networked switches to the listening mode to detect the wireless ad hoc network.
13. The method according to claim 8, characterized in that The node to be networked switches to the sending mode to send data to join the wireless ad hoc network during the idle time slot phase of the time frame period, including: The node to be connected to the network determines whether the number of nodes in the wireless ad hoc network reaches a preset node number threshold; When it is determined that the number of nodes in the wireless ad hoc network has not reached a preset node number threshold, the node to be networked switches to the sending mode to send data in an idle time slot phase of the time frame period to join the wireless ad hoc network.
14. The method according to claim 8, characterized in that The node to be networked switches to the sending mode to send data to join the wireless ad hoc network during the idle time slot phase of the time frame period, including: The node to be connected to the network determines whether there is an identical node in the wireless ad hoc network; When it is determined that the same node does not exist in the wireless ad hoc network, the node to be networked switches to the sending mode to send data in an idle time slot phase of the time frame period to join the wireless ad hoc network.
15. The method according to claim 8, characterized in that The method further comprises: In the case that the wireless ad hoc network is not detected, the node to be networked switches to the sending mode to periodically send data to establish a new wireless ad hoc network.
16. The method according to claim 1, wherein Also includes: After the data is successfully sent, the current timestamp is compared with the data packet receiving timestamp of each node in the node neighbor table to obtain the comparison results of each node; Determine the node to be de-networked based on the comparison results of the nodes; The node that has left the network is deleted from the node neighbor table to update the node neighbor table.
17. The method according to claim 1, wherein The step of switching to the sending mode to send data when it is determined that the data sending time has arrived includes: When the arrival data transmission time is determined, the number of data transmission times is determined; Based on the number of data transmissions, determining whether a preset data transmission condition is met, the preset data transmission condition being that data is transmitted only once within a time frame period; When it is determined that the preset data sending condition is met, the data is switched to the sending mode.
18. A wireless ad hoc network communication system, characterized in that: The invention comprises a plurality of radio stations, each of which communicates by adopting the communication method of the wireless ad hoc network according to any one of claims 1 to 17, and each of the radio stations is a node of the wireless ad hoc network.
19. The system according to claim 18, wherein: Each of the radio stations includes: a control module and a radio frequency module, the control module is connected to the radio frequency module, and the control module is used to run the communication method of the wireless ad hoc network according to any one of claims 1 to 17.
Citation Information
Cited By
Timing coordination method of distributed radar and radar system
CN122269434A
Method for timing coordination of distributed radars and radar system
CN122269434B
