A dynamic and static combined urban logistics unmanned aerial vehicle task planning method

By combining static and dynamic methods for urban logistics drone mission planning, and utilizing k-means and HPSO algorithms to optimize airport location and task allocation, and improving the DDQN algorithm for handling immediate orders, the shortcomings of static and dynamic planning in drone delivery systems are addressed, achieving efficient and safe logistics delivery.

CN119323323BActive Publication Date: 2025-12-05NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411345174.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-12-05
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

Existing drone delivery systems struggle to effectively combine static and dynamic planning, resulting in an inability to rationally allocate drone fleets when faced with both immediate and non-immediate orders. This leads to low transportation efficiency, frequent air traffic congestion and conflicts, and difficulty in responding to emergencies.

Method used

A dynamic and static combined urban logistics UAV mission planning method is adopted. The airport location is determined by the k-means clustering algorithm based on spatiotemporal constraints, static mission planning is performed by combining the HPSO algorithm, and dynamic mission planning is performed by improving the DDQN algorithm, thereby optimizing the UAV fleet size and mission allocation.

Benefits of technology

It improves the efficiency and accuracy of drone delivery, enabling it to better handle immediate orders and emergencies, reduce air traffic congestion and conflicts, and ensure the safety and integrity of cargo delivery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119323323B_ABST
    Figure CN119323323B_ABST
Patent Text Reader

Abstract

The application discloses a kind of dynamic and static combined city logistics unmanned plane task planning method, comprising the following steps: (1) input dynamic and static combined city logistics unmanned plane task planning city logistics order data of instant, non-instant delivery, using the k-means clustering algorithm based on space-time constraint improvement, preliminary site logistics unmanned plane airport position.(2) using the static task planning method based on HPSO algorithm, determine the static task planning result for non-instant delivery order, determine logistics distribution point position, and optimize the site of unmanned plane airport according to logistics distribution point distribution, balance the task quantity of each airport.(3) propose dynamic task planning method based on the static task planning result improvement DDQN algorithm, determine the dynamic task planning result of instant delivery order, to finally determine the planning and scheduling scheme of logistics unmanned plane fleet.The application makes unmanned plane facility site selection and order allocation more reasonable by fusing instant delivery and non-instant delivery city logistics order.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of drones and logistics, and specifically to a dynamic and static combined urban logistics drone mission planning method. Background Technology

[0002] With the development of modern computer technology and the advancement of internet technology, drone delivery technology has become a reality. Compared to traditional delivery methods, drone delivery can avoid traffic congestion and ground obstacles, delivering goods at a faster speed. This can play a crucial role in emergency situations or for items requiring rapid delivery. On the other hand, drone delivery can reduce labor and transportation costs because it eliminates the need for drivers or fuel expenses. Drones also generate significantly less carbon emissions than fleet delivery, helping to reduce the environmental impact of logistics activities and promote sustainable development. Furthermore, by using sensors and monitoring technology, the status and location of goods can be monitored in real time for drone delivery. Delivery providers can address any issues promptly, ensuring the safety and integrity of the delivery.

[0003] However, drone delivery also faces a series of challenges. The key to the widespread application of this delivery model lies in how to combine static and dynamic perspectives to plan the flight paths of logistics drones to minimize losses during transportation while maintaining efficient delivery speeds. Existing drone delivery often operates on a static delivery model. Static delivery may struggle to cope with unforeseen circumstances, while combining static and dynamic planning can better address problems and risks. Furthermore, when dealing with immediate orders, static delivery may face air traffic congestion and conflicts, while combining static and dynamic planning can better plan flight paths. Compared to static delivery, the key challenge for combined static and dynamic delivery is determining the drone fleet size planning scheme based on both immediate and non-immediate order tasks. Summary of the Invention

[0004] Purpose of the invention: This invention proposes a dynamic and static combined urban logistics drone task planning method by integrating the working characteristics of timely and non-timely delivery by logistics drones. This method includes determining and optimizing drone airport locations, determining logistics delivery point locations, providing a logistics drone fleet size planning scheme, and allocating tasks for timely and non-timely delivery orders. This makes drone airport site selection more reasonable and drone delivery more economical.

[0005] The above objectives are achieved through the following technical solutions:

[0006] A dynamic and static combined urban logistics drone mission planning method, the method comprising the following steps:

[0007] S1. Input the dynamic and static combined urban logistics drone mission planning data of real-time and non-real-time delivery to obtain sample data. The sample data includes airspace attributes, weather information, store location, and customer location. Based on the store and customer location data, use the k-means clustering algorithm based on spatiotemporal constraints to initially select the location of the logistics drone airport.

[0008] S2. Using a static task planning method based on the HPSO (Hybrid Particle Swarm Optimization) algorithm, determine the static task planning results for non-real-time delivery orders. Use the DBSCAN clustering algorithm that considers walking reachability constraints to determine the location of logistics delivery points. Optimize the location of UAV airports based on the distribution of logistics delivery points and balance the number of tasks at each airport.

