A method and device for generating a flight path of a UAV based on a waypoint file

Through the self-organizing map neural network (SOM) model or expected return learning method, three-dimensional spatial information is extracted from the waypoint file and the drone flight route is automatically generated, which solves the problem of time-consuming manual planning and non-shortest routes, and improves generation efficiency and accuracy.

CN119645075BActive Publication Date: 2025-10-24BEIJING UNIV OF POSTS & TELECOMM +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411819376.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-10-24
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

Existing drone flight route generation relies on manual planning, which makes it difficult to generate the shortest route, especially when there are many waypoints, and drone application platforms are unable to automatically generate routes.

Method used

Using the self-organizing map neural network (SOM) model or expected reward learning method, the system extracts three-dimensional spatial information from the waypoint file, constructs a waypoint sequence and generates a route file to automatically plan the UAV flight route.

Benefits of technology

It improves the automation and efficiency of drone flight route generation, reduces manual intervention and error risks, and the generated route is closer to the shortest route.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645075B_ABST
    Figure CN119645075B_ABST
Patent Text Reader

Abstract

The application discloses a method for generating a flight route of a UAV (Unmanned Aerial Vehicle) based on a waypoint file, comprising the following steps: obtaining a waypoint file including flight waypoints of the UAV; analyzing the waypoint file to obtain longitude and latitude information and flight height information of the flight waypoints; converting the longitude and latitude information and the flight height information of the flight waypoints into three-dimensional space information in a Cartesian coordinate system to obtain three-dimensional space information of the flight waypoints; generating a flight waypoint sequence by using a self-organizing mapping neural network model or in a Q learning mode; and generating a flight route file of the UAV based on the flight waypoint sequence. The application realizes the automation of generating the flight route of the UAV.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of unmanned aerial vehicles, in particular, to a method for generating a flight route of an unmanned aerial vehicle based on a waypoint file. BACKGROUND

[0002] Currently, when generating a flight route of an unmanned aerial vehicle, a user needs to manually mark waypoints in an unmanned aerial vehicle application platform and configure a flight task for each waypoint. Referring to FIG. 1, a schematic diagram of a related unmanned aerial vehicle flight route generation interface is shown. The unmanned aerial vehicle application platform provides map information through an interactive interface. A user marks waypoints one by one in the map and manually plans a flight route based on the marked waypoints, thereby generating a flight route. Figure 1 Figure 1 For related unmanned aerial vehicle flight route generation interfaces, a user marks waypoints one by one in a map and manually plans a flight route based on the marked waypoints, thereby generating a flight route.

[0003] In the process of manually generating a flight route, the experience of a planner is entirely relied on. In the case of a small number of waypoints, the generated flight route can still be the shortest route. Once the number of waypoints is large, a user cannot plan a shortest route. SUMMARY

[0004] The present application provides a method for generating a flight route of an unmanned aerial vehicle based on a waypoint file, so as to realize automatic generation of a flight route of an unmanned aerial vehicle.

[0005] In a first aspect, the present application provides a method for generating a flight route of an unmanned aerial vehicle based on a waypoint file, the method comprising:

[0006] obtaining a waypoint file comprising waypoints to be flown by an unmanned aerial vehicle,

[0007] analyzing the waypoint file to obtain longitude and latitude information and flight height information of the waypoints to be flown,

[0008] converting the longitude and latitude information and the flight height information of the waypoints to be flown into three-dimensional space information in a Cartesian coordinate system to obtain three-dimensional space information of the waypoints to be flown,

[0009] constructing a self-organizing mapping neural network (SOM) model according to the number of the waypoints to be flown, wherein the number of output neuron nodes in a competitive layer of the SOM model is determined according to the number of the waypoints to be flown, and each output neuron node is used to represent a three-dimensional space information,

[0010] randomly selecting a three-dimensional space information of a waypoint to be flown from the three-dimensional space information of the waypoints to be flown and inputting the three-dimensional space information into the SOM model, so that each output neuron node of the SOM model outputs a three-dimensional space information used to fit the waypoint,

[0011] ​determining the spatial distance closest to the three-dimensional spatial information of the current inputted waypoint to be flown from the three-dimensional spatial information of the current output, determining the output neuron node outputting the three-dimensional spatial information of the closest spatial distance as the current winning neuron node,

[0012] updating the three-dimensional spatial information of each neighborhood neuron node of the current winning neuron node,

[0013] repeating the step of randomly selecting the three-dimensional spatial information of a waypoint to be flown from the three-dimensional spatial information of the waypoint to be flown until the three-dimensional spatial information of the current output converges,

[0014] extracting a waypoint sequence for fitting the waypoint to be flown from the three-dimensional spatial information of the current output,

[0015] generating a UAV flight path file based on the waypoint sequence.

[0016] As a possible implementation, the number of output neuron nodes is greater than or equal to the number of waypoints to be flown,

[0017] As a possible implementation, the number of input neuron nodes in the input layer of the self-organizing mapping neural network model is greater than or equal to the number of waypoints to be flown;

[0018] As a possible implementation, the SOM model outputs three-dimensional spatial information for fitting the waypoint for each output neuron node, further comprising:

[0019] According to the arrangement order of the output neuron nodes in the SOM model, the three-dimensional spatial information currently output by each output neuron node is composed into a current output matrix, and the row vector in the current output matrix is used to represent the three-dimensional spatial information currently output by the output neuron node corresponding to the row vector;

[0020] As a possible implementation, the updating of the three-dimensional spatial information of each neighborhood neuron node of the current winning neuron node comprises:

[0021] Based on the arrangement information of the current winning neuron node, the proximity weight of the current winning neuron node and its neighborhood neuron nodes is determined, and the proximity weight is used to represent the proximity degree of the arrangement distance between the current winning neuron node and its neighborhood neuron nodes,

[0022] For each neighborhood neuron node of the current winning neuron node, the three-dimensional spatial change amount of the neighborhood neuron node is determined according to the current proximity weight of the neighborhood neuron node, the current learning rate, and the spatial distance difference between the three-dimensional spatial of the current inputted waypoint to be flown and the current three-dimensional spatial of the neighborhood neuron node, and the current three-dimensional spatial information of the neighborhood neuron node is updated according to the three-dimensional spatial change amount.

[0023] wherein,

[0024] the number of neighborhood neuron nodes is determined according to the number of output neuron nodes,

[0025] the proximity weight decreases with the increase of the arrangement distance between the current winning neuron node and its neighborhood neuron nodes;

[0026] As a possible implementation, the extracting of the waypoint sequence for fitting the to-be-flown waypoints from the current output three-dimensional spatial information comprises:

[0027] extracting row vectors from the current output matrix, and sorting the extracted row vectors according to the order of the rows in the current output matrix where the extracted row vectors are located, to obtain the waypoint sequence.

[0028] As a possible implementation, the number of neighborhood neuron nodes and the proximity weight decrease with the increase of the number of iterations,

[0029] The obtaining of the waypoint file of the to-be-flown waypoints of the unmanned aerial vehicle comprises:

[0030] obtaining the waypoint file from an unmanned aerial vehicle application platform for providing unmanned aerial vehicle services, wherein the waypoint file is a compressed file supporting waypoint markup language;

[0031] The parsing of the waypoint file to obtain the latitude and longitude information and the flight height information of the to-be-flown waypoints comprises:

[0032] decompressing the waypoint file to obtain a decompressed file, wherein the decompressed file comprises: a template file for editing flight waypoints, an execution file for defining flight and load action instructions of the unmanned aerial vehicle, and an auxiliary resource file for editing flight waypoints, the flight waypoints in the template file include takeoff point and waypoint information, and the execution file only contains waypoint information without takeoff point information,

