UAV path planning method, device, electronic device and computer storage medium

By determining the correction points in three-dimensional space and using the ant colony algorithm to optimize the path, the problem of deviation from the course caused by the accumulation of aircraft positioning errors is solved, shorter path selection is achieved under constraints, and the mission success rate is improved.

CN114460969BActive Publication Date: 2024-09-06BANK OF CHINA FINANCIAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210142978.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-16
Publication Date
2024-09-06
Estimated Expiration
2042-02-16

AI Technical Summary

Technical Problem

Existing aircraft systems cannot perform precise positioning during flight, resulting in accumulation of errors, deviation from course, and inability to complete scheduled tasks.

Method used

By determining correction points with horizontal and vertical correction functions in three-dimensional space, combined with the ant colony algorithm, the UAV path is screened and optimized to ensure that a shorter path is selected to complete the task while satisfying the constraints.

Benefits of technology

It effectively reduces flight errors, ensures that the drone can choose a shorter path under constrained conditions, improves the mission success rate, and avoids deviation from the course.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114460969B
    Figure CN114460969B
Patent Text Reader

Abstract

The present application provides a method, device, electronic device and computer storage medium for planning the path of a drone, the method comprising: first, obtaining the range of activities of the drone and the starting point and the end point of the drone in this mission; determining the three-dimensional space and the correction points with horizontal correction function and vertical correction function in the three-dimensional space according to the range of activities of the drone; determining multiple paths according to the three-dimensional space, the correction points with horizontal correction function and vertical correction function in the three-dimensional space, the starting point and the end point of the drone; screening each path according to preset conditions, obtaining multiple paths that meet the preset conditions as target paths; finally, determining the best path among multiple target paths according to the correction points with horizontal correction function and vertical correction function in the three-dimensional space and the preset algorithm. Thus, the purpose of enabling the drone to select a shorter path to complete the mission is achieved under the premise of ensuring that the constraint conditions are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and computer storage medium for unmanned aerial vehicle path planning. Background Art

[0002] With the development of computer science and information technology, the technology of modern aircraft has undergone tremendous changes. There are more and more types of aircraft, their performance is getting higher and higher, the tasks they can perform are becoming more and more complex, and the control of aircraft is becoming more and more difficult. At the same time, for information exploration and material transportation in areas where the ground conditions and the degree of danger are not yet clear, aircraft such as drones can effectively avoid the risks of personnel going directly to the scene for detection and action, and complete some complex tasks under the premise of ensuring human safety. Due to the increase in the difficulty and danger of the task, it is becoming increasingly difficult to complete the task by relying solely on manual control.

[0003] At present, due to the limitations of the aircraft system structure, aircraft are usually unable to position themselves very accurately. The positioning error continues to increase during continuous flight. Once the error accumulates to a certain extent, it may cause the aircraft to deviate from its original course and no longer be able to fly on the predetermined trajectory, thus causing the mission failure. It is necessary to correct the error in time during the flight process through appropriate correction points. Summary of the invention

[0004] In view of this, the present application provides a drone path planning method, device, electronic device and computer storage medium, which can enable the drone to select a shorter path to complete the task while ensuring that the constraints are met.

[0005] The first aspect of the present application provides a method for UAV path planning, comprising:

[0006] Get the activity range of the drone in this mission, as well as the starting point and end point of the drone;

[0007] Determine a three-dimensional space and a correction point having a horizontal correction function and a vertical correction function in the three-dimensional space according to the activity range of the drone;

[0008] Determine a plurality of paths according to the three-dimensional space, a correction point having a horizontal correction function and a vertical correction function in the three-dimensional space, a starting point of the drone, and an end point of the drone;

[0009] Screening each of the paths according to preset conditions to obtain multiple paths that meet the preset conditions as target paths;

[0010] According to the correction points having horizontal correction function and vertical correction function in the three-dimensional space and a preset algorithm, an optimal path is determined among the multiple target paths.

[0011] Optionally, before determining the multiple paths according to the three-dimensional space, the correction points having the horizontal correction function and the vertical correction function in the three-dimensional space, the starting point of the drone and the end point of the drone, the method further includes:

[0012] Label each node in the three-dimensional space and determine the total number n of nodes;

[0013] Calculate the flight distance between every two nodes, construct an n*n distance matrix and an adjacency matrix that records the status, and set all elements in the adjacency matrix to 1; wherein, when the element is 1, it indicates that the element is available;

