Multi-unmanned aerial vehicle inspection track and mobile energy storage terminal scheduling inspection method and system

Through the DDQN algorithm of the multi-head self-attention mechanism, the optimization of the drone inspection trajectory and the two-way inspired A* algorithm optimizes the charging scheduling of the mobile energy storage terminal, solving the problems of endurance and manual intervention in the drone inspection, and improving the patrol efficiency and safety.

CN119937625AActive Publication Date: 2025-05-06STATE GRID HUBEI ELECTRIC POWER INFORMATION & TELECOMMUNICATION COMPANY +1
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202411890637.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-05-06
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

The existing drone inspection technology faces the problems of limited endurance, a large amount of manual intervention to avoid obstacles and no-fly areas, and high complexity of patrol trajectory optimization, resulting in low patrol efficiency and limited coverage.

Method used

A multi-UAV patrol trajectory and mobile energy storage terminal scheduling inspection method is proposed. By obtaining the location information of the drone inspection points, the DDQN algorithm based on the multi-head self-attention mechanism is optimized, and a two-way heuristic A* algorithm is used to optimize the charging scheduling strategy of the mobile energy storage terminal, allocate inspection tasks and reduce task complexity.

Benefits of technology

It improves the efficiency and safety of drone inspections, reduces the total patrol time, enhances the decision-making ability of drones during the patrol process, and effectively avoids obstacles and no-fly areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119937625A_ABST
    Figure CN119937625A_ABST
Patent Text Reader

Abstract

The invention provides a multi-unmanned aerial vehicle routing inspection track and mobile energy storage end scheduling routing inspection method and system, and the method comprises the steps: obtaining the position information of each unmanned aerial vehicle routing inspection point, distributing the routing inspection points of each unmanned aerial vehicle according to the distribution of the routing inspection points and the number of the unmanned aerial vehicles, and finally carrying out the routing inspection of each unmanned aerial vehicle based on the routing inspection task of each unmanned aerial vehicle. And adopting a DDQN algorithm based on a multi-head self-attention mechanism to optimize the inspection track of each unmanned aerial vehicle, and optimizing and determining a charging scheduling strategy of the mobile energy storage end. The inspection efficiency of the unmanned aerial vehicle is improved, the total inspection time is reduced, and the safety of the unmanned aerial vehicle in the inspection process is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of unmanned aerial vehicle inspection, and in particular relates to a method and system for dispatching inspections of multiple unmanned aerial vehicle inspection trajectories and mobile energy storage terminals. Background Art

[0002] With the rapid development of China's economy, various tasks requiring inspection have emerged in the industrial world. At present, most areas are still mainly patrolled by people, supplemented by machine-assisted inspection. Traditional manual inspection has many significant disadvantages when facing large, scattered or dangerous environments. First, manual inspection usually requires a lot of human resources, especially in vast or difficult-to-reach areas (such as high-voltage power lines, oil pipelines, wind power generation facilities, etc.). A large number of inspectors means high labor costs and time investment, and it is difficult to respond to emergencies quickly. Secondly, manual inspection is slow and is limited by people's physical fitness, working hours and movement speed. Especially in places with complex terrain or harsh conditions, inspectors cannot quickly cover large areas, and the inspection cycle is long, which affects the timely discovery and handling of problems. In addition, in the event of equipment failure or emergency, traditional inspection methods are difficult to quickly locate problems and respond. The inspection cycle is long, and the problem can usually only be discovered during the next inspection, which delays the troubleshooting time and may cause more serious consequences. Moreover, in extreme weather (such as strong winds, heavy rain, heavy snow, etc.) or harsh terrain (such as mountains, deserts, etc.), the difficulty and risk of manual inspections are greatly increased, and sometimes even impossible to carry out, which limits the coverage and continuity of inspections.

[0003] In recent years, drone inspection technology has gradually gained attention in various industries, especially in the fields of electricity, oil, agriculture, infrastructure, etc., showing great application potential due to its flexibility, efficiency and intelligence. Drones can quickly cover a large area in a short time, and are particularly suitable for widely distributed infrastructure inspections such as power lines, oil pipelines, and wind power generation equipment. Drone inspections can realize real-time data collection, greatly shorten the inspection time, and do not require manual participation in physical inspections of dangerous areas. Secondly, drones can replace manual entry into dangerous or difficult-to-reach environments for inspections, such as high altitude, high pressure, and highly corrosive areas. This effectively avoids human contact with dangerous facilities and environments, reduces accidents and safety hazards during the inspection process, and ensures the safety of inspection personnel. In addition, drones are equipped with advanced equipment such as high-resolution cameras, infrared sensors, thermal imagers, and lidars, which can capture more accurate images and data. Through high-definition images, videos, 3D modeling, and sensor data, drones can generate detailed inspection reports in real time, improving the comprehensiveness and accuracy of data collection. However, there are also some challenges that need to be solved in the process of drone-based inspections.

[0004] First of all, one of the challenges that drones face in actual inspections is endurance. Most commercial drones have limited battery life, usually between 30 minutes and 1 hour. The short flight time limits their coverage area, especially in large-scale inspection tasks. Secondly, although drones have autonomous flight capabilities, a lot of manual intervention is still required in many inspection tasks. For example, drones need to avoid obstacles / avoid entering no-fly zones during inspection tasks to ensure the flight safety of drones. Therefore, how to enable drones to autonomously identify and avoid obstacles / no-fly zones and optimize the inspection trajectory of drones is the key to improving the efficiency of drone inspections. In addition, when planning the trajectory of drones, the complexity of the algorithm increases factorially with the increase of inspection points. How to reasonably design the trajectories of multiple drones according to the distribution of inspection points is also the key to improving inspection efficiency. Summary of the invention

[0005] The purpose of the present invention is to provide a method and system for scheduling inspection of multiple UAV inspection trajectories and mobile energy storage terminals in response to the above-mentioned problems existing in the prior art.

[0006] To achieve the above objectives, the technical solution of the present invention is as follows:

[0007] In a first aspect, the present invention proposes a multi-UAV inspection trajectory and a mobile energy storage terminal scheduling inspection method, comprising:

[0008] S1. Obtain the location information of each drone inspection point;

[0009] S2, assign inspection points to each drone according to the distribution of inspection points and the number of drones;

[0010] S3. Based on the inspection points of each drone, the DDQN algorithm based on the multi-head self-attention mechanism is used to optimize the inspection trajectory of each drone, and optimize the charging scheduling strategy of the mobile energy storage terminal.

[0011] The S3 includes:

[0012] S31, determine the optimal inspection point of the drone based on the greedy algorithm;

[0013] S32, select the flight speed v of the drone according to the ε-greedy strategy in the current time slot n , and calculate the reward r of the current time slot according to the following formula n :

[0014]