[0033] parsing the template file using a derived extensible markup language file object model of python to obtain a document object of a tree-shaped data structure for representing the waypoint file,

[0034] obtaining the takeoff point latitude and longitude information and the height information from a takeoff point element of the document object,

[0035] obtaining the waypoint latitude and longitude information and the height information from a position marker element of the document object.

[0036] As a possible implementation, the extracting of the row vectors from the current output matrix comprises:

[0037] Determine, according to each row vector in the current output matrix, a flight point to which the row vector is fitted, and extract the row vector fitted to the flight point to be flown;

[0038] The method further includes generating a flight route file of the UAV based on the sequence of flight points, which includes:

[0039] Determine a take-off point from the sequence of flight points, re-order the sequence of flight points with the take-off point as the first flight point, and obtain a sequence of flight points with the take-off point as the first flight point,

[0040] Sort the position marker elements for saving the flight points in the template file and the execution file according to the sequence of flight points with the take-off point as the first flight point, and set an index sub-element of the position marker element, the index sub-element being used for recording the sequence information of the flight points, and the flight tasks of the position marker elements after the sorting are such that the flight tasks follow the position marker elements, to obtain a modified template file and a modified execution file,

[0041] Compress the modified template file and the modified execution file to obtain the flight route file of the UAV.

[0042] The second aspect of the application provides a flight route generation method for a flight point file, which includes:

[0043] Obtain a flight point file including flight points to be flown by a UAV,

[0044] Parse the flight point file to obtain longitude and latitude information and flight height information of the flight points to be flown,

[0045] Convert the longitude and latitude information and the flight height information of the flight points to be flown into three-dimensional space information in a Cartesian coordinate system to obtain three-dimensional space information of the flight points to be flown,

[0046] For each flight point to be flown, establish a corresponding relationship between all possible selectable flight points as the next flight point and an expected return value when the flight point to be flown is selected as a current selected flight point, to obtain an expected return corresponding relationship of the flight point to be flown, wherein the current selected flight point corresponds to at least one selectable flight point, and each selectable flight point corresponds to an expected return value,

[0047] Initialize the expected return value in the corresponding relationship,

[0048] Mark all the flight points to be flown as unselected,

[0049] Select a take-off point as the current selected flight point from the flight points to be flown,

[0050] Select a selectable flight point in an unselected state from the selectable flight points according to a current expected return value in the expected return corresponding relationship of the current selected flight point, and mark the selected flight point as selected,

[0051] calculating an expected return estimate for the selected optional waypoint as the next current selected waypoint, updating the current pre-fetch return value with the expected return estimate, and taking the selected optional waypoint as the current selected waypoint,

[0052] repeating the step of calculating the current pre-fetch return value in the expected return correspondence of the current selected waypoint until no optional waypoint is available, and obtaining a waypoint sequence with the take-off point as the first waypoint,

[0053] repeating the step of marking all to-be-flown waypoints as unselected until the number of loops reaches a set number threshold, and obtaining an optimal waypoint sequence,

[0054] generating a UAV flight route file based on the optimal waypoint sequence.

[0055] As a possible implementation, the calculating an expected return estimate for the selected optional waypoint as the next current selected waypoint includes:

[0056] calculating the expected return estimate according to the current pre-fetch return value corresponding to the selected optional waypoint, a reward value of the selected optional waypoint, a maximum expected return estimate among the optional waypoints corresponding to the selected optional waypoint as the next current selected waypoint, a learning rate, and a discount factor,

[0057] wherein the reward value is determined according to a spatial distance between the current selected waypoint and the waypoint between the selected optional waypoint;

[0058] As a possible implementation, the selecting an unselected optional waypoint from the optional waypoints according to the current pre-fetch return value in the expected return correspondence of the current selected waypoint further includes:

[0059] determining whether to perform path exploration or select a currently known optimal path according to an ε parameter in an ε-greedy strategy,

[0060] in a case where the ε parameter is greater than a set parameter threshold, selecting an optional waypoint with the best expected return value and in an unselected state;

[0061] in a case where the ε parameter is not greater than the set parameter threshold, randomly selecting an optional waypoint in an unselected state.

[0062] As a possible implementation, the obtaining a waypoint file including to-be-flown waypoints of a UAV includes:

[0063] obtaining the waypoint file from a UAV application platform for providing UAV services, wherein the waypoint file is a compressed file supporting waypoint point markup language;

[0064] The point file is parsed to obtain latitude and longitude information of the flight point to be flown and flight height information, including:

[0065] The point file is decompressed to obtain a decompressed file, wherein the decompressed file includes: a template file used for editing a flight point, an execution file used for defining a flight and load action instruction of the UAV, and an auxiliary resource file used for editing the flight point, the flight point in the template file includes takeoff point and waypoint information, and the execution file only contains the waypoint information and does not include the takeoff point information,

[0066] The template file is parsed using a derived extensible markup language file object model of python to obtain a document object of a tree-shaped data structure used for representing the point file,

[0067] The latitude and longitude information and the height information of the takeoff point are obtained from a takeoff point element of the document object,

[0068] The latitude and longitude information and the height information of the waypoint are obtained from a position tag element of the document object.

[0069] As a possible implementation, the UAV flight route file is generated based on the optimal point sequence, including:

[0070] The position tag elements used for saving the points in the template file and the execution file are sorted according to the optimal point sequence, and an index sub-element of the position tag element is set, the index sub-element is used for recording the point sequence information, and the flight tasks of the position tag elements after the sorting are arranged to follow the position tag elements, to obtain a modified template file and an execution file,

[0071] The modified template file and the execution file are compressed to obtain the UAV flight route file.

[0072] The third aspect of the present application provides a UAV flight route generation device for a point file, the device includes:

[0073] The decoding module is configured to obtain a point file including a flight point to be flown by a UAV, parse the point file to obtain latitude and longitude information and flight height information of the flight point to be flown, convert the latitude and longitude information and the flight height information of the flight point to be flown into three-dimensional space information in a Cartesian coordinate system to obtain three-dimensional space information of the flight point to be flown,

[0074] The route generation module is configured to construct a self-organizing mapping neural network (SOM) model according to the number of the flight points to be flown, wherein the number of output neuron nodes in the competitive layer of the self-organizing mapping neural network model is determined according to the number of the flight points to be flown, and each output neuron node is used for representing a three-dimensional space information,

[0075] randomly selecting three-dimensional spatial information of a flight waypoint from the three-dimensional spatial information of the flight waypoints, inputting the three-dimensional spatial information into the SOM model, so that each output neuron node of the SOM model outputs three-dimensional spatial information for fitting the flight waypoint,

[0076] determining the three-dimensional spatial information with the closest spatial distance between the three-dimensional spatial information of the currently input flight waypoint in the current output, determining the output neuron node outputting the three-dimensional spatial information with the closest spatial distance as the current winning neuron node,

[0077] updating the three-dimensional spatial information of each neighborhood neuron node of the current winning neuron node,

[0078] repeatedly performing the step of randomly selecting three-dimensional spatial information of a flight waypoint from the three-dimensional spatial information of the flight waypoints until the three-dimensional spatial information of the current output converges,

[0079] extracting a flight waypoint sequence for fitting the flight waypoint from the three-dimensional spatial information of the current output,

[0080] an encoding module configured to generate a UAV flight route file based on the flight waypoint sequence.

[0081] The fourth aspect of the present application provides a UAV flight route generation device for a flight waypoint file, which comprises:

[0082] a decoding module configured to obtain a flight waypoint file including UAV flight waypoints, parse the flight waypoint file to obtain latitude and longitude information and flight height information of the flight waypoints, convert the latitude and longitude information and flight height information of the flight waypoints into three-dimensional spatial information in a Cartesian coordinate system, and obtain three-dimensional spatial information of the flight waypoints,

[0083] a route generation module configured to, for each flight waypoint, establish a correspondence between all possible selectable flight waypoints as the next flight waypoint and expected return values when the flight waypoint is selected as the current selected flight waypoint, and obtain an expected return correspondence of the flight waypoint, wherein the current selected flight waypoint corresponds to at least one selectable flight waypoint, and each selectable flight waypoint corresponds to an expected return value,

[0084] initializing the expected return values in the correspondence,

[0085] marking all flight waypoints as unselected,

[0086] selecting a takeoff point in the flight waypoints as the current selected flight waypoint,

[0087] selecting an unselected selectable flight waypoint from the selectable flight waypoints according to a current expected return value in the expected return correspondence of the current selected flight waypoint, and marking the selected flight waypoint as selected,

[0088] calculating an expected return estimate when the selected optional waypoint is the next current selected waypoint, and updating the current pre-fetch return value with the expected return estimate, and taking the selected optional waypoint as the current selected waypoint,

[0089] repeating the step of calculating the current pre-fetch return value from the expected return corresponding relationship of the current selected waypoint until there are no optional waypoints, obtaining a waypoint sequence with the takeoff point as the first waypoint,

[0090] repeating the step of marking all to-be-flown waypoints as unselected until the number of cycles reaches a set number threshold, obtaining an optimal waypoint sequence,

[0091] an encoding module configured to generate a UAV flight route file based on the optimal waypoint sequence.

[0092] The UAV flight route generation method for a waypoint file provided in the application extracts waypoint information from a waypoint file and converts it into three-dimensional space information in a Cartesian coordinate system, generates a waypoint sequence using a SOM model or in a Q-learning manner, and forms a route file based on the waypoint sequence, solving problems such as time-consuming manual route generation and non-shortest route, and improving the automation of route generation. BRIEF DESCRIPTION OF DRAWINGS

[0093] Figure 1 It is a schematic diagram of a related UAV flight route generation interface.

[0094] Figure 2 It is a flowchart of the UAV flight route generation method for a waypoint file according to an embodiment of the application.

[0095] Figure 3 It is a schematic diagram of the file structure after decompression of the WPML waypoint file according to the embodiment.

[0096] Figure 4 It is a flowchart of generating a flight route using a SOM neural network model according to the embodiment.

[0097] Figure 5 It is a flowchart of generating a flight route in a Q-learning manner according to the embodiment.

[0098] Figure 6 It is the fitting waypoint coordinates obtained by using a SOM model for route optimization.

[0099] Figure 7 It is a schematic diagram of route optimization using a SOM model.

[0100] Figure 8 It is the waypoint coordinates obtained by route optimization in a Q-learning manner.

[0101] Figure 9 An illustration of route optimization in Q-learning manner.

[0102] Figure 10 An illustration of optimization of manually planned route.

[0103] Figure 11 A comparison chart of route path and flight time before and after optimization.

[0104] Figure 12 A flowchart of a UAV flight route generation device for waypoint files according to an embodiment of the present application. DETAILED DESCRIPTION

[0105] In order to make the purposes, technical means and advantages of the present application more clear, the present application is further described in detail below with reference to the accompanying drawings.

[0106] The applicant finds that the UAV application platform only supports manual flight route generation and cannot support automatic generation of UAV flight routes. The reasons are as follows. On the one hand, the UAV application platform is limited by computing resources and cannot provide high-quality route generation algorithms. On the other hand, data used for UAV flight route planning, such as waypoint information and task information required to be executed at the waypoint, are stored in a standard format file, which is difficult to extract from the file. On the other hand, UAV flight route generation is essentially a traveling salesman problem (TSP), which is a classic combination generation problem. The purpose is to find a shortest two-dimensional path so that each travel point is visited exactly once and finally returns to the travel point at the departure time. Since the UAV flight route is a three-dimensional space path, the generation method of the related two-dimensional path is not applicable to the UAV flight route.

[0107] In view of this, an embodiment of the present application provides a UAV flight route generation method for waypoint files. Referring to Figure 2 shown, Figure 2 An embodiment of the present application provides a UAV flight route generation method for waypoint files. Referring to

[0108] Step 201, obtaining a waypoint file including UAV flight waypoints,

[0109] As an example, a waypoint file is obtained from a UAV application platform for providing UAV services, wherein the waypoint file is a compressed file supporting waypoint markup language,

[0110] Step 202, parsing the waypoint file to obtain each waypoint information from the waypoint file, wherein the waypoint information includes latitude and longitude information and flight height information,

[0111] As an example, the waypoint file is decompressed to obtain a decompressed file, wherein the decompressed file comprises: a template file used for editing flight waypoints, an execution file used for defining unmanned aerial vehicle flight and payload action instructions, and an auxiliary resource file used for editing flight waypoints, the flight waypoints in the template file include takeoff points and waypoint information, and the execution file only contains the waypoint information and does not include the takeoff point information,

[0112] The template file is parsed using a derived (python) extensible markup language file object model to obtain a document object of a tree-shaped data structure used for representing the waypoint file,

[0113] The takeoff point longitude and latitude information and the height information are obtained from the takeoff point element of the document object,

[0114] The waypoint longitude and latitude information and the height information are obtained from the position marker element of the document object.

[0115] Step 203: converting the longitude and latitude information and the flight height information of the to-be-flown waypoints into three-dimensional space information in a Cartesian coordinate system to obtain three-dimensional space information of the to-be-flown waypoints,

[0116] As an example, the longitude and latitude information in each waypoint information is converted into a planar Cartesian coordinate, and the planar Cartesian coordinate and the flight height information are taken as the three-dimensional space information of the waypoint.

[0117] Step 204: using a self-organizing mapping neural network (SOM) model or an expected return learning method to solve TSP for each waypoint information having three-dimensional space information to obtain a waypoint sequence,

[0118] wherein,

[0119] Solving TSP for each waypoint information having three-dimensional space information using the SOM model is performed in the following manner:

[0120] According to the number of to-be-flown waypoints, a self-organizing mapping neural network SOM model is constructed, wherein the number of output neuron nodes in the competitive layer of the self-organizing mapping neural network model is determined according to the number of to-be-flown waypoints, and each output neuron node is used to represent a three-dimensional space information,

[0121] A three-dimensional space information of a to-be-flown waypoint is randomly selected from the three-dimensional space information of the to-be-flown waypoints and input into the SOM model, so that each output neuron node of the SOM model outputs a three-dimensional space information used to fit the waypoint,

[0122] determining the spatial distance closest to the three-dimensional spatial information of the current inputted to-be-flown waypoint in the current output, determining the output neuron node outputting the spatial distance closest three-dimensional spatial information as the current winning neuron node,

[0123] updating the three-dimensional spatial information of each neighborhood neuron node of the current winning neuron node,

[0124] repeatedly performing the step of randomly selecting a to-be-flown waypoint from the three-dimensional spatial information of the to-be-flown waypoints until the three-dimensional spatial information of the current output converges,

[0125] extracting a waypoint sequence for fitting the to-be-flown waypoints from the three-dimensional spatial information of the current output,

[0126] generating a UAV flight route file based on the waypoint sequence.

[0127] solving the TSP of each waypoint information with three-dimensional spatial information in an expected return learning manner in the following manner:

