Data routing method, device, equipment, medium and product for flight ad hoc network
By decoupling control messages and data messages in the flight ad hoc network and using FPGA for fast MAC address determination and routing table entry extraction, the latency problem that traditional protocols cannot adapt to in highly dynamic environments is solved, and low-latency and stable data transmission is achieved.
Patent Information
- Application Number
- CN202410964460.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2044-07-17
AI Technical Summary
Traditional routing protocols cannot effectively cope with network topology changes in highly dynamic environments and the low latency requirements of drone services in flying ad hoc networks, resulting in response message timeouts and protocol failures.
By decoupling the control messages and data messages of the flight ad hoc network routing protocol, the field programmable gate array (FPGA) is used to quickly determine the MAC address and extract routing table entries, reduce the forwarding delay of intermediate nodes, and configure the rate to ensure the stability and accuracy of data transmission.
It reduces data transmission delay and CPU burden, improves the effective allocation of network resources, adapts to the limited resources of UAV terminals, reduces energy consumption and reduces packet loss rate.
Smart Images

Figure CN118764930B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of flight ad hoc networks, and in particular to a data routing method, device, equipment, medium and product for flight ad hoc networks. Background Art
[0002] With the advancement of wireless communication and the Internet of Things (IoT) technologies, wireless networks and a wide variety of mobile devices have become increasingly integrated into people's daily lives. FANET (Flying Ad Hoc Network) is a highly dynamic mobile self-organizing network, resulting from the integration of sensor technology, wireless communication, unmanned aerial vehicles (UAVs), and MANET (Mobile Ad Hoc Network). With the increasing popularity of drones across various industries, research on FANET has increased. Although derived from MANET, FANET differs significantly from MANET in the following ways: high node mobility and frequent network topology changes; low node density; long distances between nodes; a greater variety of sensors and complex equipment; and complex network protocols with high performance requirements. In particular, the rapid changes in network topology make some traditional protocols inadequate in the highly dynamic environment of FANET. For these reasons, finding solutions that better adapt to the highly dynamic nature of network topology changes has become a major focus of FANET research.
[0003] FANETs are unique compared to traditional MANETs due to their high node mobility and rapidly changing network topology. Some traditional protocols are no longer suitable in highly dynamic environments. Furthermore, the unique nature of drone services necessitates that routing protocols used on them have higher requirements for link latency. Directly applying traditional MANET routing protocols to FANETs can lead to service or protocol failures due to response message timeouts. This issue is particularly acute in ad hoc networks that support forwarding on multiple nodes. Therefore, it is crucial to improve existing wireless ad hoc routing protocols to reduce intermediate node forwarding latency, thereby adapting them to the highly dynamic environments of flying ad hoc networks and the low-latency requirements of drone services. Summary of the Invention
[0004] In view of this, the present invention aims to provide a data routing method, apparatus, device, medium, and product for flight ad hoc networks that can reduce intermediate node forwarding latency, thereby adapting to the highly dynamic environment of flight ad hoc networks and the low-latency requirements of drone services. The specific solution is as follows:
[0005] In a first aspect, the present application discloses a data routing method for a flight ad hoc network, comprising:
[0006] Receive a target routing protocol message sent by a networking node, and perform decoupling processing on the target routing protocol message to extract a target data message;
[0007] Determine whether the destination MAC address of the target data message corresponds to the current networking node;
[0008] If the destination MAC address corresponds to the current networking node, uploading the target data message to the central processing unit of the current networking node for processing;
[0009] If the destination MAC address does not correspond to the current networking node, extracting the currently changed routing table entry as the node MAC address of the next hop networking node of the target data message through the central processing unit;
[0010] The target data message is rate-configured to modify the message header of the target data message to obtain the target data message to be forwarded, and the target data message to be forwarded is sent to the node MAC address to complete message forwarding of the target data message to be forwarded.
[0011] Optionally, the receiving a target routing protocol message sent by the networking node and performing decoupling processing on the target routing protocol message to extract a target data message includes:
[0012] Receive routing protocol messages sent by networking nodes through a field programmable logic gate array;
[0013] Determining whether the routing protocol message is a flight ad hoc network routing protocol message;
[0014] If not, uploading the routing protocol message as a non-target routing protocol message to the central processor for parsing and processing;
[0015] If so, the routing protocol message is used as the target routing protocol message, and the target routing protocol message is decoupled to extract the target data message and the target control message, and the target control message is sent to the central processor for routing table entry extraction processing;
[0016] Accordingly, determining whether the destination MAC address of the target data message corresponds to the current networking node includes:
[0017] Perform message format check and message integrity check on the target data message, and determine whether the destination MAC address of the target data message after verification corresponds to the current networking node.
[0018] Optionally, if the destination MAC address corresponds to a current networking node, uploading the target data packet to a central processor of the current networking node for processing includes:
[0019] If the destination MAC address of the verified target data message corresponds to the current networking node, the verified target data message is uploaded to the central processing unit of the current networking node for parsing and processing.
[0020] Optionally, the data routing method for the flight ad hoc network further includes:
[0021] Extracting, by the central processing unit, routing table information in the target control message corresponding to the verified target data message as the current routing table;
[0022] Querying the entry information corresponding to addition, deletion, and modification between the current routing table and the historical routing table to obtain the current changed routing table entry, and updating the entry information in the historical routing table to obtain the updated routing table, and using the updated routing table as the historical routing table when the next control message query table entry;
[0023] The currently changed routing table entry is used as the node MAC address of the next-hop networking node of the verified target data message.
[0024] Optionally, extracting, by the central processor, routing table information in the target control message corresponding to the verified target data message as the current routing table includes:
[0025] The central processing unit extracts the routing table information contained in the source node list in the target control message corresponding to the verified target data message, and writes the new routing table as the current routing table in a bidirectional linked list format; wherein, the source node list records all other networking nodes that have established connections with the current networking node, and the data structure of each current networking node stores the best networking node to reach the current networking node.
[0026] Optionally, the configuring a rate for the target data message to modify a message header of the target data message to obtain a target data message to be forwarded includes:
[0027] Set the initial transmission rate according to the node performance parameters of the current networking node;
[0028] Adjusting the initial transmission rate according to external communication environment factors between the current networking node and the next-hop networking node to determine a target transmission rate;
[0029] The target data message is rate-configured according to the target transmission rate, so as to modify the message header of the target data message to obtain a target data message to be forwarded.
[0030] In a second aspect, the present application discloses a data routing device for a flight ad hoc network, comprising:
[0031] A message decoupling module is used to receive a target routing protocol message sent by a networking node and perform decoupling processing on the target routing protocol message to extract a target data message;
[0032] An address determination module is used to determine whether the destination MAC address of the target data message corresponds to the current networking node;
[0033] A first processing module is configured to upload the target data message to a central processing unit of the current networking node for processing if the destination MAC address corresponds to the current networking node;
[0034] A second processing module is configured to extract, through the central processor, a currently changed routing table entry as the node MAC address of the next-hop networking node of the target data packet if the destination MAC address does not correspond to the current networking node;
[0035] The message forwarding module is used to configure the rate of the target data message to modify the message header of the target data message to obtain the target data message to be forwarded, and send the target data message to be forwarded to the node MAC address to complete the message forwarding of the target data message to be forwarded.
[0036] In a third aspect, the present application discloses an electronic device, comprising:
[0037] Memory, used to store computer programs;
[0038] A processor is used to execute the computer program to implement the steps of the aforementioned disclosed method for data routing in a flight ad hoc network.
[0039] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned disclosed data routing method for a flying ad hoc network are implemented.
[0040] In a fifth aspect, the present application discloses a computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of data routing of the aforementioned flight ad hoc network.
[0041] It can be seen that the present application discloses a data routing method for flying self-organizing networks, including: receiving a target routing protocol message sent by a networking node, and decoupling the target routing protocol message to extract a target data message; judging whether the destination MAC address of the target data message corresponds to the current networking node; if the destination MAC address corresponds to the current networking node, uploading the target data message to the central processing unit of the current networking node for processing; if the destination MAC address does not correspond to the current networking node, extracting the currently changed routing table entry as the node MAC address of the next-hop networking node of the target data message through the central processing unit; performing rate configuration on the target data message to modify the message header of the target data message to obtain the target data message to be forwarded, and sending the target data message to be forwarded to the node MAC address to complete the message forwarding of the target data message to be forwarded. This demonstrates that by decoupling the control and data packets of the flight ad hoc network routing protocol, and by quickly and accurately determining the destination MAC address and performing corresponding processing, data transmission delays and waiting times are reduced. Furthermore, the data processing and forwarding path is determined based on the destination MAC address, eliminating the need for all packets to be uploaded to the central processor for parsing and processing. Instead, the system directly identifies the data packets that need to be forwarded when the destination MAC address is determined, and forwards them accordingly. This allows for more efficient allocation of network resources and reduces the burden on the central processor. This reduces energy consumption and makes it more suitable for deployment and optimization under conditions of insufficient UAV terminal resources and stringent energy constraints. Furthermore, rate configuration and header modification of target data packets help ensure the stability and accuracy of data transmission between different nodes. When the network environment of the UAV terminal is unstable, the rate can be adjusted to reduce packet loss. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0043] Figure 1 This is a flow chart of a data routing method for a flight ad hoc network disclosed in this application;
[0044] Figure 2 The present application discloses a composition architecture of an improved method for flight ad hoc network routing protocol based on batman-adv;
[0045] Figure 3 This is a logic flow chart of a flight ad hoc network route extraction module disclosed in this application;
[0046] Figure 4 This is a flow chart of a method for improving a flight ad hoc network routing protocol based on batman-adv disclosed in this application;
[0047] Figure 5 This is a structural diagram of a data routing device for a flight ad hoc network disclosed in this application;
[0048] Figure 6 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0050] With the advancement of wireless communication and Internet of Things technologies, wireless networks and a wide variety of mobile devices have become increasingly integrated into people's daily lives. Mobile ad hoc networks (MANETs) are one of the emerging technologies in the development of wireless communication networks. MANETs are decentralized, multi-hop, and temporary self-organizing networks formed by a series of mobile terminal nodes with routing capabilities, interconnected by wireless links. MANETs offer flexible networking options, breaking through the geographical limitations of traditional wireless networks and enabling faster, more convenient, and more efficient deployment. After decades of development, MANETs have been applied in many fields, and they have spawned numerous new networks tailored to specific application scenarios within these fields. Flying Ad Hoc Networks (FANETs) are one of the most widely used.
[0051] FANET, a highly dynamic mobile ad hoc network, is the result of the integration of sensor technology, wireless communication technology, unmanned aerial vehicles (UAVs), and MANET technology. With the increasing popularity of drones across various industries, research on FANET has increased. Although derived from MANET, FANET differs significantly from MANET in the following ways: high node mobility and frequent network topology changes; low node density; long distances between nodes; a greater variety of sensors and complex equipment; and complex network protocols with high performance requirements. In particular, the rapid changes in network topology make some traditional protocols inadequate in the highly dynamic environment of FANET. For these reasons, finding solutions more suitable for the highly dynamic nature of network topology changes has become a major focus of FANET research.
[0052] Batman-adv (better approach to mobile ad-hoc networking advanced) is an a priori link-state routing protocol that operates at the data link layer. Nodes are identified by MAC addresses, rather than traditional IP (Internet Protocol) addresses. Batman-adv relies on each node periodically sending Originator Messages (OGMs) to inform surrounding nodes of its status. It also serves to discover new nodes and maintain links. Batman-adv aims to find the optimal next-hop node. Each Batman-adv node does not maintain global routing information; instead, it maintains only reachable destinations and the best next-hop to reach them. For each destination, Batman-adv calculates and maintains the Transmission Quality (TQ) of the link to that node. Each node selects the neighbor with the best link quality as the next hop based on the TQ. Batman-adv's operating principle ensures its high transparency, scalability, and fast convergence, making it widely used in traditional wireless ad hoc networks.
[0053] FANETs are unique compared to traditional MANETs due to their high node mobility and rapidly changing network topology. Some traditional protocols are no longer suitable in highly dynamic environments. Furthermore, the unique nature of drone services necessitates that routing protocols used on them have higher requirements for link latency. Directly applying traditional MANET routing protocols to FANETs can lead to service or protocol failures due to response message timeouts. This issue is particularly acute in ad hoc networks with multi-node forwarding support.
[0054] To this end, the present invention provides a data routing solution for a flying ad hoc network, which can reduce the forwarding delay of intermediate nodes, thereby adapting to the high dynamic environment of the flying ad hoc network and the low delay requirements of drone services.
[0055] Reference Figure 1 As shown, an embodiment of the present invention discloses a data routing method for a flying ad hoc network, comprising:
[0056] Step S11: receiving a target routing protocol message sent by a networking node, and performing decoupling processing on the target routing protocol message to extract a target data message.
[0057] In this embodiment, a routing protocol message sent by a networking node is received through a field programmable logic gate array; it is determined whether the routing protocol message is a flight ad hoc network routing protocol message; if not, the routing protocol message is uploaded to the central processing unit as a non-target routing protocol message for parsing and processing; if so, the routing protocol message is used as a target routing protocol message, and the target routing protocol message is decoupled to extract the target data message and the target control message, and the target control message is sent to the central processing unit for routing table entry extraction processing. It is understood that routing protocol messages sent by networking nodes in a flying ad hoc network are received through a field programmable logic gate array. The received routing protocol message may or may not be a routing message of the batman-adv protocol category. If it is not a routing message of the batman-adv protocol category, it is determined to be a non-target routing protocol message and uploaded to the CPU (Central Processing Unit) of the current node for parsing and processing. If it is a routing message of the batman-adv protocol category, it is determined to be a target routing protocol message and directly decoupled and processed through the field programmable logic gate array to obtain the target data message and the target control message. It should be noted that the decoupled target control message contains routing information about the target data message, so all target control messages need to be uploaded to the CPU of the current node for routing information change extraction and processing.
[0058] In this embodiment, refer to Figure 2 As shown, the flight ad hoc network includes a Batman-ADV route extraction module (referred to as the route extraction module), a switch module, an FPGA, a CPU, Batman-ADV message processing, registers, a wireless transceiver interface, and a message rate control module. The route extraction module is deployed within the Batman-ADV protocol stack, with both the protocol stack and the switch module located on the CPU. The Batman-ADV message processing, registers, wireless transceiver interface, and message rate control module are all located on the FPGA. The registers are used to store routing tables and rate information. This results in a flight ad hoc network with a central processing unit (CPU) and a field-programmable gate array (FPGA) as its hardware architecture. The CPU processes messages that require parsing, while the FPGA directly forwards Batman-ADV data messages that do not require parsing. This decouples, processes, and forwards the Batman-ADV protocol's control and data messages.
[0059] Step S12: Determine whether the destination MAC address of the target data message corresponds to the current networking node.
[0060] In this embodiment, the target data message undergoes a message format check and message integrity check, and determines whether the verified destination MAC (Media Access Control) address of the target data message corresponds to the current networking node. The FPGA further performs a format check and verification on the target data message (batman data message). Specifically, it examines the payload length field recorded in the 8021 frame, checks whether the MAC address is valid, and checks whether the destination MAC address corresponds to the current networking node. After passing these format checks and payload integrity checks, the verified target data message is obtained, and a determination is made as to whether the verified destination MAC address of the target data message corresponds to the current networking node.
[0061] Step S13: If the destination MAC address corresponds to the current networking node, the target data message is uploaded to the central processing unit of the current networking node for processing.
[0062] In this embodiment, if the destination MAC address of the verified target data message corresponds to the current networking node, the verified target data message is uploaded to the central processing unit of the current networking node for parsing and processing. It will be understood that when the destination MAC address corresponds to the current networking node, it indicates that the current networking node where the target data message is located is the last routing node in the target data message routing process. Therefore, there is no need to forward the target data message to other networking nodes, and the message is directly uploaded to the CPU of the current networking node for subsequent processing of the corresponding message.
[0063] Step S14: If the destination MAC address does not correspond to the current networking node, the central processor extracts the currently changed routing table entry as the node MAC address of the next-hop networking node of the target data message.
[0064] In this embodiment, if the destination MAC address does not correspond to the current networking node, it indicates that the current networking node where the target data message is located is still an intermediate node, and it is necessary to continue to look for the next-hop networking node. Therefore, the central processor extracts the routing table information in the target control message corresponding to the verified target data message as the current routing table; queries the table item information corresponding to the addition, deletion, and modification between the current routing table and the historical routing table to obtain the current changed routing table item, and updates the table item information in the historical routing table to obtain the updated routing table, and uses the updated routing table as the historical routing table when the next control message queries the table item; uses the current changed routing table item as the node MAC address of the next-hop networking node of the verified target data message. It can be understood that, if Figure 2As shown, the routing extraction module running in the CPU extracts the routing table in the batman-adv protocol and maintains it in real time, compares the entries in each routing table change, and sends it to the FPGA as the destination address for the FPGA to forward the batman-adv data message. The switch module of the read and write registers in the CPU opens the switch driver interface. Batman-adv and other kernel modules can call the switch interface to read and write data (changed routing table entry information) to the specified area of the FPGA, realizing data interaction between the CPU and the FPGA. It can be seen that the batman-adv protocol speeds up the message processing speed by forwarding through the FPGA instead of uploading to the CPU, thereby reducing the forwarding delay and adapting to the highly dynamic and weakly linked flight ad hoc network environment.
[0065] In this embodiment, the routing extraction module uses a bidirectional linked list to store the extracted routing table information. Compare it with the old routing table, extract the modified information, and send it to the FPGA side. The specific processing flow is as follows: Figure 3 As shown in the figure. The time complexity of inserting, modifying, and deleting linked lists is O(n), and the length is flexible, making it suitable for scenarios where routing tables frequently change in highly dynamic, weakly linked environments. Both new_router_list and old_router_list are stored as bidirectional ordered linked lists, arranged in ascending order of destination MAC addresses. Using bidirectional ordered linked lists, a two-pointer algorithm can be used to compare new_router_list and old_router_list to identify and record the location of any modifications, with a time complexity of O(n). change_router_list is an array whose nodes are divided into three categories: addition, deletion, and modification, and each includes information about the node to be modified. Selecting an operation mode based on the type and operating the FPGA allows for updating and maintaining the routing table. The routing table extraction module first stores the extracted source node list and routing nodes in the new_router_list table; secondly, it sorts the new_router_list; thirdly, if it is the first extraction, it sends the entire table to the FPGA; if not, it compares the differences between the new and old tables and sends the changed table entries; then it swaps the new_router_list with the old_router_list, releases the new_router_list, and completes the batman-adv routing table extraction process.
[0066] The data structure of new_router_list and old_router_list is defined as:
[0067] typedef struct pml_batman_route_table {
[0068] struct list_head pml_batman_router;
[0069] u8 dst_mac[ETH_ALEN];
[0070] u8 router_mac[ETH_ALEN];
[0071] u8 ttvn;
[0072] } pml_batman_route_table_t;
[0073] Among them, pml_batman_router is the linked list pointer, dst_mac is the destination MAC address, router_mac is the next hop MAC address, and ttvn is the current routing table version number. change_router_list is an array data structure defined as:
[0074] typedef struct pml_batman_route_change {
[0075] u8 change_type;
[0076] u8 dst_mac[ETH_ALEN];
[0077] u8 router_mac[ETH_ALEN];
[0078] u8 ttvn;
[0079] } pml_batman_route_change_t;
[0080] Among them, dst_mac, router_mac, ttvn are the information that needs to be modified. Change_type is the operation type, which includes add, delete and modify. The design of the route extraction module interface is shown in Table 1 below:
[0081] Table 1
[0082]
[0083] The switch kernel module that reads and writes registers in the CPU opens a switch driver interface. Batman-adv and other kernel modules can call the switch interface to read and write data to the specified area of the FPGA, realizing data interaction between the CPU and FPGA.
[0084] The configuration in the register is shown in Table 2 below. The switch module writes data to the specified location in the register according to the following format:
[0085] Table 2
[0086]
[0087] In this embodiment, the central processing unit extracts the routing table information contained in the source node list in the target control message corresponding to the verified target data message, and writes it into a new routing table as the current routing table in a bidirectional linked list format; wherein, the source node list records all other networking nodes that have established connections with the current networking node, and the data structure of each current networking node stores the best networking node to reach the current networking node.
[0088] The routing extraction module is used to maintain and update the routing table. When the batman-adv protocol is running, it maintains a source node list that includes all other batman-adv nodes that can establish a link with the current networking node. Each node data structure stores the best routing node that can reach that node. The routing extraction module monitors the source node list of the batman-adv protocol and changes in the best routing node of each node in real time. Once the source node list or the routing node of a source node changes, the changed node information is sent to the routing table stored in the register. The register within the FPGA allocates an area to store the routing table information sent by the CPU. The source node MAC address of the table is mapped to the register address. The register address corresponding to the source node can be found through the mapping. The register stores the best routing node for the source node. For the FPGA, when it needs to forward a data packet, it searches the register corresponding to the destination MAC address in the batman-adv packet header and retrieves the routing node MAC address in the register, which is the next-hop node address that the FPGA needs to forward. Design a switch driver and compile it into a kernel module. The CPU loads the switch kernel module to read and write registers, establishing a data exchange channel between the CPU and the FPGA. The switch module's interface can be used by other kernel modules. For the batman-adv protocol, the switch driver interface can be called to write routing table information into the registers, allowing the FPGA to find the MAC address of the next-hop network node when forwarding packets.
[0089] Step S15: rate configure the target data message to modify the message header of the target data message to obtain the target data message to be forwarded, and send the target data message to be forwarded to the node MAC address to complete the message forwarding of the target data message to be forwarded.
[0090] In this embodiment, the initial transmission rate is set according to the node performance parameters of the current networking node; the initial transmission rate is adjusted according to the external communication environment factors between the current networking node and the next-hop networking node to determine the target transmission rate; the target data message is rate-configured according to the target transmission rate to modify the message header of the target data message to obtain the target data message to be forwarded. It can be understood that when the FPGA forwards the target data message, it is necessary to select a suitable target transmission rate for hardware forwarding. Specifically, the FPGA message rate control module dynamically adjusts the initial transmission rate stored in the FPGA message rate control module according to the external communication environment factors such as the distance between the perceived networking nodes and the electromagnetic environment to obtain the final target transmission rate. The initial transmission rate is set based on the node performance parameter information such as the current networking node transmission power, the frequency band used, the throughput rate, and whether the packet is successfully sent and received. The PHY and control information required to forward the batman-adv message are shown in Table 3 below:
[0091] Table 3
[0092]
[0093]
[0094] The basic algorithm of the message rate control module can be described as follows: First, the rate control module chooses to start sending at an initial rate. If it does not receive two replies or send successful messages in a row, it reduces the rate by one gear to send subsequent packets. If it receives 10 successful send replies in a row, it increases the rate by one gear to send subsequent messages. The advantage of this algorithm is that it has low computational complexity, low performance requirements, and is easy to implement in firmware. However, the disadvantage of this algorithm is that it cannot respond to changes in channel conditions in a timely manner and cannot quickly adjust to the optimal rate. Therefore, in the forwarding rate control module within the FPGA of the present invention, parameters such as distance and electromagnetic environment are added as channel status measurement indicators for adjustment and improvement. A channel status indicator threshold gear is set. If the gear threshold is exceeded and 10 successful send replies are maintained, the rate gear is increased by one gear. If it is lower than the gear threshold, the rate gear is reduced by one gear. This achieves timely adjustment of the sending rate according to the environment.
[0095] Reference Figure 4 As shown, the present invention discloses an improved method for a flight ad hoc network routing protocol based on batman-adv. The overall operation process of the new batman-adv routing protocol that supports hardware forwarding is:
[0096] Based on the principles of the Batman-ADV protocol, the route extraction module decouples the processing of data and control messages, extracts the routing table used by Batman-ADV data messages, and updates the routing table entries in real time. The route extraction module calls the switch module interface to send the updated entries to the FPGA register for storage. After receiving the Batman-ADV data message, the FPGA parses it to determine whether it can be directly forwarded. Based on the Batman-ADV routing table stored in the register, it determines the next-hop MAC address for the forwarded message. The FPGA modifies the destination MAC address in the 802.11 protocol of the message, selects the optimal rate based on the forwarding rate control module, and finally transmits the modified forwarded message to the radio chip for transmission. Thus, by leveraging the FPGA's computing power, the processing of some Batman-ADV data messages that need to be forwarded is shifted down to the FPGA. The FPGA module directly processes and forwards the messages, eliminating the need for CPU processing. This speeds up Batman-ADV protocol message processing, thereby reducing forwarding latency and adapting to the highly dynamic and weakly linked environments of flight ad hoc networks.
[0097] The FPGA's internal operation process is as follows: After receiving a message, the FPGA parses it and first determines whether it is a Batman-adv protocol data message. Specifically, it checks whether the value of the type field of the LLC frame (Logical Link Control) is 0xc4305. If so, it enters the next type field check process; if not, it sends the message to the CPU. Then, it checks whether the type field of the Batman frame is 0x40. If so, the FPGA performs a format check and verification on the received Batman data message. If it passes, it proceeds to the Batman-adv frame processing process. If not, it directly sends the message to the CPU. Third, it determines whether the destination MAC address of the data message is the local node. If not, it enters the forwarding process. If so, it sends the message to the CPU for processing. After entering the forwarding process, the FPGA searches the register for the MAC address of the next-hop routing node based on the destination MAC address. If it is found, it starts forwarding; otherwise, it discards the message. During forwarding, the data message is frame-modified, the MAC address is re-filled, and an appropriate transmission rate is selected for hardware forwarding.
[0098] The operation process within the CPU: The batman-adv protocol stack in the CPU processes the control message after receiving it and updates the routing table and source node list; the routing extraction module extracts the changed routing table entries; the routing extraction module calls the switch module interface to update the routing table entries at the specified address of the register in the FPGA.
[0099] The routing table extraction module running in the batman-adv protocol extracts the routing table in the batman-adv protocol and maintains it in real time. It compares the table entries of each routing table change and sends them to the FPGA as the destination address of the batman-adv data message forwarded by the FPGA.
[0100] The switch kernel module that reads and writes registers in the CPU opens a switch driver interface. Batman-adv and other kernel modules can call the switch interface to read and write data to the specified area of the FPGA, realizing data interaction between the CPU and FPGA.
[0101] The FPGA module processes messages. For received packets, it parses the message header, distinguishes the protocol type and message type, and directly forwards the packet if it meets the requirements. Otherwise, it sends the packet to the CPU for processing. For outgoing packets, it modifies the message header information, configures the rate, and completes the transmission.
[0102] After receiving the message, the FPGA parses the message and first determines whether it is a batman-adv protocol data message. If not, it sends it to the CPU. Secondly, the FPGA performs format check and verification on the received batman data message. If it passes, it performs the batman-adv frame processing process. Thirdly, it determines whether the destination MAC address of the data message is the current node. If not, it enters the forwarding process. If it is, it sends it to the CPU for processing. After entering the forwarding process, the FPGA searches the register for the MAC address of the next routing node based on the destination MAC address. If it is found, it starts forwarding; otherwise, it discards the message. During forwarding, the data message is frame modified, the MAC address is re-filled, the appropriate transmission rate is selected, and hardware forwarding is performed.
[0103] The FPGA forwarding rate control module dynamically adjusts the FPGA forwarding rate based on the perceived distance, electromagnetic environment, etc., and selects the optimal transmission rate.
[0104] It can be seen that the present application discloses a data routing method for flying self-organizing networks, including: receiving a target routing protocol message sent by a networking node, and decoupling the target routing protocol message to extract a target data message; judging whether the destination MAC address of the target data message corresponds to the current networking node; if the destination MAC address corresponds to the current networking node, uploading the target data message to the central processing unit of the current networking node for processing; if the destination MAC address does not correspond to the current networking node, extracting the currently changed routing table entry as the node MAC address of the next-hop networking node of the target data message through the central processing unit; performing rate configuration on the target data message to modify the message header of the target data message to obtain the target data message to be forwarded, and sending the target data message to be forwarded to the node MAC address to complete the message forwarding of the target data message to be forwarded. This demonstrates that by decoupling the control and data packets of the flight ad hoc network routing protocol, and by quickly and accurately determining the destination MAC address and performing corresponding processing, data transmission delays and waiting times are reduced. Furthermore, the data processing and forwarding path is determined based on the destination MAC address, eliminating the need for all packets to be uploaded to the central processor for parsing and processing. Instead, the system directly identifies the data packets that need to be forwarded when the destination MAC address is determined, and forwards them accordingly. This allows for more efficient allocation of network resources and reduces the burden on the central processor. This reduces energy consumption and makes it more suitable for deployment and optimization under conditions of insufficient UAV terminal resources and stringent energy constraints. Furthermore, rate configuration and header modification of target data packets help ensure the stability and accuracy of data transmission between different nodes. When the network environment of the UAV terminal is unstable, the rate can be adjusted to reduce packet loss.
[0105] Reference Figure 5 As shown, an embodiment of the present invention discloses a data routing device for a flight ad hoc network, comprising:
[0106] The message decoupling module 11 is used to receive the target routing protocol message sent by the networking node and perform decoupling processing on the target routing protocol message to extract the target data message;
[0107] An address determination module 12 is configured to determine whether the destination MAC address of the target data message corresponds to the current networking node;
[0108] A first processing module 13 is configured to upload the target data message to a central processor of the current networking node for processing if the destination MAC address corresponds to the current networking node;
[0109] The second processing module 14 is configured to extract, through the central processor, a currently changed routing table entry as the node MAC address of the next-hop networking node of the target data packet if the destination MAC address does not correspond to the current networking node;
[0110] The message forwarding module 15 is used to configure the rate of the target data message to modify the message header of the target data message to obtain the target data message to be forwarded, and send the target data message to be forwarded to the node MAC address to complete the message forwarding of the target data message to be forwarded.
[0111] It can be seen that the present application discloses receiving a target routing protocol message sent by a networking node, and decoupling the target routing protocol message to extract a target data message; judging whether the destination MAC address of the target data message corresponds to the current networking node; if the destination MAC address corresponds to the current networking node, uploading the target data message to the central processing unit of the current networking node for processing; if the destination MAC address does not correspond to the current networking node, extracting the currently changed routing table entry as the node MAC address of the next-hop networking node of the target data message through the central processing unit; performing rate configuration on the target data message to modify the message header of the target data message to obtain the target data message to be forwarded, and sending the target data message to be forwarded to the node MAC address to complete the message forwarding of the target data message to be forwarded. This demonstrates that by decoupling the control and data packets of the flight ad hoc network routing protocol, and by quickly and accurately determining the destination MAC address and performing corresponding processing, data transmission delays and waiting times are reduced. Furthermore, the data processing and forwarding path is determined based on the destination MAC address, eliminating the need for all packets to be uploaded to the central processor for parsing and processing. Instead, the system directly identifies the data packets that need to be forwarded when the destination MAC address is determined, and forwards them accordingly. This allows for more efficient allocation of network resources and reduces the burden on the central processor. This reduces energy consumption and makes it more suitable for deployment and optimization under conditions of insufficient UAV terminal resources and stringent energy constraints. Furthermore, rate configuration and header modification of target data packets help ensure the stability and accuracy of data transmission between different nodes. When the network environment of the UAV terminal is unstable, the rate can be adjusted to reduce packet loss.
[0112] Furthermore, the embodiment of the present application also discloses an electronic device, Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram should not be considered as any limitation to the scope of application of the present application.
[0113] Figure 6This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the data routing method for an in-flight ad hoc network disclosed in any of the aforementioned embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0114] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0115] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0116] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0117] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, enabling the processor 21 to calculate and process the massive amount of data 223 in the memory 22. It can be run on Windows Server, NetWare, Unix, Linux, or other operating systems. In addition to including computer programs capable of implementing the data routing method for the flight ad hoc network performed by the electronic device 20 as disclosed in any of the aforementioned embodiments, the computer programs 222 may also include computer programs capable of performing other specific tasks. Data 223 may include data received by the electronic device from external devices, as well as data collected by its own input / output interface 25.
[0118] Furthermore, this application discloses a computer-readable storage medium for storing a computer program. When executed by a processor, the computer program implements the aforementioned data routing method for an ad hoc flight network. The specific steps of this method can be found in the corresponding contents disclosed in the aforementioned embodiments and will not be further elaborated here.
[0119] Furthermore, an embodiment of the present invention also discloses a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the data routing method for the flight ad hoc network disclosed in any of the aforementioned embodiments.
[0120] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.
[0121] Professionals may further appreciate that the units and algorithmic steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. The steps of the method or algorithm described in conjunction with the embodiments disclosed herein can be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory RAM (Random Access Memory), memory, read-only memory ROM (Read Only Memory), electrically programmable EPROM (Electrically Programmable Read Only Memory), electrically erasable programmable EEPROM (Electric Erasable Programmable Read Only Memory), registers, hard disk, removable disk, CD-ROM (Compact Disc-Read Only Memory), or any other form of storage medium known in the technical field.
[0122] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0123] The above is a detailed introduction to the solution provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.
Claims
1. A data routing method for a flying ad hoc network, characterized in that: include: Receive a target routing protocol message sent by a networking node, and perform decoupling processing on the target routing protocol message to extract a target data message; Determine whether the destination MAC address of the target data message corresponds to the current networking node; If the destination MAC address corresponds to the current networking node, uploading the target data message to the central processing unit of the current networking node for processing; If the destination MAC address does not correspond to the current networking node, extracting the currently changed routing table entry as the node MAC address of the next hop networking node of the target data message through the central processing unit; The target data message is rate-configured to modify the message header of the target data message to obtain the target data message to be forwarded, and the target data message to be forwarded is sent to the node MAC address to complete message forwarding of the target data message to be forwarded.
2. The data routing method for a flying ad hoc network according to claim 1, characterized in that: The receiving a target routing protocol message sent by the networking node and performing decoupling processing on the target routing protocol message to extract a target data message includes: Receive routing protocol messages sent by networking nodes through a field programmable logic gate array; Determining whether the routing protocol message is a flight ad hoc network routing protocol message; If not, uploading the routing protocol message as a non-target routing protocol message to the central processing unit for parsing and processing; If so, the routing protocol message is used as the target routing protocol message, and the target routing protocol message is decoupled to extract the target data message and the target control message, and the target control message is sent to the central processor for routing table entry extraction processing; Accordingly, determining whether the destination MAC address of the target data message corresponds to the current networking node includes: Perform message format check and message integrity check on the target data message, and determine whether the destination MAC address of the target data message after verification corresponds to the current networking node.
3. The data routing method for a flying ad hoc network according to claim 2, characterized in that: If the destination MAC address corresponds to the current networking node, uploading the target data message to the central processor of the current networking node for processing includes: If the destination MAC address of the verified target data message corresponds to the current networking node, the verified target data message is uploaded to the central processing unit of the current networking node for parsing and processing.
4. The data routing method for a flying ad hoc network according to claim 2, characterized in that: Also includes: Extracting, by the central processing unit, routing table information in the target control message corresponding to the verified target data message as the current routing table; Querying the entry information corresponding to addition, deletion, and modification between the current routing table and the historical routing table to obtain the current changed routing table entry, and updating the entry information in the historical routing table to obtain the updated routing table, and using the updated routing table as the historical routing table when the next control message query table entry; The currently changed routing table entry is used as the node MAC address of the next-hop networking node of the verified target data message.
5. The data routing method for a flying ad hoc network according to claim 4, characterized in that: The extracting, by the central processor, routing table information in the target control message corresponding to the verified target data message as the current routing table includes: The central processing unit extracts the routing table information contained in the source node list in the target control message corresponding to the verified target data message, and writes the new routing table as the current routing table in a bidirectional linked list format; wherein, the source node list records all other networking nodes that have established connections with the current networking node, and the data structure of each current networking node stores the best networking node to reach the current networking node.
6. The data routing method for a flying ad hoc network according to any one of claims 1 to 5, characterized in that: The configuring the rate of the target data message to modify the message header of the target data message to obtain the target data message to be forwarded includes: Set the initial transmission rate according to the node performance parameters of the current networking node; Adjusting the initial transmission rate according to external communication environment factors between the current networking node and the next-hop networking node to determine a target transmission rate; The target data message is rate-configured according to the target transmission rate, so as to modify the message header of the target data message to obtain a target data message to be forwarded.
7. A data routing device for a flying ad hoc network, characterized in that: include: A message decoupling module is used to receive a target routing protocol message sent by a networking node and perform decoupling processing on the target routing protocol message to extract a target data message; An address determination module is used to determine whether the destination MAC address of the target data message corresponds to the current networking node; A first processing module is configured to upload the target data message to a central processing unit of the current networking node for processing if the destination MAC address corresponds to the current networking node; A second processing module is configured to extract, through the central processor, a currently changed routing table entry as the node MAC address of the next-hop networking node of the target data packet if the destination MAC address does not correspond to the current networking node; The message forwarding module is used to configure the rate of the target data message to modify the message header of the target data message to obtain the target data message to be forwarded, and send the target data message to be forwarded to the node MAC address to complete the message forwarding of the target data message to be forwarded.
8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is configured to execute the computer program to implement the steps of the data routing method for a flight ad hoc network as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that Used to store computer programs; wherein, when the computer program is executed by a processor, the steps of the data routing method for a flying ad hoc network as described in any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the data routing method for a flying ad hoc network according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
On-demand routing mechanism of unmanned aerial vehicle ad hoc network based on combination of content identification and node identification
CN114071638A
Multi-objective optimization routing algorithm based on Q learning
CN114401540A