A route planning method and computer readable medium

By acquiring and preprocessing the boundaries of the plot, planning virtual route segments and adjusting the sampling distance, the problems of large computing power consumption and insufficient safety in the route planning of the drone are solved, achieving uniformity and safety of sampling points, and improving the image Representative of the sample.

CN114779812BActive Publication Date: 2025-01-10NANJING JIMU ROBOT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210464517.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2025-01-10
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

The existing UAV route planning methods have problems such as high computing power consumption, excessive ineffective routes and insufficient safety in agricultural operations. Especially when dealing with irregular polygonal plots, it is difficult to ensure the representativeness and safety of collected image samples. sex.

Method used

By obtaining the boundary vertices of the plot to be worked, performing pre-processing and convexity detection, determining the target boundary, adjusting the sampling distance, planning the virtual route segment, and distributing sampling points on the virtual route segment, deleting invalid sampling points, and ensuring the sampling points Uniformity and safety, and finally correct the route transition points to ensure route safety.

Benefits of technology

The sampling points are uniformly, randomly and safely distributed under different plot shapes, reducing waste of invalid routes and storage space, and improving the representativeness of sampling points and the safety of routes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114779812B_ABST
    Figure CN114779812B_ABST
Patent Text Reader

Abstract

The present invention provides a route planning method and a computer-readable medium, the method comprising obtaining boundary vertices of a plot to be operated to obtain an initial boundary; preprocessing the boundary vertices to obtain target boundary vertices, and connecting the target boundary vertices to determine the target boundary; performing an initial number of sampling point distribution planning operations within the target boundary, and effectively determining the initial number of sampling points to determine the number of effective sampling points to obtain a target number of effective sampling points and their distribution within the initial boundary, wherein the target number is less than or equal to the initial number; and performing route planning based on the effective sampling points and their distribution to obtain an operating route within the initial boundary. The present invention solves the problems of large computing power consumption of operating routes, a large number of ineffective operating routes, and safety of operating routes in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of unmanned aerial vehicles, and in particular to a route planning method and a computer-readable medium. Background Art

[0002] A drone is a remotely controlled or autonomously flying aircraft that does not carry an operator. It can fly automatically or be remotely guided. It can also carry specific equipment to perform aerial operations. Therefore, it is used in industries such as industry, agriculture, and the military.

[0003] When agricultural drones are performing plant protection operations, they are usually remotely controlled or autonomously flown by operators according to pre-set routes. However, the drone route planning in the prior art has the defect of limited minimum flight altitude due to the lack of altitude information within the plot, which results in that even if the minimum flight altitude is applied for image acquisition, the image recognition resolution requirements of some scenes cannot be met. Moreover, the concave polygonal plot drone route planning in the prior art is to achieve a full coverage route covering the entire plot, but this method is not suitable for sampling tasks and has the defect of a large number of ineffective sampling operation routes; at the same time, since the sampling in the prior art is carried out by manually sampling sampling points, and the randomness of manual sampling is high, the sampling points are more concentrated, and there is a defect that the image samples finally collected are less representative.

[0004] In particular, plots of land are often irregular polygons, and when drones in the prior art are located at a certain geographic coordinate to take pictures of sampling points, they need to rely on the computer image processing algorithm logic that consumes a lot of computing power to determine whether the current geographical location is inside or outside the plot to be operated. Each geographic coordinate needs to be judged by the computer image processing algorithm, which leads to the defects of excessive computation and excessive image storage space in the route planning method in the prior art. In addition, the route shooting planned by the prior art cannot accurately guarantee whether the image taken is an image inside the plot to be operated, and it is easy to exceed the boundary corresponding to the plot to be operated, thereby taking invalid images and causing a waste of storage space; at the same time, obstacles at the boundary of the current plot to be operated cannot be detected, and it is easy to cause the drone to crash.

[0005] In view of this, it is necessary to improve the route planning method in the prior art to solve the above problems. Summary of the invention

[0006] The purpose of the present invention is to disclose a route planning method and a computer-readable medium to solve the problems in the prior art of high computing power consumption of operating routes, a large number of ineffective operating routes, and safety of operating routes.

[0007] To achieve the above object, the present invention provides a route planning method, comprising:

[0008] Get the boundary vertices of the plot to be operated and obtain the initial boundary;

[0009] Preprocessing the boundary vertices to obtain target boundary vertices, and connecting the target boundary vertices to determine the target boundary;

[0010] Performing an initial number of sampling point distribution planning operations within the target boundary, and performing validity determination on the initial number of sampling points to determine the number of valid sampling points, so as to obtain a target number of valid sampling points and their distribution within the initial boundary, wherein the target number is less than or equal to the initial number;

[0011] Route planning is performed based on the effective sampling points and their distribution to obtain an operating route within the initial boundary.

[0012] As a further improvement of the present invention, the effective determination of the initial number of sampling points includes:

[0013] Determining the geographic coordinates corresponding to the initial number of sampling points, and judging whether the geographic coordinates corresponding to the sampling points are located outside the initial boundary;

[0014] If the geographic coordinates corresponding to the sampling point are outside the initial boundary, the current sampling point is determined to be a first invalid sampling point, and the first invalid sampling point is deleted;

[0015] If the geographic coordinates corresponding to the sampling point are within the initial boundary, the current sampling point is determined to be the first valid sampling point, and the first valid sampling point is retained, and the number and distribution of the first valid sampling points are determined and used as the number and distribution of valid sampling points.

[0016] As a further improvement of the present invention, the performing of an initial number of sampling point distribution planning operations within the target boundary includes:

[0017] Presetting a first sampling interval, and performing virtual route segment planning based on the first sampling interval inside the target boundary to obtain a virtual route segment;

[0018] A second sampling interval is preset, and an initial number of sampling points and their distribution are determined on the virtual route segment based on the second sampling interval, wherein an extension direction of the virtual route segment is parallel to the planting rows of the plot to be operated.

[0019] As a further improvement of the present invention, the preprocessing of the boundary vertices to obtain target boundary vertices and connecting the target boundary vertices to determine the target boundary includes:

[0020] The concavity and convexity of the boundary vertices contained in the initial boundary are detected, and based on the concavity and convexity of the boundary vertices, the concave boundary vertices are deleted to obtain the convex boundary vertices as the target boundary vertices, and the target boundary vertices are connected to determine the target boundary.

[0021] As a further improvement of the present invention, the step of determining whether the geographical coordinates corresponding to the sampling point are located outside the initial boundary includes:

[0022] It is determined whether the geographic coordinates corresponding to the sampling point are located in any filling area, wherein the filling area is one or more areas formed by removing the area corresponding to the initial boundary from the area corresponding to the target boundary.

[0023] As a further improvement of the present invention, after determining the number and distribution of the first effective sampling points, the method further includes:

[0024] Preset a safety distance, and determine whether the distance between the first valid sampling point and the boundary line formed by the initial boundary is less than the safety distance;

[0025] If the distance between the first valid sampling point and the boundary line formed by the initial boundary is less than the safety distance, the current first valid sampling point is determined to be a second invalid sampling point, and the second invalid sampling point is deleted;

[0026] If the distance between the first valid sampling point and the boundary line formed by the initial boundary is greater than or equal to the safety distance, the current first valid sampling point is determined to be the second valid sampling point, and the second valid sampling point is retained, and the number and distribution of the second valid sampling points are determined and used as the number and distribution of the valid sampling points.

[0027] As a further improvement of the present invention, after the effective determination of the initial number of sampling points, the method further comprises:

[0028] Determine the number of valid sampling points, and determine whether the number of valid sampling points is equal to the target number;

[0029] If the number of valid sampling points is not equal to the target number, performing a sampling point distribution planning adjustment operation to re-execute an initial number of sampling point distribution operations;

[0030] If the number of valid sampling points is equal to the target number, the sampling point distribution planning adjustment operation is not performed, wherein the sampling point distribution planning adjustment operation includes adjusting the first sampling interval and / or the second sampling interval according to the ratio of the number of valid sampling points to the target number.

[0031] As a further improvement of the present invention, the presetting of the first sampling interval and performing virtual route segment planning based on the first sampling interval inside the target boundary to obtain the virtual route segment include:

[0032] The initial route segment is preconfigured, and virtual route segments are sequentially distributed at intervals of a first sampling interval in the extending direction perpendicular to the initial route segment inside the target boundary to form virtual route segments, wherein a first safety distance is preset between the initial route segment and the initial boundary adjacent to the initial route segment.

[0033] As a further improvement of the present invention, the presetting of the second sampling interval and determining the initial number of sampling points and their distribution on the virtual route segment based on the second sampling interval include:

[0034] Determine a preset distance from an intersection of the virtual route segment and the target boundary on the virtual route segment as an initial sampling point;