[0128] for each to-be-flown waypoint, establishing a correspondence between all possible selectable waypoints as the next waypoint and the expected return value when the to-be-flown waypoint is selected as the current selected waypoint, obtaining the expected return correspondence of the to-be-flown waypoint, wherein the current selected waypoint corresponds to at least one selectable waypoint, and each selectable waypoint corresponds to an expected return value,

[0129] initializing the expected return value in the correspondence,

[0130] marking all to-be-flown waypoints as unselected,

[0131] selecting the takeoff point in the to-be-flown waypoints as the current selected waypoint,

[0132] selecting an unselected selectable waypoint from the selectable waypoints according to the current expected return value in the expected return correspondence of the current selected waypoint, and marking the selected waypoint as selected,

[0133] calculating the expected return estimate when the selected selectable waypoint is selected as the next current selected waypoint, updating the current expected return value with the expected return estimate, and selecting the selected selectable waypoint as the current selected waypoint,

[0134] repeatedly performing the step of selecting an unselected selectable waypoint according to the current expected return value in the expected return correspondence of the current selected waypoint until there is no selectable waypoint, obtaining a waypoint sequence with the takeoff point as the first waypoint,

[0135] repeatedly performing the step of marking all to-be-flown waypoints as unselected until the number of cycles reaches a set number threshold, obtaining an optimal waypoint sequence,

[0136] Based on the optimal waypoint sequence, a UAV flight route file is generated.

[0137] In step 205, based on the waypoint sequence, a UAV flight route file is generated.

[0138] As an example, according to the waypoint sequence, the template file and the position marker element in the execution file for saving the waypoint are sorted, and an index sub-element of the position marker element is set, the index sub-element is used to record the waypoint sequence information, and the flight task of each position marker element after the sorting is set to follow the position marker element, to obtain a modified template file and an execution file,

[0139] The modified template file and the execution file are compressed to obtain a UAV flight route file.

[0140] The UAV flight route generation method for the waypoint file provided by the embodiments of the present application improves the automation of the UAV flight route generation, improves the UAV flight route generation efficiency, does not need to rely on manual experience to select the to-be-flown waypoint, and does not need to manually input, record the latitude and longitude and height information and the task of each waypoint, thereby greatly reducing the workload and error risk of the person.

[0141] In order to facilitate understanding of the embodiments of the present application, the waypoint file format standard of the waypoint markup language (WPML, WayPoint Markup Language) is taken as an example for description, and it should be understood that the embodiments of the present application are not limited to the waypoint file format itself, and other formats of waypoint files are also applicable.

[0142] The WPML waypoint file format standard is extended based on the definition of the markup language KML (Keyhole Markup Language). The WPML waypoint file complies with the archiving requirements of the markup language compression (KMZ, Keyhole Markup Language Zipped), and all waypoint files end with the file name “.kmz” suffix, which is essentially a ZIP format packaged archive file. The file structure of a standard waypoint file after decompression is as shown in Figure 3 The decompressed standard waypoint file includes a template file, an execution file, and a resource file, wherein,

[0143] The file name of the template file is template.kml, which is a predefined template for providing a convenient way for users to edit and plan flight paths, for example, when using the mapping aerial photography template, it is not necessary to carefully draw the path of each flight path, but only to define the survey area and overlap rate, so as to generate the path and action of the UAV through DJIPilot 2, DJI Flighthub 2 or other software.

[0144] The file name of the execution file is waylines.wpml, which is used to define the flight and load action instructions of the UAV. These instructions are read by DJIPilot 2, DJI Flighthub 2 or other software through the template parameters in template.kml, combined with the calculation of the path generation algorithm, and finally generate the waylines.wpml file for execution.

[0145] The file name of the resource file is res, which is a folder containing auxiliary resource files required for the flight path, such as pre-prepared reference target photos before starting precise rephotography.

[0146] In this embodiment, the WPML waypoint file of the flight point to be flown is decompressed to obtain the template file and the execution file. The template file contains the information of the takeoff point and all the waypoints, and the execution file only contains the information of the waypoints and does not include the information of the takeoff point. The template file is read and parsed using the extensible markup language file object model such as xml.dom package of python to obtain the Document object, which represents the tree data structure of the entire WPML waypoint file.

[0147] The Document object includes a Placemark element, which includes a Point sub-element and a height sub-element. The latitude and longitude and height of the takeoff point are obtained from the takeoff point element under the Placemark element; the latitude and longitude of the waypoint are obtained from the Point sub-element in the Placemark element, and the height of the waypoint is obtained from the height sub-element in the Placemark element.

[0148] Next, the latitude and longitude of all waypoints are converted to planar Cartesian coordinates to obtain the flight point information. For example, the coordinate conversion is performed using the Miller projection method. The origin of the planar Cartesian coordinates is the takeoff point. For each waypoint, the planar Cartesian coordinates of the waypoint and the height of the waypoint are taken as the three-dimensional coordinates of the waypoint.

[0149] One way of this embodiment is to use a self-organizing map (SOM) neural network model to generate a flight path.

[0150] As an example, the SOM neural network model includes an input layer and a competition layer, the input layer includes a plurality of input neuron nodes, the competition layer is a one-dimensional linear array or a two-dimensional planar array composed of a plurality of output neuron nodes, and each input neuron node is connected to all output neuron nodes. The number of input neuron nodes and the number of output neuron nodes depend on the requirements of the application.

[0151] In this embodiment, the number of input neuron nodes and the number of output neuron nodes are determined according to the number of acquired flight waypoints. For example, when the number of acquired flight waypoints is n, the number of input neuron nodes and the number of output neuron nodes can be set to be greater than or equal to n. In this embodiment, the number of input neuron nodes and the number of output neuron nodes are the same, both of which are m, for example, m = 8n.

[0152] Referring to Figure 4 shown, Figure 4 This is a flowchart of the process of generating a flight route using the SOM neural network model in this embodiment. It includes:

[0153] Step 401, an initial matrix is constructed to set the initial three-dimensional space coordinates corresponding to each output neuron node in the competition layer,

[0154] The matrix has m rows and 3 columns, each row represents a three-dimensional space coordinate information, and each column represents the x coordinate, y coordinate and height coordinate in the three-dimensional space coordinate information. m is the number of output neuron nodes of the SOM neural network model, and each output neuron node corresponds to a row vector in the matrix, so that an output neuron node can represent a three-dimensional space information. Each row vector in the initial matrix can be determined according to the flight waypoint information, for example, taking a random number near the flight waypoint information.

[0155] Step 402, a flight waypoint information is selected from the flight waypoint information and input to the SOM neural network model, each output neuron node of the SOM neural network model outputs a three-dimensional space coordinate information, and all three-dimensional space coordinate information output by the output neuron nodes can form a current output matrix according to the arrangement order of the output neuron nodes. The output matrix has m rows and 3 columns, each row represents a three-dimensional space coordinate information, and each column represents the x coordinate, y coordinate and height coordinate in the three-dimensional space coordinate information.

[0156] Step 403, determine the winning neuron node.

[0157] Determine the three-dimensional spatial coordinates closest to the current input waypoint in the current output matrix as the winning three-dimensional spatial coordinates, determine the output neuron node outputting the winning three-dimensional spatial coordinates information according to the winning three-dimensional spatial coordinates, and take the output neuron node as the winning neuron node.

[0158] Calculate a Gaussian distribution array centered on the winning neuron node, the array containing the proximity weight of each output neuron node, the proximity weight having a dimension of the total number of output neuron nodes x 1, and being used to represent the proximity degree of the arrangement distance between the current winning neuron node and its neighborhood neuron nodes; the proximity weight decreases with the increase of the arrangement distance between the output neuron node and the winning neuron node.

