Unmanned aerial vehicle trajectory optimization method and device, computer equipment and storage medium
By filtering and processing flight trajectories acquired by different front-end sensing devices in the drone trajectory database, Kalman filtering and accompanying flight trajectory processing methods are used to solve the problem of discontinuity of drone trajectory in complex urban environments, and maximize reproduction and optimization of drone trajectory.
Patent Information
- Application Number
- CN202510341828.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-06-27
AI Technical Summary
In complex urban environments, due to the limitations of the position requirements of front-end sensing equipment, the drone trajectories acquired by different types of front-end sensing equipment are discontinuous, resulting in the problems of fracture and discontinuity of the flight trajectory acquired in the trajectory database.
By obtaining all flight trajectories in the relevant monitoring airspace in the flight trajectory database, selecting a smooth continuous flight trajectory as the reference trajectory, filtering the flight trajectory near the reference trajectory, and determining whether there is a time intersection with the reference trajectory. If there is no time intersection, Kalman filter is used to optimize the reference trajectory to complete the fractured part; if there is time intersection, the process is a companion flight trajectory and fuse it to form a continuous complete flight trajectory.
Maximum reproduction and optimization of the drone trajectory within the target time interval is achieved, forming a continuous and complete flight trajectory, and solving the problem of discontinuity in the drone flight path.
Smart Images