[0035] The sampling points are evenly distributed in sequence on the virtual route segment at intervals of a second sampling interval according to the initial sampling points, wherein the preset distance is less than or equal to the second sampling interval.

[0036] As a further improvement of the present invention, after performing route planning according to the effective sampling points and their distribution to obtain an operating route within the initial boundary, the method further includes:

[0037] Determine whether the operation route has overlapping geographic coordinates with the initial boundary;

[0038] If the operating route has overlapping geographical coordinates with the initial boundary, the operating route is corrected between the two end points of the operating route according to the route transition point determination rule;

[0039] The route transition point determination rule is specifically: the route transition point is located in a safe transition area enclosed by a transition area determined by a concave boundary vertex closest to the coincident geographic coordinates and an extension line formed inwardly from an initial boundary adjacent to the concave boundary vertex, or,

[0040] The initial boundary is extended outward by a preset second safety distance to obtain an extended boundary vertex that is closest to the concave boundary vertex of the overlapping geographic coordinates, and the extended boundary vertex is configured as a route transition point.

[0041] Based on the same inventive concept, the present invention also discloses a computer-readable medium, in which computer program instructions are stored. When the computer program instructions are read and executed by a processor, the steps in the route planning method described in the aforementioned invention are executed.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] Firstly, by adjusting the first sampling interval and the second sampling interval and deleting the first invalid sampling point and / or the second invalid sampling point, not only the target number of sampling points can be obtained, but also different plot shapes can be applied. The distribution of sampling points is determined according to the plot shape, thereby achieving a uniform distribution of the target number of sampling points; secondly, a virtual route segment is first planned, and then the sampling points are distributed on the virtual route segment. The planning of the sampling points can be adjusted according to the shape of the plot to be operated, which not only ensures the uniformity and randomness of the sampling points, but also ensures the safety of the sampling points. Compared with the average distribution of the grid, the sampling points can be set more freely, more evenly, and more safely on the virtual route segment; finally, the route transition point is set to ensure the safety of the UAV during operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A step diagram of the route planning method shown in the present invention;

[0045] Figure 2 A cross-sectional view of a plot to be worked on shown in the present invention;

[0046] Figure 3 A diagram showing the specific steps for detecting the concavity and convexity of the boundary vertices contained in the initial boundary;

[0047] Figure 4 A schematic diagram of determining a target boundary vertex according to the present invention;

[0048] Figure 5 A detailed flowchart for deleting concave boundary vertices and retaining convex boundary vertices;

[0049] Figure 6 for Figure 1 The specific step diagram of step 3 shown;

[0050] Figure 7 An implementation method of planning a virtual route segment shown in the present invention;

[0051] Figure 8 Another implementation method of planning a virtual route segment shown in the present invention;

[0052] Fig. 9 Another implementation method of planning a virtual route segment shown in the present invention;

[0053] Fig.10 This is another implementation method of planning a virtual route segment according to the present invention;

[0054] Fig.11 An implementation method of planning virtual route segments and sampling points shown in the present invention;

[0055] Fig.12Another implementation method of planning virtual route segments and sampling points shown in the present invention;

[0056] Fig.13 Another embodiment of planning virtual route segments and sampling points shown in the present invention;

[0057] Fig.14 This is another implementation method of planning virtual route segments and sampling points shown in the present invention;

[0058] Fig.15 A specific flow chart of determining a first valid sampling point and a first invalid sampling point shown in the present invention;

[0059] Fig.16 A schematic diagram for deleting the first invalid sampling point;

[0060] Fig.17 A specific flow chart of determining a second valid sampling point and a second invalid sampling point shown in the present invention;

[0061] Fig.18 A specific flow chart of the operation route planning shown in the present invention;

[0062] Fig.19 A specific implementation method of determining a route transition point shown in the present invention;

[0063] Fig. 20 A specific implementation method of extending the initial boundary shown in the present invention;

[0064] Fig.21 A topological diagram of a computer-readable medium of the present invention. DETAILED DESCRIPTION

[0065] The present invention is described in detail below in conjunction with the various embodiments shown in the accompanying drawings, but it should be noted that these embodiments are not limitations of the present invention, and any equivalent transformations or substitutions in functions, methods, or structures made by ordinary technicians in the field based on these embodiments are all within the scope of protection of the present invention.

[0066] It should be noted that the initial boundary outer side refers to an area outside the initial boundary and includes the boundary line of the initial boundary, and the target boundary inner side refers to an area inside the target boundary and includes the boundary line of the target boundary.

[0067] Please refer to Figures 1 to 20As shown, the present invention shows a specific implementation of a route planning method. In this implementation, the route planning method is applied to electronic devices, which may be, for example, terminals, servers, ground workstations, drones, etc. The terminals may be smart phones, tablet computers, portable laptop computers, desktop computers, etc. The drones may be rotary-wing drones, fixed-wing drones, etc. Among them, the rotary-wing drone is designed with multiple propellers above the fuselage, and the multiple propellers can generate powerful lift, so the operator can achieve precise control of the rotary-wing drone, while the fixed-wing drone needs to use auxiliary tools such as runways or catapults to achieve launch. In addition, rotary-wing drones can achieve hovering, while fixed-wing drones cannot achieve hovering. Therefore, rotary-wing drones are preferably used to better achieve the beneficial effects disclosed by the present invention.

[0068] Please refer to Figure 1 As shown, the route planning method includes the following steps S1 to S4.

[0069] Step S1: Obtain the boundary vertices of the land to be operated to obtain the initial boundary.

[0070] Exemplarily, the operator controls the UAV to fly above the boundary vertex of the plot to be operated, and sequentially obtains the three-dimensional coordinate information of all boundary vertices of the plot to be operated along the target direction to form a sequence corresponding to all boundary vertices of the plot to be operated, so as to determine the sequence corresponding to all boundary vertices of the initial boundary.

[0071] Specifically, the operator controls the remote control of the drone, or the operator realizes automatic control of the drone through a computer or other electronic equipment based on the flight control system installed on the drone itself, so as to control the drone to fly from the take-off point to above the boundary vertex of the plot to be operated, so as to obtain the three-dimensional coordinate information of the boundary vertex of the plot to be operated. The operator adjusts the drone to a preset height (for example, the preset height is 3 meters) to perform the dotting operation. The geographic coordinate information of the boundary vertex of the plot to be operated where the drone is located is dotted and recorded, wherein the geographic coordinate information includes the longitude, latitude and relative height data of the boundary vertex of the plot to be operated where the drone is located, so as to complete the establishment of the three-dimensional model of the plot to be operated, and at the same time, determine the initial boundary based on the boundary vertex of the plot to be operated.

[0072] Specifically, the operator controls the drone to mark points in the target direction in turn to obtain the geographic coordinate information of all boundary vertices of the plot to be operated, forming a sequence corresponding to all boundary vertices of the plot to be operated, thereby determining the sequence corresponding to all vertices of the initial boundary. According to the geographic coordinate information corresponding to each boundary vertex, the terrain information of the plot to be operated is determined. For example, based on the relative height data contained in the geographic coordinate information, a monotonically increasing or monotonically decreasing value is determined to determine the slope in the plot to be operated, thereby completing the establishment of a three-dimensional model of the plot to be operated. Of course, the establishment of a three-dimensional model is not limited to this. Based on the three-dimensional coordinate model of the plot to be operated, after the position of each sampling point is determined later, the flight height (i.e., relative height data) of the drone corresponding to each sampling point can be determined at the same time, so as to avoid obstacles in the plot to be operated, so as to avoid the subsequent drones from colliding when working in the plot to be operated, causing the danger of the drone crashing.

[0073] It should be noted that the aforementioned preset height refers to the ultrasonic height, that is, the height of the drone relative to the ground / ground obstacles is adjusted to 3 meters. Figure 2 As shown, illustratively, Figure 2 A cross-sectional view of a plot to be operated is shown, where point A1 is the take-off point of the drone, and points A2 and A3 are the boundary vertices of the plot to be operated where the drone is located. The ultrasonic height refers to the height of the boundary vertex of the plot to be operated where the drone is located relative to the ground / ground obstacles. For example, the aforementioned preset height (i.e., ultrasonic height) is 3 meters, which can be understood as Figure 2 H1 shown at point A2 is the ultrasonic height (i.e., 3 meters), and H2 output at point A3 is the ultrasonic height (i.e., 3 meters). It can also be understood that the ultrasonic height refers to the height of the boundary vertex of the plot to be operated where the drone is currently located from the ground / ground obstacles. In addition, the relative height data contained in the point record refers to the position of the boundary vertex of the plot to be operated where the drone is located relative to the take-off point, that is, Figure 2The height of midpoint A2 relative to the horizontal line where point A1 is located is H3 shown in the figure (i.e., the relative height data corresponding to midpoint A2 in the dot record), and the height of point A3 relative to the horizontal line where point A1 is located is H4 shown in the figure (i.e., the relative height data corresponding to midpoint A3 in the dot record). By obtaining the relative height and ultrasonic height, a three-dimensional model inside the plot to be operated can be constructed with a simple algorithm to determine the situation of crops / obstacles inside the plot to be operated, saving computing power. In addition, the aforementioned geographic coordinate information of all boundary vertices of the plot to be operated is obtained by dotting in sequence along the target direction, wherein the target direction can be clockwise, counterclockwise, or any other direction, as long as the subsequent detection can be achieved to obtain the concavity and convexity of the boundary vertices contained in the initial boundary, and whether to delete the boundary vertices based on the concavity and convexity to obtain the convex boundary vertex, and use it as the target boundary vertex. Of course, the target direction is preferably clockwise or counterclockwise to facilitate subsequent detection to determine the concavity and convexity of the boundary vertices contained in the initial boundary.