[0159] As an example, the Gaussian distribution array can be calculated in the following way:

[0160] For any output neuron node i, determine the arrangement position of the output neuron node i relative to the winning neuron node, expressed in a mathematical formula as:

[0161] Δi = |P v -P i |

[0162] Wherein, P v is the index of the winning neuron node, which is used to represent the arrangement position of the winning neuron node, P i is the index of the output neuron node i, which is used to represent the arrangement position of the output neuron node i, and Δi is the arrangement position of the output neuron node i relative to the winning neuron node; || represents absolute value calculation,

[0163] Take the minimum value between the arrangement position of the output neuron node i relative to the winning neuron node and the difference between the total number of output neuron nodes and Δi as the arrangement distance between the output neuron node i and the winning neuron node, expressed in a mathematical formula as:

[0164] d i = min(Δi, m-Δi)

[0165] Wherein, d i is the arrangement distance between the output neuron node i and the winning neuron node, and m is the total number of output neuron nodes;

[0166] Calculate

[0167] The neighborhood radius and the exponential function associated with the arrangement distance between the output neuron node i and the winning neuron node to obtain the Gaussian distribution of the output neuron node i, which represents the proximity weight of the three-dimensional spatial coordinate point corresponding to the output neuron node i, expressed in a mathematical formula as:

[0168] wherein, output i is the Gaussian distribution of the output neuron node i, d i is the arrangement distance between the output neuron node i and the winning neuron node, and the neighborhood radius R is used to determine the number of output neuron nodes around the winning neuron node, i.e. the number of neighborhood neuron nodes of the winning neuron node, for example, the neighborhood radius takes the value of m / 10, wherein m is the total number of output neuron nodes, when the value of the neighborhood radius m / 10 is less than or equal to 1, the neighborhood radius is set to 1, and when the value of the neighborhood radius m / 10 is greater than 1, the neighborhood radius is set to the integer value of m / 10.

[0169] Step 404, updating the current three-dimensional space information of the current winning neuron and its current neighborhood neuron nodes,

[0170] For each neighborhood neuron node within the current neighborhood radius range of the winning neuron node, the change amount of the three-dimensional space coordinate information corresponding to the neighborhood neuron node is calculated using the proximity weight, the current learning rate, and the difference between the current input waypoint and the current three-dimensional space coordinate corresponding to the neighborhood neuron node, and the three-dimensional coordinate information of the neighborhood neuron node is updated according to the change amount for one iteration.

[0171] As an example, the calculation of the change amount is mathematically expressed as:

[0172] ΔK r = output r × α × (K s - K r )

[0173] wherein, ΔK r is the change amount of the three-dimensional space coordinate information corresponding to the neighborhood neuron node r, including the x, y, and z coordinates respectively, output r is the proximity weight of the neighborhood neuron node r, α is the current learning rate, K s is the three-dimensional space coordinate information of the current input waypoint s, and K r is the current three-dimensional space coordinate corresponding to the neighborhood neuron node r.

[0174] Step 405, after each iteration, the learning rate is decayed to be used as the learning rate for the next iteration, for example, after each iteration, the learning rate is multiplied by 0.9997, so that the change amount of the three-dimensional space coordinate information corresponding to the output neuron node in the later stage is smaller, to ensure the convergence of the neural network model.

[0175] After each iteration, the neighborhood radius is also attenuated to serve as the neighborhood radius of the next iteration. For example, after each iteration, the neighborhood radius is multiplied by 0.9997 to gradually reduce the neighborhood radius, so that only the output neuron nodes that are closer to the winning neuron node are updated in the later stage to increase accuracy.

[0176] Steps 402 to 405 are repeatedly performed until the learning rate or the neighborhood radius decays to a set threshold, and the iteration is terminated.

[0177] Through iteration, the three-dimensional spatial coordinate information corresponding to the output neuron node gradually fits the waypoint information to be flown, and finally solves the TSP problem.

[0178] From the output matrix of the SOM neural network model, three-dimensional spatial information that fits the information of the waypoints to be flown is extracted. The order of the extracted three-dimensional spatial information is determined based on the order of the rows in the output matrix. This results in a waypoint sequence for the waypoints to be flown. The takeoff point in the waypoint sequence is used as the first waypoint, and each waypoint in the sequence is sorted until the takeoff point is reached. This sequence, with the takeoff point as the first and last waypoint, is used as the flight route. For example, if the waypoint sequence for the waypoints to be flown output by the SOM neural network model is AXDEFG, where D is the takeoff point, the flight route generated based on this waypoint sequence is: DEFGAXD.

[0179] Another embodiment of the present application is to generate flight routes using Q learning. Figure 5 As shown, Figure 5 This is a flow chart of generating flight routes using Q-learning in this embodiment. It includes:

[0180] Step 501: Setting a reward calculation function for calculating a reward value and a take-off point, wherein the reward calculation function is related to the spatial distance between the waypoints;

[0181] As an example, the reward calculation function is expressed mathematically as follows:

[0182]

[0183] Among them, R(s, a) represents the reward value, s represents the currently selected waypoint, a represents the optional waypoint, and x s 、y s 、z s is the three-dimensional coordinate of the currently selected waypoint s, x a 、y a 、z a are the 3D coordinates of the optional waypoint a.

[0184] To improve the processing efficiency, for any two waypoints in the to-be-flown waypoints, the spatial distance between the two waypoints is calculated and stored, as an example, the spatial distance of any two waypoints is recorded in the form of a matrix, for the convenience of writing, the matrix is called Q value matrix. Each row and each column in the Q value matrix corresponds to a waypoint, and the element in the matrix is used to represent the distance between the waypoint corresponding to the row where the element is located and the waypoint corresponding to the column where the element is located.

[0185] Step 502, set the ε value of the ε greedy strategy, the learning rate α, the discount factor γ, set the initial value of the expected return in the corresponding relationship for representing the expected return when selecting a selectable waypoint at a currently selected waypoint, for the convenience of writing, the corresponding relationship becomes the Q table.

[0186] Since any waypoint in the to-be-flown waypoints can be a currently selected waypoint, and the remaining waypoints except the currently selected waypoint can be selectable waypoints, the currently selected waypoint corresponds to multiple selectable waypoints, and each selectable waypoint corresponds to its initial expected return value. For example, the to-be-flown waypoints include 10 waypoints, and any waypoint as a currently selected waypoint, then the number of selectable waypoints is 9, which corresponds to 9 initial expected return values.

[0187] Referring to Table 1, Table 1 is a Q table with 5 to-be-flown waypoints, and A1-A5 in the table represent 5 to-be-flown waypoints.

[0188] Table 1

[0189]

[0190] In this way, each waypoint in the to-be-flown waypoints has a corresponding relationship between the selectable waypoints and the expected return value.

[0191] Step 503, start training to generate a path from the takeoff point to the end point.

[0192] Step 5031, reset the identifier for recording the selected waypoints, that is, mark all waypoints as unselected state to avoid interference from the last generated path.

[0193] Step 5032, taking the takeoff point as the currently selected waypoint, and marking the currently selected waypoint as selected state,

[0194] Step 5033, according to the expected return in the current Q table, using the ε parameter in the ε greedy strategy, to decide whether to explore the path or select the currently known optimal path,

[0195] When the ε parameter is greater than the set parameter threshold, the currently known optimal path is selected,