[0009] S3. Based on the location of UAV airports and logistics delivery points, and taking into account spatial information, UAV performance, and weather conditions, a dynamic task planning method based on the improved DDQN algorithm with static task planning results is proposed to determine the dynamic task planning results of instant delivery orders, thereby ultimately determining the planning and scheduling scheme of the logistics UAV fleet.

[0010] Furthermore, step S1.1, which considers the k-means clustering algorithm with spatiotemporal constraints, includes the following steps:

[0011] S1.1.1 Determination of alternative addresses:

[0012] (1) The demand points are clustered using the k-means clustering algorithm based on Euclidean distance to determine the number of candidate logistics drone airports k. The demand points are clustered using k-means, and the cluster centers in the clustering results are used as candidate logistics drone airports to be evaluated.

[0013] (2) Collect data on the evaluation indicators of each candidate logistics drone airport to form a dataset. The evaluation indicators include airspace conditions, traffic characteristics, and construction conditions. Then, based on actual needs or data analysis, optimize and adjust the number of candidate take-off and landing sites. Randomly select k points from the dataset as initial cluster centers. Assign each point in the dataset to the nearest cluster center to form k clusters. Recalculate the center point of each cluster as a new cluster center. Repeat the above steps until the cluster centers no longer change significantly or the preset number of iterations is reached.

[0014] S1.1.2 Establishment of a multi-objective location selection model:

[0015] A distance-based function is used to characterize customer satisfaction:

[0016] a i b is the average distance from point i to other points within its cluster. iThe silhouette coefficient S is the average distance from point i to the nearest other points within the cluster. It is calculated using the silhouette coefficient evaluation metric. i :

[0017]

[0018] The silhouette coefficient measures the density of points within the same cluster and the separation between different clusters. Its value ranges from -1 to 1. A larger value indicates a better clustering effect. Finally, the average silhouette coefficient of all data points is calculated as the evaluation index of the entire clustering result.

[0019] Furthermore, the implementation steps of step S1.2, the k-means clustering algorithm based on Euclidean distance, are as follows:

[0020] S1.2.1 Based on the obtained sample data, obtain two arbitrary data points p1(x1, y1, t1) and p2(x2, y2, t2), where (x, y) are spatial coordinates, t is the numerical representation of the timestamp, and the subscripts 1 and 2 are used to distinguish different data points;

[0021] S1.2.2 Apply spatiotemporal constraints to the data points. These constraints are composite distance measures that simultaneously consider time and space, known as spatiotemporal distance metrics. The spatiotemporal distance metric reflects the proximity of data points in both time and space. The formula for the spatiotemporal distance metric is defined as:

[0022] d st (p1, p2) = αd spatial (p1, p2) + βd temporal (p1, p2)

[0023] Where d spatial (p1, p2) is a spatial distance metric, defined as Euclidean distance:

[0024] d temporal (p1, p2) is a time distance metric, defined as: d temporal (p1, p2) = |t2 - t1|;

[0025] α is the weighting coefficient for spatial distance, and β is the weighting coefficient for temporal distance. The values ​​of α and β are between 0 and 1, and they are used to balance the contributions of spatial distance and temporal distance to the total distance, respectively.

[0026] S1.2.3 Assume that the i-th cluster has n i Data points, whose spatial coordinates and timestamps are respectively (x... ij ,y ij , t ij ), where j = 1, 2, ..., ni Then the updated cluster center of the i-th cluster ((x) c y c , t c )) Calculated using the following formula

[0027]

[0028] Furthermore, the static task planning method for the HPSO (Hybrid Particle Swarm Optimization) algorithm described in step 2 includes the following steps:

[0029] S2.1 Initialization:

[0030] S2.1.1 Define a particle: Each particle represents a possible non-instant delivery task allocation scheme. The dimension of the particle is equal to the number of task points, and the value of each dimension indicates which drone the task point is assigned to.

[0031] S2.1.2 Setting parameters: Define the particle swarm size, maximum number of iterations, inertia weight, individual optimal weight, and swarm optimal weight;

[0032] S2.2 Initialize particle position and velocity:

[0033] S2.2.1 Generate initial position: Randomly generate a task assignment scheme for each particle to ensure that each task point is assigned to a drone;

[0034] S2.2.2 Initialize velocity: Randomly set the initial velocity for each particle;

[0035] S2.3 Assess fitness:

[0036] S2.3.1 Calculate the objective function: For each particle, calculate its fitness value, i.e., the objective function value, which includes minimizing the total distance and minimizing the time. The objective function is expressed as:

[0037]

[0038] Among them, D x T is the total distance traveled by the xth drone during its mission. y is the total time for the y-th drone to perform its mission, and N and M are the number of drones in each particle;

[0039] S2.3.2 Check Constraints: Evaluate whether each particle satisfies the constraints. Particles that do not satisfy the constraints will be penalized by the penalty function.

[0040] S2.4 Update individual and group optimal solutions:

[0041] S2.4.1 Update the individual optimal solution: If the current particle's fitness is better than its historical best fitness, then update the individual optimal solution;

[0042] S2.4.2 Update the swarm optimal solution: If the fitness of the current particle is better than the historical best swarm fitness, then update the swarm optimal solution;