[0015] In the above formula, r a Punishment for flying a drone into a no-fly zone, d o,n is the distance between the current position of the drone and the inspection point, d o,n+1is the distance between the next time slot position of the drone and the inspection point, η is the constant that reduces the inspection time slot of the drone, and r a , η are both negative constants;

[0016] S33, the result of the transfer (q n ,v n ,r n ,q n+1 ) is saved to the experience pool, where q n ,q n+1 are the positions of the drone in the current time slot and the next time slot respectively;

[0017] S34, randomly select N1-step samples from the experience pool, and use the gradient descent method to reduce the loss of the neural network, thereby optimizing the inspection trajectory of the drone, obtaining a greater reward, and finally obtaining the optimal inspection trajectory of each drone, where:

[0018] The loss function loss is:

[0019]

[0020] In the above formula, λ is the discount factor, Q(q n ,v n |θ) is the position q of the drone in the current dueling network n Take action v n The Q value, The target dueling network is the drone at position q n+1 Take Action Q value, θ, θ * is the factor that affects the parameters of the neural network model;

[0021] The dueling network introduces a multi-head self-attention mechanism to enhance the state value function and advantage function. The enhanced Q function is:

[0022]

[0023] V(q)=f V (h att (q))

[0024] A(q,v)=f A (h att (q),v)

[0025]

[0026] Q i =W Q h(q)

[0027] K j =WK h(q)

[0028] V j =W V h(q)

[0029] In the above formula, V(q) and A(q,v) are the state value function and advantage function respectively, q and v are the location of the drone and the action taken respectively, B is the number of selectable actions, and f V The state feature h used to enhance the att (q) Calculate the state value V(q), h att (q) is the state feature representation after attention enhancement, f A Used to calculate the advantage function A(q,v) from the state features after attention enhancement, v i,j is the attention weight, V j is the value vector, Q i is the query vector, is the transpose of the key vector, i is the index of the query vector, j is the index of the key vector and the value vector, and d k is the dimension of the key vector, W Q W is the linear transformation matrix that maps h(q) to the query vector space. K is the linear transformation matrix that maps h(q) to the key vector space, W V is the linear transformation matrix that maps h(q) to the value vector space, h(q) is the eigenvector;

[0030] S35, judging whether the current battery energy of the drone is less than the set threshold value, if so, the mobile energy storage terminal charges the drone according to the charging scheduling strategy; if not, entering S36;

[0031] S36, judging whether the UAV has completed the inspection task of the inspection point, if not, returning to S32; if completed, entering S37;

[0032] S37, judging whether the UAV has completed the inspection tasks of all inspection points, if not, returning to S31; if completed, entering S38;

[0033] S38, determine whether the maximum number of iterations has been reached. If not, return to S31 to optimize the inspection trajectory of the next UAV.

[0034] The S31 includes:

[0035] S311. The drone numbers all the inspection points assigned to it;

[0036] S312, calculating the distance between the current position of the drone and each unfinished inspection point, deleting the points that have been inspected, and sorting the remaining inspection points from largest to smallest according to the distance;

[0037] S313, determine whether the inspection point with the shortest distance has completed the inspection, if it has, return to S312 to perform the next cycle calculation; if it has not, output the number of the inspection point as the next target.

[0038] The charging scheduling strategy of the mobile energy storage terminal is optimized and determined by the bidirectional heuristic A* algorithm, which specifically includes:

[0039] S351, initialize open_list and closed_list, and move the starting point w of the energy storage end to s Add open_list;

[0040] S352, perform forward search and reverse search simultaneously, wherein the forward search starts from the starting point and searches for a path to the target, and the reverse search starts from the target and searches for a path to the starting point, calculates the F value of each node in the open_list, and selects the node with the smallest F value as the current node w c , where the F value of each node is calculated by the following formula:

[0041] F=f forward (b)+f backward (b)

[0042] f forward (b) = g start (b)+h goal (b)

[0043] f backward (b) = g goal (b)+h start (b)

[0044] In the above formula, f forward (b), f backward (b) The expected total path cost for forward and reverse search, g start (b) is the starting point w s The actual path cost to the current node b, h goal (b) is from the current node b to the target node w g The estimated cost, g goal (b) is the total path cost of reverse search from the target to the current node b, h start (b) Return to the starting point w from the current node b s The heuristic value of

[0045] S353, the current node w cMove from open_list to closed_list;

[0046] S354, determine the current node w c Is the neighbor node of the new node or a shorter path is found? If so, add it to the open_list;

[0047] S355, determine the current node w c Is it the target node w? g Or open_list is empty. If so, output the optimal path of the mobile energy storage terminal, that is, the charging scheduling plan of the mobile energy storage terminal; if not, return to S352.

[0048] S2 uses the density-aware K-Means++ algorithm to allocate inspection points for each drone, specifically including:

[0049] S21. Selecting the initial cluster center based on distance and density weights, including:

[0050] S211, randomly select a checkpoint from all the checkpoints as the first cluster center;

[0051] S212, respectively calculate the distance D (w i ), and the density weights ρ(w i );

[0052] S213. Calculate the probability of each other inspection point being selected as the next cluster center according to the distance and density weight, and select the inspection point with the largest probability value as the next cluster center:

[0053]

[0054] In the above formula, L(w i ) is the i-th inspection point w i The probability of being selected as the next cluster center, D(w i ) is w i The distance from the cluster center, ρ(w i ) is w i The density weight of , I is the number of inspection points;

[0055] S214, judging whether the number of cluster centers reaches the target value, that is, the number of drones. If it reaches the target value, the initial cluster centers are obtained; if not, returning to S212 for the next round of screening;

[0056] S22, assign each inspection point to the cluster center closest to it;

[0057] S23. Update the cluster center based on density weight:

[0058]

[0059] In the above formula, is the updated j-th cluster center, S j are all inspection points belonging to the jth cluster center;

[0060] S24. Repeat S22-S23 in a loop until the iteration termination condition is met.

[0061] In S212, D(w i ) is calculated according to the following formula:

[0062]

[0063] In the above formula, d(w i ,e j ) is the i-th inspection point w i To the jth cluster center e j The Euclidean distance of

[0064] ρ(w i ) is calculated according to the following formula:

[0065]

[0066] In the above formula, δ is a small positive number.

[0067] In the second aspect, the present invention proposes a multi-UAV inspection trajectory and mobile energy storage terminal scheduling inspection system, including an information acquisition module, an inspection point allocation module, an inspection trajectory optimization module, and a mobile energy storage terminal charging scheduling module;

[0068] The information acquisition module is used to obtain the location information of each drone inspection point;

[0069] The inspection point allocation module is used to allocate inspection points of each drone according to the distribution of inspection points and the number of drones;

[0070] The inspection trajectory optimization module is used to optimize the inspection trajectory of each drone based on the inspection points of each drone, using the DDQN algorithm based on the multi-head self-attention mechanism;

[0071] The mobile energy storage terminal charging scheduling module is used to optimize and determine the charging scheduling strategy of the mobile energy storage terminal, and control the mobile energy storage terminal to charge the drone.