[0196] In the process of selecting the currently known optimal path, according to the expected return in the current Q table, an optional waypoint with the best expected return value and in the unselected state is selected as the current best waypoint from the optional waypoints possessed by the currently selected waypoint, and the optional waypoint is marked as the selected state, the expected return estimate is calculated according to the best expected return value, the reward value of the current best waypoint, the maximum expected return estimate (i.e. the maximum expected return value) of the optional waypoint in the unselected state possessed by the current best waypoint as the next selected waypoint, the learning rate a, and the discount factor γ, to update the best expected return value, the current best waypoint is taken as the next currently selected waypoint, and step 5034 is performed.

[0197] When the ε parameter is not greater than the set parameter threshold, the path exploration is performed.

[0198] In the process of path exploration, an optional waypoint in the unselected state is randomly selected from the optional waypoints possessed by the currently selected waypoint, and the optional waypoint is marked as the selected state, the current expected return value corresponding to the randomly selected optional waypoint in the current Q table is updated according to the expected return value corresponding to the randomly selected optional waypoint in the current Q table, the reward value of the randomly selected optional waypoint, the maximum expected return estimate (i.e. the maximum expected return value) of the optional waypoint in the unselected state possessed by the randomly selected optional waypoint as the next selected waypoint, the learning rate a, and the discount factor γ, the expected return estimate is calculated, the randomly selected optional waypoint is taken as the next currently selected waypoint, and step 5034 is performed, wherein the reward value of the randomly selected optional waypoint is determined according to the distance between the randomly selected optional waypoint and the currently selected waypoint.

[0199] As an example, the mathematical expression of the expected return estimate is:

[0200] Q″(s, a) = Q(s, a) + a [R(s, a) + γmaxQ(s′, a′) - Q(s, a)]

[0201] Wherein, Q″(s, a) represents the expected return estimate of the currently selected waypoint s and the optional waypoint a, i.e. the updated expected return value, Q(s, a) represents the current expected return value of the currently selected waypoint s and the optional waypoint a, R(s, a) is the reward value when the currently selected waypoint s and the optional waypoint a, maxQ(s′, a′) represents the maximum expected return value of the optional waypoint a′ in the unselected state possessed by the next currently selected waypoint s′.

[0202] Step 5034, return to step 5033 until there is no optional waypoint, and end to get the first waypoint sequence with the takeoff point as the first waypoint and the last waypoint in the sequence as the end point.

[0203] Step 504, repeat step 503 to gradually optimize the expected return value in the Q table, and when the number of cycles reaches the set number threshold, the optimal waypoint sequence corresponding to the optimal path from the takeoff point to the end point can be obtained.

[0204] In the above steps, the proportion of path exploration and selection of the currently known optimal path is controlled by the ε parameter. ε is initially higher during training, which makes it more likely to explore the path, and as the training progresses, the value of ε gradually decays, making it more likely to select the currently known optimal path.

[0205] After obtaining the waypoint sequence, the obtained waypoint sequence is re-encoded to generate a WPML waypoint file. In the process of encoding and generating a new WPML waypoint file, the flight tasks in the waypoints are also modified accordingly in sequence to ensure that the flight tasks of each waypoint remain unchanged.

[0206] Specifically, according to the obtained waypoint sequence, the template.kml file and the waylines.wpml file are modified. Since each waypoint information in the template.kml file and the waylines.wpml file is saved under a Placemark element, and the sequential numbering information is saved in the index element under the Placemark element, the number of waypoints is equal to the number of Placemark elements, the Placemark elements are reordered according to the waypoint sequence, and the index element content is modified according to the waypoint sequence. Since the index element number starts from 0, and the waypoint sequence number starts from 1, the waypoint sequential number needs to be reduced by 1 when modifying the index element content. In the data exchange process in the branch structure under the Placemark element, the flight task of each waypoint is also exchanged, so that the waypoint is bound to its flight task. After modifying the template.kml file and the waylines.wpml file, the template.kml file and the waylines.wpml file are repackaged into a WPML waypoint file with a ".kmz" suffix.

[0207] To show the effect of the three-dimensional TSP solution of the embodiment, the simulation experiment is as follows: 30 waypoints are randomly generated in a three-dimensional space of 1000m x 1000m x 1000m, and the length of the route solved by the three-dimensional TSP is compared with the length of the route planned by hand. In order to describe the technical effect, the optimization rate between the length of the route before using the three-dimensional TSP solution and the length of the route after using the three-dimensional TSP solution is used to describe. The value range of the optimization rate is 0 to 1, the larger the optimization rate, the worse the optimization effect; the smaller the optimization rate, the better the optimization effect.

[0208] The 30 waypoint coordinates generated by the random simulation experiment 1 using the SOM model are as shown in Figure 6 . The length of the route before optimization is 19602.35m, and the length of the route after optimization is 8745.80m, which is reduced by 10856.55m, and the optimization rate is 44.6%. The random simulation experiment 1 running result graph is as shown in Figure 7 , the left is the route graph before optimization, and the right is the route graph after optimization.

[0209] The 30 waypoint coordinates generated by the random simulation experiment 2 using the Q learning method are as shown in Figure 8 . The length of the route before optimization is 16795.33m, and the length of the route after optimization is 8826.29m, which is reduced by 7969.04m, and the optimization rate is 52.6%. The random simulation experiment 2 running result graph is as shown in Figure 9 , the left is the route graph before optimization, and the right is the route graph after optimization.

[0210] Through the simulation experiment, it is found that the route generated by using the SOM model has a shorter length, and the route generated by using the Q learning method can be generated faster. Therefore, in the case where the route optimization rate is high, the SOM model is used to generate the route, and in the case where the route is quickly generated, the Q learning method is used to generate the route.

[0211] The optimization example of the route planned by hand is as follows. The 11 waypoints to be flown are Figure 10 , the left is the route graph before optimization, and the right is the route graph after optimization. Figure 11 is the comparison graph of the route path and the flight time before and after optimization, the left is the route graph, route distance and flight time before running, and the right is the route graph, route distance and flight time after the scheme runs. The length of the route before optimization is 12150.9m, and the expected execution time is 20 minutes and 32 seconds; the length of the route after optimization is 7595.3m, and the expected execution time is 13 minutes and 21 seconds, the optimization rate is 62.5%, and the execution time is reduced by 7 minutes and 11 seconds.

[0212] Referring to Figure 12 , the left is the route graph before optimization, and the right is the route graph after optimization. Figure 12A flowchart of an embodiment of the unmanned aerial vehicle flight route generation device for waypoint file. The device comprises:

[0213] A decoding module configured to obtain a waypoint file including a flight waypoint of an unmanned aerial vehicle, parse the waypoint file to obtain latitude and longitude information and flight height information of the flight waypoint, convert the latitude and longitude information and flight height information of the flight waypoint into three-dimensional space information in a Cartesian coordinate system, and obtain three-dimensional space information of the flight waypoint,

[0214] A route generation module configured to construct a self-organizing mapping neural network (SOM) model according to the number of flight waypoints, wherein the number of output neuron nodes in the competitive layer of the SOM model is determined according to the number of flight waypoints, and each output neuron node is configured to represent a three-dimensional space information,

[0215] randomly select a three-dimensional space information of a flight waypoint from the three-dimensional space information of the flight waypoint, and input the three-dimensional space information into the SOM model, so that each output neuron node of the SOM model outputs a three-dimensional space information for fitting the flight waypoint,

[0216] determine the three-dimensional space information closest to the three-dimensional space information of the current input flight waypoint in the current output, and determine the output neuron node outputting the closest three-dimensional space information as the current winning neuron node,