[0014] A pheromone matrix is ​​created on each link, and all elements in the pheromone matrix are set to initial values.

[0015] Optionally, screening each of the paths according to a preset condition includes:

[0016] For each of the paths, a path state in which the flight error after passing through the path exceeds the correctable error range is marked as unavailable, and an element in the adjacency matrix corresponding to the path is set to 0;

[0017] If the number of correction points in the three-dimensional space is greater than the correction point quantity threshold, then filtering out the paths that are not in the straight line direction from the starting point of the drone to the end point of the drone;

[0018] The path to the inaccessible point is marked as unavailable, and the status of all paths to the inaccessible point is set to 0; wherein, when the drone reaches an intermediate node, there is no next path that meets the direction from the starting point of the drone to the end point of the drone, then the intermediate node is an inaccessible point.

[0019] Optionally, the preset algorithm is an ant colony algorithm, and determining the best path among the multiple target paths according to the correction points having horizontal correction function and vertical correction function in the three-dimensional space and the preset algorithm includes:

[0020] Set each ant to start from the starting point of the drone, and set a vertical error record and a horizontal error record of each ant;

[0021] Determine whether the flight error of flying to the first node in the adjacency matrix satisfies the error tolerance of the correction point of the vertical correction function and the correction point of the horizontal correction function of the end point of the drone; wherein the first node is the next reachable point;

[0022] If it is determined that the flight error to the first node in the adjacency matrix satisfies the error tolerance of the correction point of the vertical correction function and the correction point of the horizontal correction function of the end point of the drone, then the first node is added to the reachable set of the next hop node;

[0023] Determine a first path according to the pheromone concentration distribution on the edges leading to each node from the current node and the modified ant colony algorithm; wherein the first path is the path selected by the ants;

[0024] After each round of ant path selection, the pheromone concentration of the paths between the nodes is updated, and the algorithm returns to execute the pheromone concentration distribution on the edges leading to the nodes from the current node and the modified ant colony algorithm to confirm the first path;

[0025] When the preset number of iterations is reached, the last first path is taken as the optimal path.

[0026] The second aspect of the present application provides a drone path planning device, comprising:

[0027] The acquisition unit is used to obtain the activity range of the drone, the starting point of the drone, and the end point of the drone in this mission;

[0028] A first determination unit is used to determine a three-dimensional space and a correction point having a horizontal correction function and a vertical correction function in the three-dimensional space according to the activity range of the drone;

[0029] A second determination unit is used to determine a plurality of paths according to the three-dimensional space, a correction point having a horizontal correction function and a vertical correction function in the three-dimensional space, a starting point of the drone, and an end point of the drone;

[0030] A screening unit, used to screen each of the paths according to preset conditions, and obtain multiple paths that meet the preset conditions as target paths;

[0031] The third determining unit is used to determine the best path among the multiple target paths according to the correction points having horizontal correction function and vertical correction function in the three-dimensional space and a preset algorithm.

[0032] Optionally, the UAV path planning device further includes:

[0033] a fourth determining unit, configured to label each node in the three-dimensional space and determine a total number n of nodes;

[0034] A construction unit is used to calculate the flight distance between every two nodes, construct an n*n distance matrix and an adjacency matrix for recording states, and set all elements in the adjacency matrix to 1; wherein, when the element is 1, it indicates that the element is available;

[0035] The first setting unit is used to create a pheromone matrix on each connection and set all elements in the pheromone matrix to initial values.

[0036] Optionally, the screening unit comprises:

[0037] a marking unit, for marking, for each of the paths, a path state in which the flight error after passing through the path exceeds a correctable error range as unavailable, and setting an element in an adjacency matrix corresponding to the path to 0;

[0038] A screening unit, configured to screen out paths that are not in a straight line direction from the starting point of the drone to the end point of the drone if the number of calibration points in the three-dimensional space is greater than a threshold value of the number of calibration points;

[0039] The marking unit is also used to mark the path to the inaccessible point as unavailable and set the status of all paths to the inaccessible point to 0; wherein, when the drone reaches an intermediate node, there is no next path that meets the direction from the starting point of the drone to the end point of the drone, then the intermediate node is an inaccessible point.

[0040] Optionally, the preset algorithm is an ant colony algorithm, and the third determining unit includes:

[0041] A second setting unit is used to set each ant to start from the starting point of the drone, and to set a vertical error record and a horizontal error record of each of the ants;

[0042] A judging unit, used to judge whether a flight error toward a first node in an adjacency matrix satisfies an error tolerance of a correction point of a vertical correction function and a correction point of a horizontal correction function of a destination of the UAV; wherein the first node is a next reachable point;

[0043] an adding unit, configured to add the first node to the reachable set of the next hop node if the judging unit judges that the flight error of flying to the first node in the adjacency matrix satisfies the error tolerance of the correction point of the vertical correction function and the correction point of the horizontal correction function of the endpoint of the drone;

[0044] A third determination subunit is used to determine a first path according to the pheromone concentration distribution on the edges leading to each node from the current node and the modified ant colony algorithm; wherein the first path is the path selected by the ants;

[0045] An updating unit, configured to update the pheromone concentration of the paths between the nodes after each round of ant path selection, and return to execute the pheromone concentration distribution on the edges leading to the nodes from the current node and the modified ant colony algorithm to confirm the first path;

[0046] The third determining subunit is further configured to use the last first path as the optimal path when a preset number of iterations is reached.

[0047] A third aspect of the present application provides an electronic device, including:

[0048] one or more processors;

[0049] a storage device having one or more programs stored thereon;

[0050] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of the first aspects.

[0051] A fourth aspect of the present application provides a computer storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the drone path planning method as described in any one of the first aspects is implemented.

[0052] As can be seen from the above scheme, the present application provides a method, device, electronic device and computer storage medium for planning the path of a drone, wherein the method for planning the path of a drone comprises: first, obtaining the range of activities of the drone and the starting point and the end point of the drone in this task; then, determining the three-dimensional space and the correction points with horizontal correction function and vertical correction function in the three-dimensional space according to the range of activities of the drone; then, determining multiple paths according to the three-dimensional space, the correction points with horizontal correction function and vertical correction function in the three-dimensional space, the starting point and the end point of the drone; then, screening each of the paths according to preset conditions, obtaining multiple paths that meet the preset conditions as target paths; finally, determining the best path among the multiple target paths according to the correction points with horizontal correction function and vertical correction function in the three-dimensional space and the preset algorithm. Thus, the purpose of enabling the drone to select a shorter path to complete the task is achieved under the premise of ensuring that the constraints are met. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0054] Figure 1 A specific flow chart of a drone path planning method provided in an embodiment of the present application;

[0055] Figure 2 A flowchart of a drone path planning method provided in another embodiment of the present application;

[0056] Figure 3 A flow chart of a path screening method provided in another embodiment of the present application;

[0057] Figure 4 A flowchart of a final path determination method provided by another embodiment of the present application;

[0058] Figure 5 A schematic diagram of a drone path planning device provided in another embodiment of the present application;

[0059] Figure 6 A schematic diagram of an electronic device for implementing a method for drone path planning provided in another embodiment of the present application. DETAILED DESCRIPTION

[0060] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0061] It should be noted that the concepts of "first", "second", etc. mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units, and the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0062] The present application embodiment provides a method for planning a path for a drone. Figure 1 As shown, the specific steps include:

[0063] S101. Obtain the activity range of the drone in this mission as well as the starting point and the end point of the drone.

[0064] S102: Determine a three-dimensional space and a correction point having a horizontal correction function and a vertical correction function in the three-dimensional space according to the activity range of the drone.

[0065] S103, determining a plurality of paths according to the three-dimensional space, a correction point having a horizontal correction function and a vertical correction function in the three-dimensional space, a starting point of the UAV, and an end point of the UAV.

[0066] Optionally, in another embodiment of the present application, in an implementation before step S103, as Figure 2 As shown, including:

[0067] S201. Label each node in the three-dimensional space and determine the total number n of nodes.

[0068] S202, respectively calculating the flight distance between every two nodes, constructing an n*n distance matrix and an adjacency matrix recording the status, and setting all elements in the adjacency matrix to 1.

[0069] Among them, when the element is 1, it means that the element is available. The adjacency matrix represents a two-dimensional matrix of the connection relationship between each node in the three-dimensional space. In this application, the element of the i row and j column in the matrix is ​​"1" to indicate that the path from i to j is feasible, and the element is "0" to indicate that the path from i to j is not feasible.