[0072] The inspection trajectory optimization module optimizes the inspection trajectory of each drone according to the following steps:

[0073] A1. Determine the optimal inspection point of the drone based on the greedy algorithm;

[0074] A2. Select the flight speed v of the drone according to the ε-greedy strategy in the current time slot n , and calculate the reward r of the current time slot according to the following formula n :

[0075]

[0076] In the above formula, r a Punishment for flying a drone into a no-fly zone, d o,n is the distance between the current position of the drone and the inspection point, d o,n+1 is the distance between the next time slot position of the drone and the inspection point, η is the constant that reduces the inspection time slot of the drone, and r a , η are both negative constants;

[0077] A3. The result of the transfer (q n ,v n ,r n ,q n+1 ) is saved to the experience pool, where q n ,q n+1 are the positions of the drone in the current time slot and the next time slot respectively;

[0078] A4. Randomly select N1-step samples from the experience pool and use the gradient descent method to reduce the loss of the neural network, thereby optimizing the inspection trajectory of the drone and obtaining a greater reward. Finally, the optimal inspection trajectory of each drone is obtained, where:

[0079] The loss function loss is:

[0080]

[0081] In the above formula, λ is the discount factor, Q(q n ,v n |θ) is the position q of the drone in the current dueling network n Take action v n The Q value, The target dueling network is the drone at position q n+1 Take Action Q value, θ, θ * is the factor that affects the parameters of the neural network model;

[0082] The dueling network introduces a multi-head self-attention mechanism to enhance the state value function and advantage function. The enhanced Q function is:

[0083]

[0084] V(q)=f V (hatt (q))

[0085] A(q,v)=f A (h att (q),v)

[0086]

[0087] Q i =W Q h(q)

[0088] K j =W K h(q)

[0089] V j =W V h(q)

[0090] In the above formula, V(q) and A(q,v) are the state value function and advantage function respectively, q and v are the location of the drone and the action taken respectively, B is the number of selectable actions, and f V The state feature h used to enhance the att (q) Calculate the state value V(q), h att (q) is the state feature representation after attention enhancement, f A Used to calculate the advantage function A(q,v) from the state features after attention enhancement, v i,j is the attention weight, V j is the value vector, Q i is the query vector, is the transpose of the key vector, i is the index of the query vector, j is the index of the key vector and the value vector, and d k is the dimension of the key vector, W Q W is the linear transformation matrix that maps h(q) to the query vector space. K is the linear transformation matrix that maps h(q) to the key vector space, W V is the linear transformation matrix that maps h(q) to the value vector space, h(q) is the eigenvector;

[0091] A5: Determine whether the current battery energy of the drone is less than the set threshold. If so, the mobile energy storage terminal charges the drone according to the charging scheduling strategy. If not, proceed to A6.

[0092] A6: Determine whether the drone has completed the inspection task of the inspection point. If not, return to A2; if completed, enter A7;

[0093] A7, determine whether the drone has completed the inspection tasks of all inspection points. If not, return to A1; if completed, enter A8;

[0094] A8: Determine whether the maximum number of iterations has been reached. If not, return to A1 to optimize the inspection trajectory of the next UAV.

[0095] The mobile energy storage terminal charging scheduling module uses a bidirectional heuristic A* algorithm to optimize and determine the charging scheduling strategy of the mobile energy storage terminal. The algorithm process includes:

[0096] B1. Initialize open_list and closed_list, and move the starting point w of the mobile energy storage end s Add open_list;

[0097] B2. Perform forward search and reverse search at the same time. The forward search starts from the starting point and finds the path to the target. The reverse search starts from the target and finds the path to the starting point. Calculate the F value of each node in the open_list and select the node with the smallest F value as the current node w. c , where the F value of each node is calculated by the following formula:

[0098] F=f forward (b)+f backward (b)

[0099] f forward (b) = g start (b)+h goal (b)

[0100] f backward (b) = g goal (b)+h start (b)

[0101] In the above formula, f forward (b), f backward (b) The expected total path cost for forward and reverse search, g start (b) is the starting point w s The actual path cost to the current node b, h goal (b) is from the current node b to the target node w g The estimated cost, g goal (b) is the total path cost of reverse search from the target to the current node b, h start (b) Return to the starting point w from the current node b s The heuristic value of

[0102] B3. Change the current node w c Move from open_list to closed_list;

[0103] B4. Determine the current node w cIs the neighbor node of the new node or a shorter path is found? If so, add it to the open_list;

[0104] B5. Determine the current node w c Is it the target node w? g Or open_list is empty. If so, output the optimal path of the mobile energy storage terminal, that is, the charging scheduling plan of the mobile energy storage terminal; if not, return to B2.

[0105] The inspection point allocation module uses the density-aware K-Means++ algorithm to allocate inspection points for each drone. The algorithm process includes:

[0106] C1, select the initial cluster center based on distance and density weight, including:

[0107] C11, randomly select a checkpoint from all the checkpoints as the first cluster center;

[0108] C12. Calculate the distance D(w i ) and the density weights ρ(w i ):

[0109]

[0110] In the above formula, d(w i ,e j ) is the i-th inspection point w i To the jth cluster center e j The Euclidean distance, δ is a small positive number, and I is the number of inspection points;

[0111] C13. Calculate the probability of each other inspection point being selected as the next cluster center based on the distance and density weight, and select the inspection point with the largest probability value as the next cluster center:

[0112]

[0113] In the above formula, L(w i ) is the i-th inspection point w i The probability of being selected as the next cluster center, D(w i ) is w i The distance from the cluster center, ρ(w i ) is w i The density weight of

[0114] C14, judging whether the number of cluster centers reaches the target value, that is, the number of drones. If it reaches the target value, the initial cluster centers are obtained; if not, returning to S212 for the next round of screening;

[0115] C2, assign each inspection point to the cluster center closest to it;

[0116] C3. Update the cluster center based on density weight:

[0117]

[0118] In the above formula, is the updated j-th cluster center, S j are all inspection points belonging to the jth cluster center;

[0119] C4, loop repeats C2-C3 until the iteration termination condition is met.

[0120] Compared with the prior art, the present invention has the following beneficial effects:

[0121] 1. The present invention provides a method for scheduling inspection of multiple drone inspection trajectories and mobile energy storage terminals. The location information of each drone inspection point is first obtained, and then the inspection points of each drone are allocated according to the distribution of the inspection points and the number of drones. Finally, based on the inspection tasks of each drone, the DDQN algorithm based on the multi-head self-attention mechanism is used to optimize the inspection trajectory of each drone, and optimize the charging scheduling strategy of the mobile energy storage terminal. On the one hand, the method reduces the complexity of the task by allocating inspection tasks, designs the inspection trajectory of the drone based on reinforcement learning and combines the charging scheduling of the mobile energy storage terminal, which not only improves the inspection efficiency of the drone, reduces the total inspection time, but also improves the safety of the drone during the inspection process (efficiently avoiding obstacles / no-fly zones); on the other hand, the method introduces a multi-head self-attention mechanism in the DDQN algorithm, which can effectively enhance the dueling network's attention to key states and actions and improve decision-making capabilities; at the same time, no-fly zones are taken into account, which is more in line with the actual scenario of drone inspection.