[0043] S2.5 updates particle velocity and position:

[0044] S2.5.1 Speed ​​Update: According to the formula:

[0045] v op (t+1)=Ω·v op (t)+c1·r1·(p op -x op (t))+c2·r2·(g op -x op (t))

[0046] Among them, v op It is the velocity of particle o in dimension p, x op It is the particle position, p op It is the individual optimal solution, g op It is the group optimal solution, Ω is the inertia weight, c1 and c2 are learning factors, and r1 and r2 are random numbers;

[0047] S2.5.2 Position Update: Update particle positions based on velocity.

[0048] x op (t+1)=x op (t)+v op (t+1)

[0049] S2.5.3 Position Adjustment: Ensures that the updated particle positions meet the task allocation constraints;

[0050] S2.6 Termination condition check:

[0051] S2.6.1 Number of iterations: Check if the maximum number of iterations has been reached;

[0052] S2.6.2 Convergence Condition: Check whether the fitness has reached the predetermined threshold or converged to a stable value;

[0053] S2.7 Result Output:

[0054] S2.7.1 Optimal Task Allocation: Outputs a task allocation scheme for particles with optimal fitness;

[0055] S2.7.2 Performance Evaluation: Evaluate the performance of the task allocation scheme, including total distance, total time, and whether all constraints are met;

[0056] S2.8 actual deployment.

[0057] Furthermore, the dynamic task planning method based on the static task planning results described in step 3, which improves the DDQN algorithm's dynamic task planning method, is based on specific spatial information, considers the performance of the UAV and the weather conditions at the time, and optimizes the processing of immediate delivery orders in particular, based on the static task planning results. The static and dynamic task planning results are integrated, that is, the maximum fleet size at each location is selected from the two planning results as the fleet size planning result to ensure that delivery order demands are met. Specifically, this includes the following steps:

[0058] S3.1: Construct a communication scenario between a drone and communication terminals, IoT devices, and user equipment, including a drone and obstacles at different heights. Within time η, the drone's position is w.

[0059] S3.2: Based on the aforementioned communication scenario, the air-to-ground channel gain of the UAV is determined, and a communication link model between the UAV and ground users is established as follows:

[0060] Where α Los α QLos Let β be the communication efficiency between the UAV and the terminal during the Los time interval and the average communication efficiency over I Los time intervals. Los β QLos Let L be the communication efficiency between the ground equipment and the terminal during the L time interval and the average communication efficiency over the L time interval. For the channel gain between ground equipment and the drone; η Los,ifLos η represents the basic communication efficiency over the time interval Los; TLos,ifILos The basic communication efficiency in the total time of I Los time intervals;

[0061] S3.3: Select action a according to the ε strategy t That is, randomly select action a t The probability of the drone being able to take action is ε, while the probability of choosing an action based on the drone's position w is 1-ε, to ensure that the drone has a certain degree of exploratory capability.

[0062] S3.4: a t Input the data collection environment to obtain the current state s t And the next location of the drone w t+1 , where w t+1 =w t +a t ;

[0063] S3.5: Based on the aforementioned communication link model, the optimization model is standardized to a quadruple-based model.<S,A,R,P> Where A represents the action space of the drone delivery process, and the action a selected by the drone within time t is... t=[a x, a y, a z ]∈A; S represents the state space of the UAV, in which the state of the UAV at time t is represented as s t =(s t1 ,s t2 ,s t3 P is the transition probability matrix, including the state s of the UAV. t At that time, take action a t Transition to the next state s t+1 The probability of the drone choosing action a; R is the probability of the drone choosing action a. t Reaching the next state s t+1 The reward information obtained during the process, and the reward function r used. t For:r t =r t1 -r t2 -r t3 The drone is based on its location w t The amount of data collected is r t1 The power penalty r is calculated based on the amount of movement of the drone. t2 A collision penalty r is obtained based on whether the drone collides with an obstacle in the current state and the next state. t3 The final total reward r is obtained. t ;

[0064] S3.6: According to w t+1 Determine the next state of the drone. t+1 ;

[0065] S3.7: Transfer the result t+1 ,a t ,s t ,r t >Save it into the experience pool J. When the number of datasets in the experience pool reaches the threshold, select a sample set from the experience pool to train the neural network. During the training process, the new data obtained will replace the old datasets in the experience pool.

[0066] S3.8: Calculate the error function L(θ) = ||y t- Q(a t ,s t ;θ)‖ 2 This function is the mean squared error used to measure the difference between the current Q value and the target Q value, where y t The target Q value is, and

[0067]

[0068] θ represents the current network parameters. n For the real-time parameters of the target network, r​t Let t be the reward value for time period t, and argmaxQ() means finding the action corresponding to the maximum Q value in the current Q network;

[0069] S3.9: Repeat steps S3.2.2-S3.2.8. When the number of repetitions reaches the network update frequency F, update the target network parameter θ' = θ.

[0070] S3.10: When the maximum number of training iterations is reached, output the optimal drone trajectory.

[0071] The advantages of this invention compared to the prior art are:

[0072] This invention integrates the operational characteristics of on-demand and non-on-demand delivery, proposing a novel task allocation method for logistics drones that can better adapt to different types of order demands. By determining and optimizing drone airport locations and logistics delivery point locations, it improves delivery efficiency and accuracy. It provides a logistics drone fleet size planning scheme, which helps to rationally allocate resources and reduce costs. It can better cope with on-demand orders and emergencies by combining static and dynamic planning to plan more reasonable flight paths, reducing air traffic congestion and conflicts. It monitors the status and location of goods in real time to ensure the safety and integrity of delivery. Attached Figure Description

[0073] Figure 1 This is an overall flowchart of the present invention;

[0074] Figure 2 Clustering results for site selection points;

[0075] Figure 3 The particle fitness during multiple iterations. Detailed Implementation

[0076] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0077] The present invention provides a dynamic and static combined urban logistics drone mission planning method, comprising the following steps:

[0078] (1) Based on existing city POI data, sample data such as airspace attributes, store locations, and customer locations are obtained, and the location C of the logistics drone airport is determined based on the k-means clustering algorithm. The location of the logistics delivery point is determined based on the k-means clustering algorithm that takes into account the walking reachability constraint, and the drone airport site selection is optimized according to the distribution of delivery points to balance the tasks of each airport.

[0079] (2) Static task allocation is performed based on the HPSO (Hybrid Particle Swarm Optimization) algorithm to determine the task allocation results for non-real-time delivery orders.

[0080] (3) The DDQN algorithm is improved by training the neural network based on the logistics order set, the task allocation results of the instant delivery order are determined, and the logistics drone fleet size planning scheme is determined.

[0081] In this specific embodiment, 10 data points are selected for application. These data points represent the latitude and longitude information of potential airport site selection locations:

[0082] Table 1: Latitude and Longitude Information of Potential Airport Site Selection Points

[0083] Serial Number Site selection number longitude latitude 1 A 116.4075 39.9040 2 B 121.4737 31.2304 3 C 114.0579 22.5431 4 D 108.9480 34.2632 5 E 126.6361 45.7569 6 F 113.2644 23.1291 7 G 104.0658 30.5728 8 H 118.7969 32.0603 9 I 106.5516 29.5630 10 J 117.2149 39.1256

[0084] Further, step 1 includes the following steps:

[0085] 1.1 Assume there are two data points p1(x1, y1, t1) and p2(x2, y2, t2), where (x, y) are spatial coordinates and t is a timestamp. The spatiotemporal constraint is a composite distance metric that considers both time and space. This metric reflects the proximity of the data points in both time and space. Therefore, the spatiotemporal distance metric formula can be defined as:

[0086] d st (p1, p2) = αd spatial (p1, p2) + βd temporal (p1, p2)

[0087] Where d spatial (p1, p2) is a spatial distance metric, defined as Euclidean distance:

[0088]

[0089] d temporal (p1, p2) is a time distance metric, defined as:

[0090] d temporal (p1, p2) = |t2 - t1|

[0091] α and β are weighting coefficients between 0 and 1, used to balance the contributions of spatial distance and temporal distance to the total distance.

[0092] 1.2 Assume that the i-th cluster has n i There are 10 data points, whose spatial coordinates and timestamps are (x, y, y) and (x, y, y) respectively. ij y ij , t ij ), (where j = 1, 2, ..., n) i Updated cluster center (x) c y c , t cIt can be calculated using the following formula.

[0093]

[0094] Using the above formula and the K-means algorithm, the following cluster centers and the cluster to which each point belongs can be calculated: Cluster center 1: (110.0, 30.0), Cluster center 2: (120.0, 35.0), Cluster center 3: (115.0, 25.0).

[0095] The cluster to which each point belongs (assuming):

[0096] A: Cluster 2 B: Cluster 2 C: Cluster 3 D: Cluster 1 E: Cluster 2

[0097] F: Cluster 3 G: Cluster 1 H: Cluster 2 I: Cluster 1 J: Cluster 2

[0098] Table 2: Results of the first clustering

[0099]

[0100]

[0101] The scatter plot of the first clustering results is shown in the attached instruction manual. Figure 2 :

[0102] Appendix Figure 2 This diagram illustrates the distribution of clustered data points across the spatiotemporal dimensions under spatiotemporal constraints for the first time. Different clusters are represented by dots of varying shades, demonstrating the spatiotemporal correlation between the clusters and revealing scattered points that deviate from the clusters. This diagram is helpful in analyzing the relationships between clustering results under spatiotemporal constraints.

