A UAV path search method, device, electronic device and storage medium
By introducing reinforcement learning self-attention mechanism and Actor-Critic algorithm into the Astar path search algorithm, heuristic functions are optimized, solving the problem of degradation of traditional algorithms in dynamic environments and high-dimensional spaces, achieving faster convergence and better adaptability.
Patent Information
- Application Number
- CN202411793742.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-09
AI Technical Summary
The traditional Astar path search algorithm has reduced its effect in dynamic environments and high-dimensional spaces, making it difficult to quickly converge and adapt to changing environments.
The self-attention mechanism and Actor-Critic algorithm in reinforcement learning are adopted to optimize the heuristic function of the Astar algorithm through deep reinforcement learning models, so that it converges faster in high-dimensional space and reduces the number of re-plannings.
Improves the adaptability of drone path search in changing environments, ensures that drones maintain a safe distance from obstacles, and reduces energy consumption.
Smart Images

Figure CN119268702B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous planning of unmanned aerial vehicles, and in particular to a method, device, electronic device and storage medium for searching a path of an unmanned aerial vehicle. Background Art
[0002] The path planning of a drone generally consists of two parts: the front-end drone path search and the back-end trajectory optimization. The core goal of the front-end path search algorithm is to quickly find a path that roughly meets the flight constraints (such as obstacle avoidance, safe altitude, etc.) and is as short as possible to achieve the mission objectives.
[0003] The Astar path search method is a classic front-end path search method that combines heuristic information (such as Euclidean distance) to accelerate path generation during the search process. However, traditional heuristic functions are fixed and cannot be adjusted dynamically. Therefore, when frequent re-planning of paths is required in dynamic and uncertain environments, the effectiveness of the Astar algorithm will be reduced. Summary of the invention
[0004] In view of this, the purpose of this application is to provide a drone path search method, device, electronic device and storage medium, which can use energy consumption and collision risk as the optimization objectives of the heuristic function to ensure that the drone maintains a safe distance from obstacles; utilize the self-attention mechanism and Actor-Critic algorithm in reinforcement learning to enable the Astar algorithm to converge faster in high-dimensional space, reduce the number of re-planning, and improve the adaptability of drone path search in a changing environment.
[0005] In a first aspect, an embodiment of the present application provides a drone path search method, the drone path search method comprising:
[0006] S1, obtaining an actual rasterized map of an actual three-dimensional space including an actual starting node and an actual target node of a target UAV, and an actual hard obstacle search three-dimensional array Qa and an actual soft obstacle search three-dimensional array Qb corresponding to the actual rasterized map; Qa includes an identifier of whether each node in the actual rasterization is occupied by an obstacle; Qb includes an identifier of whether a neighboring node of each node is occupied by an obstacle;
[0007] S2, based on the lift expression of the target UAV, the relationship model between power and lift, and the relationship model between air density and altitude, a relationship model between lift and air density of the target UAV is constructed; the relationship model between lift and air density of the target UAV quantitatively describes the relationship between altitude, air density and energy consumption of the target UAV;
[0008] S3, based on the relationship model between lift and air density, construct the energy consumption cost E of the target UAV from the starting node to the current node; based on the three-dimensional array of soft obstacles of the target UAV, construct the collision risk cost C of the target UAV from the starting node to the current node; perform weighted summation of the energy consumption cost E and the collision risk cost C to obtain the first heuristic function G in the Astar path search algorithm;
[0009] S4, using the reward function defined according to the change of the target heuristic function F value of the Astar path search algorithm and the strategy network Actor-value network Critic to train the deep reinforcement learning model; using the output of the Critic in the trained deep reinforcement learning model as the second heuristic function H in the Astar path search algorithm; the target heuristic function F is the sum of the first heuristic function G and the second heuristic function H; the input of the deep reinforcement learning model is the position of the starting node in the rasterized map, the position of the target node in the rasterized map, and the flag of whether the current node is occupied by an obstacle and the flag of whether the neighboring node is occupied by an obstacle;
[0010] S5, searching the path of the target UAV according to the actual starting node, the actual target node, the actual rasterized map, Qa, Qb, the first heuristic function G, the second heuristic function H and the target heuristic function F.
[0011] In a possible implementation, S2 includes:
[0012] Substituting the air density in the air density and altitude relationship model into the power and lift relationship model, we get the power and altitude relationship model:
[0013] ;
[0014] in, For the target drone at an altitude Power under , is the gravity of the target drone, For the target drone at altitude Speed of the propeller tip , the efficiency of converting thrust into power for the target UAV;
[0015] Combining the power-altitude relationship model with the lift expression, the lift-air density relationship model is obtained:
[0016] ;
[0017] in, is the lift coefficient, is the area swept by the propeller, For the target drone at altitude The density of air below.
[0018] In a possible implementation, the expression of the energy consumption cost E of the target UAV from the previous node to the current node is:
[0019] ;
[0020] ;
[0021] ;
[0022] ;
[0023] Among them, the current node is the nth generation child node of the starting node in the path of the target drone, is the i-th generation child node of the starting node The altitude From the i-1th generation child node to the i-th generation child node of the starting node The distance is the i-th generation child node The coordinate value of the Z axis in the rasterized map. is the side length of the grid in the rasterized map, From the i-1th generation child node to the i-th generation child node of the starting node The distance type, is the i-th generation child node The coordinate value of the X axis in the rasterized map. is the i-th generation child node The Y-axis coordinate value in the rasterized map. is the i-1th generation child node The coordinate value of the X axis in the rasterized map. is the i-1th generation child node The Y-axis coordinate value in the rasterized map. is the i-1th generation child node The Z coordinate value in the rasterized map.
[0024] In a possible implementation, the collision risk cost C of the target UAV from the starting node to the current node is expressed as follows:
[0025] ;
[0026] Among them, the current node is the nth generation child node of the starting node in the path of the target drone, is the i-th generation child node of the starting node, is the i-th generation child node The coordinate value of the X axis in the rasterized map. is the i-th generation child node The Y-axis coordinate value in the rasterized map. is the i-th generation child node The Z coordinate value in the rasterized map.
[0027] In one possible implementation, the reward function is constructed by the following steps:
[0028] Defining actions Indicates the next moving direction of the target drone at the current node, through the vector To express: =[ ];in, is the moving distance of the moving direction vector on the X axis, , is the moving distance of the moving direction vector on the Y axis, , is the moving distance of the moving direction vector on the Z axis, , ; The current node is the nth generation child node of the starting node in the path of the target drone;
[0029] Defining the reward function Take action for the target drone at the current node improvements or penalties that follow;
[0030] If the action Make the target heuristic function F value of Astar path search algorithm smaller, then ;in, Target drone in action The target heuristic function F value before, Target drone in action The target heuristic function F value after ;
[0031] If the action Make the target heuristic function F value of Astar path search algorithm larger, then ;in, is a penalty coefficient greater than 0.
[0032] In one possible implementation, the loss function of the policy network Actor is The expression is:
[0033] ;
[0034] in, is the network parameter of the policy network Actor, is the mathematical expectation, Output actions for policy network actors The probability distribution of is the input of the deep reinforcement learning model corresponding to the current node;
[0035] Loss function of value network critic The expression is:
[0036] ;
[0037] in, is the network parameter of the value network Critic, is the discount factor, For output action The probability distribution of For output action The probability distribution of It is the input of the deep reinforcement learning model corresponding to the next node of the current node.
[0038] In a possible implementation, S5 includes:
[0039] S51, creating an open list and a closed list, and adding the actual start node to the open list;
[0040] S52, determining the node with the smallest heuristic function F value in the open list as the actual current node P; removing the actual current node P from the open list and adding it to the closed list; setting the G value corresponding to the actual starting node to 0;
[0041] S53, if the actual current node P is not the actual target node, then for each actual neighbor node Ne that is not occupied by an obstacle and is marked as being occupied by an obstacle in the actual rasterized map, if the actual neighbor node Ne is not in the open list and the closed list, then the actual neighbor node Ne is added to the open list, and it is assumed that the target drone reaches the actual neighbor node Ne from the actual current node, and the G and F corresponding to the actual neighbor node Ne are calculated; and the actual current node P is used as the parent node of the actual neighbor node Ne;
[0042] If the actual neighbor node Ne is in the open list, it is assumed that the target UAV reaches the actual neighbor node Ne from the actual current node P, and the G corresponding to the actual neighbor node Ne is calculated. If the latest calculated G value corresponding to the actual neighbor node Ne is less than the last calculated G value, the G and F corresponding to the actual neighbor node Ne are updated; and the actual current node P is used as the parent node of the actual neighbor node Ne;
[0043] If the open list is not empty, the process returns to S502 and continues to execute;
[0044] S54, if the actual current node P is the actual target node, then starting from the actual target node, backtracking is performed step by step through the corresponding parent node to obtain the target path of the target UAV.
[0045] In a second aspect, an embodiment of the present application further provides a drone path search device, the drone path search device comprising:
[0046] An acquisition module is used to acquire an actual rasterized map of an actual three-dimensional space including an actual starting node and an actual target node of a target UAV, and an actual hard obstacle search three-dimensional array Qa and an actual soft obstacle search three-dimensional array Qb corresponding to the actual rasterized map; Qa includes an identifier of whether each node in the actual rasterization is occupied by an obstacle; Qb includes an identifier of whether a neighboring node of each node is occupied by an obstacle;
[0047] A construction module is used to construct a relationship model between the lift and air density of the target UAV according to the lift expression of the target UAV, the relationship model between power and lift, and the relationship model between air density and altitude; the relationship model between the lift and air density of the target UAV quantitatively describes the relationship between altitude, air density and energy consumption of the target UAV;
[0048] The construction module is also used to construct the energy consumption cost E of the target UAV from the starting node to the current node according to the relationship model between lift and air density; construct the collision risk cost C of the target UAV from the starting node to the current node according to the soft obstacle retrieval three-dimensional array of the target UAV; perform weighted summation of the energy consumption cost E and the collision risk cost C to obtain the first heuristic function G in the Astar path search algorithm;
[0049] A training module is used to train a deep reinforcement learning model using a reward function defined according to the change of the target heuristic function F value of the Astar path search algorithm and a strategy network Actor-value network Critic; the output of the Critic in the trained deep reinforcement learning model is used as the second heuristic function H in the Astar path search algorithm; the target heuristic function F is the sum of the first heuristic function G and the second heuristic function H; the input of the deep reinforcement learning model is the position of the starting node in the rasterized map, the position of the target node in the rasterized map, and the flag of whether the current node is occupied by an obstacle and the flag of whether the neighboring node is occupied by an obstacle;
[0050] The search module is used to search the path of the target UAV according to the actual starting node, the actual target node, the actual rasterized map, Qa, Qb, the first heuristic function G, the second heuristic function H and the target heuristic function F.
[0051] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to perform the steps of any drone path search method as described in the first aspect.
[0052] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any drone path search method in the first aspect are executed.
[0053] The embodiment of the present application provides a method, device, electronic device and storage medium for searching a path for a drone, the method comprising: obtaining an actual rasterized map of an actual three-dimensional space including an actual starting node and an actual target node of a target drone, and an actual hard obstacle retrieval three-dimensional array Qa and an actual soft obstacle retrieval three-dimensional array Qb corresponding to the actual rasterized map; Qa includes an identifier of whether each node in the actual rasterization is occupied by an obstacle; Qb includes an identifier of whether a neighboring node of each node is occupied by an obstacle; a relationship model between the lift and air density of the target drone is constructed according to the lift expression of the target drone, the relationship model between power and lift, and the relationship model between air density and altitude; the relationship model between the lift and air density of the target drone quantitatively describes the relationship between altitude, air density and energy consumption of the target drone; according to the relationship model between lift and air density, an energy consumption cost E of the target drone from the starting node to the current node is constructed; according to the soft obstacle retrieval three-dimensional array of the target drone, an energy consumption cost E of the target drone from the starting node to the current node is constructed The collision risk cost C from the starting node to the current node; the energy consumption cost E and the collision risk cost C are weightedly summed to obtain the first heuristic function G in the Astar path search algorithm; the reward function defined according to the change of the target heuristic function F value of the Astar path search algorithm and the policy network Actor-value network Critic are used to train the deep reinforcement learning model; the output of the Critic in the trained deep reinforcement learning model is used as the second heuristic function H in the Astar path search algorithm; the target heuristic function F is the sum of the first heuristic function G and the second heuristic function H; the input of the deep reinforcement learning model is the position of the starting node in the rasterized map, the position of the target node in the rasterized map, and the mark of whether the current node is occupied by an obstacle and the mark of whether the neighboring node is occupied by an obstacle; according to the actual starting node, the actual target node, the actual rasterized map, Qa, Qb, the first heuristic function G, the second heuristic function H and the target heuristic function F, the path of the target UAV is searched. This application can use energy consumption and collision risk as optimization targets of the heuristic function to ensure that the drone maintains a safe distance from obstacles; by using the self-attention mechanism and Actor-Critic algorithm in reinforcement learning, the Astar algorithm can converge faster in high-dimensional space, reduce the number of re-planning times, and improve the adaptability of drone path search in a changing environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0055] Figure 1 A flowchart of a drone path search method provided by an embodiment of the present application is shown;
[0056] Figure 2 A schematic diagram of a process for searching for a path of a target drone provided in an embodiment of the present application is shown;
[0057] Figure 3 A schematic diagram of the structure of a drone path search device provided in an embodiment of the present application is shown;
[0058] Figure 4 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0059] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0060] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0061] In order to enable those skilled in the art to use the content of this application, the following implementation is provided in conjunction with a specific application scenario, "drone autonomous planning field". For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application. Although this application is mainly described around the "drone autonomous planning field", it should be understood that this is only an exemplary embodiment.
[0062] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0063] The following is a detailed description of a drone path search method provided in an embodiment of the present application.
[0064] Reference Figure 1 As shown, it is a flowchart of a drone path search method provided in an embodiment of the present application. The exemplary steps of the embodiment of the present application are described below:
[0065] S1, obtaining an actual rasterized map of an actual three-dimensional space including an actual starting node and an actual target node of a target UAV, and an actual hard obstacle retrieval three-dimensional array Qa and an actual soft obstacle retrieval three-dimensional array Qb corresponding to the actual rasterized map.
[0066] Among them, Qa includes the flag of whether each node in the actual rasterization is occupied by an obstacle; Qb includes the flag of whether the neighboring node of each node is occupied by an obstacle.
[0067] In the implementation manner of the present application, the target drone refers to any quad-rotor drone that needs to perform path planning. The actual three-dimensional space S with a size of M×N×L containing the actual starting node and the actual target node of the target drone is divided into m×n× l cubic grids of the same size are used to obtain the actual rasterized map; where M is the spatial length in the X-axis direction of the actual rasterized map, N is the spatial length in the Y-axis direction of the actual rasterized map, L is the spatial length in the Z-axis direction of the actual rasterized map, m is the number of grids in the X-axis direction, and n is the number of grids in the Y-axis direction. l is the number of grids in the Z coordinate axis direction; the side length of each grid is greater than the size of the target drone; it can be specifically expressed as .
[0068] Furthermore, q[i][j][k] is defined to represent the grid of the i-th grid in the x-axis direction, the j-th grid in the y-axis direction, and the k-th grid in the z-axis direction in the actual grid map, also known as a node. i, j, and k are called the indexes of the node in the three directions in the actual grid map.
[0069] Furthermore, a hard obstacle retrieval three-dimensional array Qa is established, and the element qa[i][j][k]=1 in Qa indicates that the node with indexes i, j, and k on the three coordinate axes is occupied by an obstacle, and the target drone cannot pass through the node; qa[i][j][k]=0 indicates that there is no obstacle at the node, and the target drone can pass through the node.
[0070] Furthermore, a soft obstacle retrieval three-dimensional array Qb is established. The element qa[i][j][k]=1 in Qb indicates that there are neighboring nodes occupied by obstacles around the nodes with indexes i, j, and k on the three coordinate axes, and qb[i][j][k]=0 indicates that the node and its 26 neighboring nodes are not occupied by obstacles.
[0071] S2, construct a relationship model between the lift and air density of the target UAV according to the lift expression of the target UAV, the relationship model between power and lift, and the relationship model between air density and altitude.
[0072] Among them, the relationship model between the lift and air density of the target UAV quantitatively describes the relationship between altitude, air density and the energy consumption of the target UAV.
[0073] Specifically, the relationship model between the lift and air density of the target UAV is constructed through the following steps:
[0074] S21. For a quadrotor target drone, the lift L is expressed by the following formula:
[0075] ;
[0076] in, is the lift coefficient, is the air density, is the area swept by the propeller, is the speed at the propeller tip.
[0077] S22. Establish a power-lift relationship model to quantitatively describe the power Pe, the thrust T required to generate lift, and the efficiency The relationship between:
[0078] ;
[0079] For a rotorcraft in equilibrium, the lift is equal to the weight W of the target drone:
[0080] .
[0081] S23. The relationship model between air density and altitude is expressed by the International Standard Atmosphere Model ISA:
[0082] ;
[0083] in, is the altitude Witnessed by the air below, =1.225kg / m 3 .
[0084] S24. Substitute the air density in the air density and altitude relationship model into the power and lift relationship model to obtain the power and altitude relationship model:
[0085] ;
[0086] in, For the target drone at altitude Power under , is the gravity of the target drone, For the target drone at altitude Speed of the propeller tip , The efficiency with which the target UAV converts thrust into power.
[0087] S25. Combining the power-altitude relationship model and lift expression, the lift-air density relationship model is obtained:
[0088] ;
[0089] in, is the lift coefficient, is the area swept by the propeller, For the target drone at altitude The density of air below.
[0090] S3, based on the relationship model between lift and air density, construct the energy consumption cost E of the target UAV from the starting node to the current node; based on the three-dimensional array of soft obstacles of the target UAV, construct the collision risk cost C of the target UAV from the starting node to the current node; perform weighted summation of the energy consumption cost E and the collision risk cost C to obtain the first heuristic function G in the Astar path search algorithm.
[0091] In the implementation mode of the present application, the target heuristic function F of the Astar path search algorithm consists of a first heuristic function G and a second heuristic function H. The first heuristic function G is used to characterize the cost of the target UAV from the starting node to the current node; the first heuristic function G consists of an energy consumption cost E and a collision risk cost C. The collision risk cost C enables the target UAV to maintain a safe distance from obstacles and the ground as much as possible, while ensuring a short flight path, reducing the risk of collision in special circumstances and enhancing flight safety.
[0092] Specifically, the expression of the energy consumption cost E of the target UAV from the previous node to the current node is:
[0093] ;
[0094] ;
[0095] ;
[0096] ;
[0097] Among them, the current node is the nth generation child node of the starting node in the path of the target drone, is the i-th generation child node of the starting node The altitude From the i-1th generation child node to the i-th generation child node of the starting node The distance is the i-th generation child node The coordinate value of the Z axis in the rasterized map. is the side length of the grid in the rasterized map, From the i-1th generation child node to the i-th generation child node of the starting node The distance type, is the i-th generation child node The coordinate value of the X axis in the rasterized map. is the i-th generation child node The Y-axis coordinate value in the rasterized map. is the i-1th generation child node The coordinate value of the X axis in the rasterized map. is the i-1th generation child node The Y-axis coordinate value in the rasterized map. is the i-1th generation child node The Z coordinate value in the rasterized map.
[0098] For example, if the starting node is A and the path is ABC, then B is the first-generation child node of the starting node A, and C is the second-generation child node of the starting node A.
[0099] Specifically, the expression of the collision risk cost C of the target UAV from the starting node to the current node is as follows:
[0100] ;
[0101] Among them, the current node is the nth generation child node of the starting node in the path of the target drone, is the i-th generation child node of the starting node, is the i-th generation child node The coordinate value of the X axis in the rasterized map. is the i-th generation child node The Y-axis coordinate value in the rasterized map. is the i-th generation child node The Z coordinate value in the rasterized map.
[0102] S4, using the reward function defined by the change of the target heuristic function F value of the Astar path search algorithm and the strategy network Actor-value network Critic to train the deep reinforcement learning model; using the output of the Critic in the trained deep reinforcement learning model as the second heuristic function H in the Astar path search algorithm.
[0103] Among them, the target heuristic function F is the sum of the first heuristic function G and the second heuristic function H; the input of the deep reinforcement learning model is the position of the starting node in the rasterized map, the position of the target node in the rasterized map, and the flag of whether the current node is occupied by an obstacle and the flag of whether the neighboring node is occupied by an obstacle.
[0104] Specifically, the deep reinforcement learning model is trained through the following steps:
[0105] S41. Use the Transformer deep reinforcement learning model and its self-attention mechanism to process complex three-dimensional spatial environment information.
[0106] ;
[0107] Among them, X represents the state characteristics of the input of the Transformer model , Y represents The output after multi-layer self-attention and feedforward network processing, including the parameters of the Actor network and the Critic network in the Transformer model. The number of Transformer layers is set to 6, the number of hidden units in each layer is set to 512, and the number of attention heads is 8.
[0108] S42. Define status : When the current node is the nth generation child of the starting node, its state It is defined as the grid position of the target drone and its surrounding environment information, specifically:
[0109] ;
[0110] in, is the position coordinate of the current node in the rasterized map, is the position of the target node in the rasterized map, It indicates whether the current node is occupied by an obstacle and whether the neighboring node is occupied by an obstacle.
[0111] S43. Define actions Indicates the moving direction selected by the target drone at the current node, through the vector To express: =[ ];in, is the moving distance of the moving direction vector on the X axis, , is the moving distance of the moving direction vector on the Y axis, , is the moving distance of the moving direction vector on the Z axis, , ; The current node is the nth generation child node of the starting node in the path of the target drone; define the reward function Take action for the target drone at the current node Improvements or penalties that follow; if the action Make the target heuristic function F value of the Astar path search algorithm smaller, then ;in, Target drone in action The target heuristic function F value before, Target drone in action The target heuristic function F value after action The target heuristic function F value of the Astar path search algorithm becomes larger, then ;in, is a penalty coefficient greater than 0.
[0112] In the implementation manner of the present application, S403 is the process of constructing a reward function.
[0113] S44, Actor-Critic is used for training, where the Actor is responsible for decision-making actions and the Critic is responsible for evaluating the state value.
[0114] Among them, the Transformer-based Actor network is used to output actions The probability distribution of ,in, The network parameters of the Actor network;
[0115] .
[0116] Transformer-based Critic network for outputting actions Estimated value ,in is the network parameter of the Critic network;
[0117] .
[0118] Loss function of policy network actor The expression is:
[0119] ;
[0120] in, is the network parameter of the policy network Actor, is the mathematical expectation, Output actions for policy network actors The probability distribution of It is the input of the deep reinforcement learning model corresponding to the current node.
[0121] Loss function of value network critic The expression is:
[0122] ;
[0123] in, is the network parameter of the value network Critic, is the discount factor, For output action The probability distribution of For output action The probability distribution of It is the input of the deep reinforcement learning model corresponding to the next node of the current node.
[0124] Use the gradient descent method to update the parameters of Actor and Critic respectively:
[0125]
[0126] in is the learning rate, set to 0.002.
[0127] Here, the Actor network outputs the action probability density distribution ,Actor is also used to guide the drone to select the optimal action based on the probability density distribution, and the Critic network outputs the state value estimate Output the state value corresponding to the optimal action, which is used to evaluate and optimize the heuristic function H: Therefore, the heuristic function H in this application is no longer the traditional Euclidean distance or other heuristic estimates, but a value estimate obtained through deep reinforcement learning optimization, which can better reflect the cost in the actual environment.
[0128] S5, searching for the path of the target UAV according to the actual starting node, the actual target node, the actual rasterized map, Qa, Qb, the first heuristic function G, the second heuristic function H and the target heuristic function F.
[0129] Specifically, the path of the target drone is searched through the following steps:
[0130] S51, creating an open list and a closed list, and adding the actual start node to the open list.
[0131] S52, determine the node with the smallest heuristic function F value in the open list as the actual current node P; remove the actual current node P from the open list and add it to the closed list; set the G value corresponding to the actual starting node to 0.
[0132] S53, if the actual current node P is not the actual target node, then for each actual neighbor node Ne that is not occupied by an obstacle, the actual current node P in the actual rasterized map is marked as being not occupied by an obstacle. If the actual neighbor node Ne is not in the open list and the closed list, the actual neighbor node Ne is added to the open list, and it is assumed that the target drone reaches the actual neighbor node Ne from the actual current node, and the G and F corresponding to the actual neighbor node Ne are calculated; and the actual current node P is used as the parent node of the actual neighbor node Ne.
[0133] In an implementation manner of the present application, assuming that the target UAV reaches the actual neighbor node Ne from the actual current node, when calculating the G and F corresponding to the actual neighbor node Ne, it is assumed that the target UAV is the parent node of the actual neighbor node Ne to perform path backtracking to obtain the current path of the target UAV, that is, the neighbor node is assumed to be the current node to calculate the corresponding G and F.
[0134] If the actual neighbor node Ne is in the open list, it is assumed that the target UAV reaches the actual neighbor node Ne from the actual current node P, and the G corresponding to the actual neighbor node Ne is calculated. If the latest calculated G value corresponding to the actual neighbor node Ne is less than the last calculated G value, the G and F corresponding to the actual neighbor node Ne are updated; and the actual current node P is used as the parent node of the actual neighbor node Ne.
[0135] In the implementation manner of the present application, updating G and F corresponding to the actual neighbor node Ne means determining the target G value and target F value of the actual neighbor node Ne using the latest calculated G value and F value corresponding to the actual neighbor node Ne.
[0136] If the open list is not empty, the process returns to S502 and continues to execute.
[0137] If the open list is empty, there is no feasible path.
[0138] S54, if the actual current node P is the actual target node, then starting from the actual target node, backtracking is performed step by step through the corresponding parent node to obtain the target path of the target UAV.
[0139] Reference Figure 2 As shown, it is a schematic diagram of the process of searching the path of the target UAV provided in the embodiment of the present application.
[0140] The embodiment of the present application provides a method for searching a path for a UAV, the method comprising: obtaining an actual rasterized map of an actual three-dimensional space including an actual starting node and an actual target node of a target UAV, and an actual hard obstacle retrieval three-dimensional array Qa and an actual soft obstacle retrieval three-dimensional array Qb corresponding to the actual rasterized map; Qa includes an identification of whether each node in the actual rasterization is occupied by an obstacle; Qb includes an identification of whether a neighboring node of each node is occupied by an obstacle; a relationship model between the lift and air density of the target UAV is constructed according to the lift expression of the target UAV, the relationship model between power and lift, and the relationship model between air density and altitude; the relationship model between the lift and air density of the target UAV quantitatively describes the relationship between altitude, air density and energy consumption of the target UAV; according to the relationship model between lift and air density, an energy consumption cost E of the target UAV from the starting node to the current node is constructed; according to the soft obstacle retrieval three-dimensional array of the target UAV, a distance from the starting node to the current node is constructed The collision risk cost C of the node; the energy consumption cost E and the collision risk cost C are weightedly summed to obtain the first heuristic function G in the Astar path search algorithm; the reward function defined according to the change of the target heuristic function F value of the Astar path search algorithm and the policy network Actor-value network Critic are used to train the deep reinforcement learning model; the output of the Critic in the trained deep reinforcement learning model is used as the second heuristic function H in the Astar path search algorithm; the target heuristic function F is the sum of the first heuristic function G and the second heuristic function H; the input of the deep reinforcement learning model is the position of the starting node in the rasterized map, the position of the target node in the rasterized map, and the mark of whether the current node is occupied by an obstacle and the mark of whether the neighboring node is occupied by an obstacle; according to the actual starting node, the actual target node, the actual rasterized map, Qa, Qb, the first heuristic function G, the second heuristic function H and the target heuristic function F, the path of the target UAV is searched. This application can use energy consumption and collision risk as optimization targets of the heuristic function to ensure that the drone maintains a safe distance from obstacles; by using the self-attention mechanism and Actor-Critic algorithm in reinforcement learning, the Astar algorithm can converge faster in high-dimensional space, reduce the number of re-planning times, and improve the adaptability of drone path search in a changing environment.
[0141] Based on the same inventive concept, an embodiment of the present application also provides a drone path search device corresponding to the drone path search method. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned drone path search method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0142] Reference Figure 3FIG. 1 is a schematic diagram of a drone path search device provided in an embodiment of the present application, wherein the drone path search device includes:
[0143] The acquisition module 301 is used to acquire an actual rasterized map of an actual three-dimensional space including an actual starting node and an actual target node of a target UAV, and an actual hard obstacle search three-dimensional array Qa and an actual soft obstacle search three-dimensional array Qb corresponding to the actual rasterized map; Qa includes an identifier of whether each node in the actual rasterization is occupied by an obstacle; Qb includes an identifier of whether a neighboring node of each node is occupied by an obstacle;
[0144] A construction module 302 is used to construct a relationship model between the lift and air density of the target UAV according to the lift expression of the target UAV, the relationship model between power and lift, and the relationship model between air density and altitude; the relationship model between the lift and air density of the target UAV quantitatively describes the relationship between the altitude, air density and energy consumption of the target UAV;
[0145] The construction module 302 is further used to construct an energy consumption cost E of the target UAV from the starting node to the current node according to the relationship model between lift and air density; construct a collision risk cost C of the target UAV from the starting node to the current node according to the soft obstacle retrieval three-dimensional array of the target UAV; perform weighted summation of the energy consumption cost E and the collision risk cost C to obtain the first heuristic function G in the Astar path search algorithm;
[0146] The training module 303 is used to train the deep reinforcement learning model by using the reward function defined by the change of the target heuristic function F value of the Astar path search algorithm and the strategy network Actor-value network Critic; the output of the Critic in the trained deep reinforcement learning model is used as the second heuristic function H in the Astar path search algorithm; the target heuristic function F is the sum of the first heuristic function G and the second heuristic function H; the input of the deep reinforcement learning model is the position of the starting node in the rasterized map, the position of the target node in the rasterized map, and the flag of whether the current node is occupied by an obstacle and the flag of whether the neighboring node is occupied by an obstacle;
[0147] The search module 304 is used to search the path of the target UAV according to the actual starting node, the actual target node, the actual rasterized map, Qa, Qb, the first heuristic function G, the second heuristic function H and the target heuristic function F.
[0148] In a possible implementation, the construction module 302 is specifically configured to substitute the air density in the air density-altitude relationship model into the power-lift relationship model to obtain the power-altitude relationship model: ;in, For the target drone at altitude Power under , is the gravity of the target drone, For the target drone at altitude Speed of the propeller tip , The efficiency of the target UAV in converting thrust into power; combining the power-altitude relationship model and lift expression, the lift-air density relationship model is obtained: ;in, is the lift coefficient, is the area swept by the propeller, For the target drone at altitude The density of air below.
[0149] In a possible implementation, the expression of the energy consumption cost E of the target UAV from the previous node to the current node is:
[0150] ;
[0151] ;
[0152] ;
[0153] ;
[0154] Among them, the current node is the nth generation child node of the starting node in the path of the target drone, is the i-th generation child node of the starting node The altitude From the i-1th generation child node to the i-th generation child node of the starting node The distance is the i-th generation child node The coordinate value of the Z axis in the rasterized map. is the side length of the grid in the rasterized map, From the i-1th generation child node to the i-th generation child node of the starting node The distance type, is the i-th generation child node The coordinate value of the X axis in the rasterized map. is the i-th generation child node The Y-axis coordinate value in the rasterized map. is the i-1th generation child node The coordinate value of the X axis in the rasterized map. is the i-1th generation child node The Y-axis coordinate value in the rasterized map. is the i-1th generation child node The Z coordinate value in the rasterized map.
[0155] In a possible implementation, the collision risk cost C of the target UAV from the starting node to the current node is expressed as follows:
[0156] ;
[0157] Among them, the current node is the nth generation child node of the starting node in the path of the target drone, is the i-th generation child node of the starting node, is the i-th generation child node The coordinate value of the X axis in the rasterized map. is the i-th generation child node The Y-axis coordinate value in the rasterized map. is the i-th generation child node The Z coordinate value in the rasterized map.
[0158] In a possible implementation, the training module 303 is specifically used to define an action Indicates the next moving direction of the target drone at the current node, through the vector To express: =[ ];in, is the moving distance of the moving direction vector on the X axis, , is the moving distance of the moving direction vector on the Y axis, , is the moving distance of the moving direction vector on the Z axis, ; The current node is the nth generation child node of the starting node in the path of the target drone; define the reward function Take action for the target drone at the current node Improvements or penalties that follow; if the action Make the target heuristic function F value of Astar path search algorithm smaller, then ;in, Target drone in action The target heuristic function F value before, Target drone in action The target heuristic function F value after action Make the target heuristic function F value of Astar path search algorithm larger, then ;in, is a penalty coefficient greater than 0.
[0159] In one possible implementation, the loss function of the policy network Actor is The expression is:
[0160] ;
[0161] in, is the network parameter of the policy network Actor, is the mathematical expectation, Output actions for policy network actors The probability distribution of is the input of the deep reinforcement learning model corresponding to the current node;
[0162] Loss function of value network critic The expression is:
[0163] ;
[0164] in, is the network parameter of the value network Critic, is the discount factor, For output action The probability distribution of For output action The probability distribution of It is the input of the deep reinforcement learning model corresponding to the next node of the current node.
[0165] In one possible implementation, the search module 304 is specifically used for S501, creating an open list and a closed list, and adding the actual starting node to the open list; S502, determining the node with the smallest heuristic function F value in the open list as the actual current node P; and removing the actual current node P from the open list and adding it to the closed list; setting the G value corresponding to the actual starting node to 0; S503, if the actual current node P is not the actual target node, then for each actual neighbor node Ne that is not occupied by an obstacle in the actual rasterized map, if the actual neighbor node Ne is not in the open list and the closed list, then adding the actual neighbor node Ne to the open list, and assuming The target UAV reaches the actual neighbor node Ne from the actual current node, and calculates the G and F corresponding to the actual neighbor node Ne; if the actual neighbor node Ne is in the open list, it is assumed that the target UAV reaches the actual neighbor node Ne from the actual current node P, and calculates the G corresponding to the actual neighbor node Ne. If the latest calculated G value corresponding to the actual neighbor node Ne is less than the last calculated G value, the G and F corresponding to the actual neighbor node Ne are updated; and the actual current node P is used as the parent node of the actual neighbor node Ne; if the open list is not empty, return to S502 to continue execution; S504, if the actual current node P is the actual target node, then start from the actual target node and trace back step by step through the corresponding parent node to obtain the target path of the target UAV.
[0166] The embodiment of the present application provides a drone path search device, which includes: an acquisition module, which is used to acquire an actual rasterized map of an actual three-dimensional space containing an actual starting node and an actual target node of a target drone, and an actual hard obstacle retrieval three-dimensional array Qa and an actual soft obstacle retrieval three-dimensional array Qb corresponding to the actual rasterized map; a construction module, which is used to construct a relationship model between the lift and air density of the target drone according to the lift expression of the target drone, the relationship model between power and lift, and the relationship model between air density and altitude; the relationship model between the lift and air density of the target drone quantitatively describes the relationship between altitude, air density and energy consumption of the target drone; the construction module is also used to construct an energy consumption cost E of the target drone from the starting node to the current node according to the relationship model between lift and air density; construct a collision risk cost C of the target drone from the starting node to the current node according to the soft obstacle retrieval three-dimensional array of the target drone; and calculate the energy consumption cost E. The weighted sum of the target heuristic function F and the collision risk cost C is performed to obtain the first heuristic function G in the Astar path search algorithm; a training module is used to train a deep reinforcement learning model using a reward function defined according to the change of the target heuristic function F value of the Astar path search algorithm and a strategy network Actor-value network Critic; the output of the Critic in the trained deep reinforcement learning model is used as the second heuristic function H in the Astar path search algorithm; the target heuristic function F is the sum of the first heuristic function G and the second heuristic function H; the input of the deep reinforcement learning model is the position of the starting node in the rasterized map, the position of the target node in the rasterized map, and the flag of whether the current node is occupied by an obstacle and the flag of whether the neighboring node is occupied by an obstacle; a search module is used to search the path of the target UAV according to the actual starting node, the actual target node, the actual rasterized map, Qa, Qb, the first heuristic function G, the second heuristic function H and the target heuristic function F. This application can use energy consumption and collision risk as optimization targets of the heuristic function to ensure that the drone maintains a safe distance from obstacles; by using the self-attention mechanism and Actor-Critic algorithm in reinforcement learning, the Astar algorithm can converge faster in high-dimensional space, reduce the number of re-planning times, and improve the adaptability of drone path search in a changing environment.
[0167] like Figure 4 As shown, an electronic device 400 provided in an embodiment of the present application includes: a processor 401, a memory 402 and a bus, the memory 402 stores machine-readable instructions executable by the processor 401, and when the electronic device is running, the processor 401 communicates with the memory 402 through the bus, and the processor 401 executes the machine-readable instructions to perform the steps of the above-mentioned drone path search method.
[0168] Specifically, the above-mentioned memory 402 and processor 401 can be general-purpose memory and processor, which are not specifically limited here. When the processor 401 runs the computer program stored in the memory 402, the above-mentioned drone path search method can be executed.
[0169] Corresponding to the above-mentioned drone path search method, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned drone path search method are executed.
[0170] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0171] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0172] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0173] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the information processing method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0174] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for searching a drone path, characterized in that: The method comprises: S1, obtaining an actual rasterized map of an actual three-dimensional space including an actual starting node and an actual target node of a target UAV, and an actual hard obstacle search three-dimensional array Qa and an actual soft obstacle search three-dimensional array Qb corresponding to the actual rasterized map; Qa includes an identifier of whether each node in the actual rasterization is occupied by an obstacle; Qb includes an identifier of whether a neighboring node of each node is occupied by an obstacle; S2, constructing a relationship model between the lift and air density of the target UAV according to the lift expression of the target UAV, the relationship model between power and lift, and the relationship model between air density and altitude; the relationship model between the lift and air density of the target UAV quantitatively describes the relationship between altitude, air density and energy consumption of the target UAV; S3, constructing the energy consumption cost E of the target UAV from the starting node to the current node according to the relationship model of lift and air density; constructing the collision risk cost C of the target UAV from the starting node to the current node according to the soft obstacle retrieval three-dimensional array of the target UAV; performing weighted summation of the energy consumption cost E and the collision risk cost C to obtain the first heuristic function G in the Astar path search algorithm; S4, using the reward function defined according to the change of the target heuristic function F value of the Astar path search algorithm and the strategy network Actor-value network Critic to train the deep reinforcement learning model; using the output of the Critic in the trained deep reinforcement learning model as the second heuristic function H in the Astar path search algorithm; the target heuristic function F is the sum of the first heuristic function G and the second heuristic function H; the input of the deep reinforcement learning model is the position of the starting node in the rasterized map, the position of the target node in the rasterized map, and the flag of whether the current node is occupied by an obstacle and the flag of whether the neighboring node is occupied by an obstacle; S5, searching the path of the target UAV according to the actual starting node, the actual target node, the actual rasterized map, the Qa, the Qb, the first heuristic function G, the second heuristic function H and the target heuristic function F.
2. The drone path search method according to claim 1, characterized in that: The S2 comprises: Substituting the air density in the air density and altitude relationship model into the power and lift relationship model, the power and altitude relationship model is obtained: ; in, For the target drone at altitude Power under , is the gravity of the target drone, For the target drone at altitude Speed of the propeller tip , the efficiency of converting thrust into power for the target UAV; Combining the power-altitude relationship model and the lift expression, the lift-air density relationship model is obtained: ; in, is the lift coefficient, is the area swept by the propeller, For the target drone at altitude The density of air below.
3. The drone path search method according to claim 2, characterized in that: The expression of the energy consumption cost E of the target UAV from the previous node to the current node is: ; ; ; ; Among them, the current node is the starting node in the path of the target drone. Generation node, is the i-th generation child node of the starting node The altitude, From the i-1th generation child node to the i-th generation child node of the starting node The distance is the i-th generation child node The coordinate value of the Z axis in the rasterized map. is the side length of the grid in the rasterized map, From the i-1th generation child node to the i-th generation child node of the starting node The distance type, is the i-th generation child node The coordinate value of the X axis in the rasterized map. is the i-th generation child node The Y-axis coordinate value in the rasterized map. is the i-1th generation child node The coordinate value of the X axis in the rasterized map. is the i-1th generation child node The Y-axis coordinate value in the rasterized map. is the i-1th generation child node The Z coordinate value in the rasterized map.
4. The drone path search method according to claim 1, characterized in that: The expression of the collision risk cost C of the target UAV from the starting node to the current node is as follows: ; Among them, the current node is the nth generation child node of the starting node in the path of the target drone, is the i-th generation child node of the starting node, is the i-th generation child node The coordinate value of the X axis in the rasterized map. is the i-th generation child node The Y-axis coordinate value in the rasterized map. is the i-th generation child node The Z coordinate value in the rasterized map.
5. The drone path search method according to claim 1, characterized in that: The reward function is constructed by the following steps: Defining actions Indicates the moving direction selected by the target drone at the current node, through the vector To express: ;in, is the moving distance of the moving direction vector on the X axis, , is the moving distance of the moving direction vector on the Y axis, , is the moving distance of the moving direction vector on the Z axis, , ; The current node is the nth generation child node of the starting node in the path of the target drone; Defining the reward function Take action for the target drone at the current node improvements or penalties that follow; If the action Make the target heuristic function F value of the Astar path search algorithm smaller, then ;in, Target drone in action The target heuristic function F value before, Target drone in action The target heuristic function F value after ; If the action The target heuristic function F value of the Astar path search algorithm becomes larger, then ;in, is a penalty coefficient greater than 0.
6. The method for searching a drone path according to claim 5, characterized in that: The loss function of the policy network Actor The expression is: ; in, is the network parameter of the policy network Actor, is the mathematical expectation, Output actions for policy network actors The probability distribution of is the input of the deep reinforcement learning model corresponding to the current node; The loss function of the value network Critic The expression is: ; in, is the network parameter of the value network Critic, is the discount factor, For output action The probability distribution of For output action The probability distribution of It is the input of the deep reinforcement learning model corresponding to the next node of the current node.
7. The drone path search method according to any one of claims 1 to 6, characterized in that: The S5 comprises: S51, creating an open list and a closed list, and adding the actual start node to the open list; S52, determining the node with the smallest heuristic function F value in the open list as the actual current node P; and removing the actual current node P from the open list and adding it to the closed list; setting the first heuristic function G value corresponding to the actual starting node to 0; S53, if the actual current node P is not the actual target node, then for each actual neighbor node Ne that is not occupied by an obstacle and is marked as being occupied by an obstacle for the actual current node P in the actual rasterized map, if the actual neighbor node Ne is not in the open list and the closed list, then the actual neighbor node Ne is added to the open list, and assuming that the target UAV reaches the actual neighbor node Ne from the actual current node, the first heuristic function G value and the target heuristic function F value corresponding to the actual neighbor node Ne are calculated; and the actual current node P is used as the parent node of the actual neighbor node Ne; If the actual neighbor node Ne is in the open list, it is assumed that the target UAV reaches the actual neighbor node Ne from the actual current node P, and the first heuristic function G value corresponding to the actual neighbor node Ne is calculated. If the latest calculated first heuristic function G value corresponding to the actual neighbor node Ne is less than the first heuristic function G value calculated last time, the first heuristic function G value and the target heuristic function F value corresponding to the actual neighbor node Ne are updated; and the actual current node P is used as the parent node of the actual neighbor node Ne; If the open list is not empty, the process returns to S502 to continue execution; S54, if the actual current node P is the actual target node, then starting from the actual target node, backtracking is performed step by step through the corresponding parent node to obtain the target path of the target UAV.
8. A drone path search device, characterized in that: The device comprises: An acquisition module is used to acquire an actual rasterized map of an actual three-dimensional space including an actual starting node and an actual target node of a target UAV, and an actual hard obstacle search three-dimensional array Qa and an actual soft obstacle search three-dimensional array Qb corresponding to the actual rasterized map; the Qa includes an identifier of whether each node in the actual rasterization is occupied by an obstacle; the Qb includes an identifier of whether a neighboring node of each node is occupied by an obstacle; A construction module is used to construct a relationship model between the lift and air density of the target UAV according to the lift expression of the target UAV, the relationship model between power and lift, and the relationship model between air density and altitude; the relationship model between the lift and air density of the target UAV quantitatively describes the relationship between altitude, air density and energy consumption of the target UAV; The construction module is further used to construct an energy consumption cost E of the target UAV from the starting node to the current node according to the relationship model between the lift and the air density; to construct a collision risk cost C of the target UAV from the starting node to the current node according to the soft obstacle retrieval three-dimensional array of the target UAV; and to perform weighted summation of the energy consumption cost E and the collision risk cost C to obtain the first heuristic function G in the Astar path search algorithm; A training module, used to train a deep reinforcement learning model using a reward function defined according to the change of the target heuristic function F value of the Astar path search algorithm and a strategy network Actor-value network Critic; using the output of the Critic in the trained deep reinforcement learning model as the second heuristic function H in the Astar path search algorithm; the target heuristic function F is the sum of the first heuristic function G and the second heuristic function H; the input of the deep reinforcement learning model is the position of the starting node in the rasterized map, the position of the target node in the rasterized map, and the flag of whether the current node is occupied by an obstacle and the flag of whether the neighboring node is occupied by an obstacle; A search module is used to search the path of the target drone based on the actual starting node, the actual target node, the actual rasterized map, the Qa, the Qb, the first heuristic function G, the second heuristic function H and the target heuristic function F.
9. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the drone path search method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the drone path search method according to any one of claims 1 to 7 are executed.
Citation Information
Patent Citations
Unmanned vehicle path planning method based on improved A * algorithm and deep reinforcement learning
CN111780777A
Ground robot path planning method based on air-ground cooperation
CN115373399A