[0070] S203, creating a pheromone matrix on each connection, and setting all elements in the pheromone matrix to initial values.

[0071] S104: Screen each path according to preset conditions to obtain multiple paths that meet the preset conditions as target paths.

[0072] Optionally, in another embodiment of the present application, each path is screened according to a preset condition, such as Figure 3 As shown, including:

[0073] S301 . For each path, the path state where the flight error after passing the path exceeds the correctable error range is marked as unavailable, and the element in the adjacency matrix corresponding to the path is set to 0.

[0074] In the specific implementation process of this application, the following formula can be used for judgment, but is not limited to:

[0075]

[0076] Among them, A(i,j) is the element in the adjacency matrix, d(i,j) is the distance between node i and node j, and δ is the preset rough estimated error tolerance.

[0077] S302: If the number of correction points in the three-dimensional space is greater than the correction point quantity threshold, then the paths that are not in the straight line direction from the starting point of the UAV to the end point of the UAV are screened out.

[0078] In the specific implementation process of this application, the elements in the adjacency matrix may be changed using, but not limited to, the following formula:

[0079]

[0080] in, represents the vector from node i to node j, A vector representing the direction from the starting point A of the drone to the starting point B of the drone.

[0081] S303: Mark the path to the inaccessible point as unavailable, and set the status of all paths to the inaccessible point to 0.

[0082] Among them, when the drone reaches an intermediate node, if there is no next path that meets the direction from the starting point of the drone to the end point of the drone, the intermediate node is an unreachable point.

[0083] S105 . Determine an optimal path among multiple target paths according to correction points having horizontal correction function and vertical correction function in three-dimensional space and a preset algorithm.

[0084] Optionally, the preset algorithm is an ant colony algorithm. In another embodiment of the present application, an implementation of step S105 is as follows: Figure 4 As shown, including:

[0085] S401, setting each ant to start from the starting point of the drone, and setting the vertical error record and horizontal error record of each ant.

[0086] S402: Determine whether the flight error toward the first node in the adjacency matrix satisfies the error tolerance of the correction point of the vertical correction function and the correction point of the horizontal correction function of the endpoint of the UAV.

[0087] Among them, the first node is the next reachable point.

[0088] Specifically, if it is determined that the flight error toward the first node in the adjacency matrix satisfies the error tolerance of the correction point of the vertical correction function and the correction point of the horizontal correction function of the endpoint of the drone, step S403 is executed.

[0089] S403: Add the first node to the reachable set of the next-hop node.

[0090] S404: confirm the first path according to the pheromone concentration distribution on the edges leading to each node from the current node and the modified ant colony algorithm.

[0091] Among them, the first path is the path selected by the ant.

[0092] It should be noted that, since it is not only necessary to select the shortest path, but also to ensure that the number of nodes passed through is small, the present application has modified the expression of the probability of selecting a path by the traditional ant colony algorithm, and removed the influence of the heuristic factor defined as the inverse of the distance on the probability of selecting a path. The calculation formula of the modified ant colony algorithm is as follows:

[0093]

[0094] Among them, p k (i, j) is the probability of selecting the path from node i to node j, τ(i, j) is the pheromone concentration on the path from node i to node j, a is the weight, allow s is the reachable set that satisfies the calibration constraints.

[0095] S405: After each round of ant path selection, the pheromone concentration of the path between each node is updated.

[0096] Specifically, when updating the pheromone concentration of the paths between nodes, the emission of pheromones on all paths should be considered first. For all the paths from starting point A to end point B completed by the ants in this round, a certain pheromone concentration is added to each small section of the path. The increased pheromone concentration is inversely proportional to the distance, that is:

[0097]

[0098] Among them, Δτ(i,j) is the change of pheromone increase, Q is the weight factor, and d(i,j) is the path length between node i and node j.

[0099] In addition, in order to reduce the number of calibration points in the path, an additional item P / z can be added to the pheromone update. total ; Among them, z total is the total number of calibration points passed, and P is the weight of this parameter, which ensures that the path with fewer nodes obtains more pheromone concentration.

[0100] The pheromone concentrations of the connections between the nodes on the path successfully found in this application are updated to:

[0101] τ(i,j)=(1-v)·τ(i,j)+Δτ(i,j)+P / z total ;

[0102] Among them, v is the pheromone volatility factor.

[0103] S406: When the preset number of iterations is reached, the last first path is taken as the best path.