[0103] 1.3 Based on the flight characteristics and limitations of UAVs in urban environments, this paper comprehensively analyzes the key factors for selecting take-off and landing sites for logistics UAVs from four aspects: airspace conditions, traffic conditions, construction conditions of take-off and landing facilities, and the scale of demand. Selecting a UAV take-off and landing site requires consideration of multiple factors: no-fly zones and flight altitude restrictions ensure flight safety; the density of surrounding high-rise buildings assesses obstacle risks; terrain adaptability affects take-off and landing conditions; traffic accessibility and the number of transfer stations improve logistics efficiency; and the available land area determines the actual usable space of the take-off and landing site. To ensure customer satisfaction, it is desirable for the take-off and landing site to be as close as possible to most demand points. Therefore, a K-means clustering algorithm based on Euclidean distance is used to classify and aggregate the demand points. First, the number of candidate take-off and landing sites k is determined, and then the K-means algorithm is used to cluster the demand points. Finally, the centroids of these clustering results are selected as candidate take-off and landing sites for further evaluation.

[0104] 1.4 K-means Comprehensive Evaluation and Analysis to Determine Candidate Sites. To ensure the suitability of candidate sites for constructing logistics drone take-off and landing sites, the K-means method is used to evaluate cluster centers, taking the influencing factors of take-off and landing site selection as evaluation indicators. When using the K-means clustering algorithm to model the site selection of logistics drone take-off and landing sites, it is first necessary to determine the evaluation indicators, which typically include key factors such as airspace conditions, traffic characteristics, and construction conditions. Then, data on each candidate site based on the evaluation indicators are collected to form a dataset. Next, based on actual needs or data analysis, the number of clusters k to be clustered is determined, i.e., the number of candidate take-off and landing sites. k points are randomly selected from the dataset as initial cluster centers, and each point is assigned to the nearest cluster center, forming n clusters. The center point of each cluster is recalculated as the new cluster center, and the above steps are repeated until the cluster centers no longer change significantly or the preset number of iterations is reached. i b is the average distance from point i to other points within its cluster, reflecting the density of the cluster. i S is the average distance from point i to the nearest other points within its cluster, reflecting the degree of separation between clusters. To evaluate the clustering performance, the silhouette coefficient can be used as an evaluation metric. For each point i in the dataset, its silhouette coefficient S is calculated. i :

[0105]

[0106] The silhouette coefficient measures the density of points within the same cluster and the separation between different clusters. Its value ranges from -1 to 1; a higher value indicates better clustering. Finally, the average silhouette coefficient of all data points is calculated as an evaluation metric for the overall clustering result. The closer this average is to 1, the better the clustering effect and the more suitable the candidate locations are.

[0107] The following is an example application. Table 3 can be obtained using the above formula and Kmeans algorithm.

[0108] Table 3: Results of Potential Airport Site Selection

[0109]

[0110] The following example uses Particle Swarm Optimization (PSO) to solve the static task assignment problem for drones. Specifically, multiple tasks need to be assigned to multiple drones, and the total distance and time for each drone to perform the tasks should be minimized. Simultaneously, constraints such as the drones' flight range and the rationality of task assignment must be satisfied.

[0111] Furthermore, step 2 includes the following steps:

[0112] 2.1 Initialization

[0113] 2.1.1 Defining a particle

[0114] Each particle represents a non-real-time delivery task assignment scheme. Assuming there are 5 tasks and 3 drones, each particle is a vector containing 5 elements, such as [1,2,3,1,2], indicating that the first task is performed by drone 1, the second task is performed by drone 2, and so on.

[0115] 2.1.2 Setting Parameters

[0116] Subgroup size: 20 Maximum number of iterations: 100

[0117] Inertia weight: 0.7; Individual optimal weight: 1.5

[0118] Optimal group weight: 1.5

[0119] 2.2 Initialization of Particle Position and Velocity

[0120] 2.2.1 Generating the initial position

[0121] The task assignment scheme for each generated particle is determined by the given conditions. For example, a generated particle might be [2,1,3,1,2], ensuring that each task is assigned to a drone.

[0122] 2.2.2 Initialization speed

[0123] Randomly initialize the velocity vector for each particle. The velocity is a vector with the same dimensions as the task allocation scheme and is used to update the particle's position.

[0124] 2.3 Assess fitness

[0125] 2.3.1 Calculate the objective function

[0126] The objective function consists of two parts: minimizing the total distance and minimizing the time.

[0127] For example, the objective function can be expressed as:

[0128]

[0129] Among them, D i T is the total distance traveled by the i-th drone during its mission. j It is the total time for the j-th drone to perform its mission.

[0130] 2.3.2 Check Constraints

[0131] Check that each particle meets the constraints. For example, ensure that all tasks are assigned and that the total task distance for each drone does not exceed its flight range. If the constraints are violated, a penalty function will be applied.

[0132] 2.4 Update individual and group optimal solutions

[0133] 2.4.1 Update individual and group optimal solutions

[0134] If the current particle's fitness is better than its historical best fitness, then update the individual optimal solution; if the current particle's fitness is better than the historical best group fitness, then update the group optimal solution.

[0135] 2.5 Update particle velocity and position

[0136] 2.5.1 Speed ​​Update

[0137] Update particle velocity according to the formula:

[0138] v op (t+1)=Ω·v op (t)+c1·r1·(p op -x op (t))+c2·r2·(g op -x op (t))

[0139] Among them, v op It is the velocity of particle o in dimension p, x op It is the particle position, p op It is the individual optimal solution, g oP It is the group optimal solution, Ω is the inertia weight, c1 and c2 are learning factors, and r1 and r2 are random numbers.

