Disclosure of Invention
The present disclosure provides a method, an apparatus, a storage medium, and an electronic device for generating a flight path, so as to solve the technical problems that in the related art, in the process of path search, the accuracy of node search and screening is poor, and further, the efficiency of path search is low.
To achieve the above object, a first aspect of the present disclosure provides a method of generating a flight path, the method including:
determining a target space according to a flight starting point and a flight ending point of a target aircraft, wherein a plurality of space points exist in the target space, and the plurality of space points comprise: each space point corresponds to time planning information and position information, and the time planning information comprises: one or more no-fly time periods, the time plan information characterizing no permission to generate a flight path through the point in space within the one or more no-fly time periods;
in a searching process of searching a plurality of target space points which are required to be passed by the target aircraft from the flight starting point to the flight terminal point from the plurality of space points through a preset path searching model, under the condition that the ith target space point is determined, executing a space point obtaining step of obtaining alternative space points required by searching the (i + 1) th target space point according to time planning information and position information corresponding to each space point and the preset flight speed of the target aircraft, wherein i is greater than or equal to 1, and the plurality of target space points comprise: the flight start point and the flight end point;
and sequentially connecting the plurality of target space points to generate a flight path of the target aircraft.
Optionally, the determining, by the path search model for the plurality of spatial points, a plurality of target spatial points that the target aircraft needs to pass through to fly from the flight starting point to the flight ending point from the plurality of spatial points includes:
determining a flight sub-path corresponding to the ith target spatial point, wherein the flight sub-path comprises: the flight starting point, or a plurality of target space points which are determined by the searching process and are passed by the flight starting point to the ith target space point;
determining a plurality of adjacent space points corresponding to the ith target space point according to the position information corresponding to each space point, wherein the adjacent space points are the space points of which the linear distance between the space points and the ith target space point is smaller than a preset distance;
executing the spatial point acquisition step;
calculating a cost value of each candidate space point in the heuristic search algorithm according to the position information of a plurality of target space points in the flight sub-path, the position information of the flight destination and the position information of each candidate space point through a cost function corresponding to the heuristic search model;
taking the candidate space point with the minimum cost value in the plurality of candidate space points as the (i + 1) th target space point;
and under the condition that the (i + 1) th target space point is not the flight destination, taking the (i + 1) th target space point as the ith target space point, and repeatedly executing the steps from the step of determining the flight sub-path corresponding to the ith target space point to the step of taking the candidate space point with the minimum cost value in the candidate space points as the (i + 1) th target space point until the (i + 1) th target space point is determined as the flight destination so as to obtain the target space points.
Optionally, the spatial point obtaining step includes:
determining a target time point corresponding to each adjacent space point according to the position information of each target space point in the flight sub-path, the position information of each adjacent space point and the preset flight speed, wherein the target time point is a time point when the target aircraft flies from the ith target space point to reach each adjacent space point after flying to the ith target space point along the flight sub-path;
converting the target time point into a target time period according to a preset time error threshold;
and determining the alternative space points from the plurality of adjacent space points according to the target time period and the time planning information corresponding to each adjacent space point.
Optionally, the step of obtaining, according to the position information of each target space point in the flight sub-path, the position information of each adjacent space point, and the preset flight speed, includes:
acquiring a first actual flight distance corresponding to the flight sub-path according to the position information of each target space point in the flight sub-path;
for each adjacent space point, determining a second actual flying distance from the ith target space point to the adjacent space point according to the position information of the ith target space point and the position information of the adjacent space point;
and determining the target time point according to the takeoff time point of the target aircraft, the first actual flight distance, the second actual flight distance and the preset flight speed.
Optionally, the determining the candidate spatial points from the multiple adjacent spatial points according to the target time period and the time planning information corresponding to each of the adjacent spatial points includes:
under the condition that a target time period corresponding to a first adjacent space point does not coincide with one or more no-fly time periods corresponding to the first adjacent space point, determining the first adjacent space point as the alternative space point, wherein the first adjacent space point is any one of the adjacent space points.
A second aspect of the present disclosure provides an apparatus for generating a flight path, the apparatus comprising:
a region determination module configured to determine a target space according to a flight start point and a flight end point of a target aircraft, wherein a plurality of spatial points exist in the target space, and the plurality of spatial points include: each space point corresponds to time planning information and position information, and the time planning information comprises: one or more no-fly time periods, the time plan information characterizing no permission to generate a flight path through the point in space within the one or more no-fly time periods;
a space point searching module configured to, in a searching process of searching for a plurality of target space points that need to be passed by the target aircraft from the flight starting point to the flight ending point from the plurality of space points through a preset path searching model, execute a space point obtaining step of obtaining candidate space points required for searching for an i +1 th target space point according to time planning information and position information corresponding to each space point and a preset flight speed of the target aircraft when the i-th target space point is determined, where i is greater than or equal to 1, and the plurality of target space points include: the flight start point and the flight end point;
a path generation module configured to sequentially connect the plurality of target space points to generate a flight path of the target aircraft.
Optionally, the spatial point searching module is configured to:
determining a flight sub-path corresponding to the ith target spatial point, wherein the flight sub-path comprises: the flight starting point, or a plurality of target space points which are determined by the searching process and are passed by the flight starting point to the ith target space point;
determining a plurality of adjacent space points corresponding to the ith target space point according to the position information corresponding to each space point, wherein the adjacent space points are the space points of which the linear distance between the space points and the ith target space point is smaller than a preset distance;
executing the spatial point acquisition step;
calculating a cost value of each candidate space point in the heuristic search algorithm according to the position information of a plurality of target space points in the flight sub-path, the position information of the flight destination and the position information of each candidate space point through a cost function corresponding to the heuristic search model;
taking the candidate space point with the minimum cost value in the plurality of candidate space points as the (i + 1) th target space point;
and under the condition that the (i + 1) th target space point is not the flight destination, taking the (i + 1) th target space point as the ith target space point, and repeatedly executing the steps from the step of determining the flight sub-path corresponding to the ith target space point to the step of taking the candidate space point with the minimum cost value in the candidate space points as the (i + 1) th target space point until the (i + 1) th target space point is determined as the flight destination so as to obtain the target space points.
Optionally, the spatial point searching module is configured to:
determining a target time point corresponding to each adjacent space point according to the position information of each target space point in the flight sub-path, the position information of each adjacent space point and the preset flight speed, wherein the target time point is a time point when the target aircraft flies from the ith target space point to reach each adjacent space point after flying to the ith target space point along the flight sub-path;
converting the target time point into a target time period according to a preset time error threshold;
and determining the alternative space points from the plurality of adjacent space points according to the target time period and the time planning information corresponding to each adjacent space point.
Optionally, the spatial point searching module is configured to:
acquiring a first actual flight distance corresponding to the flight sub-path according to the position information of each target space point in the flight sub-path;
for each adjacent space point, determining a second actual flying distance from the ith target space point to the adjacent space point according to the position information of the ith target space point and the position information of the adjacent space point;
and determining the target time point according to the takeoff time point of the target aircraft, the first actual flight distance, the second actual flight distance and the preset flight speed.
Optionally, the spatial point searching module is configured to:
under the condition that a target time period corresponding to a first adjacent space point does not coincide with one or more no-fly time periods corresponding to the first adjacent space point, determining the first adjacent space point as the alternative space point, wherein the first adjacent space point is any one of the adjacent space points.
A third aspect of the present disclosure provides a computer readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method of generating a flight path according to the first aspect.
A fourth aspect of the present disclosure provides an electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of generating a flight path of the first aspect.
By adopting the technical scheme provided by the disclosure, the following technical effects can be at least achieved:
determining a target space according to a flight starting point and a flight ending point of a target aircraft, wherein a plurality of space points exist in the target space, and the plurality of space points comprise: the flight starting point and the flight ending point, each space point corresponding to time planning information and position information, the time planning information comprising: one or more no-fly time periods, the time planning information being used to characterize that no generation of a flight path through the spatial point is allowed within the one or more no-fly time periods; in the searching process of searching a plurality of target space points which are required to be passed by the target aircraft from the flight starting point to the flight terminal point from the plurality of space points through a preset path searching model, under the condition of determining the ith target space point, executing a space point acquiring step of acquiring candidate space points required by searching the (i + 1) th target space point according to time planning information and position information corresponding to each space point and the preset flight speed of the target aircraft, wherein i is greater than or equal to 1, and the plurality of target space points comprise: the flight starting point and the flight ending point; and sequentially connecting the plurality of target space points to generate the flight path of the target aircraft. The method can add the no-fly time as a factor for node screening in the alternative node searching stage of the path searching, improve the accuracy of node searching and further improve the efficiency of flight path planning.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
In the related art of planning a path for an aircraft, a search-based path planning method performs a graph-based path search through Dijkstra's algorithm (Dijkstra's algorithm) and a-Star's algorithm (a-algorithm for short). The A-algorithm calculates the cost values of the graph node path consumption and the heuristic estimation by traversing the graph nodes, and searches for the shortest path from the starting point to the end point in the graph. However, the path search of the graph is performed only by using the a-algorithm or the Dijkstra algorithm, and complicated business factors except for obstacles encountered when the aircraft automatically flies are not considered, for example, time-sharing flight-forbidden spaces, and a certain space occupied by other aircraft and unable to pass caused by frequent passing of a large number of aircraft in the same space in a certain time period. Therefore, the path planning method for searching the path of the graph through the a-algorithm or the Dijkstra algorithm has a limited application range with poor accuracy, and the efficiency of path search is low because the complicated business factors are not integrated into the cost value calculation.
The inventor notices the problem and proposes a method for generating a flight path, which specifically comprises the following steps:
FIG. 1 is a flow chart illustrating a method of generating a flight path, as shown in FIG. 1, according to an exemplary embodiment, including the steps of:
step 101, determining a target space according to a flight starting point and a flight ending point of a target aircraft.
Wherein, there are a plurality of space points in the target space, and the plurality of space points include: the flight starting point and the flight ending point, each space point corresponding to time planning information and position information, the time planning information comprising: one or more no-fly time periods, the time planning information characterizing that no flight path is allowed to be generated through the spatial point during the one or more no-fly time periods.
Illustratively, the target aircraft may be a drone or other autopilot-enabled flight device. In this embodiment, a method for generating a flight path is described as an example of a scenario for planning a flight path for an unmanned aerial vehicle. Specifically, in the process of planning a flight path for an unmanned aerial vehicle, information to be determined first includes: a flight origin, a flight destination, and flight related traffic conditions and geographic environmental characteristics of a target space experienced by a flight from the flight origin to the flight destination. Wherein the target space needs to contain the flight start point and the flight end point, and preferably the range of the target space needs to be as small as possible (i.e., the volume is smaller than a preset volume). Based on this, in step 101, the target space needs to be determined first according to the flight starting point and the flight ending point. The target space actually contains an infinite number of three-dimensional coordinate points, but it makes no sense to analyze the infinite number of three-dimensional coordinate points. Therefore, the plurality of spatial points may be: screening a plurality of space points from a plurality of three-dimensional coordinate points of the target space by a preset space segmentation technology; a plurality of space points which are screened out from the infinite three-dimensional coordinate points of the target space and are suitable for the unmanned aerial vehicle to fly are screened out according to the historical flight record of the unmanned aerial vehicle in the target space; or a plurality of space points manually selected from the target space. When carrying out unmanned aerial vehicle flight route planning in this target space, above-mentioned a plurality of space points can reflect carry out required traffic conditions and the geographic environment characteristic of unmanned aerial vehicle flight route planning in this target space. It should be noted that the flight starting point and the flight ending point and the plurality of spatial points are received and stored in the form of three-dimensional coordinate points, and the position information of each spatial point is the three-dimensional coordinate of the spatial point.
For example, there are two basic principles for the flight of a drone, one of which requires avoiding areas where the passage of a drone is forbidden, and the other of which requires avoiding areas where other drones may be present. In this step 101, each spatial point in the target space corresponds to the time plan information, and the flight prohibition time period in the time plan information is actually used to characterize in which time periods the drone is allowed to fly through and in which time periods the drone is not allowed to fly through. For example, a space point a is above a security agency, and the government stipulates that no unmanned aerial vehicle is allowed to pass through the space point a for 24 hours all day, the space point a corresponds to a no-fly time period of 00:00 to 23: 59; space point B is in a region where unmanned aerial vehicles fly frequently, and is 10:00 to 13: 00, 17: 00 to 20:00, where the unmanned aerial vehicle for which the flight route has been planned passes through the space point B, the space point B corresponds to two flight prohibiting periods, i.e., 10:00 to 13: 00 and 17: 00 to 20: 00. If the flight path planned for the target aircraft may pass through the above-mentioned space point a and space point B at around 11 points, the flight path is an unallowed flight path. It should be noted that, in the present embodiment, the flight path that is not allowed is not generated, and the no-fly time period has a meaning of reducing the possibility that the flight path that is not allowed is generated.
102, in the searching process of searching a plurality of target space points which are required to be passed by the target aircraft from the flight starting point to the flight terminal point from the plurality of space points through a preset path searching model, under the condition of determining the ith target space point, executing a space point acquiring step of acquiring alternative space points required by searching the (i + 1) th target space point according to the time planning information and the position information corresponding to each space point and the preset flight speed of the target aircraft.
Wherein i is greater than or equal to 1, and the plurality of target space points include: the flight start point and the flight end point.
For example, in the existing search process, under the condition that the flight starting point and the flight ending point are known, a plurality of target space points are searched out from a plurality of space points through a path search model (which may be a heuristic search algorithm), and then the target space points are connected into a linear path to be used as the flight path of the target aircraft. However, considering that there are two basic principles of the flight of the above-mentioned unmanned aerial vehicle and the characteristics of the heuristic search algorithm itself, the time dimension can be fused into the heuristic search algorithm according to the time planning information and the position information corresponding to each space point. Specifically, in the execution process of the heuristic search algorithm, there is a spatial point screening step of, after the ith target spatial point is determined, screening one node from a plurality of neighboring nodes (i.e., a plurality of neighboring spatial points of the ith target spatial point, which are explained in the following step 1022) of the current node (i.e., the ith target spatial point) as a next node (i.e., the (i + 1) th target spatial point) of the path according to the cost function value. In step 102, the spatial point screening step is improved, so that the spatial point screening step can be used for not only screening according to the cost function value, but also further screening multiple neighbor nodes according to the matching result of the time point when the target aircraft reaches each neighbor node and the time planning information corresponding to the neighbor nodes, and further the screened result is more accurate.
And 103, sequentially connecting the plurality of target space points to generate a flight path of the target aircraft.
For example, in step 102, the path search model may further record the arrangement order of the plurality of target spatial points. And sequentially connecting the plurality of target space points according to the arrangement sequence to generate the flight path of the target aircraft.
In summary, the technical solution provided by the embodiments of the present disclosure can determine a target space according to a flight starting point and a flight ending point of a target aircraft, where a plurality of spatial points exist in the target space, and the plurality of spatial points include: the flight starting point and the flight ending point, each space point corresponding to time planning information and position information, the time planning information comprising: one or more no-fly time periods, the time planning information being used to characterize that no generation of a flight path through the spatial point is allowed within the one or more no-fly time periods; in the searching process of searching a plurality of target space points which are required to be passed by the target aircraft from the flight starting point to the flight terminal point from the plurality of space points through a preset path searching model, under the condition of determining the ith target space point, executing a space point acquiring step of acquiring candidate space points required by searching the (i + 1) th target space point according to time planning information and position information corresponding to each space point and the preset flight speed of the target aircraft, wherein i is greater than or equal to 1, and the plurality of target space points comprise: the flight starting point and the flight ending point; and sequentially connecting the plurality of target space points to generate the flight path of the target aircraft. The method can add the no-fly time as a factor for node screening in the alternative node searching stage of the path searching, improve the accuracy of node searching and further improve the efficiency of flight path planning.
Fig. 2 is a flowchart of a method for searching spatial points according to fig. 1, where the path search model is a heuristic search model as shown in fig. 2, and the step 102 may include:
step 1021, determining the flight sub-path corresponding to the ith target space point.
Wherein the flight subpath comprises: the flight origin, or a plurality of target spatial points that have been traversed by the flight origin to the i-th target spatial point as determined by the search process.
For example, the heuristic search model may be an a-algorithm model, an ordered search algorithm (abbreviated as a algorithm) model, or Dijkstra algorithm (chinese name: Dijkstra algorithm), and in this embodiment, the path search model is exemplified as the a-algorithm model. Specifically, the steps 1021 through 1025 are the steps performed by the iteration of the a-x algorithm model. If i is equal to 1, the ith target space point is actually the definite flight starting point, and the flight sub-path does not exist actually, or the flight sub-path can be represented by the target space point of the flight starting point; and if i is greater than 1 and the (i + 1) th target space point is not the flight end point, the ith target space point is the target space point determined in the last loop iteration process. The flight subpath comprises: a plurality of target spatial points that have been experienced by the flight starting point to the i-th target spatial point as determined by the search process. If the i +1 th target space point is the flight destination, the loop iteration is stopped, and the i +1 th target space point is directly determined as the last target space point constituting the flight path, as described in the following step 1026.
Step 1022, determining a plurality of adjacent spatial points corresponding to the ith target spatial point according to the position information corresponding to each spatial point.
The adjacent space point is a space point of which the straight-line distance between the adjacent space point and the ith target space point is smaller than a preset distance.
Illustratively, in step 1022, the spatial points are searched in different directions of a spherical space with the same radius (the radius may be set to any distance according to the actual service scene) with the position of the ith target spatial point as the center of sphere, and the spatial points searched in this process are the neighboring spatial points.
Step 1023, the spatial point acquisition step is performed.
For example, in the a-algorithm model, after determining the plurality of neighboring spatial points, the traversed nodes collected in the plurality of neighboring spatial points and the Open Set provided by the heuristic search model (in this embodiment, the neighboring spatial points that have been traversed in the previous iteration process but have been discarded according to the cost function values) are directly used as the candidate spatial points. In this step 1023, the plurality of adjacent spatial points are secondarily filtered by the time-of-flight limitation of each spatial point. After the filtering process, the traversed nodes collected in the Open Set are actually all subjected to the secondary filtering in step 1023. Therefore, in the process of loop iteration of the whole heuristic search model, after the previous loop iteration process, the candidate space points stored in the Open Set and the currently screened candidate space points are more and more accurate, and further, the next step of nodes (i.e., the (i + 1) th target space points) screened according to the cost function values are more and more accurate.
Step 1024, calculating a cost value of each candidate space point in the heuristic search algorithm according to the position information of the target space points in the flight sub-path, the position information of the flight destination and the position information of each candidate space point through a cost function corresponding to the heuristic search model.
Illustratively, the candidate spatial points screened in step 1024 include: candidate spatial points selected from the above neighboring spatial points in step 1023, and a plurality of candidate spatial points collected into an Open Set in all loop iterations before the i +1 st target spatial point is determined. Since the secondary screening process in step 1023 is included in the whole loop iteration process, the multiple candidate spatial points collected in the Open Set are also candidate spatial points for performing the secondary screening process.
Illustratively, taking the a-algorithm model as an example, the cost function can be represented by the following formula (1):
f(x)=g(x)+h(x) (1),
where f (x) represents the total cost of the best path from the flight origin to the flight destination through the candidate spatial point, i.e. the cost value mentioned above, x represents the candidate spatial point, g (x) represents the cost paid for the best path from the flight origin to the candidate spatial point, and h (x) represents the cost paid for the best path from the candidate spatial point to the flight destination. The "cost" may be the manhattan distance of the best path from one spatial point to another or the number of spatial points traversed by the best path from one spatial point to another.
And 1025, taking the candidate spatial point with the minimum cost value in the plurality of candidate spatial points as the (i + 1) th target spatial point.
And a step 1026, in which, when the i +1 th target space point is not the flight destination, the i +1 th target space point is used as the i-th target space point, and the steps 1021 to 1025 are repeatedly executed until the i +1 th target space point is determined to be the flight destination, so as to obtain the target space points.
Illustratively, the convergence point of the loop iteration consists in determining the i +1 th target spatial point as the flight end point.
Fig. 3 is a flowchart of a method for acquiring alternative spatial points according to fig. 2, and as shown in fig. 3, the step 1023 may include:
and step 10231, determining a target time point corresponding to each adjacent space point according to the position information of each target space point in the flight sub-path, the position information of each adjacent space point and the preset flight speed.
The target time point is a time point when the target aircraft flies to the ith target space point along the flight sub-path and then flies from the ith target space point to reach each adjacent space point.
Illustratively, this step 10231 may include: the following steps a, b and c. In the step a, according to the position information of each target space point in the flight sub-path, acquiring a first actual flight distance corresponding to the flight sub-path; in step b, for each adjacent space point, determining a second actual flying distance from the ith target space point to the adjacent space point according to the position information of the ith target space point and the position information of the adjacent space point; in step c, the target time point is determined according to the takeoff time point of the target aircraft, the first actual flight distance, the second actual flight distance and the preset flight speed.
Illustratively, the step c may be performed synchronously with the step 1021 or asynchronously. Specifically, the step 1021 may include: backtracking the parent node (i.e. the (i-1) th target space point) of the ith target space point on the flight sub-path, calculating the actual flight distance between the ith target space point and the (i-1) th target space point, backtracking the parent node (i.e. the (i-2) th target space point) of the (i-1) th target space point on the flight sub-path, calculating the actual flight distance between the (i-1) th target space point and the (i-2) th target space point, and so on until backtracking to the flight starting point. In a manner executed synchronously with step 1021, the distance between the two target space points involved in the backtracking is calculated after each backtracking process, and then all the distances determined in all the backtracking processes are added to obtain the first actual flight distance. Or, in an asynchronous manner with step 1021, after the whole step 1021 is completed, obtaining the whole flying sub-path, and then calculating the total flying distance of the flying self-route as the first actual flying distance according to the position information of each target space point. In addition, in step b, a straight-line distance between the i-th target space point and the adjacent space point is directly calculated as the second actual flight distance.
In step c, the sum of the first actual flight distance and the second actual flight distance is obtained, and then divided by the preset flight speed, so as to obtain the flight time required by the target aircraft to fly to the ith target space point along the flight sub-path, then fly from the ith target space point and reach each adjacent space point. And obtaining a definite time point as the target time point according to the takeoff time point and the flight time length of the target aircraft. It should be noted that, in general, a drone does not fly at a constant speed, but it is not practical to analyze in detail the acceleration of the drone at each moment in the flight sub-path. Therefore, the historical flight data (including flight distance and flight time) of the target aircraft can be analyzed to determine the average speed of the target aircraft flying under normal conditions as the preset flight speed. If it is determined that an abnormal condition may exist in the flight sub-path according to the time point of the takeoff of the target aircraft, for example, the flight sub-path flies in strong wind or heavy rain, the preset flight speed may be corrected by a preset speed correction coefficient before the target event point is calculated.
In a preferred embodiment, the flight parameters of the target aircraft flight may include, in addition to the preset flight speed: and (4) steering mode. It should be noted that the steering modes of different drones are different, for example, some drones may steer in a stationary manner during steering, and continue to advance after the steering is completed, or some drones steer in a certain arc according to the steering angle. Thus, the first actual flying distance and the second actual flying distance are not the straight-line distances described in steps a, b and c included in step 10231 of this embodiment. In this embodiment, the step 10231 may include: the following steps d, e and f. In step d, acquiring a first actual flight distance corresponding to the flight sub-path according to the position information of each target space point in the flight sub-path, the steering mode information of the target aircraft and the steering angle of each target space point in the flight sub-path; in step e, for each of the adjacent space points, determining a second actual flight distance from the i-th target space point to the adjacent space point according to the position information of the i-th target space point, the position information of the adjacent space point and the steering angle of the steering manner information at the i-th target space point; in step f, the target time point is determined according to the takeoff time point of the target aircraft, the first actual flight distance, the second actual flight distance and the preset flight speed. And determining the length of an arc drawn by turning at each target space point according to the turning mode information and the turning angle, wherein the length of the arc is a part of the first actual flying distance and the second actual flying distance.
And step 10232, converting the target time point into a target time period according to a preset time error threshold.
Illustratively, the step 10232 allows the target time point to float up and down because the estimation of the target time point has a certain error. Specifically, the time error threshold may be set to 5 minutes, and the target time period is 5 minutes before and after the target time point.
And 10233, determining the candidate space point from the plurality of adjacent space points according to the target time period and the time planning information corresponding to each adjacent space point.
Illustratively, this step 10233 may include: and under the condition that the target time period corresponding to the first adjacent space point does not coincide with one or more no-fly time periods corresponding to the first adjacent space point, determining the first adjacent space point as the alternative space point, wherein the first adjacent space point is any one of the adjacent space points.
Illustratively, the target time period and the no-fly time period respectively include a left end point and a right end point, where the time point corresponding to the left end point is earlier and the time point corresponding to the right end point is later. For the target time period corresponding to the first neighboring spatial point and one or more no-fly time periods corresponding to the first neighboring spatial point, the actual implementation of step 10233 may include: and performing traversal search by taking the earliest no-fly time period A in the one or more no-fly time periods as a starting point. Specifically, if the left end point and the right end point of the target time period are both earlier than the left end point of the no-fly time period a, determining that the two time periods are not coincident, and further determining that the first adjacent space point is the alternative space point; if the left end point of the target time period is earlier than the left end point of the no-fly time period A, but the right end point of the target time period is later than the left end point of the no-fly time period A, determining that the two time periods are overlapped, and further determining that the first adjacent space point is not the alternative space point; if the left end point of the target time period is later than the left end point of the no-fly time period A and is earlier than the right end point of the no-fly time period A, determining that the two time periods are overlapped, and further determining that the first adjacent space point is not the alternative space point; and if the left end point of the target time period is later than the left end point of the no-fly time period A and is later than the right end point of the no-fly time period A, determining that the two time periods are not coincident, and replacing the next no-fly time period B which is later than the no-fly time period A in the one or more no-fly time periods to continue to compare in the above manner until all the no-fly time periods corresponding to the first adjacent space point are traversed.
In summary, the technical solution provided by the embodiments of the present disclosure can determine a target space according to a flight starting point and a flight ending point of a target aircraft, where a plurality of spatial points exist in the target space, and the plurality of spatial points include: the flight starting point and the flight ending point, each space point corresponding to time planning information and position information, the time planning information comprising: one or more no-fly time periods, the time planning information being used to characterize that no generation of a flight path through the spatial point is allowed within the one or more no-fly time periods; in the searching process of searching a plurality of target space points which are required to be passed by the target aircraft from the flight starting point to the flight terminal point from the plurality of space points through a preset path searching model, under the condition of determining the ith target space point, executing a space point acquiring step of acquiring candidate space points required by searching the (i + 1) th target space point according to time planning information and position information corresponding to each space point and the preset flight speed of the target aircraft, wherein i is greater than or equal to 1, and the plurality of target space points comprise: the flight starting point and the flight ending point; and sequentially connecting the plurality of target space points to generate the flight path of the target aircraft. The method can add the no-fly time as a factor for node screening in the alternative node searching stage of the path searching, improve the accuracy of node searching and further improve the efficiency of flight path planning.
Fig. 4 is a block diagram illustrating an apparatus for generating a flight path according to an exemplary embodiment, as shown in fig. 4, the apparatus 400 including:
a region determining module 410 configured to determine a target space according to a flight starting point and a flight ending point of a target aircraft, wherein a plurality of spatial points exist in the target space, and the plurality of spatial points include: the flight starting point and the flight ending point, each space point corresponding to time planning information and position information, the time planning information comprising: one or more no-fly time periods during which the target aircraft is prohibited from flying at the point of space;
a space point searching module 420 configured to, in a searching process of searching for a plurality of target space points that need to be traversed by the target aircraft from the flight starting point to the flight ending point from among the plurality of space points through a preset path searching model, execute a space point obtaining step of obtaining candidate space points required for searching for an i +1 th target space point according to time planning information and position information corresponding to each space point and a preset flight speed of the target aircraft when the i-th target space point is determined, where i is greater than or equal to 1, and the plurality of target space points include: the flight starting point and the flight ending point;
a path generation module 430 configured to sequentially connect the plurality of target space points to generate a flight path of the target aircraft.
Optionally, the spatial point searching module 420 is configured to:
determining a flight sub-path corresponding to the ith target space point, wherein the flight sub-path comprises: the flight starting point, or a plurality of target space points which are determined by the searching process and are passed by the flight starting point to the ith target space point;
determining a plurality of adjacent space points corresponding to the ith target space point according to the position information corresponding to each space point, wherein the adjacent space points are the space points of which the linear distance between the space points and the ith target space point is smaller than a preset distance;
executing the spatial point obtaining step;
calculating the cost value of each candidate space point in the heuristic search algorithm according to the position information of the target space points in the flight sub-path, the position information of the flight destination and the position information of each candidate space point through a cost function corresponding to the heuristic search model;
taking the candidate space point with the minimum cost value in the plurality of candidate space points as the (i + 1) th target space point;
and under the condition that the (i + 1) th target space point is not the flight destination, taking the (i + 1) th target space point as the ith target space point, and repeatedly executing the steps from the step of determining the flight sub-path corresponding to the ith target space point to the step of determining the candidate space point with the minimum cost value as the (i + 1) th target space point in the plurality of candidate space points until the (i + 1) th target space point is determined as the flight destination so as to obtain the plurality of target space points.
Optionally, the spatial point searching module 420 is configured to:
determining a target time point corresponding to each adjacent space point according to the position information of each target space point in the flight sub-path, the position information of each adjacent space point and the preset flight speed, wherein the target time point is a time point when the target aircraft flies from the ith target space point to reach each adjacent space point after flying to the ith target space point along the flight sub-path;
converting the target time point into a target time period according to a preset time error threshold;
and determining the alternative space point from the plurality of adjacent space points according to the target time period and the time planning information corresponding to each adjacent space point.
Optionally, the spatial point searching module 420 is configured to:
acquiring a first actual flight distance corresponding to the flight sub-path according to the position information of each target space point in the flight sub-path;
for each adjacent space point, determining a second actual flying distance from the ith target space point to the adjacent space point according to the position information of the ith target space point and the position information of the adjacent space point;
and determining the target time point according to the takeoff time point of the target aircraft, the first actual flight distance, the second actual flight distance and the preset flight speed.
Optionally, the spatial point searching module 420 is configured to:
and under the condition that the target time period corresponding to the first adjacent space point does not coincide with one or more no-fly time periods corresponding to the first adjacent space point, determining the first adjacent space point as the alternative space point, wherein the first adjacent space point is any one of the adjacent space points.
In summary, the technical solution provided by the embodiments of the present disclosure can determine a target space according to a flight starting point and a flight ending point of a target aircraft, where a plurality of spatial points exist in the target space, and the plurality of spatial points include: the flight starting point and the flight ending point, each space point corresponding to time planning information and position information, the time planning information comprising: one or more no-fly time periods, the time planning information being used to characterize that no generation of a flight path through the spatial point is allowed within the one or more no-fly time periods; in the searching process of searching a plurality of target space points which are required to be passed by the target aircraft from the flight starting point to the flight terminal point from the plurality of space points through a preset path searching model, under the condition of determining the ith target space point, executing a space point acquiring step of acquiring candidate space points required by searching the (i + 1) th target space point according to time planning information and position information corresponding to each space point and the preset flight speed of the target aircraft, wherein i is greater than or equal to 1, and the plurality of target space points comprise: the flight starting point and the flight ending point; and sequentially connecting the plurality of target space points to generate the flight path of the target aircraft. The method can add the no-fly time as a factor for node screening in the alternative node searching stage of the path searching, improve the accuracy of node searching and further improve the efficiency of flight path planning.
Illustratively, FIG. 5 is a block diagram illustrating an electronic device 500 according to an exemplary embodiment. Referring to fig. 5, an electronic device 500 comprises a processor 501, which may be one or more in number, and a memory 502 for storing computer programs executable by the processor 501. The computer program stored in memory 502 may include one or more modules that each correspond to a set of instructions. Further, the processor 501 may be configured to execute the computer program to perform the above-described method of generating a flight path.
Additionally, the electronic device 500 may also include a power component 503 and a communication component 504, the power component 503 may be configured to perform power management of the electronic device 500, and the communication component 504 may be configured to enable communication, e.g., wired or wireless communication, of the electronic device 500. In addition, the electronic device 500 may also include input/output (I/O) interfaces 505. The electronic device 500 may operate based on an operating system, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, etc., stored in the memory 502.
In another exemplary embodiment, a computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the above-described method of generating a flight path is also provided. For example, the computer readable storage medium may be the memory 502 described above including program instructions executable by the processor 501 of the electronic device 500 to perform the method of generating a flight path described above.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that, in the foregoing embodiments, various features described in the above embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, various combinations that are possible in the present disclosure are not described again.