[0104] The preset number of iterations is pre-set and changed by technical personnel or relevant authorized staff and is not limited here.

[0105] It can be seen from the above scheme that the present application provides a method for planning the path of a UAV: ​​first, obtain the activity range of the UAV and the starting point and the end point of the UAV in this mission; then, determine the three-dimensional space and the correction points with horizontal correction function and vertical correction function in the three-dimensional space according to the activity range of the UAV; then determine multiple paths according to the three-dimensional space, the correction points with horizontal correction function and vertical correction function in the three-dimensional space, the starting point and the end point of the UAV; then, screen each path according to the preset conditions, and obtain multiple paths that meet the preset conditions as the target path; finally, determine the best path among multiple target paths according to the correction points with horizontal correction function and vertical correction function in the three-dimensional space and the preset algorithm. Thereby achieving the purpose that the UAV can choose a shorter path to complete the task under the premise of ensuring that the constraints are met.

[0106] Another embodiment of the present application provides a drone path planning device, such as Figure 5 As shown, specifically including:

[0107] The acquisition unit 501 is used to acquire the activity range of the drone, the starting point of the drone, and the end point of the drone in this mission.

[0108] The first determining unit 502 is used to determine the three-dimensional space and the correction points having the horizontal correction function and the vertical correction function in the three-dimensional space according to the activity range of the UAV.

[0109] The second determination unit 503 is used to determine multiple paths according to the three-dimensional space, the correction points having the horizontal correction function and the vertical correction function in the three-dimensional space, the starting point of the drone and the end point of the drone.

[0110] The screening unit 504 is used to screen each path according to a preset condition, and obtain multiple paths that meet the preset condition as target paths.

[0111] The third determining unit 505 is used to determine the best path among multiple target paths according to the correction points having horizontal correction function and vertical correction function in the three-dimensional space and a preset algorithm.

[0112] For the specific working process of the units disclosed in the above embodiments of the present application, please refer to the corresponding method embodiments, such as Figure 1 As shown, no further description is given here.

[0113] Optionally, in another embodiment of the present application, an implementation of drone path planning further includes:

[0114] The fourth determining unit is used to label each node in the three-dimensional space and determine the total number n of nodes.

[0115] The construction unit is used to calculate the flight distance between each two nodes, construct an n*n distance matrix and an adjacency matrix that records the status, and set all elements in the adjacency matrix to 1; wherein, when an element is 1, it indicates that the element is available.

[0116] The first setting unit is used to create a pheromone matrix on each connection and set all elements in the pheromone matrix to initial values.

[0117] For the specific working process of the units disclosed in the above embodiments of the present application, please refer to the corresponding method embodiments, such as Figure 2 As shown, no further description is given here.

[0118] Optionally, in another embodiment of the present application, an implementation of the screening unit 504 includes:

[0119] The marking unit is used to mark the path state of each path whose flight error after passing the path exceeds the correctable error range as unavailable, and set the element in the adjacency matrix corresponding to the path to 0.

[0120] The screening unit is used to screen out the paths that are not in the straight line direction from the starting point to the end point of the drone if the number of correction points in the three-dimensional space is greater than the threshold value of the number of correction points.

[0121] The marking unit is further used to mark the path to the unreachable point as unavailable, and set the status of all paths to the unreachable point to 0.

[0122] Among them, when the drone reaches an intermediate node, if there is no next path that meets the direction from the starting point of the drone to the end point of the drone, the intermediate node is an unreachable point.

[0123] For the specific working process of the units disclosed in the above embodiments of the present application, please refer to the corresponding method embodiments, such as Figure 3As shown, no further description is given here.

[0124] Optionally, in another embodiment of the present application, the preset algorithm is an ant colony algorithm, and an implementation of the third determination unit 505 includes:

[0125] The second setting unit is used to set each ant to start from the starting point of the drone and set the vertical error record and the horizontal error record of each ant.

[0126] The judging unit is used to judge whether the flight error of flying to the first node in the adjacency matrix satisfies the error tolerance of the correction point of the vertical correction function and the correction point of the horizontal correction function of the endpoint of the UAV.

[0127] Among them, the first node is the next reachable point.

[0128] An adding unit is used to add the first node to the reachable set of the next hop node if the judging unit judges that the flight error of flying to the first node in the adjacency matrix satisfies the error tolerance of the correction point of the vertical correction function and the horizontal correction function of the endpoint of the drone.

