A large-scale node inspection-oriented unmanned aerial vehicle cluster hierarchical task scheduling method
By employing a hierarchical task scheduling method, which combines upper-level task allocation with lower-level path planning, the problem of excessive computational load in large-scale node inspection is solved, achieving efficient and reliable UAV swarm scheduling.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XI AN JIAOTONG UNIV
- Filing Date
- 2026-03-30
- Publication Date
- 2026-06-26
AI Technical Summary
Existing drone swarms suffer from excessive computational demands in large-scale node inspection tasks, impacting task scheduling quality and efficiency. There is an urgent need to design more intelligent scheduling methods.
A hierarchical task scheduling method is adopted, which combines an upper-level task allocation model and a lower-level path planning model. Through alternating optimization and neighborhood multi-head attention mechanism, task subsets are divided and UAV paths are planned, thereby reducing computational complexity and improving efficiency.
It achieves efficient and reliable scheduling of large-scale node inspection tasks, reduces computational complexity, and improves the accuracy and real-time performance of path planning.
Smart Images

Figure CN122284680A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of UAV swarm task scheduling technology, specifically relating to a hierarchical task scheduling method for UAV swarms oriented towards large-scale node inspection. Background Technology
[0002] In recent years, with the continuous advancement of artificial intelligence technology and control algorithms, drones, due to their high flexibility and maneuverability, have been increasingly used in inspection tasks such as fixed-point reconnaissance and power grid maintenance, gradually replacing traditional manual inspection methods. As the scale and complexity of tasks increase, using drone swarms to complete inspection tasks shows significant advantages over single drones, and task scheduling is crucial for achieving collaborative task completion by drone swarms. Existing methods often employ manual rule design or overall solution methods, which often result in excessive computational loads when facing large-scale node inspection tasks, severely impacting the quality and efficiency of task scheduling. Therefore, there is an urgent need to design a more intelligent and advanced drone swarm task scheduling method to achieve efficient and reliable scheduling results when facing large-scale node inspection tasks. Summary of the Invention
[0003] To address the problems existing in current large-scale node inspection scenarios using drones, the present invention aims to provide a hierarchical task scheduling method for drone clusters for large-scale node inspection, so as to improve the efficiency of inspection task scheduling and the quality of inspection trajectories.
[0004] To achieve the above objectives, the present invention adopts the following technical solution: A hierarchical task scheduling method for UAV swarms for large-scale node inspection includes the following steps: S1: Initialize the UAV inspection task and input the upper-level task allocation model; S2: The upper-level task allocation model uses an alternating optimization method to calculate the probability of UAV inspection task allocation and update the task centroid; S3: After repeating S2 to the iteration threshold, the inspection task is divided into multiple task subsets using a hard allocation method; S4: Assign a subset of tasks to the drone swarm and distribute them to the lower-level path planning model; S5: The lower-level path planning model selects the optimal inspection node for the UAV at each time step and updates the mission status; S6: Repeat S5 until the inspection path of each UAV is constructed, thereby obtaining the hierarchical task scheduling result of the UAV cluster covering all inspection nodes.
[0005] Furthermore, in S1, the UAV inspection task includes 1 base station node, N inspection nodes and S UAVs. Each UAV needs to start from the same base station node, complete the corresponding inspection task along its own trajectory and then return to the base station node. This design unifies the task start and end constraints, ensures the complete closed loop of UAV task execution, and improves the controllability and actual executability of scheduling.
[0006] The base station node and each inspection node are represented by two-dimensional coordinates. The initialization process requires normalizing the node coordinates to the range of [0,1]×[0,1]. in, For the first The original coordinates of each node, , for Normalized coordinates The average of all node coordinates. The standard deviation of the coordinates of all nodes. The function is a hyperbolic tangent. Normalization effectively eliminates the influence of different spatial scales on model training and computation, and enhances the model's generalization ability in different scenarios.
[0007] Furthermore, in S1, the upper-level task allocation model takes the normalized coordinates of N inspection nodes and the number of UAVs S as inputs to divide the N inspection nodes into S task subsets, which is conducive to efficiently achieving adaptive matching between task size and number of UAVs.
[0008] Furthermore, in S2, the upper-level task allocation model first randomly initializes S task centroids within the range [0,1]×[0,1]. Then, it calculates the task allocation probability and updates the task centroids using the following alternating optimization method: First, the upper-level task allocation model calculates the connection weights between each inspection node and the task centroid based on the task centroid coordinates: in Inspection Node Normalized coordinates, For the first j The centroid of the task is in the iteration step. Coordinates of time Inspection Node With the j The Euclidean distance between the centroids; The temperature parameter decreases with each iteration. For iteration step Inspection nodes With the center of mass of the task j The connection weights between them.
[0009] Secondly, the task allocation probability is obtained by normalizing the connection weights: in Inspection Node With the center of mass of the task Connection weights between them For iteration step Inspection nodes With the center of mass of the task j The probability of task allocation between them.
[0010] Then, the upper-level task allocation model updates the task centroid based on the task allocation probability: in Indicates the relationship with inspection nodes The centroid with the highest probability of task allocation is the winner. The coordinates of the winner's center of gravity The neighborhood radius decreases with each iteration. Center of mass j With center of mass Topological similarity between them; The learning rate decreases with each iteration. For the mission center j In the iteration step The new coordinates at +1, combined with the neighborhood collaborative update mechanism, improve the spatial continuity and balance of task partitioning.
[0011] Furthermore, in S3, S2 is repeated to update the task assignment probability and task centroid, until the number of iterations reaches a preset threshold. Then, the task allocation probability is hardened: in Indicates the end of the iteration and the inspection node The centroid of the task with the highest task assignment probability. Inspection Node With the center of mass of the task j The final task assignment probability.
[0012] Subsequently based on the obtained Each inspection node is connected to a unique task centroid until all N inspection nodes are connected to S task centroids, thereby dividing the inspection task into S task subsets. The probability hardening strategy realizes the transformation from soft allocation to deterministic partitioning, ensuring the stability of the optimization process while obtaining clear task partitioning results, thus improving the execution efficiency and determinism of subsequent path planning.
[0013] Furthermore, in S4, the drone cluster contains S identical drones. Each subset of tasks, after being attached to a base station node, forms a single inspection task and is assigned to a drone. This simplifies the scheduling decision-making process, facilitates task load balancing, and reduces system implementation complexity.
[0014] Furthermore, in S4, the lower-level path planning model consists of an encoder-decoder structure. It takes the coordinates of the base station node and the inspection nodes in the task subset as input to construct the shortest closed path for a single UAV to start from the base station node, visit all inspection nodes, and finally return to the base station node. This structure has good sequence modeling capabilities and can effectively characterize the global dependencies of the inspection path, thereby improving the quality of path planning.
[0015] Furthermore, the encoder first uses a linear layer to project the node coordinates into node embeddings: in, For nodes Node embedding, For batch normalization operations, The linear layer weight parameter matrix, Inspection Node Normalized coordinates, For the linear layer bias parameter matrix, This represents the number of inspection nodes contained in the subset of this task.
[0016] Secondly, the encoder uses L consecutive coding layers to embed the nodes. Gradually improve to feature embedding Taking the l-th coding layer as an example, its input is The following methods will be used for processing: in, For the intermediate features of the l-th coding layer, For batch normalization operations, For neighborhood multi-head attention operations, For feedforward operation, The output features of the l-th encoding layer are used to gradually extract higher-order relationship features between nodes through multi-layer feature extraction and nonlinear transformation, thereby enhancing the model's ability to express complex spatial structures and improving the accuracy of path planning.
[0017] Furthermore, the neighborhood multi-head attention operation Process the input as follows: First, the construction dimensions are neighborhood connection matrix Each element is determined by the node's neighborhood relationship: in, For nodes j With nodes Neighborhood connection relationship, Let k be the k-neighborhood of node i, containing node i. of k Nearby nodes.
[0018] Secondly, for For the h-th head, calculate its global attention value: in, Let h be the global attention value of the h-th attention head in the l-th coding layer. and These are the corresponding query matrix and key matrix, respectively. Obtained through linear projection, The embedding dimension for each node.
[0019] Then calculate the neighborhood attention value: in The attention value is the neighborhood attention value of the h-th attention head in the l-th coding layer. This is an element-wise multiplication operation.
[0020] This is used to obtain the output of the h-th attention head. : in, For normalization operations, For the reason The value matrix obtained by linear projection.
[0021] Finally, the outputs of H heads are merged to obtain the output of the neighborhood multi-head attention operation: in, This is the output of the multi-head attention operation in the neighborhood of the l-th coding layer. This is a horizontal splicing operation. Let be the output projection matrix of the l-th encoding layer. By introducing a neighborhood constraint mechanism, the attention calculation is restricted to the local neighborhood, which effectively reduces the computational complexity and strengthens the expression of local structural information, thereby improving the computational efficiency and robustness of the model in large-scale node scenarios.
[0022] Furthermore, the decoder embeds features from the encoder output. As input, the task selection probability at each time step is calculated as follows: First, based on feature embedding Computational context embedding : in, Feature embedding for base station nodes, For time step -1 Feature embedding of the visited node This represents the mean of the feature embeddings of unvisited nodes.
[0023] Secondly, calculate the attention compatibility value: in, For nodes At time step Attention compatibility value, It is a preset constant. For attention query projection matrix, For attention key projection matrix, For the first Feature embedding of each node.
[0024] Finally, based on the attention compatibility values of all unvisited nodes, the task selection probability is calculated: in, For the lower-level path planning model at time step Select node As the probability of task selection for inspection nodes. For node j at time step The attention compatibility value, by integrating historical access information with global statistical features of unvisited nodes, enhances the expressive power of the decision context, making path selection more reasonable.
[0025] Furthermore, in S5, the lower-level path planning model selects the node with the highest probability value as the optimal inspection node at each time step based on the calculated task selection probability, and marks it as an visited node to update the task status. This ensures computational efficiency while quickly generating feasible paths, making it suitable for large-scale inspection task scenarios with high real-time requirements.
[0026] Compared with the prior art, the beneficial effects achieved by the present invention are: The hierarchical task scheduling method for UAV clusters for large-scale node inspection provided by this invention adopts a scheduling architecture that combines an upper-level task allocation model with a lower-level path planning model. This decouples the original complex task into multiple sub-tasks for divide-and-conquer solutions, thereby reducing the computational complexity of scheduling large-scale node inspection tasks.
[0027] The hierarchical task scheduling method for UAV clusters for large-scale node inspection provided by this invention uses an alternating optimization method to update the task allocation probability in the upper-level task allocation model, thus avoiding the gradient mutation problem of conventional hard allocation.
[0028] The hierarchical task scheduling method for UAV swarms for large-scale node inspection provided by this invention designs a neighborhood multi-head attention mechanism in the lower-level path planning model, which only calculates the attention value of neighborhood nodes, thereby reducing computational complexity and improving the efficiency of lower-level path planning. Attached Figure Description
[0029] Figure 1 This is a diagram of a hierarchical task scheduling architecture.
[0030] Figure 2 This is an example diagram of a drone cluster node inspection. Detailed Implementation
[0031] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to embodiments. It should be understood that the embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0032] This invention discloses a hierarchical task scheduling method for UAV swarms for large-scale node inspection, comprising the following steps: S1: Initialize the UAV inspection task and input the upper-level task allocation model; The drone inspection task includes 1 base station node, N inspection nodes and S drones. Each drone needs to start from the same base station node, complete the corresponding inspection task along its own trajectory and then return to the base station node.
[0033] In this example, the inspection task includes 1 base station node and 99 inspection nodes, i.e., N=99; the drone swarm includes 3 identical drones, i.e., S=3.
[0034] The base station node and each inspection node are represented by two-dimensional coordinates. The initialization process requires normalizing the node coordinates to the range of [0,1]×[0,1]. in, For the first The original coordinates of each node, , for Normalized coordinates The average of all node coordinates. The standard deviation of the coordinates of all nodes. It is the hyperbolic tangent function.
[0035] In this example, the normalized coordinates of the 100 nodes included in the inspection task are shown in Table 1.
[0036] Table 1 serial number coordinate serial number coordinate serial number coordinate serial number coordinate 0 [0.8258,0.1289] 25 [0.4262,0.4514] 50 [0.2690,0.7976] 75 [0.0801,0.8948] 1 [0.3351,0.7435] 26 [0.1636,0.7948] 51 [0.3104,0.4552] 76 [0.5476,0.8173] 2 [0.1608,0.8180] 27 [0.6937,0.2208] 52 [0.0116,0.0724] 77 [0.4523,0.6436] 3 [0.8321,0.5075] 28 [0.0824,0.6805] 53 [0.3925,0.4799] 78 [0.5264,0.7316] 4 [0.0064,0.2870] 29 [0.6545,0.2733] 54 [0.6000,0.2917] 79 [0.0816,0.0604] 5 [0.6169,0.9812] 30 [0.9509,0.1511] 55 [0.6950,0.8601] 80 [0.2471,0.1595] 6 [0.6318,0.2598] 31 [0.4323,0.9436] 56 [0.7799,0.0396] 81 [0.8718,0.2192] 7 [0.6340,0.5400] 32 [0.4197,0.6385] 57 [0.4805,0.1049] 82 [0.9759,0.3369] 8 [0.7798,0.1070] 33 [0.3976,0.2742] 58 [0.2420,0.9867] 83 [0.1821,0.7897] 9 [0.7610,0.5413] 34 [0.9840,0.4093] 59 [0.1425,0.4989] 84 [0.6587,0.4982] 10 [0.9630,0.3419] 35 [0.8941,0.2300] 60 [0.6182,0.7025] 85 [0.5554,0.7192] 11 [0.6326,0.9320] 36 [0.2131,0.0311] 61 [0.5596,0.0098] 86 [0.2285,0.9963] 12 [0.1025,0.9372] 37 [0.6517,0.3685] 62 [0.3265,0.5177] 87 [0.9748,0.6503] 13 [0.6879,0.0678] 38 [0.8644,0.4732] 63 [0.0879,0.3506] 88 [0.1995,0.6802] 14 [0.3010,0.7082] 39 [0.9682,0.1855] 64 [0.0332,0.0786] 89 [0.0722,0.0307] 15 [0.0674,0.5822] 40 [0.8686,0.7766] 65 [0.3969,0.1327] 90 [0.2577,0.4626] 16 [0.3459,0.6209] 41 [0.7709,0.8448] 66 [0.5675,0.6895] 91 [0.8683,0.7272] 17 [0.0457,0.8715] 42 [0.7610,0.6262] 67 [0.8006,0.2002] 92 [0.7427,0.4255] 18 [0.9735,0.9689] 43 [0.1312,0.0325] 68 [0.1675,0.1046] 93 [0.3459,0.3710] 19 [0.7497,0.1301] 44 [0.9208,0.6167] 69 [0.6364,0.7065] 94 [0.9876,0.0401] 20 [0.7583,0.0246] 45 [0.7965,0.4815] 70 [0.0316,0.9362] 95 [0.8670,0.5787] 21 [0.0221,0.3236] 46 [0.1173,0.1252] 71 [0.0520,0.5413] 96 [0.4386,0.7253] 22 [0.4886,0.7704] 47 [0.6856,0.4303] 72 [0.7091,0.8710] 97 [0.4867,0.8734] 23 [0.6833,0.4459] 48 [0.2005,0.4916] 73 [0.7141,0.8017] 98 [0.9007,0.4217] 24 [0.2736,0.9971] 49 [0.0642,0.5820] 74 [0.3395,0.8148] 99 [0.2768,0.5924] The node numbered 0 is the base station node, and its normalized coordinates are [0.8258, 0.1289].
[0037] like Figure 1 As shown, the upper-level task allocation model takes the normalized coordinates of N inspection nodes and the number of UAVs S as inputs to divide the N inspection nodes into S task subsets.
[0038] S2: The upper-level task allocation model uses an alternating optimization method to calculate the probability of UAV inspection task allocation and update the task centroid; The upper-level task allocation model first randomly initializes S task centroids within the range [0,1]×[0,1]. In this example, 3 task centroids are initialized. Then, the task allocation probability is calculated and the task centroids are updated using the following alternating optimization method: First, the upper-level task allocation model calculates the connection weights between each inspection node and the task centroid based on the task centroid coordinates: in Inspection Node Normalized coordinates, For the first j The centroid of the task is in the iteration step. Coordinates of time Inspection Node With the j The Euclidean distance between the centroids; The temperature parameter decreases with each iteration. For iteration step Inspection nodes With the center of mass of the task j The connection weights between them.
[0039] Secondly, the task allocation probability is obtained by normalizing the connection weights: in Inspection Node With the center of mass of the task Connection weights between them For iteration step Inspection nodes With the center of mass of the task j The probability of task allocation between them.
[0040] Then, the upper-level task allocation model updates the task centroid based on the task allocation probability: in Indicates the relationship with inspection nodes The centroid with the highest probability of task allocation is the winner. The coordinates of the winner's center of gravity The neighborhood radius decreases with each iteration. Center of mass j With center of mass Topological similarity between them; The learning rate decreases with each iteration. For the task centroid j in the iteration step The new coordinates at +1.
[0041] S3: After repeating S2 to the iteration threshold, the inspection task is divided into multiple task subsets using a hard allocation method; In this process, S2 is repeatedly executed to update the task assignment probability and task centroid, until the number of iterations reaches a preset threshold. Then, the task allocation probability is hardened: in Indicates the end of the iteration and the inspection node The centroid of the task with the highest task assignment probability. Inspection Node With the center of mass of the task j The final task assignment probability.
[0042] Subsequently based on the obtained Each inspection node is connected to a unique task centroid until all N inspection nodes are connected to S task centroids, thus dividing the inspection task into S task subsets. In this example, the iteration threshold is set to 100 iterations.
[0043] S4: Assign a subset of tasks to the drone swarm and distribute them to the lower-level path planning model; like Figure 1 As shown, the drone cluster contains S identical drones. Each subset of tasks, after being attached to a base station node, forms a single inspection task and is assigned to a drone.
[0044] In this example, the upper-level task allocation model assigns 99 inspection nodes to 3 drones. The node numbers in the inspection tasks corresponding to each drone are shown in Table 2.
[0045] Table 2 drones Inspection task node number Drone 1 0,3,5,7,9,10,11,18,23,34,38,40,41,42,44,45,47,55,60,66,69,72,73,76,78,82,84,85,87,91,92,95,98 Drone 2 0,1,2,4,12,14,15,16,17,21,22,24,25,26,28,31,32,48,49,50,51,53,58,59,62,63,70,71,74,75,77,83,86,88,90,96,97,99 Drone 3 0,6,8,13,19,20,27,29,30,33,35,36,37,39,43,46,52,54,56,57,61,64,65,67,68,79,80,81,89,93,94 The lower-level path planning model consists of an encoder-decoder structure. It takes the coordinates of the base station node and the inspection nodes in the task subset as input to construct the shortest closed path for a single UAV to start from the base station node, visit all inspection nodes, and finally return to the base station node.
[0046] The encoder first uses a linear layer to project the node coordinates into node embeddings: in, For nodes Node embedding, For batch normalization operations, The linear layer weight parameter matrix, For the linear layer bias parameter matrix, This represents the number of inspection nodes contained in the subset of this task.
[0047] Secondly, the encoder uses L consecutive coding layers to embed the nodes. Gradually improve to feature embedding In this example, L is 3. Taking the l-th coding layer as an example, its input is... The following methods will be used for processing: in, For the intermediate features of the l-th coding layer, For batch normalization operations, For neighborhood multi-head attention operations, For feedforward operation, This represents the output feature of the l-th coding layer.
[0048] The neighborhood multi-head attention operation Process the input as follows: First, the construction dimensions are neighborhood connection matrix Each element is determined by the node's neighborhood relationship: in, For nodes j With nodes Neighborhood connection relationship, For nodes of k Neighborhood, containing nodes k neighboring nodes.
[0049] Secondly, for For the h-th head, calculate its global attention value: in, Let h be the global attention value of the h-th attention head in the l-th coding layer. and These are the corresponding query matrix and key matrix, respectively. Obtained through linear projection, The embedding dimension for each node.
[0050] Then calculate the neighborhood attention value: in The attention value is the neighborhood attention value of the h-th attention head in the l-th coding layer. This is an element-wise multiplication operation.
[0051] This is used to obtain the output of the h-th attention head. : in, For normalization operations, For the reason The value matrix obtained by linear projection.
[0052] Finally, the outputs of the H attention heads are merged to obtain the output of the neighborhood multi-head attention operation: in, This is the output of the multi-head attention operation in the neighborhood of the l-th coding layer. This is a horizontal splicing operation. Let H be the output projection matrix of the l-th coding layer. In this example, the number of heads H for the neighborhood multi-head attention operation is 8.
[0053] The decoder is embedded with features from the encoder output. As input, the task selection probability at each time step is calculated as follows: First, based on feature embedding Computational context embedding : in, Feature embedding for base station nodes, For time step -1 Feature embedding of the visited node This represents the mean of the feature embeddings of unvisited nodes.
[0054] Secondly, calculate the attention compatibility value: in, For nodes At time step Attention compatibility value, This is a preset constant, which takes the value of 10 in this example. For attention query projection matrix, For attention key projection matrix, For the first Feature embedding of each node.
[0055] Finally, based on the attention compatibility values of all unvisited nodes, the task selection probability is calculated: in, For the lower-level path planning model at time step Select node As the probability of task selection for inspection nodes. For nodes j At time step Attention compatibility value.
[0056] S5: The lower-level path planning model selects the optimal inspection node for the UAV at each time step and updates the mission status; In this process, the lower-level path planning model selects the node with the highest probability value as the optimal inspection node at each time step based on the calculated task selection probability, and marks it as an visited node to update the task status.
[0057] S6: Repeat S5 until the inspection path of each UAV is constructed, thereby obtaining the hierarchical task scheduling result of the UAV cluster covering all inspection nodes.
[0058] In this example, the hierarchical task scheduling results of the UAV cluster covering all inspection nodes are shown in the following table. Figure 2 The total inspection trajectory length within the normalized unit area is 9.80, which shows that the method proposed in this invention can effectively utilize the upper and lower model to achieve task allocation and path planning, and can achieve reliable task scheduling when facing large-scale node inspection scenarios.
Claims
1. A hierarchical task scheduling method for UAV swarms for large-scale node inspection, characterized in that, Includes the following steps: S1: Initialize the UAV inspection task and input the upper-level task allocation model; S2: The upper-level task allocation model uses an alternating optimization method to calculate the probability of UAV inspection task allocation and update the task centroid; S3: After repeating S2 to the iteration threshold, the inspection task is divided into multiple task subsets using a hard allocation method; S4: Assign a subset of tasks to the drone swarm and distribute them to the lower-level path planning model; S5: The lower-level path planning model selects the optimal inspection node for the UAV at each time step and updates the mission status; S6: Repeat S5 until the inspection path of each UAV is constructed, thereby obtaining the hierarchical task scheduling result of the UAV cluster covering all inspection nodes.
2. The hierarchical task scheduling method for UAV swarms for large-scale node inspection according to claim 1, characterized in that, In S1, the drone inspection task includes 1 base station node, N inspection nodes and S drones. Each drone needs to start from the same base station node, complete the corresponding inspection task along its own trajectory and then return to the base station node. The base station node and each inspection node are represented by two-dimensional coordinates. The initialization process requires normalizing the node coordinates to the range of [0,1]×[0,1]. in, For the first The original coordinates of each node, , for Normalized coordinates The average of all node coordinates. The standard deviation of the coordinates of all nodes. It is the hyperbolic tangent function; In S1, the upper-level task allocation model takes the normalized coordinates of N inspection nodes and the number of UAVs S as inputs to divide the N inspection nodes into S task subsets.
3. The hierarchical task scheduling method for UAV swarms for large-scale node inspection according to claim 1, characterized in that, In S2, the upper-level task allocation model first randomly initializes S task centroids within the range [0,1]×[0,1]. Then, it calculates the task allocation probability and updates the task centroids using the following alternating optimization method: First, the upper-level task allocation model calculates the connection weights between each inspection node and the task centroid based on the task centroid coordinates: in Inspection Node Normalized coordinates, For the first j The centroid of the task is in the iteration step. Coordinates of time Inspection Node With the j The Euclidean distance between the centroids; The temperature parameter decreases with each iteration. For iteration step Inspection nodes With the center of mass of the task j Connection weights between them; Secondly, the task allocation probability is obtained by normalizing the connection weights: in Inspection Node With the center of mass of the task Connection weights between them For iteration step Inspection nodes With the center of mass of the task j The probability of task allocation between them; Then, the upper-level task allocation model updates the task centroid based on the task allocation probability: in Indicates the relationship with inspection nodes The centroid with the highest probability of task allocation is the winner. The coordinates of the winner's center of gravity The neighborhood radius decreases with each iteration. Center of mass j With center of mass Topological similarity between them; The learning rate decreases with each iteration. For the mission center j In the iteration step The new coordinates at +1.
4. The hierarchical task scheduling method for UAV swarms for large-scale node inspection according to claim 1, characterized in that, In S3, S2 is executed repeatedly to update the task assignment probability and task centroid, until the number of iterations reaches a preset threshold. Then, the task allocation probability is hardened: in Indicates the end of the iteration and the inspection node The centroid of the task with the highest task assignment probability. Inspection Node With the center of mass of the task j The final task assignment probability; Subsequently based on the obtained Each inspection node is connected to a unique task centroid until all N inspection nodes are connected to S task centroids, thus dividing the inspection task into S task subsets.
5. The hierarchical task scheduling method for UAV swarms for large-scale node inspection according to claim 1, characterized in that, In S4, the drone cluster contains S identical drones. Each subset of tasks, after being attached to a base station node, forms a single inspection task and is assigned to a drone.
6. The hierarchical task scheduling method for UAV swarms for large-scale node inspection according to claim 1, characterized in that, In S4, the lower-level path planning model consists of an encoder-decoder structure. It takes the coordinates of the base station node and the inspection nodes in the task subset as input to construct the shortest closed path for a single UAV to start from the base station node, visit all inspection nodes, and finally return to the base station node.
7. The hierarchical task scheduling method for UAV swarms for large-scale node inspection according to claim 6, characterized in that, The encoder first uses a linear layer to project the node coordinates into node embeddings: in, For nodes Node embedding, For batch normalization operations, The linear layer weight parameter matrix, Inspection Node Normalized coordinates, For the linear layer bias parameter matrix, The number of inspection nodes contained in the task subset; Secondly, the encoder uses L consecutive coding layers to embed the nodes. Gradually improve to feature embedding For the l-th coding layer, its input is The following methods will be used for processing: in, For the intermediate features of the l-th coding layer, For neighborhood multi-head attention operations, For feedforward operation, This represents the output feature of the l-th coding layer.
8. The hierarchical task scheduling method for UAV swarms for large-scale node inspection according to claim 7, characterized in that, The neighborhood multi-head attention operation Process the input as follows: First, the construction dimensions are neighborhood connection matrix Each element is determined by the node's neighborhood relationship: in, For nodes j With nodes Neighborhood connection relationships, For nodes of k Neighborhood, containing nodes of k One neighboring node; Secondly, for For the h-th head, calculate its global attention value: in, Let h be the global attention value of the h-th attention head in the l-th coding layer. and These are the corresponding query matrix and key matrix, respectively. Obtained through linear projection, Embedding dimension for each node; Then calculate the neighborhood attention value: in The attention value is the neighborhood attention value of the h-th attention head in the l-th coding layer. This is an element-wise multiplication operation; This is used to obtain the output of the h-th attention head. : in, For normalization operations, For the reason The value matrix obtained by linear projection; Finally, the outputs of the H attention heads are merged to obtain the output of the neighborhood multi-head attention operation: in, This is the output of the multi-head attention operation in the neighborhood of the l-th coding layer. This is a horizontal splicing operation. This is the output projection matrix of the l-th coding layer.
9. The hierarchical task scheduling method for UAV swarms for large-scale node inspection according to claim 6, characterized in that, The decoder is embedded with features from the encoder output. As input, the task selection probability at each time step is calculated as follows: First, based on feature embedding Computational context embedding : in, Feature embedding for base station nodes, For time steps -1 Feature embedding of the visited node The mean of the feature embeddings of unvisited nodes; Secondly, calculate the attention compatibility value: in, For nodes At time step Attention compatibility value, It is a preset constant. For attention query projection matrix, For attention key projection matrix, For the first Feature embedding of each node Embedding dimension for each node; Finally, based on the attention compatibility values of all unvisited nodes, the task selection probability is calculated: in, For the lower-level path planning model at time step Select node As the probability of task selection for inspection nodes. For nodes j At time step Attention compatibility value.
10. The hierarchical task scheduling method for UAV swarms for large-scale node inspection according to claim 1, characterized in that, In S5, the lower-level path planning model selects the node with the highest probability value as the optimal inspection node at each time step based on the calculated task selection probability, and marks it as an visited node to update the task status.