A clustering network optimization method, device and equipment for wireless ad hoc network and medium
Patent Information
- Application Number
- CN202511268433.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-05
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2045-09-05
AI Technical Summary
现有机制在这些过程中往往缺乏快速、平滑的簇重构策略,容易引起网络振荡、控制报文激增以及通信延迟上升,进一步削弱了网络的适应性和稳定性
[0043]相较于传统分簇机制,上述一种无线自组网的分簇组网优化方法、装置、设备及介质,根据无线自组网中各节点的广播帧侦听情况,自主选举每个分簇中的主节点并搜索分簇内各节点的父节点以确保各节点申请入网进行广播帧周期性发送,其中由于主节点和父节点可为分簇内的任一节点,使得分簇中的簇首节点与主节点不一定为同一节点,从而能够在簇首节点失效时,本分簇内的其它节点仍可基于非簇首节点的主节点持续播放广播帧并维持正常的簇内组网通信,避免了簇内组网通信中断,提高了簇内组网通信的可靠性和稳定性;并且,在簇首节点失效或子簇分裂引发的组网通信失效时,能够重新自主选举新的主节点和簇首节点,快速重构簇内和簇间组网通信,进一步提升了无线自组网整体的稳定性,提高了无线自组网在复杂环境下的自适应能力。
Smart Images