[0129] The third determination subunit is used to confirm the first path according to the pheromone concentration distribution on the edges leading to each node from the current node and the modified ant colony algorithm.

[0130] Among them, the first path is the path selected by the ant.

[0131] The updating unit is used to update the pheromone concentration of the paths between the nodes after each round of ant path selection, and return to execute the pheromone concentration distribution on the edges leading to each node from the current node and the modified ant colony algorithm to confirm the first path.

[0132] The third determining subunit is further configured to use the last first path as the best path when a preset number of iterations is reached.

[0133] For the specific working process of the units disclosed in the above embodiments of the present application, please refer to the corresponding method embodiments, such as Figure 4 As shown, no further description is given here.

[0134] As can be seen from the above scheme, the present application provides a drone path planning device: first, the acquisition unit 501 acquires the activity range of the drone and the starting point and the end point of the drone in this task; then, the first determination unit 502 determines the three-dimensional space and the correction points with horizontal correction function and vertical correction function in the three-dimensional space according to the activity range of the drone; the second determination unit 503 determines multiple paths according to the three-dimensional space, the correction points with horizontal correction function and vertical correction function in the three-dimensional space, the starting point and the end point of the drone; then, the screening unit 504 screens each path according to the preset conditions, and obtains multiple paths that meet the preset conditions as target paths; finally, the third determination unit 505 determines the best path among multiple target paths according to the correction points with horizontal correction function and vertical correction function in the three-dimensional space and the preset algorithm. Thereby, the purpose of the drone can choose a shorter path to complete the task under the premise of ensuring that the constraint conditions are met.

[0135] Another embodiment of the present application provides an electronic device, such as Figure 6 As shown, including:

[0136] One or more processors 601 .

[0137] The storage device 602 stores one or more programs.

[0138] When the one or more programs are executed by the one or more processors 601, the one or more processors 601 implement the drone path planning method as described in any one of the above embodiments.

[0139] Another embodiment of the present application provides a computer storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the drone path planning method as described in any one of the above embodiments is implemented.

[0140] In the above embodiments disclosed in the present application, it should be understood that the disclosed apparatus and method can also be implemented in other ways. The apparatus and method embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the apparatus, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0141] In addition, each functional module in each embodiment of the present disclosure can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part. If the function is implemented in the form of a software functional module 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 disclosure is essentially 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, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a live broadcast device, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. 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 and other media that can store program code.

[0142] The present application can be implemented or used by professionals and technicians. Various modifications to these embodiments will be apparent to professionals and technicians in the field, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for UAV path planning, characterized in that: include: Get the activity range of the drone in this mission, as well as the starting point and end point of the drone; Determine a three-dimensional space and a correction point having a horizontal correction function and a vertical correction function in the three-dimensional space according to the activity range of the drone; Label each node in the three-dimensional space and determine the total number n of nodes; Calculate the flight distance between every two nodes, construct an n*n distance matrix and an adjacency matrix that records the status, and set all elements in the adjacency matrix to 1; wherein, when the element is 1, it indicates that the element is available; Creating a pheromone matrix on each connection, and setting all elements in the pheromone matrix to initial values; Determine a plurality of paths according to the three-dimensional space, a correction point having a horizontal correction function and a vertical correction function in the three-dimensional space, a starting point of the drone, and an end point of the drone; For each of the paths, a path state in which the flight error after passing through the path exceeds the correctable error range is marked as unavailable, and an element in the adjacency matrix corresponding to the path is set to 0; If the number of correction points in the three-dimensional space is greater than the correction point quantity threshold, then filtering out the paths that are not in the straight line direction from the starting point of the drone to the end point of the drone; The path to the unreachable point is marked as unavailable, and the status of all paths to the unreachable point is set to 0, so as to obtain multiple paths that meet the preset conditions as the target path; wherein, when the drone reaches an intermediate node, there is no next path that meets the direction from the starting point of the drone to the end point of the drone, then the intermediate node is an unreachable point; According to the correction points having horizontal correction function and vertical correction function in the three-dimensional space and a preset algorithm, an optimal path is determined among the multiple target paths.