Figure CN120215523A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicles, and in particular to a method and device for optimizing the trajectory of an unmanned aerial vehicle, a computer device, and a storage medium. Background Art
[0002] Based on detection means such as radio technology, 5G communication technology, and artificial intelligence, the way to solve the pain points and difficulties of unmanned aerial vehicle supervision with a low-cost and low-radiation solution provides a direction for the construction of low-altitude safety defense. In the face of a complex urban environment, the current mainstream idea is to use multi-modal front-end perception devices for joint networking. Through technologies such as radar and radio, a combination of distributed reconnaissance and key countermeasures is adopted to make up for the detection blind spots of a single device.
[0003] In actual situations, due to the limitations of the installation point requirements of front-end perception devices, different types of front-end perception devices obtain different trajectories for the same target, resulting in discontinuous and broken flight trajectories obtained in the trajectory database during the target time interval, or different trajectories in the same time period or the phenomenon of trajectory accompanying in a certain period of time. Since the detection principles of each front-end perception device are different and data intercommunication cannot be achieved, therefore, within the target time interval, a continuous and complete flight trajectory cannot be formed.
[0004] How to splice the multi-segment flight trajectories obtained by different front-end perception devices to form a continuous and complete flight trajectory within the target time interval, so as to achieve the reproduction of the complete trajectory of the unmanned aerial vehicle and optimize the flight path of the unmanned aerial vehicle is an urgent problem to be solved by those skilled in the art. Summary of the Invention
[0005] The present invention provides a method and device for optimizing the trajectory of an unmanned aerial vehicle, a computer device, and a storage medium to solve the problem of repairing flight trajectories.
[0006] In a first aspect, a method for optimizing the trajectory of an unmanned aerial vehicle is provided, including:
[0007] Obtain all flight trajectories of a relevant monitoring airspace within a specific time interval in a flight trajectory database;
[0008] Select a smooth and continuous flight trajectory from all flight trajectories as a reference trajectory;
[0009] Screen the flight trajectories within a preset time range near the reference trajectory to form an adjacent trajectory set;
[0010] Randomly obtain a first adjacent trajectory from the adjacent trajectory set, and determine whether there is a time intersection between the first adjacent trajectory and the reference trajectory;
[0011] If there is no time intersection between the first adjacent trajectory and the reference trajectory, it is determined that there is a trajectory break between the first adjacent trajectory and the reference trajectory, and the Kalman filter is used to optimize the reference trajectory to obtain a complete and continuous flight path;
[0012] If there is a time intersection between the first adjacent trajectory and the reference trajectory, it is determined that there are different flight trajectories within the same time period, and the flight trajectories that overlap or partially overlap with the reference trajectory are processed as accompanying flight trajectories.
[0013] In a second aspect, a UAV trajectory optimization device is provided, including:
[0014] A flight trajectory acquisition module, configured to acquire all flight trajectories in a relevant monitored airspace within a specific time interval from a flight trajectory database;
[0015] A reference trajectory selection module, configured to select a smooth and continuous flight trajectory from all flight trajectories as a reference trajectory;
[0016] An adjacent trajectory screening module, configured to screen the flight trajectories within a preset time range near the reference trajectory to form an adjacent trajectory set;
[0017] A time intersection judgment module, configured to randomly acquire a first adjacent trajectory from the adjacent trajectory set and judge whether there is a time intersection between the first adjacent trajectory and the reference trajectory;
[0018] A reference trajectory optimization module, configured to, if there is no time intersection between the first adjacent trajectory and the reference trajectory, determine that there is a trajectory break between the first adjacent trajectory and the reference trajectory, and use the Kalman filter to optimize the reference trajectory to obtain a complete and continuous flight path;
[0019] An accompanying flight trajectory processing module, configured to, if there is a time intersection between the first adjacent trajectory and the reference trajectory, determine that there are different flight trajectories within the same time period, and process the flight trajectories that overlap or partially overlap with the reference trajectory as accompanying flight trajectories.
[0020] In a third aspect, a computer device is provided, the computer device includes a memory and a processor, a computer program is stored on the memory, and when the processor executes the computer program, the steps of the above UAV trajectory optimization method are implemented.
[0021] In a fourth aspect, a storage medium is provided, the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above UAV trajectory optimization method can be implemented.
[0022] The beneficial effects of the present invention are as follows: By combining different algorithms, it is possible to judge and process multiple trajectories within a closed airspace within a target time interval, form a continuous and complete flight trajectory within the target time interval, thereby achieving the maximum reproduction of the UAV trajectory and optimizing the flight path of the UAV. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The following details the specific structure of the present invention in conjunction with the accompanying drawings.
[0024] Figure 1 It is a flowchart of the UAV trajectory optimization method according to an embodiment of the present invention;
[0025] Figure 2 It is a processing flowchart when the accompanying flight trajectory and the reference trajectory completely coincide according to an embodiment of the present invention;
[0026] Figure 3 It is a processing flowchart when the accompanying flight trajectory and the reference trajectory partially coincide according to an embodiment of the present invention;
[0027] Figure 4 It is a block diagram of the UAV trajectory optimization device according to an embodiment of the present invention;
[0028] Figure 5 It is a schematic diagram of a missing flight trajectory according to an embodiment of the present invention;
[0029] Figure 6 It is a schematic diagram of an accompanying flight trajectory according to an embodiment of the present invention;
[0030] Figure 7 It is a schematic block diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0031] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0032] It should be understood that when used in this specification and the appended claims, the terms "comprises" and "comprising" indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0033] It should also be understood that the terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms.
[0034] It should be further understood that the term "and / or" used in the specification of the present invention and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0035] As Figure 1 shown, the first embodiment of the present invention is: a method for optimizing the trajectory of an unmanned aerial vehicle, comprising the steps of:
[0036] S10. Obtain all flight trajectories of the relevant monitored airspace within a specific time interval from the flight trajectory database.
[0037] Step S10 specifically includes dividing the monitored airspace according to the two-dimensional matrix grid method on a two-dimensional grid map, presenting the flight trajectories in the form of line segments or points in the two-dimensional grid map, selecting all flight trajectories within the target time period to form a flight trajectory map of the monitored airspace in the target time period. Due to different front-end sensing devices for trajectory acquisition and different acquisition principles, there will be many missing flight trajectories in the flight trajectory map.
[0038] In this embodiment, a continuous flight trajectory refers to a flight trajectory that is complete and continuous as obtained in chronological order. A missing flight trajectory refers to a flight trajectory that is discontinuous such as missing, omitted, or broken as obtained in chronological order. An accompanying flight trajectory refers to a flight trajectory that overlaps or partially overlaps with a reference trajectory.
[0039] S20. Select a smooth and continuous flight trajectory from all flight trajectories as a reference trajectory.
[0040] As Figure 5 shown, based on the flight trajectory map, select a smooth and continuous flight trajectory within a specific time period in chronological order as a reference trajectory. The starting and ending points of the reference trajectory are respectively marked as A and B, and the corresponding starting and ending times are respectively T1 and T2. The matrix grids where A and B are located are the first grid and the second grid respectively.
[0041] S30. Screen the flight trajectories within a preset time range near the reference trajectory to form an adjacent trajectory set.
[0042] Step S30 specifically includes: encoding the two-dimensional grid map and the trajectory coordinates within the period from the starting point to the ending point of the reference trajectory by using the GeoHash algorithm, where the grid where the starting point is located is the first grid, and the grid where the ending point is located is the second grid; obtaining the GeoHash encodings of the spatial coordinates of the starting point and the ending point and the GeoHash encodings of the first grid and the second grid; and obtaining all flight trajectories within t time durations adjacent to the starting moment in the adjacent matrix grids of the first grid according to the GeoHash encodings of the first grid and the second grid as the adjacent trajectory set.
[0043] In this embodiment, the two-dimensional grid map and the trajectory coordinates within the period T1 - T2 of the reference trajectory are encoded by using the GeoHash algorithm to obtain the GeoHash encodings of the spatial coordinates of the starting point A and the ending point B and the GeoHash encodings of the first grid and the second grid, and all flight trajectories within t time durations adjacent to the T1 moment in the adjacent matrix grids of the first grid are obtained according to the GeoHash encodings of the first grid and the second grid as the adjacent trajectory set.
[0044] S40. Randomly obtain a first adjacent trajectory from the adjacent trajectory set, and determine whether there is a time intersection between the first adjacent trajectory and the reference trajectory.
[0045] S50. If there is no time intersection between the first adjacent trajectory and the reference trajectory, it is determined that there is a trajectory break between the first adjacent trajectory and the reference trajectory, and the reference trajectory is optimized by using Kalman filtering to obtain a complete and continuous flight path.
[0046] Step S50 specifically includes:
[0047] Obtain the trajectory end point of the first adjacent trajectory, marked as C, and the corresponding moment is T0; predict the flight trajectory of point C at the starting moment T1 through the preset state transition matrix F, observation matrix H, observation noise covariance matrix R, and process noise covariance matrix Q according to the flight angle and flight speed of point C at the moment T0 to obtain the flight trajectory prediction point C'.
[0048] State space model:
[0049] The state of the UAV can be represented by the following vector:
[0050]
[0051] Among them: x k , y k are the positions of the UAV at moment k, that is, longitude and latitude; is the speed of the UAV at moment k.
[0052] State transition equation:
[0053] In Kalman filtering, the predicted state is calculated from the previous state through the state transition matrix F and the control input u:
[0054]
[0055] Among them, the state transition matrix F is initially designed as:
[0056]
[0057] Among them, Δt is the time step, representing the time interval from k - 1 to k.
[0058] For the control input Since information such as aircraft acceleration data or other external force effects cannot be obtained.
[0059]
[0060] Observation model:
[0061] The observation model associates the observations of the Kalman filter with the state variables of the system. The observations in this embodiment are GPS latitude and longitude data. The linear representation of the observation model is:
[0062] Among them, is the observation value, which is also the latitude and longitude. H is the observation matrix. Initially:
[0063]
[0064] Prediction step:
[0065] Predicted state:
[0066] Predicted covariance: Among them, P k-1 is the error covariance matrix of the previous step, and Q is the process noise covariance matrix, representing the uncertainty of the model.
[0067] Update step:
[0068] Kalman gain: Among them, R is the observation noise covariance matrix, representing the uncertainty of the observation, as the initial value.
[0069] Update the estimated value:
[0070] Update the covariance matrix: Among them:
[0071]
[0072] Based on the known position and velocity of the previous point, the predicted state, that is, the future position and velocity of the UAV, can be obtained through a Kalman filter. For estimating the longitude and latitude k seconds in the future, the following formula can be used:
[0073] where and are the velocity components at time k, and t is the future predicted time.
[0074] After obtaining the spatial coordinates of the predicted point, the flight angle and flight speed between the predicted point C' and the starting point A of the reference trajectory are obtained respectively. It is judged whether the difference in flight angles between the two is less than the preset angle. If so, it is further judged whether the distance between C' and the starting point A of the reference trajectory is less than the preset distance threshold. If so, it is determined that the first similar trajectory is the pre-trajectory of the reference trajectory at time T0. Taking the first similar trajectory as the target similar trajectory, the Kalman filter is used to complete the missing part between the target similar trajectory and the reference trajectory, and the smoothed processing is performed on the completed trajectory to complete the trajectory fusion. If not, the second similar trajectory is reselected from the set of similar trajectories to repeat the above operations until the target similar trajectory is found and the trajectory fusion is completed, obtaining the complete and continuous flight path of the UAV within the two-dimensional grid map.
[0075] In this embodiment, if there are multiple similar trajectories whose flight angle differences between the end points and the starting point of the reference trajectory are less than the preset angle or the distances are less than the preset distance, the one with the smallest flight angle difference or the shortest distance is selected as the target similar trajectory.
[0076] S60. If there is a time intersection between the first adjacent trajectory and the reference trajectory, it is determined that there are different flight trajectories within the same time period, and the flight trajectory that overlaps or partially overlaps with the reference trajectory is processed as an accompanying flight trajectory. As Figure 6 shown, it includes two cases:
[0077] Case 1. The time interval of the accompanying flight trajectory completely coincides with the time interval of the reference trajectory, that is, the time interval of the accompanying flight trajectory is a time sub-interval of the reference trajectory, or the time interval of the reference trajectory is a time sub-interval of the accompanying flight trajectory; then as Figure 2 shown, steps S601 - S604 are executed.
[0078] S601. If the time interval of the accompanying flight trajectory completely coincides with the time interval of the reference trajectory, within the overlapping time interval, the Douglas - Peucker algorithm is used to compress the time - overlapping part of the accompanying flight trajectory and the reference trajectory;
[0079] S602. The LCSS algorithm is used to calculate the similarity of the flight trajectories in the time - overlapping part;
[0080] S603. When the similarity exceeds a preset threshold, it is determined that the reference trajectory and the accompanying flight trajectory are the flight trajectories of a single - body unmanned aerial vehicle (UAV), and trajectory fusion is performed to obtain the unique flight trajectory of the UAV during this time period after optimization;
[0081] S604. If the similarity does not exceed the preset similarity threshold, re - select the accompanying flight trajectory.
[0082] In this embodiment, within the overlapping time interval, the Douglas - Peucker algorithm is used to compress the time - overlapping part of the accompanying flight trajectory and the reference trajectory, obtaining a unique, complete, and smooth trajectory curve for the overlapping part. Thus, non - key points can be removed while ensuring the same motion trend, improving the operation speed.
[0083] In this embodiment, the LCSS algorithm is used to calculate the similarity of the trajectories in the time - overlapping part. When the similarity exceeds the preset similarity threshold, it is determined that the reference trajectory and the accompanying flight trajectory are the flight trajectories of a single - body UAV, and trajectory fusion is performed to obtain the unique flight trajectory of the UAV during this time period after optimization; if the similarity does not exceed the preset similarity threshold, re - select the accompanying flight trajectory.
[0084] In this embodiment, using the LCSS algorithm to calculate the similarity of flight trajectories can avoid the large impact on the similarity calculation result caused by very small differences when using DTW and Euclidean distance, thus more accurately measuring the similarity of these two flight trajectories.
[0085] In this embodiment, due to the different detection principles of different types of front - end sensing devices, the accuracy of the detected UAV trajectories is different, and the detection results vary greatly. In an actual scenario, multiple front - end devices usually work simultaneously. Therefore, it is necessary to set priorities for the detection results of different front - end devices, which can be determined according to the accuracy of the front - end sensing devices from high to low. According to the preset priority of the front - end sensing devices, select the flight trajectory of the front - end sensing device with a higher priority for the time - overlapping part; since different flight environments will affect the detection accuracy of different types of front - end sensing devices, it is also possible to perform weight allocation on the trajectory priorities of different front - end sensing devices according to the actual situation of the UAV flight environment, so as to calculate a more accurate flight trajectory close to the actual flight path. For example: when the UAV is flying at an altitude above 120 meters, the flight trajectory detected by radar is more accurate than the flight trajectory detected by radio; when the UAV is flying close to a building, the flight trajectory detected by radio is more accurate than the flight trajectory detected by radar.
[0086] Case 2. There is partial overlap between the time interval of the accompanying flight trajectory and the time interval of the reference trajectory, then as Figure 3As shown, steps S611 - S613 are executed.
[0087] S611. If there are multiple partially overlapping accompanying flight trajectories, comprehensively judge based on the flight speed, flight angle, and coincidence time of the coincidence points between the accompanying flight trajectories and the reference trajectory to obtain the closest accompanying flight trajectory;
[0088] S612. Divide the accompanying flight trajectory into an independent trajectory and a coincidence trajectory;
[0089] S613. Fuse the coincidence trajectory, and use the independent trajectory as the pre - trajectory at the previous moment of the reference trajectory, so as to obtain the unique flight trajectory of the UAV at the coincidence time.
[0090] In this embodiment, if there are multiple partially overlapping accompanying flight trajectories, the accompanying flight trajectories can be screened first. Comprehensively judge based on the flight speed, flight angle, and coincidence time of the starting coincidence points between the accompanying flight trajectories and the reference trajectory. The flight angle, flight speed, and coincidence time can be comprehensively evaluated according to the priority, and the weight ratio is allocated according to the actual situation, so as to obtain the complete accompanying flight trajectory.
[0091] For the end point B of the reference trajectory and the second grid, the specific method refers to the above process, so as to obtain the pre - trajectory at T1 moment and the subsequent trajectory at T2 moment of the reference trajectory, and fuse the pre - trajectory, reference trajectory, and subsequent trajectory to obtain the unique flight trajectory of the single - body UAV in the two - dimensional grid map.
[0092] The flight trajectory deviation may be caused by reasons such as surrounding electromagnetic environment interference, self - positioning error of the front - end sensing device or north - facing angle error, and excessive buildings. When the distance between two flight trajectories is within the preset error range, this part of the error can be ignored, and the two trajectories are considered to represent the trajectories of the same target.
[0093] In summary, the solution of the present invention combines different algorithms to realize the judgment and processing of multiple segments of trajectories in a closed airspace within a target time interval, fill in the missing - detection part of the trajectories, identify and fuse different trajectories in the same time period, form a continuous and complete flight trajectory within the target time interval, so as to maximize the reproduction of the UAV trajectory and optimize the flight path of the UAV.
[0094] As Figure 4 shown, the embodiment of the present invention also provides a UAV trajectory optimization device, including:
[0095] A flight trajectory acquisition module 10, configured to acquire all flight trajectories in a relevant monitored airspace within a specific time interval from a flight trajectory database;
[0096] The reference trajectory selection module 20 is used to select a smooth and continuous flight trajectory from all flight trajectories as the reference trajectory;
[0097] The adjacent trajectory screening module 30 is used to screen the flight trajectories within a preset time range near the reference trajectory to form an adjacent trajectory set;
[0098] The time intersection judgment module 40 is used to randomly obtain the first adjacent trajectory from the adjacent trajectory set and judge whether there is a time intersection between the first adjacent trajectory and the reference trajectory;
[0099] The reference trajectory optimization module 50 is used to, if there is no time intersection between the first adjacent trajectory and the reference trajectory, determine that there is a trajectory break between the first adjacent trajectory and the reference trajectory, and use Kalman filtering to optimize the reference trajectory to obtain a complete and continuous flight path;
[0100] The accompanying flight trajectory processing module 60 is used to, if there is a time intersection between the first adjacent trajectory and the reference trajectory, determine that there are different flight trajectories within the same time period, and process the flight trajectories that overlap or partially overlap with the reference trajectory as accompanying flight trajectories.
[0101] The flight trajectory acquisition module 10 is specifically used for:
[0102] On a two-dimensional grid map, the monitored airspace is divided according to the two-dimensional matrix grid method, and the flight trajectories are presented in the form of line segments or points in the two-dimensional grid map. All flight trajectories within the target time period are selected to form a flight trajectory map of the monitored airspace in the target time period, and there are many missing flight trajectories in the target time period.
[0103] The adjacent trajectory screening module 30 is specifically used for:
[0104] The GeoHash algorithm is used to encode the two-dimensional grid map and the trajectory coordinates from the starting point to the ending point of the reference trajectory. Among them, the grid where the starting point is located is the first grid, and the grid where the ending point is located is the second grid; the GeoHash codes of the spatial coordinates of the starting point and the ending point and the GeoHash codes of the first grid and the second grid are obtained;
[0105] According to the GeoHash codes of the first grid and the second grid, all flight trajectories within t time duration adjacent to the starting moment in the adjacent matrix grid of the first grid are obtained as the adjacent trajectory set.
[0106] The reference trajectory optimization module 50 is specifically used for:
[0107] Obtain the trajectory end point of the first adjacent trajectory, marked as C, and the corresponding moment is T0;
[0108] According to the flight angle and flight speed of point C at time T0, through the preset state transition matrix F, observation matrix H, observation noise covariance matrix R, and process noise covariance matrix Q, predict the flight trajectory of point C at time T1 to obtain the flight trajectory prediction point C';
[0109] After obtaining the spatial coordinates of the prediction point, respectively obtain the flight angle and flight speed of the prediction point C' and the starting point A of the reference trajectory, and determine whether the difference in their flight angles is less than the preset angle. If so, continue to determine whether the distance between C' and the starting point of the reference trajectory is less than the preset distance threshold. If so, determine that the first similar trajectory is the pre-trajectory of the reference trajectory at time T0;
[0110] Take the first similar trajectory as the target similar trajectory, use Kalman filtering to complete the missing part between the target similar trajectory and the reference trajectory, and smooth the completed trajectory to complete trajectory fusion;
[0111] If not, re-select the second similar trajectory from the set of similar trajectories and repeat the above operations until the target similar trajectory is found and trajectory fusion is completed to obtain the complete and continuous flight path of the UAV within the two-dimensional grid map.
[0112] The accompanying flight trajectory processing module 60 is specifically used for:
[0113] If the time interval of the accompanying flight trajectory completely coincides with the time interval of the reference trajectory, that is, the time interval of the accompanying flight trajectory is a time sub-interval of the reference trajectory, or the time interval of the reference trajectory is a time sub-interval of the accompanying flight trajectory; within the overlapping time interval, use the Douglas-Peucker algorithm to compress the time overlapping part of the accompanying flight trajectory and the reference trajectory;
[0114] Perform a similarity operation on the trajectories in the time overlapping part through the LCSS algorithm. When the similarity exceeds the preset similarity threshold, determine that the reference trajectory and the accompanying flight trajectory are the flight trajectories of a single UAV, perform trajectory fusion, and obtain the unique flight trajectory of the UAV within this time period after optimization; if the similarity does not exceed the preset similarity threshold, re-select the accompanying flight trajectory.
[0115] The accompanying flight trajectory processing module 60 is specifically used for:
[0116] If there is partial overlap between the time interval of the accompanying flight trajectory and the time interval of the reference trajectory, divide the accompanying flight trajectory into an independent trajectory and an overlapping trajectory;
[0117] Fuse the overlapping trajectories, and use the independent trajectory as the pre-trajectory at the previous moment of the reference trajectory, so as to obtain the unique flight trajectory of the UAV from time T0 to time T2.
[0118] The accompanying flight type flight trajectory processing module 60 is specifically configured to:
[0119] If there is a time intersection between the first adjacent trajectory and the reference trajectory, it is determined that there are different flight trajectories within the same time period. Treating the flight trajectory that overlaps or partially overlaps with the reference trajectory as an accompanying flight type flight trajectory further includes:
[0120] If there are multiple accompanying flight type flight trajectories with partial overlaps, first screen the accompanying flight type flight trajectories, and comprehensively judge according to the flight speed, flight angle and coincidence time of the coincidence points of the accompanying flight type flight trajectories and the reference trajectory to obtain the closest accompanying flight type flight trajectory.
[0121] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned UAV trajectory optimization device can refer to the corresponding description in the foregoing method embodiments. For the sake of convenience and conciseness of description, it will not be elaborated here.
[0122] The above-mentioned UAV trajectory optimization device can be implemented in the form of a computer program, and the computer program can run on a computer device as shown in Figure 7 shown.
[0123] Please refer to Figure 7 , Figure 7 which is a schematic block diagram of a computer device provided by an embodiment of the present application. The computer device 500 can be a terminal or a server. Among them, the terminal can be an electronic device with a communication function such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device. The server can be an independent server or a server cluster composed of multiple servers.
[0124] Refer to Figure 7 , the computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501. Among them, the memory can include a non-volatile storage medium 503 and an internal memory 504.
[0125] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 can execute a UAV trajectory optimization method.
[0126] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
[0127] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can be caused to execute a method for optimizing the trajectory of an unmanned aerial vehicle.
[0128] The network interface 505 is used for network communication with other devices. Those skilled in the art can understand that Figure 7 the structure shown in is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device 500 to which the solution of this application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0129] Among them, the processor 502 is used to run the computer program 5032 stored in the memory to implement the method for optimizing the trajectory of an unmanned aerial vehicle as described above.
[0130] It should be understood that in the embodiment of this application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0131] Those of ordinary skill in the art can understand that all or part of the processes in the method of implementing the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, and the storage medium is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above method.
[0132] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, where the computer program includes program instructions. When the program instructions are executed by the processor, the processor is caused to execute the method for optimizing the trajectory of an unmanned aerial vehicle as described above.
[0133] The storage medium may be a variety of computer-readable storage media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disc, etc., which can store program codes.
[0134] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0135] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0136] The steps in the method embodiments of the present invention can be adjusted, combined, and deleted according to actual needs. The units in the device embodiments of the present invention can be combined, divided, and deleted according to actual needs. In addition, the functional units in each embodiment of the present invention can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
[0137] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention.
[0138] As described above, the above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A method for optimizing the trajectory of an unmanned aerial vehicle, characterized in that: include: Obtain all flight trajectories of the relevant monitoring airspace within a specific time interval in the flight trajectory database; From all flight trajectories, a smooth and continuous flight trajectory is selected as a reference trajectory; Filter the flight trajectories within a preset time range near the reference trajectory to form a set of adjacent trajectories; Randomly obtain a first adjacent trajectory from the adjacent trajectory set, and determine whether the first adjacent trajectory has a time intersection with the reference trajectory; If there is no temporal intersection between the first adjacent trajectory and the reference trajectory, it is determined that there is a trajectory break between the first adjacent trajectory and the reference trajectory, and the reference trajectory is optimized using Kalman filtering to obtain a complete and continuous flight path; If the first adjacent trajectory and the reference trajectory have a time intersection, it is determined that there are different flight trajectories in the same time period, and the flight trajectory that overlaps or partially overlaps with the reference trajectory is treated as an accompanying flight trajectory.
2. The UAV trajectory optimization method according to claim 1, characterized in that: The obtaining of all flight trajectories of the relevant monitoring airspace within a specific time interval in the flight trajectory database specifically includes: On the two-dimensional grid map, the monitoring airspace is divided according to the two-dimensional matrix grid method. The flight trajectories are presented in the form of line segments or points in the two-dimensional grid map. All flight trajectories within the target time period are selected to form a flight trajectory map of the target time period of the monitoring airspace.
3. The UAV trajectory optimization method according to claim 1, characterized in that: The flight trajectory within a preset time range near the reference trajectory, as a set of adjacent trajectories, includes: The GeoHash algorithm is used to encode the two-dimensional grid map and the track coordinates from the starting point to the end point of the reference track, where the grid where the starting point is located is the first grid and the grid where the end point is located is the second grid; the GeoHash codes of the spatial coordinates of the starting point and the end point and the GeoHash codes of the first grid and the second grid are obtained; According to the GeoHash codes of the first grid and the second grid, all flight trajectories within a time length of t adjacent to the starting point in the adjacent matrix grid of the first grid are obtained as an adjacent trajectory set.
4. The UAV trajectory optimization method according to claim 1, characterized in that: The use of Kalman filtering to optimize the reference trajectory specifically includes: Get the end point of the first adjacent trajectory, marked as C, and the corresponding time is T0; According to the flight angle and flight speed of point C at time T0, the flight trajectory of point C at the starting time is predicted through the preset state transfer matrix F, observation matrix H, observation noise covariance matrix R and process noise covariance matrix Q to obtain the flight trajectory prediction point C'; After obtaining the spatial coordinates of the predicted point, the flight angle and flight speed of the predicted point C' and the starting point of the reference trajectory are obtained respectively, and it is determined whether the difference in the flight angles between the two is less than the preset angle. If so, it is further determined whether the distance between C' and the starting point of the reference trajectory is less than the preset distance threshold. If so, the first similar trajectory is determined to be the preceding trajectory of the reference trajectory at time T0; The first similar trajectory is used as the target similar trajectory, and the missing part between the target similar trajectory and the reference trajectory is completed by using Kalman filtering, and the completed trajectory is smoothed to complete the trajectory fusion; If not, a second similar trajectory is selected from the similar trajectory set and the above operation is repeated until the target similar trajectory is found and the trajectory fusion is completed to obtain the complete and continuous flight path of the UAV in the two-dimensional grid map.
5. The UAV trajectory optimization method according to claim 1, characterized in that: If the first adjacent trajectory and the reference trajectory have a time intersection, determining that different flight trajectories exist in the same time period, and treating the flight trajectory that overlaps or partially overlaps with the reference trajectory as an accompanying flight trajectory includes: If the time interval of the companion flight trajectory and the time interval of the reference trajectory are completely overlapped, the Douglas-Peucker algorithm is used to compress the time overlapped part of the companion flight trajectory and the reference trajectory within the overlapped time interval; The LCSS algorithm is used to calculate the similarity of the flight trajectories of the overlapping parts in time. When the similarity exceeds the preset threshold, the reference trajectory and the accompanying flight trajectory are determined to be the flight trajectories of a single-body UAV, and the trajectories are fused to obtain the unique flight trajectory of the UAV in the optimized time period; if the similarity does not exceed the preset similarity threshold, the accompanying flight trajectory is reselected.
6. The UAV trajectory optimization method according to any one of claims 1 to 5, characterized in that: If the first adjacent trajectory and the reference trajectory have a time intersection, determining that there are different flight trajectories in the same time period, and treating the flight trajectory that overlaps or partially overlaps with the reference trajectory as an accompanying flight trajectory also includes: If the time interval of the accompanying flight trajectory partially overlaps with the time interval of the reference trajectory, the accompanying flight trajectory is divided into an independent trajectory and an overlapping trajectory; The overlapping trajectories are fused, and the independent trajectory is used as the previous trajectory of the reference trajectory at the previous moment, so as to obtain the unique flight trajectory of the UAV from time T0 to time T2.
7. The method for optimizing the trajectory of a UAV according to claim 6, characterized in that: If the first adjacent trajectory and the reference trajectory have a time intersection, determining that there are different flight trajectories in the same time period, and treating the flight trajectory that overlaps or partially overlaps with the reference trajectory as an accompanying flight trajectory also includes: If there are multiple partially overlapping companion flight trajectories, the closest companion flight trajectory is obtained by comprehensively judging the flight speed, flight angle and overlap time of the overlapping point between the companion flight trajectory and the reference trajectory.
8. A drone trajectory optimization device, characterized in that: include: A flight trajectory acquisition module is used to obtain all flight trajectories of the relevant monitoring airspace within a specific time interval in the flight trajectory database; A reference trajectory selection module is used to select a smooth and continuous flight trajectory from all flight trajectories as a reference trajectory; An adjacent trajectory screening module is used to screen flight trajectories within a preset time range near a reference trajectory to form an adjacent trajectory set; A time intersection judgment module, used to randomly obtain a first adjacent track from the adjacent track set, and judge whether the first adjacent track has a time intersection with the reference track; A reference trajectory optimization module is used to determine that there is a trajectory break between the first adjacent trajectory and the reference trajectory if there is no time intersection between the first adjacent trajectory and the reference trajectory, and to optimize the reference trajectory using Kalman filtering to obtain a complete and continuous flight path; The accompanying flight trajectory processing module is used to determine that there are different flight trajectories in the same time period if the first adjacent trajectory and the reference trajectory have a time intersection, and process the flight trajectory that overlaps or partially overlaps with the reference trajectory as an accompanying flight trajectory.
9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the drone trajectory optimization method according to any one of claims 1 to 7 when executing the computer program.
10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the drone trajectory optimization method according to any one of claims 1 to 7 can be implemented.
Citation Information
Cited By
Real-time monitoring method for human body rehabilitation training of rehabilitation equipment
CN120932309A