Path optimization method and device for unmanned aerial vehicle routing inspection suspension type track
The greedy algorithm and brainstorming optimization algorithm are used to optimize the drone inspection path, which solves the problems of resource waste and low efficiency caused by unreasonable inspection path planning in the existing technology, and achieves the shortest flight distance and the most efficient inspection path. .
Patent Information
- Application Number
- CN202410665269.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-09-10
AI Technical Summary
When planning existing drone inspection paths, if the planning sequence is unreasonable, the flight distance will be too long, resulting in a waste of resources and reduced efficiency.
A greedy algorithm is used to determine the initial inspection path, and multiple rounds of optimization are performed through brainstorming optimization algorithms and damage repair operators to optimize the inspection path to reduce flight distance and time.
The drone inspection path is minimized, flight resource consumption is reduced, and inspection efficiency is improved.
Smart Images

Figure CN118627709A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of unmanned aerial vehicle control technology, and in particular to a path optimization method and device for unmanned aerial vehicle inspection of a suspended track. Background Art
[0002] Currently, drones are widely used in people's lives due to their low cost, good maneuverability, and strong survivability. They play a great role in agricultural planting, power inspection, geographic surveying and mapping, disaster relief, etc. However, in the prior art, before using drones to perform inspection tasks in the above-mentioned scenarios, a random inspection path that can reach all inspection points for inspection is usually planned for the drone according to the locations of the inspection points that the drone needs to reach in the inspection task, as the flight path for the drone to perform the inspection task.
[0003] However, the study found that when randomly planning inspection routes for drones, if the order of planning to arrive at each inspection point is unreasonable, the drone will need to fly too long a distance based on the planned inspection route to reach all inspection points to complete the inspection task. This will lead to a waste of inspection time and resources required for flight, such as electricity and fuel, and will also reduce the efficiency of the drone in performing inspection tasks. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a path optimization method and device for unmanned aerial vehicle inspection of suspended tracks, so as to improve the rationality of the determined inspection path, avoid the waste of inspection time and resources required for flight such as electricity and fuel when the unmanned aerial vehicle performs inspection tasks based on the inspection path, and at the same time improve the efficiency of the unmanned aerial vehicle when performing inspection tasks.
[0005] In a first aspect, an embodiment of the present application provides a method for optimizing a path of a suspended track for inspection by a drone, the method comprising:
[0006] Get the coordinates of each inspection point that the drone needs to traverse when performing inspection tasks;
[0007] Based on the coordinate values of each inspection point, the initial solution of the inspection path is determined by using a greedy algorithm with the goal that the inspection path can traverse each inspection point and the inspection path is the shortest;
[0008] Based on the brainstorming optimization algorithm and the operator pairs composed of the destruction operator and the repair operator, multiple rounds of optimization are performed on the initial solution of the inspection path to obtain the optimal solution of the inspection path;
[0009] The optimal solution of the inspection path is determined as the target inspection path when the UAV performs the inspection task.
[0010] Optionally, the method of determining an initial solution of the inspection path by using a greedy algorithm based on the coordinate values of each inspection point and with the goal that the inspection path can traverse each inspection point and the inspection path is the shortest includes:
[0011] Randomly select one of the inspection points as the starting point and mark it;
[0012] Calculate the distance between the starting point and other inspection points, and mark the inspection point closest to the starting point as the new starting point;
[0013] The above marking process is repeated until all inspection points are marked, and the order of marking the inspection points is determined as the initial solution of the inspection path.
[0014] Optionally, the performing multiple rounds of optimization on the initial solution of the inspection path based on the brainstorming optimization algorithm and the operator pair consisting of a destruction operator and a repair operator to obtain the optimal solution of the inspection path includes:
[0015] When performing each round of optimization, the initial solution of the inspection path is optimized using a brainstorming optimization algorithm to obtain an optimized solution of the inspection path for that round of optimization;
[0016] Determining a target operator pair for this round of optimization from each group of initial operator pairs based on an operator pair weight configured for each group of initial operator pairs, wherein the initial operator pairs include a random insertion operator pair, a random exchange operator pair, and a worst deletion and greedy insertion operator pair;
[0017] The optimization solution of the inspection path for this round of optimization is optimized based on the target operator for this round of optimization to obtain the optimal solution of the inspection path for this round of optimization, and the optimization is stopped after the target round of optimization is completed.
[0018] Optionally, determining a target operator pair for the round of optimization from each group of initial operator pairs based on an operator pair weight configured for each group of initial operator pairs includes:
[0019] Normalizing the operator pair weights configured for each group of initial operator pairs, and assigning a weight interval to each group of initial operator pairs based on the normalization result;
[0020] A random number is randomly generated, and the initial operator pair corresponding to the weight interval in which the random number falls is determined as the target operator pair for this round of optimization.
[0021] Optionally, optimizing the optimization solution of the inspection path of this round of optimization based on the target operator of this round of optimization to obtain the optimal solution of the inspection path of this round of optimization includes:
[0022] Adjusting the inspection points in the optimized solution of the inspection path of this round of optimization according to the target operator of this round of optimization to obtain a candidate solution of the inspection path of this round of optimization;
[0023] Determine whether the path length of the candidate solution of the inspection path in this round of optimization is less than the path length of the initial solution of the inspection path, and determine whether the path length of the candidate solution of the inspection path in this round of optimization is less than the path length of the optimized solution of the inspection path in this round of optimization;
[0024] If the path length of the candidate solutions of the inspection path in this round of optimization is less than the path length of the initial solution of the inspection path, the initial solution of the inspection path is updated using the candidate solutions of the inspection path in this round of optimization; if the path length of the candidate solutions of the inspection path in this round of optimization is less than the path length of the optimized solution of the inspection path in this round of optimization, the optimized solution of the inspection path in this round of optimization is updated using the candidate solutions of the inspection path in this round of optimization to obtain the optimal solution of the inspection path in this round of optimization.
[0025] Optionally, adjusting the inspection points in the optimized solution of the inspection path for this round of optimization according to the target operator for this round of optimization to obtain the candidate solution of the inspection path for this round of optimization includes:
[0026] When the target operator pair for this round of optimization is a random insertion operator pair, n1 inspection points are randomly deleted from the optimized solution of the inspection path of this round of optimization, and then the randomly deleted n1 inspection points are randomly inserted back into the optimized solution from which the n1 inspection points are randomly deleted to obtain a candidate solution of the inspection path of this round of optimization;
[0027] When the target operator pair for this round of optimization is a random exchange operator pair, two inspection points are randomly selected from the optimized solution of the inspection path of this round of optimization, and then the positions of the two randomly selected inspection points are swapped to obtain a candidate solution of the inspection path of this round of optimization;
[0028] When the target operator pair for this round of optimization is the worst deletion and greedy insertion operator pair, the n2 inspection points with the largest unfitness values in the optimization solution of the inspection path of this round of optimization are deleted from the optimization solution of the inspection path of this round of optimization and then inserted into the target position to obtain the candidate solution of the inspection path of this round of optimization.
[0029] Optionally, the performing multiple rounds of optimization on the initial solution of the inspection path based on the brainstorming optimization algorithm and the operator pair consisting of a destruction operator and a repair operator to obtain the optimal solution of the inspection path includes:
[0030] After each round of optimization, determine whether the number of optimizations exceeds the update threshold;
[0031] If the number of optimizations exceeds the update threshold, updating the weights of the operator pairs configured for each group of initial operator pairs;
[0032] If the number of optimizations does not exceed the update threshold, the optimal solution of the inspection path optimized in this round is used to replace the worst solution of the inspection path optimized in this round based on the elite retention strategy, wherein the worst solution of the inspection path optimized in this round is obtained by optimizing the optimal solution of the inspection path optimized in this round based on the target operator of this round of optimization.
[0033] In a second aspect, an embodiment of the present application provides a path optimization device for a drone to inspect a suspended track, the device comprising:
[0034] The inspection point acquisition module is used to obtain the coordinate values of each inspection point that the drone needs to traverse when performing inspection tasks;
[0035] An initial solution determination module is used to determine the initial solution of the inspection path using a greedy algorithm based on the coordinate values of each inspection point and with the goal that the inspection path can traverse each inspection point and the inspection path is the shortest;
[0036] An optimal solution determination module, used to perform multiple rounds of optimization on the initial solution of the inspection path based on a brainstorming optimization algorithm and an operator pair consisting of a destruction operator and a repair operator to obtain an optimal solution of the inspection path;
[0037] The inspection path determination module is used to determine the optimal solution of the inspection path as the target inspection path when the UAV performs the inspection task.
[0038] Optionally, when the initial solution determination module is used to determine the initial solution of the inspection path using a greedy algorithm based on the coordinate values of each inspection point, with the goal that the inspection path can traverse each inspection point and the inspection path is the shortest, it is specifically used to:
[0039] Randomly select one of the inspection points as the starting point and mark it;
[0040] Calculate the distance between the starting point and other inspection points, and mark the inspection point closest to the starting point as the new starting point;
[0041] The above marking process is repeated until all inspection points are marked, and the order of marking the inspection points is determined as the initial solution of the inspection path.
[0042] Optionally, when the optimal solution determination module is used to perform multiple rounds of optimization on the initial solution of the inspection path based on the brainstorming optimization algorithm and the operator pair consisting of the destruction operator and the repair operator to obtain the optimal solution of the inspection path, it is specifically used to:
[0043] When performing each round of optimization, the initial solution of the inspection path is optimized using a brainstorming optimization algorithm to obtain an optimized solution of the inspection path for that round of optimization;
[0044] Determining a target operator pair for this round of optimization from each group of initial operator pairs based on an operator pair weight configured for each group of initial operator pairs, wherein the initial operator pairs include a random insertion operator pair, a random exchange operator pair, and a worst deletion and greedy insertion operator pair;
[0045] The optimization solution of the inspection path for this round of optimization is optimized based on the target operator for this round of optimization to obtain the optimal solution of the inspection path for this round of optimization, and the optimization is stopped after the target round of optimization is completed.
[0046] Optionally, determining a target operator pair for the round of optimization from each group of initial operator pairs based on an operator pair weight configured for each group of initial operator pairs includes:
[0047] Normalizing the operator pair weights configured for each group of initial operator pairs, and assigning a weight interval to each group of initial operator pairs based on the normalization result;
[0048] A random number is randomly generated, and the initial operator pair corresponding to the weight interval in which the random number falls is determined as the target operator pair for this round of optimization.
[0049] Optionally, optimizing the optimization solution of the inspection path of this round of optimization based on the target operator of this round of optimization to obtain the optimal solution of the inspection path of this round of optimization includes:
[0050] Adjusting the inspection points in the optimized solution of the inspection path of this round of optimization according to the target operator of this round of optimization to obtain a candidate solution of the inspection path of this round of optimization;
[0051] Determine whether the path length of the candidate solution of the inspection path in this round of optimization is less than the path length of the initial solution of the inspection path, and determine whether the path length of the candidate solution of the inspection path in this round of optimization is less than the path length of the optimized solution of the inspection path in this round of optimization;
[0052] If the path length of the candidate solutions of the inspection path in this round of optimization is less than the path length of the initial solution of the inspection path, the initial solution of the inspection path is updated using the candidate solutions of the inspection path in this round of optimization; if the path length of the candidate solutions of the inspection path in this round of optimization is less than the path length of the optimized solution of the inspection path in this round of optimization, the optimized solution of the inspection path in this round of optimization is updated using the candidate solutions of the inspection path in this round of optimization to obtain the optimal solution of the inspection path in this round of optimization.
[0053] Optionally, adjusting the inspection points in the optimized solution of the inspection path for this round of optimization according to the target operator for this round of optimization to obtain the candidate solution of the inspection path for this round of optimization includes:
[0054] When the target operator pair for this round of optimization is a random insertion operator pair, n1 inspection points are randomly deleted from the optimized solution of the inspection path of this round of optimization, and then the randomly deleted n1 inspection points are randomly inserted back into the optimized solution from which the n1 inspection points are randomly deleted to obtain a candidate solution of the inspection path of this round of optimization;
[0055] When the target operator pair for this round of optimization is a random exchange operator pair, two inspection points are randomly selected from the optimized solution of the inspection path of this round of optimization, and then the positions of the two randomly selected inspection points are swapped to obtain a candidate solution of the inspection path of this round of optimization;
[0056] When the target operator pair for this round of optimization is the worst deletion and greedy insertion operator pair, the n2 inspection points with the largest unfitness values in the optimization solution of the inspection path of this round of optimization are deleted from the optimization solution of the inspection path of this round of optimization and then inserted into the target position to obtain the candidate solution of the inspection path of this round of optimization.
[0057] Optionally, the performing multiple rounds of optimization on the initial solution of the inspection path based on the brainstorming optimization algorithm and the operator pair consisting of a destruction operator and a repair operator to obtain the optimal solution of the inspection path includes:
[0058] After each round of optimization, determine whether the number of optimizations exceeds the update threshold;
[0059] If the number of optimizations exceeds the update threshold, updating the weights of the operator pairs configured for each group of initial operator pairs;
[0060] If the number of optimizations does not exceed the update threshold, the optimal solution of the inspection path optimized in this round is used to replace the worst solution of the inspection path optimized in this round based on the elite retention strategy, wherein the worst solution of the inspection path optimized in this round is obtained by optimizing the optimal solution of the inspection path optimized in this round based on the target operator of this round of optimization.
[0061] In the third aspect, an embodiment of the present application provides a computer device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the path optimization method for drone inspection of suspended rails described in any optional implementation manner of the first aspect are performed.
[0062] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the path optimization method for drone inspection of suspended rails described in any optional implementation manner in the first aspect above are executed.
[0063] The technical solution provided by this application includes but is not limited to the following beneficial effects:
[0064] After obtaining the coordinate values of each inspection point that the drone needs to traverse when performing an inspection task, the present application uses a greedy algorithm to determine the initial solution of the inspection path based on the coordinate values of each inspection point, with the goal of the inspection path being able to traverse each inspection point and the inspection path being the shortest. The inspection path for the drone can be planned with the goal of the drone flying the shortest distance and traversing each inspection point, thereby preliminarily reducing the flight path length and flight time of the drone when performing an inspection task and improving the rationality of the planned path.
[0065] Then, based on the brainstorming optimization algorithm and the operator pairs composed of the destruction operator and the repair operator, the initial solution of the inspection path is optimized for multiple rounds to obtain the optimal solution of the inspection path. The inspection path can be further optimized to further reduce the flight path length and flight time when the UAV performs inspection tasks, and further improve the rationality of the planned path.
[0066] Finally, the optimal solution of the inspection path is determined as the target inspection path when the UAV performs the inspection task. The target inspection path with the shortest flight distance, the least time and flight resources consumed, and the highest inspection efficiency can be obtained when the UAV performs the inspection task, thereby improving the rationality of the determined inspection path, avoiding the waste of inspection time and resources required for flight such as electricity and fuel when the UAV performs the inspection task based on the inspection path, and at the same time improving the efficiency of the UAV when performing the inspection task.
[0067] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0069] Figure 1A flow chart of a method for optimizing a path for inspecting a suspended track by a drone provided in the first embodiment of the present invention is shown;
[0070] Figure 2 A flow chart of a method for determining an initial solution of an inspection path provided by a first embodiment of the present invention is shown;
[0071] Figure 3 A flow chart of a method for determining an optimal solution for an inspection path provided by a first embodiment of the present invention is shown;
[0072] Figure 4 A flow chart of a method for determining a target operator pair provided in Embodiment 1 of the present invention is shown;
[0073] Figure 5 A flowchart of a specific method for determining an optimal solution for an inspection path provided by the first embodiment of the present invention is shown;
[0074] Figure 6 A flowchart of a method for updating operator weights provided in Embodiment 1 of the present invention is shown;
[0075] Figure 7 A schematic structural diagram of a path optimization device for a drone inspecting a suspended track provided in a second embodiment of the present invention is shown;
[0076] Figure 8 A schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention is shown. DETAILED DESCRIPTION
[0077] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.
[0078] Embodiment 1
[0079] To facilitate understanding of this application, Figure 1 The flowchart of a method for optimizing a path for inspecting a suspended track by an unmanned aerial vehicle provided in the first embodiment of the present invention is described to provide a detailed description of the first embodiment of the present application.
[0080] See also Figure 1 As shown, Figure 1 A flow chart of a method for optimizing a path of a suspended track inspected by a drone provided in the first embodiment of the present invention is shown, wherein the method comprises steps S101 to S104:
[0081] S101: Obtain the coordinate values of each inspection point that the drone needs to traverse when performing an inspection task.
[0082] Specifically, the inspection points that the drone needs to traverse when performing the inspection mission are pre-set, and the latitude and longitude coordinates of each inspection point are obtained through the satellite map.
[0083] S102: Based on the coordinate values of each inspection point, an initial solution of the inspection path is determined using a greedy algorithm with the goal that the inspection path can traverse each inspection point and the inspection path is the shortest.
[0084] Specifically, when determining the inspection path of the drone, the goal is that the drone needs to pass through n inspection points that it needs to reach when performing its inspection mission. Each inspection point can only be passed once, and finally the drone returns to the starting point, and the distance flown by the drone is the shortest, that is, the inspection path is the shortest.
[0085] The path model of the inspection path can be expressed as:
[0086]
[0087]
[0088]
[0089]
[0090] x ij ∈{0,1},i,j=1,2,…,n,i≠j (5)
[0091] Among them, formula (1) represents the objective function, where D is the shortest distance to be sought, d ij represents the distance between point i and point j, d ij >0,d ii =0; Formula (2) and Formula (3) indicate that any inspection point in the graph can only have one path in and out; Formula (4) indicates that there is no sub-loop in the generated path, where {1,2,…,n} represents the set of inspection points, S is a proper subset of {1,2,…,n}, and |S| represents the number of inspection points contained in the set S; Formula (5) represents the variable x ij The value range of x is: if (i,j) is on the required route, then x ij =1, otherwise x ij =0.
[0092] S103: performing multiple rounds of optimization on the initial solution of the inspection path based on a brainstorming optimization algorithm and an operator pair consisting of a destruction operator and a repair operator to obtain an optimal solution of the inspection path.
[0093] Specifically, in each round of optimization, the initial solution of the inspection path is optimized by using the brainstorming optimization algorithm and the operator pair composed of the destruction operator and the repair operator in turn. After the optimization of the target round is completed, the optimization result is used as the optimal solution of the inspection path. That is, if the optimization of the target round is not completed, the path optimization in step S103 is repeated until the number of optimization iterations is greater than or equal to the maximum number of iterations (corresponding to the completion of the optimization of the target round), and the optimal solution at this time is output, which is the optimal inspection path of the drone.
[0094] This application defines the parameters of the brainstorming optimization algorithm used and the operator pair consisting of the destruction operator and the repair operator. The various parameter settings are shown in the following table:
[0095] Parameter name size Parameter name size Parameter name size p_one 0.6 <![CDATA[S1]]> 10 ω1 1 / 3 p_two 0.4 <![CDATA[S2]]> 5 ω2 1 / 3 p_one_center 0.45 <![CDATA[S3]]> 3 ω3 1 / 3 p_two_center 0.5 ρ 0.5 c 0.97 p_replace 0.18 GEN 1000 N 50
[0096] Among them, p_one represents the probability of selecting a cluster; p_two represents the probability of selecting two clusters; p_one_center represents the probability of selecting the cluster center of a cluster; p_two_center represents the probability of selecting the cluster centers of two clusters; p_replace represents the probability of replacing a cluster center; S1 represents that when the initial solution is destroyed and repaired by the operator pair, the new solution generated is less than the optimal solution, S1 points are added to the operator pair; S2 represents that when the initial solution is destroyed and repaired by the operator pair, the new solution generated is greater than the optimal solution but less than the initial solution, S2 points are added to the operator pair; S3 represents that when the initial solution is destroyed and repaired by the operator pair, the new solution generated is greater than the initial solution, S3 points are added to the operator pair; ρ represents the weight update coefficient; GEN represents the maximum number of iterations of the algorithm; ω1, ω2, ω3 represent the probabilities of selecting the three operators to destroy and repair the solutions respectively when the algorithm starts running; c is a constant greater than 0 and less than 1; N represents the number of populations.
[0097] S104: Determine the optimal solution of the inspection path as the target inspection path when the UAV performs the inspection task.
[0098] Specifically, the optimal solution of the inspection path is used as the target inspection path when the drone performs the inspection task, and the target inspection path is the inspection path that enables the drone to traverse each inspection point with the shortest traversal path. The drone performs this inspection task based on the target inspection path.
[0099] In an alternative embodiment, see Figure 2 As shown, Figure 2 A flowchart of a method for determining an initial solution of an inspection path provided by a first embodiment of the present invention is shown, wherein the method is based on the coordinate values of each inspection point, with the goal that the inspection path can traverse each inspection point and the inspection path is the shortest, and the initial solution of the inspection path is determined by using a greedy algorithm, including steps S201 to S203:
[0100] S201: Randomly select one of the inspection points as the starting point and mark it.
[0101] S202: Calculate the distance between the starting point and other inspection points, and mark the inspection point closest to the starting point as a new starting point.
[0102] S203: Repeat the above marking process until all inspection points are marked, and determine the order of marking the inspection points as the initial solution of the inspection path.
[0103] Specifically, first randomly select a checkpoint as the starting point, traverse all the next checkpoints that can be reached under the current checkpoint, select the closest checkpoint as the next checkpoint, then mark the current checkpoint as having been passed, and use the next checkpoint as the current checkpoint. Repeat the above traversal and marking process until all checkpoints are marked as having been passed, end the above process, and determine the order of marking each checkpoint as the initial solution of the inspection path.
[0104] In an alternative embodiment, see Figure 3 As shown, Figure 3 A flowchart of a method for determining an optimal solution of an inspection path provided in Embodiment 1 of the present invention is shown, wherein the initial solution of the inspection path is optimized for multiple rounds based on the brainstorming optimization algorithm and the operator pair consisting of a destruction operator and a repair operator to obtain the optimal solution of the inspection path, including steps S301 to S303:
[0105] S301: When performing each round of optimization, the initial solution of the inspection path is optimized using a brainstorming optimization algorithm to obtain an optimized solution of the inspection path for that round of optimization.
[0106] Specifically, this application improves the k-means clustering algorithm in the brainstorming optimization algorithm, solves the problem that the clustering results of the k-means clustering algorithm are heavily dependent on the initial position of the cluster center, and can better handle large-scale data sets and has good scalability. The main steps of k-means++ clustering are as follows:
[0107] Step 1: randomly select a sample point from the data set as the cluster center point; Step 2: calculate the distance between the currently selected cluster center and other sample points, and take the point with the largest distance to the sample point as the next cluster center point; Step 3: repeat step 2 until k cluster centers are selected; Step 4: the remaining steps are the same as the k-means clustering algorithm.
[0108] It should be noted that the main steps of k-means clustering are as follows:
[0109] Step 1, first randomly select k points in the sample as cluster centers; Step 2, calculate the distances of other samples in the sample from these k cluster centers, and use these samples as the categories of the cluster center closest to them; Step 3, average the samples classified above in each category to solve the new cluster centroid; Step 4, compare with the k cluster centroids calculated last time, if the cluster centroid changes, go to step 1, otherwise go to step 5; Step 5, when the centroid does not change (when a centroid is found, the samples assigned to this centroid in each iteration are consistent, that is, each newly generated cluster is consistent, all sample points will no longer be transferred from one cluster to another, and the centroid will not change), stop and output the clustering result.
[0110] By improving the k-means clustering algorithm in the brainstorming optimization algorithm, the problem that the clustering results are heavily dependent on the initial position of the cluster center is avoided, and it can better handle large-scale data sets with good scalability, thereby improving the accuracy and reliability of the optimization solution of the inspection path obtained using the brainstorming optimization algorithm.
[0111] S302: Determine a target operator pair for this round of optimization from each group of initial operator pairs based on an operator pair weight configured for each group of initial operator pairs, wherein the initial operator pairs include a random insertion operator pair, a random exchange operator pair, and a worst deletion and greedy insertion operator pair.
[0112] Specifically, the present application utilizes an adaptive large neighborhood search algorithm to destroy and repair the path indicated by the optimization solution of the inspection path based on operators composed of a destruction operator and a repair operator, thereby performing a heuristic search. First, a weight is assigned to each destruction operator and repair operator method, and the weight is used to control the frequency of each destruction operator and repair operator used in path optimization. During the path optimization process, the adaptive large neighborhood search algorithm dynamically adjusts the weights of each destruction operator and repair operator to obtain a better neighborhood and solution. The destruction operator and the repair operator appear in pairs, and a pair of operators is a neighborhood structure.
[0113] S303: Optimizing the optimization solution of the inspection path for this round of optimization based on the target operator for this round of optimization to obtain the optimal solution of the inspection path for this round of optimization, and stopping the optimization after completing the target round of optimization.
[0114] Specifically, based on the target operator of this round of optimization, the optimization solution of the inspection path of this round of optimization is optimized to obtain the optimal solution of the inspection path of this round of optimization. Completing steps S301 to S303 once is considered to complete a round of path optimization. After completing the target round of optimization, the optimization is stopped and the output solution is used as the optimal solution of the inspection path.
[0115] In an alternative embodiment, see Figure 4 As shown, Figure 4 A flow chart of a method for determining a target operator pair provided in Embodiment 1 of the present invention is shown, wherein the method of determining the target operator pair for the round of optimization from each group of initial operator pairs based on the operator pair weights configured for each group of initial operator pairs comprises steps S401 to S402:
[0116] S401: normalizing the operator pair weights configured for each group of initial operator pairs, and assigning a weight interval to each group of initial operator pairs based on the normalization result.
[0117] S402: randomly generate a random number, and determine the initial operator pair corresponding to the weight interval in which the random number falls as the target operator pair for this round of optimization.
[0118] Specifically, a weight is assigned to each initial operator pair. The total weight sum is first calculated, and then the weight of each operator pair is normalized. The weight intervals for each initial operator pair are composed of 0, the normalized result of each operator pair, and 1. Then a random value is generated. The value of this random value is [0,1]. The operator pair is selected if the random value falls within the weight interval of the operator pair.
[0119] For example, the random insertion operator pair is assigned a weight of ω1, the random exchange operator pair is assigned a weight of ω2, and the worst deletion and greedy insertion operator pair is assigned a weight of ω3. After normalizing ω1, we get ω 11 , after normalizing ω2, we get ω 22 , after normalizing ω3, we get ω 33 ,ω 11 ,ω 22 and ω 33 are all in the interval [0,1], and ω 11 +ω 22 +ω 33 =1, when the size of the generated random value is in the interval [0, ω 11), select the random insertion operator for optimization; when the size of the generated random value is in the interval [ω 11 ,ω 11 +ω 22 ], select the random exchange operator pair for optimization; when the size of the generated random value is in the interval (ω 11 +ω 22 ,1], the worst deletion and greedy insertion operator pair are selected for optimization.
[0120] Based on the above weights, the probability p of the operator selecting x can be calculated x , where the operator's selection probability for x is p x Score s by operator pair x 、Number of times used t x , weight ω x and weight update coefficient ρ x It was jointly decided that every 100 iterations of the algorithm, the weight of each group of operator pairs would be updated, and the score and usage count of the operator pairs would be initialized.
[0121] The weight ω of the operator on x x The update method is as follows:
[0122]
[0123] ω is the weight of the operator pair x before updating, and the probability p of the operator pair x being selected x The calculation method of is as follows:
[0124]
[0125] Among them, ω i represents the operator pair weight of the i-th operator pair, when i=1, ω i Represents the weight of the operator pair randomly inserted into the operator pair. When i = 2, ω i Represents the operator pair weight of the random exchange operator pair, when i = 3 ω i Represents the operator pair weight of the worst delete and greedy insert operator pair.
[0126] In an alternative embodiment, see Figure 5 As shown, Figure 5 A flowchart of a specific method for determining the optimal solution of an inspection path provided in the first embodiment of the present invention is shown, wherein the optimization solution of the inspection path of the round of optimization is optimized based on the target operator of the round of optimization to obtain the optimal solution of the inspection path of the round of optimization, including steps S501 to S503:
[0127] S501: adjusting the inspection points in the optimized solution of the inspection path for this round of optimization according to the target operator for this round of optimization to obtain a candidate solution of the inspection path for this round of optimization.
[0128] Specifically, based on the different effects of different operator pairs, the inspection point adjustment strategies corresponding to different operator pairs are different. For each round of optimization, the positions and order of the inspection points in the optimized solution of the inspection path of this round of optimization are adjusted according to the inspection point adjustment strategy corresponding to the target operator selected for this round of optimization to obtain the candidate solution of the inspection path of this round of optimization.
[0129] S502: Determine whether the path length of the candidate solution of the inspection path optimized in this round is less than the path length of the initial solution of the inspection path, and determine whether the path length of the candidate solution of the inspection path optimized in this round is less than the path length of the optimized solution of the inspection path optimized in this round.
[0130] Specifically, based on the comparison results of the path lengths of the candidate solutions of the optimized inspection path, the initial solution of the inspection path before optimization, and the optimized solution of the optimized inspection path, it can be determined whether this optimization has the optimization effect of shortening the inspection path relative to the initial solution, or the optimization effect of shortening the inspection path relative to the optimized solution.
[0131] S503: If the path length of the candidate solutions of the inspection path optimized in this round is less than the path length of the initial solution of the inspection path, the initial solution of the inspection path is updated using the candidate solutions of the inspection path optimized in this round; if the path length of the candidate solutions of the inspection path optimized in this round is less than the path length of the optimized solution of the inspection path optimized in this round, the optimized solution of the inspection path optimized in this round is updated using the candidate solutions of the inspection path optimized in this round, so as to obtain the optimal solution of the inspection path optimized in this round.
[0132] Specifically, if the path length of the candidate solution of the inspection path optimized in this round is less than the path length of the initial solution of the inspection path, it means that this optimization has an optimization effect of shortening the inspection path for the initial solution, and the candidate solution of the inspection path optimized in this round is used to update the initial solution. If the path length of the candidate solution of the inspection path optimized in this round is less than the path length of the optimized solution of the inspection path, it means that this optimization has an optimization effect of shortening the inspection path for the optimized solution, and the candidate solution of the inspection path optimized in this round is used to update the optimized solution.
[0133] In an optional implementation, the step of adjusting the inspection points in the optimized solution of the inspection path for the round of optimization according to the target operator for the round of optimization to obtain the candidate solution of the inspection path for the round of optimization includes:
[0134] When the target operator pair for this round of optimization is a randomly inserted operator pair, n1 inspection points are randomly deleted from the optimized solution of the inspection path of this round of optimization, and then the randomly deleted n1 inspection points are randomly inserted back into the optimized solution from which the n1 inspection points were randomly deleted to obtain a candidate solution for the inspection path of this round of optimization.
[0135] Specifically, if the random insertion operator pair is selected, n1 inspection points are randomly deleted from the optimized solution of the inspection path in this round of optimization, and then randomly inserted back into the deleted path solution to generate a new path solution. For example, inspection point 6 in the optimized solution (sequence 12345678) is deleted to obtain path solution 1234578, and then inspection point 6 is inserted between inspection points 3 and 4 to obtain a new path solution, namely, a candidate solution (sequence 12364578).
[0136] When the target operator pair for this round of optimization is a random exchange operator pair, two inspection points are randomly selected from the optimized solution of the inspection path for this round of optimization, and then the positions of the two randomly selected inspection points are swapped to obtain a candidate solution for the inspection path for this round of optimization.
[0137] Specifically, if a random exchange operator pair is selected, two inspection points are randomly selected in the optimized solution of the inspection path of this round of optimization, and the order of the two is flipped. For example, the points between inspection points 3 and 6 in the optimized solution (the order is 12345678) are flipped and the order is changed to obtain a new path solution, that is, a candidate solution (the order is 12654378).
[0138] When the target operator pair for this round of optimization is the worst deletion and greedy insertion operator pair, the n2 inspection points with the largest unfitness values in the optimization solution of the inspection path of this round of optimization are deleted from the optimization solution of the inspection path of this round of optimization and then inserted into the target position to obtain the candidate solution of the inspection path of this round of optimization.
[0139] Specifically, if the worst deletion and greedy insertion operator pair is selected, the n2 inspection points with the largest unfitness values are deleted from the optimization solution of the inspection path of this round of optimization. The specific operation of deleting the n2 inspection points with the largest unfitness values based on the worst deletion operator is as follows:
[0140] Step 1: Calculate the unfitness of each inspection point in the optimization solution of the inspection path of this round of optimization value; Step 2, each inspection point is divided into Sort in descending order; Step 3, remove the unfitness from the initial solution The largest inspection point is removed and put into the set of nodes to be inserted ζ; Step 4, repeat the above steps until the number of inspection points removed meets the requirement.
[0141] The calculation method of the unfitness value is shown in the following expression:
[0142]
[0143] in, represents the fitness value of the solution before the inspection point is removed, Indicates the fitness value of the solution after removing the inspection points.
[0144] The principle of greedy insertion is to insert the inspection points in the set to be inserted into the position with the lowest insertion cost in the current partial solution to generate a new path solution. That is, after all the deleted inspection points are inserted back, a new path solution, namely the candidate solution, is obtained.
[0145] The insertion cost is if the current path solution after destruction is X * , then insert a patrol point in ζ back to X * After a certain insertion position in the solution, the distance corresponding to the path where the inspection point is inserted back is subtracted from X * The maximum value of the distances of each inspection path is the insertion cost of inserting the inspection point into the location. The calculation expression of the insertion cost is as follows.
[0146] C m =D m -D -m ;
[0147] Among them, C m represents the insertion cost of inspection point m, D m represents the distance of the path solution after inserting the inspection point m, D -m Represents the distance of the path solution when the inspection point m is not inserted.
[0148] After adjusting the inspection points in the optimized solution of the inspection path for this round of optimization according to the target operator pair for this round of optimization to obtain the candidate solution of the inspection path for this round of optimization, determine whether the candidate solution of the inspection path for this round of optimization is less than the optimized solution of the inspection path for this round of optimization. If less than, add S1 points to the target operator pair for this round of optimization; if greater than the optimized solution but less than the initial solution, add S2 points to the target operator pair; if greater than the initial solution but accepted by the Metropolis criterion, add S3 points to the target operator pair; if not accepted by the Metropolis criterion, no points are added, and S1>S2>S3, the Metropolis acceptance criterion P is as shown in the following expression:
[0149]
[0150] Among them, f(X) represents the candidate solution, f(X *) represents the initial solution, T represents the current temperature. As can be seen from the above formula, when the candidate solution is smaller than the initial solution, it is 100% accepted, and when the candidate solution is larger than the initial solution, it is accepted with probability. At the beginning of the algorithm, the temperature T is given an initial value T start With each iteration of the algorithm, the temperature T will be multiplied by a constant c greater than 0 and less than 1, so T = cT start The updating method makes the temperature T decrease continuously, and the acceptable probability of poor quality solutions decreases continuously, thus ensuring the convergence of the solution. start The setting method is shown in the following expression:
[0151]
[0152] Among them, θ represents the difference between the candidate solution and the initial solution, and f(X0) represents the objective function value of the initial solution.
[0153] In an alternative embodiment, see Figure 6 As shown, Figure 6 A flowchart of an operator pair weight updating method provided in Embodiment 1 of the present invention is shown, wherein the initial solution of the inspection path is optimized multiple times based on the brainstorming optimization algorithm and the operator pair composed of the destruction operator and the repair operator to obtain the optimal solution of the inspection path, including steps S601 to S603:
[0154] S601: After each round of optimization, determine whether the number of optimizations exceeds an update threshold.
[0155] Specifically, each time an operator pair is used to destroy and repair the optimized solution, the number of uses of the target operator pair is increased by one, and the number of algorithm iterations is increased by one. It is determined whether it is necessary to update the operator pair weights and initialize the operator pair scores and usage times (the algorithm updates the weights and initializes the operator pair scores and usage times every 100 iterations).
[0156] S602: If the number of optimizations exceeds the update threshold, the weights of the operator pairs configured for each group of initial operator pairs are updated.
[0157] Specifically, if the conditions are met, the weight is updated and the operator pair score and the number of times used are initialized. For the specific weight update method, please refer to the weight update expression disclosed in the above step S402.
[0158] S603: If the number of optimizations does not exceed the update threshold, the optimal solution of the inspection path optimized in this round is used to replace the worst solution of the inspection path optimized in this round based on the elite retention strategy, wherein the worst solution of the inspection path optimized in this round is obtained by optimizing the optimal solution of the inspection path optimized in this round based on the target operator of this round of optimization.
[0159] Specifically, if the weight update condition is not met, the elite retention strategy is introduced, that is, the optimal solution generated by each iteration of the algorithm replaces the worst solution among multiple path solutions obtained by optimizing the optimization solution using the target operator. The introduction of the elite retention strategy can improve the search speed of the algorithm, allowing the algorithm to converge to the global optimal solution in fewer iterations, and the algorithm has faster global convergence.
[0160] Embodiment 2
[0161] See also Figure 7 As shown, Figure 7 A schematic diagram of the structure of a path optimization device for a drone inspecting a suspended track provided in a second embodiment of the present invention is shown, wherein the device comprises:
[0162] Inspection point acquisition module 701, used to obtain the coordinate values of each inspection point that the drone needs to traverse when performing an inspection task;
[0163] An initial solution determination module 702 is used to determine the initial solution of the inspection path using a greedy algorithm based on the coordinate values of each inspection point and with the goal that the inspection path can traverse each inspection point and the inspection path is the shortest;
[0164] The optimal solution determination module 703 is used to perform multiple rounds of optimization on the initial solution of the inspection path based on the brainstorming optimization algorithm and the operator pair consisting of the destruction operator and the repair operator to obtain the optimal solution of the inspection path;
[0165] The inspection path determination module 704 is used to determine the optimal solution of the inspection path as the target inspection path when the UAV performs the inspection task.
[0166] In an optional implementation, the initial solution determination module is used to determine the initial solution of the inspection path using a greedy algorithm based on the coordinate values of each inspection point, with the goal that the inspection path can traverse each inspection point and the inspection path is the shortest, and is specifically used to:
[0167] Randomly select one of the inspection points as the starting point and mark it;
[0168] Calculate the distance between the starting point and other inspection points, and mark the inspection point closest to the starting point as the new starting point;
[0169] The above marking process is repeated until all inspection points are marked, and the order of marking the inspection points is determined as the initial solution of the inspection path.
[0170] In an optional implementation, the optimal solution determination module, when used to perform multiple rounds of optimization on the initial solution of the inspection path based on the brainstorming optimization algorithm and the operator pair consisting of the destruction operator and the repair operator to obtain the optimal solution of the inspection path, is specifically used to:
[0171] When performing each round of optimization, the initial solution of the inspection path is optimized using a brainstorming optimization algorithm to obtain an optimized solution of the inspection path for that round of optimization;
[0172] Determining a target operator pair for this round of optimization from each group of initial operator pairs based on an operator pair weight configured for each group of initial operator pairs, wherein the initial operator pairs include a random insertion operator pair, a random exchange operator pair, and a worst deletion and greedy insertion operator pair;
[0173] The optimization solution of the inspection path for this round of optimization is optimized based on the target operator for this round of optimization to obtain the optimal solution of the inspection path for this round of optimization, and the optimization is stopped after the target round of optimization is completed.
[0174] In an optional embodiment, determining the target operator pair for the round of optimization from each group of initial operator pairs based on the operator pair weights configured for each group of initial operator pairs includes:
[0175] Normalizing the operator pair weights configured for each group of initial operator pairs, and assigning a weight interval to each group of initial operator pairs based on the normalization result;
[0176] A random number is randomly generated, and the initial operator pair corresponding to the weight interval in which the random number falls is determined as the target operator pair for this round of optimization.
[0177] In an optional embodiment, the optimizing solution of the inspection path of the round optimization based on the target operator of the round optimization to obtain the optimal solution of the inspection path of the round optimization includes:
[0178] Adjusting the inspection points in the optimized solution of the inspection path of this round of optimization according to the target operator of this round of optimization to obtain a candidate solution of the inspection path of this round of optimization;
[0179] Determine whether the path length of the candidate solution of the inspection path in this round of optimization is less than the path length of the initial solution of the inspection path, and determine whether the path length of the candidate solution of the inspection path in this round of optimization is less than the path length of the optimized solution of the inspection path in this round of optimization;
[0180] If the path length of the candidate solutions of the inspection path in this round of optimization is less than the path length of the initial solution of the inspection path, the initial solution of the inspection path is updated using the candidate solutions of the inspection path in this round of optimization; if the path length of the candidate solutions of the inspection path in this round of optimization is less than the path length of the optimized solution of the inspection path in this round of optimization, the optimized solution of the inspection path in this round of optimization is updated using the candidate solutions of the inspection path in this round of optimization to obtain the optimal solution of the inspection path in this round of optimization.
[0181] In an optional implementation, the step of adjusting the inspection points in the optimized solution of the inspection path for the round of optimization according to the target operator for the round of optimization to obtain the candidate solution of the inspection path for the round of optimization includes:
[0182] When the target operator pair for this round of optimization is a random insertion operator pair, n1 inspection points are randomly deleted from the optimized solution of the inspection path of this round of optimization, and then the randomly deleted n1 inspection points are randomly inserted back into the optimized solution from which the n1 inspection points are randomly deleted to obtain a candidate solution of the inspection path of this round of optimization;
[0183] When the target operator pair for this round of optimization is a random exchange operator pair, two inspection points are randomly selected from the optimized solution of the inspection path of this round of optimization, and then the positions of the two randomly selected inspection points are swapped to obtain a candidate solution of the inspection path of this round of optimization;
[0184] When the target operator pair for this round of optimization is the worst deletion and greedy insertion operator pair, the n2 inspection points with the largest unfitness values in the optimization solution of the inspection path of this round of optimization are deleted from the optimization solution of the inspection path of this round of optimization and then inserted into the target position to obtain the candidate solution of the inspection path of this round of optimization.
[0185] In an optional implementation, the brainstorming optimization algorithm and the operator pair consisting of a destruction operator and a repair operator are used to perform multiple rounds of optimization on the initial solution of the inspection path to obtain the optimal solution of the inspection path, including:
[0186] After each round of optimization, determine whether the number of optimizations exceeds the update threshold;
[0187] If the number of optimizations exceeds the update threshold, updating the weights of the operator pairs configured for each group of initial operator pairs;
[0188] If the number of optimizations does not exceed the update threshold, the optimal solution of the inspection path optimized in this round is used to replace the worst solution of the inspection path optimized in this round based on the elite retention strategy, wherein the worst solution of the inspection path optimized in this round is obtained by optimizing the optimal solution of the inspection path optimized in this round based on the target operator of this round of optimization.
[0189] Embodiment 3
[0190] Based on the same application concept, see Figure 8 As shown, Figure 8 FIG. 4 shows a schematic diagram of the structure of a computer device provided by Embodiment 3 of the present invention, wherein: Figure 8 As shown, a computer device 800 provided in Embodiment 3 of the present application includes:
[0191] A processor 801, a memory 802 and a bus 803, wherein the memory 802 stores machine-readable instructions executable by the processor 801. When the computer device 800 is running, the processor 801 communicates with the memory 802 via the bus 803. When the processor 801 is running, the machine-readable instructions execute the steps of the path optimization method for drone inspection of suspended rails shown in the above-mentioned embodiment 1.
[0192] Embodiment 4
[0193] Based on the same application concept, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the path optimization method for drone inspection of suspended rails described in any of the above embodiments are executed.
[0194] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0195] The computer program product for optimizing the path of a suspended rail for drone inspection provided in an embodiment of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment, which will not be repeated here.
[0196] The path optimization device for the drone inspection suspended track provided in the embodiment of the present invention can be specific hardware on the device or software or firmware installed on the device. The implementation principle and technical effects of the device provided in the embodiment of the present invention are the same as those of the aforementioned method embodiment. For the sake of brief description, the parts not mentioned in the device embodiment can refer to the corresponding contents in the aforementioned method embodiment. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can all refer to the corresponding processes in the aforementioned method embodiment, and will not be repeated here.
[0197] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0198] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0199] In addition, each functional unit in the embodiment provided by the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0200] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0201] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0202] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can still modify the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or perform equivalent replacements on some of the technical features thereof; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. They should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A path optimization method for UAV inspection of suspended tracks. It is characterized in that The method comprises: Get the coordinates of each inspection point that the drone needs to traverse when performing inspection tasks; Based on the coordinate values of each inspection point, the initial solution of the inspection path is determined by using a greedy algorithm with the goal that the inspection path can traverse each inspection point and the inspection path is the shortest; Based on the brainstorming optimization algorithm and the operator pairs composed of the destruction operator and the repair operator, multiple rounds of optimization are performed on the initial solution of the inspection path to obtain the optimal solution of the inspection path; The optimal solution of the inspection path is determined as the target inspection path when the UAV performs the inspection task.
2. The method according to claim 1, It is characterized in that The method of determining the initial solution of the inspection path by using a greedy algorithm based on the coordinate values of each inspection point and with the goal that the inspection path can traverse each inspection point and the inspection path is the shortest includes: Randomly select one of the inspection points as the starting point and mark it; Calculate the distance between the starting point and other inspection points, and mark the inspection point closest to the starting point as the new starting point; The above marking process is repeated until all inspection points are marked, and the order of marking the inspection points is determined as the initial solution of the inspection path.
3. The method according to claim 1, It is characterized in that The brainstorming optimization algorithm and the operator pair composed of the destruction operator and the repair operator are used to perform multiple rounds of optimization on the initial solution of the inspection path to obtain the optimal solution of the inspection path, including: When performing each round of optimization, the initial solution of the inspection path is optimized using a brainstorming optimization algorithm to obtain an optimized solution of the inspection path for that round of optimization; Determining a target operator pair for this round of optimization from each group of initial operator pairs based on an operator pair weight configured for each group of initial operator pairs, wherein the initial operator pairs include a random insertion operator pair, a random exchange operator pair, and a worst deletion and greedy insertion operator pair; The optimization solution of the inspection path for this round of optimization is optimized based on the target operator for this round of optimization to obtain the optimal solution of the inspection path for this round of optimization, and the optimization is stopped after the target round of optimization is completed.
4. The method according to claim 3, It is characterized in that Determining the target operator pair for the round of optimization from each group of initial operator pairs based on the operator pair weights configured for each group of initial operator pairs includes: Normalizing the operator pair weights configured for each group of initial operator pairs, and assigning a weight interval to each group of initial operator pairs based on the normalization result; A random number is randomly generated, and the initial operator pair corresponding to the weight interval in which the random number falls is determined as the target operator pair for this round of optimization.
5. The method according to claim 3, It is characterized in that The optimizing solution of the inspection path of the round optimization based on the target operator of the round optimization is optimized to obtain the optimal solution of the inspection path of the round optimization, including: Adjusting the inspection points in the optimized solution of the inspection path of this round of optimization according to the target operator of this round of optimization to obtain a candidate solution of the inspection path of this round of optimization; Determine whether the path length of the candidate solution of the inspection path in this round of optimization is less than the path length of the initial solution of the inspection path, and determine whether the path length of the candidate solution of the inspection path in this round of optimization is less than the path length of the optimized solution of the inspection path in this round of optimization; If the path length of the candidate solutions of the inspection path in this round of optimization is less than the path length of the initial solution of the inspection path, the initial solution of the inspection path is updated using the candidate solutions of the inspection path in this round of optimization; if the path length of the candidate solutions of the inspection path in this round of optimization is less than the path length of the optimized solution of the inspection path in this round of optimization, the optimized solution of the inspection path in this round of optimization is updated using the candidate solutions of the inspection path in this round of optimization to obtain the optimal solution of the inspection path in this round of optimization.
6. The method according to claim 5, It is characterized in that The step of adjusting the inspection points in the optimized solution of the inspection path of the round of optimization according to the target operator of the round of optimization to obtain the candidate solution of the inspection path of the round of optimization includes: When the target operator pair for this round of optimization is a randomly inserted operator pair, n are randomly deleted from the optimized solution of the inspection path of this round of optimization. 1 inspection points, and then randomly delete n 1 Inspection points are randomly inserted back and n inspection points are randomly deleted. 1 Obtaining a candidate solution of the inspection path for this round of optimization from the optimization solutions of the inspection points; When the target operator pair for this round of optimization is a random exchange operator pair, two inspection points are randomly selected from the optimized solution of the inspection path of this round of optimization, and then the positions of the two randomly selected inspection points are swapped to obtain a candidate solution of the inspection path of this round of optimization; When the target operator pair for this round of optimization is the worst deletion and greedy insertion operator pair, the n operators with the largest unfitness value in the optimization solution of the inspection path for this round of optimization are 2 The inspection points are deleted from the optimized solution of the inspection path of this round of optimization and then inserted into the target position to obtain the candidate solution of the inspection path of this round of optimization.
7. The method according to claim 3, It is characterized in that The brainstorming optimization algorithm and the operator pair composed of the destruction operator and the repair operator are used to perform multiple rounds of optimization on the initial solution of the inspection path to obtain the optimal solution of the inspection path, including: After each round of optimization, determine whether the number of optimizations exceeds the update threshold; If the number of optimizations exceeds the update threshold, updating the weights of the operator pairs configured for each group of initial operator pairs; If the number of optimizations does not exceed the update threshold, the optimal solution of the inspection path optimized in this round is used to replace the worst solution of the inspection path optimized in this round based on the elite retention strategy, wherein the worst solution of the inspection path optimized in this round is obtained by optimizing the optimal solution of the inspection path optimized in this round based on the target operator of this round of optimization.
8. A path optimization device for drone inspection of suspended tracks, It is characterized in that The device comprises: The inspection point acquisition module is used to obtain the coordinate values of each inspection point that the drone needs to traverse when performing inspection tasks; An initial solution determination module is used to determine the initial solution of the inspection path using a greedy algorithm based on the coordinate values of each inspection point and with the goal that the inspection path can traverse each inspection point and the inspection path is the shortest; An optimal solution determination module, used to perform multiple rounds of optimization on the initial solution of the inspection path based on a brainstorming optimization algorithm and an operator pair consisting of a destruction operator and a repair operator to obtain an optimal solution of the inspection path; The inspection path determination module is used to determine the optimal solution of the inspection path as the target inspection path when the UAV performs the inspection task.
9. A computer device, It is characterized in that include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the path optimization method for drone inspection of suspended rails as described in any one of claims 1 to 7 are performed.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the path optimization method for inspecting suspended rails by a drone as described in any one of claims 1 to 7.