[0122] 2. The present invention provides a multi-UAV inspection trajectory and mobile energy storage terminal scheduling inspection method, which adopts a bidirectional heuristic A* algorithm to optimize and determine the charging scheduling scheme of the mobile energy storage terminal. Compared with the traditional A* algorithm, the algorithm searches from two directions at the same time, namely forward search and reverse search. The forward search starts from the starting point to find the path to the target, and the reverse search starts from the target to find the path to the starting point. The charging scheduling optimization of the mobile energy storage terminal based on the algorithm can reduce the inspection time of the UAV, accelerate the convergence speed of the algorithm, and improve the stability of the algorithm.

[0123] 3. A multi-UAV inspection trajectory and mobile energy storage terminal scheduling inspection method of the present invention adopts a density-aware K-Means++ algorithm to allocate inspection points for each UAV. The algorithm considers both distance and density weights for cluster center selection, which can prevent falling into a local optimal solution and improve the algorithm's solution efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0124] Figure 1 This is a flowchart of the overall process of the method described in Example 1.

[0125] Figure 2 This is a flowchart of the inspection point allocation of the drone in Example 1.

[0126] Figure 3 This is a flowchart for optimizing the inspection trajectory of the UAV in Example 1.

[0127] Figure 4 This is a flowchart of the scheduling optimization of the mobile energy storage terminal in Example 1.

[0128] Figure 5 This is the simulation result diagram.

[0129] Figure 6 This is a structural diagram of the system described in Example 2. DETAILED DESCRIPTION

[0130] The present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0131] Embodiment 1:

[0132] A multi-UAV inspection trajectory and mobile energy storage terminal scheduling inspection method, such as Figure 1 As shown, the specific steps are as follows:

[0133] 1. The ground service center dispatches drones equipped with laser radar and visual sensors to the inspection area to obtain inspection point cloud data. Based on the acquired point cloud data, the inspection point coordinates and obstacle positions are obtained through feature extraction. The key to extracting inspection points is to find significant landmarks or markers, and to distinguish between smooth surfaces and high curvature points based on curvature calculation.

[0134] For the inspection point position w o , curvature k o It can be estimated by the covariance matrix C of its neighborhood:

[0135]

[0136] In the above formula, λ min is the minimum value among the eigenvalues, λ i is the i-th eigenvalue, M is, w o The mean of all points in the neighborhood, O is the number of selected points.

[0137] Since points with high curvature are often located at edges and corners, this embodiment extracts the coordinates of key inspection points and obstacle positions by setting a curvature threshold, ie, k>ι.

[0138] 2. The ground service center uses the density-aware K-means++ algorithm to assign inspection tasks to each drone based on the distribution of inspection points and the number of drones, such as Figure 2 As shown, the algorithm process includes:

[0139] 2.1. Select the initial cluster center based on the distance and density weight to ensure that the initial cluster center is related to the inspection point density, including:

[0140] 2.1.1. Randomly select a checkpoint from all the checkpoints as the first cluster center.

[0141] 2.1.2. According to the following formula, calculate the distance D (w i ), and the density weights ρ(w i ):

[0142]

[0143] In the above formula, d(w i ,e j ) is the i-th inspection point w i To the jth cluster center e j , δ is a small positive number to avoid the denominator being zero, and I is the number of inspection points.

[0144] 2.1.3. Calculate the probability of each other inspection point being selected as the next cluster center based on the distance and density weight, and select the inspection point with the largest probability value as the next cluster center:

[0145]

[0146] In the above formula, L(w i ) is the i-th inspection point w i The probability of being selected as the next cluster center, D(w i ) is w i The distance from the cluster center, ρ(w i ) is w i The density weight of .

[0147] 2.1.4. Determine whether the number of cluster centers reaches the target value, that is, the number of drones. If it reaches it, the initial cluster center is obtained; if not, return to 2.1.2 for the next round of screening.

[0148] 2.2. Assign each inspection point to the cluster center closest to it.

[0149] 2.3. To optimize the inspection route of the drone, the cluster center is updated based on the density weight:

[0150]

[0151] In the above formula, is the updated j-th cluster center, S j are all inspection points belonging to the jth cluster center.

[0152] 2.4. Repeat 2.2-2.3 until the cluster center no longer changes significantly, and the inspection points of each drone are obtained.

[0153] 3. Determine the optimal inspection point of the drone based on the greedy algorithm. The specific process includes:

[0154] 3.1. The drone numbers all the inspection points assigned to it.

[0155] 3.2. Calculate the distance between the current position of the drone and each unfinished inspection point, delete the points that have been inspected, and sort the remaining inspection points from largest to smallest according to the distance.

[0156] 3.3. Determine whether the inspection point with the smallest distance has completed inspection. If it has, return to S312 to perform the next cycle calculation; if it has not, output the number of the inspection point as the next target.

[0157] 4. The drone is at its current location n The distance to the selected inspection point and the distance to the no-fly zone are sensed through the sensor device or the flight control acquisition module.

[0158] 5. Use the DDQN algorithm based on multi-head self-attention mechanism to optimize the inspection trajectory of each drone, such as Figure 3 As shown, the algorithm process includes:

[0159] 5.1. Select the flight speed v of the drone according to the ε-greedy strategy in the current time slot n , and sense the distance between the next time slot and the no-fly zone, and the distance between the next time slot and the inspection point:

[0160]

[0161] In the above formula, q n+1 is the position of the UAV in the next time slot, The length of a time slot.

[0162] 5.2. Calculate the reward r of the current time slot according to the following formula: n :

[0163]

[0164] In the above formula, r aPunishment for flying a drone into a no-fly zone, d o,n is the distance between the current position of the drone and the inspection point, d o,n+1 is the distance between the next time slot position of the drone and the inspection point, η is the constant that reduces the inspection time slot of the drone, and r a , η are both negative constants.

[0165] 5.3. The result of the transfer (q n ,v n ,r n ,q n+1 ) is saved to the experience pool, where q n ,q n+1 are the positions of the drone in the current time slot and the next time slot respectively.

[0166] 5.4. Randomly select N1-step samples (i.e., samples of N1 time slots) from the experience pool, and use the gradient descent method to reduce the loss of the neural network, thereby optimizing the inspection trajectory of the drone and obtaining a greater reward, and finally obtaining the optimal inspection trajectory of each drone, where:

[0167] The loss function loss is:

[0168]

[0169] In the above formula, λ is the discount factor, Q(q n ,v n |θ) is the position q of the drone in the current dueling network n Take action v n The Q value, The target dueling network is the drone at position q n+1 Take Action Q value, θ, θ * is the factor that affects the parameters of the neural network model.