[0074] Optionally, in addition to the aforementioned method of obtaining the boundary vertices of the plot to be worked and obtaining the initial boundary, any other method may be used, such as manual field measurement, fixed-point surveying by a surveying device, surveying by a surveying drone, or measurement based on radar or satellite remote sensing, or obtaining the boundary vertices of the plot to be worked by loading the data to the storage medium of the drone through wireless communication from a server, as long as the aforementioned method of determining the initial boundary and creating a three-dimensional model of the plot to be worked can be achieved, and the accuracy can be guaranteed.

[0075] Step S2: pre-process the boundary vertices to obtain target boundary vertices, and connect the target boundary vertices to determine the target boundary.

[0076] Exemplarily, the concavity and convexity of the boundary vertices contained in the initial boundary obtained above are detected, and the concave boundary vertices are deleted based on the concavity and convexity of the boundary vertices to obtain convex boundary vertices as target boundary vertices, and the target boundary vertices are connected to determine the target boundary.

[0077] Specifically, refer to Figure 3 As shown, detecting the concavity and convexity of the boundary vertices contained in the initial boundary includes the following steps S21 to S22.

[0078] Step S21, traverse the sequences corresponding to all boundary vertices of the initial boundary in sequence.

[0079] Specifically, the boundary vertices included in the initial boundary are obtained, the boundary vertices are numbered in sequence along the target direction (ie, clockwise or counterclockwise), and the boundary vertices included in the initial boundary are traversed in sequence along the sequence numbers.

[0080] Step S22, using the vector cross product method to calculate the vector cross products corresponding to all boundary vertices in turn, and according to the aforementioned vector cross products, delete the concave boundary vertices, retain the convex boundary vertices, and use them as target boundary vertices.

[0081] For example, Figure 4 As shown in the figure, the initial boundary is a polygonal area formed by the points B1, B2, B3, B4, B5, B6, B7 and B8 shown in the figure, wherein the initial boundary contains eight boundary vertices, which are point B1, B2, B3, B4, B5, B6, B7 and B8 in clockwise direction. Traverse each boundary vertex in clockwise direction from the boundary vertex with the smallest serial number, and record them as P (B1) , P (B2) , P (B3) , P (B4) , P (B5) , P (B6) , P (B7) , P (B8) , and obtain the vector cross product corresponding to each boundary vertex. Based on the vector cross product corresponding to each vertex, the boundary vertex corresponding to the vector cross product less than zero is defined as a convex boundary vertex, and the boundary corresponding to the vector cross product not less than zero (that is, greater than zero or equal to zero) is defined as a concave boundary vertex. At the same time, the concave boundary vertex is deleted, and the convex boundary vertex is retained and used as the target boundary vertex.

[0082] Specifically, starting from point B1, the traversal is performed, and the previous boundary vertex (i.e., point B8) and the next boundary vertex (i.e., point B2) in the clockwise direction of point B1 are selected. The vector (P (B8) , P (B1) ) and vector (P (B1) , P (B2) ) and the vector cross product corresponding to point B1 is recorded as cross (B1) , where cross (B1) =(P (B8) , P (B1) )×(P (B1) , P (B2) ),Right now, Then point B1 is a concave boundary vertex, delete this point; select the previous boundary vertex of point B2 in the clockwise direction (i.e., point B8) and the next boundary vertex of point B2 in the clockwise direction (i.e., point B3), and calculate the vector (P (B8) , P (B2) ) and vector (P (B2) , P (B3) ) and the vector cross product corresponding to point B2 is recorded as cross (B2), where cross (B2) =(P (B8) , P (B2) )×(P (B2) , P (B3) ),Right now, Then point B2 is a concave boundary vertex, delete this point; select the previous boundary vertex of point B3 in the clockwise direction (i.e., point B8) and the next boundary vertex of point B3 in the clockwise direction (i.e., point B4), and calculate the vector (P (B8) , P (B3) ) and vector (P (B3) , P (B4) ), and the vector cross product corresponding to point B3 is recorded as cross (B3) , where cross (B3) =(P (B8) , P (B3) )×(P (B3) , P (B4) ),Right now, Then B3 is a convex boundary vertex and is not deleted, and so on. Calculate the vector cross products of points B1, B2, B3, B4, B5, B6, B7, and B8 in a clockwise direction, respectively, and they are (B1) 、cross (B2) 、cross (B3) 、cross (B4) 、cross (B5) 、cross (B6) 、cross (B7) 、cross (B8) Based on the judgment that the vector cross product corresponding to each boundary vertex is less than zero or not less than zero, the concavity and convexity corresponding to each boundary vertex are determined, and the concave boundary vertices are deleted, and the convex boundary vertices are retained and used as target boundary vertices, and the target boundary vertices are connected in sequence to determine the target boundary.

[0083] Similarly, Figure 4 As shown in the figure, when the target direction is counterclockwise, the order of the boundary vertices is point B8, point B7, point B6, point B5, point B4, point B3, point B2 and point B1. Traverse each boundary vertex in the counterclockwise direction from the point with the largest number, and record them as P (B8) , P (B7) , P (B6) , P (B5) , P (B4) , P (B3) , P (B2) , P (B1), get the vector cross product corresponding to each boundary vertex, and then based on the vector cross product corresponding to each vertex, define the boundary vertex corresponding to the vector cross product less than zero as a concave boundary vertex, and define the boundary corresponding to the vector cross product not less than zero (that is, greater than zero or equal to zero) as a convex boundary vertex. At the same time, delete the concave boundary vertices, retain the convex boundary vertices, and use them as target boundary vertices. For example, starting from point B8, select the previous boundary vertex in the counterclockwise direction of point B8 (that is, point B1) and the next boundary vertex in the clockwise direction of point B8 (that is, point B7), and calculate the vector (P) based on the vector cross product method. (B1) , P (B8) ) and vector (P (B8) , P (B7) ) and the vector cross product corresponding to point B8 is recorded as cross (B8) , where cross (B8) =(P (B1) , P (B8) )×(P (B8) , P (B7) ),Right now, is a convex boundary vertex and is not deleted; select the previous boundary vertex in the counterclockwise direction of point B7 (i.e., point B8) and the next boundary vertex in the clockwise direction of point B7 (i.e., point B6), and calculate the vector (P (B8) , P (B7) ) and vector (P (B7) , P (B6) ) and the vector cross product corresponding to point B7 is recorded as cross (B7) , where cross (B7) =(P (B8) , P (B7) )×(P (B7) , P (B6) ),Right now, If it is a convex boundary vertex, it will not be deleted; and so on. Based on the fact that the vector cross product corresponding to each boundary vertex is less than zero or not less than zero, the concavity and convexity corresponding to each boundary vertex are determined, and the concave boundary vertices are deleted, and the convex boundary vertices are retained and used as target boundary vertices. The target boundary vertices are connected in sequence to determine the target boundary.

[0084] Ginseng Figure 5 As shown, the above-mentioned method of determining the concavity and convexity corresponding to each boundary vertex based on the vector cross product corresponding to each boundary vertex being less than zero or not less than zero, and deleting the concave boundary vertices and retaining the convex boundary vertices includes the following steps S221 to S225.

[0085] Step S221, determine whether the target direction corresponding to the sequence corresponding to all boundary vertices of the initial boundary is clockwise or counterclockwise; if the target direction is clockwise, execute step S222; if the target direction is counterclockwise, execute step S223.

[0086] Step S222, the target direction is clockwise, determine whether the vector cross product corresponding to the boundary vertex is less than zero; if so, execute step S224; if not, execute step S225.

[0087] Step S223, the target direction is counterclockwise, determine whether the vector cross product corresponding to the boundary vertex is less than zero; if so, execute step S225; if not, execute step S224.

