Method, device and equipment for determining patrol route of unmanned aerial vehicle and storage medium
By identifying the substation's three-dimensional spatial model and genetic algorithm to optimize the route, the problems of low efficiency and insufficient safety of drone patrol route planning are solved, and efficient and safe patrols are achieved in complex environments.
Patent Information
- Application Number
- CN202510240977.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-08-01
AI Technical Summary
The existing drone patrol route planning methods are inefficient, making it difficult to take into account the diversity and safety of equipment distribution in complex substations, resulting in insufficient patrol efficiency and safety.
By identifying the three-dimensional spatial model of the substation, key inspection points are determined, and the route is optimized using genetic algorithms and preset fitness functions, comprehensively considering the total route length, flight time and safe distance penalty items to generate the target route.
It improves the efficiency and safety of route planning, ensures that drones perform patrol tasks efficiently and safely in complex environments, and reduces manual intervention and human errors.
Smart Images

Figure CN120403630A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of drones, and particularly to a method, device, equipment, and storage medium for determining the inspection route of a drone. Background Art
[0002] With the progress of technology and the development of drone technology, drones are widely used in the inspection and detection tasks of substations. Drone inspection not only improves the inspection efficiency but also reduces the risks and costs of manual inspection.
[0003] In the prior art, the generation of the drone inspection route usually depends on manual experience or simple algorithm planning. For example, according to the structure of the substation, the flight path of the drone is manually set, or simple path planning algorithms such as the shortest path algorithm or the greedy algorithm are used to generate the inspection route of the drone.
[0004] However, the routes generated by manual planning or simple algorithms may not fully optimize the flight time and energy consumption. Especially in relatively complex substations, it is difficult to effectively cope with the diversity and complexity of the equipment distribution in the substation, resulting in insufficient inspection efficiency and safety. Summary of the Invention
[0005] The method, device, equipment, and storage medium for determining the drone inspection route provided by the embodiments of this application are used to achieve effects such as improving the route planning efficiency and route safety.
[0006] In a first aspect, the embodiments of this application provide a method for determining the drone inspection route, including:
[0007] Identifying the three-dimensional space model of the target substation and determining the key inspection points; wherein, the key inspection points represent the equipment points in the target substation that need to be inspected;
[0008] Using the genetic algorithm and a preset fitness function, based on the starting point, ending point of the drone, and the key inspection points, outputting the target route; wherein, the preset fitness function is used to evaluate the fitness of the route based on the total length of the route, flight time, and safety distance penalty term, the safety distance penalty term represents the relationship between the actual distance between the key inspection points and the drone in the route and the corresponding minimum safety distance, and the target route represents the route that meets the preset termination condition.
[0009] In a possible implementation manner, the step of using the genetic algorithm and a preset fitness function, based on the starting point, ending point of the drone, and the key inspection points, outputting the target route includes:
[0010] Using a genetic algorithm, an initial route population is generated according to the starting point, ending point of the UAV and the waypoints corresponding to the key inspection points; wherein, the initial route population includes M initial routes, M is an integer ≥ 1, and the arrangement order of the waypoints corresponding to each key inspection point in the initial route is different;
[0011] According to a preset fitness function, calculate the fitness of the initial route;
[0012] Based on the fitness, iteratively optimize the initial route population through selection operation, crossover operation and mutation operation;
[0013] According to a preset termination condition, output the target route; wherein, the preset termination condition includes that the fitness reaches a preset requirement or the number of iterations reaches the upper limit.
[0014] In a possible implementation manner, the step of using a genetic algorithm to generate an initial route population according to the starting point, ending point of the UAV and the waypoints corresponding to the key inspection points includes:
[0015] Determine the waypoints corresponding to the key inspection points according to the inspection requirements of the key inspection points, the performance parameters of the UAV and the safety distance requirements of the equipment;
[0016] Based on the genetic algorithm, perform gene coding processing and sorting processing on the starting point, ending point of the UAV and the waypoints corresponding to the key inspection points to generate M initial routes, and obtain an initial route population.
[0017] In a possible implementation manner, the step of calculating the fitness of the initial route according to a preset fitness function includes:
[0018] Calculate the total route length, flight time and safety distance penalty term of the initial route;
[0019] Substitute the total route length, the flight time and the safety distance penalty term into the preset fitness function to calculate the fitness of the initial route; wherein, the preset fitness function includes the weight coefficient of the total route length, the weight coefficient of the flight time and the weight coefficient of the safety distance penalty term.
[0020] In a possible implementation manner, the step of calculating the total route length, flight time and safety distance penalty term of the initial route includes:
[0021] Calculate the total route length of the initial route according to the starting point, ending point of the UAV and the waypoints corresponding to the key inspection points in the initial route;
[0022] Calculate the flight time of the initial route according to the total length of the route and the preset flight speed;
[0023] Calculate the actual distance between the key inspection points and the waypoints corresponding to the key inspection points, and determine the safety distance penalty term of the initial route according to each of the actual distances.
[0024] In a possible implementation manner, the determining the safety distance penalty term of the initial route according to each of the actual distances includes:
[0025] Compare the actual distance with the corresponding minimum safety distance, and determine the number of key inspection points in the initial route where the actual distance is less than the corresponding minimum safety distance;
[0026] Determine the safety distance penalty term of the initial route according to the corresponding relationship between the preset number and the safety distance penalty term.
[0027] In a possible implementation manner, the selection operation adopts the roulette wheel selection strategy, the crossover operation adopts the partially matched crossover strategy, and the mutation operation adopts the swap mutation strategy.
[0028] In a second aspect, an embodiment of the present application provides a device for determining a drone inspection route, including:
[0029] An identification unit, configured to identify a three-dimensional space model of a target substation and determine key inspection points; wherein, the key inspection points represent equipment points in the target substation that need to be inspected;
[0030] A processing unit, configured to use a genetic algorithm and a preset fitness function to output a target route according to the starting point, the ending point of the drone, and the key inspection points; wherein, the preset fitness function is used to evaluate the fitness of the route based on the total length of the route, the flight time, and the safety distance penalty term, and the safety distance penalty term represents the relationship between the actual distance between the key inspection points and the drone in the route and the corresponding minimum safety distance, and the target route represents a route that meets the preset termination condition.
[0031] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;
[0032] The memory stores computer execution instructions;
[0033] The processor executes the computer execution instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementation manners of the first aspect.
[0034] Fourthly, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect and / or various possible implementation manners of the first aspect as described above.
[0035] Fifthly, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the first aspect and / or various possible implementation manners of the first aspect as described above.
[0036] In the method, device, equipment and storage medium for determining a drone inspection route provided by the embodiments of the present application, the method includes: identifying a three-dimensional space model of a target substation and determining key inspection points; where the key inspection points represent equipment points in the target substation that need to be inspected; using a genetic algorithm and a preset fitness function, based on the starting point, ending point of the drone and the key inspection points, outputting a target route; where the preset fitness function is used to evaluate the fitness of the route based on the total length of the route, flight time and a safety distance penalty term, and the safety distance penalty term represents the relationship between the actual distance between the key inspection points in the route and the drone and the corresponding minimum safety distance, and the target route represents a route that meets the preset termination conditions. The solution of the embodiment of the present application uses a three-dimensional space model to identify key inspection points and combines a genetic algorithm to optimize the route design, enabling the drone to efficiently perform tasks in a complex environment; in addition, the fitness function of the present application comprehensively considers the total length of the route, flight time and a safety distance penalty term, ensuring that the optimization of the route is not only efficient but also safe. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The drawings here are incorporated into the description and constitute a part of this description, showing embodiments consistent with the present application and used together with the description to explain the principles of the present application.
[0038] Figure 1 It is a schematic flowchart of a method for determining a drone inspection route provided by an embodiment of the present application;
[0039] Figure 2 It is a schematic flowchart of another method for determining a drone inspection route provided by an embodiment of the present application;
[0040] Figure 3 It is a schematic structural diagram of a device for determining a drone inspection route provided by an embodiment of the present application;
[0041] Figure 4 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
[0042] Through the above-mentioned drawings, specific embodiments of the present application have been shown, and more detailed descriptions will be provided hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Detailed Embodiments
[0043] Here, exemplary embodiments will be described in detail, and examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0044] With the rapid development of the power system, the number and scale of substations are continuously increasing, and the traditional manual inspection method is difficult to meet the requirements of efficient and safe inspections. Due to its high flexibility and low cost, unmanned aerial vehicles (UAVs) have gradually become an important tool for substation inspections.
[0045] Before using a UAV for power inspection, it is necessary to first determine the inspection route so that the UAV can complete the inspection based on the inspection route. Currently, existing route planning methods mainly rely on manual experience or simple rule algorithms.
[0046] However, manual route planning takes a long time. Especially in large substations, where there are a large number of equipment and complex distributions, the efficiency of manual route planning is too low. In addition, manual planning and simple algorithms usually have difficulty taking into account the safety distances between equipment and facilities, resulting in possible collisions between UAVs and equipment and facilities, and there are relatively large potential safety hazards. Moreover, simple algorithm planning lacks in-depth analysis of substation buildings and equipment, and it is difficult to find the optimal route in complex environments.
[0047] In summary, the current UAV route planning scheme has deficiencies such as low efficiency and insufficient safety, making it difficult to meet the requirements of large-scale substations and difficult to find the optimal route in complex environments.
[0048] To solve the above problems, the embodiments of the present application provide a method for determining the inspection route of a UAV. Based on the establishment of a three-dimensional space model of the substation, by identifying the three-dimensional space model of the substation, key inspection points that the UAV needs to inspect are determined. Then, a genetic algorithm is used to plan the route, and the fitness of the route is evaluated through the total length of the route, flight time, and safety distance penalty term, so as to output the target route, improving the efficiency and safety of route planning.
[0049] The following uses specific embodiments to elaborate in detail on the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following several specific embodiments can be combined with each other, and the same or similar concepts or processes may not be elaborated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0050] It should be noted that the execution subject of the method for determining the drone inspection route provided in the embodiments of the present application can be a device for determining the drone inspection route. This device can be deployed on an electronic device, and the electronic device can be a mobile phone, a computer, a calculator, a server, etc. The embodiments of the present application do not make any restrictions. The embodiments of the present application will be elaborated in detail with the execution subject being the device for determining the drone inspection route as an example.
[0051] Figure 1 It is a schematic flowchart of a method for determining a drone inspection route provided in an embodiment of the present application. As Figure 1 shown, the method for determining a drone inspection route provided in the embodiments of the present application includes:
[0052] S101. Identify the three-dimensional space model of the target substation and determine the key inspection points; wherein, the key inspection points represent the equipment points in the target substation that need to be inspected.
[0053] Exemplarily, the three-dimensional space model of the target substation describes the real structure of the target substation. In the case where the three-dimensional space model of the target substation has been pre-constructed, by identifying the three-dimensional space model of the target substation, the key equipment in the substation can be identified. These equipment usually include important equipment such as transformers, circuit breakers, disconnectors, arresters, etc., which are all objects that need to be inspected and maintained regularly. For each type of equipment, the key points to be inspected are different according to the equipment type. For example, for a transformer, the oil level gauge of the transformer usually needs to be inspected; for a switch, the pressure gauge of the switch usually needs to be inspected; for an arrester, the on-line detector of the arrester usually needs to be inspected, etc.
[0054] In the embodiments of the present application, each equipment position point that needs to be inspected by the drone is defined as a key inspection point. These points are the points that the drone must observe when performing the inspection task. By regularly inspecting these key inspection points, the normal operation of the substation equipment can be ensured and potential problems can be discovered in a timely manner. The positions of these key inspection points in the three-dimensional space are usually represented by three-dimensional coordinates (x, y, z).
[0055] In a possible embodiment, identifying the three-dimensional spatial model of the target substation and obtaining the key inspection points may include: inputting the three-dimensional spatial model of the target substation into a preset recognition model for recognition processing to obtain the key inspection points; wherein, the preset recognition model is a pre-trained deep learning model for identifying the three-dimensional spatial model of the target substation to determine the key inspection points.
[0056] Exemplarily, the preset recognition model may be a deep learning model that combines computer vision and deep learning technologies to identify the device types in the three-dimensional spatial model and select the key inspection points according to the device types. When in use, input the three-dimensional spatial model of the target substation into the preset recognition model for processing. The preset recognition model will analyze the input data, identify the key devices in the substation, and extract the key inspection points from the identified devices.
[0057] It can be understood that when identifying the three-dimensional spatial model of the target substation, information such as the position, height, and shape of the devices can be extracted. After determining the device types, according to the different inspection requirements pre-configured for each device type, the key inspection points for each device can be determined. For example, for transformers, positions such as oil level gauges, temperature sensors, and terminal blocks are usually selected as key inspection points; for switchgear, positions such as pressure gauges and bus connections are usually selected as key inspection points; for lightning arresters, positions such as leakage current monitors are usually selected as key inspection points. Each key inspection point has its corresponding position coordinates, which can be calculated based on information such as the coordinates and dimensions of the device, or directly identified by the preset recognition model. The embodiments of the present application do not make any restrictions.
[0058] The embodiments of the present application automatically identify and extract key inspection points through the recognition model, reducing the workload of manual annotation and improving efficiency; in addition, as the substation equipment is updated or the environment changes, the model can re-identify and update the key inspection points in a timely manner to maintain the timeliness and accuracy of the data; the model can efficiently and accurately extract the device points that need to be focused on from the complex three-dimensional spatial model, providing reliable data support for the UAV inspection task.
[0059] S102. Using a genetic algorithm and a preset fitness function, according to the starting point, ending point, and key inspection points of the UAV, output a target flight path; wherein, the preset fitness function is used to evaluate the fitness of the flight path based on the total length of the flight path, flight time, and safety distance penalty term, the safety distance penalty term characterizes the relationship between the actual distance between the key inspection points and the UAV in the flight path and the corresponding minimum safety distance, and the target flight path represents a flight path that meets the preset termination conditions.
[0060] Exemplarily, a genetic algorithm is a heuristic algorithm for solving optimization problems, simulating the process of natural selection. In the embodiments of the present application, the genetic algorithm is used to find an optimal drone patrol route to minimize the total path length and flight time while satisfying the constraint of the safety distance. In the present application, a preset fitness function combines the total route length, flight time, and safety distance penalty term to evaluate the quality of each route, thereby guiding the search process of the genetic algorithm.
[0061] Among them, a shorter route usually means higher efficiency and lower energy consumption. The shorter the total route length, the higher the efficiency and the lower the energy consumption. At the same time, the endurance of the drone is also considered, and the flight time is optimized to ensure that the task is completed within the battery endurance range. In addition, the safety distance between the drone and the key patrol points is also considered. The safety distance penalty term in the present application is used to quantify the deviation between the actual distance between the drone and the key patrol points and the minimum safety distance. The greater the deviation, the higher the penalty.
[0062] Through the iterative calculation of the genetic algorithm, the route is gradually optimized. After meeting the preset termination conditions, the optimized target route is output, which can effectively cover all key patrol points and achieve the best balance among the total route length, flight time, and safety.
[0063] Optionally, in a possible embodiment, using the genetic algorithm and the preset fitness function, according to the starting point, ending point, and key patrol points of the drone, the target route can be output, which may include:
[0064] S10. Using the genetic algorithm, according to the starting point, ending point, and waypoints corresponding to the key patrol points of the drone, generate an initial route population; where the initial route population includes M initial routes, M is an integer greater than or equal to 1, and the arrangement order of the waypoints corresponding to each key patrol point in the initial route is different;
[0065] S20. Calculate the fitness of the initial route according to the preset fitness function;
[0066] S30. Based on the fitness, iteratively optimize the initial route population through selection operation, crossover operation, and mutation operation;
[0067] S40. Output the target route according to the preset termination conditions; where the preset termination conditions include that the fitness reaches the preset requirements or the number of iterations reaches the upper limit.
[0068] Exemplarily, the genetic algorithm starts with the generation of an initial population. In the embodiments of the present application, the initial flight route population consists of M different initial flight routes, where M is an integer greater than or equal to 1. The size of M affects the diversity and computational complexity of the algorithm. For example, M can be 100, which is not limited in the embodiments of the present application. Each initial flight route represents a possible inspection path, and each initial flight route consists of the starting point, the ending point of the UAV, and the waypoints corresponding to each key inspection point. The difference between each initial flight route lies in the different arrangement orders of the waypoints corresponding to the key inspection points. Among them, the waypoints corresponding to the key inspection points are the specific positions that the UAV needs to pass through when performing the inspection task. In practical applications, these initial flight routes can be generated by randomization or other heuristic methods to ensure the diversity of the population.
[0069] Optionally, in a possible embodiment, step S10, generating an initial flight route population by using a genetic algorithm according to the starting point, the ending point of the UAV, and the waypoints corresponding to the key inspection points, may include:
[0070] S11. Determine the waypoints corresponding to the key inspection points according to the inspection requirements of the key inspection points, the performance parameters of the UAV, and the safety distance requirements of the equipment;
[0071] S12. Based on the genetic algorithm, perform gene coding processing and sorting processing on the starting point, the ending point of the UAV, and the waypoints corresponding to the key inspection points to generate M initial flight routes and obtain the initial flight route population.
[0072] Exemplarily, before generating the initial flight route, the specific inspection requirements of each key inspection point can be analyzed first, such as inspection priority, inspection order, inspection distance and angle, inspection content, special precautions, etc.; at the same time, considering the performance parameters of the UAV (such as flight altitude, camera resolution, etc.) and the safety distance requirements of the equipment (the safety distance can be determined based on factors such as the physical size of the equipment, the electromagnetic interference range, etc., for avoiding collisions or interference), etc., determine the waypoints corresponding to the key inspection points. Among them, each key inspection point can correspond to one or more waypoints to facilitate collecting equipment data at the key inspection point from different angles, which is not limited in the embodiments of the present application.
[0073] After determining the waypoints corresponding to the key inspection points, initialization processing can be performed based on the genetic algorithm. Specifically, perform gene coding processing on the starting point, the ending point of the UAV, and the waypoints corresponding to the key inspection points. Each gene coding represents a point, and then perform random sorting processing on them to randomly generate different permutations and combinations, thereby generating M initial flight routes. Each initial flight route represents a possible flight path, and all the initial flight routes form the initial flight route population.
[0074] By generating a diverse initial population of flight routes, a foundation can be laid for the subsequent genetic algorithm optimization process, ensuring the diversity and rationality of the initial population, thereby increasing the likelihood of finding the optimal flight route.
[0075] After generating the initial population of flight routes, according to a preset fitness function, the fitness of each initial flight route can be calculated to evaluate the quality of the flight route, and flight routes with better quality can be selected based on the fitness values for subsequent iterative optimization.
[0076] Optionally, in a possible embodiment, step S20, calculating the fitness of the initial flight route according to a preset fitness function, may include:
[0077] S21, calculating the total length of the flight route, flight time, and safety distance penalty term of the initial flight route;
[0078] S22, substituting the total length of the flight route, flight time, and safety distance penalty term into the preset fitness function to calculate the fitness of the initial flight route; wherein, the preset fitness function includes the weight coefficient of the total length of the flight route, the weight coefficient of the flight time, and the weight coefficient of the safety distance penalty term.
[0079] Exemplarily, for each initial flight route, the total length of the flight route, flight time, and safety distance penalty term of the initial flight route can be calculated first, and then substituted into the preset fitness function to calculate the fitness of the initial flight route. Among them, the preset fitness function can be composed of the weighted sum of the total length of the flight route, flight time, and safety distance penalty term, and can be expressed as the following formula (1):
[0080] (1)
[0081] Wherein, F is the fitness; L is the total length of the flight route; T is the flight time; P is the safety distance penalty term; is the weight coefficient of the total length of the flight route; is the weight coefficient of the flight time; is the weight coefficient of the safety distance penalty term.
[0082] Weight coefficient , , The magnitudes of, reflect the importance of the total length of the flight route, flight time, and safety distance penalty term in fitness evaluation. For example, if safety is the primary consideration, the weight coefficient and of the total length of the flight route and flight time should be larger. In the embodiments of the present application, the weight coefficients , 、 There is no restriction on the specific value of, for example, the weight coefficient of the total length of the route Can be 1, the weight coefficient of flight time Can be 1, the weight coefficient of the safety distance penalty term It can be 1000.
[0083] Based on formula (1), it can be seen that the fitness F is the weighted sum of the total route length, flight time, and safety distance penalty. When planning a route, the goal is to achieve a shorter route length, a shorter flight time, and a smaller penalty. Therefore, in the embodiment of the present application, the lower the fitness value, the better the route.
[0084] Optionally, in a possible embodiment, step S21, calculating the total route length, flight time, and safety distance penalty item of the initial route, may include:
[0085] S211, calculating the total length of the initial route based on the starting point, end point, and waypoints corresponding to the key patrol points of the UAV in the initial route;
[0086] S212. Calculate the flight time of the initial route based on the total length of the route and the preset flight speed;
[0087] S213: Calculate the actual distance between the key patrol point and the waypoint corresponding to the key patrol point, and determine the safety distance penalty item of the initial route based on each actual distance.
[0088] For example, the initial route consists of the starting point, the end point, and the waypoints corresponding to all key patrol points of the drone. The total length of the route is the length of the path formed by connecting these waypoints in sequence. For adjacent waypoint pairs (for example, from the starting point to the waypoint corresponding to the first key patrol point, from the waypoint corresponding to a key patrol point to the waypoint corresponding to the next key patrol point, and finally to the end point), the distance between them is calculated, usually using the Euclidean distance formula, and then the distances of all adjacent waypoint pairs are added together to obtain the total length of the route. The calculation formula for the total route length L can be expressed as follows (2):
[0089] (2)
[0090] Among them, (x i+1 , y i+1 , z i+1 ) and (x i , y i , z i ) are the coordinates of two adjacent points in the route.
[0091] The flight time can be calculated based on the total length of the flight route and the flight speed of the drone. The flight time T can be calculated by formula (3):
[0092] (3)
[0093] Wherein, the flight speed v of the drone can be a fixed value or a variable value, and the present application does not make specific limitations. In practical applications, it is necessary to consider the acceleration and deceleration stages of the drone, as well as possible hovering times, etc. to set a reasonable flight speed, and the flight speed should be within a reasonable range (such as ≦ ).
[0094] The safety distance penalty term is used to quantify the deviation between the actual distance between the drone and the key inspection points on the flight route and the minimum safety distance. Due to different equipment types, the corresponding minimum safety distances for each key inspection point may be different. In the embodiments of the present application, the minimum safety distance between the drone and the equipment can be set according to the performance parameters of the drone (such as flight altitude, camera resolution, etc.) and the safety distance requirements of each equipment. Among them, the specific values of the minimum safety distances corresponding to each key inspection point in the embodiments of the present application are not limited. For example, for a transformer, its minimum safety distance can be set to 1 meter; for a lightning arrester, its minimum safety distance can be set to 2 meters; and so on.
[0095] If the actual distance is less than the safety distance, a penalty is imposed. The purpose of the safety distance penalty term is to ensure that safety is considered in the flight route design and to avoid collision accidents caused by the drone getting too close to the equipment. For each key inspection point in the initial flight route, calculate the actual distance between the key inspection point and the corresponding waypoint on the flight route when the drone passes through the waypoint corresponding to the key inspection point on the flight route, and then determine the safety distance penalty term of the initial flight route according to the calculated actual distances corresponding to each key inspection point.
[0096] Optionally, in a possible embodiment, determining the safety distance penalty term of the initial flight route according to each actual distance may include:
[0097] S01. Compare the actual distance with the corresponding minimum safety distance to determine the number of key inspection points in the initial flight route where the actual distance is less than the corresponding minimum safety distance;
[0098] S02. Determine the safety distance penalty term of the initial flight route according to the corresponding relationship between the preset number and the safety distance penalty term.
[0099] Exemplarily, for each initial flight path, compare the actual distance of each key inspection point in the initial flight path with its preset corresponding minimum safety distance, record the key inspection points whose actual distance is less than the minimum safety distance, and count the number of key inspection points whose actual distance is less than the minimum safety distance. Then, according to the counted number, through the preset corresponding relationship, the safety distance penalty term of the initial flight path can be determined.
[0100] Among them, the predefined corresponding relationship maps the number of key inspection points whose actual distance is less than the safety distance to a penalty value. This corresponding relationship can be linear or non-linear, and the embodiments of the present application do not make limitations. For example, as the number increases, the penalty term may increase exponentially to more severely penalize unsafe flight paths. The larger the value, the higher the potential safety risk level that may exist.
[0101] After calculating the total flight path length, flight time, and safety distance penalty term of each initial flight path in sequence based on the above method, substitute the total flight path length, flight time, and safety distance penalty term into the preset fitness function to calculate the fitness of the initial flight path, and then optimize the flight path based on the fitness.
[0102] Exemplarily, during the flight path optimization process, the initial flight path population can be iteratively optimized based on the fitness of the flight path through selection operation, crossover operation, and mutation operation. Optionally, in the embodiments of the present application, the selection operation can adopt the roulette wheel selection strategy, the crossover operation can adopt the partially mapped crossover strategy, and the mutation operation can adopt the swap mutation strategy.
[0103] Among them, the roulette wheel selection strategy selects individuals according to the proportion of individual fitness. The higher the fitness of an individual, the greater the probability of being selected. It can be imagined as a roulette wheel, and the area occupied by each flight path individual is proportional to the fitness of the flight path. Based on this, in the embodiments of the present application, the initial flight paths that occupy a smaller area, that is, the initial flight paths with lower fitness values, can be selected for further optimization.
[0104] The partially mapped crossover (PMX) strategy is often used for permutation problems, such as the traveling salesman problem. Two crossover points can be selected between two parents, the part between these two points is exchanged, and then the remaining part is adjusted to maintain a valid permutation. In the embodiments of the present application, the initial flight paths selected by the roulette wheel selection strategy can be processed, and any two waypoints corresponding to key inspection points with a crossover relationship in the initial flight path (such as different sorting) can be exchanged to generate a new flight path.
[0105] The Swap Mutation strategy is often used in permutation problems. Two positions are randomly selected in the gene sequence of an individual, and the genes at these two positions are swapped to generate a new gene order. In the embodiments of this application, the initial flight routes selected by the roulette wheel selection strategy and the flight routes processed by the crossover operation can be further processed by the mutation operation, and the positions of any two waypoints in the flight route are randomly swapped, thereby increasing the population diversity.
[0106] For the flight routes that have undergone the selection operation, crossover operation, and mutation operation, calculate the fitness again, and perform iterative optimization until the fitness reaches the preset requirements or the number of iterations reaches the upper limit, then terminate the algorithm, and the target flight route can be obtained.
[0107] By using the genetic algorithm and defining the fitness function, the flight path of the UAV can be gradually optimized to minimize the total flight route length and flight time on the premise of meeting the safety distance. The solution of the embodiments of this application is applicable to the automated inspection tasks of large-scale substations and has good scalability and robustness.
[0108] The method for determining the UAV inspection flight route provided by the embodiments of this application includes: identifying the three-dimensional space model of the target substation and determining the key inspection points; where the key inspection points represent the equipment points that need to be inspected in the target substation; using the genetic algorithm and the preset fitness function, based on the starting point, ending point, and key inspection points of the UAV, output the target flight route; where the preset fitness function is used to evaluate the fitness of the flight route based on the total flight route length, flight time, and safety distance penalty term, and the safety distance penalty term represents the relationship between the actual distance between the key inspection points and the UAV in the flight route and the corresponding minimum safety distance, and the target flight route represents the flight route that meets the preset termination conditions. The solution of the embodiments of this application uses the three-dimensional space model to identify the key inspection points and combines the genetic algorithm to optimize the flight route design, enabling the UAV to efficiently execute tasks in complex environments; in addition, the fitness function of this application comprehensively considers the total flight route length, flight time, and safety distance penalty term, ensuring that the optimization of the flight route is not only efficient but also safe. The method of this application has high flexibility and adaptability, can be adjusted according to different task requirements, reduces manual intervention, reduces labor costs and the possibility of human errors, and significantly improves the planning efficiency and safety of the inspection flight route.
[0109] Figure 2 This is a schematic flowchart of another method for determining the UAV inspection flight route provided by the embodiments of this application. As Figure 2 shown, the method for determining the UAV inspection flight route provided by the embodiments of this application may include:
[0110] S201. Obtain the three-dimensional space model of the target substation.
[0111] Exemplarily, in the case where a three-dimensional spatial model of the target substation has not been pre-constructed, it is necessary to first construct a three-dimensional spatial model of the target substation. Optionally, high-resolution cameras, drones, etc. can be used to capture real construction diagrams of the target substation from multiple different shooting perspectives. Then, the real construction diagrams are input into data visualization software to construct a three-dimensional spatial model of the target substation. Among them, the data visualization software can be the ax.bar3d function in the open-source Python plotting library, etc., which is not limited in the embodiments of the present application.
[0112] In addition, lidar, etc. can also be used to obtain the point cloud data of the target substation, and a three-dimensional spatial model of the target substation is generated through the point cloud data and the shooting diagrams of the target substation from multiple different shooting perspectives, which is not limited in the embodiments of the present application.
[0113] Among them, constructing a three-dimensional spatial model of the target substation is the basis for realizing the automatic planning of the UAV inspection route. An accurate three-dimensional spatial model can provide reliable data support for the UAV inspection task. Based on the three-dimensional spatial model of the target substation, the efficiency of UAV inspection route planning can be effectively improved.
[0114] S202. Identify the three-dimensional spatial model of the target substation and determine the key inspection points.
[0115] Among them, the key inspection points represent the equipment points that need to be inspected in the target substation.
[0116] S203. Use the genetic algorithm to generate an initial route population according to the starting point, ending point of the UAV and the waypoints corresponding to the key inspection points.
[0117] Among them, the initial route population includes M initial routes, M is an integer ≥ 1, and the arrangement order of the waypoints corresponding to each key inspection point in the initial route is different.
[0118] S204. Calculate the total route length, flight time and safety distance penalty term of the initial route.
[0119] S205. Substitute the total route length, flight time and safety distance penalty term into a preset fitness function to calculate the fitness of the initial route.
[0120] Among them, the preset fitness function includes the weight coefficient of the total route length, the weight coefficient of the flight time and the weight coefficient of the safety distance penalty term.
[0121] S206. Based on the fitness, iteratively optimize the initial route population through selection operation, crossover operation and mutation operation.
[0122] S207. Output the target route according to the preset termination condition.
[0123] Among them, the preset termination conditions include that the fitness reaches the preset requirement or the number of iterations reaches the upper limit.
[0124] It should be noted that the specific implementation of the above steps S202 to S207 can refer to the description of other embodiments and will not be elaborated here. In practical applications, when generating the drone patrol route, some or all of the above steps may be included, and the embodiments of the present application do not make restrictions.
[0125] The method for determining the drone patrol route provided by the embodiments of the present application first generates a three-dimensional space model of the target substation, then identifies the three-dimensional space model of the substation, and then uses the genetic algorithm to plan the route, which can automatically generate the patrol path of the drone, reduce manual intervention and planning time, and improve the route planning efficiency. In addition, the fitness function of the present application comprehensively considers the total length of the route, flight time, and safety distance penalty term, ensuring that the optimization of the route is not only efficient but also safe, and can quickly optimize a route with a short total length, low energy consumption, high patrol efficiency, and high safety.
[0126] Figure 3 It is a schematic structural diagram of a device for determining a drone patrol route provided by an embodiment of the present application. As Figure 3 shown, the device 30 for determining the drone patrol route provided in this embodiment includes an identification unit 301 and a processing unit 302.
[0127] Among them, the identification unit 301 is used to identify the three-dimensional space model of the target substation and determine the key patrol points; among them, the key patrol points represent the equipment points that need to be patrolled in the target substation.
[0128] The processing unit 302 is used to use the genetic algorithm and the preset fitness function to output the target route according to the starting point, ending point, and key patrol points of the drone; among them, the preset fitness function is used to evaluate the fitness of the route based on the total length of the route, flight time, and safety distance penalty term, the safety distance penalty term represents the relationship between the actual distance between the key patrol points and the drone in the route and the corresponding minimum safety distance, and the target route represents the route that meets the preset termination conditions.
[0129] The device provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effects are similar, and will not be elaborated here in this embodiment.
[0130] Based on the above device embodiment, in some possible implementation manners, the processing unit 302 is specifically used for:
[0131] Using a genetic algorithm, an initial route population is generated based on the starting point, ending point of the unmanned aerial vehicle (UAV) and the waypoints corresponding to key inspection points; wherein, the initial route population includes M initial routes, M is an integer greater than or equal to 1, and the arrangement order of the waypoints corresponding to each key inspection point in the initial route is different;
[0132] Calculate the fitness of the initial route according to a preset fitness function;
[0133] Based on the fitness, iteratively optimize the initial route population through selection operation, crossover operation and mutation operation;
[0134] Output the target route according to a preset termination condition; wherein, the preset termination condition includes that the fitness reaches a preset requirement or the number of iterations reaches the upper limit.
[0135] Based on the above device embodiment, in some possible implementation manners, the processing unit 302 is specifically configured to:
[0136] Determine the waypoints corresponding to the key inspection points according to the inspection requirements of the key inspection points, the performance parameters of the UAV, and the safety distance requirements of the equipment;
[0137] Based on the genetic algorithm, perform gene coding processing and sorting processing on the starting point, ending point of the UAV and the waypoints corresponding to the key inspection points to generate M initial routes, and obtain the initial route population.
[0138] Based on the above device embodiment, in some possible implementation manners, the processing unit 302 is specifically configured to:
[0139] Calculate the total route length, flight time and safety distance penalty term of the initial route;
[0140] Substitute the total route length, flight time and safety distance penalty term into the preset fitness function to calculate the fitness of the initial route; wherein, the preset fitness function includes the weight coefficient of the total route length, the weight coefficient of the flight time and the weight coefficient of the safety distance penalty term.
[0141] Based on the above device embodiment, in some possible implementation manners, the processing unit 302 is specifically configured to:
[0142] Calculate the total route length of the initial route according to the starting point, ending point of the UAV and the waypoints corresponding to the key inspection points in the initial route;
[0143] Calculate the flight time of the initial route according to the total route length and the preset flight speed;
[0144] Calculate the actual distance between the key inspection points and the waypoints corresponding to the key inspection points, and determine the safety distance penalty term of the initial route according to each actual distance.
[0145] Based on the above device embodiments, in some possible implementation manners, the processing unit 302 is specifically configured to:
[0146] Compare the actual distance with the corresponding minimum safety distance, and determine the number of key inspection points in the actual distance in the initial route that are less than the corresponding minimum safety distance;
[0147] Determine the safety distance penalty term of the initial route according to the corresponding relationship between the preset quantity and the safety distance penalty term.
[0148] Based on the above device embodiments, in some possible implementation manners, the roulette wheel selection strategy is adopted for the selection operation, the partially matched crossover strategy is adopted for the crossover operation, and the swap mutation strategy is adopted for the mutation operation.
[0149] The device provided in this embodiment can be used to execute the method of the above embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.
[0150] It should be noted that it should be understood that the division of each module of the above device is only a logical function division. In actual implementation, it can be fully or partially integrated into a physical entity, or physically separated. And these modules can all be implemented in the form of software called by a processing element; they can also all be implemented in the form of hardware; they can also be partially implemented in the form of software called by a processing element and partially implemented in the form of hardware. In addition, it can also be stored in the memory of the above device in the form of program code, and the function of the above data processing module is called and executed by a certain processing element of the above device. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together or independently implemented. Here, the processing element can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed by the integrated logic circuit in the processor element or the instruction in the form of software.
[0151] Figure 4 It is a schematic structural diagram of an electronic device provided in an embodiment of the present application. As Figure 4 shown, the electronic device 40 provided in this embodiment includes: at least one processor 401 and a memory 402. Optionally, the device 40 further includes a communication component 403. Among them, the processor 401, the memory 402, and the communication component 403 are connected through a bus 404.
[0152] In the specific implementation process, at least one processor 401 executes the computer execution instructions stored in the memory 402, so that at least one processor 401 executes the above method.
[0153] For the specific implementation process of the processor 401, reference may be made to the foregoing method embodiments. Their implementation principles and technical effects are similar, and will not be elaborated herein.
[0154] In the foregoing embodiments, it should be understood that the processor may be a central processing unit (CPU for short), or may also be other general-purpose processors, digital signal processors (DSP for short), application specific integrated circuits (ASIC for short), etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in combination with the invention may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
[0155] The memory may include a high-speed random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory.
[0156] The bus may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, the buses in the drawings of this application are not limited to only one bus or one type of bus.
[0157] This application also provides a computer program product, including a computer program, which implements the foregoing method when executed by a processor.
[0158] This application also provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the processor executes the computer-executable instructions, the foregoing method is implemented.
[0159] The above-readable storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk. The readable storage medium may be any available medium accessible by a general-purpose or special-purpose computer.
[0160] An exemplary readable storage medium is coupled to the processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium may also be a component of the processor. The processor and the readable storage medium may be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium may also exist as discrete components in a device.
[0161] The division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the couplings or direct couplings or communication connections shown or discussed between each other may be indirect couplings or communication connections through some interfaces, devices, or units, and may be in electrical, mechanical, or other forms.
[0162] 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 to 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.
[0163] In addition, the functional units in various embodiments of the present invention may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0164] If a function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs, etc., all kinds of media that can store program codes.
[0165] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When this program is executed, it executes the steps including the above method embodiments; and the aforementioned storage medium includes: ROMs, RAMs, magnetic disks, or optical discs, etc., all kinds of media that can store program codes.
[0166] Finally, it should be noted that: After considering the specification and practicing the invention disclosed herein, those skilled in the art will easily think of other implementation manners of the present invention. The present invention is intended to cover any variations, uses, or adaptive changes of the present invention. These variations, uses, or adaptive changes follow the general principles of the present invention and include the common general knowledge or conventional technical means in the technical field of the present invention that is not disclosed in the present invention. It is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.
Claims
1. A method for determining a patrol route of an unmanned aerial vehicle, characterized in that, Including: Identifying a three-dimensional space model of a target substation and determining key inspection points; wherein, the key inspection points represent equipment points in the target substation that need to be inspected. Using a genetic algorithm and a preset fitness function, based on the starting point, ending point of the unmanned aerial vehicle (UAV) and the key inspection points, outputting a target flight path; wherein, the preset fitness function is used to evaluate the fitness of the flight path based on the total length of the flight path, flight time, and a safety distance penalty term, and the safety distance penalty term represents the relationship between the actual distance between the key inspection points and the UAV in the flight path and the corresponding minimum safety distance, and the target flight path represents a flight path that meets the preset termination conditions.
2. The method according to claim 1, wherein The step of using a genetic algorithm and a preset fitness function to output a target flight path based on the starting point, ending point of the UAV and the key inspection points includes: Using a genetic algorithm, based on the starting point, ending point of the UAV and the waypoints corresponding to the key inspection points, generating an initial flight path population; wherein, the initial flight path population includes M initial flight paths, M is an integer greater than or equal to 1, and the arrangement order of the waypoints corresponding to each key inspection point in the initial flight paths is different. Calculating the fitness of the initial flight paths according to the preset fitness function. Based on the fitness, iteratively optimizing the initial flight path population through selection operation, crossover operation, and mutation operation. Outputting a target flight path according to the preset termination conditions; wherein, the preset termination conditions include that the fitness reaches a preset requirement or the number of iterations reaches the upper limit.
3. The method according to claim 2, characterized in that The step of using a genetic algorithm to generate an initial flight path population based on the starting point, ending point of the UAV and the waypoints corresponding to the key inspection points includes: Determining the waypoints corresponding to the key inspection points according to the inspection requirements of the key inspection points, the performance parameters of the UAV, and the safety distance requirements of the equipment. Based on the genetic algorithm, performing gene coding processing and sorting processing on the starting point, ending point of the UAV and the waypoints corresponding to the key inspection points to generate M initial flight paths, thereby obtaining an initial flight path population.
4. The method according to claim 2, characterized in that, The step of calculating the fitness of the initial flight paths according to the preset fitness function includes: Calculating the total length of the flight path, flight time, and safety distance penalty term of the initial flight paths. Substituting the total length of the flight path, flight time, and safety distance penalty term into the preset fitness function to calculate the fitness of the initial flight paths; wherein, the preset fitness function includes a weight coefficient of the total length of the flight path, a weight coefficient of the flight time, and a weight coefficient of the safety distance penalty term.
5. The method according to claim 4, wherein The step of calculating the total length of the flight path, flight time, and safety distance penalty term of the initial flight paths includes: Calculating the total length of the flight path of the initial flight paths according to the starting point, ending point of the UAV and the waypoints corresponding to the key inspection points in the initial flight paths. Calculating the flight time of the initial flight paths according to the total length of the flight path and the preset flight speed. Calculating the actual distance between the key inspection points and the waypoints corresponding to the key inspection points, and determining the safety distance penalty term of the initial flight paths according to each actual distance.
6. The method according to claim 5, wherein Determining the safety distance penalty term of the initial route according to each of the actual distances includes: Comparing the actual distance with the corresponding minimum safety distance to determine the number of key inspection points in the initial route where the actual distance is less than the corresponding minimum safety distance; Determining the safety distance penalty term of the initial route according to the corresponding relationship between the preset number and the safety distance penalty term.
7. The method according to any one of claims 2-6, characterized in that The selection operation adopts the roulette wheel selection strategy, the crossover operation adopts the partially mapped crossover strategy, and the mutation operation adopts the swap mutation strategy.
8. An unmanned aerial vehicle inspection route determination device, characterized in that, It includes: An identification unit for identifying the three-dimensional space model of the target substation and determining key inspection points; wherein, the key inspection points represent the equipment points in the target substation that need to be inspected; A processing unit for using a genetic algorithm and a preset fitness function to output a target route according to the starting point, the ending point of the unmanned aerial vehicle, and the key inspection points; wherein, the preset fitness function is used to evaluate the fitness of the route based on the total length of the route, the flight time, and the safety distance penalty term, the safety distance penalty term represents the relationship between the actual distance between the key inspection points in the route and the unmanned aerial vehicle and the corresponding minimum safety distance, and the target route represents a route that meets the preset termination conditions.
9. An electronic device, characterized in that, It includes: A memory and a processor; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory, so that the processor executes the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, Computer execution instructions are stored in the computer-readable storage medium, and when the computer execution instructions are executed by a processor, they are used to implement the method according to any one of claims 1-7.