[0170] The dueling network makes the value estimation more stable by calculating the state value and advantage function separately, but the traditional structure may not be able to effectively focus on important features in complex environments. Therefore, this embodiment introduces a multi-head self-attention mechanism in the dueling network to enhance the state value function and advantage function to enhance the network's attention to key states and actions. The specific process includes:

[0171] First, use the multi-head self-attention mechanism to extract key state features in the environment:

[0172]

[0173] After introducing the multi-head self-attention mechanism, the state q (i.e. the position of the drone q n) Input a convolutional network or a fully connected network, and the extracted feature vector h(q) can be expressed as:

[0174] h(q)=f encoder (q)

[0175] Then use h(q) to generate Q i , K j 、V j ,Right now

[0176] Q i =W Q h(q)

[0177] K j =W K h(q)

[0178] V j =W V h(q);

[0179] Then calculate the attention weight:

[0180]

[0181] The enhanced state is obtained by weighting the attention weights, which is expressed as:

[0182]

[0183] Then the state value function and advantage function enhanced by the multi-head self-attention mechanism are:

[0184] V(q)=f V (h att (q))

[0185] A(q,v)=f A (h att (q),v)

[0186] Finally, the state value function and the advantage function are integrated to form the enhanced Q function, namely:

[0187]

[0188] V(q)=f V (h att (q))

[0189] A(q,v)=f A (h att (q),v)

[0190]

[0191] Q i =WQ h(q)

[0192] K j =W K h(q)

[0193] V j =W V h(q)

[0194] In the above formula, V(q) and A(q,v) are the state value function and advantage function respectively, q and v are the location of the drone and the action taken respectively, B is the number of selectable actions, and f V The state feature h used to enhance the att (q) Calculate the state value V(q), h att (q) is the state feature representation after attention enhancement, f A Used to calculate the advantage function A(q,v) from the state features after attention enhancement, v i,j is the attention weight, V j is the value vector, Q i is the query vector, is the transpose of the key vector, i is the index of the query vector, j is the index of the key vector and the value vector, and d k is the dimension of the key vector, W Q W is the linear transformation matrix that maps h(q) to the query vector space. K is the linear transformation matrix that maps h(q) to the key vector space, W V is the linear change matrix that maps h(q) to the value vector space, and h(q) is the eigenvector.

[0195] 5.5. Based on the airborne energy consumed by the drone, determine whether the current battery energy of the drone is less than the set threshold. If it is less than, the mobile energy storage terminal charges the drone according to the charging scheduling strategy; if it is not less than, enter 5.6, where:

[0196] The calculation method for the onboard energy consumed by the drone is:

[0197] Considering that the energy consumed by the drone during flight is greater than the energy it charges in the same period of time, the drone waits on the road closest to it before the mobile energy storage terminal arrives (considering that the mobile energy storage terminal can only move on the road in real scenarios).

[0198] Assume that the total time consumed by drone i after completing the inspection task is T tot , T tot It consists of three parts, namely the charging time T of the drone during the inspection process ch , the flight time T during the UAV inspection process f, and the waiting time T of the UAV to dispatch the mobile energy storage terminal when there is no power a , that is, T tot =T ch +T f +T a Then at time T tot The airborne energy E consumed by the UAV can be expressed as:

[0199]

[0200] In the above formula, P(V) is the instantaneous energy consumption of the UAV during flight, P0, P i are two constants, representing the blade profile power and induced power of the drone in hovering state, V is the flight speed, U is the tip is the tip speed of the rotor blade, v0 is the average rotor induced speed in the hovering state, d0 is the fuselage drag ratio, ρ is the air density, s is the rotor solidity, and A is the rotor disc area.

[0201] The charging scheduling strategy of the mobile energy storage terminal is optimized and determined by the bidirectional heuristic A* algorithm, such as Figure 4 As shown, the algorithm process includes:

[0202] A. Initialization node: Set the starting point of the mobile energy storage terminal to w s , the target point of the UAV is set to w g , initialize open_list and closed_list, and move the starting point w of the energy storage end s Added open_list.

[0203] B. Select the optimal node: The traditional A* algorithm only searches from the starting point to the target, while this algorithm performs forward search and reverse search at the same time. The forward search starts from the starting point and looks for a path to the target, while the reverse search starts from the target and looks for a path to the starting point. When the forward search and reverse search meet at a certain node, a complete path is formed.

[0204] Calculate the F value of each node in open_list and select the node with the smallest F value as the current node w c , where the F value of each node is calculated by the following formula:

[0205] F=f forward (b)+f backward (b)

[0206] f forward (b) = g start (b)+h goal (b)

[0207] f backward (b) = ggoal (b)+h start (b)

[0208] In the above formula, f forward (b), f backward (b) The expected total path cost for forward and reverse search, g start (b) is the starting point w s The actual path cost to the current node b is represented by the path length, h goal (b) is from the current node b to the target node w g The estimated cost is also expressed by the distance, g goal (b) is the total path cost of reverse search from the target to the current node b, h start (b) Return to the starting point w from the current node b s The inspiration value of .

[0209] C. Set the current node w c Move from open_list to closed_list.

[0210] D. Check neighbor nodes: determine the current node w c Check whether the four upper, lower, left and right neighbor nodes are new nodes or a shorter path is found. If so, update g(b) and f(b) and add them to open_list.

[0211] E. Determine the current node w c Is it the target node w? g Or open_list is empty. If so, output the optimal path of the mobile energy storage terminal, that is, the charging scheduling plan of the mobile energy storage terminal; if not, return B.

[0212] 5.6. Determine whether the UAV has completed the inspection task of the inspection point. If not, return to 5.1; if completed, enter S37.

[0213] 5.7. Determine whether the drone has completed the inspection tasks of all inspection points. If not, return to step 3; if completed, proceed to 5.8.

[0214] 5.8. Determine whether the maximum number of iterations has been reached. If not, return to step 3 to optimize the inspection trajectory of the next UAV.

[0215] To verify the effect of the present invention, the method described in Example 1 was used for simulation (in this simulation, the number of inspection points was set to 5 (X in the figure), the number of drones was 1, the number of no-fly zones was three (blue squares), the gray part represented the road, the green five-pointed star represented the initial position of the drone, the green solid line represented the trajectory of the drone, and the yellow solid line represented the trajectory of the mobile energy storage end. The airborne energy carried by the drone was set to 50KJ), and the results were as follows: Figure 5 shown.

[0216] It can be seen that the method of the present invention can ensure that the drone completes the inspection task while avoiding the no-fly zone. In addition, it can be seen that when the drone is low on power / completes the task, the drone will dispatch the mobile energy storage terminal to charge it.

[0217] Embodiment 2:

[0218] A multi-UAV inspection trajectory and mobile energy storage terminal scheduling inspection system, such as Figure 6 As shown, it includes an information acquisition module, an inspection point allocation module, an inspection trajectory optimization module, and a mobile energy storage terminal charging scheduling module.

[0219] The information acquisition module is used to obtain the location information of each drone inspection point.

[0220] The inspection point allocation module is used to allocate the inspection points of each drone according to the distribution of the inspection points and the number of drones using the density-aware K-Means++ algorithm. The process of the algorithm includes:

[0221] C1, select the initial cluster center based on distance and density weight, including:

[0222] C11, randomly select a checkpoint from all the checkpoints as the first cluster center;

[0223] C12. Calculate the distance D(w i ) and the density weights ρ(w i ):

[0224]

[0225] In the above formula, d(w i ,e j ) is the i-th inspection point w i To the jth cluster center e j The Euclidean distance, δ is a small positive number, and I is the number of inspection points;

[0226] C13. Calculate the probability of each other inspection point being selected as the next cluster center based on the distance and density weight, and select the inspection point with the largest probability value as the next cluster center:

[0227]

[0228] In the above formula, L(w i ) is the i-th inspection point w i The probability of being selected as the next cluster center, D(w i ) is w i The distance from the cluster center, ρ(w i ) is w i The density weight of

[0229] C14, judging whether the number of cluster centers reaches the target value, that is, the number of drones. If it reaches the target value, the initial cluster centers are obtained; if not, returning to S212 for the next round of screening;

[0230] C2, assign each inspection point to the cluster center closest to it;

[0231] C3. Update the cluster center based on density weight:

[0232]

[0233] In the above formula, is the updated j-th cluster center, S j are all inspection points belonging to the jth cluster center;

[0234] C4, loop repeats C2-C3 until the iteration termination condition is met.

[0235] The inspection trajectory optimization module is used to optimize the inspection trajectory of each drone based on the inspection points of each drone, using the DDQN algorithm based on the multi-head self-attention mechanism. The process of the algorithm includes:

[0236] A1. Determine the optimal inspection point of the drone based on the greedy algorithm;

[0237] A2. Select the flight speed v of the drone according to the ε-greedy strategy in the current time slot n , and calculate the reward r of the current time slot according to the following formula n :

[0238]

[0239] In the above formula, r a Punishment for flying a drone into a no-fly zone, d o,n is the distance between the current position of the drone and the inspection point, d o,n+1is the distance between the next time slot position of the drone and the inspection point, η is the constant that reduces the inspection time slot of the drone, and r a , η are both negative constants;

[0240] A3. The result of the transfer (q n ,v n ,r n ,q n+1 ) is saved to the experience pool, where q n ,q n+1 are the positions of the drone in the current time slot and the next time slot respectively;

[0241] A4. Randomly select N1-step samples from the experience pool and use the gradient descent method to reduce the loss of the neural network, thereby optimizing the inspection trajectory of the drone and obtaining a greater reward. Finally, the optimal inspection trajectory of each drone is obtained, where:

[0242] The loss function loss is:

[0243]

[0244] In the above formula, λ is the discount factor, Q(q n ,v n |θ) is the position q of the drone in the current dueling network n Take action v n The Q value, The target dueling network is the drone at position q n+1 Take Action Q value, θ, θ * is the factor that affects the parameters of the neural network model;

[0245] The dueling network introduces a multi-head self-attention mechanism to enhance the state value function and advantage function. The enhanced Q function is:

[0246]

[0247] V(q)=f V (h att (q))

[0248] A(q,v)=f A (h att (q),v)

[0249]

[0250] Q i =W Q h(q)

[0251] K j =WK h(q)

[0252] V j =W V h(q)

[0253] In the above formula, V(q) and A(q,v) are the state value function and advantage function respectively, q and v are the location of the drone and the action taken respectively, B is the number of selectable actions, and f V The state feature h used to enhance the att (q) Calculate the state value V(q), h att (q) is the state feature representation after attention enhancement, f A Used to calculate the advantage function A(q,v) from the state features after attention enhancement, v i,j is the attention weight, V j is the value vector, Q i is the query vector, is the transpose of the key vector, i is the index of the query vector, j is the index of the key vector and the value vector, and d k is the dimension of the key vector, W Q W is the linear transformation matrix that maps h(q) to the query vector space. K is the linear transformation matrix that maps h(q) to the key vector space, W V is the linear transformation matrix that maps h(q) to the value vector space, h(q) is the eigenvector;

[0254] A5: Determine whether the current battery energy of the drone is less than the set threshold. If so, the mobile energy storage terminal charges the drone according to the charging scheduling strategy. If not, proceed to A6.

[0255] A6: Determine whether the drone has completed the inspection task of the inspection point. If not, return to A2; if completed, enter A7;

[0256] A7, determine whether the drone has completed the inspection tasks of all inspection points. If not, return to A1; if completed, enter A8;

[0257] A8: Determine whether the maximum number of iterations has been reached. If not, return to A1 to optimize the inspection trajectory of the next UAV.

[0258] The mobile energy storage terminal charging scheduling module uses a bidirectional heuristic A* algorithm to optimize and determine the charging scheduling strategy of the mobile energy storage terminal, and controls the mobile energy storage terminal to charge the drone. The process of the bidirectional heuristic A* algorithm includes:

[0259] B1. Initialize open_list and closed_list, and move the starting point w of the mobile energy storage ends Add open_list;

[0260] B2. Perform forward search and reverse search at the same time. The forward search starts from the starting point and finds the path to the target. The reverse search starts from the target and finds the path to the starting point. Calculate the F value of each node in the open_list and select the node with the smallest F value as the current node w. c , where the F value of each node is calculated by the following formula:

[0261] F=f forward (b)+f backward (b)

[0262] f forward (b) = g start (b)+h goal (b)

[0263] f backward (b) = g goal (b)+h start (b)

[0264] In the above formula, f forward (b), f backward (b) The expected total path cost for forward and reverse search, g start (b) is the starting point w s The actual path cost to the current node b, h goal (b) is from the current node b to the target node w g The estimated cost, g goal (b) is the total path cost of reverse search from the target to the current node b, h start (b) Return to the starting point w from the current node b s The heuristic value of

[0265] B3. Change the current node w c Move from open_list to closed_list;

[0266] B4. Determine the current node w c Is the neighbor node of the new node or a shorter path is found? If so, add it to the open_list;

[0267] B5. Determine the current node w c Is it the target node w? g Or open_list is empty. If so, output the optimal path of the mobile energy storage terminal, that is, the charging scheduling plan of the mobile energy storage terminal; if not, return to B2.

Claims

1. A method for multi-UAV inspection trajectories and mobile energy storage terminal scheduling inspection, characterized in that: The method comprises: S1. Obtain the location information of each drone inspection point; S2, assign inspection points to each drone according to the distribution of inspection points and the number of drones; S3. Based on the inspection points of each drone, the DDQN algorithm based on the multi-head self-attention mechanism is used to optimize the inspection trajectory of each drone, and optimize the charging scheduling strategy of the mobile energy storage terminal.