2. The UAV path planning method according to claim 1, characterized in that: The preset algorithm is an ant colony algorithm, and the optimal path is determined from the plurality of target paths according to the correction points having horizontal correction function and vertical correction function in the three-dimensional space and the preset algorithm, including: Set each ant to start from the starting point of the drone, and set a vertical error record and a horizontal error record of each ant; Determine whether the flight error of flying to the first node in the adjacency matrix satisfies the error tolerance of the correction point of the vertical correction function and the correction point of the horizontal correction function of the end point of the drone; wherein the first node is the next reachable point; If it is determined that the flight error to the first node in the adjacency matrix satisfies the error tolerance of the correction point of the vertical correction function and the correction point of the horizontal correction function of the end point of the drone, then the first node is added to the reachable set of the next hop node; Determine a first path according to the pheromone concentration distribution on the edges leading to each node from the current node and the modified ant colony algorithm; wherein the first path is the path selected by the ants; After each round of ant path selection, the pheromone concentration of the paths between the nodes is updated, and the algorithm returns to execute the pheromone concentration distribution on the edges leading to the nodes from the current node and the modified ant colony algorithm to confirm the first path; When the preset number of iterations is reached, the last first path is taken as the optimal path.

3. A drone path planning device, characterized in that: include: The acquisition unit is used to obtain the activity range of the drone, the starting point of the drone, and the end point of the drone in this mission; A first determination unit is used to determine a three-dimensional space and a correction point having a horizontal correction function and a vertical correction function in the three-dimensional space according to the activity range of the drone; a fourth determining unit, configured to label each node in the three-dimensional space and determine a total number n of nodes; A construction unit is used to calculate the flight distance between every two nodes, construct an n*n distance matrix and an adjacency matrix for recording states, and set all elements in the adjacency matrix to 1; wherein, when the element is 1, it indicates that the element is available; A first setting unit is used to create a pheromone matrix on each connection and set all elements in the pheromone matrix to initial values; A second determination unit is used to determine a plurality of paths according to the three-dimensional space, a correction point having a horizontal correction function and a vertical correction function in the three-dimensional space, a starting point of the drone, and an end point of the drone; a marking unit, for marking, for each of the paths, a path state in which the flight error after passing through the path exceeds a correctable error range as unavailable, and setting an element in an adjacency matrix corresponding to the path to 0; A screening unit, configured to screen out paths that are not in a straight line direction from the starting point of the drone to the end point of the drone if the number of calibration points in the three-dimensional space is greater than a threshold value of the number of calibration points; The marking unit is further used to mark the path to the unreachable point as unavailable, and set the status of all paths to the unreachable point to 0, so as to obtain multiple paths that meet the preset conditions as the target path; wherein, when the drone reaches an intermediate node, there is no next path that meets the direction from the starting point of the drone to the end point of the drone, then the intermediate node is an unreachable point; The third determining unit is used to determine the best path among the multiple target paths according to the correction points having horizontal correction function and vertical correction function in the three-dimensional space and a preset algorithm.

4. The UAV path planning device according to claim 3, characterized in that: The preset algorithm is an ant colony algorithm, and the third determination unit includes: A second setting unit is used to set each ant to start from the starting point of the drone, and to set a vertical error record and a horizontal error record of each of the ants; A judging unit, used to judge whether a flight error toward a first node in an adjacency matrix satisfies an error tolerance of a correction point of a vertical correction function and a correction point of a horizontal correction function of a destination of the UAV; wherein the first node is a next reachable point; an adding unit, configured to add the first node to the reachable set of the next hop node if the judging unit judges that the flight error of flying to the first node in the adjacency matrix satisfies the error tolerance of the correction point of the vertical correction function and the correction point of the horizontal correction function of the endpoint of the drone; A third determination subunit is used to determine a first path according to the pheromone concentration distribution on the edges leading to each node from the current node and the modified ant colony algorithm; wherein the first path is the path selected by the ants; An updating unit, configured to update the pheromone concentration of the paths between the nodes after each round of ant path selection, and return to execute the pheromone concentration distribution on the edges leading to the nodes from the current node and the modified ant colony algorithm to confirm the first path; The third determining subunit is further configured to use the last first path as the optimal path when a preset number of iterations is reached.

5. An electronic device, characterized in that: include: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the drone path planning method as described in any one of claims 1 to 2.

6. A computer storage medium, characterized in that: A computer program is stored thereon, wherein when the computer program is executed by a processor, the drone path planning method as described in any one of claims 1 to 2 is implemented.