A long-range path planning method of a UAV, an electronic device, and a storage medium
By dynamically adjusting obstacle information in UAV trajectory planning, the computational complexity problem in high-density flight and high-dynamic airspace environments is solved, enabling real-time trajectory planning and adjustment of UAVs in high-dynamic airspace environments and improving data processing efficiency.
Patent Information
- Application Number
- CN202511195452.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-08-26
AI Technical Summary
Existing UAV trajectory planning methods have high computational complexity in high-density flight and highly dynamic low-altitude airspace environments, which cannot meet the needs of real-time trajectory planning and cannot adapt to dynamic airspace environments.
A dynamic trajectory adjustment method based on obstacle information is adopted. The initial trajectory is calculated before the preset trajectory planning period. It is then determined whether new obstacle information has been received. If no new obstacle information is received, the initial trajectory is used directly. If a new obstacle information is received, a trajectory conflict is determined. If no new obstacle information is received, the trajectory is confirmed. Otherwise, trajectory planning is restarted to achieve seamless connection.
It reduces computational complexity, improves data processing efficiency, and enables real-time trajectory adjustment of UAVs in highly dynamic airspace environments, thus adapting to such environments.
Smart Images

Figure CN120740604B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of unmanned aerial vehicle (UAV) path planning technology, and in particular to a long-range path planning method, electronic device, and storage medium for UAVs. Background Technology
[0002] In the future high-density flight and highly dynamic low-altitude airspace environment, UAV trajectory planning needs to be dynamically adjusted according to the surrounding environment and should have good scalability to adapt to the continuously increasing number of UAVs. However, current UAV trajectory planning is mostly based on centralized planning methods. As the number of UAVs increases, the computational complexity required for planning increases rapidly, reducing computational accuracy and failing to meet the real-time trajectory planning needs of a large number of UAVs. On the other hand, it is mostly based on static planning of a given airspace environment, which cannot adapt to highly dynamic airspace environments. Summary of the Invention
[0003] To address the aforementioned technical problems, this invention provides a long-range path planning method, electronic device, and storage medium for unmanned aerial vehicles (UAVs), which can reduce the problem of excessive computational complexity and enable dynamic trajectory adjustment based on the surrounding environment of the UAV to adapt to the highly dynamic airspace environment.
[0004] According to a first aspect of the present invention, a long-range path planning method for an unmanned aerial vehicle (UAV) is provided, comprising the following steps:
[0005] S100, based on the obstacle information received before the start time of the preset trajectory planning period, calculate the initial trajectory of the target UAV within the preset airspace range; the preset starting point of the preset airspace range is the position point in the original trajectory of the target UAV corresponding to the current time T1.
[0006] S200: If no new obstacle information is received when calculating the initial trajectory, the initial trajectory is used as the target planned path; otherwise, it is determined whether there is a trajectory conflict between the obtained initial trajectory and the new obstacle. If there is a trajectory conflict, the original trajectory of the target UAV is continued to be executed at the preset starting point; otherwise, the initial trajectory is used as the trajectory to be confirmed.
[0007] S300 detects whether new obstacle information is received within the judgment period corresponding to the trajectory conflict. If it is received, the original trajectory of the target UAV continues to be executed at the preset starting point. Otherwise, the trajectory to be confirmed is determined as the target planned path.
[0008] S400: If the target UAV receives new obstacle information during the execution of the target planned path and determines that the new obstacle conflicts with the target planned path, restart the preset trajectory planning period and update the preset airspace range, return to the execution step S100, until the destination is reached; otherwise, take the preset target point in the preset airspace range as the new preset starting point and update the preset airspace range, determine the start time of the preset trajectory planning period and return to the execution step S100, until the destination is reached.
[0009] According to a second aspect of the present invention, a non-transitory computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement the above-described long-range path planning method for an unmanned aerial vehicle.
[0010] According to a third aspect of the present invention, an electronic device is provided, including a processor and the aforementioned non-transitory computer-readable storage medium.
[0011] The present invention has at least the following beneficial effects:
[0012] This invention provides a long-range path planning method for unmanned aerial vehicles (UAVs). First, based on obstacle information received before the start of a preset path planning period, the initial path of the target UAV within a preset airspace is calculated. It is then determined whether new obstacle information is received during the initial path calculation. If not, the initial path is directly used as the target planning path. If new obstacle information is received, it is determined whether there is a trajectory conflict with the initial path. If not, the initial path is designated as a path to be confirmed. Since new obstacle information may be received during the initial path calculation phase, there is no need to recalculate the path; only trajectory conflict needs to be determined, improving data processing efficiency. If no new obstacle information is received within the judgment period corresponding to the trajectory conflict, the path to be confirmed is determined as the target planning path. When the target UAV executes the target planning path, if a new obstacle with a trajectory conflict is detected, path planning is restarted; otherwise, a new path calculation is triggered before reaching the preset target point. This achieves path planning segment by segment, reducing the computational complexity caused by an increase in the number of UAVs. It enables real-time dynamic path adjustment of the UAV based on the surrounding environment, thereby adapting to a highly dynamic airspace environment. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 A flowchart of a long-range path planning method for an unmanned aerial vehicle (UAV) provided in an embodiment of the present invention;
[0015] Figure 2 This is a schematic diagram illustrating the positional relationship between a preset starting point and a preset target point, provided for an embodiment of the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] This invention provides a long-range path planning method for unmanned aerial vehicles (UAVs), such as... Figure 1 As shown, it includes the following steps:
[0018] S100: Based on obstacle information received before the start time of the preset trajectory planning period, calculate the initial trajectory of the target UAV within a preset airspace range. The preset starting point of the preset airspace range is the position point in the original trajectory of the target UAV corresponding to the current time T1. This can be understood as: the preset airspace range refers to the future trajectory segment of the target UAV within the preset trajectory planning period, that is, the range corresponding to a future segment of the target UAV's current trajectory. In specific implementations, the initial trajectory is calculated using a trajectory planning algorithm, such as the A-Star algorithm.
[0019] Specifically, the obstacle information includes dynamic obstacle information and static obstacle information. For example, static obstacle information includes obstacles such as buildings and trees whose height is within the planned flight path altitude range, and static obstacle information can be detected by airborne sensors.
[0020] Furthermore, the dynamic obstacle information includes broadcast messages sent by a given drone received by the target drone within a preset time window before the start time of the preset trajectory planning period, and dynamic flying objects detected by the target drone's onboard sensors. This can be understood as: the given drone being a drone within a certain airspace that has the probability of influencing the target drone's flight trajectory, such as a drone belonging to the same urban area as the target drone. In one implementation scenario, if a tree branch sways due to wind direction, it will be detected as a dynamic flying object by the onboard sensors.
[0021] Specifically, the duration corresponding to the preset flight path planning period is obtained through the following steps:
[0022] S01, based on the amount of data corresponding to the received obstacle information, estimate the acquisition time corresponding to the target planned path. For example, based on the historical calculation data volume and calculation time, estimate the acquisition time of the target planned path.
[0023] S02, the acquisition time corresponding to the target planned path is used as the time corresponding to the preset track planning time period.
[0024] Furthermore, T1 meets the following conditions:
[0025] T1≥T2+T0, where T2 is the duration corresponding to the preset trajectory planning period, and T0 is the preset fault tolerance duration. For example, the preset fault tolerance duration can be 1 second.
[0026] The above limits the duration and tolerance period of the preset flight path planning time, thereby estimating the flight distance of the target UAV after the flight duration, so as to reasonably determine the flight path segment to be planned, and ensure that the target planned path has been acquired before reaching the planned flight path segment, so that the target UAV can seamlessly connect the current flight path and the target planned path, and ensure the stable flight of the target UAV.
[0027] S200: If no new obstacle information is received when calculating the initial trajectory, the initial trajectory is used as the target planned path; otherwise, it is determined whether there is a trajectory conflict between the obtained initial trajectory and the new obstacle. If there is a trajectory conflict, the original trajectory of the target UAV is continued to be executed at the preset starting point; otherwise, the initial trajectory is used as the trajectory to be confirmed.
[0028] Specifically, the following steps are used to determine whether there is a trajectory conflict between the initial track and the new obstacle:
[0029] S201, if the new obstacle is a static obstacle, determine whether the closest distance between the initial trajectory and the static obstacle is less than a first preset distance threshold. Those skilled in the art can set the first preset distance threshold according to actual needs, which will not be elaborated here.
[0030] S202, if the distance is less than the first preset distance threshold, it is determined that there is a trajectory conflict between the initial trajectory and the new obstacle; otherwise, it is determined that there is no trajectory conflict between the initial trajectory and the new obstacle.
[0031] S203, if the new obstacle is a dynamic flying object, determine whether there is at least one point in time where the distance between the initial trajectory and the predicted trajectory of the dynamic flying object is less than a second preset distance threshold; wherein, the second preset distance threshold is greater than the first preset distance threshold. Those skilled in the art can set the second preset distance threshold according to actual needs, and will not elaborate further here.
[0032] S204. If there is at least one time point, it is determined that there is a trajectory conflict between the initial track and the new obstacle; otherwise, it is determined that there is no trajectory conflict between the initial track and the new obstacle.
[0033] As mentioned above, since new obstacle information may be received during the initial trajectory calculation phase, there is no need to recalculate the trajectory; it is only necessary to determine whether the trajectory conflicts, which improves data processing efficiency. When determining whether there is a trajectory conflict between the initial trajectory and the new obstacle, since the UAV is affected by wind and other factors, causing a slight deviation in flight position, a distance threshold is set. If the distance is less than the distance threshold, it is considered that there is a risk of trajectory conflict. Furthermore, since the predicted trajectory of dynamic flying objects has a certain deviation, a larger distance threshold is set for dynamic obstacles compared to static obstacles to avoid the risk of trajectory conflict and thus ensure the normal flight of the UAV.
[0034] S300 detects whether new obstacle information is received within the judgment period corresponding to the trajectory conflict. If it is received, the original trajectory of the target UAV continues to be executed at the preset starting point. Otherwise, the trajectory to be confirmed is determined as the target planned path.
[0035] As mentioned above, since the judgment time for trajectory conflict is much shorter than the calculation time for the initial trajectory, the probability of receiving new obstacle information during the trajectory conflict judgment process is extremely small. Based on this situation, the initial trajectory can be abandoned when new obstacle information is received, without needing to judge whether there is a trajectory conflict again. This avoids getting stuck in multiple loops, which would cause the acquisition time of the target planned path to be too long, and thus cause the target UAV to be unable to fly according to the target planned path at the preset starting point.
[0036] S400: If the target UAV receives new obstacle information during the execution of the target planned path and determines that the new obstacle conflicts with the target planned path, restart the preset trajectory planning period and update the preset airspace range, return to the execution step S100, until the destination is reached; otherwise, take the preset target point in the preset airspace range as the new preset starting point and update the preset airspace range, determine the start time of the preset trajectory planning period and return to the execution step S100, until the destination is reached.
[0037] Specifically, the start time of the predetermined preset flight path planning period refers to the time corresponding to the duration T1, which is the time when the predicted target UAV flies to the preset target point.
[0038] As described above, when the target UAV reaches the preset starting point, it will fly according to the target planned path and detect new obstacles through airborne sensors. If it is determined that the detected new obstacle conflicts with the target planned path, a new trajectory planning step will be restarted. If there is no trajectory conflict, the trajectory planning cycle needs to be started before reaching the target point, realizing trajectory planning one trajectory segment after another. This reduces the problem of excessive computational complexity caused by the increase in the number of UAVs, and enables the UAV to adjust its trajectory in real time according to the surrounding environment, thereby adapting to the highly dynamic airspace environment.
[0039] Furthermore, such as Figure 2 As shown, the preset target point within the preset airspace is obtained through the following steps:
[0040] S10, with the preset starting point as the center of the sphere, the intersection of the line connecting the preset starting point and the ending point with the sphere of radius R is set as the point to be confirmed; where R is the preset track planning segment length; it can be understood that the track length planned each time is R, that is, R refers to the distance between the preset starting point and the preset target point in the preset airspace range.
[0041] In one specific embodiment, the length of the preset trajectory planning segment is obtained through the following steps:
[0042] S11, based on the current position of the target UAV, obtains the total number of UAVs and the static object complexity score within the target airspace corresponding to the future original flight path of the target UAV; it can be understood that the target airspace is dynamically adjusted according to the current position of the target UAV each time the flight path is planned.
[0043] In practice, those skilled in the art set scoring rules for the total number of drones and the complexity of static objects based on actual needs. For example, the more drones there are, the higher the total drone count score; the more static objects within the target airspace, the higher the static object complexity score.
[0044] S12, based on the total number of drones within the target airspace and the static object complexity score, calculate the airspace complexity score corresponding to the target airspace.
[0045] Specifically, the spatial complexity score D corresponding to the target airspace range meets the following conditions:
[0046] D = w1 × d1 + w2 × d2, where d1 is the total number of drones score, d2 is the static object complexity score, and w1 and w2 are the preset weights corresponding to the total number of drones score and the static object complexity score, respectively.
[0047] S13. Based on the preset correspondence between airspace complexity score and trajectory planning segment length, the preset trajectory planning segment length is obtained. This can be understood as: there are several preset airspace complexity score intervals and several trajectory planning segment length intervals, and the airspace complexity score intervals and trajectory planning segment length intervals correspond one-to-one.
[0048] Specifically, the length of the pre-planned flight path segment is inversely proportional to the airspace complexity score.
[0049] S20. If the point to be confirmed is located inside any obstacle, use the point located outside the obstacle and closest to the point to be confirmed on the sphere as the target point; otherwise, use the point to be confirmed as the target point.
[0050] As mentioned above, when obtaining the preset trajectory planning segment length, the airspace complexity was considered, and two dimensions, namely the number of UAVs and static obstacles, were introduced to make the obtained airspace complexity more reasonable. Since the higher the airspace complexity, the greater the probability of UAV trajectory conflict, a smaller preset trajectory planning segment length was set to increase the trajectory planning frequency and effectively ensure the safe flight of the target UAV in a highly dynamic airspace environment.
[0051] Furthermore, after the target drone reaches the destination, it is necessary to perform drone path planning for the target location corresponding to the destination in order to clearly capture the target events within the target location. That is, the method also includes the following steps:
[0052] S1. When the target drone reaches the endpoint and the target location corresponding to the endpoint is a preset area type, acquire the target area image captured by the target drone. This can be understood as: the endpoint is the shooting point located directly above the target location and at an initial shooting height h1 from the center of the target location. In other words, h1 is the shooting height corresponding to the target area image.
[0053] Specifically, the target location is extracted from the received police incident recording instruction text using a pre-set large language model; the police incident recording instruction text also includes the target event. In practice, the natural language processing module determines whether the target location is a specific address or a region; this can be understood as: using a pre-trained binary classification model to determine whether the target location is a pre-set specific address type or a pre-set region type, for example, a specific location is a lane number, and a region can be a residential area or a park.
[0054] Specifically, the destination location is determined through the following steps:
[0055] Based on the boundary coordinates of the target location, mark the center point of the rectangular area corresponding to the boundary coordinates of the target location; this can be understood as: obtaining the boundary coordinates of the target location by calling the GIS module.
[0056] Based on the target drone's shooting parameters, the initial shooting height h1 corresponding to the center point of the rectangular area is determined, so that the range captured by the target drone at height h1 covers the rectangular area corresponding to the boundary coordinates of the target location. In the specific implementation, distortion is not considered.
[0057] Specifically, h1 meets the following conditions:
[0058] Where L and W are the length and width of the rectangular region, respectively, and α and β are the horizontal and vertical viewing angles of the camera, respectively.
[0059] Based on the center point of the rectangular area and the initial shooting height h1, the endpoint position is determined; this can be understood as: in the vertical direction corresponding to the center point of the rectangular area, the position at the initial shooting height h1 is determined as the target shooting point.
[0060] As mentioned above, when acquiring a full-view image of the target location, a larger calculated height is selected to ensure complete coverage of the rectangular area. By acquiring a full-view image of the target location, omissions in subsequent event information photography can be prevented, even when the specific location of the event is not described in the police report, thereby ensuring the comprehensiveness and reliability of the event information acquisition.
[0061] Furthermore, the method also includes the following steps:
[0062] When the target location is a preset specific address type, the GIS module is invoked to obtain the location coordinates of the target location, and the obtained location coordinates are used as the endpoint; the preset specific address type is positioning data accurate to the building unit.
[0063] The target trajectory is generated based on the trajectory planning algorithm so that the target UAV can fly to the destination according to the target trajectory.
[0064] In this implementation, when there is specific location information for the target location, a trajectory can be generated directly according to the trajectory planning algorithm, enabling the target drone to quickly reach the specific shooting location.
[0065] S2, based on the shooting range corresponding to the preset target shooting height h2, the target region image is segmented, and the target event occurrence label corresponding to each sub-region image is obtained; the target event occurrence label can be either present or absent; it can be understood as: each sub-region image obtained after segmentation is sent to the target event detection model to obtain the event corresponding to the sub-region image, and if the similarity with the target event is higher than the similarity threshold, the target event occurrence label corresponding to the sub-region image is set to: present.
[0066] Specifically, h2 < h1.
[0067] Furthermore, the target shooting height h2 is determined through the following steps:
[0068] Obtain a manually labeled historical image sample set; the historical image sample set includes a subset of image samples corresponding to each preset event type, and several shooting heights and event information corresponding to each subset of image samples. For example, the shooting heights can be 20m to 100m, with each 10m increment, and the event information can include the number of vehicles, the number of people, and fires, etc.
[0069] For any given preset event type, based on several shooting heights and event information, the event detection accuracy for each shooting height is obtained. This can be understood as comparing the detection results of the event detection module with the labeled event information to obtain the event detection accuracy. Different preset event types calculate their own event detection accuracy separately.
[0070] Based on the event detection accuracy corresponding to each shooting height, a height-accuracy relationship fitting curve is constructed for the preset event types.
[0071] Based on the preset event type corresponding to the target event, the maximum shooting height that meets the preset accuracy is found from the height-accuracy relationship fitting curve corresponding to the target event, and the maximum shooting height is determined as the target shooting height h2.
[0072] It should be noted that since this scheme is for a large area, the shooting height is usually less than the shooting height that covers the whole area in order to meet the preset accuracy. If there is a special case, that is, when h2≥h1, the accuracy can still be met, then h2=h1 is set.
[0073] As mentioned above, the acquired target area image is a large-scale image, which cannot clearly show local target events. Therefore, it is necessary to determine a suitable shooting height to ensure that the event detection accuracy meets the requirements, so that the acquired event information is more accurate and helps staff to grasp the event situation clearly in a timely manner and give reasonable handling measures.
[0074] Furthermore, in step S2, the target region image is segmented using the following steps:
[0075] S21, when the width of the shooting range corresponding to the target region image is an integer multiple of the width of the shooting range corresponding to the target shooting height h2, the target region image is averaged based on the shooting range corresponding to the target shooting height h2. This can be understood as follows: when the width of the shooting range P1 corresponding to the target region image is an integer multiple of the width of the shooting range P2 corresponding to the target shooting height h2, the length of P1 is also an integer multiple of the length of P2. In specific implementations, since the drone's shooting ratio is consistent, the ratio of the image's length to its width is a fixed value, and the number of sub-region images is the ratio of the area of P1 to the area of P2.
[0076] S22, when the width of the shooting range corresponding to the target area image is not an integer multiple of the width of the shooting range corresponding to the target shooting height h2, the length and width of the target area image are extended until the width of the shooting range corresponding to the virtual area box is an integer multiple of the width of the shooting range corresponding to the target shooting height h2; wherein, the virtual area box coincides with the center of the target area image.
[0077] S23, the virtual region box is averaged based on the shooting range corresponding to the target shooting height h2 to achieve the segmentation of the target region image; it can be understood as: the virtual region box is averaged according to its size, and the edge image after segmentation, after removing the extended blank area, is the sub-region image corresponding to the target region image.
[0078] As mentioned above, since the event detection accuracy of the image captured at the target shooting height is sufficient to meet the requirements, when segmenting the target location into regions, the target region image is averaged by using the shooting range corresponding to the target shooting height as a reference benchmark. This achieves the initial positioning of the shooting point when shooting at height h2, ensuring the comprehensiveness of event information within the target location and the accuracy of event information captured in each sub-region.
[0079] S3, according to the target event occurrence label in order from present to absent, traverse the waypoints corresponding to each sub-region image to generate the second flight path corresponding to the target shooting height h2.
[0080] Specifically, in step S3, waypoints corresponding to the sub-region image are obtained through the following steps:
[0081] S31, based on the pixel coordinates corresponding to the center point of the sub-region image, obtain the first world coordinates in the world coordinate system corresponding to the center point of the sub-region image.
[0082] Specifically, step S31 includes the following steps:
[0083] S311, convert the pixel coordinates corresponding to the center point of the sub-region image to the camera coordinates corresponding to the center point of the sub-region image; wherein, the camera coordinates corresponding to the center point of the sub-region image (Xc Y c Z c It meets the following conditions:
[0084] (X c Y c Z c = (Z0×(u-u0)×dx / f,Z0×(v-v0)×dy / f,Z0), where Z0 is the depth distance from the target point to the camera optical center, dx and dy represent the pixel size in the horizontal and vertical directions, respectively, f is the camera focal length, u and v are the x and y coordinates of the pixel coordinates corresponding to the center point of the sub-region image, and u0 and v0 are the x and y coordinates of the pixel coordinates corresponding to the principal point.
[0085] S312, converts the camera coordinates corresponding to the center point of the sub-region image to the first-world coordinates (X) corresponding to the center point of the sub-region image. e Y e Z e ).
[0086] Specifically, the conversion process meets the following conditions:
[0087] , where r is a 3×3 rotation matrix and t is a 3×1 translation vector.
[0088] S33, the vertical coordinates in the first world coordinate system are replaced by the target shooting height h2 to obtain the second world coordinates corresponding to each sub-region image; this can be understood as: the second world coordinates corresponding to the sub-region image refer to the world coordinates corresponding to the target shooting height mapped to the sub-region image.
[0089] S35 uses the second world coordinates corresponding to each sub-region image as the waypoints of the corresponding sub-region image; this can be understood as: the second world coordinates include longitude, latitude and vertical altitude.
[0090] As described above, the corresponding waypoints are calculated from the center point of the sub-region image, enabling the UAV to capture the entire area of the sub-region image when shooting at the waypoint location. The shooting height is also lower, and the clarity is higher, which helps to improve the accuracy of event information recognition.
[0091] Furthermore, step S3 also includes the following steps:
[0092] S32, starting from the target shooting point, and based on the waypoints corresponding to several sub-region images with target event occurrence labels, generates the first sub-pathway through a path planning algorithm. For example, the path planning algorithm could be the A-Star algorithm.
[0093] S34, taking the last waypoint in the first sub-route as the new starting point, and based on the waypoints corresponding to several sub-region images with the target event label as none, the second sub-route is generated through a trajectory planning algorithm.
[0094] S36, merging the first sub-route and the second sub-route to obtain the second route; this can be understood as: merging the first sub-route and the second sub-route means connecting the end point of the first sub-route and the beginning point of the second sub-route.
[0095] As described above, by segmenting the target area image according to the shooting range at the target shooting height and obtaining the waypoints corresponding to the target shooting height for each sub-region image, the flight path of the UAV can be obtained. This allows the UAV to shoot sub-regions at each waypoint while flying along the flight path, which helps improve the accuracy of event information recognition. Furthermore, by generating the flight path in order from present to absent labels, it is beneficial to capture the target event in a timely manner, obtain event information promptly, and improve event processing efficiency.
[0096] S4: Acquire the images to be analyzed corresponding to each sub-region captured sequentially by the target UAV along the second flight path and perform real-time detection of target events until a target event is detected in the images to be analyzed, and then send the corresponding images to be analyzed to the background; This can be understood as: the UAV takes pictures at each waypoint in the second flight path.
[0097] Specifically, each sub-region corresponds one-to-one with its corresponding sub-region image; this can be understood as: a sub-region refers to the ground region corresponding to the sub-region image.
[0098] As described above, when the target event detection module detects a target event, it promptly sends the corresponding image to be analyzed to the control center and terminates the task. The flight path obtained in this way enables the target UAV to quickly and accurately detect the specific location and event information of the event.
[0099] Furthermore, step S4 also includes the following steps:
[0100] S41, when a target event is detected in the image to be analyzed, the event occurrence area corresponding to the target event in the image to be analyzed is determined; this can be understood as: when the event detection module detects a target event, it can identify the event occurrence area.
[0101] S42, if the center point of the event occurrence area is within the preset center range of the image to be analyzed, the image to be analyzed is sent to the background and the flight ends; otherwise, the image to be analyzed is sent to the background and the target UAV is controlled to translate to the position corresponding to the target shooting height h2 of the center point of the event occurrence area according to the preset translation step size, and a new image to be analyzed is captured at the end of the translation, and the process returns to step S41 until the flight ends; those skilled in the art can set the preset translation step size according to actual needs, for example, 5m.
[0102] As mentioned above, when capturing the target event, the position of the target event in the image to be analyzed is also taken into consideration. When the position of the target event is significantly offset, it is considered that only a part or a small part of the target event's occurrence area has been captured. Therefore, the waypoints at this time need to be adjusted to change the flight trajectory, moving the UAV along the direction of the center of the event's occurrence area while keeping the flight altitude constant. This ensures that the image to be analyzed after being captured again can contain more of the event's occurrence area. Real-time dynamic adjustment of the flight path is beneficial for the overall event identification and summary analysis.
[0103] Embodiments of the present invention also provide a non-transitory computer-readable storage medium that can be disposed in an electronic device to store at least one instruction or at least one program related to implementing a method in the method embodiments, wherein the at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the above embodiments.
[0104] Embodiments of the present invention also provide an electronic device, including a processor and the aforementioned non-transitory computer-readable storage medium.
[0105] While specific embodiments of the invention have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of the invention. It should also be understood that various modifications can be made to the embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.
Claims
1. A long-range path planning method for a UAV, characterized in that, The method comprises the following steps: S100, calculating an initial flight path of the target UAV in a preset airspace range based on obstacle information received before a starting time of a preset flight path planning period; a preset starting point of the preset airspace range is a position point corresponding to a time length from a current time T1 in an original flight path of the target UAV; S200, if no new obstacle information is received when the initial flight path is calculated, taking the initial flight path as the target planning path; On the contrary, judging whether the initial flight path and the new obstacle exist in trajectory conflict, if the trajectory conflict exists, continuing to execute the original flight path of the target UAV at the preset starting point, otherwise, taking the initial flight path as a to-be-confirmed flight path; S300, detecting whether new obstacle information is received in a judgment period corresponding to the trajectory conflict, if the new obstacle information is received, continuing to execute the original flight path of the target UAV at the preset starting point, otherwise, determining the to-be-confirmed flight path as the target planning path; S400, if new obstacle information is received during execution of the target planning path by the target UAV and it is judged that the new obstacle and the target planning path exist in trajectory conflict, restarting the preset flight path planning period and updating the preset airspace range, returning to execute the step S100 until a terminal point is reached; On the contrary, taking a preset target point of the preset airspace range as a new preset starting point and updating the preset airspace range, determining a starting time of the preset flight path planning period and returning to execute the step S100 until the terminal point is reached. 2.The long-range path planning method of the UAV according to claim 1, wherein, The length of the preset flight path planning period is obtained through the following steps: S01, estimating the acquisition length of the target planning path according to the data amount of the received obstacle information; S02, taking the acquisition length of the target planning path as the length of the preset flight path planning period. 3.The method of claim 1, wherein, The obstacle information comprises dynamic obstacle information and static obstacle information; The dynamic obstacle information comprises broadcast messages sent by a given UAV and dynamic flying objects detected by an on-board sensor of the target UAV received by the target UAV in a preset time window before the starting time of the preset flight path planning period. 4.The method of claim 1, wherein, T1 meets the following condition: T1≥T2+T0, wherein T2 is the length of the preset flight path planning period, and T0 is a preset fault tolerance length. 5.The long-range path planning method of the UAV of claim 1, wherein, In the step S200, whether the initial flight path and the new obstacle exist in trajectory conflict is judged through the following steps: S201, if the new obstacle is static, judging whether the closest distance between the initial flight path and the static obstacle is less than a first preset distance threshold; S202, if the closest distance is less than the first preset distance threshold, determining that the initial flight path and the new obstacle exist in trajectory conflict, otherwise, determining that the initial flight path and the new obstacle do not exist in trajectory conflict; S203, if the new obstacle is a dynamic flying object, judging whether there is at least one time point such that the distance between the initial flight path and the predicted trajectory of the dynamic flying object is less than a second preset distance threshold; wherein the second preset distance threshold is greater than the first preset distance threshold; S204, if there is at least one time point, determining that the initial flight path and the new obstacle exist in trajectory conflict; otherwise, determining that the initial flight path and the new obstacle do not exist in trajectory conflict. 6.The long-range path planning method of the UAV of claim 1, wherein, The preset target point in the preset airspace range is obtained through the following steps: S10, taking the preset starting point as the center of a sphere, setting the intersection between the line connecting the preset starting point and the ending point and the sphere with a radius R as a to-be-confirmed point, wherein R is the preset path planning section length; S20, if the to-be-confirmed point is located inside any obstacle, using a point located outside the obstacle and closest to the to-be-confirmed point on the sphere as the target point, otherwise, using the to-be-confirmed point as the target point. 7.The long-range path planning method of the UAV according to claim 6, wherein, The preset path planning section length is obtained through the following steps: S11, taking the current position of the target UAV as a reference, obtaining the total number score of UAVs and the static object complexity score in the target airspace range corresponding to the future original flight path of the target UAV; S12, calculating the airspace complexity degree score corresponding to the target airspace range according to the total number score of UAVs and the static object complexity score in the target airspace range; S13, obtaining the preset path planning section length according to the preset corresponding relationship between the airspace complexity degree score and the path planning section length; wherein the preset path planning section length is inversely proportional to the airspace complexity degree score. 8.The method of claim 1, wherein, The method further comprises the following steps: S1, when the target UAV reaches the ending point and the target location corresponding to the ending point is a preset region type, obtaining a target region image photographed by the target UAV: S2, according to the photographing range corresponding to the preset target photographing height h2, cutting the target region image, and obtaining a target event occurrence label corresponding to each sub-region image; the target event occurrence label is any one of yes and no; wherein h2 S3, traversing the flight path points corresponding to each sub-region image in the order from yes to no according to the target event occurrence label, and generating a second flight line corresponding to the target photographing height h2; S4, obtaining a to-be-analyzed image corresponding to each sub-region photographed by the target UAV according to the second flight line, and performing real-time detection of the target event, until the target event is detected from the to-be-analyzed image, the corresponding to-be-analyzed image is sent to the background; wherein the sub-region corresponds to the sub-region image one by one. 9.A non-transitory computer-readable storage medium having stored therein at least one instruction or at least one piece of program, characterized in that, The at least one instruction or the at least one program is loaded and executed by the processor to implement the long-range path planning method of the UAV according to any one of claims 1-8.
10. An electronic device, comprising: The processor and the non-transitory computer readable storage medium described in claim 9. The processor and the non-transitory computer readable storage medium described in claim 9.
Citation Information
Patent Citations
Unmanned plane path planning method
CN108958293A
Test system and method for unmanned aerial vehicle detection device
CN113960644A