2. A method for dispatching inspection trajectories of multiple UAVs and mobile energy storage terminals according to claim 1, characterized in that: The S3 includes: S31, determine the optimal inspection point of the drone based on the greedy algorithm; S32, select the flight speed v of the drone according to the ε-greedy strategy in the current time slot n , and calculate the reward r of the current time slot according to the following formula n : In the above formula, r a Punishment for flying a drone into a no-fly zone, d o,n is the distance between the current position of the drone and the inspection point, d o,n+1 is the distance between the next time slot position of the drone and the inspection point, η is the constant that reduces the inspection time slot of the drone, and r a , η are both negative constants; S33, the result of the transfer (q n ,v n ,r n ,q n+1 ) is saved to the experience pool, where q n ,q n+1 are the positions of the drone in the current time slot and the next time slot respectively; S34, randomly select N1-step samples from the experience pool, and use the gradient descent method to reduce the loss of the neural network, thereby optimizing the inspection trajectory of the drone, obtaining a greater reward, and finally obtaining the optimal inspection trajectory of each drone, where: The loss function loss is: In the above formula, λ is the discount factor, Q(q n ,v n |θ) is the position q of the drone in the current dueling network n Take action v n The Q value, The target dueling network is the drone at position q n+1 Take Action Q value, θ, θ * is the factor that affects the parameters of the neural network model; The dueling network introduces a multi-head self-attention mechanism to enhance the state value function and advantage function. The enhanced Q function is: V(q)=f V (h att (q)) A(q,v)=f A (h att (q),v) Q i =W Q h(q) K j =W K h(q) V j =W V h(q) In the above formula, V(q) and A(q,v) are the state value function and advantage function respectively, q and v are the location of the drone and the action taken respectively, B is the number of selectable actions, and f V The state feature h used to enhance the attention att (q) Calculate the state value V(q), h att (q) is the state feature representation after attention enhancement, f A Used to calculate the advantage function A(q,v) from the state features after attention enhancement, v i,j is the attention weight, V j is the value vector, Q i is the query vector, is the transpose of the key vector, i is the index of the query vector, j is the index of the key vector and the value vector, and d k is the dimension of the key vector, W Q W is the linear transformation matrix that maps h(q) to the query vector space. K is the linear transformation matrix that maps h(q) to the key vector space, W V is the linear transformation matrix that maps h(q) to the value vector space, h(q) is the eigenvector; S35, judging whether the current battery energy of the drone is less than the set threshold value, if so, the mobile energy storage terminal charges the drone according to the charging scheduling strategy; if not, entering S36; S36, judging whether the UAV has completed the inspection task of the inspection point, if not, returning to S32; if completed, entering S37; S37, judging whether the UAV has completed the inspection tasks of all inspection points, if not, returning to S31; if completed, entering S38; S38, determine whether the maximum number of iterations has been reached. If not, return to S31 to optimize the inspection trajectory of the next UAV.

3. A method for dispatching inspection of multiple UAV inspection trajectories and mobile energy storage terminals according to claim 2, characterized in that: The S31 includes: S311. The drone numbers all the inspection points assigned to it; S312, calculating the distance between the current position of the drone and each unfinished inspection point, deleting the points that have been inspected, and sorting the remaining inspection points from largest to smallest according to the distance; S313, determine whether the inspection point with the shortest distance has completed the inspection, if it has, return to S312 to perform the next cycle calculation; if it has not, output the number of the inspection point as the next target.

4. A method for dispatching inspection of multiple UAV inspection tracks and mobile energy storage terminals according to claim 2, characterized in that: The charging scheduling strategy of the mobile energy storage terminal is optimized and determined by using a bidirectional heuristic A* algorithm, and the process of the algorithm includes: S351, initialize open_list and closed_list, and move the starting point w of the energy storage end to s Add open_list; S352, perform forward search and reverse search simultaneously, wherein the forward search starts from the starting point and searches for a path to the target, and the reverse search starts from the target and searches for a path to the starting point, calculates the F value of each node in the open_list, and selects the node with the smallest F value as the current node w c , where the F value of each node is calculated by the following formula: F=f forward (b)+f backward (b) f forward (b)=g start (b)+h goal (b) f backward (b)=g goal (b)+h start (b) In the above formula, f forward (b), f backward (b) The expected total path cost for forward and reverse search, g start (b) is the starting point w s The actual path cost to the current node b, h goal (b) is from the current node b to the target node w g The estimated cost, g goal (b) is the total path cost of reverse search from the target to the current node b, h start (b) Return from the current node b to the starting point w s The heuristic value of S353, the current node w c Move from open_list to closed_list; S354, determine the current node w c Is the neighbor node of the new node or a shorter path is found? If so, add it to the open_list; S355, determine the current node w c Is it the target node w? g Or open_list is empty. If so, output the optimal path of the mobile energy storage terminal, that is, the charging scheduling plan of the mobile energy storage terminal; if not, return to S352.

5. A method for dispatching inspection of multiple UAV inspection trajectories and mobile energy storage terminals according to claim 1 or 2, characterized in that: S2 uses the density-aware K-Means++ algorithm to allocate inspection points for each drone. The process of the algorithm includes: S21. Selecting the initial cluster center based on distance and density weights, including: S211, randomly select a checkpoint from all the checkpoints as the first cluster center; S212, respectively calculate the distance D (w i ), and the density weights ρ(w i ); S213. Calculate the probability of each other inspection point being selected as the next cluster center according to the distance and density weight, and select the inspection point with the largest probability value as the next cluster center: In the above formula, L(w i ) is the i-th inspection point w i The probability of being selected as the next cluster center, D(w i ) is w i The distance from the cluster center, ρ(w i ) is w i The density weight of , I is the number of inspection points; S214, judging whether the number of cluster centers reaches the target value, that is, the number of drones. If so, the initial cluster centers are obtained; if not, returning to S212 for the next round of screening; S22, assign each inspection point to the cluster center closest to it; S23. Update the cluster center based on density weight: In the above formula, is the updated j-th cluster center, S j are all inspection points belonging to the jth cluster center; S24. Repeat S22-S23 in a loop until the iteration termination condition is met.

6. A method for dispatching inspection of multiple UAV inspection trajectories and mobile energy storage terminals according to claim 5, characterized in that: In S212, D(w i ) is calculated according to the following formula: In the above formula, d(w i ,e j ) is the i-th inspection point w i To the jth cluster center e j The Euclidean distance of ρ(w i ) is calculated according to the following formula: In the above formula, δ is a small positive number.