[0088] Step S224: determine whether the boundary vertex is a convex boundary vertex, and retain the convex boundary vertex.

[0089] Step S225: determine whether the boundary vertex is a concave boundary vertex, and delete the concave boundary vertex.

[0090] Specifically, combined Figure 4 As shown, if the target direction is clockwise, if the vector cross product corresponding to point B1 in the clockwise direction is (B1) is not less than zero (i.e., greater than zero or equal to zero), point B1 is determined to be a concave boundary vertex, and point B1 is deleted. At the same time, the triangular area [P (B1) , P (B8) , P (B2) ] to the concave polygon filling triangle set is the filling area; if the vector cross product corresponding to point B1 in the clockwise direction cross (B1) If it is less than zero, point B1 is determined to be a convex boundary vertex and point B1 is retained. Similarly, after traversing all boundary vertices in sequence, all convex boundary vertices are obtained and used as target boundary vertices, and the target boundary vertices are connected in sequence to determine the target boundary.

[0091] Similarly, if the target direction is counterclockwise, if the vector cross product corresponding to point B8 in the counterclockwise direction is (B8) is not less than zero (i.e., greater than zero or equal to zero), point B8 is determined to be a convex boundary vertex and point B8 is retained; if the vector cross product of point B8 in the counterclockwise direction is (B8) If the value is less than zero, point B8 is determined to be a concave boundary vertex and point B8 is deleted. At the same time, the triangular area [P (B8) , P (B7) , P (B1)] to the concave polygon filling triangle set is the filling area. By analogy, after traversing all boundary vertices in turn, all convex boundary vertices are obtained and used as target boundary vertices, and the target boundary vertices are connected in turn to determine the target boundary.