[0140] 2.5.2 Update particle position based on velocity:

[0141] x op (t+1)=x op (t)+v op (t+1)

[0142] 2.5.3 Position Adjustment

[0143] Ensure that the updated particle positions satisfy the task allocation constraints.

[0144] 2.6 Termination Condition Check

[0145] Check if the maximum number of iterations or the convergence condition has been reached.

[0146] 2.7 Output Results: Optimal Task Allocation

[0147] Output the task assignment scheme with the optimal fitness of the particles, and evaluate the performance of the task assignment scheme, including total distance, total time and whether all constraints are met.

[0148] Figure 3 This is an example graph of a particle swarm optimization algorithm, showing how the fitness of different particles changes over multiple iterations. The GlobalBest curve represents the optimal fitness of the population (i.e., minimizing the objective function value) in each iteration. The graph shows that as the number of iterations increases, the optimal fitness of the population gradually decreases and tends to stabilize, indicating that the algorithm is converging.

[0149] Furthermore, step 3, based on specific spatial information, considering the performance of the UAV and the weather conditions at the time, optimizes the processing of immediate delivery orders in particular, and improves the dynamic task planning method of the DDQN algorithm based on the static task planning results. The static and dynamic task planning results are integrated; that is, the maximum fleet size at each location is selected from the two planning results as the fleet size planning result to ensure that delivery order demands are met. Specifically, this includes the following steps:

[0150] 3.1 Construct a communication scenario between a logistics drone and communication terminals, IoT devices, and user equipment, including a drone and obstacles at different heights. The drone's position is w within time t.

[0151] 3.2: Based on the aforementioned communication scenario, the air-to-ground channel gain of the UAV is determined, and a communication link model between the UAV and ground users is established as follows:

[0152] Where α Los α QLos Let β be the communication efficiency between the UAV and the terminal during the Los time interval and the average communication efficiency over I Los time intervals. Los β QLos Let L be the communication efficiency between the ground equipment and the terminal during the L time interval and the average communication efficiency over the L time interval. For the channel gain between ground equipment and the drone; η Los,ifLos η represents the basic communication efficiency over the time interval Los; TLos,ifILos The basic communication efficiency is defined as the total time of I Los time intervals.

[0153] 3.3: Collect data using drones and establish drone trajectory optimization models for data collection scenarios;