7. A multi-UAV inspection track and mobile energy storage terminal dispatching inspection system, characterized in that: The system includes an information acquisition module, an inspection point allocation module, an inspection trajectory optimization module, and a mobile energy storage terminal charging scheduling module; The information acquisition module is used to obtain the location information of each drone inspection point; The inspection point allocation module is used to allocate inspection points of each drone according to the distribution of inspection points and the number of drones; The inspection trajectory optimization module is used to optimize the inspection trajectory of each drone based on the inspection points of each drone, using the DDQN algorithm based on the multi-head self-attention mechanism; The mobile energy storage terminal charging scheduling module is used to optimize and determine the charging scheduling strategy of the mobile energy storage terminal, and control the mobile energy storage terminal to charge the drone.

8. A multi-UAV inspection track and mobile energy storage terminal scheduling inspection system according to claim 7, characterized in that: The inspection trajectory optimization module optimizes the inspection trajectory of each drone according to the following steps: A1. Determine the optimal inspection point of the drone based on the greedy algorithm; A2. Select the flight speed v of the drone according to the ε-greedy strategy in the current time slot n , and calculate the reward r of the current time slot according to the following formula n : In the above formula, r a Punishment for flying a drone into a no-fly zone, d o,n is the distance between the current position of the drone and the inspection point, d o,n+1 is the distance between the next time slot position of the drone and the inspection point, η is the constant that reduces the inspection time slot of the drone, and r a , η are both negative constants; A3. The result of the transfer (q n ,v n ,r n ,q n+1 ) is saved to the experience pool, where q n ,q n+1 are the positions of the drone in the current time slot and the next time slot respectively; A4. Randomly select N1-step samples from the experience pool and use the gradient descent method to reduce the loss of the neural network, thereby optimizing the inspection trajectory of the drone and obtaining a greater reward. Finally, the optimal inspection trajectory of each drone is obtained, where: The loss function loss is: In the above formula, λ is the discount factor, Q(q n ,v n |θ) is the position q of the drone in the current dueling network n Take action v n The Q value, The target dueling network is the drone at position q n+1 Take Action Q value, θ, θ * is the factor that affects the parameters of the neural network model; The dueling network introduces a multi-head self-attention mechanism to enhance the state value function and advantage function. The enhanced Q function is: V(q)=f V (h att (q)) A(q,v)=f A (h att (q),v) Q i =W Q h(q) K j =W K h(q) V j =W V h(q) In the above formula, V(q) and A(q,v) are the state value function and advantage function respectively, q and v are the location of the drone and the action taken respectively, B is the number of selectable actions, and f V The state feature h used to enhance the attention att (q) Calculate the state value V(q), h att (q) is the state feature representation after attention enhancement, f A Used to calculate the advantage function A(q,v) from the state features after attention enhancement, v i,j is the attention weight, V j is the value vector, Q i is the query vector, K j T is the transpose of the key vector, i is the index of the query vector, j is the index of the key vector and the value vector, and d k is the dimension of the key vector, W Q W is the linear transformation matrix that maps h(q) to the query vector space. K is the linear transformation matrix that maps h(q) to the key vector space, W V is the linear transformation matrix that maps h(q) to the value vector space, h(q) is the eigenvector; A5: Determine whether the current battery energy of the drone is less than the set threshold. If so, the mobile energy storage terminal charges the drone according to the charging scheduling strategy. If not, proceed to A6. A6: Determine whether the drone has completed the inspection task of the inspection point. If not, return to A2; if completed, enter A7; A7, determine whether the drone has completed the inspection tasks of all inspection points. If not, return to A1; if completed, enter A8; A8: Determine whether the maximum number of iterations has been reached. If not, return to A1 to optimize the inspection trajectory of the next UAV.

9. A multi-UAV inspection track and mobile energy storage terminal scheduling inspection system according to claim 7 or 8, characterized in that: The mobile energy storage terminal charging scheduling module uses a bidirectional heuristic A* algorithm to optimize and determine the charging scheduling strategy of the mobile energy storage terminal. The algorithm process includes: B1. Initialize open_list and closed_list, and move the starting point w of the mobile energy storage end s Add open_list; B2. Perform forward search and reverse search at the same time. The forward search starts from the starting point and finds the path to the target. The reverse search starts from the target and finds the path to the starting point. Calculate the F value of each node in the open_list and select the node with the smallest F value as the current node w. c , where the F value of each node is calculated by the following formula: F=f forward (b)+f backward (b) f forward (b)=g start (b)+h goal (b) f backward (b)=g goal (b)+h start (b) In the above formula, f forward (b), f backward (b) The expected total path cost for forward and reverse search, g start (b) is the starting point w s The actual path cost to the current node b, h goal (b) is from the current node b to the target node w g The estimated cost, g goal (b) is the total path cost of reverse search from the target to the current node b, h start (b) Return from the current node b to the starting point w s The heuristic value of B3. Set the current node w c Move from open_list to closed_list; B4. Determine the current node w c Is the neighbor node of the new node or a shorter path is found? If so, add it to the open_list; B5. Determine the current node w c Is it the target node w? g Or open_list is empty. If so, output the optimal path of the mobile energy storage terminal, that is, the charging scheduling plan of the mobile energy storage terminal; if not, return to B2.

10. A multi-UAV inspection track and mobile energy storage terminal scheduling inspection system according to claim 7 or 8, characterized in that: The inspection point allocation module uses the density-aware K-Means++ algorithm to allocate inspection points for each drone. The algorithm process includes: C1, select the initial cluster center based on distance and density weight, including: C11, randomly select a checkpoint from all the checkpoints as the first cluster center; C12. Calculate the distance D(w i ) and the density weights ρ(w i ): In the above formula, d(w i ,e j ) is the i-th inspection point w i To the jth cluster center e j The Euclidean distance, δ is a small positive number, and I is the number of inspection points; C13. Calculate the probability of each other inspection point being selected as the next cluster center based on the distance and density weight, and select the inspection point with the largest probability value as the next cluster center: In the above formula, L(w i ) is the i-th inspection point w i The probability of being selected as the next cluster center, D(w i ) is w i The distance from the cluster center, ρ(w i ) is w i The density weight of C14, judging whether the number of cluster centers reaches the target value, that is, the number of drones. If it reaches the target value, the initial cluster centers are obtained; if not, returning to S212 for the next round of screening; C2, assign each inspection point to the cluster center closest to it; C3. Update the cluster center based on density weight: In the above formula, is the updated j-th cluster center, S j are all inspection points belonging to the jth cluster center; C4, loop repeats C2-C3 until the iteration termination condition is met.

Citation Information

Patent Citations

  • Scheduling decision-making method for vehicle-machine cooperative electric power inspection

    CN113705982A

  • Power transformer abnormal state reconnaissance and fire early warning based on improved clustering algorithm

    CN114928161A

  • Intelligent power line inspection method and system based on multiple unmanned aerial vehicles

    CN116069061A

  • Unmanned aerial vehicle emergency scene inspection method and system based on deep reinforcement learning

    CN116149367A

  • Multi-unmanned aerial vehicle data collection method and system based on federal reinforcement learning

    CN116205390A