[0092] It should be noted that the above step of traversing the boundary vertices is repeated multiple times until there is no concave boundary vertex in the result obtained by traversing the boundary vertices in sequence. Figure 4 As shown, when traversing in the counterclockwise direction for the first time, starting from point B2, we get cross (B2) If it is not less than zero, then point B2 is determined to be a convex boundary vertex and is not deleted. Then, B1 is determined counterclockwise to obtain cross (B1) If it is less than zero, point B1 is determined to be a concave boundary vertex, and point B1 is deleted. At the same time, the triangular area [P (B1) , P (B8) , P (B2) ] to a concave polygon filling triangle set (i.e., Figure 4 Then, we traverse the remaining boundary vertices one by one and get the cross (B8) 、cross (B7) 、cross (B6) 、cross (B5) 、cross (B4) 、cross (B3) If all are greater than zero, then point B8, point B7, point B6, point B5, point B4, and point B3 are all convex boundary vertices. Since point B2 is a convex boundary vertex in the first traversal, a second traversal is required. In the second traversal, point B8, point B7, point B6, point B5, point B4, point B3, and point B2 are traversed in turn to obtain cross (B8) 、cross (B7) 、cross (B6) 、cross (B5) 、cross (B4) 、cross (B3) are all greater than zero, then it is determined that points B8, B7, B6, B5, B4, and B3 are all convex boundary vertices, and then cross (B2) If it is less than zero, point B2 is determined to be a concave boundary vertex, point B2 is deleted, and at the same time, the triangular area [P (B2) , P (B8) , P (B3) ] to a concave polygon filling triangle set (i.e., Figure 4Area 2 shown in FIG. 2). Since there is still a concave boundary vertex B2 during the first traversal, it is necessary to perform a second traversal, or even a third traversal, until all boundary vertices are confirmed as convex boundary vertices. At this point, the traversal is completed, and the convex boundary vertex B3, point B4, point B5, point B6, point B7, and point B8 are used as target boundary vertices, and point B3, point B4, point B5, point B6, point B7, and point B8 are connected in sequence to obtain the target boundary. Based on the aforementioned multiple traversal operations, it is ensured that all concave boundary vertices are deleted, and only all convex boundary vertices are retained as target boundary vertices to determine the target boundary, thereby facilitating the following sampling point planning operation in the target boundary, avoiding subsequent calculation errors, and planning the path to the outside of the work plot.

[0093] In addition, when going in the clockwise direction, similarly, convex boundary vertices are obtained in sequence as target boundary vertices, and all target boundary vertices are connected to form a target boundary, which will not be repeated here.

[0094] In addition, the concave polygon filled triangles recorded in the concave polygon filled triangle set are non-operating areas. While deleting the concave boundary vertices, the concave polygon filled triangle set is recorded to facilitate subsequent judgment and deletion of sampling points in the non-operating area, thereby preventing the sampling points in the non-operating area from being deleted, causing the planned path to exceed the initial boundary corresponding to the plot to be operated, and capturing invalid images, resulting in a waste of storage space, thereby reducing unnecessary sampling points (i.e., sampling points beyond the initial boundary), improving sampling efficiency and ensuring the availability of the captured images containing the plot to be operated, so as to make full use of the storage space corresponding to the drone for storing the captured images, and avoid invalid operations on partial images corresponding to the non-operating plots or the entire image containing the non-operating plots.

[0095] It should be noted that, in this embodiment, the initial boundary is shown as Figure 4 The shape shown in Figure 4The image shown in is only an exemplary example disclosed by the present invention, but the protection scope of the present invention cannot be limited thereby. In addition, the concavity and convexity of the boundary vertices contained in the detected initial boundary, and the method of determining whether to delete the boundary vertices based on the concavity and convexity to obtain the target boundary vertex, in addition to the aforementioned method of calculating the vector cross product corresponding to all boundary vertices based on the vector cross product method, to determine whether the vector cross product corresponding to the boundary vertex is less than zero or not less than zero, thereby determining the concavity and convexity of the boundary vertex, and finally obtaining the target boundary vertex. It can also be other methods, such as manual drawing measurement, etc., as long as the concavity and convexity of the boundary vertices contained in the initial boundary can be detected, and the concave boundary vertices can be deleted based on the concavity and convexity of the boundary vertices to obtain the convex boundary vertex as the target boundary vertex, and the target boundary vertices are connected to determine the target boundary.

[0096] Step S3, performing an initial number of sampling point distribution planning operations within the target boundary, and performing validity determination on the initial number of sampling points to determine the number of valid sampling points, so as to obtain a target number of valid sampling points and their distribution within the initial boundary, wherein the target number is less than or equal to the initial number.

[0097] Exemplarily, a sampling interval is preset (i.e., the first sampling interval and / or the second sampling interval described below), a virtual route segment is determined inside the target boundary based on the sampling interval, and an initial number of sampling points and their distribution are determined on the virtual route segment, a validity judgment is made on the initial number of sampling points according to the initial boundary, and the number of valid sampling points (i.e., the first valid sampling points or the second valid sampling points) is determined, thereby obtaining the target number of valid sampling points and their distribution within the initial boundary.

[0098] Ginseng Figure 6 As shown, the aforementioned step S3 specifically includes the following steps S31 to S32.

[0099] Step S31, presetting a first sampling interval, and planning a virtual route segment based on the first sampling interval inside the target boundary to obtain a virtual route segment.

[0100] Specifically, a first sampling spacing is preset, and a virtual route segment planning operation is performed in a polygonal area formed by point B3, point B4, point B5, point B6, point B7, and point B8. The planning direction of the virtual route segment may not be parallel to any boundary line of the target boundary, or may be parallel to a boundary line of the target boundary. The planning direction of the virtual route segment may also be adjusted according to the terrain of the plot to be operated, so as to perform the sampling point distribution operation on the virtual route segment as described below. The distance between adjacent virtual route segments is the first sampling spacing.

[0101] In addition, when planning a virtual route segment, it is possible to stay away from one or more areas (i.e., filling areas) corresponding to the concave polygon filling triangle set, effectively avoiding the following situation where too many sampling points are distributed in one or more areas (e.g., filling areas) corresponding to the concave polygon filling triangle set when performing sampling point distribution operations on the virtual route segment (e.g., Figure 4 As shown in area 1 and area 2, since one or more areas corresponding to the concave polygon filled triangle set are non-operating areas, the subsequent operation of deleting sampling points in the non-operating areas is reduced, thereby improving the efficiency of UAV route planning.

[0102] For example, the planning method of virtual route segments can be Figure 7 As shown. The first sampling interval is preset to D1. If the direction of the virtual route segment is not parallel to a boundary line of the target boundary, the vertex of the target boundary with the smallest angle between the adjacent target boundaries can be selected as the reference point, and the virtual route segment is planned at the position of the first sampling interval D1 from the reference point. Then, based on the first sampling interval, the virtual route segments are planned in the target boundary in sequence until the target boundary is filled. Optionally, the virtual route segment can be set at a distance greater than the first sampling interval D1 from the reference point to reduce the planning of virtual route segments in narrow areas (where the angle between adjacent target boundaries is small), thereby avoiding the excessive distribution of sampling points in narrow areas when the sampling point distribution planning is performed based on the virtual route segment below; in addition, the path planning in narrow areas is relatively complex, which is not conducive to the autonomous driving of drones. The complex path can easily lead to excessive energy consumption of drones, and the safety of drone driving is also difficult to ensure. Therefore, the above-mentioned technical solution can reduce the problem of excessive distribution of sampling points in narrow areas, so as to avoid the subsequent dangers of crashes caused by collisions when drones are working in the plot to be operated.

[0103] For example, the planning method of the virtual route segment can also be to refer to Figure 8 The first sampling interval is preset as D2, and a boundary line of the target boundary is selected as the reference line, so that the virtual route segment is parallel to the reference line. Preferably, the selection of the reference line excludes the boundary line corresponding to the concave polygon filling triangle (for example, Figure 8 In the example, the boundary line B7B8, the boundary line B6B7, the boundary line B5B6, the boundary line B4B5, and the boundary line B3B4 are selected, and the boundary line B3B8 is excluded as the reference line) to reduce the number of times of deleting the invalid sampling points (i.e., the first invalid sampling point and / or the second invalid sampling point), thereby improving the efficiency of the UAV route planning. Furthermore, the boundary lines adjacent to the boundary lines corresponding to the concave polygon filling triangles can also be excluded, for example Figure 8More preferably, the reference line is selected by excluding the longest boundary line among the boundary lines corresponding to the concave polygon filling triangle and its adjacent boundary lines as the reference line (for example, Figure 8 In the example, after excluding the boundary lines B3B8, B7B8 and B3B4, the longest boundary line B5B6 is selected as the reference line), so that the following sampling point distribution planning can be performed on a relatively open virtual route segment, which can increase the length of each virtual route segment and shorten the subsequent path planning complexity and path planning length.

[0104] For example, the planning method of virtual route segments can be combined with Figure 8 and Fig. 9 As shown, in Figure 8 On the basis of, the first spacing is preset as D3, the first virtual route segment is planned at the position of the first spacing D3 from the reference line, and then the remaining virtual route segments are planned in sequence at the positions separated from the first virtual route segment by the first sampling spacing D2 (or D1). Preferably, D3 is less than or equal to D2, thereby improving the uniformity of virtual route segment planning, so as to avoid the following situation of missing a large area when performing the sampling point distribution operation, thereby improving the accuracy of the image taken by the drone at the sampling point. More preferably, At the same time, in order to improve the safety of drone sampling, D3 can be greater than or equal to the safety distance disclosed below.

[0105] For example, the planning method of the virtual route segment can also be based on Fig.10 As shown, the initial route segment is pre-configured, and virtual route segments are sequentially distributed at intervals of a first sampling interval in the extension direction perpendicular to the initial route segment inside the target boundary to form virtual route segments, wherein a first safety distance is preset between the initial route segment and the initial boundary adjacent to the initial route segment. Fig.10 As shown, the preset first safety distance is D10, the preset first sampling interval is D11 (which has the same meaning as the first sampling intervals D1 and D2), and the initial route segment is set at a position separated from the boundary line of the initial boundary by the first safety distance D10, that is, Fig.10 Then, virtual route segments (ie, Fig.10 , virtual route segments L7, L8, L, etc. shown in FIG. 1 ). The operator can determine the extension direction of the initial route segment according to the planting rows in the actual operation area, and thus determine the virtual route segment based on the initial route segment, thereby improving the uniformity of virtual route segment planning.

[0106] In addition, the first sampling spacing and the virtual route segment can be determined based on the pre-sampling rows configured by the user, so as to accurately plan the virtual route segment of the work area according to user needs, thereby making the following sampling point distribution operation on the virtual route segment more accurate, wherein the first sampling spacing and the virtual route segment can be determined based on the actual arrangement direction of the sampling rows pre-configured by the user and the actual spacing of the sampling rows pre-configured by the user.

[0107] In addition, the first sampling interval and the virtual route segment can be determined based on the planting rows of the plot to be operated, that is, it can be understood that the extension direction of the virtual route segment is parallel to the planting rows of the plot to be operated, thereby achieving more accurate planning of the virtual route segment for the plot to be operated.

[0108] It should be noted that the aforementioned angle refers to the angle corresponding to the inner angle of a target boundary vertex. Figure 7 As shown, the angle corresponding to the vertex B2 of the target boundary refers to the angle corresponding to ∠B8B7B6. The aforementioned filling of the target boundary refers to planning virtual route segments in sequence at intervals of the first sampling interval D1, until the last virtual route segment has no overlapping geographical coordinates with the target boundary. For example, based on the first sampling interval D1, the first virtual route segment is planned at the first sampling interval D1 from the reference point; then, the second virtual route segment is planned at the first sampling interval D1 from the first virtual route segment; then, the third virtual route segment is planned at the first sampling interval D1 from the second virtual route segment, and so on, until the n+1th virtual route segment is planned at the first sampling interval D1 from the nth virtual route segment, and the n+1th virtual route segment and the straight line on which it is located do not have any overlapping geographical coordinates with the target boundary. At this point, the planning is stopped, that is, n virtual route segments are planned, and the planning operation is completed.

[0109] Step S32: preset a second sampling interval, and determine an initial number of sampling points and their distribution on the virtual route segment based on the second sampling interval, wherein the extension direction of the virtual route segment is parallel to the planting rows of the plot to be operated.

[0110] Specifically, a second sampling spacing is preset, and the geographic coordinates of an initial number of sampling points are determined on the virtual route segment based on the second sampling spacing. The distance between two adjacent sampling points on each virtual route segment is the second sampling spacing. Among them, the first sampling spacing may be equal to the second sampling spacing, or may not be equal to the second sampling spacing. When the first sampling spacing is equal to the second sampling spacing, a more uniform distribution of sampling points can be achieved; when the first sampling spacing is not equal to the second sampling spacing, the distribution of sampling points can be adjusted according to factors such as the growth of plants in the plot to be operated and the location where sampling is required, so that the layout of the sampling points is more adapted to the specific situation and more reasonable.

[0111] For example, the planning method of virtual route segments and sampling points can be based on Fig.11 When the first sampling interval is set to realize accurate virtual route planning for the operation plot according to user needs, the first sampling interval is set to D4, and the second sampling interval is set to D5, wherein the first sampling interval D4> the second sampling interval D5, thereby realizing more sampling points based on accurate virtual route segment planning, thereby improving the accuracy of sampling point distribution.

[0112] For example, the sampling point planning method can be Fig.12 As shown. The intersection of the same end side of each virtual route segment and the target boundary is taken as the starting point, so as to determine the sampling points in sequence according to the preset second sampling spacing. The intersection of the right side of each virtual route segment and the target boundary is taken as the starting point, that is, starting point C1, starting point C2, starting point C3, starting point C4 and starting point C5. Starting with the starting point (that is, starting point C1, starting point C2, starting point C3, starting point C4 and starting point C5) on each virtual route segment, the second sampling spacing is set to D6, and the distribution of sampling points on each virtual route segment is determined in sequence along the arrow direction E1. In addition, the starting point (that is, starting point C1, starting point C2, starting point C3, starting point C4 and starting point C5) is not used as a sampling point, thereby deleting the sampling points of the boundary line of the target boundary, which can be understood as deleting the sampling points at the edge of the initial boundary. This not only avoids the danger of subsequent drones crashing when they collide with the plot to be operated, but also makes the geographical location of all sampling points more accurate.

[0113] For example, the sampling point planning method can also be based on Fig.13 Based on the planned direction of the virtual route segment, the point where the virtual route segment intersects with the target boundary is used as the starting point, so as to determine the sampling points in sequence according to the preset second sampling interval. Fig.13As shown, the planned direction of the virtual flight segment is in a "ji" shape. Starting points F1, F2, F3, F4, etc. are set in sequence. The second sampling interval is set as D7. Starting from the starting point F1, sampling points are sequentially determined on the virtual flight segment L1 along the arrow direction E2; then, starting from the starting point F2, sampling points are sequentially determined on the virtual flight segment L2 along the arrow direction E3; next, starting from the starting point F3, sampling points are sequentially determined on the virtual flight segment L3 along the arrow direction E2; next, starting from the starting point F4, sampling points are sequentially determined on the virtual flight segment L4 along the arrow direction E3, and so on. For the aforesaid sampling point planning method, starting points are sequentially determined according to the planned direction of the virtual flight segment, reducing the contingency of sampling point planning, making the layout of sampling points more random and more uniform, thereby improving the randomness of the images taken based on the sampling points, and thus avoiding the defect that the representative of the finally collected image samples is poor in the prior art. Further, in order to make the distribution of sampling points more accurate, the starting points (i.e., starting point F1, starting point F2, starting point F3, starting point F4, etc.) are not used as sampling points, thereby improving the accuracy of sampling points.

[0114] For example, as described above, based on the planned direction of the virtual flight segment, starting points are sequentially determined on each virtual flight segment, and thus sampling points are sequentially determined according to the second sampling interval. Exemplarily, the preset distance from the intersection of the virtual flight segment and the target boundary on the virtual flight segment is determined as the initial sampling point, and then, based on the initial sampling point, sampling points are sequentially and evenly distributed on the virtual flight segment at an interval of the second sampling interval, wherein the preset distance is less than or equal to the second sampling interval. Specifically, refer to Fig.14As shown in the figure, the planned direction of the virtual flight segment is in a "ji" shape. With a preset sampling distance s1, the starting points are set at the positions on each virtual flight segment that are at a sampling distance s1 from the intersection of the virtual flight segment and the target boundary. The starting points G1, G2, G3, G4, etc. are set in sequence, and so on. The second sampling interval is set as D8. Starting from the starting point G1, sampling points are sequentially determined on the virtual flight segment along the arrow direction E2; then, starting from the starting point G2, sampling points are sequentially determined on the virtual flight segment along the arrow direction E3; next, starting from the starting point G3, sampling points are sequentially determined on the virtual flight segment along the arrow direction E2; then, starting from the starting point G4, sampling points are sequentially determined on the virtual flight segment along the arrow direction E3, and so on. This not only makes the distribution of the sampling points more uniform, but also sets the geographical coordinates at a sampling distance s1 from the intersection of the virtual flight segment and the target boundary as the starting point according to the preset sampling distance s1. Thus, the sampling distance can be adjusted according to requirements to adjust the position of the starting point, and the sampling points can be set as close as possible to the boundary line of the target boundary. Therefore, while ensuring the safety of the drone, the drone can collect image information at the edge. Optionally, the sampling distance s1 ≥ 1 / 2 of the second sampling interval D8, thereby maximizing the sampling uniformity. Of course, setting the geographical coordinates at a sampling distance s1 from the intersection of the virtual flight segment and the target boundary as the starting point, the setting direction of this starting point can be on the same side of the target boundary or can be set at intervals on both sides of the target boundary. This embodiment does not limit the setting direction of the starting point in this regard.

[0115] It should be noted that the sampling area defined by the first sampling interval and the second sampling interval completely covers at least the entire target boundary, so that the sampling points obtained based on the first sampling interval and the second sampling interval are more accurate, reducing the contingency of sampling point selection. In addition, the sampling points obtained based on the first sampling interval and the second sampling interval are more evenly and safely distributed. In the target boundary, first, virtual flight segments are planned according to the first sampling interval, and then sampling points are planned according to the second sampling interval. Of course, in addition to the aforementioned method of planning sampling points, sampling points can also be adaptively planned according to the shape of the boundary. This not only ensures the uniformity and randomness of the sampling point distribution, but also ensures the safety of sampling. Compared with the average distribution of the grid, sampling points can be set more freely, evenly, and safely on the preset virtual flight segment, avoiding safety problems (colliding with trees, branches, obstacles on the boundary) caused by the sampling points being too close to the boundary line of the initial boundary and resulting in the crash of the drone, and also avoiding the defect of low sampling accuracy in the regular distribution of the sampling points of the aforementioned grid.

[0116] In addition, in addition to the aforementioned methods, the planning of the virtual route segment and the distribution of the sampling points can also be any other method, which can be adjusted according to the needs of the customer, as long as the sampling points can be evenly and accurately distributed in the target boundary to ensure the accuracy of the first valid sampling point or the second valid sampling point determined in the sampling points; in addition, while achieving accurate and uniform distribution, it is also possible to reduce the operation of deleting the first invalid sampling point and / or the second invalid sampling point according to needs, thereby improving the computing efficiency.

[0117] Based on the virtual route segment and the initial number of sampling points determined on the virtual route segment, the geographical coordinates corresponding to the initial number of sampling points are determined, so as to make a valid judgment on the initial number of sampling points based on the geographical coordinates to determine whether to delete the sampling point, thereby obtaining the valid sampling points (i.e., the first valid sampling points or the second valid sampling points) and their number, and finally the target number of valid sampling points within the initial boundary and their distribution. The target number is less than or equal to the initial number.

[0118] Ginseng Fig.15 As shown, determining the geographic coordinates respectively corresponding to the initial number of sampling points, thereby making an effective judgment on the initial number of sampling points based on the geographic coordinates to determine whether to delete the sampling points specifically includes the following steps S331 to S335.

[0119] Step S331: Determine the geographic coordinates corresponding to the initial number of sampling points.

[0120] Step S332, determine whether the geographic coordinates corresponding to the sampling point are located outside the initial boundary; if so, execute step S333; if not, execute step S334.

[0121] Step S333: determine that the sampling point is a first invalid sampling point, and delete the first invalid sampling point.

[0122] Step S334: determine that the sampling point is the first valid sampling point, and retain the first valid sampling point.

[0123] Step S335: Determine the number and distribution of first valid sampling points.

[0124] Specifically, combined Fig.16 As shown in the figure, referring to the above, the polygon formed by connecting points B1, B2, B3, B4, B5, B6, B7, and B8 in sequence is the initial boundary, and the polygon formed by connecting points B3, B4, B5, B6, B7, and B8 in sequence is the target boundary. The sampling point located outside the initial boundary (which can be understood as being located within the concave polygon filled triangle set and containing the boundary line of the concave polygon filled triangle) is determined as the first invalid sampling point. Fig.16, the geographic coordinates corresponding to point W1, point W2, point W3 and point W4 are all outside the initial boundary, then point W1, point W2, point W3 and point W4 are determined to be the first invalid sampling point, and the first invalid sampling point is deleted. The other sampling points among all the sampling points except the first invalid sampling point are defined as the first valid sampling points, and the number and distribution of the first valid sampling points are obtained and used as the number and distribution of valid sampling points.

[0125] It should be noted that the geographic coordinates corresponding to each sampling point are used to determine whether the sampling point is located outside the initial boundary, so that the sampling point located outside the initial boundary is defined as the first invalid sampling point and deleted. When the route planning is performed later, it is not included in the scope of route planning. Therefore, when the drone is located at a certain geographic coordinate to shoot the sampling point, it does not need to rely on the computer image processing algorithm logic that consumes a lot of computing power to determine whether the current geographic coordinate of the drone is inside or outside the initial boundary. It is not necessary to judge each geographic coordinate, thereby solving the defects of the route planning method in the prior art that the amount of calculation is too large and the image storage space is too large, and the steps of route planning for unnecessary sampling points are reduced. Ultimately, not only the efficiency of route planning is improved, but also the burden on the storage space of the drone is reduced. Preferably, the aforementioned determination of whether the geographic coordinates corresponding to the sampling point are located outside the initial boundary includes determining whether the geographic coordinates corresponding to the sampling point are located in any filling area, wherein the filling area is one or more areas formed by excluding the area corresponding to the initial boundary from the area corresponding to the target boundary, that is, the boundary line of the aforementioned concave polygon filled triangle set and containing the concave polygon filled triangle can also be understood as Figure 4 , and includes the boundary lines of area 1 and area 2. By this method, compared with calculating the sum of the areas from the sampling point to all boundary vertices and comparing it with the area of ​​the plot to be operated to determine whether it is outside the initial boundary, only the sum of the areas from the sampling point to each vertex of the filling area is calculated and compared with the area of ​​the filling area. When the areas are the same, it can be determined that it is in the filling area. By this method, it is determined whether the sampling point is outside the initial boundary, avoiding the need to traverse all boundary vertices for calculation for each sampling point, which can greatly save computing power and improve computer operation efficiency.

[0126] In addition, the aforementioned first valid sampling point and its distribution are used as the valid sampling point and its distribution. In order to make the image captured by the obtained geographic coordinates of the sampling point more accurate and reduce the area beyond the initial boundary (i.e., the unnecessary area) in the captured image, a safety distance can also be preset. According to whether the distance between the first valid sampling point and the boundary line of the initial boundary is less than the safety distance, it is determined whether to delete the first valid sampling point.

[0127] Ginseng Fig.17 As shown, the above-mentioned determination whether to delete the first valid sampling point specifically includes the following steps S341 to S345.

[0128] Step S341: preset a safety distance and determine the geographic coordinates corresponding to the first valid sampling point.

[0129] Step S342, determine whether the distance between the first valid sampling point and the boundary line of the initial boundary is less than the safety distance; if so, execute step S343; if not, execute step S344.

[0130] Step S343: determine that the first valid sampling point is a second invalid sampling point, and delete the second invalid sampling point.

[0131] Step S344: determine that the first valid sampling point is a second valid sampling point, and retain the second valid sampling point.

[0132] Step S345: Determine the number and distribution of second valid sampling points.

[0133] Specifically, combined Fig.16 As shown, the preset safety distance is D9, and a circle is drawn with the first valid sampling point as the center and the safety distance D9 as the radius. When the circle and the outer side of the initial boundary have overlapping geographic coordinates, the first valid sampling point is determined to be the second invalid sampling point. Fig.16 In , circles are drawn for points W5, W6, W7, W8, W9, W10, W11, W12, W13, W14 and W15 respectively. If points W5, W6, W7, W8, W9, W10 and W11 all have overlapping geographic coordinates outside the initial boundary (i.e., the area formed by connecting points B1, B2, B3, B4, B5, B6, B7 and B8 in sequence), then points W5, W6, W7, W8, W9, W10 and W11 are defined as second invalid sampling points, and the second invalid sampling points are deleted. The other first valid sampling points except the second invalid sampling points are defined as second valid sampling points, and the number and distribution of second valid sampling points are obtained, which are used as the number and distribution of valid sampling points.

[0134] It should be noted that, by presetting a safety distance, the first valid sampling point whose distance from the boundary line of the initial boundary is less than the safety distance is deleted, and then it is not included in the route planning scope when performing route planning. When the UAV operates on subsequent operation routes, it reduces the shooting of unnecessary areas, thereby reducing the burden on the UAV image storage space. At the same time, the storage space of the UAV image is reused to reduce the waste of storage space, further improving the safety of path planning and avoiding safety hazards caused by being too close to the boundary of the plot.

[0135] In addition, after obtaining the number of valid sampling points and their distribution, it is determined whether the number of valid sampling points is equal to the target number; if the number of valid sampling points is not equal to the target number, the sampling point distribution planning adjustment operation is performed to re-execute the initial number of sampling point distribution operations; if the number of valid sampling points is equal to the target number, the sampling point distribution operation is not performed. Further, when the number of valid sampling points is not equal to the target number, if the number of valid sampling points is greater than the target number, the sampling point distribution planning adjustment operation may also be performed to re-execute the initial number of sampling point distribution operations, or the sampling point distribution planning adjustment operation may be selectively performed (i.e., performed or not performed) as needed. The number of valid sampling points refers to the number of the first valid sampling points or the number of the second valid sampling points.

[0136] Specifically, the sampling point distribution planning adjustment operation refers to increasing or decreasing the sampling point distribution according to the comparison result between the number of valid sampling points and the target number, so that the number of valid sampling points approaches the target number. When the number of valid sampling points is less than the target number, the first sampling spacing and / or the second sampling spacing are reduced, and can be adaptively adjusted as needed to prevent the situation where there are too few valid sampling points and part of the area within the initial boundary cannot be photographed or the shooting clarity is not enough. When the planting row is determined, the second sampling spacing can be adjusted first to avoid invalid sampling. When the number of valid sampling points is greater than the target number, the first sampling spacing and / or the second sampling spacing are increased to reduce the valid sampling points, thereby preventing too many overlapping areas from being photographed within the initial boundary, causing a waste of storage space of the drone, and ultimately improving the operating efficiency of the drone based on the route planned by the valid sampling points. Alternatively, when the number of the first valid sampling points is greater than the target number and the number of the second valid sampling points is equal to the target number, the number and distribution of the second valid sampling points are adopted, or when the second valid sampling points are less than the target number and the number of the first valid sampling points is equal to the target number, the number and distribution of the first valid sampling points are sampled.

[0137] Preferably, the first sampling spacing and / or the second sampling spacing are adjusted according to the ratio of the number of effective sampling points to the target number, thereby adjusting the number of sampling points. For example, if the first sampling spacing is equal to the second sampling spacing, when the number of effective sampling points is less than the target number, the first sampling spacing and / or the second sampling spacing are adjusted according to the ratio of the number of effective sampling points to the target number, and the sampling spacing (i.e., the first sampling spacing and / or the second sampling spacing) is reduced, thereby increasing the number of sampling points, so as to achieve the purpose of increasing the number of effective sampling points. When the number of effective sampling points is greater than the target number, the sampling spacing (i.e., the first sampling spacing and / or the second sampling spacing) is increased, thereby reducing the number of sampling points, so as to achieve the purpose of reducing the number of effective sampling points. When the number of effective sampling points is equal to the target number, the sampling spacing (i.e., the first sampling spacing and / or the second sampling spacing) is not adjusted. For another example, if the first sampling spacing is not equal to the second sampling spacing, the first sampling spacing and the second sampling spacing can be determined according to the ratio of the number of effective sampling points to the target number, and the preset relationship between the first sampling spacing and the second sampling spacing, or only the first sampling spacing is adjusted, so as to achieve the target number of effective sampling points.

[0138] It should be noted that the above determination of whether the number of valid sampling points is equal to the target number, and when the number of valid sampling points is not equal to the target number, the subsequent operation process is executed in a loop until the number of valid sampling points is equal to the target number, or the number of loops reaches a preset upper limit.

[0139] Step S4: Plan the route based on the effective sampling points and their distribution to obtain the operating route within the initial boundary.

[0140] For example, based on the TSP problem-ant colony algorithm, the route planning operation is performed in the effective sampling points to obtain the operation route within the initial boundary. Fig.18 As shown, executing the route planning operation in the effective sampling points based on the TSP problem-ant colony algorithm specifically includes the following steps S41 to S47.

[0141] Step S41, initializing basic parameters; wherein the basic parameters include: the number of ants m, the maximum number of iterations g, the pheromone importance factor α, the heuristic function importance factor β, and the pheromone volatility coefficient ρ.

[0142] Step S42: construct a solution space, randomly place ants at different valid sampling points, and calculate the next valid sampling point visited by each ant k (k=1, 2, 3, 4, ..., m) based on the roulette algorithm until all ants have visited all valid sampling points.

[0143] Step S43: update the taboo table tabu storing the paths of each ant traversing the valid sampling points.

[0144] Step S44: Update pheromone to calculate the path length L of each ant traversing the valid sampling points k (k=1, 2, 3, ..., m), record the optimal solution in the current iteration number.

[0145] Step S45, updating the pheromone concentration matrix on the connection path between the valid sampling points, and clearing the taboo table tabu.

[0146] Step S46, determine whether the current number of iterations reaches the maximum number of iterations g; if so, execute step S47; if not, execute step S42.

[0147] Step S47: determine the shortest operating route.

[0148] Specifically, after determining the number and distribution of valid sampling points, the shortest operating route is obtained among the valid sampling points based on the TSP problem-ant colony algorithm. In addition, the method of obtaining the shortest operating route among the valid sampling points is not limited to the aforementioned TSP problem-ant colony algorithm, but can also be any other method, for example, finding the shortest route by using changes such as symmetry and translation, etc., as long as the shortest route can be obtained based on all valid sampling points. The sampling path is planned by first determining the valid sampling points and then planning the shortest path, which first ensures the uniformity and safety of the arrangement of the sampling points, avoids subsequent repeated planning, and saves computing power.

[0149] In addition, after obtaining the operating route, in order to further improve the safety of the operating route, it is determined whether there are overlapping geographical coordinates between the operating route and the initial boundary, so as to perform correction operations on the operating route to avoid collisions and other dangers when subsequent drones are working in the area to be operated, causing the drone to crash.

[0150] Exemplarily, it is determined whether there are overlapping geographic coordinates between the operating route and the initial boundary; if there are overlapping geographic coordinates between the operating route and the initial boundary, it means that the operating route is outside the plot to be operated, and the operating route is corrected according to the route transition point determination rule between the two end points of the operating route; if there are no overlapping geographic coordinates between the operating route and the initial boundary, no correction operation is performed. Among them, the route transition point determination rule is specifically: the route transition point is located in the transition area determined by the concave boundary vertex closest to the overlapping geographic coordinates as a reference and the safe transition area enclosed by the extension line formed inwardly from the initial boundary adjacent to the concave boundary vertex, or, the initial boundary is extended outward by a preset second safety distance to obtain an extended boundary vertex of the concave boundary vertex closest to the overlapping geographic coordinates, and the extended boundary vertex is configured as the route transition point.

[0151] Specifically, refer to Fig.19As shown, point Y1 and point Y2 are two valid sampling points, and the line segment formed between point Y1 and point Y2 is part of the operation route, where the operation route and the initial boundary (i.e., the polygon formed by connecting point B1, point B2, point B3, point B4, point B5, point B6, point B7 and point B8 in sequence) have overlapping geographic coordinates, i.e., point M1 and point M2. Then select the concave boundary vertex closest to point M1 and point M2, i.e., point B1. Determine a transition area based on the concave boundary vertex (i.e., point B1), i.e., Fig.19 The transition area (i.e., area 3) and the extension line (i.e., area 4) formed by the initial boundary adjacent to the concave boundary vertex enclose a safe transition area (i.e., the overlapping area of ​​area 3 and area 4). In the safe transition area 5, any geographic coordinate can be selected as the route transition point, that is, when the UAV is operating, it first flies from point Y1 to the route transition point, and then flies from the route transition point to point Y2, thereby avoiding the UAV from flying in areas outside the plot to be operated due to unclear terrain outside the plot to be operated, which may cause unsafe factors for the UAV (for example, obstacles outside the plot to be operated cannot be detected, which may easily cause the UAV to crash), thereby improving the safety of the UAV during aerial operations.

[0152] For example, Fig. 20As shown, the second safety distance is preset to D12, and the initial boundary (i.e., the area formed by connecting points B1, B2, B3, B4, B5, B6, B7, and B8 in sequence) is extended outward by the second safety distance D12. Based on the initial boundary of the extended second safety distance (i.e., the area formed by connecting points B1', B2', B3', B4', B5', B6', B7', and B8' in sequence), it is determined whether there are geographic coordinates that coincide with the operating route, so as to obtain the point B1' where the boundary where the coincident geographic coordinates are located intersects as the route transition point or the concave vertex (extended) closest to the coincident geographic coordinates as the route transition point, and connect points Y3, B1', and Y4 to correct the operating route. Among them, the initial boundary is extended outward by the second safety distance, and the specific extension method can be determined according to the operating route, as long as it can avoid the situation where the drone cannot detect obstacles outside the area to be operated and causes a crash. By extending the second safety distance, the safety of the operating route is detected in the expanded initial boundary. If the operating route falls outside the original initial boundary and falls within the expanded initial boundary, the operating route (that is, the operating route that falls outside the original initial boundary and falls within the expanded initial boundary) is judged to be a safe operating route, which can reduce the number of times the operating route is modified and improve operating efficiency. At the same time, the second safety distance can be adjusted according to actual terrain needs. If the actual terrain boundary range is open and there are no obstacles, a larger second safety distance can be set, and it can be further adaptively adjusted to further improve route planning efficiency and operating efficiency.

[0153] In addition, to ensure the safety of drone aerial operations, the route transition point can be determined by the aforementioned method of using a safe transition area, or by adjusting the initial boundary, or by any other method, as long as the drone does not need to pass through areas outside the area to be operated when performing operations, thereby avoiding the drone from crashing due to failure to detect obstacles outside the area to be operated.

[0154] Further, Fig.21As shown, this embodiment also discloses a computer-readable medium 900. The computer-readable storage medium 900 stores computer program instructions 901, and when the computer program instructions are read and run by a processor 902, the steps in a route planning method disclosed above are executed. The computer-readable medium 900 can be regarded as a control chip (such as a storage unit of an avionics system) in a mobile operating device such as a drone. Optionally, the computer-readable medium 900 can be configured as a server and the server runs on a physical device for building a private cloud, a hybrid cloud or a public cloud. The computer-readable medium 900 is used to store a program, and the processor 902 executes a route planning method disclosed above after receiving an execution instruction. At the same time, the processor 902 disclosed in this embodiment may be an integrated circuit chip with signal processing capabilities. The processor 902 may be a general-purpose processor that can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present invention. A general-purpose processor may be a microprocessor or the general-purpose processor may also be any conventional processor. In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

Claims

1. A route planning method, characterized in that: include: Get the boundary vertices of the plot to be operated and obtain the initial boundary; Preprocessing the boundary vertices according to the concavity and convexity of the boundary vertices, deleting the concave boundary vertices, taking the convex boundary vertices as target boundary vertices, and connecting the target boundary vertices to determine the target boundary; A virtual route segment is planned by presetting a first sampling interval inside the target boundary, and an initial number of sampling points and their distribution are determined on the virtual route segment by presetting a second sampling interval, so as to perform an initial number of sampling point distribution planning operations within the target boundary, and to perform a validity judgment on the initial number of sampling points according to whether the geographical coordinates corresponding to the sampling points are located outside the initial boundary, and to determine the number of valid sampling points, so as to obtain a target number of valid sampling points and their distribution within the initial boundary, wherein the target number is less than or equal to the initial number; Route planning is performed based on the effective sampling points and their distribution to obtain an operating route within the initial boundary.

2. The route planning method according to claim 1, characterized in that: Performing effective determination on the initial number of sampling points includes: If the geographic coordinates corresponding to the sampling point are outside the initial boundary, the current sampling point is determined to be a first invalid sampling point, and the first invalid sampling point is deleted; If the geographic coordinates corresponding to the sampling point are within the initial boundary, the current sampling point is determined to be the first valid sampling point, and the first valid sampling point is retained, and the number and distribution of the first valid sampling points are determined and used as the number and distribution of valid sampling points.

3. The route planning method according to claim 1, characterized in that: The extension direction of the virtual route segment is parallel to the planting row of the plot to be operated.

4. The route planning method according to claim 2, characterized in that: Determining whether the geographic coordinates corresponding to the sampling point are located outside the initial boundary includes: It is determined whether the geographic coordinates corresponding to the sampling point are located in any filling area, wherein the filling area is one or more areas formed by removing the area corresponding to the initial boundary from the area corresponding to the target boundary.

5. The route planning method according to claim 2, characterized in that: After determining the number and distribution of the first effective sampling points, the method further includes: Preset a safety distance, and determine whether the distance between the first valid sampling point and the boundary line formed by the initial boundary is less than the safety distance; If the distance between the first valid sampling point and the boundary line formed by the initial boundary is less than the safety distance, the current first valid sampling point is determined to be a second invalid sampling point, and the second invalid sampling point is deleted; If the distance between the first valid sampling point and the boundary line formed by the initial boundary is greater than or equal to the safety distance, the current first valid sampling point is determined to be the second valid sampling point, and the second valid sampling point is retained, and the number and distribution of the second valid sampling points are determined and used as the number and distribution of the valid sampling points.

6. The route planning method according to claim 3, characterized in that: After the initial number of sampling points are effectively determined, the method further comprises: Determine the number of valid sampling points, and determine whether the number of valid sampling points is equal to the target number; If the number of valid sampling points is not equal to the target number, performing a sampling point distribution planning adjustment operation to re-execute an initial number of sampling point distribution operations; If the number of valid sampling points is equal to the target number, the sampling point distribution planning adjustment operation is not performed, wherein the sampling point distribution planning adjustment operation includes adjusting the first sampling interval and / or the second sampling interval according to the ratio of the number of valid sampling points to the target number.

7. The route planning method according to claim 3, characterized in that: The presetting of the first sampling interval and performing virtual route segment planning based on the first sampling interval inside the target boundary to obtain the virtual route segment include: The initial route segment is preconfigured, and virtual route segments are sequentially distributed at intervals of a first sampling interval in the extending direction perpendicular to the initial route segment inside the target boundary to form virtual route segments, wherein a first safety distance is preset between the initial route segment and the initial boundary adjacent to the initial route segment.

8. The route planning method according to claim 3, characterized in that: The presetting of the second sampling interval and determining an initial number of sampling points and their distribution on the virtual route segment based on the second sampling interval include: Determine the initial sampling point at a preset distance from the intersection of the virtual route segment and the target boundary on the virtual route segment; The sampling points are evenly distributed in sequence on the virtual route segment at intervals of a second sampling interval according to the initial sampling points, wherein the preset distance is less than or equal to the second sampling interval.

9. The route planning method according to claim 1, characterized in that: After performing route planning according to the effective sampling points and their distribution to obtain an operation route within the initial boundary, the method further includes: Determine whether the operation route has overlapping geographic coordinates with the initial boundary; If the operating route has overlapping geographical coordinates with the initial boundary, the operating route is corrected between the two end points of the operating route according to the route transition point determination rule; The route transition point determination rule is specifically: the route transition point is located in a safe transition area enclosed by a transition area determined by a concave boundary vertex closest to the coincident geographic coordinates and an extension line formed inwardly from an initial boundary adjacent to the concave boundary vertex, or, The initial boundary is extended outward by a preset second safety distance to obtain an extended boundary vertex that is closest to the concave boundary vertex of the overlapping geographic coordinates, and the extended boundary vertex is configured as a route transition point.

10. A computer-readable medium, characterized in that The computer readable medium stores computer program instructions, and when the computer program instructions are read and executed by a processor, the steps of the route planning method according to any one of claims 1 to 9 are executed.

Citation Information

Patent Citations

  • Plant protection unmanned aerial vehicle flight control system

    CN108445912A

  • Air route generation method and device, electronic equipment and storage medium

    CN111750858A