An unmanned aerial vehicle dynamic routing method and device with time window particle swarm optimization
Patent Information
- Application Number
- CN202611205479.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-10
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]无人机网络节点在完成数据传输时需要经过复杂的路径选择,同时时间窗口约束是影响传输效果的关键限制因素,部分无人机任务要求在特定时间段内完成数据传输,若未能在此时间段内完成则任务执行效果会受到影响
本申请通过在粒子群优化过程中引入时间窗口约束机制并结合通信能耗、带宽占用、数据损失及处理能耗等多方面因素构建适应度函数,能够为无人机网络中的每个节点动态确定综合成本最小的下一跳转发对象,在保障数据传输于规定时间窗口内完成的同时降低通信延迟与数据丢包率,提升无人机网络整体的传输效率与资源利用率;通过将粒子群划分为精英粒子与探索粒子并对精英粒子中已趋于一致的维度进行固定,在保持全局搜索能力的前提下减少后续迭代中的无效搜索开销,提高路由方案的求解效率;通过在探索粒子中出现更优路由方案时及时解除维度固定并调整精英粒子群构成,避免算法过早收敛至局部最优解,从而在动态变化的无人机网络环境下持续获得较优的全局实时路由方案。
Smart Images

Figure CN123021285A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of UAV self-organizing networks and intelligent optimization technology of routing swarms, and in particular to a UAV dynamic routing method and apparatus with time window particle swarm optimization. Background Technology
[0002] In unmanned aerial vehicle (UAV) networks, the efficiency and stability of data transmission are core elements for ensuring the smooth implementation of various low-altitude missions. With the rapid development of the low-altitude economy, UAV application scenarios continue to expand in depth. In emergency communication scenarios, UAVs need to quickly establish temporary communication links in areas with network outages to provide real-time data channels for rescue command and disaster reporting. In remote monitoring scenarios, UAV swarms equipped with sensors need to quickly transmit monitoring data back to the ground. These complex scenarios place high demands on the timeliness and reliability of UAV network routing.
[0003] Unmanned aerial vehicle (UAV) network nodes undergo complex path selection to complete data transmission. Furthermore, time window constraints are a key limiting factor affecting transmission efficiency. Some UAV missions require data transmission to be completed within a specific timeframe; failure to do so negatively impacts mission performance. Traditional routing methods are typically designed based on static network topologies, making it difficult to adapt to frequent link changes caused by dynamic UAV flight. They also struggle to balance data transmission efficiency with time window constraints, leading to communication latency and data loss issues. This limits the applicability of traditional methods in scenarios such as emergency response and real-time monitoring. Summary of the Invention
[0004] To address the aforementioned issues, this application provides a method and apparatus for dynamic routing of unmanned aerial vehicles (UAVs) using particle swarm optimization with a time window. By introducing a time window constraint during the particle swarm optimization process and combining an asynchronous iteration strategy of elite particle swarms and exploratory particle swarms, efficient solution and dynamic optimization of UAV network routing schemes can be achieved.
[0005] The first aspect of this application proposes a dynamic routing method for unmanned aerial vehicles (UAVs) with time window particle swarm optimization, comprising the following steps: A drone network architecture is established based on drone nodes and data aggregation centers. The drone network architecture consists of N drone nodes and M data aggregation centers. The drone nodes transmit target data to the data aggregation centers through a multi-hop method. Construct a fitness function; the fitness function is constructed based on communication energy consumption cost, bandwidth occupancy cost, data transmission delay cost, data loss cost, data processing energy consumption cost, as well as bandwidth constraint penalty, power constraint penalty, time window constraint penalty, self-loop penalty, and unreachable convergence center penalty. The data transmission delay cost is determined based on the relationship between the start and end times of the communication time window of the UAV node and the processing time required to process the target data. For the UAV network architecture, multiple candidate solutions for routing are encoded into target position vectors of multiple routing particles to obtain a particle swarm. Each element of the target position vector corresponds to each UAV node, and the value of the element is the number of the next-hop forwarding object selected by the corresponding UAV node. The particle swarm is initialized, and the initial optimal position of each routing particle and the global real-time optimal position are determined according to the fitness function. The target position vector of each routing particle is iteratively updated to generate an intermediate vector; the intermediate vector is substituted into the fitness function to obtain the fitness value; when the fitness value is better than the fitness value corresponding to the current individual optimal position of the routing particle, the individual optimal position is updated to the intermediate vector; when the fitness value is better than the fitness value corresponding to the current global real-time optimal position, the global real-time optimal position is updated to the intermediate vector. When the number of iterations reaches the preset number of grouping rounds, the particle swarm is divided into an elite group and an exploration group according to each fitness value, and the routing particles corresponding to the elite group and the exploration group are divided into elite particles and exploration particles; the dimension to be fixed is determined according to the dimension with the same value in the target position vector corresponding to each elite particle, and the dimension to be fixed is fixed. In each iteration, the target position vector of elite particles is iteratively updated, while the target position vector of exploration particles is iteratively updated once every two iterations. When the routing particle with the best fitness value belongs to the exploration particle, the routing particle with the best fitness value is converted into an elite particle and added to the elite group, and the fixed dimension is removed. Until the number of iterations reaches the maximum number or the preset convergence condition is met, the global real-time optimal position is output as the global real-time optimal routing scheme.
[0006] The UAV dynamic routing method with time window particle swarm optimization according to the first aspect of the embodiments of this application has at least the following beneficial effects: This application introduces a time window constraint mechanism into the particle swarm optimization process and constructs a fitness function by combining factors such as communication energy consumption, bandwidth usage, data loss, and processing energy consumption. This enables the dynamic determination of the next-hop forwarding object with the lowest overall cost for each node in the UAV network. While ensuring data transmission is completed within a specified time window, it reduces communication latency and data packet loss rate, thereby improving the overall transmission efficiency and resource utilization of the UAV network. By dividing the particle swarm into elite particles and exploration particles and fixing the dimensions that have converged in the elite particles, it reduces the invalid search overhead in subsequent iterations while maintaining global search capability, thus improving the solution efficiency of the routing scheme. By promptly removing the dimension fixation and adjusting the composition of the elite particle swarm when a better routing scheme appears in the exploration particles, it avoids the algorithm from converging to a local optimum too early, thereby continuously obtaining a better global real-time routing scheme in the dynamically changing UAV network environment.
[0007] In one possible implementation, the drone nodes are numbered from 1 to N, the data aggregation centers are numbered from N+1 to N+M, and the next-hop forwarding object is the adjacent drone node or data aggregation center.
[0008] In one possible implementation, the communication energy consumption cost is determined based on the communication energy consumption cost coefficient per unit time, the signal interference coefficient, the distance between nodes, and the average data transmission rate; the bandwidth occupancy cost is determined based on the bandwidth occupancy cost coefficient per unit and the physical spectrum width occupied by the communication link; the data transmission delay cost is determined based on the duration of the processing time exceeding the communication time window and the delay cost coefficient per unit data volume, and the data transmission delay cost is zero when the processing time does not exceed the communication time window; the data loss cost is determined based on the communication link bit error rate, the data processing error rate, and the loss cost coefficient per unit data volume; and the data processing energy consumption cost is determined based on the data processing energy consumption coefficient and the amount of data to be processed.
[0009] In one possible implementation, the bandwidth constraint penalty term takes a positive value when the sum of the physical spectrum widths occupied by the communication links exceeds the maximum communication bandwidth of the UAV node; the power constraint penalty term takes a positive value when the sum of the communication energy consumption cost and the data processing energy consumption cost exceeds the maximum remaining power of the UAV node; the time window constraint penalty term takes a positive value when the processing time exceeds the communication time window; the self-loop penalty term takes a positive value when the number of the next-hop forwarding object selected by the UAV node is the same as the number of the UAV node; and the unreachable aggregation center penalty term takes a positive value when the UAV node cannot transmit the target data to any data aggregation center.
[0010] In one possible implementation, initializing the particle swarm further includes: Randomly generate the initial position vector and initial velocity vector for each route particle; The initial position vector is substituted into the fitness function to determine the initial individual optimal position and the global real-time optimal position, and the maximum number of attempts, population size, inertia weight, individual learning factor, group learning factor and random coefficient are set.
[0011] In one possible implementation, the iterative update is performed according to a preset iterative formula, which is:
[0012]
[0013] Among them, among them, This represents the current iteration number. and respectively routing particles No. generation and first The target velocity vector of the generation, and respectively routing particles No. generation and first The target position vector of the generation, For inertial weights, For individual learning factors, As a group learning factor, and For random coefficients, For routing particles The optimal position of an individual This is the globally optimal real-time position.
[0014] In one possible implementation, the number of grouping rounds is less than the maximum number of rounds, and at least one routing particle has a fitness value that satisfies a preset convergence threshold when the number of grouping rounds is reached; the elite particles are the top K routing particles sorted by fitness value from smallest to largest; the exploration particles are the remaining routing particles other than the elite particles; the dimension to be fixed is the dimension in the target position vector of each elite particle that has the same value.
[0015] In one possible implementation, the values of the unfixed dimensions in the target position vector of the elite particle are updated in each iteration, while the values of the fixed dimensions remain unchanged during the iteration process. The convergence condition is that the globally optimal real-time routing scheme obtained in multiple consecutive iterations remains unchanged.
[0016] The second aspect of this application proposes a dynamic routing device for unmanned aerial vehicles (UAVs) with time-window particle swarm optimization, comprising: The drone network architecture establishment module is configured to establish a drone network architecture based on drone nodes and data aggregation centers. The drone network architecture consists of N drone nodes and M data aggregation centers. The drone nodes transmit target data to the data aggregation centers through a multi-hop method. The fitness function construction module is configured to construct fitness functions. The fitness functions are constructed based on communication energy consumption cost, bandwidth occupancy cost, data transmission delay cost, data loss cost, data processing energy consumption cost, as well as bandwidth constraint penalty, power constraint penalty, time window constraint penalty, self-loop penalty, and unreachable convergence center penalty. The data transmission delay cost is determined based on the relationship between the start and end times of the UAV node's communication time window and the processing time required to process the target data. The particle initialization module is configured to encode multiple candidate solutions for routing into target position vectors of multiple routing particles to obtain a particle swarm for the UAV network architecture. Each element of the target position vector corresponds to each UAV node, and the value of the element is the number of the next-hop forwarding object selected by the corresponding UAV node. The particle swarm is initialized, and the initial optimal position of each routing particle and the global real-time optimal position are determined according to the fitness function. The iterative update module is configured to iteratively update the target position vector of each routing particle to generate an intermediate vector; substitute the intermediate vector into the fitness function to obtain the fitness value; when the fitness value is better than the fitness value corresponding to the current individual optimal position of the corresponding routing particle, update the individual optimal position to the intermediate vector; when the fitness value is better than the fitness value corresponding to the current global real-time optimal position, update the global real-time optimal position to the intermediate vector. The particle grouping module is configured to divide the particle swarm into an elite group and an exploration group based on each fitness value when the number of iterations reaches a preset number of grouping rounds, and to further divide the routing particles corresponding to the elite group and the exploration group into elite particles and exploration particles; to determine the dimension to be fixed based on the dimension with the same value in the target position vector corresponding to each elite particle, and to fix the dimension to be fixed. The asynchronous iteration and output module is configured to iteratively update the target position vector of elite particles in each iteration and to iteratively update the target position vector of exploration particles every two iterations. When the routing particle with the best fitness value belongs to the exploration particle, the routing particle with the best fitness value is converted into an elite particle and added to the elite group, and the fixation of the fixed dimension is removed. Until the number of iterations reaches the maximum number or the preset convergence condition is met, the global real-time optimal position is output as the global real-time optimal routing scheme.
[0017] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the steps of the method of the first aspect. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating a UAV dynamic routing method with time window particle swarm optimization provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a UAV dynamic routing device with time window particle swarm optimization provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application; Figure 4 This is a schematic diagram of a drone network and routing provided in one embodiment of this application. Detailed Implementation
[0020] The embodiments of this implementation are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this implementation, and should not be construed as limiting this implementation.
[0021] In the description of this embodiment, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., are based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this embodiment and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this embodiment.
[0022] In the description of this embodiment, "several" means one or more, "multiple" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.
[0023] In the description of this embodiment, unless otherwise explicitly limited, terms such as setting, installing, and connecting should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this embodiment in conjunction with the specific content of the technical solution.
[0024] Please refer to Figure 1 This document illustrates a flowchart of a UAV dynamic routing method with time-window particle swarm optimization, according to an embodiment of this application. In this embodiment, the UAV dynamic routing method with time-window particle swarm optimization includes the following steps: Step 101: Establish a drone network architecture based on drone nodes and data aggregation centers; the drone network architecture consists of N drone nodes and M data aggregation centers, and drone nodes transmit target data to the data aggregation centers through multi-hop methods.
[0025] When drone nodes perform tasks such as monitoring, detection, or data collection, they generate target data that needs to be transmitted to the data aggregation center. Since some drone nodes are far away from the data aggregation center, they cannot directly establish a stable communication link with the data aggregation center. These drone nodes need to forward the target data to the data aggregation center in a multi-hop manner with the help of other drone nodes.
[0026] To achieve the above transmission process, each UAV node has a store-and-forward function, that is, after receiving data forwarded by other nodes, it first temporarily caches it and then continues to forward it until the target data is successfully transmitted to a data aggregation center, thus forming a complete network route.
[0027] The drone nodes are numbered from 1 to N, the data aggregation centers are numbered from N+1 to N+M, and the next-hop forwarding object is the adjacent drone node or data aggregation center.
[0028] Distinguishing between drone nodes and data aggregation centers by numbering facilitates the use of a unified numerical range to represent all possible forwarding objects in subsequent target location vectors, thus avoiding overlap between drone node numbers and data aggregation center numbers.
[0029] The UAV network architecture refers to a network topology consisting of N UAV nodes and M data aggregation centers, with communication links connecting them. The topology remains relatively fixed during a single route optimization process.
[0030] like Figure 4The diagram shown is a schematic of the drone network and routing provided in an embodiment of this application. The drone network architecture in this embodiment can consist of 8 drone nodes and 3 data aggregation centers. The 8 drone nodes are numbered 1 to 8, and the 3 data aggregation centers are numbered 9, 10, and 11, respectively. The communication links between drone nodes and between drone nodes and data aggregation centers are relatively fixed. Drone node numbered 1 can only select drone node numbered 8 as the next-hop forwarding object, and cannot directly select other drone nodes or data aggregation centers that are far away and do not have communication links.
[0031] Step 102: Construct the fitness function. The fitness function is constructed based on communication energy consumption cost, bandwidth occupancy cost, data transmission delay cost, data loss cost, data processing energy consumption cost, as well as bandwidth constraint penalty, power constraint penalty, time window constraint penalty, self-loop penalty, and unreachable convergence center penalty. The data transmission delay cost is determined based on the relationship between the start and end times of the UAV node's communication time window and the processing time required to process the target data.
[0032] Communication energy consumption cost is determined based on the communication energy consumption cost coefficient per unit time, signal interference coefficient, distance between nodes, and average data transmission rate; bandwidth occupancy cost is determined based on the bandwidth occupancy cost coefficient per unit and the physical spectrum width occupied by the communication link; data transmission delay cost is determined based on the duration of processing time exceeding the communication time window and the delay cost coefficient per unit data volume, with zero data transmission delay cost when processing time does not exceed the communication time window; data loss cost is determined based on the communication link bit error rate, data processing error rate, and the loss cost coefficient per unit data volume; data processing energy consumption cost is determined based on the data processing energy consumption coefficient and the amount of data to be processed.
[0033] The fitness function is a function used to evaluate the merits of a routing scheme after comprehensively considering various communication costs and constraint violation penalties. The smaller the fitness function value, the lower the total communication cost of the routing scheme. The embodiments of this application aim to minimize the fitness function value.
[0034] The communication energy consumption cost is determined based on the communication energy consumption cost coefficient per unit time, the signal interference coefficient, the distance between UAV nodes, and the average data transmission rate in the link. The calculation method is as follows:
[0035] in, This is the communication energy consumption cost coefficient per unit time. The signal interference coefficient. For nodes To the node distance, The average data transmission rate in the link. It is a drone node With nodes Communication energy consumption cost during communication.
[0036] Signal interference coefficient It reflects the degree of impact of factors such as electromagnetic interference and multipath fading on communication quality in the communication environment. This term reflects the characteristic that free-space propagation loss increases with the square of the distance. Bandwidth occupancy cost is determined based on the cost coefficient per unit bandwidth and the physical spectrum width occupied by the communication link; its calculation method is as follows:
[0037] in, The cost factor per unit bandwidth. Indicates drone node With nodes The physical spectrum bandwidth occupied by the communication link during communication refers to the actual wireless spectrum bandwidth used by the communication link, and its occupation incurs corresponding resource costs. It is a drone node With nodes Bandwidth usage costs during communication.
[0038] Data transmission latency cost is determined by the duration by which the drone node's processing time exceeds its communication time window, and a latency cost coefficient per unit data volume. The time required for a drone node to process data is calculated using the formula:
[0039] Determine the start and end times of the communication time window for this node, and calculate the duration by which the data processing time exceeds the communication time window using the formula:
[0040] Delay costs are calculated using the following formula:
[0041] in, For drone nodes Time required to process a unit of data For drone nodes The amount of data, It is a drone node The time required to process the data; and Each is a drone node The start and end times of the communication time window. It is a drone node The time taken to process the data exceeds the duration of the communication time window; The latency cost coefficient per unit data volume; It is a drone node The data transmission latency cost, if the drone node If data processing can be completed within the communication time window, then its data transmission delay cost is 0.
[0042] The cost of data loss is determined based on the bit error rate of the communication link and the data processing error rate. First, calculate the amount of data loss:
[0043] Then, determine the data loss cost based on the unit data loss cost coefficient:
[0044] in, The bit error rate (BER) of a communication link refers to the probability of bit errors occurring during wireless data transmission. For data processing error rate, This refers to the amount of data loss. The cost coefficient per unit data volume loss. For drone nodes The cost of data loss. Data processing energy consumption cost is determined based on the data processing energy consumption coefficient and the amount of data to be processed, and is calculated as follows:
[0045] in, This is the data processing energy consumption coefficient; the data processing energy consumption cost reflects the energy consumed by the UAV node in processing the received data, such as caching and forwarding.
[0046] The bandwidth constraint penalty term takes a positive value when the sum of the physical spectrum widths occupied by the communication link exceeds the maximum communication bandwidth of the UAV node; the power constraint penalty term takes a positive value when the sum of the communication energy consumption cost and the data processing energy consumption cost exceeds the maximum remaining power of the UAV node; the time window constraint penalty term takes a positive value when the processing time exceeds the communication time window; the self-loop penalty term takes a positive value when the number of the next-hop forwarding object selected by the UAV node is the same as the number of the UAV node; the unreachable aggregation center penalty term takes a positive value when the UAV node cannot transmit the target data to any data aggregation center.
[0047] Based on the aforementioned communication costs, various constraint penalties are calculated according to the limiting conditions. The bandwidth constraint penalty takes a positive value when the sum of the physical spectrum widths occupied by the communication links exceeds the maximum communication bandwidth of the UAV node. Its calculation method is as follows:
[0048] in, This is the maximum communication bandwidth of the drone node. It is a very large penalty coefficient. All penalty terms, including this penalty term, are used to ensure that the optimization result meets the constraints to maintain the feasibility of the route. Therefore, the penalty term is a non-adjustable term, and the penalty coefficients corresponding to all penalty terms can be set to the same maximum value.
[0049] The power constraint penalty term takes a positive value when the sum of communication energy consumption cost and data processing energy consumption cost exceeds the maximum remaining power of the UAV node. Its calculation method is as follows:
[0050] in, It is a drone node The maximum remaining battery power.
[0051] The time window constraint penalty term takes a positive value when the time taken by a UAV node to process data exceeds the node's communication time window. Its calculation method is as follows:
[0052] in, Indicates drone node Data processing time.
[0053] The self-loop penalty term takes a positive value when the drone node selects itself as the next-hop forwarding object, i.e., when the selected next-hop forwarding object's number is the same as the drone node's own number. Its calculation method is as follows:
[0054] in, Representing drone nodes Is it possible to transmit data to the node? The two variables are 1 for yes and 0 for no; in the formula and Time indicates drone node It transmits data to itself, creating a self-loop, at which point a self-loop penalty needs to be calculated.
[0055] The calculation method for the penalty for unreachable convergence centers is as follows:
[0056] in, Representing drone nodes Whether data needs to be transmitted, 1 indicates yes, 0 indicates no; Representing drone nodes Is it possible to transmit the data to the data aggregation center? The variable is a binary variable, where 1 represents yes and 0 represents no; N and M represent the number of drone nodes and data aggregation centers, respectively, with drone nodes numbered from 1 to N and data aggregation centers numbered from N+1 to N+M; when drone nodes Data needs to be transmitted At that time, if data can be transmitted to any data aggregation center Then it exists Make , The penalty term is 0; otherwise, the penalty term is a maximum value.
[0057] By adding the communication costs mentioned above to the penalty for constraint violations, a fitness function is constructed to evaluate the merits of routing schemes. The calculation method is as follows:
[0058] The fitness function integrates five types of costs: communication energy consumption cost, bandwidth occupancy cost, data transmission delay cost, data loss cost, and data processing energy consumption cost, as well as five types of penalties: bandwidth constraint penalty, power constraint penalty, time window constraint penalty, self-loop penalty, and unreachable aggregation center penalty.
[0059] Step 103: For the UAV network architecture, the multiple candidate solutions of the routing are encoded into target position vectors of multiple routing particles to obtain a particle swarm. Each element of the target position vector corresponds to each UAV node, and the value of the element is the number of the next-hop forwarding object selected by the corresponding UAV node. The particle swarm is initialized, and the initial individual optimal position and global real-time optimal position of each routing particle are determined according to the fitness function.
[0060] The target location vector encodes the routing schemes of N drone nodes into an N-dimensional vector. Each element of this vector corresponds one-to-one with each drone node, and the value of each element represents the number of the next-hop forwarding object selected by that drone node. This can be the number of a neighboring drone node or the number of a convergence center. A routing particle is an individual entity carrying a target location vector in the particle swarm optimization algorithm. Each routing particle represents a complete candidate routing solution. The particle swarm is a set of multiple routing particles on which the particle swarm optimization algorithm iteratively searches.
[0061] The initial position vector and initial velocity vector of each routing particle are randomly generated; the initial position vector is substituted into the fitness function to determine the initial optimal position of the individual and the global real-time optimal position, and the maximum number of attempts, population size, inertia weight, individual learning factor, group learning factor and random coefficient are set.
[0062] During initialization, initial position and velocity vectors are randomly generated for each routing particle. These initial position vectors are then substituted into the fitness function to determine the initial optimal position for each individual and the global real-time optimal position. Simultaneously, the values of the following key parameters are set: maximum number of attempts, population size (i.e., total number of routing particles), and inertia weight. Individual learning factors Group learning factor and random coefficients and .
[0063] After initialization, the initial position vectors of all routing particles in the population are substituted into the fitness function. Calculations are performed to determine the optimal individual position of each routing particle at the initial stage. and global real-time optimal position The calculation method is as follows:
[0064]
[0065] That is, the optimal position of each routing particle at the beginning is its own initial position vector, and the global real-time optimal position is the position vector of the routing particle that minimizes the fitness function value.
[0066] Step 104: Iteratively update the target position vector of each routing particle to generate an intermediate vector; substitute the intermediate vector into the fitness function to obtain the fitness value; when the fitness value is better than the fitness value corresponding to the current individual optimal position of the corresponding routing particle, update the individual optimal position to the intermediate vector; when the fitness value is better than the fitness value corresponding to the current global real-time optimal position, update the global real-time optimal position to the intermediate vector.
[0067] Iterative update refers to updating the target velocity vector and target position vector of each route particle using the velocity and position iterative formula of standard particle swarm optimization.
[0068] The iterative update is performed according to a preset iterative formula, which is:
[0069]
[0070] Among them, among them, This represents the current iteration number. and respectively routing particles No. generation and first The target velocity vector of the generation, and respectively routing particles No. generation and first The target position vector of the generation, For inertial weights, For individual learning factors, As a group learning factor, and For random coefficients, For routing particles The optimal position of an individual This is the globally optimal real-time position.
[0071] The target velocity vector refers to the flight direction and step size of the routing particle in the search space. Its dimension is the same as the target position vector. The initial velocity vector is generated randomly and updated in each iteration. Because the node numbers of each element in the target position vector must be integer values, the updated target position vector needs to be rounded up.
[0072] After updating the position vector, the updated current position vector (the intermediate vector) is substituted into the fitness function to calculate the current fitness value. Then, all routing particles are traversed and their individual optimal position and global real-time optimal position are updated: if the current fitness value is better than the fitness value corresponding to the current individual optimal position of the routing particle, the individual optimal position is updated to the current position vector; if the current fitness value is better than the fitness value corresponding to the current global real-time optimal position, the global real-time optimal position is updated to the current position vector.
[0073] Step 105: When the number of iterations reaches the preset number of grouping rounds, the particle swarm is divided into an elite group and an exploration group according to each fitness value, and the routing particles corresponding to the elite group and the exploration group are divided into elite particles and exploration particles; the dimension to be fixed is determined according to the dimension with the same value in the target position vector corresponding to each elite particle, and the dimension to be fixed is fixed.
[0074] The number of grouping rounds is less than the maximum number of rounds, and at least one routing particle has a fitness value that meets the preset convergence threshold when the number of grouping rounds is reached; the elite particles are the top K routing particles sorted by fitness value from smallest to largest; the exploration particles are the remaining routing particles other than the elite particles; the dimension to be fixed is the dimension in the target position vector of each elite particle that has the same value.
[0075] When the number of iterations reaches the preset number of grouping rounds hour, Less than the maximum number And there exists at least one routing particle. Make fitness value Less than the preset convergence threshold , The specific value can be dynamically adjusted based on the network attributes of the drone using this method.
[0076] At this point, the fitness values of all routing particles are calculated. Sort the fitness values in ascending order, select the top K routing particles as elite particles, and the rest... Each routing particle is used as an exploration particle. After sorting, all routing particles are renumbered, and the target position vector of the elite particle is then calculated. The target position vector of the explored particle is Elite particles represent the group of currently known optimal routing schemes, while exploration particles are responsible for exploring and searching in a wider space of unknown solutions to avoid the algorithm getting trapped in local optima too early.
[0077] For elite particles, the dimension that can be fixed is determined according to the following formula:
[0078] in, It is the dimension with the same value in the position vectors of all elite particles, that is, after... The better one after rounds of iteration The common part in each routing scheme indicates the drone node The optimal next-hop node has been relatively determined, so the i-th dimension of the position vector of all elite nodes is fixed.
[0079] Step 106: For elite particles, iteratively update the target position vector in each iteration; for exploration particles, iteratively update the target position vector once every two iterations. When the routing particle with the best fitness value belongs to the exploration particle, convert the routing particle with the best fitness value into an elite particle and add it to the elite group, and remove the fixation of the fixed dimension. Until the number of iterations reaches the maximum number or the preset convergence condition is met, output the global real-time optimal position as the global real-time optimal routing scheme.
[0080] In the target position vector of elite particles, the values of the unfixed dimensions are updated in each iteration, while the values of the fixed dimensions remain unchanged during the iteration process. The convergence condition is that the globally optimal real-time routing scheme obtained in multiple consecutive iterations remains unchanged.
[0081] After grouping, elite particles and exploration particles enter asynchronous iteration mode. In each iteration, elite particles update the unfixed dimensions, while the fixed dimensions remain unchanged. Exploration particles update the target position vector every two iterations, thus reducing the amount of computation while maintaining the particle swarm's exploration of the unknown solution space.
[0082] During the iteration process, the fitness value of all routing particles is continuously calculated. If the routing particle with the best fitness value appears in the exploration particles, it means that the routing scheme determined by the current elite particle group is not globally optimal. At this time, the routing particle is converted into an elite particle and added to the elite group. At the same time, the restriction on the fixed dimension is removed, so that the elite particle group can regain the ability to search all dimensions and avoid the algorithm from converging to a local optimum too early.
[0083] The asynchronous iteration and dynamic promotion process described above is repeated until the number of iterations reaches the preset maximum or the preset convergence condition is met. The convergence condition is that the unfixed dimensions in the elite particles are updated in each iteration, the values of the fixed dimensions to be fixed remain unchanged during the iteration process, and the globally optimal real-time routing scheme obtained from multiple consecutive iterations remains unchanged. At this point, the routing scheme corresponding to the globally optimal real-time position among the positions of all routing particles is output, which is the globally optimal real-time routing scheme that minimizes the total communication cost under all constraints.
[0084]
[0085] See Figure 4 According to Table 1, taking the network architecture of 8 UAV nodes and 3 data aggregation centers as an example, the target position vector corresponding to the global real-time optimal position obtained after the above iteration process can be [8,7,6,9,6,11,10,4]. That is, UAV node number 1 forwards to number 8, number 2 forwards to number 7, number 3 forwards to number 6, number 4 forwards to number 9, number 5 forwards to number 6, number 6 forwards to number 11, number 7 forwards to number 10, and number 8 forwards to number 4. Each UAV node forwards data step by step according to this routing scheme, and finally converges to the data aggregation centers numbered 9, 10, and 11 respectively, forming a complete routing network.
[0086] like Figure 2 The diagram illustrates a UAV dynamic routing device with time-window particle swarm optimization provided in this application. In this embodiment, the UAV dynamic routing device with time-window particle swarm optimization includes: The UAV network architecture establishment module 201 is configured to establish a UAV network architecture based on UAV nodes and data aggregation centers; the UAV network architecture consists of N UAV nodes and M data aggregation centers, and the UAV nodes transmit target data to the data aggregation centers through a multi-hop method; The fitness function construction module 202 is configured to construct a fitness function. The fitness function is constructed based on communication energy consumption cost, bandwidth occupancy cost, data transmission delay cost, data loss cost, data processing energy consumption cost, as well as bandwidth constraint penalty, power constraint penalty, time window constraint penalty, self-loop penalty, and unreachable convergence center penalty. The data transmission delay cost is determined based on the relationship between the start and end times of the communication time window of the UAV node and the processing time required to process the target data. The particle initialization module 203 is configured to encode multiple candidate solutions of routing into target position vectors of multiple routing particles for the UAV network architecture to obtain a particle swarm. Each element of the target position vector corresponds to each UAV node, and the value of the element is the number of the next-hop forwarding object selected by the corresponding UAV node. The particle swarm is initialized, and the initial optimal position of each routing particle and the global real-time optimal position are determined according to the fitness function. The iterative update module 204 is configured to iteratively update the target position vector of each routing particle to generate an intermediate vector; substitute the intermediate vector into the fitness function to obtain the fitness value; when the fitness value is better than the fitness value corresponding to the current individual optimal position of the corresponding routing particle, update the individual optimal position to the intermediate vector; when the fitness value is better than the fitness value corresponding to the current global real-time optimal position, update the global real-time optimal position to the intermediate vector. The particle grouping module 205 is configured to divide the particle swarm into an elite group and an exploration group according to each fitness value when the number of iterations reaches a preset number of grouping rounds, and to divide the routing particles corresponding to the elite group and the exploration group into elite particles and exploration particles; to determine the dimension to be fixed according to the dimension with the same value in the target position vector corresponding to each elite particle, and to fix the dimension to be fixed. The asynchronous iteration and output module 206 is configured to iteratively update the target position vector of elite particles in each iteration and to iteratively update the target position vector of exploration particles every two iterations. When the routing particle with the best fitness value belongs to the exploration particle, the routing particle with the best fitness value is converted into an elite particle and added to the elite group, and the fixation of the fixed dimension is released. Until the number of iterations reaches the maximum number or the preset convergence condition is met, the global real-time optimal position is output as the global real-time optimal routing scheme.
[0087] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0088] Figure 3 This is a schematic diagram of the electronic device 3 provided in an embodiment of this application. Figure 3As shown, the electronic device 3 of this embodiment includes: a processor 301, a memory 302, and a computer program 303 stored in the memory 302 and executable on the processor 301. When the processor 301 executes the computer program 303, it implements the steps in the various method embodiments described above. Alternatively, when the processor 301 executes the computer program 303, it implements the functions of each module / unit in the various device embodiments described above.
[0089] Electronic device 3 can be a desktop computer, laptop, handheld computer, cloud server, or other electronic device. Electronic device 3 may include, but is not limited to, processor 301 and memory 302. Those skilled in the art will understand that... Figure 3 This is merely an example of electronic device 3 and does not constitute a limitation on electronic device 3. It may include more or fewer components than shown, or different components.
[0090] The processor 301 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0091] The memory 302 can be an internal storage unit of the electronic device 3, such as a hard disk or memory of the electronic device 3. The memory 302 can also be an external storage device of the electronic device 3, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 3. The memory 302 can also include both internal and external storage units of the electronic device 3. The memory 302 is used to store computer programs and other programs and data required by the electronic device.
[0092] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0093] If an integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program may include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium may include: any entity or device capable of carrying computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0094] It should be noted that the content contained in computer-readable media may be appropriately added to or subtracted from the requirements of legislation and patent practice in a jurisdiction. For example, in some jurisdictions, computer-readable media may not include electrical carrier signals and telecommunication signals, in accordance with legislation and patent practice.
[0095] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this implementation. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0096] Although embodiments of this implementation have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of this implementation, the scope of which is defined by the claims and their equivalents.
Claims
1. A dynamic routing method for unmanned aerial vehicles (UAVs) with time-window particle swarm optimization, characterized in that, include: A drone network architecture is established based on drone nodes and data aggregation centers; the drone network architecture consists of N drone nodes and M data aggregation centers, and the drone nodes transmit target data to the data aggregation centers through a multi-hop method; A fitness function is constructed based on communication energy consumption cost, bandwidth occupancy cost, data transmission delay cost, data loss cost, data processing energy consumption cost, as well as bandwidth constraint penalty, power constraint penalty, time window constraint penalty, self-loop penalty, and unreachable convergence center penalty. The data transmission delay cost is determined based on the relationship between the start and end times of the communication time window of the UAV node and the processing time required to process the target data. For the aforementioned UAV network architecture, multiple candidate solutions for routing are encoded into target position vectors of multiple routing particles to obtain a particle swarm; Each element of the target location vector corresponds to each of the UAV nodes, and the value of the element is the number of the next-hop forwarding object selected by the corresponding UAV node. The particle swarm is initialized, and the individual optimal position and global real-time optimal position of each routing particle at the initial time are determined according to the fitness function. The target position vector of each routing particle is iteratively updated to generate an intermediate vector; the intermediate vector is substituted into the fitness function to obtain a fitness value; when the fitness value is better than the fitness value corresponding to the current individual optimal position of the routing particle, the individual optimal position is updated to the intermediate vector; when the fitness value is better than the fitness value corresponding to the current global real-time optimal position, the global real-time optimal position is updated to the intermediate vector. When the number of iterations reaches the preset number of grouping rounds, the particle swarm is divided into an elite group and an exploration group according to each fitness value, and the routing particles corresponding to the elite group and the exploration group are divided into elite particles and exploration particles; the dimension to be fixed is determined according to the dimension with the same value in the target position vector corresponding to each elite particle, and the dimension to be fixed is fixed. In each iteration, the target position vector of the elite particle is iteratively updated, and the target position vector of the exploration particle is iteratively updated once every two iterations. When the routing particle with the best fitness value belongs to the exploration particle, the routing particle with the best fitness value is converted into the elite particle and added to the elite group, and the fixation of the dimension to be fixed is released. Until the number of iterations reaches the maximum number or the preset convergence condition is met, the global real-time optimal position is output as the global real-time optimal routing scheme.
2. The method according to claim 1, characterized in that, The number of the drone node is 1 to N, the number of the data aggregation center is N+1 to N+M, and the next-hop forwarding object is the adjacent drone node or the data aggregation center.
3. The method according to claim 1, characterized in that, The communication energy consumption cost is determined based on the communication energy consumption cost coefficient per unit time, the signal interference coefficient, the distance between nodes, and the average data transmission rate; the bandwidth occupancy cost is determined based on the bandwidth occupancy cost coefficient per unit and the physical spectrum width occupied by the communication link; the data transmission delay cost is determined based on the duration of the processing time exceeding the communication time window and the delay cost coefficient per unit data volume, and the data transmission delay cost is zero when the processing time does not exceed the communication time window; the data loss cost is determined based on the communication link bit error rate, the data processing error rate, and the loss cost coefficient per unit data volume; the data processing energy consumption cost is determined based on the data processing energy consumption coefficient and the amount of data to be processed.
4. The method according to claim 1, characterized in that, The bandwidth constraint penalty term takes a positive value when the sum of the physical spectrum widths occupied by the communication link exceeds the maximum communication bandwidth of the UAV node; the power constraint penalty term takes a positive value when the sum of the communication energy consumption cost and the data processing energy consumption cost exceeds the maximum remaining power of the UAV node; the time window constraint penalty term takes a positive value when the processing time exceeds the communication time window; the self-loop penalty term takes a positive value when the number of the next-hop forwarding object selected by the UAV node is the same as the number of the UAV node; and the unreachable aggregation center penalty term takes a positive value when the UAV node cannot transmit the target data to any of the data aggregation centers.
5. The method according to claim 1, characterized in that, The initialization of the particle swarm also includes: Randomly generate the initial position vector and initial velocity vector of each of the routing particles; The initial position vector is substituted into the fitness function to determine the initial optimal position of the individual and the global real-time optimal position, and the maximum number of attempts, population size, inertia weight, individual learning factor, group learning factor and random coefficient are set.
6. The method according to claim 5, characterized in that, The iterative update is performed according to a preset iterative formula, which is: , in, This represents the current iteration number. and The routing particles are respectively No. generation and first The target velocity vector of the generation, and The routing particles are respectively No. generation and first The target position vector of the generation, The inertial weight, The individual learning factor, The group learning factor, and The random coefficients are... For the routing particles The optimal position of the individual, This refers to the globally optimal real-time position.
7. The method according to claim 1, characterized in that, The number of grouping rounds is less than the maximum number of times, and when the number of grouping rounds is reached, at least one of the routing particles has a fitness value that satisfies a preset convergence threshold; the elite particles are the top K routing particles sorted by fitness value from smallest to largest; the exploration particles are the remaining routing particles other than the elite particles; the dimension to be fixed is the dimension in the target position vector of each elite particle that has the same value.
8. The method according to claim 1, characterized in that, In the target position vector of the elite particle, the values of the unfixed dimensions are updated in each iteration, while the values of the fixed dimensions remain unchanged during the iteration process. The convergence condition is that the globally optimal real-time routing scheme obtained from multiple consecutive iterations remains unchanged.
9. A dynamic routing device for unmanned aerial vehicles with time-window particle swarm optimization, characterized in that, include: The drone network architecture establishment module is configured to establish a drone network architecture based on drone nodes and a data aggregation center; The drone network architecture consists of N drone nodes and M data aggregation centers. The drone nodes transmit target data to the data aggregation centers through a multi-hop method. The fitness function construction module is configured to construct a fitness function. The fitness function is constructed based on communication energy consumption cost, bandwidth occupancy cost, data transmission delay cost, data loss cost, data processing energy consumption cost, as well as bandwidth constraint penalty, power constraint penalty, time window constraint penalty, self-loop penalty, and unreachable convergence center penalty. The data transmission delay cost is determined based on the relationship between the start and end times of the communication time window of the UAV node and the processing time required to process the target data. The particle initialization module is configured to encode multiple candidate solutions of the route into target position vectors of multiple route particles to obtain a particle swarm for the UAV network architecture. Each element of the target location vector corresponds to each of the UAV nodes, and the value of the element is the number of the next-hop forwarding object selected by the corresponding UAV node. The particle swarm is initialized, and the individual optimal position and global real-time optimal position of each routing particle at the initial time are determined according to the fitness function. An iterative update module is configured to iteratively update the target position vector of each routing particle to generate an intermediate vector; substitute the intermediate vector into the fitness function to obtain a fitness value; when the fitness value is better than the fitness value corresponding to the current individual optimal position of the routing particle, update the individual optimal position to the intermediate vector; when the fitness value is better than the fitness value corresponding to the current global real-time optimal position, update the global real-time optimal position to the intermediate vector. The particle grouping module is configured to, when the number of iterations reaches a preset number of grouping rounds, divide the particle swarm into an elite group and an exploration group according to the fitness values, and divide the routing particles corresponding to the elite group and the exploration group into elite particles and exploration particles; determine the dimension to be fixed according to the dimension with the same value in the target position vector corresponding to each elite particle, and fix the dimension to be fixed. The asynchronous iteration and output module is configured to iteratively update the target position vector of the elite particle in each iteration, and to iteratively update the target position vector of the exploration particle every two iterations; when the routing particle with the best fitness value belongs to the exploration particle, the routing particle with the best fitness value is converted into the elite particle and added to the elite group, and the fixation of the dimension to be fixed is released; until the number of iterations reaches the maximum number or the preset convergence condition is met, the global real-time optimal position is output as the global real-time optimal routing scheme.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 8.
