Robust routing method for unmanned aerial vehicle cluster based on multi-gateway fast switching
By employing a multi-gateway fast switching method in the drone network, and using the Batman-adv protocol and ARP caching optimization, the problem of data loss caused by gateway failure in the drone network was solved, and fast and stable data transmission was achieved.
Patent Information
- Application Number
- CN202411357498.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2044-09-27
AI Technical Summary
Existing drone networks cannot quickly respond to gateway failures in multi-gateway environments, resulting in data loss and excessively long switching times, failing to meet the stability requirements of practical applications.
A fast switching method based on multiple gateways is adopted. The Batman-adv protocol is used to form a drone self-organizing network. The same IP address is assigned to all gateways. The neighbor discovery process of the IP protocol stack is optimized. By optimizing the aging time of ARP cache entries, non-gateway drones periodically send ARP requests to detect gateway connections and obtain the MAC addresses of other available gateways.
It enables rapid switching to other available gateways in the event of a gateway failure, reducing network connection interruption time and ensuring the stability and reliability of data transmission. The switching time has been reduced from 20 seconds to less than 0.4363 seconds.
Smart Images

Figure CN119299358B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gateway switching in multi-UAV network systems, and more particularly to a robust routing method for UAV swarms based on fast switching of multiple gateways. Background Technology
[0002] Drones can be used for temporary deployment of communication networks in disaster-stricken and remote areas, participation in search and rescue operations in disaster-stricken areas, and monitoring of environmental data in the wild. In data acquisition scenarios, multiple drones collaborate to complete data collection tasks. Non-gateway drones periodically monitor real-time data and send the data to the gateway drone via a self-organizing network. The gateway drone then transmits the data to the backend cloud server via cellular or satellite networks. As the core hub for data transmission, the stability of the gateway drone is crucial to the reliability of the entire system. To avoid single points of failure, most existing drone networks use multiple gateways so that they can switch to other working gateways in case of gateway failure.
[0003] However, due to the instability of wireless network environments and the complexity of actual geographical environments, communication links often face various interferences and potential risks. Insufficient power supply, sudden failures, and dynamic adjustments to the network topology can all cause a gateway to exit the network, affecting other data-collecting drones connected to that gateway and resulting in data loss. Furthermore, restoring the gateway's drone functionality takes time, exacerbating data loss. In practical applications, it is generally desirable for another gateway to take over its responsibilities after a gateway failure, with the shortest possible switchover time. However, existing drone routing protocols cannot adapt to multiple gateways and do not consider gateway failure issues in multi-gateway drone scenarios. For example, the gateway switching latency of the Batman-adv routing protocol can reach 32 seconds, which cannot effectively cope with sudden failures in real-world applications. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to address the deficiencies mentioned in the background art by providing a robust routing method for drone swarms based on fast switching of multiple gateways.
[0005] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0006] A robust routing method for drone swarms based on fast switching across multiple gateways, wherein the drone swarm comprises m drones capable of 4G communication and n drones unable to communicate via 4G, includes the following steps:
[0007] Step 1) Use m drones capable of 4G communication as gateway nodes and n drones that cannot communicate via 4G as data collection nodes. The backend cloud server is used to receive, process and forward data traffic from the gateway nodes.
[0008] Step 2), m drones capable of 4G communication establish TCP network connections with the backend cloud server;
[0009] Step 3) All drones start the Batman-adv protocol, run the protocol parameter configuration script, initialize their neighbor list configuration, and periodically send broadcast messages to neighbor nodes to perform neighbor detection;
[0010] Step 4): Each drone uses the Batman-adv routing algorithm to calculate the optimal path to other nodes in the network based on the received broadcast message and its neighbor list, and updates its source node list and routing table.
[0011] Step 5) The gateway node broadcasts its gateway status to other nodes. After receiving the data, the data collection node updates its gateway list, selects the gateway node with the highest link quality from the gateway list based on the link quality, and obtains the IP address assigned to it by the gateway node.
[0012] Step 6) The data acquisition node establishes a data transmission path with the backend cloud server through the selected gateway node and performs data transmission; at the same time, the data acquisition node periodically sends ARP request messages to the selected gateway to check the reachability of the selected gateway and determine whether the selected gateway is faulty.
[0013] Step 7) When the gateway node selected by the data acquisition node leaves the network due to a fault, the data acquisition node broadcasts an ARP request message about the gateway to the network.
[0014] (Step 8) After receiving the ARP request message, the remaining gateway nodes send an ARP response message to the data acquisition node that sent the ARP request message. The data acquisition node updates its ARP cache according to the arrival time of the ARP response message, reselects a working gateway node, and resumes data transmission with the backend cloud server.
[0015] As a further optimization of the robust routing method for UAV clusters based on fast switching of multiple gateways in this invention, the specific steps of the UAV operation protocol parameter configuration script as the gateway node in step 3) are as follows:
[0016] Step 3.1.1), activate the bat0 virtual port used by the Batman-adv protocol;
[0017] Step 3.1.2), disable the DAT mechanism of the Batman-adv protocol;
[0018] Step 3.1.3), set the current node as the gateway node;
[0019] Step 3.1.4), configure the gateway IP address to the preset IP address.
[0020] As a further optimization of the robust routing method for UAV clusters based on fast switching of multiple gateways in this invention, the specific steps of the UAV operation protocol parameter configuration script, which serves as the data acquisition node, in step 3) are as follows:
[0021] Step 3.2.1), activate the bat0 virtual port used by the Batman-adv protocol;
[0022] Step 3.2.2), disable the DAT mechanism of the Batman-adv protocol and change the gateway switching mode of the Batman-adv protocol to fast switching;
[0023] Step 3.2.3), set the current node as a non-gateway node;
[0024] Step 3.2.4), configure the ARP cache time parameters.
[0025] Compared with the prior art, the present invention, employing the above technical solution, has the following technical effects:
[0026] This invention presents a robust routing method for drone swarms based on fast switching between multiple gateways. It uses the Batman-adv routing protocol to form a self-organizing drone network, assigning the same IP address to all gateways. This eliminates the need for drones to change their IP configuration at the IP layer. The method optimizes the neighbor discovery process of the IP protocol stack and its interaction with routing protocols. By optimizing the aging time of ARP cache entries, non-gateway drones can periodically send ARP requests to detect connections with gateways and obtain the MAC addresses of other available gateways when a gateway fails, ensuring a stable and reliable network connection. Attached Figure Description
[0027] Figure 1 This is a schematic diagram of the structure of an embodiment of the present invention.
[0028] Figure 2 This is a schematic diagram of the process of the present invention.
[0029] Figure 3 This is a schematic diagram of gateway switching time testing for a routing protocol that does not use the Batman-adv protocol of this invention.
[0030] Figure 4 This is a schematic diagram illustrating the gateway switching time test of the present invention in a stable scenario;
[0031] Figure 5 This is a schematic diagram illustrating the gateway switching time test of the present invention in a low-mobility scenario;
[0032] Figure 6 This is a schematic diagram illustrating the gateway switching time test of the present invention in a high mobility scenario. Detailed Implementation
[0033] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings:
[0034] This invention can be implemented in many different forms and should not be considered limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully express the scope of the invention to those skilled in the art. In the drawings, components are enlarged for clarity.
[0035] To address the gateway drone failure issue in multi-drone data acquisition systems, this invention employs a gateway switching method optimized based on ARP caching of shared gateway IP addresses. It uses the Batman-adv protocol to form a self-organizing drone network, assigning the same IP address to all gateways. This eliminates the need for drones to change their IP configuration at the IP layer, optimizing the neighbor discovery process of the IP protocol stack and its interaction with routing protocols. Furthermore, by optimizing the aging time of ARP cache entries, non-gateway drones can periodically send ARP requests to detect connections with the gateway and obtain the MAC addresses of other available gateways when a gateway fails, ensuring a stable and reliable network connection.
[0036] like Figure 1 , Figure 2 As shown, this invention discloses a robust routing method for a drone swarm based on fast switching across multiple gateways. The drone swarm comprises m drones capable of 4G communication and n drones unable to communicate via 4G. The method includes the following steps:
[0037] Step 1) Use m drones capable of 4G communication as gateway nodes and n drones that cannot communicate via 4G as data collection nodes. The backend cloud server is used to receive, process and forward data traffic from the gateway nodes.
[0038] Step 2), m drones capable of 4G communication establish TCP network connections with the backend cloud server;
[0039] Step 3) All drones start the Batman-adv protocol, run the protocol parameter configuration script, initialize their neighbor list configuration, and periodically send broadcast messages to neighbor nodes to perform neighbor detection;
[0040] Step 4): Each drone uses the Batman-adv routing algorithm to calculate the optimal path to other nodes in the network based on the received broadcast message and its neighbor list, and updates its source node list and routing table.
[0041] Step 5) The gateway node broadcasts its gateway status to other nodes. After receiving the data, the data collection node updates its gateway list, selects the gateway node with the highest link quality from the gateway list based on the link quality, and obtains the IP address assigned to it by the gateway node.
[0042] Step 6) The data acquisition node establishes a data transmission path with the backend cloud server through the selected gateway node and performs data transmission; at the same time, the data acquisition node periodically sends ARP request messages to the selected gateway to check the reachability of the selected gateway and determine whether the selected gateway is faulty.
[0043] Step 7) When the gateway node selected by the data acquisition node leaves the network due to a fault, the data acquisition node broadcasts an ARP request message about the gateway to the network.
[0044] (Step 8) After receiving the ARP request message, the remaining gateway nodes send an ARP response message to the data acquisition node that sent the ARP request message. The data acquisition node updates its ARP cache according to the arrival time of the ARP response message, reselects a working gateway node, and resumes data transmission with the backend cloud server.
[0045] The specific steps for configuring the drone's operating protocol parameters as a gateway node in step 3) are as follows:
[0046] Step 3.1.1), activate the bat0 virtual port used by the Batman-adv protocol;
[0047] Step 3.1.2), disable the DAT mechanism of the Batman-adv protocol;
[0048] Step 3.1.3), set the current node as the gateway node;
[0049] Step 3.1.4), configure the gateway IP address to the preset IP address.
[0050] The specific steps for configuring the UAV operating protocol parameters as a data acquisition node in step 3) are as follows:
[0051] Step 3.2.1), activate the bat0 virtual port used by the Batman-adv protocol;
[0052] Step 3.2.2), disable the DAT mechanism of the Batman-adv protocol and change the gateway switching mode of the Batman.adv protocol to fast switching;
[0053] Step 3.2.3), set the current node as a non-gateway node;
[0054] Step 3.2.4), configure the ARP cache time parameters.
[0055] This invention uses a Raspberry Pi 4B development board as the embedded device for drones. All drones communicate via the Batman-adv protocol through the built-in wireless network card of the Raspberry Pi 4B development board, forming a self-organizing network upon startup. Each gateway drone is configured with a wireless 4G communication module via a USB interface, establishing a TCP network connection with a backend cloud server with a public IP address through a nearby base station, enabling data interaction between the embedded device and the cloud server.
[0056] This invention tested the gateway switching time of the robust routing method for drone swarms based on fast multi-gateway switching. The tested network topology is as follows: Figure 1 As shown, nodes A and B act as gateways, while nodes C, D, and E serve as data acquisition nodes. Node C is programmed to periodically report data to the cloud server. It can access the internet directly through gateway A, or via relay nodes D or E connected to gateway B. The path from node C to the gateway is derived using the Batman-adv protocol routing algorithm.
[0057] The test scenarios of this invention are divided into three types: stable scenario, low mobility scenario, and high mobility scenario, to test the performance of the robust routing method of the drone swarm based on fast switching of multiple gateways under the interference caused by the movement of drones. In the stable scenario, all nodes are stationary to simulate the relatively stationary state of the drones; in the low mobility scenario, the data acquisition node C is moved by shaking the Raspberry Pi 4B development board from side to side, while the other nodes are stationary; in the high mobility scenario, the data acquisition nodes C, D, and E are moved by shaking the Raspberry Pi 4B development board from side to side, while the gateway nodes A and B are stationary.
[0058] This invention simulates gateway failure by randomly and manually shutting down the gateway power during data transmission. A Ping tool is used to simulate the UAV data reporting phase. The data acquisition node continuously pings a cloud server with a public IP address. ICMP packets from the data acquisition node are first delivered to the gateway node and then forwarded to the cloud server. In this invention, the gateway switching time is defined as the time interval between the failure of the original gateway and the successful switching to a new gateway. Since this time interval is difficult to measure directly, this invention, based on the continuous pinging of the cloud server by the data acquisition node, observes the arrival times of the last and first ICMP response packets received before and after the gateway failure using network tools, and calculates the time difference to obtain the gateway switching time.
[0059] Figure 3The results show the gateway switching time of the Batman-adv protocol before adopting the gateway switching algorithm of this invention. The test was conducted in a stable scenario. The results indicate that in five tests, the switching time from gateway failure to restoring communication by switching to another gateway exceeded 20 seconds, with the longest reaching 32 seconds.
[0060] Figure 4 , Figure 5 , Figure 6 The gateway switching times of the present invention are displayed in stable, low-mobility, and high-mobility scenarios. The results show that, after utilizing the present invention, the fastest switching time is 0.0837 seconds, and the slowest switching time is 1.3236 seconds. Under different test scenarios (stable, low-mobility, and high-mobility scenarios), the system's average switching time remains at a low level, at 0.4051 seconds, 0.4317 seconds, and 0.4721 seconds, respectively. Averaging all test data across the three scenarios yields a total average gateway switching time of 0.4363 seconds.
[0061] This invention discloses a robust routing method for drone swarms based on fast switching between multiple gateways. It uses m drones capable of 4G communication as gateway nodes, forwarding data to a backend cloud server via cellular services. It also uses n drones unable to communicate via 4G as data collection nodes, connecting to any 4G-enabled drone through a Batman-adv ad hoc network to gain communication with the backend cloud server. The backend cloud server receives, processes, and forwards incoming data traffic. This invention optimizes the neighbor discovery process of the IP protocol stack and its interaction with routing protocols. By optimizing the aging time of ARP cache entries, non-gateway drones can periodically send ARP requests to detect connections to the gateway and obtain the MAC addresses of other available gateways when the gateway fails, ensuring a stable and reliable network connection.
[0062] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless defined as herein.
[0063] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A robust routing method for a drone swarm based on fast switching across multiple gateways, wherein the drone swarm comprises m drones capable of 4G communication and n drones unable to communicate via 4G, characterized in that... The method comprises the following steps: Step 1), taking m unmanned aerial vehicles capable of 4G communication as gateway nodes, n unmanned aerial vehicles incapable of 4G communication as data collection nodes, and a back-end cloud server for receiving, processing and forwarding data traffic from the gateway nodes; Step 2), the m unmanned aerial vehicles capable of 4G communication and the back-end cloud server establish a TCP network connection; Step 3), all unmanned aerial vehicles start the Batman-adv protocol, run a protocol parameter configuration script, and initialize a neighbor list configuration, periodically send broadcast messages to neighbor nodes, and perform neighbor detection; The specific steps for the gateway nodes to run the protocol parameter configuration script are as follows: Step 3.1.1), activating the bat0 virtual port used by the Batman-adv protocol; Step 3.1.2), closing the DAT mechanism of the Batman-adv protocol; Step 3.1.3), setting the current node as a gateway node; Step 3.1.4), configuring the gateway IP address as a preset IP address; The specific steps for the data collection nodes to run the protocol parameter configuration script are as follows: Step 3.2.1), activating the bat0 virtual port used by the Batman-adv protocol; Step 3.2.2), closing the DAT mechanism of the Batman-adv protocol and changing the gateway switching mode of the Batman-adv protocol to fast switching; Step 3.2.3), setting the current node as a non-gateway node; Step 3.2.4), configuring an ARP cache time parameter; Step 4), each unmanned aerial vehicle calculates the optimal path to other nodes in the network according to the received broadcast messages and the neighbor list using the Batman-adv routing algorithm, and updates the source node list and the routing table; Step 5), the gateway node broadcasts its gateway status to other nodes, the data collection node updates its gateway list after receiving the broadcast message, selects the gateway node with the highest link quality from the gateway list according to the link quality, and obtains the IP address allocated by the gateway node; Step 6), the data collection node establishes a data transmission path with the back-end cloud server through the selected gateway node, and performs data transmission; meanwhile, the data collection node periodically sends an ARP request message to the selected gateway to detect the reachability of the selected gateway, and judges whether the selected gateway is faulty; Step 7), when the gateway node selected by the data collection node exits the network due to failure, the data collection node broadcasts an ARP request message about the gateway in the network; Step 8), the remaining gateway nodes send an ARP response message to the data collection node after receiving the ARP request message, the data collection node updates the ARP cache according to the arrival time of the ARP response message, reselects a normally working gateway node, and restores the data transmission with the back-end cloud server.
Citation Information
Patent Citations
Autonomous gateway switching method for node equipment of Internet of things
CN108712297A
Gateway Handover method and Apparatus, Terminal Device and Computer Readable Storage Medium
US20240146687A1