[0217] update the three-dimensional space information of each neighborhood neuron node of the current winning neuron node,

[0218] repeat the step of randomly selecting a three-dimensional space information of a flight waypoint from the three-dimensional space information of the flight waypoint until the three-dimensional space information of the current output converges,

[0219] extract a waypoint sequence for fitting the flight waypoint from the three-dimensional space information of the current output,

[0220] An encoding module configured to generate an unmanned aerial vehicle flight route file based on the waypoint sequence.

[0221] As another embodiment,

[0222] A route generation module configured to, for each flight waypoint, establish a correspondence between all possible selectable waypoints as the next waypoint and the expected return value when the flight waypoint is selected as the current selected waypoint, and obtain an expected return correspondence of the flight waypoint, wherein the current selected waypoint corresponds to at least one selectable waypoint, and each selectable waypoint corresponds to an expected return value,

[0223] initialize the expected return values in the correspondence,

[0224] Mark all the to-be-flown waypoints as unselected state,

[0225] Take the take-off point in the to-be-flown waypoints as the current selected waypoint,

[0226] According to the current pre-fetch return value in the expected return correspondence of the current selected waypoint, select a to-be-flown waypoint from the selectable waypoints, and mark the selected waypoint as selected state,

[0227] Calculate the expected return estimate when the selected selectable waypoint is the next current selected waypoint, update the current pre-fetch return value with the expected return estimate, and take the selected selectable waypoint as the current selected waypoint,

[0228] Repeat the step of selecting a to-be-flown waypoint from the selectable waypoints according to the current pre-fetch return value in the expected return correspondence of the current selected waypoint until there is no selectable waypoint, and obtain a waypoint sequence with the take-off point as the first waypoint,

[0229] Repeat the step of marking all to-be-flown waypoints as unselected state until the number of cycles reaches a set number threshold, and obtain an optimal waypoint sequence,

[0230] An encoding module for generating a UAV flight route file based on the optimal waypoint sequence.

[0231] The embodiment of the application further provides a computer readable storage medium, wherein the storage medium stores a computer program, and the computer program is executed by a processor to realize the steps of the UAV flight route generation method based on the waypoint file.

[0232] For the device / network side equipment / storage medium embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the related parts refer to the part of the method embodiment.

[0233] In this document, the terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0234] The above merely provides the preferred embodiment of the present application, and is not used to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims

1. A method for generating a UAV flight route based on a waypoint file, characterized in that: The method comprises: acquiring a waypoint file comprising a plurality of waypoints to be flown by a UAV, parsing the waypoint file to obtain longitude and latitude information and flight height information of the waypoints to be flown, converting the longitude and latitude information and the flight height information of the waypoints to be flown into three-dimensional space information in a Cartesian coordinate system to obtain three-dimensional space information of the waypoints to be flown, constructing a self-organizing map neural network (SOM) model according to the number of the waypoints to be flown, wherein the number of output neuron nodes in a competitive layer of the SOM model is determined according to the number of the waypoints to be flown, and each output neuron node is used to represent a three-dimensional space information, randomly selecting a three-dimensional space information of a waypoint to be flown from the three-dimensional space information of the waypoints to be flown and inputting the three-dimensional space information into the SOM model so that each output neuron node of the SOM model outputs a three-dimensional space information used to fit the waypoint, determining, in a current output, a three-dimensional space information having a shortest spatial distance from the three-dimensional space information of the currently input waypoint to be flown, and determining an output neuron node outputting the three-dimensional space information having the shortest spatial distance as a current winning neuron node, updating the three-dimensional space information of each neighborhood neuron node of the current winning neuron node, repeatedly performing the step of randomly selecting a three-dimensional space information of a waypoint to be flown from the three-dimensional space information of the waypoints to be flown until the three-dimensional space information of the current output converges, extracting a waypoint sequence used to fit the waypoints to be flown from the three-dimensional space information of the current output, generating a UAV flight path file based on the waypoint sequence. 2.The method of claim 1, wherein, the number of the output neuron nodes is greater than or equal to the number of the waypoints to be flown, the number of input neuron nodes in an input layer of the SOM model is greater than or equal to the number of the waypoints to be flown; the step of causing each output neuron node of the SOM model to output a three-dimensional space information used to fit the waypoint further comprises: composing a current output matrix of the three-dimensional space information currently output by each output neuron node in the SOM model according to the arrangement order of the output neuron nodes, and a row vector in the current output matrix is used to represent the three-dimensional space information currently output by the output neuron node corresponding to the row vector; the step of updating the three-dimensional space information of each neighborhood neuron node of the current winning neuron node comprises: determining a proximity weight of the current winning neuron node and its neighborhood neuron nodes based on arrangement information of the current winning neuron node, wherein the proximity weight is used to represent the proximity degree of the arrangement distance between the current winning neuron node and its neighborhood neuron nodes, for each neighborhood neuron node of the current winning neuron node, determining a three-dimensional space change amount of the neighborhood neuron node according to a current proximity weight of the neighborhood neuron node, a current learning rate, and a spatial distance difference between the three-dimensional space of the currently input waypoint to be flown and a current three-dimensional space of the neighborhood neuron node, and updating the current three-dimensional space information of the neighborhood neuron node according to the three-dimensional space change amount, wherein, the number of the neighborhood neuron nodes is determined according to the number of the output neuron nodes, The proximity weight decreases with an increase in the arrangement distance between the current winning neuron node and its neighborhood neuron nodes; The method comprises: The row vectors are extracted from the current output matrix, and the extracted row vectors are sorted according to the order of the rows in the current output matrix in which the row vectors are located, to obtain the waypoint sequence. 3.The method of claim 2, wherein, The number of neighborhood neuron nodes and the proximity weight decrease with an increase in the number of iterations, The method comprises: The waypoint file of the waypoint to be flown by the UAV is obtained from a UAV application platform for providing UAV services, wherein the waypoint file is a compressed file supporting waypoint point markup language; The waypoint file is parsed to obtain the latitude and longitude information and the flight height information of the waypoint to be flown, The waypoint file is decompressed to obtain a decompressed file, wherein the decompressed file comprises: a template file used for editing the flight waypoint, an execution file used for defining the flight and load action instructions of the UAV, and an auxiliary resource file used for editing the flight waypoint, the flight waypoint in the template file comprises takeoff point information and waypoint information, and the execution file only contains the waypoint information and does not include the takeoff point information, The template file is parsed using a derived extensible markup language file object model of Python to obtain a document object of a tree-shaped data structure used for representing the waypoint file, The takeoff point latitude and longitude information and the height information are obtained from a takeoff point element of the document object, The waypoint latitude and longitude information and the height information are obtained from a position marker element of the document object. 4.The method of claim 3, wherein, The method comprises: According to each row vector in the current output matrix, a waypoint to be flown is determined, and a row vector fitted to the waypoint to be flown is extracted; The method comprises: A takeoff point is determined from the waypoint sequence, the waypoint sequence is reordered with the takeoff point as the first waypoint to obtain a waypoint sequence with the takeoff point as the first waypoint, The position marker elements used for saving the waypoints in the template file and the execution file are sorted according to the waypoint sequence with the takeoff point as the first waypoint, and an index sub-element of the position marker element is set, the index sub-element is used for recording the waypoint order information, and the flight tasks of the position marker elements after the interaction sorting are arranged to follow the position marker elements, to obtain modified template file and execution file, The modified template file and the execution file are compressed to obtain a UAV flight route file.