Figure CN121056909B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless ad hoc network clustering technology, and in particular to a method, apparatus, device and medium for optimizing wireless ad hoc network clustering. Background Technology
[0002] Existing clustering networking technology effectively improves network scalability and management efficiency by dividing nodes in a large-scale wireless ad hoc network into multiple clusters. Each cluster elects a cluster head node, which together form the backbone network and is responsible for forwarding and coordinating data between clusters. Member nodes within a cluster have equal status and communicate within a local area. This structure significantly reduces network control overhead and resource consumption, and is particularly suitable for large-scale ad hoc network scenarios with a large number of nodes and a wide distribution range.
[0003] However, traditional clustering mechanisms have several inherent flaws that severely impact the robustness and continuity of the network. First, the cluster head node, as the master node within the cluster, undertakes critical functions such as broadcast frame transmission, link maintenance, and routing forwarding. If the cluster head node fails due to energy depletion, movement, or malfunction, the remaining nodes in the cluster will lose their communication coordination center, leading to local network interruption or even paralysis, and a significant decrease in network availability. Second, in dynamic network environments, node movement or topology changes may trigger reconfiguration processes such as sub-cluster splitting or cluster merging. Existing mechanisms often lack fast and smooth cluster reconfiguration strategies during these processes, easily causing network oscillations, a surge in control messages, and increased communication latency, further weakening the network's adaptability and stability. Therefore, it is urgent to optimize existing clustering networking technologies to improve their robustness and adaptability in dynamic environments. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, device, and medium for optimizing clustering of wireless ad hoc networks to address the aforementioned technical problems.
[0005] A method for optimizing clustered networking in a wireless ad hoc network, the method comprising:
[0006] Step 1: Pre-elect the cluster head node for each sub-cluster in the wireless ad hoc network;
[0007] Step 2: Start all nodes and enable each node to listen for broadcast frames in its corresponding operating frequency band. Based on the broadcast frame listening, each node will autonomously elect a master node in each cluster and search for the parent node of each node in the cluster. The master node or the parent node will periodically send broadcast frames according to the network access application of the master node or the parent node. The master node and the parent node can be any node in the cluster.
[0008] Step 3: Through the broadcast frame transmission between nodes within the cluster after joining the network, all nodes in each sub-cluster can join the network and communicate within the corresponding sub-cluster network. Through the broadcast frame transmission between the cluster head nodes after joining the network, all cluster head nodes can join the network in the cluster head network and communicate between clusters. Network communication monitoring is started simultaneously.
[0009] Step 4: When the cluster head node of a certain cluster fails, determine whether the cluster head node is the master node of the current cluster, and obtain the intra-cluster network communication status and inter-cluster network communication status of the current cluster.
[0010] Step 5: When a subcluster split caused by node movement is detected, the intra-cluster network communication status and inter-cluster network communication status of the subnet are obtained by determining whether the resulting subnet is within the communication range of the original cluster master node or cluster head node.
[0011] Step 6: When intra-cluster network communication failure is detected, a new master node is re-elected and intra-cluster network communication is reconstructed according to Step 2; when inter-cluster network communication failure is detected, the cluster head search mechanism is started to search for a new cluster head node and reconstruct inter-cluster network communication.
[0012] In one embodiment, the method further includes:
[0013] Step 7: When the cluster head node of a certain cluster fails and any node in the current cluster moves to the communication range of a node in another cluster and receives a broadcast frame from the other cluster node, the network communication state of the current cluster and the inter-cluster network communication state are initialized. The other cluster node that sent the broadcast frame is taken as the parent node and the node applies to join the network from the other cluster. After joining the network, the other nodes in the current cluster apply to join the network in turn according to the broadcast frames received from the other cluster nodes, until the cluster fusion is completed and the network communication of the fused cluster is monitored.
[0014] In one embodiment, based on the broadcast frame monitoring, a master node is autonomously elected in each cluster, and the parent node of each node within the cluster is searched. Broadcast frames are then periodically sent based on the master node's or parent node's application to join the network, including:
[0015] If any node in a cluster does not detect a broadcast frame from another node in the cluster within a preset time period, it indicates that there is no master node in the current cluster. The current node will automatically become the master node and start sending broadcast frames, waiting for other nodes in the cluster to receive the broadcast frames and apply to join the network.
[0016] If any node in a cluster detects a broadcast frame from another node in the cluster within a preset time period, it indicates that there is a master node in the current cluster. The current node will take the node that sent the broadcast frame as its parent node and apply to join the network. After each node joins the network, it will conduct normal business communication and periodically send broadcast frames to maintain and update the network communication status.
[0017] In one embodiment, after searching the master node of each cluster or the parent node of each node within the cluster, the method further includes:
[0018] Determine whether the master node and parent node are cluster head nodes. If they are, set the cluster head flag field in the broadcast frame sent by the cluster head node to announce the existence of the cluster head node in other nodes within the sub-cluster. If they are not, each node updates the status of the cluster head node based on the currently received broadcast frame.
[0019] In one embodiment, the cluster head node uses the Ln band to access the subnet of its own sub-cluster and communicate within the cluster, while using the L0 band to access the network of the cluster head and communicate between clusters. Other nodes in each sub-cluster also use the Ln band to access the subnet of their own sub-cluster and communicate within the cluster.
[0020] In one embodiment, step 4 includes: when it is detected that other nodes in a certain cluster have not received broadcast frames from the cluster head node of the current cluster for several consecutive periods, it indicates that the cluster head node of the current cluster has failed, and it is determined whether the cluster head node is the master node of the current cluster. If yes, it is determined that the intra-cluster network communication and inter-cluster network communication of the current cluster are both in a failed state; if no, it is determined that other nodes in the current cluster continue to maintain normal intra-cluster network communication according to the master node, and the inter-cluster network communication is determined to be in a failed state.
[0021] In one embodiment, step 5 includes: when it is detected that some member nodes within a certain cluster have separated from other member nodes due to movement to form multiple subnets, it indicates that the current cluster has split into subclusters, and it is determined whether the resulting subnets are within the communication range of the master node or cluster head node of the original cluster. If they are not within the communication range of the master node, it indicates that there is no master node in the subnet, and the intra-cluster networking communication of the subnet is determined to be in a failed state; if they are not within the communication range of the cluster head node, it indicates that there is no cluster head node in the subnet, and the inter-cluster networking communication of the subnet is determined to be in a failed state; if they are within the communication range of both the master node and the cluster head node, it indicates that there is a master node and a cluster head node in the subnet, and the intra-cluster networking communication and inter-cluster networking communication of the subnet are both in a normal state.
[0022] A clustering optimization device for a wireless ad hoc network, the device comprising:
[0023] The cluster head election module is used to pre-elect the cluster head node for each sub-cluster in the wireless ad hoc network;
[0024] The network access application module is used to start all nodes, enabling each node to listen for broadcast frames in its corresponding operating frequency band. Based on the broadcast frame listening situation, it autonomously elects the master node in each cluster and searches for the parent node of each node in the cluster. It then periodically sends broadcast frames based on the network access application from the master node or the parent node. The master node and the parent node can be any node in the cluster.
[0025] The networking communication module is used to enable all nodes in each sub-cluster to join the network and communicate within the corresponding sub-cluster network through broadcast frame transmission between nodes within the cluster after joining the network. It also enables all cluster head nodes to join the network in the cluster head network and communicate between clusters through broadcast frame transmission between cluster head nodes after joining the network, and synchronously starts networking communication monitoring.
[0026] The cluster head failure module is used to determine whether the cluster head node is the master node of the current cluster and obtain the intra-cluster network communication status and inter-cluster network communication status of the current cluster when the cluster head node of a certain cluster is detected to be in failure.
[0027] The subcluster splitting module is used to determine whether the resulting subcluster is within the communication range of the original cluster's master node or cluster head node when a subcluster splitting is detected due to node movement. It then obtains the intra-cluster and inter-cluster network communication status of the subcluster.
[0028] The communication reconstruction module is used to autonomously re-elect a new master node and reconstruct intra-cluster network communication based on the application to join the network module when intra-cluster network communication failure is detected; when inter-cluster network communication failure is detected, the cluster head search mechanism is activated to search for a new cluster head node and reconstruct inter-cluster network communication.
[0029] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program performing the following steps:
[0030] Step 1: Pre-elect the cluster head node for each sub-cluster in the wireless ad hoc network;
[0031] Step 2: Start all nodes and enable each node to listen for broadcast frames in its corresponding operating frequency band. Based on the broadcast frame listening, each node will autonomously elect a master node in each cluster and search for the parent node of each node in the cluster. The master node or the parent node will periodically send broadcast frames according to the network access application of the master node or the parent node. The master node and the parent node can be any node in the cluster.
[0032] Step 3: Through the broadcast frame transmission between nodes within the cluster after joining the network, all nodes in each sub-cluster can join the network and communicate within the corresponding sub-cluster network. Through the broadcast frame transmission between the cluster head nodes after joining the network, all cluster head nodes can join the network in the cluster head network and communicate between clusters. Network communication monitoring is started simultaneously.
[0033] Step 4: When the cluster head node of a certain cluster fails, determine whether the cluster head node is the master node of the current cluster, and obtain the intra-cluster network communication status and inter-cluster network communication status of the current cluster.
[0034] Step 5: When a subcluster split caused by node movement is detected, the intra-cluster network communication status and inter-cluster network communication status of the subnet are obtained by determining whether the resulting subnet is within the communication range of the original cluster master node or cluster head node.
[0035] Step 6: When intra-cluster network communication failure is detected, a new master node is re-elected and intra-cluster network communication is reconstructed according to Step 2; when inter-cluster network communication failure is detected, the cluster head search mechanism is started to search for a new cluster head node and reconstruct inter-cluster network communication.
[0036] A computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0037] Step 1: Pre-elect the cluster head node for each sub-cluster in the wireless ad hoc network;
[0038] Step 2: Start all nodes and enable each node to listen for broadcast frames in its corresponding operating frequency band. Based on the broadcast frame listening, each node will autonomously elect a master node in each cluster and search for the parent node of each node in the cluster. The master node or the parent node will periodically send broadcast frames according to the network access application of the master node or the parent node. The master node and the parent node can be any node in the cluster.
[0039] Step 3: Through the broadcast frame transmission between nodes within the cluster after joining the network, all nodes in each sub-cluster can join the network and communicate within the corresponding sub-cluster network. Through the broadcast frame transmission between the cluster head nodes after joining the network, all cluster head nodes can join the network in the cluster head network and communicate between clusters. Network communication monitoring is started simultaneously.
[0040] Step 4: When the cluster head node of a certain cluster fails, determine whether the cluster head node is the master node of the current cluster, and obtain the intra-cluster network communication status and inter-cluster network communication status of the current cluster.
[0041] Step 5: When a subcluster split caused by node movement is detected, the intra-cluster network communication status and inter-cluster network communication status of the subnet are obtained by determining whether the resulting subnet is within the communication range of the original cluster master node or cluster head node.
[0042] Step 6: When intra-cluster network communication failure is detected, a new master node is re-elected and intra-cluster network communication is reconstructed according to Step 2; when inter-cluster network communication failure is detected, the cluster head search mechanism is started to search for a new cluster head node and reconstruct inter-cluster network communication.
[0043] Compared to traditional clustering mechanisms, the aforementioned clustering optimization method, apparatus, device, and medium for wireless ad hoc networks autonomously elect a master node in each cluster and search for the parent node of each node within the cluster based on the broadcast frame listening status of each node in the wireless ad hoc network. This ensures that each node's application to join the network periodically transmits broadcast frames. Since the master node and parent node can be any node within the cluster, the cluster head node and the master node are not necessarily the same node. This allows other nodes in the same cluster to continue broadcasting frames and maintain normal intra-cluster network communication even when the cluster head node fails, based on the master node (which is not the cluster head node). This avoids interruption of intra-cluster network communication and improves the reliability and stability of intra-cluster network communication. Furthermore, when the cluster head node fails or network communication fails due to sub-cluster splitting, new master nodes and cluster head nodes can be autonomously elected again to quickly reconstruct intra-cluster and inter-cluster network communication, further improving the overall stability of the wireless ad hoc network and enhancing its adaptability in complex environments. Attached Figure Description
[0044] Figure 1 This is a flowchart illustrating a clustering optimization method for a wireless ad hoc network in one embodiment.
[0045] Figure 2 This is a schematic diagram of a clustered network topology in one embodiment;
[0046] Figure 3 This is a schematic diagram illustrating the process of each node periodically sending broadcast frames when applying to join the network in one embodiment;
[0047] Figure 4 This is a schematic diagram of a cluster head failure topology in one embodiment;
[0048] Figure 5 This is a schematic diagram of the sub-cluster splitting topology in one embodiment;
[0049] Figure 6 This is a schematic diagram of the cluster fusion topology in one embodiment;
[0050] Figure 7 This is a schematic diagram of the internal structure of a computer device in one embodiment. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0052] In one embodiment, such as Figure 1 As shown, a clustering optimization method for wireless ad hoc networks is provided, including the following steps:
[0053] Step 1: Pre-elect the cluster head node for each sub-cluster in the wireless ad hoc network.
[0054] Clustered network topology such as Figure 2 As shown, nodes within the same cluster communicate intra-cluster on an equal footing, and cluster heads communicate inter-cluster on an equal footing. Nodes in different clusters communicate through their respective cluster heads. The network size within a single cluster is relatively small, effectively reducing network overhead and demonstrating good performance in large-scale networks. Cluster head nodes have multiple communication modules in different frequency bands. Cluster head nodes communicate with each other via frequency band L0, while each cluster communicates within its own frequency band Ln.
[0055] Step 2: Start all nodes and enable each node to listen for broadcast frames in its corresponding operating frequency band. Based on the broadcast frame listening situation, each node will autonomously elect a master node in each cluster and search for the parent node of each node in the cluster. The master node or the parent node will periodically send broadcast frames according to the network access application of the master node or the parent node. The master node and the parent node can be any node in the cluster.
[0056] The specific process for each node to apply for network access and periodically send broadcast frames is as follows: Figure 3 As shown, it includes:
[0057] Each node powers on and listens for broadcast frames within its corresponding operating frequency band. If any node in a cluster does not hear a broadcast frame from another node in the cluster within a preset time period, it indicates that there is no master node in the current cluster. The current node then automatically becomes the master node and begins sending broadcast frames, waiting for other nodes in the cluster to receive the broadcast frames and apply to join the network. If any node in a cluster hears a broadcast frame from another node in the cluster within a preset time period, it indicates that there is a master node in the current cluster. The current node then designates the node that sent the broadcast frame as its parent node and applies to join the network. After joining the network, each node performs normal service communication and periodically sends broadcast frames to maintain and update the network communication status.
[0058] After searching for the master node or the parent node of each node in each cluster, it is further determined whether the master node and the parent node are cluster head nodes. If they are, the cluster head flag field is set in the broadcast frame sent by the cluster head node to announce the existence of the cluster head node in other nodes in this cluster. If they are not, each node updates the status of the cluster head node based on the broadcast frame it currently receives.
[0059] It should be understood that since the master node is automatically elected, it may be any node within the cluster, and the master node and the cluster head node are not necessarily the same node. Thus, even if the cluster head node fails, other nodes within the cluster can still maintain normal intra-cluster networking communication based on the master node that is not the cluster head node.
[0060] Step 3: Through the broadcast frame transmission between nodes within the cluster after joining the network, all nodes in each sub-cluster can join the network and communicate within the corresponding sub-cluster network. Through the broadcast frame transmission between the cluster head nodes after joining the network, all cluster head nodes can join the network in the cluster head network and communicate between clusters. Simultaneously, network communication monitoring is started.
[0061] The cluster head node uses the Ln band to access the subnet of its own sub-cluster and communicate within the cluster, while using the L0 band to access the network of the cluster head and communicate between clusters. All other nodes in each sub-cluster use the Ln band to access the subnet of their own sub-cluster and communicate within the cluster.
[0062] Step 4: When the cluster head node of a certain cluster fails, determine whether the cluster head node is the master node of the current cluster, and obtain the intra-cluster network communication status and inter-cluster network communication status of the current cluster.
[0063] Cluster head failure topology such as Figure 4 As shown, when other nodes within a cluster fail to receive broadcast frames from the cluster head node for several consecutive periods, it indicates that the current cluster head node has failed. It is then determined whether the cluster head node is the master node of the current cluster. If yes, it is determined that both intra-cluster network communication and inter-cluster network communication of the current cluster are in a failed state. If no, it is determined that other nodes in the current cluster continue to maintain normal intra-cluster network communication according to the master node, and inter-cluster network communication is determined to be in a failed state.
[0064] Step 5: When a sub-cluster split caused by node movement is detected, the intra-cluster network communication status and inter-cluster network communication status of the sub-network are obtained by determining whether the resulting sub-network is within the communication range of the original cluster's master node or cluster head node.
[0065] Subcluster splitting topology as Figure 5As shown, when monitoring detects that some member nodes within a cluster have separated from other member nodes due to movement, forming multiple subnets, it indicates that the current cluster has experienced sub-cluster splitting. The system then determines whether the resulting subnets are within the communication range of the original cluster's master node or cluster head node. If they are not within the master node's communication range, it means there is no master node in the subnet, and the intra-cluster network communication of the subnet is considered invalid. If they are not within the cluster head node's communication range, it means there is no cluster head node in the subnet, and the inter-cluster network communication of the subnet is considered invalid. If they are within the communication range of both the master node and the cluster head node, it means there are both a master node and a cluster head node in the subnet, and both intra-cluster and inter-cluster network communication of the subnet are considered normal.
[0066] Step 6: When intra-cluster network communication failure is detected, a new master node is re-elected and intra-cluster network communication is reconstructed according to Step 2; when inter-cluster network communication failure is detected, the cluster head search mechanism is started to search for a new cluster head node and reconstruct inter-cluster network communication.
[0067] After the cluster head search mechanism is activated, each node in a cluster takes turns scanning for the existence of other clusters at various frequency points of Ln during its own idle time slots. When a cluster is detected, it applies to join the network and performs cluster fusion. Based on the cluster head node of the fused cluster, the inter-cluster network communication is reconstructed.
[0068] The aforementioned clustering optimization method for wireless ad hoc networks enables other nodes within the same cluster to continue broadcasting frames and maintain normal intra-cluster network communication even when the cluster head node fails, based on the self-elected non-cluster head node as the master node. This avoids interruption of intra-cluster network communication and improves the reliability and stability of intra-cluster network communication. Furthermore, when network communication fails due to cluster head node failure or sub-cluster split, new master nodes and cluster head nodes can be self-elected to quickly reconstruct intra-cluster and inter-cluster network communication, further enhancing the overall stability of the wireless ad hoc network and improving its adaptability in complex environments.
[0069] In one embodiment, the method further includes:
[0070] Step 7: When the cluster head node of a certain cluster fails and, due to node movement, any node in the current cluster reaches the communication range of a node in another cluster and receives a broadcast frame from that node, the network communication state of the current cluster and the inter-cluster network communication state are initialized. The node from the other cluster that sent the broadcast frame is then designated as the parent node, and the node requests network access from the other cluster. After network access is completed, other nodes in the current cluster sequentially request network access based on the received broadcast frames from other cluster nodes, until cluster fusion is completed and network communication monitoring is performed on the fused clusters. The cluster fusion topology is as follows: Figure 6 As shown.
[0071] In one embodiment, a clustering optimization device for a wireless ad hoc network is provided, comprising:
[0072] The cluster head election module is used to pre-elect the cluster head node for each sub-cluster in the wireless ad hoc network;
[0073] The network access application module is used to start all nodes, enabling each node to listen for broadcast frames in its corresponding operating frequency band. Based on the broadcast frame listening situation, it autonomously elects the master node in each cluster and searches for the parent node of each node in the cluster. It then periodically sends broadcast frames based on the network access application from the master node or the parent node. The master node and the parent node can be any node in the cluster.
[0074] The networking communication module is used to enable all nodes in each sub-cluster to join the network and communicate within the corresponding sub-cluster network through broadcast frame transmission between nodes within the cluster after joining the network. It also enables all cluster head nodes to join the network in the cluster head network and communicate between clusters through broadcast frame transmission between cluster head nodes after joining the network, and synchronously starts networking communication monitoring.
[0075] The cluster head failure module is used to determine whether the cluster head node is the master node of the current cluster and obtain the intra-cluster network communication status and inter-cluster network communication status of the current cluster when the cluster head node of a certain cluster is detected to be in failure.
[0076] The subcluster splitting module is used to determine whether the resulting subcluster is within the communication range of the original cluster's master node or cluster head node when a subcluster splitting is detected due to node movement. It then obtains the intra-cluster and inter-cluster network communication status of the subcluster.
[0077] The communication reconstruction module is used to autonomously re-elect a new master node and reconstruct intra-cluster network communication based on the application to join the network module when intra-cluster network communication failure is detected; when inter-cluster network communication failure is detected, the cluster head search mechanism is activated to search for a new cluster head node and reconstruct inter-cluster network communication.
[0078] Furthermore, the above-mentioned device also includes: a cluster fusion module, used to initialize the network communication state and inter-cluster network communication state of the current cluster when the cluster head node of a certain cluster fails and due to node movement, any node in the current cluster reaches the communication range of a node in another cluster and receives a broadcast frame from the other cluster node. The module uses the other cluster node that sent the broadcast frame as the parent node to apply to the other cluster for network access. After the network access is completed, other nodes in the current cluster apply to network access in sequence according to the broadcast frames received from the other cluster nodes, until the cluster fusion is completed and the network communication of the fused cluster is monitored.
[0079] Specific limitations regarding the clustering optimization device for a wireless ad hoc network can be found in the limitations of the clustering optimization method for a wireless ad hoc network described above, and will not be repeated here. Each module in the aforementioned clustering optimization device for a wireless ad hoc network can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0080] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a clustering optimization method for a wireless ad hoc network. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0081] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0082] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to perform the following steps:
[0083] Step 1: Pre-elect the cluster head node for each sub-cluster in the wireless ad hoc network;
[0084] Step 2: Start all nodes and enable each node to listen for broadcast frames in its corresponding operating frequency band. Based on the broadcast frame listening, each node will autonomously elect a master node in each cluster and search for the parent node of each node in the cluster. The master node or the parent node will periodically send broadcast frames according to the network access application of the master node or the parent node. The master node and the parent node can be any node in the cluster.
[0085] Step 3: Through the broadcast frame transmission between nodes within the cluster after joining the network, all nodes in each sub-cluster can join the network and communicate within the corresponding sub-cluster network. Through the broadcast frame transmission between the cluster head nodes after joining the network, all cluster head nodes can join the network in the cluster head network and communicate between clusters. Network communication monitoring is started simultaneously.
[0086] Step 4: When the cluster head node of a certain cluster fails, determine whether the cluster head node is the master node of the current cluster, and obtain the intra-cluster network communication status and inter-cluster network communication status of the current cluster.
[0087] Step 5: When a subcluster split caused by node movement is detected, the intra-cluster network communication status and inter-cluster network communication status of the subnet are obtained by determining whether the resulting subnet is within the communication range of the original cluster master node or cluster head node.
[0088] Step 6: When intra-cluster network communication failure is detected, a new master node is re-elected and intra-cluster network communication is reconstructed according to Step 2; when inter-cluster network communication failure is detected, the cluster head search mechanism is started to search for a new cluster head node and reconstruct inter-cluster network communication.
[0089] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0090] Step 1: Pre-elect the cluster head node for each sub-cluster in the wireless ad hoc network;
[0091] Step 2: Start all nodes and enable each node to listen for broadcast frames in its corresponding operating frequency band. Based on the broadcast frame listening, each node will autonomously elect a master node in each cluster and search for the parent node of each node in the cluster. The master node or the parent node will periodically send broadcast frames according to the network access application of the master node or the parent node. The master node and the parent node can be any node in the cluster.
[0092] Step 3: Through the broadcast frame transmission between nodes within the cluster after joining the network, all nodes in each sub-cluster can join the network and communicate within the corresponding sub-cluster network. Through the broadcast frame transmission between the cluster head nodes after joining the network, all cluster head nodes can join the network in the cluster head network and communicate between clusters. Network communication monitoring is started simultaneously.
[0093] Step 4: When the cluster head node of a certain cluster fails, determine whether the cluster head node is the master node of the current cluster, and obtain the intra-cluster network communication status and inter-cluster network communication status of the current cluster.
[0094] Step 5: When a subcluster split caused by node movement is detected, the intra-cluster network communication status and inter-cluster network communication status of the subnet are obtained by determining whether the resulting subnet is within the communication range of the original cluster master node or cluster head node.
[0095] Step 6: When intra-cluster network communication failure is detected, a new master node is re-elected and intra-cluster network communication is reconstructed according to Step 2; when inter-cluster network communication failure is detected, the cluster head search mechanism is started to search for a new cluster head node and reconstruct inter-cluster network communication.
[0096] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0097] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0098] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application.
Claims
1. A method for optimizing clustered networking in a wireless ad hoc network, characterized in that, The method includes: Step 1: Pre-elect the cluster head node for each sub-cluster in the wireless ad hoc network; Step 2: Start all nodes and enable each node to listen for broadcast frames in its corresponding operating frequency band. Based on the broadcast frame listening situation, each node will autonomously elect a master node in each cluster and search for the parent node of each node in the cluster. The master node or parent node will periodically send broadcast frames according to the network access application of the master node or parent node. The master node and parent node can be any node in the cluster. Step 3: Through the broadcast frame transmission between nodes within the cluster after joining the network, all nodes in each sub-cluster can join the network and communicate within the corresponding sub-cluster network. Through the broadcast frame transmission between the cluster head nodes after joining the network, all cluster head nodes can join the network in the cluster head network and communicate between clusters. Network communication monitoring is started simultaneously. Step 4: When the cluster head node of a certain cluster fails, the intra-cluster network communication status and inter-cluster network communication status of the current cluster are obtained by determining whether the cluster head node is the master node of the current cluster. Step 5: When a subcluster split caused by node movement is detected, the intra-cluster network communication status and inter-cluster network communication status of the subnet are obtained by determining whether the resulting subnet is within the communication range of the original cluster master node or cluster head node. Step 6: When intra-cluster network communication failure is detected, a new master node is re-elected and intra-cluster network communication is reconstructed according to Step 2; when inter-cluster network communication failure is detected, the cluster head search mechanism is started to search for a new cluster head node and reconstruct inter-cluster network communication.
2. The method for optimizing clustered networking in a wireless ad hoc network according to claim 1, characterized in that, The method further includes: Step 7: When the cluster head node of a certain cluster fails and any node in the current cluster moves to the communication range of a node in another cluster and receives a broadcast frame from the other cluster node, the network communication state of the current cluster and the inter-cluster network communication state are initialized. The other cluster node that sent the broadcast frame is taken as the parent node and the node applies to join the network from the other cluster. After joining the network, the other nodes in the current cluster apply to join the network in turn according to the broadcast frames received from the other cluster nodes, until the cluster fusion is completed and the network communication of the fused cluster is monitored.
3. The method for optimizing clustered networking in a wireless ad hoc network according to claim 1, characterized in that, Based on the broadcast frame monitoring, the system autonomously elects a master node in each cluster and searches for the parent node of each node within the cluster. It then periodically sends broadcast frames based on the master node's or parent node's network access request, including: If any node in a cluster does not detect a broadcast frame from another node in the cluster within a preset time period, it indicates that there is no master node in the current cluster. The current node will automatically become the master node and start sending broadcast frames, waiting for other nodes in the cluster to receive the broadcast frames and apply to join the network. If any node in a cluster detects a broadcast frame from another node in the cluster within a preset time period, it indicates that there is a master node in the current cluster. The current node will take the node that sent the broadcast frame as its parent node and apply to join the network. After each node joins the network, it will conduct normal business communication and periodically send broadcast frames to maintain and update the network communication status.
4. The method for optimizing clustered networking in a wireless ad hoc network according to claim 3, characterized in that, After searching the master node of each cluster or the parent node of each node within a cluster, the process also includes: Determine whether the master node and parent node are cluster head nodes. If they are, set a cluster head tag field in the broadcast frame sent by the cluster head node to announce the existence of cluster head nodes in other nodes within the sub-cluster. If they are not, each node updates the status of the cluster head node based on the currently received broadcast frame.
5. The method for optimizing clustered networking in a wireless ad hoc network according to claim 4, characterized in that, The cluster head node uses the Ln frequency band to access the subnet of its own sub-cluster and communicate within the cluster. At the same time, it uses the L0 frequency band to access the network of the cluster head and communicate between clusters. Other nodes in each sub-cluster also use the Ln frequency band to access the subnet of their own sub-cluster and communicate within the cluster.
6. The method for optimizing clustered networking in a wireless ad hoc network according to claim 1, characterized in that, Step 4 includes: When monitoring shows that other nodes within a cluster have not received broadcast frames from the cluster head node for several consecutive periods, it indicates that the current cluster head node has failed. It is then determined whether the cluster head node is the master node of the current cluster. If it is, it is determined that both intra-cluster network communication and inter-cluster network communication of the current cluster are in a failed state. If it is not, it is determined that other nodes in the current cluster continue to maintain normal intra-cluster network communication according to the master node, and inter-cluster network communication is determined to be in a failed state.
7. The method for optimizing clustered networking in a wireless ad hoc network according to claim 1, characterized in that, Step 5 includes: When monitoring detects that some member nodes within a cluster have separated from other member nodes due to movement, forming multiple subnets, it indicates that a subcluster split has occurred in the current cluster. The system then determines whether the resulting subnets are within the communication range of the original cluster's master node or cluster head node. If they are not within the master node's communication range, it means there is no master node in the subnet, and the intra-cluster network communication of the subnet is considered invalid. If they are not within the cluster head node's communication range, it means there is no cluster head node in the subnet, and the inter-cluster network communication of the subnet is considered invalid. If they are within the communication range of both the master node and the cluster head node, it means there are both a master node and a cluster head node in the subnet, and both intra-cluster and inter-cluster network communication of the subnet are considered normal.
8. A clustering optimization device for a wireless ad hoc network, characterized in that, The device includes: The cluster head election module is used to pre-elect the cluster head node for each sub-cluster in the wireless ad hoc network; The network access application module is used to start all nodes, enabling each node to listen for broadcast frames in its corresponding operating frequency band. Based on the broadcast frame listening situation, it autonomously elects a master node in each cluster and searches for the parent node of each node in the cluster. It then periodically sends broadcast frames based on the network access application submitted by the master node or parent node. The master node and parent node can be any node in the cluster. The networking communication module is used to enable all nodes in each sub-cluster to join the network and communicate within the corresponding sub-cluster network through broadcast frame transmission between nodes within the cluster after joining the network. It also enables all cluster head nodes to join the network in the cluster head network and communicate between clusters through broadcast frame transmission between cluster head nodes after joining the network, and synchronously starts networking communication monitoring. The cluster head failure module is used to determine whether the cluster head node of a certain sub-cluster is the master node of the current sub-cluster, and obtain the intra-cluster network communication status and inter-cluster network communication status of the current sub-cluster when the cluster head node of a certain sub-cluster is detected to be failed. The subcluster splitting module is used to determine whether the resulting subcluster is within the communication range of the original cluster's master node or cluster head node when a subcluster splitting is detected due to node movement. It then obtains the intra-cluster and inter-cluster network communication status of the subcluster. The communication reconstruction module is used to autonomously re-elect a new master node and reconstruct intra-cluster network communication based on the application to join the network module when intra-cluster network communication failure is detected; when inter-cluster network communication failure is detected, the cluster head search mechanism is activated to search for a new cluster head node and reconstruct inter-cluster network communication.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Routing method for unmanned aerial vehicle network communication
CN111556550A
Multi-node cooperation unmanned aerial vehicle ad hoc network clustering topology reconstruction method
CN113271643A