[0154] 3.4: Based on the aforementioned communication link model, the optimization model is standardized to a quadruple-based model.<S,A,R,P> The expression represents a Markov decision process, where A represents the action space of the UAV, and the action A selected by the UAV in time t is...t =[A x, A y, A z ]∈A; S represents the state space of the UAV, in which the state of the UAV at time t is represented as s t =(s t1 ,s t2 ,s t3 P is the transition probability matrix, including the state s of the UAV. t At that time, take action a t Transition to the next state s t+1 The probability of the drone choosing action a; R is the probability of the drone choosing action a. t Reaching the next state s t+1 The reward information obtained during the process, and the reward function r used. t For:r t =r t1 -r t2 -r t3 ;

[0155] 3.5: Select action a based on the ε strategy t That is, randomly select action a t The probability of choosing an action based on the Q value is ε, while the probability of choosing an action based on the Q value is 1-ε, to ensure that the drone has a certain degree of exploratory capability.

[0156] 3.6: a n Input the data collection environment to obtain the current state s n And the next location of the drone w t+1 , where w t+1 =w t +a t ;

[0157] 3.7: The drone is based on its location w t The amount of data collected is r t1 The power penalty r is calculated based on the amount of movement of the drone. t2 A collision penalty r is obtained based on whether the drone collides with an obstacle in the current state and the next state. t3 The final total reward r is obtained. t ;

[0158] 3.8: According to w t+1 Determine the next state of the drone. n+1 ;

[0159] 3.9: Transfer results t+1 ,a t ,s t ,t t ​>Save it into the experience pool J. When the number of datasets in the experience pool reaches the threshold, select a sample set from the experience pool to train the neural network. During the training process, the new data obtained will replace the old datasets in the experience pool.

[0160] 3.10: Calculate the error function L(θ) = ||y t- Q(a t ,s t ;θ)‖ 2 This function is the mean squared error used to measure the difference between the current Q value and the target Q value, where y t The target Q value is, and

[0161]

[0162] θ represents the target network parameters. n For the real-time parameters of the target network, r t Let t be the reward value for time period t, and argmaxQ() means finding the action corresponding to the maximum Q value in the current Q network;

[0163] 3.11: Repeat steps 3.2-3.11. When the number of repetitions reaches the network update frequency F, update the target network parameter θ' = θ, where θ is the current network parameter;

[0164] 3.12: When the maximum number of training iterations is reached, output the optimal drone trajectory. The results are shown in Table 4.

[0165] Table 4: Parameter Results of the Dynamic Task Planning (DDQN) Algorithm

[0166]

Claims

1. A method for dynamic-static combined urban logistics unmanned aerial vehicle task planning, characterized in that, The method comprises the following steps: S1. Input the dynamic and static combined urban logistics unmanned aerial vehicle task planning urban logistics order data of instant, non-instant delivery, obtain sample data, the sample data comprises airspace attribute, weather information, store location, customer location, based on the store and customer location data, using the k-means clustering algorithm improved based on space-time constraint, preliminarily site the logistics unmanned aerial vehicle airport location; S2. Using the static task planning method based on HPSO (hybrid particle swarm optimization) algorithm, determining the static task planning result for non-instant delivery order, using the DBSCAN clustering algorithm considering the walking accessibility constraint to determine the logistics distribution point location, and optimizing the site selection of the unmanned aerial vehicle airport according to the logistics distribution point distribution, balancing the task quantity of each airport; S3. Based on the location of the unmanned aerial vehicle airport and the logistics distribution point, comprehensively considering the space information, unmanned aerial vehicle performance and weather condition, proposing the dynamic task planning method of the DDQN algorithm improved based on the static task planning result, determining the dynamic task planning result of instant delivery order, so as to finally determine the planning and scheduling scheme of the logistics unmanned aerial vehicle fleet, specifically comprising the following steps: S3.1: Construct the communication scene of the unmanned aerial vehicle and the communication terminal, the Internet of Things equipment and the user equipment, including one unmanned aerial vehicle and obstacles at different heights, the position of the unmanned aerial vehicle is w within time η; S3.2: determining a UAV air-to-ground channel gain based on the communication scenario and establishing a communication link model between the UAV and the ground user as: wherein α Los α QLos is the communication efficiency of the drone with the terminal in the time interval of Los and the average communication efficiency in the I time intervals of Los, β Los β QLos is the communication efficiency of the ground device with the terminal in the time interval of Los and the average communication efficiency in the I time intervals; is the channel gain between the ground device and the drone; η Los,ifLos is the basic communication efficiency in the time interval of Los; η TLos,ifILos is the basic communication efficiency in the total time of the I time intervals of Los; S3.3: Select action a according to the ε-greedy policy t , i.e., with probability ε randomly select action a t , and with probability 1-ε select action according to the UAV position w to ensure the UAV has a certain degree of exploration; S3.4: set a t In the input data collection environment, obtain the current state s t and the next position w t+1 of the UAV, where w t+1 = w t + a t ; S3.5: Based on the communication link model, the optimization model is specified as a quadruple <S, A, R, P>, where A represents the action space of the UAV delivery process, and the action a chosen by the UAV at time t t = [a x, y, z ] e A; S represents the state space of the UAV, in which the state of the UAV at time t is represented as s t = (s t1 , s t2 , s t3 ); P is the transition probability matrix, including the probability of the UAV moving from state s t to the next state s t by taking action a t+1 ; R is the reward information obtained by the UAV in the process of choosing action a t to reach the next state s t+1 , and the reward function r t used is: r t = r t1 - r t2 - r t3 ; r t is obtained according to the amount of data collected by the UAV at location w t1 , r t2 is the power penalty according to the movement of the UAV, r t3 is the collision penalty according to whether the UAV collides with the obstacle in the current state and the next state, and finally r t is the total reward.​​ S3.6: determining a next state s t+1 of the UAV according to w t+1 ; S3.7: save the transfer result <s t+1 , a t , s t , r t > to the experience pool J, when the number of data sets in the experience pool reaches the threshold, select a sample set from the experience pool to train the neural network, and replace the old data set in the experience pool with the new data obtained during the training process; S3.8: Compute the error function L(0) = ||y t- Q(a t ,s t ; 0) - y 2 , where the function is the mean squared error used to measure the difference between the current Q value and the target Q value, where y t is the target Q value, and θ is the current network parameter, θ n r is the target network real-time parameter, r t Rt is the reward value of t time period, argmax Q() represents finding the action corresponding to the maximum Q value in the current Q network; S3.9: Repeat steps S3.2.2-S3.2.8, when the number of repetitions reaches the network update frequency F, update the target network parameter θ'=θ; S3.10: When the maximum number of training is reached, output the optimal UAV trajectory 2. The dynamic and static combined urban logistics unmanned aerial vehicle task planning method according to claim 1, characterized in that, Step S1.1 k-means clustering algorithm considering space-time constraint, comprising the following steps: S1.1.1 alternative address determination: (1) using the k-means clustering algorithm based on Euclidean distance to cluster the demand points, determining the number k of alternative logistics unmanned aerial vehicle airports, k-means clustering the demand points, and taking the cluster center in the clustering result as the alternative logistics unmanned aerial vehicle airport to be evaluated; (2) Collect the data of each alternative logistics unmanned aerial vehicle airport on the evaluation index to form a data set, the evaluation index includes airspace condition, traffic characteristics and construction condition, and then optimize and adjust the number of alternative landing sites according to the actual demand or data analysis, randomly select k points from the data set as the initial cluster centers, assign each point in the data set to the nearest cluster center to form k clusters, and recalculate the center point of each cluster as the new cluster center, repeat the above steps until the cluster center no longer changes significantly or the preset iteration number is reached; S1.1.2 multi-objective site selection model establishment: A function based on distance is used to describe the customer satisfaction: a i is the average distance of point i to other points within its cluster, b i is the average distance of point i to the nearest other cluster point, using the silhouette coefficient evaluation metric, calculating its silhouette coefficient S i : The silhouette coefficient measures the tightness of points in the same cluster and the separation degree between different clusters, and its value ranges from-1 to 1, the larger the value, the better the clustering effect, finally, the average value of the silhouette coefficient of all data points is calculated as the evaluation index of the entire clustering result.

3. The dynamic and static combined urban logistics unmanned aerial vehicle task planning method according to claim 1 or 2, the k-means clustering algorithm based on Euclidean distance in step S1.2 is implemented as follows: S1.2.1 Based on the obtained sample data, obtain two arbitrary data points p1(x1, y1, t1) and p2(x2, y2, t2), where (x, y) is the spatial coordinate, t is the numerical representation of the time stamp, and subscripts 1 and 2 are used to distinguish different data points; S1.2.2 Temporal and spatial constraints are imposed between data points. The temporal and spatial constraint condition is a composite distance measure that considers both time and space, referred to as a spatiotemporal distance measure. The spatiotemporal distance measure criterion can reflect the closeness of data points in time and space. The spatiotemporal distance measure formula is defined as: d st (p1, p2) = a d spatial (p1, p2) + β d temporal (p1, p2) where d spatial (p1, p2) is a spatial distance metric defined as the Euclidean distance: d temporal (p1, p2) is a temporal distance measure defined as: d temporal (p1, p2) = |t2 - t1|; α is the weight coefficient of spatial distance, β is the weight coefficient of time distance, and α and β take values between 0 and 1, respectively, to balance the contribution of spatial distance and time distance in the total distance; S1.2.3 Assume there are n i data points in the i-th cluster, with their spatial coordinates and timestamps being (x ij , y ij , t ij ), respectively, where j = 1, 2,..., n i ; then the updated cluster center ((x c , y c , t c )) of the i-th cluster is calculated by the following formula:

4. The dynamic and static combined urban logistics unmanned aerial vehicle task planning method according to claim 1, characterized in that, The static task planning method based on HPSO (Hybrid Particle Swarm Optimization) algorithm in step 2 includes the following steps: S2.1 Initialization: S2.1.1 Define particles: Each particle represents a possible non-real-time delivery task allocation scheme. The dimension of the particle is equal to the number of task points. The value of each dimension represents which UAV the task point is assigned to. S2.1.2 Set parameters: Define the size of the particle swarm, the maximum number of iterations, the inertia weight, the individual optimal weight, and the group optimal weight. S2.2 Initialize particle position and velocity: S2.2.1 Generate initial position: Randomly generate a task allocation scheme for each particle, ensuring that each task point is assigned to a UAV. S2.2.2 Initialize velocity: Randomly set the initial velocity for each particle. S2.3 Evaluate fitness: S2.3.1 Calculate objective function: For each particle, calculate its fitness value, i.e., the objective function value, which includes minimizing the total distance and the minimum time. The objective function is represented as: wherein D x is the total distance of the xth drone to perform the task, T y is the total time of the yth drone to perform the task, N and M are the number of drones in each particle; S2.3.2 Check constraints: Evaluate whether each particle meets the constraint conditions. If not, the particle will be punished by a penalty function. S2.4 Update individual optimal solution and group optimal solution: S2.4.1 Update individual optimal solution: If the current particle's fitness is better than its historical optimal fitness, update the individual optimal solution. S2.4.2 Update group optimal solution: If the current particle's fitness is better than the historical optimal group fitness, update the group optimal solution. S2.5 Update particle velocity and position: S2.5.1 Velocity update: According to the formula: v op (t+1) = Ω · v op (t) + c1 · r1 · (p op -x op (t)) + c2 · r2 · (g op -x op (t)) where v op is the velocity of particle o in dimension p, x op is the particle position, 0 op is the individual best solution, g op is the global best solution, Ω is the inertia weight, c1 and c2 are the learning factors, and r1 and r2 are random numbers; S2.5.2 Position update: Update the particle position according to the velocity: x op (t+1) = x op (t) + v op (t+1) S2.5.3 Position adjustment: Ensure that the updated particle position meets the task allocation constraints. S2.6 Check termination conditions: S2.6.1 Iteration number: Check whether the maximum number of iterations has been reached. S2.6.2 Convergence condition: Check whether the fitness has reached a predetermined threshold or converged to a stable value. S2.7 Result output: S2.7.1 Optimal task allocation: Output the task allocation scheme of the particle with the optimal fitness. S2.7.2 Performance evaluation: Evaluate the performance of the task allocation scheme, including the total distance, total time, and whether all constraints are met. S2.8 Actual deployment.

Citation Information

Patent Citations

  • Resource allocation method for unmanned aerial vehicle assisted edge computing based on task priority

    CN115150781A

  • Multi-unmanned aerial vehicle intelligent route planning method for data acquisition

    CN116795138A