5. A method for generating a flight path of a UAV based on a waypoint file, characterized in that, The method comprises: A waypoint file of a waypoint to be flown by a UAV is obtained, The waypoint file is parsed to obtain the latitude and longitude information and the flight height information of the waypoint to be flown, The latitude and longitude information and the flight height information of the waypoint to be flown are converted into three-dimensional space information in a Cartesian coordinate system to obtain three-dimensional space information of the waypoint to be flown, For each to-be-flown waypoint, a correspondence between all possible selectable waypoints as the next waypoint and the expected return value when the to-be-flown waypoint is the current selected waypoint is established, obtaining the expected return correspondence of the to-be-flown waypoint, wherein the current selected waypoint corresponds to at least one selectable waypoint, and each selectable waypoint corresponds to a pre-fetch return value, initializing the pre-fetch return value in the correspondence, marking all to-be-flown waypoints as unselected, taking the takeoff point in the to-be-flown waypoints as the current selected waypoint, selecting a selectable waypoint in the unselected state from the selectable waypoints according to the current pre-fetch return value in the expected return correspondence of the current selected waypoint, and marking the selected waypoint as selected, calculating an expected return estimate when the selected selectable waypoint is the next current selected waypoint, updating the current pre-fetch return value with the expected return estimate, and taking the selected selectable waypoint as the current selected waypoint, repeating the step of selecting a selectable waypoint in the unselected state from the selectable waypoints according to the current pre-fetch return value in the expected return correspondence of the current selected waypoint until there is no selectable waypoint, obtaining a waypoint sequence with the takeoff point as the first waypoint, repeating the step of marking all to-be-flown waypoints as unselected until the number of loops reaches a set number threshold, obtaining an optimal waypoint sequence, generating a UAV flight route file based on the optimal waypoint sequence. 6.The method of claim 5, wherein, The calculation of the expected return estimate when the selected selectable waypoint is the next current selected waypoint includes: calculating the expected return estimate according to the current pre-fetch return value corresponding to the selected selectable waypoint, the reward value of the selected selectable waypoint, the maximum expected return estimate among the corresponding selectable waypoints when the selected selectable waypoint is the next current selected waypoint, the learning rate, and the discount factor, wherein the reward value is determined according to the spatial distance between the waypoints of the current selected waypoint and the selected selectable waypoint; The selection of a selectable waypoint in the unselected state from the selectable waypoints according to the current pre-fetch return value in the expected return correspondence of the current selected waypoint further includes: determining whether to perform path exploration or select the currently known optimal path according to the ε parameter in the ε-greedy strategy, when the ε parameter is greater than a set parameter threshold, selecting the selectable waypoint with the best expected return value and in the unselected state; when the ε parameter is not greater than the set parameter threshold, randomly selecting a selectable waypoint in the unselected state. 7.The method of claim 5, wherein, The obtaining of the waypoint file including to-be-flown waypoints of a UAV includes: obtaining the waypoint file from a UAV application platform for providing UAV services, wherein the waypoint file is a compressed file supporting waypoint point markup language; The parsing of the waypoint file to obtain the latitude and longitude information and the flight height information of the to-be-flown waypoints includes: decompressing the waypoint file to obtain a decompressed file, wherein the decompressed file includes: a template file for editing flight waypoints, an execution file for defining UAV flight and load action instructions, and an auxiliary resource file for editing flight waypoints, the flight waypoints in the template file include takeoff point and waypoint information, and the execution file only includes waypoint information without takeoff point information, The template file is parsed using a derived python extensible markup language file object model to obtain a document object of a tree-shaped data structure for representing the waypoint file, Obtaining the takeoff point longitude and latitude information and the height information from a takeoff point element of the document object, Obtaining the approach point longitude and latitude information and the height information from a position marker element of the document object. 8.The method of claim 5, wherein, The optimal waypoint sequence is used to generate a UAV flight route file, including: According to the optimal waypoint sequence, the position marker elements in the template file and the execution file for saving the waypoints are sorted, and an index sub-element of the position marker element is set, the index sub-element is used to record the waypoint sequence information, and the flight tasks of the sorted position marker elements are arranged to follow the position marker elements, to obtain a modified template file and an execution file, The modified template file and the execution file are compressed to obtain a UAV flight route file.

9. A UAV flight route generation device for a waypoint file, characterized in that, The decoding module is configured to obtain a waypoint file including UAV waypoints to be flown, parse the waypoint file to obtain longitude and latitude information and flight height information of the waypoints to be flown, convert the longitude and latitude information and the flight height information of the waypoints to be flown into three-dimensional space information in a Cartesian coordinate system to obtain three-dimensional space information of the waypoints to be flown, The route generation module is configured to construct a self-organizing mapping neural network (SOM) model according to the number of the waypoints to be flown, wherein the number of output neuron nodes in the competitive layer of the SOM model is determined according to the number of the waypoints to be flown, and each output neuron node is used to represent a three-dimensional space information, Randomly selecting a three-dimensional space information of a waypoint to be flown from the three-dimensional space information of the waypoints to be flown and inputting the three-dimensional space information into the SOM model to make each output neuron node of the SOM model output a three-dimensional space information for fitting the waypoint, Determining the three-dimensional space information with the closest spatial distance between the current input three-dimensional space information of the waypoint to be flown in the current output, and determining the output neuron node outputting the three-dimensional space information with the closest spatial distance as the current winning neuron node, Updating the three-dimensional space information of each neighborhood neuron node of the current winning neuron node, Repeating the step of randomly selecting a three-dimensional space information of a waypoint to be flown from the three-dimensional space information of the waypoints to be flown until the three-dimensional space information of the current output converges, Extracting a waypoint sequence for fitting the waypoints to be flown from the three-dimensional space information of the current output, The encoding module is configured to generate a UAV flight route file based on the waypoint sequence.

10. A waypoint file oriented unmanned aerial vehicle flight path generation device, characterized by, The device includes: The decoding module is configured to obtain a waypoint file including UAV waypoints to be flown, parse the waypoint file to obtain longitude and latitude information and flight height information of the waypoints to be flown, convert the longitude and latitude information and the flight height information of the waypoints to be flown into three-dimensional space information in a Cartesian coordinate system to obtain three-dimensional space information of the waypoints to be flown, a route generation module, configured to, for each flight point, establish a correspondence between all possible selectable flight points as a next flight point and an expected return value when the flight point is a current selected flight point, to obtain an expected return correspondence of the flight point, wherein the current selected flight point corresponds to at least one selectable flight point, and each selectable flight point corresponds to a pre-fetch return value, initializing the pre-fetch return value in the correspondence, marking all flight points as unselected, taking off as a current selected flight point, selecting a selectable flight point in unselected state from the selectable flight points according to a current pre-fetch return value in the expected return correspondence of the current selected flight point, and marking the selected flight point as selected, calculating an expected return estimate when the selected selectable flight point is a next current selected flight point, updating the current pre-fetch return value with the expected return estimate, and taking the selected selectable flight point as the current selected flight point, repeating the step of selecting a selectable flight point in unselected state according to a current pre-fetch return value in the expected return correspondence of the current selected flight point until there is no selectable flight point, to obtain a flight point sequence with the take off as a first flight point, repeating the step of marking all flight points as unselected until a number of times reaches a set number threshold, to obtain an optimal flight point sequence, an encoding module, configured to generate a UAV flight route file based on the optimal flight point sequence.

Citation Information

Patent Citations

  • Airline planning method and device for surveying and mapping unmanned aerial vehicle

    CN106774431A

  • Bio-inspired self-organizing mapping path planning method of autonomous underwater vehicle under ocean circulation

    CN110095120A