Plant protection spraying path planning method and device and unmanned aerial vehicle
By dividing the target plot into multiple areas and sub-regions, and optimizing the access sequence using the TSP algorithm, the problem of increasing flights and power consumption of drones during fruit tree spraying is solved, and more efficient spray path planning is achieved.
Patent Information
- Application Number
- CN202411981797.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-15
AI Technical Summary
When existing drones spray pesticides on fruit trees and other plants, the conventional bow-shaped route leads to an increase in the number of flights and power consumption, which makes them inefficient.
By dividing the target plot into multiple areas and sub-regions, the TSP algorithm for traveler problem determines the access order of sub-regions and plants, and optimizes the spray flight route of the drone.
The total number of flights and power consumption of the drone is reduced, and the spraying efficiency is improved.
Smart Images

Figure CN119828732A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of path planning, and more specifically, to a method, device and drone for path planning of crop protection spraying. Background Art
[0002] Drones are a widely used type of unmanned aerial vehicle. As the industry continues to mature, drones have made in-depth developments in various fields. Among them, drones can be used in agriculture and forestry to spray pesticides, fertilize, pollinate, and more.
[0003] Compared with the traditional manual plant protection spraying method, the use of drones to spray pesticides has the advantages of high work efficiency and high drug utilization rate, while reducing labor costs. However, when existing drones spray pesticides on fruit trees and other plants, they generally fly in a "bow"-shaped route. However, due to the irregular distribution of fruit trees in the plot and the different shapes of each fruit tree, this conventional spraying method will increase the number of drone flights and the power consumption of drones.
[0004] Based on this, it is necessary to provide a plant protection spraying path planning solution to solve the above problems. Summary of the invention
[0005] The present application provides a method, device and drone for plant protection spraying path planning, which can reduce the total number of flights of the drone and reduce the power consumption of the drone, thereby improving the spraying efficiency of the drone.
[0006] In a first aspect, a method for planning a plant protection spraying path is provided, which can be applied to a drone, and the method includes: dividing a target plot into multiple areas, wherein the target plot includes multiple plants; performing secondary division on the multiple areas according to the ridge line of the target plot to determine multiple sub-areas; determining the geometric center point of each plant in the target plot; dividing the multiple plants into different sub-areas according to the geometric center point of each plant; determining a visiting order of the multiple sub-areas using a traveling salesman problem TSP algorithm; determining a visiting order of the plants in each sub-area using the TSP algorithm; and determining the spraying flight route of the drone according to the visiting order of the multiple sub-areas and the visiting order of the plants in each sub-area.
[0007] Exemplarily, the method provided in the embodiment of the present application is applicable to the spraying path planning of plants (such as fruit trees) in mountain mode (or in a three-dimensional scene). Considering that the fruit trees in the three-dimensional scene may be distributed on the sunny and shady sides of the hillside (such as both sides of the ridge line), there is a possibility of crossing the ridge when planning the spraying flight route, and the drone will consume extra energy to overcome gravity. Therefore, when the target plot is segmented, it can be divided into two segmentations. The first time, the target plot can be segmented into multiple areas based on a preset method, and then the area crossing the ridge line in multiple areas can be further segmented into two sub-areas according to the distribution of the ridge line in the target plot.
[0008] For example, the problem of fixed-point spraying of fruit trees in a mountainous mode (or a three-dimensional scene) can be abstracted as a traveling salesman problem (TSP), and the shortest spraying operation path of the fruit trees can be calculated using the TSP algorithm.
[0009] For example, the geometric center point of different plants may be determined in different ways. For example, when the outer contour of the plant is a circle, its geometric center point may be the center of the circle; for another example, when the outer contour of the plant is a rectangle, its geometric center point may be the center of the rectangle; for another example, when the outer contour of the plant is an ellipse, its geometric center point may be the center of the ellipse; for another example, when the outer contour of the plant is an irregular shape, its geometric center point may be the centroid of the irregular shape.
[0010] In an embodiment of the present application, for the spraying path planning of plants in a target plot in a three-dimensional scene, the target plot can be first divided into multiple areas, and then a secondary division can be performed according to the distribution of the ridge lines of the target plot, and the multiple areas can be divided into multiple sub-areas. Then, the TSP algorithm can be used to determine the access order of the multiple sub-areas after division and the access order of the plants in each sub-area, and finally, the spraying flight route of the UAV is determined according to these two access orders, thereby optimizing the traversal order of plants (such as fruit trees), reducing the total number of flights of the UAV, reducing the power consumption of the UAV, and thus improving the spraying efficiency of the UAV.
[0011] In one possible implementation, determining the spraying flight route of the UAV based on the visiting order of multiple sub-areas and the visiting order of plants in each sub-area includes: connecting the visiting order of multiple sub-areas and the visiting order of plants in each sub-area in sequence to obtain the visiting order of all fruit trees in the entire target plot, and connecting all fruit trees in sequence according to the visiting order to obtain the spraying flight route of the UAV.
[0012] In combination with the first aspect, in certain implementations of the first aspect, dividing the target plot into multiple areas includes: according to obstacles in the target plot, using a preset method to divide the target plot into multiple independent areas, and none of the multiple independent areas contain obstacles. The preset method may include any one of the following: boustrophedon cell decomposition method (also known as boustrophedon regional decomposition method, boustrophedon regional decomposition method, Boustrophedon decomposition method, etc.), trapezoidal partitioning method, Morse decomposition method, etc.
[0013] In an embodiment of the present application, considering that there may be obstacles in the target plot, it is necessary to avoid the obstacles in the target plot when dividing the target plot. For example, the plot can be decomposed according to the boustrophedon region decomposition method, and the decomposed plot is divided into multiple independent regions that do not intersect with each other and do not contain obstacles.
[0014] In combination with the first aspect, in certain implementations of the first aspect, the multiple regions are all regions containing plants, and the multiple regions are secondary segmented according to the ridge line of the target plot to determine multiple sub-regions, including: determining, based on the ridge line and the multiple regions, the region that crosses the ridge line and the region that does not cross the ridge line; secondary segmenting the region that crosses the ridge line to obtain the region after the secondary segmentation; and determining the multiple sub-regions based on the region after the secondary segmentation and the region that does not cross the ridge line.
[0015] For example, the user may manually mark the location of the ridgeline on the target plot.
[0016] In the embodiment of the present application, the area crossing the ridgeline needs to be segmented twice, and is segmented into the area on the sunny side of the ridgeline and the area on the shady side of the ridgeline (i.e., the area after the secondary segmentation); then, multiple sub-areas are obtained based on the area after the secondary segmentation and the area that does not cross the ridgeline. This allows the TSP algorithm to be used to sort the access order of the multiple sub-areas and determine the flight path of the drone in the multiple sub-areas.
[0017] In combination with the first aspect, in some implementations of the first aspect, before using the TSP algorithm to determine the access order of the multiple sub-regions, the method further includes: using a convex hull algorithm to update the boundaries of the multiple sub-regions.
[0018] Considering that the distribution of plants in the target plot may be uneven, such as there are no plants distributed in the upper part of the first sub-area, if the sub-areas divided by the above method are still used for planning, the actual operation area and the estimated operation area are quite different, which may cause the planned operation path to have a detour. Therefore, in an embodiment of the present application, the convex hull algorithm can be used to update the boundaries of multiple sub-areas. Specifically, the circle can be converted into a regular N-gon (such as a regular hexagon), and then a convex hull is calculated for all regular N-gons in the first sub-area, and the convex hull is updated as the boundary of the first sub-area. When the TSP algorithm is used for spraying path planning later, the updated boundary of the first sub-area is used as a reference for spraying path planning. In this way, the phenomenon of drones taking detours can be avoided, thereby reducing the power consumption of drones and improving the spraying efficiency of drones.
[0019] In combination with the first aspect, in certain implementations of the first aspect, before using the TSP algorithm to determine the access order of multiple areas, the method also includes: determining the take-off point of the drone; determining the geometric center points of multiple sub-areas; using the TSP algorithm to determine the access order of multiple sub-areas includes: using the TSP algorithm to determine the access order of multiple sub-areas based on the take-off point of the drone and the geometric center points of the multiple sub-areas.
[0020] Exemplarily, the geometric center point may be the centroid of the sub-region.
[0021] In a possible implementation, based on the take-off point of the UAV and the geometric center points of the multiple sub-areas, the TSP algorithm is used to determine the access order of multiple sub-areas, including: constructing a first energy consumption matrix based on the take-off point of the UAV and the geometric center points of the multiple sub-areas; based on the first energy consumption matrix, calling the TSP algorithm to determine the access order of multiple sub-areas.
[0022] In an embodiment of the present application, when using the TSP algorithm to determine the access order of multiple areas, the location of the take-off point of the drone can be considered. For example, the area closest to the take-off point is the area where the drone starts spraying first, the access starting point is fixed, the geometric center of the sub-area is abstracted, and the geometric center is used instead of the area to construct a first energy consumption matrix. Based on the first energy consumption matrix, the TSP algorithm is called to calculate the access order of each sub-area, and a relatively optimal area access order can be obtained, thereby reducing the total number of flights of the drone and reducing the power consumption of the drone.
[0023] In combination with the first aspect, in some implementations of the first aspect, the first energy consumption matrix is determined according to the cost values between different sub-areas, where the different sub-areas include sub-area i and sub-area j, and the coordinates of the geometric center point of sub-area i are (x i ,y i ), the coordinates of the geometric center point of sub-region j are (xj ,y j ).
[0024] When sub-region i and sub-region j are located on the same side of the ridgeline, the cost value E from sub-region i to sub-region j is ij It can be calculated by the following formula:
[0025]
[0026] In the case where sub-region i and sub-region j are located on different sides of the ridgeline, the cost value E from sub-region i to sub-region j is ij It can be calculated by the following formula:
[0027] Wherein, d is a positive constant, and d is greater than the first threshold.
[0028] Exemplarily, d may be a relatively large positive constant that is considered to be set, which may be specifically understood as the additional energy consumption caused by the drone crossing a mountain ridge.
[0029] In an embodiment of the present application, when planning the flight route of the drone in a three-dimensional scene, the additional energy consumption caused by frequently crossing the ridge should be avoided as much as possible, so the sub-area located on the same side of the ridge line can be prioritized. The energy consumption matrix of the TSP algorithm can be modified and calculated in two cases. When sub-area i and sub-area j are located on the same side of the ridge line, when calculating the energy consumption matrix, the Euclidean distance between the geometric center point of sub-area i and the geometric center point of sub-area j can be directly calculated; when sub-area i and sub-area j are located on different sides of the ridge line, when calculating the energy consumption matrix, in addition to calculating the Euclidean distance between the two, a larger positive constant d can be assigned to represent the additional energy consumption caused by the drone crossing the ridge. The energy consumption matrix constructed in the above manner makes the access order of multiple sub-areas obtained by calling the TSP algorithm more reasonable, which can reduce the total number of flights of the drone and reduce the power consumption of the drone, thereby improving the spraying efficiency of the drone.
[0030] In a possible implementation, the multiple sub-regions may include a first sub-region and a second sub-region, and when the first sub-region and the second sub-region are located on the same side of a ridgeline, the cost value from the first sub-region to the second sub-region may be the Euclidean distance between the geometric center point of the first sub-region and the geometric center point of the second sub-region. When the first sub-region and the second sub-region are located on different sides of the ridgeline, the cost value from the first sub-region to the second sub-region may be the sum of the Euclidean distance between the geometric center point of the first sub-region and the geometric center point of the second sub-region and a first parameter, where the first parameter is the positive constant d.
[0031] In combination with the first aspect, in certain implementations of the first aspect, the use of the TSP algorithm to determine the access order of plants in each sub-area includes: constructing a second energy consumption matrix based on the geometric center points of the plants in each sub-area; based on the second energy consumption matrix, calling the TSP algorithm to determine the access order of plants in each sub-area.
[0032] In an embodiment of the present application, when using the TSP algorithm to determine the order of visiting plants in each sub-area, the geometric center of the plants in each sub-area can be abstracted, and the second energy consumption matrix can be constructed using the geometric center instead of the plants. Then, based on the second energy consumption matrix, the TSP algorithm is called to calculate the order of visiting plants in each sub-area, and a relatively optimal order of visiting plants can be obtained, thereby reducing the total number of flights of the UAV and reducing the power consumption of the UAV.
[0033] In combination with the first aspect, in some implementations of the first aspect, the second energy consumption matrix is determined according to the cost values between different plants in each sub-area, the different plants include plant m and plant n, and the three-dimensional coordinates of the geometric center point of plant m are (x m ,y m , z m ), the three-dimensional coordinates of the geometric center point of plant n are (x n ,y n , z n ).
[0034] When the height of plant m is less than or equal to the height of plant n, the cost of plant m to plant n is E mn It can be calculated by the following formula:
[0035]
[0036] When the height of plant m is greater than the height of plant n, the cost of plant m to plant n is E mn It can be calculated by the following formula:
[0037]
[0038] Among them, a and b are both positive numbers, and a is greater than b.
[0039] For example, the drone preferentially works on fruit trees at the same or lower height to avoid extra energy consumption caused by raising the height. The extra energy consumption a caused by raising the working height of the drone is greater than the extra energy consumption b caused by lowering the working height of the drone.
[0040] In an embodiment of the present application, when the drone operates on plants in different sub-areas, the energy consumption caused by the drone's lifting or descending is taken into consideration. Specifically, the cost value between different plants can be determined based on the drone's rising height value or descending height value. Comprehensive consideration is given to determining the energy consumption brought about by the drone's work on plants in different sub-areas. This can reduce the drone's power consumption, enable the drone to spray more plants, and improve the drone's work efficiency.
[0041] In one possible implementation, the plants in the first sub-area may include a first plant and a second plant. When the heights of the first plant and the second plant are the same, the cost value from the first plant to the second plant may be the Euclidean distance between the geometric center point of the first plant and the geometric center point of the second plant. When the heights of the first plant and the second plant are different and the height of the first plant is greater than the height of the second plant, the cost value from the first plant to the second plant is: the sum of the Euclidean distance between the geometric center point of the first plant and the geometric center point of the second plant, and the product of a second parameter and the height difference between the first plant and the second plant. When the heights of the first plant and the second plant are different and the height of the first plant is less than the height of the second plant, the cost value from the first plant to the second plant is: the sum of the Euclidean distance between the geometric center point of the first plant and the geometric center point of the second plant, and the product of a third parameter and the height difference between the first plant and the second plant. Wherein, the second parameter a is greater than the third parameter b.
[0042] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: recording the spraying status of a single plant, the spraying status of the single plant including at least one of the following: spraying not started, spraying completed, sprayed range, or range to be sprayed.
[0043] Exemplarily, the spraying status of a single plant may include spraying not started, spraying completed, or spraying in progress, which can be represented by 0, 1, and 2, respectively, 0: spraying not started, 1: spraying completed, 2: spraying in progress. Among them, for a plant in the state of being sprayed, the sprayed range and / or the range to be sprayed of the plant should also be recorded, for example, the sprayed range is [0, pi], and the range to be sprayed is [pi, 2*pi]; for another example, the plant being sprayed will be updated with the information of the unsprayed part, such as updating the spraying range from [0, 2*pi] to [pi, 2*pi]. When the drone is used for drug spraying again in the future, the range to be sprayed of the plant can be sprayed directly, such as taking the end point of the first spraying as the starting point of the second spraying, and continuing to spray the drug.
[0044] In an embodiment of the present application, when using a drone to spray medicine on plants, the spraying status of each plant can be recorded so that subsequent drones can continue to spray unsprayed plants, thereby avoiding problems such as missed spraying or incomplete spraying, and ensuring that each plant is protected.
[0045] In combination with the first aspect, in certain implementations of the first aspect, when the UAV needs to return to the take-off point, the method also includes: determining the sub-area of unfinished work; determining the access order of the sub-area of unfinished work using the TSP algorithm based on the take-off point of the UAV and the sub-area of unfinished work; determining the access order of plants in the sub-area of unfinished work using the TSP algorithm based on the spraying status of a single plant; and replanning the spraying flight route of the UAV based on the access order of the sub-area of unfinished work and the access order of plants in the sub-area of unfinished work.
[0046] Exemplarily, situations where the drone needs to return to the take-off point include, but are not limited to, the following situations: the drone is low on battery, the drone is loaded with insufficient medicine, the drone malfunctions and is unable to spray medicine, etc.
[0047] In the embodiment of the present application, the drone may run out of power or medicine during the spraying process, and needs to return to the take-off point to refill medicine or recharge. Every time it returns to the take-off point to complete the refilling or recharging, it updates the fruit tree operation information of the current plot (including updating the spraying status of the sub-area and single plant of the unfinished operation), re-calls the TSP algorithm to determine the new drone's spraying flight route, and plans the next operation sequence, which can reduce the energy consumption of full-load flying to a certain extent, and further improve the drone's spraying efficiency.
[0048] In combination with the first aspect, in certain implementations of the first aspect, the multiple plants include a first plant, and when spraying the first plant, the method further includes: obtaining the diameter of the first plant, the height of the first plant, and the coordinates of the center point of the first plant; if the diameter of the first plant is less than or equal to the spray width of the drone, the drone performs in-situ spinning spraying at the coordinates of the center point of the first plant; or, if the diameter of the first plant is greater than the spray width of the drone, and the height of the first plant is less than or equal to a preset height, the drone sprays the first plant using a concentric circle spraying method; or, if the diameter of the first plant is greater than the spray width of the drone, and the height of the first plant is greater than a preset height, the drone sprays the first plant using a spiral rising spraying method. The preset height can be set manually.
[0049] In an embodiment of the present application, when spraying a single plant (such as a fruit tree), the corresponding spraying mode can be determined based on the diameter, height, center point coordinates, spray width of the drone, etc. of the single plant to ensure that each plant can be completely and evenly sprayed with medicine, thereby better protecting the plants.
[0050] In one possible implementation, the coverage area of the fruit tree can be abstracted as a circle, and the drone can move to the center of the circle and spin a circle at the center of the fruit tree to complete the spraying of the fruit tree. This spraying mode is suitable for the scene where the coverage area of the fruit tree is less than or equal to the coverage area of the drone spraying (or the diameter of the fruit tree is less than or equal to the spray width of the drone, or the radius of the fruit tree is less than or equal to half the spray width of the drone), and the height difference of the fruit tree is not too large.
[0051] In one possible implementation, the drone can adopt a concentric circle rotating spraying mode. This spraying mode is suitable for scenes where the coverage area of the fruit trees is larger than the coverage area of the drone spraying (that is, the diameter of the fruit trees is larger than the spray width of the drone, or the radius of the fruit trees is larger than half the spray width of the drone), and the height difference of the fruit trees is not too large. It should be understood that when constructing concentric circles, starting from the outermost working circle, a series of concentric working circles with the center of the fruit tree as the center are generated from the outside to the inside with one width of the drone as the interval. Among them, the radius of the outermost working circle is the difference between the radius of the fruit tree and half the spray width, so that when the drone sprays in the outermost circle, it can ensure that the spraying edge just coincides with the edge of the fruit tree.
[0052] In one possible implementation, the drone can adopt a spiral-ascending spraying mode. For example, for fruit trees that are cone-shaped and have a large height, the above two spraying modes are not applicable, which may result in a higher amount of medicine sprayed at the top and a smaller amount of medicine sprayed at the bottom. For such conical fruit trees with a high drop, a spiral-ascending spraying mode can be adopted. The reason for using spiral ascent instead of spiral descent is that the drone has a higher amount of medicine loaded before spraying, and climbing to the top of the tree at the beginning will result in higher power consumption. In the spiral ascent mode, the amount of medicine gradually decreases as the drone climbs, so the total power consumption will be less.
[0053] In a second aspect, a drone is provided, which includes a segmentation module, a processing module and a route planning module, wherein the segmentation module is used to: segment a target plot into multiple areas, wherein the target plot includes multiple plants; perform secondary segmentation on the multiple areas according to the ridge line of the target plot to determine multiple sub-areas; the processing module is used to: determine the geometric center point of each plant in the target plot; divide the multiple plants into different sub-areas according to the geometric center point of each plant; determine the visiting order of the multiple sub-areas using the traveling salesman problem TSP algorithm; determine the visiting order of the plants in each sub-area using the TSP algorithm; the route planning module is used to: determine the spraying flight route of the drone according to the visiting order of the multiple sub-areas and the visiting order of the plants in each sub-area.
[0054] In combination with the second aspect, in certain implementations of the second aspect, the multiple regions are all regions containing plants, and the segmentation module is further used to: determine, based on the ridge line and the multiple regions, the region crossing the ridge line and the region not crossing the ridge line; perform secondary segmentation on the region crossing the ridge line to obtain the region after the secondary segmentation; and determine the multiple sub-regions based on the region after the secondary segmentation and the region not crossing the ridge line.
[0055] In combination with the second aspect, in certain implementations of the second aspect, the processing module is also used to: determine the take-off point of the drone; determine the geometric center point of the multiple sub-areas; and using the TSP algorithm to determine the access order of the multiple sub-areas includes: constructing a first energy consumption matrix based on the take-off point of the drone and the geometric center points of the multiple sub-areas; based on the first energy consumption matrix, calling the TSP algorithm to determine the access order of the multiple sub-areas.
[0056] In combination with the second aspect, in some implementations of the second aspect, the first energy consumption matrix is determined according to the cost values between different sub-areas, the different sub-areas include sub-area i and sub-area j, and the coordinates of the geometric center point of the sub-area i are (x i ,y i ), the coordinates of the geometric center point of the sub-region j are (x j ,y j ).
[0057] In the case where the sub-region i and the sub-region j are located on the same side of the ridgeline, the cost value E from the sub-region i to the sub-region j ij Calculated by the following formula:
[0058]
[0059] In the case where the sub-region i and the sub-region j are located on different sides of the ridgeline, the cost value E from the sub-region i to the sub-region j ij Calculated by the following formula:
[0060] The d is a positive number and is greater than a first threshold.
[0061] In combination with the second aspect, in certain implementations of the second aspect, the processing unit is also used to: construct a second energy consumption matrix based on the geometric center points of the plants in each sub-area; and based on the second energy consumption matrix, call the TSP algorithm to determine the access order of the plants in each sub-area.
[0062] In combination with the second aspect, in some implementations of the second aspect, the second energy consumption matrix is determined according to the cost values between different plants in each sub-area, the different plants include plant m and plant n, and the three-dimensional coordinates of the geometric center point of plant m are (x m ,y m , z m ), the three-dimensional coordinates of the geometric center point of plant n are (x n ,y n , z n ).
[0063] When the height of the plant m is less than or equal to the height of the plant n, the cost E of the plant m to the plant n is mn Calculated by the following formula:
[0064]
[0065] When the height of the plant m is greater than the height of the plant n, the cost E of the plant m to the plant n is mn Calculated by the following formula:
[0066]
[0067] Wherein, both a and b are positive numbers, and a is greater than b.
[0068] In combination with the second aspect, in certain implementations of the second aspect, the drone also includes a storage module, which is used to record the spraying status of a single plant, and the spraying status of the single plant includes any of the following: spraying not started, spraying completed, sprayed range, or range to be sprayed.
[0069] In combination with the second aspect, in certain implementations of the second aspect, the processing module is also used to: determine the sub-area of unfinished work; determine the access order of the sub-area of unfinished work using the TSP algorithm based on the take-off point of the drone and the sub-area of unfinished work; determine the access order of the plants in the sub-area of unfinished work using the TSP algorithm based on the spraying status of the single plant; the route planning module is also used to: re-plan the spraying flight route of the drone based on the access order of the sub-area of unfinished work and the access order of the plants in the sub-area of unfinished work.
[0070] In combination with the second aspect, in certain implementations of the second aspect, the segmentation module is also used to: according to the obstacles in the target plot, use a preset method to segment the target plot into multiple independent areas, and none of the multiple independent areas contains the obstacles. The preset method includes any one of the following: boustrophedon regional decomposition method, trapezoidal division method, and Morse decomposition method.
[0071] In combination with the second aspect, in some implementations of the second aspect, the processing module is further used to: update the boundaries of the multiple sub-regions using a convex hull algorithm.
[0072] In combination with the second aspect, in certain implementations of the second aspect, the drone also includes an acquisition module and a control module, and the multiple plants include a first plant. When spraying the first plant, the acquisition module is used to: acquire the diameter of the first plant, the height of the first plant and the center point coordinates of the first plant; the control module is used to: if the diameter of the first plant is less than or equal to the spray width of the drone, control the drone to perform in-situ spinning spraying at the center point coordinates of the first plant; or, if the diameter of the first plant is greater than the spray width of the drone and the height of the first plant is less than or equal to the preset height, control the drone to spray the first plant using a concentric circle spraying method; or, if the diameter of the first plant is greater than the spray width of the drone and the height of the first plant is greater than the preset height, control the drone to spray the first plant using a spiral rising spraying method.
[0073] In a third aspect, a device for planning a plant protection spraying path is provided, the device comprising a segmentation module, a processing module and a route planning module, wherein the segmentation module is used to: segment a target plot into multiple areas, wherein the target plot includes multiple plants; perform secondary segmentation on the multiple areas according to the ridge line of the target plot to determine multiple sub-areas; the processing module is used to: determine the geometric center point of each plant in the target plot; divide the multiple plants into different sub-areas according to the geometric center point of each plant; determine the visiting order of the multiple sub-areas using the traveling salesman problem TSP algorithm; determine the visiting order of the plants in each sub-area using the TSP algorithm; the route planning module is used to: determine the spraying flight route of the drone according to the visiting order of the multiple sub-areas and the visiting order of the plants in each sub-area.
[0074] In combination with the third aspect, in certain implementations of the third aspect, the multiple regions are all regions containing plants, and the segmentation module is further used to: determine, based on the ridge line and the multiple regions, the region crossing the ridge line and the region not crossing the ridge line; perform secondary segmentation on the region crossing the ridge line to obtain the region after the secondary segmentation; and determine the multiple sub-regions based on the region after the secondary segmentation and the region not crossing the ridge line.
[0075] In combination with the third aspect, in certain implementations of the third aspect, the processing module is also used to: determine the take-off point of the drone; determine the geometric center point of the multiple sub-areas; and using the TSP algorithm to determine the access order of the multiple sub-areas includes: constructing a first energy consumption matrix based on the take-off point of the drone and the geometric center points of the multiple sub-areas; based on the first energy consumption matrix, calling the TSP algorithm to determine the access order of the multiple sub-areas.
[0076] In combination with the third aspect, in some implementations of the third aspect, the first energy consumption matrix is determined according to the cost values between different sub-areas, the different sub-areas include sub-area i and sub-area j, and the coordinates of the geometric center point of the sub-area i are (x i ,y i ), the coordinates of the geometric center point of the sub-region j are (x j ,y j ).
[0077] In the case where the sub-region i and the sub-region j are located on the same side of the ridgeline, the cost value E from the sub-region i to the sub-region j ij Calculated by the following formula:
[0078]
[0079] In the case where the sub-region i and the sub-region j are located on different sides of the ridgeline, the cost value E from the sub-region i to the sub-region j ij Calculated by the following formula:
[0080] The d is a positive number and is greater than a first threshold.
[0081] In combination with the third aspect, in certain implementations of the third aspect, the processing unit is also used to: construct a second energy consumption matrix based on the geometric center points of the plants in each sub-area; and based on the second energy consumption matrix, call the TSP algorithm to determine the access order of the plants in each sub-area.
[0082] In combination with the third aspect, in some implementations of the third aspect, the second energy consumption matrix is determined according to the cost values between different plants in each sub-area, the different plants include plant m and plant n, and the three-dimensional coordinates of the geometric center point of plant m are (x m ,y m , z m ), the three-dimensional coordinates of the geometric center point of plant n are (x n ,y n , z n ).
[0083] When the height of the plant m is less than or equal to the height of the plant n, the cost E of the plant m to the plant n is mn Calculated by the following formula:
[0084]
[0085] When the height of the plant m is greater than the height of the plant n, the cost E of the plant m to the plant n is mn Calculated by the following formula:
[0086]
[0087] Wherein, both a and b are positive numbers, and a is greater than b.
[0088] In combination with the third aspect, in certain implementations of the third aspect, the drone also includes a storage module, which is used to record the spraying status of a single plant, and the spraying status of the single plant includes any of the following: spraying not started, spraying completed, sprayed range, or range to be sprayed.
[0089] In combination with the third aspect, in certain implementations of the third aspect, the processing module is also used to: determine the sub-area of unfinished work; determine the access order of the sub-area of unfinished work using the TSP algorithm based on the take-off point of the drone and the sub-area of unfinished work; determine the access order of the plants in the sub-area of unfinished work using the TSP algorithm based on the spraying status of the single plant; and re-plan the spraying flight route of the drone based on the access order of the sub-area of unfinished work and the access order of the plants in the sub-area of unfinished work.
[0090] In combination with the third aspect, in certain implementations of the third aspect, the segmentation module is also used to: according to the obstacles in the target plot, use a preset method to segment the target plot into multiple independent areas, and the multiple independent areas do not contain the obstacles. The preset method includes any one of the following: boustrophedon area decomposition method, trapezoidal division method, and Morse decomposition method.
[0091] In combination with the third aspect, in certain implementations of the third aspect, the processing module is further used to: update the boundaries of the multiple sub-regions using a convex hull algorithm.
[0092] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a computer, the computer implements the method in the first aspect and any possible implementation thereof.
[0093] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method in the first aspect and any possible implementation thereof.
[0094] In a sixth aspect, a chip is provided, comprising a processor for reading instructions stored in a memory, wherein when the processor executes the instructions, the chip implements the method in the first aspect and any possible implementation thereof.
[0095] It should be noted that the beneficial effects of the second to sixth aspects mentioned above can refer to the beneficial effects of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0096] Figure 1 It is a schematic flow chart of a method for crop protection spraying path planning provided in an embodiment of the present application.
[0097] Figure 2 This is a schematic diagram of the result of the first segmentation of a target plot provided in an embodiment of the present application.
[0098] Figure 3It is a schematic diagram of the result of the second segmentation of a target plot provided in an embodiment of the present application.
[0099] Figure 4 It is a schematic diagram of the spraying flight routes of drones in different areas provided in an embodiment of the present application.
[0100] Figure 5 This is a schematic diagram of a drone flight route for plants in different areas provided in an embodiment of the present application.
[0101] Figure 6 This is a schematic diagram of a drone provided in an embodiment of the present application spraying a single plant multiple times.
[0102] Figure 7 It is a schematic flow chart of another method for crop protection spraying path planning provided in an embodiment of the present application.
[0103] Figure 8 It is a schematic diagram of the spraying flight route of another UAV provided in an embodiment of the present application.
[0104] Fig. 9 This is a schematic diagram of a spraying path of a single plant by a drone provided in an embodiment of the present application.
[0105] Fig.10 This is a schematic diagram of another spraying path of a single plant by a drone provided in an embodiment of the present application.
[0106] Fig.11 This is a schematic diagram of another spraying path of a single plant by a drone provided in an embodiment of the present application.
[0107] Fig.12 It is a schematic structural block diagram of a device for crop protection spraying path planning provided in an embodiment of the present application.
[0108] Fig.13 It is a schematic structural block diagram of a drone provided in an embodiment of the present application. DETAILED DESCRIPTION
[0109] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0110] In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a kind of association relationship describing the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated with each other are in an "or" relationship. In addition, in the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more, and "at least one" means one or more. The terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" can explicitly or implicitly include one or more of the features.
[0111] The terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include, for example, "one or more" such expressions, unless there is a clear contrary indication in the context. The reference "one embodiment" or "some embodiments" described in this specification means that the specific features, structures or characteristics described in conjunction with the embodiment are included in one or more embodiments of the present application. Thus, the statements "one embodiment", "some embodiments", "another embodiment", "some other embodiments" etc. that appear in the differences in this specification are not necessarily all referenced to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0112] In the flatland scenario, the distribution of plants (such as fruit trees) in the plot is irregular, and each tree has a different shape and is high. Manual spraying is time-consuming, labor-intensive, inefficient, and has a high economic cost. Considering the use of drones to automatically spray pesticides, it can significantly reduce the operation time and improve the spraying efficiency, and the economic cost is low. Considering the limitations of the drone's load and power, optimizing the traversal order of fruit trees can effectively reduce the drone's power consumption and reduce the total number of flights.
[0113] Therefore, a method, device and drone for plant protection spraying path planning are provided in an embodiment of the present application. The method provided in the embodiment of the present application is suitable for spraying path planning of plants (such as fruit trees) in mountain mode, which can reduce the total flight times and power consumption of the drone, and further improve the work efficiency of the drone.
[0114] Figure 1 1 is a schematic flow chart of a method for crop protection spraying path planning provided in an embodiment of the present application. The method 100 can be applied in a drone, and the method 100 includes the following steps:
[0115] S110, dividing the target plot into a plurality of areas, wherein the target plot includes a plurality of plants.
[0116] Among them, the target plot is the plot where the user needs to use the drone for plant protection, and the altitude difference of the target plot is large. The plant can include a growing plant body including roots, stems, leaves, etc., for example, it can include various trees (fruit trees, tea trees, etc.) and various crops (wheat, rice, etc.). In the following embodiments, the scheme of this application is mainly introduced with the plant as a fruit tree.
[0117] Considering that there may be obstacles in the target plot, when the target plot is segmented, it is necessary to avoid the obstacles in the target plot. In this way, when the drone is operating in the target plot, it is not necessary to consider avoiding static obstacles. It is only necessary to perform obstacle avoidance planning when operating across the area, which greatly saves planning time. In some embodiments, segmenting the target plot into multiple areas may include: according to the obstacles in the target plot, using a preset method to segment the target plot into multiple independent areas, and none of the multiple independent areas contain obstacles. Among them, the preset method may include any of the following: ox-plowed regional decomposition method (or boustrophedon cell decomposition method, boustrophedon regional decomposition method, Bouchard decomposition method, etc.), trapezoidal partitioning method, Morse decomposition method, etc. For example, the target plot can be segmented according to the boustrophedon regional decomposition method, and the segmented plot is divided into multiple independent areas, and the multiple independent areas do not intersect each other and do not contain obstacles.
[0118] For example, Figure 2 Schematic diagram of the result of the first segmentation of a target plot provided in an embodiment of the present application. Figure 2 As shown in Figure 2, when the target plot is segmented for the first time, obstacles within the target plot (such as Figure 2 The target plot is divided into 10 areas, which are marked as area 1, area 2, area 3, area 4, area 5, area 6, area 7, area 8, area 9, and area 10. The target plot may include multiple fruit trees (such as Figure 2 ).
[0119] In some embodiments, before executing S110, the method may further include: obtaining map image information corresponding to the target plot. For example, the map image information corresponding to the target plot may be collected by a drone. The map image information may include the target plot, plants in the target plot, etc., and the target plot information (such as three-dimensional coordinate information), plant information (such as three-dimensional coordinate information), etc. may be obtained based on the map image information.
[0120] S120, performing secondary segmentation on the multiple regions according to the ridge lines of the target plot to determine multiple sub-regions.
[0121] It should be understood that the method provided in the embodiment of the present application is applicable to the spraying path planning of fruit trees in mountain mode (or in a three-dimensional scene). Considering that the fruit trees in the three-dimensional scene may be distributed on the sunny and shady sides of the hillside (such as both sides of the ridge line), there is a possibility of crossing the ridge when planning the spraying flight route, and the drone will consume extra energy to overcome gravity. Therefore, on the basis of S110, the target plot can also be divided twice, that is, according to the distribution of the ridge line in the target plot, the area crossing the ridge line in multiple areas is further divided into two sub-areas.
[0122] In some examples, S120 may specifically include: determining an area that crosses the ridgeline and an area that does not cross the ridgeline based on the ridgeline in the target plot and the multiple areas obtained after segmentation in S110; then, performing a secondary segmentation on the area that crosses the ridgeline to obtain an area after secondary segmentation; and finally, determining multiple sub-areas based on the area after secondary segmentation and the area that does not cross the ridgeline. For example, the user may manually mark the position of the ridgeline on the target plot.
[0123] For example, Figure 3 Schematic diagram of the result of the second segmentation of a target plot provided in an embodiment of the present application. Figure 3 As shown, for area 1, area 4 and area 9 that cross the ridge line, secondary segmentation can be performed according to the distribution of the ridge line, and area 1 can be divided into area 1-1 and area 1-2, area 4 can be divided into area 4-1 and area 4-2, and area 9 can be divided into area 9-1 and area 9-2. The multiple sub-areas after secondary segmentation may include: area 1-1, area 1-2, area 2, area 3, area 4-1, area 4-2, area 5, area 6, area 9-1, area 9-2, area 10, a total of 11 sub-areas. It should be noted that for area 7 and area 8 where no fruit trees are distributed, secondary segmentation is not performed and they can be directly removed. When the access order of multiple sub-areas is determined later, there is no need to sort area 7 and area 8, and only the other sub-areas containing plants (the above-mentioned 11 sub-areas) are sorted.
[0124] S130, determining the geometric center point of each plant in the target plot.
[0125] For example, the geometric center point of different plants may be determined in different ways. For example, when the outer contour of the plant is a circle, its geometric center point may be the center of the circle; for another example, when the outer contour of the plant is a rectangle, its geometric center point may be the center of the rectangle; for another example, when the outer contour of the plant is an ellipse, its geometric center point may be the center of the ellipse; for another example, when the outer contour of the plant is an irregular shape, its geometric center point may be the centroid of the irregular shape.
[0126] Taking into account the need to consider the plant's height information (z) and the plant's plane coordinate information (x, y) in mountain mode, in an embodiment of the present application, the plant can be abstracted as a circle of different sizes, and the plant's geometric center point is the center of the circle (x, y, z), that is, the center position of the circle can be used as the actual position of the plant.
[0127] S140, dividing the multiple plants into different sub-areas according to the geometric center point of each plant.
[0128] In this step, the plants may be divided into different sub-regions (cells) by combining the multiple segmented sub-regions obtained in S120 and the geometric center point of each plant obtained in S130.
[0129] For example, for a plant that spans two sub-regions, it can be determined in which sub-region the geometric center point of the plant is located, and the plant can be divided into corresponding sub-regions according to the geometric center point of the plant. For example, if a plant spans the first sub-region and the second sub-region, and the geometric center point of the plant is located in the second sub-region, then the plant can be divided into the second sub-region.
[0130] S150, using the traveling salesman problem (TSP) algorithm to determine the order of visiting the multiple sub-areas.
[0131] Exemplarily, in the embodiment of the present application, the fixed-point spraying problem of fruit trees in mountain mode (or three-dimensional scene) can be abstracted as a traveling salesman problem (TSP), and the shortest spraying path of the fruit trees can be calculated using the TSP algorithm. It should be understood that in the embodiment of the present application, the TSP algorithm can be used to calculate the shortest spraying paths of multiple sub-areas first, and then the TSP algorithm can be used to calculate the shortest spraying path of the fruit trees in each sub-area.
[0132] It should be noted that when the TSP algorithm is used to sort the access order of multiple sub-areas, only the sub-areas containing plants can be sorted. Figure 2 or Figure 3As shown, when determining the access order of multiple sub-areas, area 1-1, area 1-2, area 2, area 3, area 4-1, area 4-2, area 5, area 6, area 9-1, area 9-2 and area 10 can be sorted without considering area 7 and area 8.
[0133] In some embodiments, before using the TSP algorithm to determine the order of visiting the multiple sub-areas, the method further includes: determining the take-off point of the drone; and determining the geometric center point of the sub-area containing the plant. Exemplarily, the geometric center point may be the centroid of the sub-area containing the plant. For example, Figure 4 As shown, Figure 4 The black dots in the middle are the geometric center points of different sub-areas. Figure 4 The white dot in the figure is the take-off point of the drone.
[0134] In some examples, using the TSP algorithm to determine the access order of multiple sub-areas can specifically include: constructing a first energy consumption matrix E1 based on the take-off point of the drone and the geometric center points of multiple sub-areas containing plants; based on the first energy consumption matrix E1, calling the TSP algorithm to determine the access order of multiple sub-areas.
[0135] Exemplarily, assuming that the total number of sub-regions is N, the first energy consumption matrix E1 may be an N×N asymmetric triangular matrix, and the first energy consumption matrix E1 may be composed of cost values between different sub-regions (or, the first energy consumption matrix E1 is determined based on the cost values between different sub-regions). ij , can be calculated based on whether the two sub-areas cross the ridge line. Assume that the coordinates of the geometric center point of sub-area i are (x i ,y i ), the coordinates of the geometric center point of sub-region j are (x j ,y j ).
[0136] When sub-region i and sub-region j are located on the same side of the ridgeline, the cost value E from sub-region i to sub-region j is ij It can be calculated by the following formula 1:
[0137]
[0138] In the case where sub-region i and sub-region j are located on different sides of the ridgeline, the cost value E from sub-region i to sub-region j is ij It can be calculated by the following formula 2:
[0139]
[0140] Where d is a positive number and d is greater than the first threshold, E ij=E ji , when i=j, E ij =∞.
[0141] Exemplarily, d may be a relatively large positive constant set artificially, which may be specifically understood as the additional energy consumption caused by the drone crossing a mountain ridge.
[0142] In other words, the multiple sub-regions may include a first sub-region and a second sub-region, and when the first sub-region and the second sub-region are located on the same side of the ridgeline, the cost value from the first sub-region to the second sub-region may be the Euclidean distance between the geometric center point of the first sub-region and the geometric center point of the second sub-region. When the first sub-region and the second sub-region are located on different sides of the ridgeline, the cost value from the first sub-region to the second sub-region may be the sum of the Euclidean distance between the geometric center point of the first sub-region and the geometric center point of the second sub-region and a first parameter, where the first parameter is d.
[0143] For example, Figure 4 As shown, if the cost of the drone from area 1-2 to area 3 is calculated, since area 1-2 and area 3 are located on the same side of the ridge line, the above formula 1 can be used for calculation; if the cost of the drone from area 1-2 to area 1-1 is calculated, since area 1-2 to area 1-1 needs to cross the ridge line, the above formula 2 can be used for calculation, and a fixed weight value can be assigned to represent the additional cost of the drone crossing the ridge line.
[0144] For example, Figure 4 Schematic diagram of the spraying flight routes of drones in different areas provided in an embodiment of the present application. Figure 4 As shown in the direction of the dotted arrows in the figure, the access order of multiple sub-areas can be {1-2, 3, 4-2, 6, 9-2, 10, 9-1, 5, 4-1, 2, 1-1}, that is, when the drone sprays medicine on multiple sub-areas, it can spray area 1-2 first, and then spray area 3, area 4-2, area 6, area 9-2, area 10, area 9-1, area 5, area 4-1, area 2 and area 1-1 in turn.
[0145] In an embodiment of the present application, when planning the flight route of the drone in a three-dimensional scene, the additional energy consumption caused by frequently crossing the ridge should be avoided as much as possible, so the sub-area located on the same side of the ridge line can be prioritized. The energy consumption matrix of the TSP algorithm can be modified and calculated in two cases. When sub-area i and sub-area j are located on the same side of the ridge line, when calculating the energy consumption matrix, the Euclidean distance between the geometric center point of sub-area i and the geometric center point of sub-area j can be directly calculated; when sub-area i and sub-area j are located on different sides of the ridge line, when calculating the energy consumption matrix, in addition to calculating the Euclidean distance between the two, a larger positive constant d can be assigned to represent the additional energy consumption caused by the drone crossing the ridge. The energy consumption matrix constructed in the above manner makes the access order of multiple sub-areas obtained by calling the TSP algorithm more reasonable, which can reduce the total number of flights of the drone and reduce the power consumption of the drone, thereby improving the spraying efficiency of the drone.
[0146] In some embodiments, before determining the access order of the multiple sub-regions by using the TSP algorithm, the method may further include: updating the boundaries of the multiple sub-regions by using a convex hull algorithm.
[0147] For example, considering that the distribution of plants in the target plot may be uneven, and there are no plants distributed in the upper part of the first sub-area, if the above-divided sub-areas are still used for planning, the actual operation area and the estimated operation area are quite different, which may cause the planned operation path to take a detour. Therefore, the convex hull algorithm can be used to update the boundaries of multiple sub-areas (including the first sub-area), convert the circle into a regular N-gon (such as a regular hexagon), and then calculate a convex hull for all regular N-gons in the first sub-area. The convex hull is updated as the boundary of the first sub-area, and when the TSP algorithm is used for spraying path planning later, the updated boundary of the first sub-area is used as a reference for spraying path planning. In this way, the detour phenomenon of the drone can be avoided, thereby reducing the power consumption of the drone and improving the spraying efficiency of the drone.
[0148] S160, using the TSP algorithm to determine the order of visiting the plants in each sub-area.
[0149] It should be understood that after the plurality of sub-regions are sorted in S150 , the access sequence of the plants in each sub-region can still be solved using the TSP algorithm.
[0150] In some examples, S160 may specifically include: constructing a second energy consumption matrix E2 according to the geometric center points of the plants in each sub-region; based on the second energy consumption matrix E2, calling the TSP algorithm to determine the access order of the plants in each sub-region. That is to say, in the embodiment of the present application, when the TSP algorithm is used to determine the access order of the plants in each sub-region, the geometric center of the plant (such as a fruit tree) in each sub-region can be abstracted, and the second energy consumption matrix E2 is constructed with the geometric center instead of the plant, and then the TSP algorithm is called based on the second energy consumption matrix E2 to calculate the access order of the plants in each sub-region, so that a relatively optimal plant access order can be obtained, thereby reducing the total number of flights of the drone and reducing the power consumption of the drone.
[0151] For example, assuming that the total number of fruit trees is M, the second energy consumption matrix E2 may be an M×M asymmetric triangular matrix, and the second energy consumption matrix E2 may be composed of cost values between different fruit trees (or, the second energy consumption matrix E2 is determined based on the cost values between different plants in each sub-area). mn , can be calculated based on the height difference between plant m and plant n. Assume that the three-dimensional coordinates of the geometric center point of plant m are (x m ,y m , z m ), the three-dimensional coordinates of the geometric center point of plant n are (x n ,y n , z n ).
[0152] When the height of plant m is less than or equal to the height of plant n, the cost of plant m to plant n is E mn It can be calculated by the following formula 3:
[0153]
[0154] When the height of plant m is greater than the height of plant n, the cost of plant m to plant n is E mn It can be calculated by the following formula 4:
[0155]
[0156] Where a and b are both positive numbers, and a is greater than b, E mn ≠E nm ; When m = n, E mn =∞.
[0157] In other words, the plants within the first sub-area may include a first plant and a second plant. When the heights of the first plant and the second plant are the same, the cost value from the first plant to the second plant may be the Euclidean distance between the geometric center point of the first plant and the geometric center point of the second plant. When the heights of the first plant and the second plant are different and the height of the first plant is greater than that of the second plant, the cost value from the first plant to the second plant is: the sum of the Euclidean distance between the geometric center point of the first plant and the geometric center point of the second plant, and the product of the second parameter and the height difference between the first plant and the second plant. When the heights of the first plant and the second plant are different and the height of the first plant is less than that of the second plant, the cost value from the first plant to the second plant is: the sum of the Euclidean distance between the geometric center point of the first plant and the geometric center point of the second plant, and the product of the third parameter and the height difference between the first plant and the second plant. Wherein, the second parameter a is greater than the third parameter b.
[0158] It should be understood that the drone can give priority to fruit trees at the same or lower working height to avoid the extra energy consumption caused by the height increase. The extra energy consumption a caused by the drone's working height increase is greater than the extra energy consumption b caused by the drone's working height decrease.
[0159] In an embodiment of the present application, when the drone operates on plants in different sub-areas, the energy consumption caused by the drone's lifting or descending is taken into consideration. Specifically, the cost value between different plants can be determined based on the drone's rising height value or descending height value. Comprehensive consideration is given to determining the energy consumption brought about by the drone's work on plants in different sub-areas. This can reduce the drone's power consumption, enable the drone to spray more plants, and improve the drone's work efficiency.
[0160] For example, Figure 5 FIG. 1 is a schematic diagram of a drone flight path for plants in different regions provided in an embodiment of the present application. Figure 5 As shown, the drone can be Figure 5 The plants in different sub-areas are operated in turn in the direction of the dotted arrows.
[0161] S170, determining a spraying flight route of the drone according to a visiting sequence of the multiple sub-areas and a visiting sequence of the plants in each sub-area.
[0162] According to the above S150 and S160, the access order of multiple sub-areas and the access order of plants in each sub-area can be obtained. Exemplarily, the access order of all fruit trees in the entire target plot can be obtained by sequentially connecting the access order of multiple sub-areas and the access order of plants in each sub-area, and the spraying flight route of the drone can be obtained by sequentially connecting all fruit trees according to the access order. Furthermore, the drone can spray drugs on the plants (fruit trees) according to the spraying flight route to perform corresponding protection.
[0163] It should be noted that when the drone sprays each plant, the spraying status of the single plant can be recorded, and the spraying status of the single plant includes at least one of the following: spraying not started, spraying completed, sprayed range or range to be sprayed.
[0164] Exemplarily, the spraying status of a single plant may include spraying not started, spraying completed or spraying in progress, which can be represented by 0, 1, and 2 respectively, 0: spraying not started, 1: spraying completed, 2: spraying in progress. Among them, for the plant in the state of being sprayed, the sprayed range and / or the range to be sprayed of the plant should also be recorded. For example, the sprayed range is [0, pi], and the range to be sprayed is [pi, 2*pi]; for another example, the plant being sprayed will be updated with the information of the unsprayed part, such as updating the spraying range from [0, 2*pi] to [pi, 2*pi]. When the drone is used for drug spraying again in the future, the range to be sprayed of the plant can be sprayed directly, such as taking the end point of the first spraying as the starting point of the second spraying, and continuing to spray the drug, thereby avoiding problems such as missed spraying or incomplete spraying, and ensuring that each plant is protected.
[0165] When a drone is spraying pesticides on circular fruit trees, due to various reasons such as insufficient pesticides or insufficient drone battery, only a part of the tree may be sprayed when spraying a single fruit tree. Therefore, a fruit tree may need to be sprayed multiple times (such as three times), and the unsprayed area can be recorded each time it is sprayed. Figure 6 is a schematic diagram of a drone provided in an embodiment of the present application spraying a single plant multiple times, such as Figure 6 As shown, the angle range of the first spraying of the drone is θ1, and the end point of the first spraying is the starting point of the second spraying; the angle range of the second spraying of the drone is θ2, and the end point of the second spraying is the starting point of the third spraying; the angle range of the third spraying of the drone is θ3, and the end point of the third spraying is the starting point of the first spraying. The fruit trees that have not been sprayed can be fully covered by multiple sprayings, so that the full range of spraying of the fruit trees can be achieved.
[0166] In an embodiment of the present application, for the spraying path planning of plants in a target plot in a three-dimensional scene, the target plot can be first divided into multiple areas, and then a secondary division can be performed according to the distribution of the ridge lines of the target plot, and the multiple areas can be divided into multiple sub-areas. Then, the TSP algorithm can be used to determine the access order of the multiple sub-areas after division and the access order of the plants in each sub-area, and finally, the spraying flight route of the UAV is determined according to these two access orders, thereby optimizing the traversal order of plants (such as fruit trees), reducing the total number of flights of the UAV, reducing the power consumption of the UAV, and thus improving the spraying efficiency of the UAV.
[0167] It should be understood that the above method 100 can be used to plan the spraying path of the drone for plant protection. However, in some cases, such as insufficient power of the drone, insufficient amount of medicine loaded on the drone, failure of the drone resulting in failure to spray medicine, etc., the drone needs to return to the take-off point for refilling, charging or repair, and thus cannot complete the full range spraying of the target plot according to the route planned by the method 100. In this case, it is necessary to update the spraying information of the plants in the target plot, re-plan the spraying route, and continue to operate in the unsprayed area, which can reduce the energy consumption of full-load empty flight to a certain extent.
[0168] Figure 7 200 is a schematic flow chart of another method for crop protection spraying path planning provided in an embodiment of the present application. The method 200 mainly involves a situation where the drone needs to return to the take-off point, and the method 200 includes the following steps:
[0169] S210, determining the sub-area where the operation is not completed, the spraying status of a single plant, and the take-off point of the UAV.
[0170] For example, the sub-area where the operation is not completed can be determined based on the spraying status of a single plant recorded by the drone, as well as the spraying status of the single plant and the take-off point of the drone, and a new flight route can be replanned. Figure 8 is a schematic diagram of another spraying flight route of a drone provided in an embodiment of the present application, such as Figure 8 As shown, area 1-2 and area 3 are areas where spraying has been completed, area 4-2 is an area that has not been fully sprayed, and other areas are unoperated areas or unsprayed areas. It is necessary to replan the flight routes for the areas that have not been fully sprayed and the areas that have not been sprayed (collectively referred to as unfinished operation areas).
[0171] S220, according to the take-off point of the UAV and the sub-area of the unfinished operation, determine the access order of the sub-area of the unfinished operation by using the TSP algorithm.
[0172] In some embodiments, this step may specifically be: according to the take-off point of the drone and the geometric center point of the sub-area of the unfinished operation, the TSP algorithm is used to determine the access order of the sub-area of the unfinished operation. For example, the first energy consumption matrix E1 may be constructed according to the plane coordinates of the take-off point and the plane coordinates of the geometric center point of the sub-area of the unfinished operation using the above formula 1 or formula 2, and the access order of multiple sub-areas may be obtained by calling the TSP algorithm based on the first energy consumption matrix E1.
[0173] For example, Figure 8 As shown ( Figure 8 The dotted line in the figure is the regional flight route of the drone), where areas 1-2 and 3 have been sprayed, and the coordinate information of the geometric center points of areas 1-2 and 3 can be deleted and not involved in route planning. Other areas are unfinished operation areas and need to be replanned. The access sequence of the unfinished operation areas obtained by the above TSP algorithm can be {4-2, 6, 9-2, 10, 9-1, 5, 4-1, 2, 1-1}, that is, when the drone sprays the unfinished operation area, it can first spray area 4-2 which is closer to the take-off point, and then spray area 6, area 9-2, area 10, area 9-1, area 5, area 4-1, area 2 and area 1-1 in turn.
[0174] For other contents of this step, please refer to the relevant description in S150 and will not be repeated here.
[0175] S230: Determine the order of visiting plants in the sub-areas where the operation has not been completed by using the TSP algorithm according to the spraying status of the individual plants.
[0176] For example, in this step, the second energy consumption matrix E2 can be constructed based on the three-dimensional coordinates of the geometric center points of the unsprayed or incompletely sprayed plants in the unfinished sub-area, and the TSP algorithm can be called based on the second energy consumption matrix E2 to obtain the access order of the plants in the unfinished sub-area. Figure 8 As shown, the drone can be Figure 8 In the direction of the dotted arrows in FIG. 1 , operations are performed on the plants in areas 4-2 and 6.
[0177] For other contents of this step, please refer to the relevant description in S160 and will not be repeated here.
[0178] S240: replanning the spraying flight route of the UAV according to the visiting sequence of the unfinished sub-areas and the visiting sequence of the plants in the unfinished sub-areas.
[0179] According to the above S220 and S230, the access order of the sub-areas of unfinished operations and the access order of the plants in the sub-areas of unfinished operations can be obtained. Exemplarily, the access order of the sub-areas of unfinished operations and the access order of the plants in the sub-areas of unfinished operations can be connected in sequence to obtain the access order of the fruit trees that have not been sprayed in the entire target plot, and all the fruit trees that have not been sprayed can be connected in sequence according to the access order to obtain the new spraying flight route of the drone. Furthermore, the drone can spray the plants (such as fruit trees) with drugs according to the spraying flight route and perform corresponding protection.
[0180] For other contents of this step, please refer to the relevant description in S170 and will not be repeated here.
[0181] In the embodiment of the present application, the drone may run out of power or medicine during the spraying process, and needs to return to the take-off point to refill medicine or recharge. Every time it returns to the take-off point to complete the refilling or recharging, it updates the fruit tree operation information of the current plot (including updating the spraying status of the unfinished sub-operation area and the single plant), re-calls the TSP algorithm to determine the new drone's spraying flight route, and plans the next operation sequence, which can reduce the energy consumption of full-load flying to a certain extent, and further improve the drone's spraying efficiency.
[0182] When spraying a single plant (such as a fruit tree), the corresponding spraying mode can be determined based on relevant parameters such as the diameter of the fruit tree (or the radius of the fruit tree, the coverage area of the fruit tree), the height of the fruit tree, the coordinates of the center point of the fruit tree, the spray width of the drone, etc., to ensure that each plant can be sprayed with the medicine completely and evenly, thereby better protecting the plants.
[0183] In some embodiments, if the diameter of the first plant (such as a fruit tree) is less than or equal to the spray width of the drone, the drone performs in-situ spinning spraying at the center point coordinates of the first plant.
[0184] For example, Fig. 9 is a schematic diagram of a spraying path of a single plant by a drone provided in an embodiment of the present application, such as Fig. 9 As shown, the coverage area of the fruit tree can be abstracted as a circle, and the drone can move to the center of the circle and rotate at the center of the fruit tree to complete the spraying of the fruit tree. This spraying mode is suitable for the scene where the coverage area of the fruit tree is less than or equal to the coverage area of the drone spraying (or the diameter R1 of the fruit tree is less than or equal to the spray width of the drone, or the radius of the fruit tree is less than or equal to half the spray width of the drone), and the height difference of the fruit tree is not too large.
[0185] In some embodiments, if the diameter of the first plant (such as a fruit tree) is larger than the spray width of the drone, and the height of the first plant is less than or equal to a preset height, the drone can spray the first plant using a concentric circle spraying method, wherein the preset height can be set manually.
[0186] Exemplarily, the drone can adopt a concentric circle rotating spraying mode. This spraying mode is suitable for scenes where the coverage area of the fruit trees is larger than the coverage area of the drone spraying (i.e., the diameter of the fruit trees is larger than the spray width of the drone, or the radius of the fruit trees is larger than half the spray width of the drone), and the height difference of the fruit trees is not too large. It should be understood that when constructing concentric circles, starting from the outermost working circle, a series of concentric working circles with the center of the fruit tree as the center are generated from the outside to the inside with a width D of the drone as the interval. It should be noted that when constructing recursive circles with a width as the interval inward, the drone operation is double-spraying. When spraying on the i-th circle, half the width is sprayed on both sides of the inside and outside. Therefore, when working on the i-1th circle inward, only by shrinking 1 width inward can the spraying range be guaranteed not to overlap. When the radius of the innermost circle is less than 1 / 2 of the width, open the single-sided nozzle to avoid re-spraying, otherwise it is double spraying under normal circumstances. That is to say, if the radius of the innermost circle is less than 1 / 2 of the width, opening the double-sided spraying will cause heavy spraying in the center area; for spraying the innermost circle, the drone can move to the center of the fruit tree and open the outward nozzles for spraying. According to the ratio N of the area of the inner working circle to the spraying area of the drone, select N nozzles for fixed-point spraying to complete the inner circle leak detection and filling. The number N is not greater than the total number of nozzles of the drone.
[0187] For example, Fig.10 As shown in (a), Fig.10 (a) in the figure shows the spraying path of a single fruit tree by a drone. The fruit tree coverage area can be abstracted as a circle. When the diameter R2 of the fruit tree is larger than the spray width of the drone, the outermost working circle radius can be from the outside to the inside, which is the radius of the fruit tree minus half the width (i.e. R2 / 2-D / 2). The remaining working circle radius is based on the outermost planned working circle radius and decreases at intervals of a width D. When the drone sprays the fruit tree, it can start spraying from the outermost first circle working position. When spraying, the drone turns on the two-way nozzle so that the inside and outside of the first circle working position are sprayed with drugs; after spraying a circle at the first circle working position, it runs to the second circle working position (i.e. the center of the fruit tree) for spraying. Considering that only the outside of the second circle working position is not sprayed with drugs, when spraying drugs at the second circle working position (i.e. the center of the fruit tree), the drone can turn on the one-way nozzle (half the width D / 2) to spray the outside of the second circle working position. As shown Fig.10 As shown in (b), Fig.10(b) in the figure shows the spraying coverage of a single fruit tree by the UAV. When the UAV is spraying at the first circle operating position, the nozzles on both sides are turned on for spraying, and the obtained operating area is the first circle operating spraying range of the UAV; when the UAV is spraying at the second circle operating position (i.e. the center position of the fruit tree), the outer nozzles are turned on for spraying, and the obtained operating area is the second circle operating spraying range of the UAV.
[0188] In some embodiments, if the diameter of the first plant (such as a fruit tree) is larger than the spray width of the drone (or the coverage area of the fruit tree is larger than the spray coverage area of the drone, or the radius of the fruit tree is larger than half the spray width of the drone), and the height of the first plant is greater than a preset height, the drone can use a spiral rising spraying method to spray the first plant. The preset height can be set manually.
[0189] For example, Fig.11 As shown, Fig.11 The top and front views of the fruit tree are shown. Fig.11 As can be seen from the right picture, the fruit tree is cone-shaped. For cone-shaped fruit trees, due to the large height of the fruit tree, the above two spraying modes are not applicable, which may result in a higher amount of spray at the top and less at the bottom. For such high-drop cone fruit trees, a spiral spraying mode can be used. Among them, the planned drone route can be referred to Fig.11 The left picture shows a series of concentric circles, where the radius of the outermost circle is half a width away from the edge of the fruit tree, and the adjacent concentric circles are separated by a width D. The reason for using spiral ascent instead of spiral descent is that the drone has a higher load of medicine before spraying, and climbing to the top of the tree at the beginning will result in higher power consumption. In the spiral ascent mode, the amount of medicine gradually decreases as the drone climbs, so the total power consumption will be less.
[0190] Combination of the above Figures 1 to 11 The method embodiment of the present application is described in detail. Fig.12 and Fig.13 The device embodiment of the present application is described. It should be understood that the description of the method embodiment corresponds to the description of the device embodiment, so the parts not described in detail can refer to the previous method embodiment.
[0191] Fig.12 This is a schematic structural block diagram of a device for crop protection spraying path planning provided in an embodiment of the present application. The device may have the functions of the drone in the above method embodiment, and may be used to execute the steps performed by the drone in the above method embodiment. The function may be implemented by hardware, or by software or hardware executing corresponding software implementation. The hardware or software includes one or more modules corresponding to the above functions.
[0192] like Fig.12 As shown, the device 500 for planning the plant protection spraying path may include a segmentation module 510, a processing module 520 and a route planning module 530, wherein the segmentation module 510 is used to: segment the target plot into multiple areas, the target plot includes multiple plants; perform secondary segmentation on the multiple areas according to the ridge line of the target plot to determine multiple sub-areas; the processing module 520 is used to: determine the geometric center point of each plant in the target plot; divide the multiple plants into different sub-areas according to the geometric center point of each plant; determine the visiting order of multiple sub-areas using the traveling salesman problem TSP algorithm; determine the visiting order of plants in each sub-area using the TSP algorithm; the route planning module 530 is used to: determine the spraying flight route of the drone according to the visiting order of multiple sub-areas and the visiting order of plants in each sub-area.
[0193] In some embodiments, the multiple regions are all regions containing plants, and the segmentation module 510 is further used to: determine the region that crosses the ridge line and the region that does not cross the ridge line based on the ridge line and the multiple regions; perform secondary segmentation on the region that crosses the ridge line to obtain the region after the secondary segmentation; and determine multiple sub-regions based on the region after the secondary segmentation and the region that does not cross the ridge line.
[0194] In some embodiments, the processing module 520 is also used to: determine the take-off point of the drone; determine the geometric center points of multiple sub-areas; and use the TSP algorithm to determine the access order of multiple sub-areas, including: constructing a first energy consumption matrix based on the take-off point of the drone and the geometric center points of multiple sub-areas; based on the first energy consumption matrix, calling the TSP algorithm to determine the access order of multiple sub-areas.
[0195] Exemplarily, the first energy consumption matrix is determined according to the cost values between different sub-regions, where the different sub-regions include sub-region i and sub-region j, and the coordinates of the geometric center point of sub-region i are (x i ,y i ), the coordinates of the geometric center point of sub-region j are (x j ,y j ). In the case where sub-region i and sub-region j are located on the same side of the ridgeline, the cost value E from sub-region i to sub-region j ij Calculated by the following formula:
[0196]
[0197] In the case where sub-region i and sub-region j are located on different sides of the ridgeline, the cost value E from sub-region i to sub-region j is ij Calculated by the following formula:
[0198] d is a positive number and is greater than the first threshold.
[0199] In some embodiments, the processing unit 520 is further used to: construct a second energy consumption matrix according to the geometric center points of the plants in each sub-region; and based on the second energy consumption matrix, call the TSP algorithm to determine the access order of the plants in each sub-region.
[0200] Exemplarily, the second energy consumption matrix is determined according to the cost values between different plants in each sub-area, where the different plants include plant m and plant n, and the three-dimensional coordinates of the geometric center point of plant m are (x m ,y m , z m ), the three-dimensional coordinates of the geometric center point of plant n are (x n ,y n , z n ). When the height of plant m is less than or equal to the height of plant n, the cost of plant m to plant n is E mn Calculated by the following formula:
[0201]
[0202] When the height of plant m is greater than the height of plant n, the cost of plant m to plant n is E mn Calculated by the following formula:
[0203]
[0204] Among them, a and b are both positive numbers, and a is greater than b.
[0205] In some embodiments, the device 500 further includes a storage module for recording the spraying status of a single plant, where the spraying status of a single plant includes any of the following: spraying not started, spraying completed, sprayed range, or range to be sprayed.
[0206] In some embodiments, the processing module 520 is also used to: determine the sub-areas of unfinished work; determine the visiting order of the sub-areas of unfinished work by using the TSP algorithm according to the take-off point of the drone and the sub-areas of unfinished work; determine the visiting order of plants in the sub-areas of unfinished work by using the TSP algorithm according to the spraying status of individual plants; the route planning module 530 is also used to: re-plan the spraying flight route of the drone according to the visiting order of the sub-areas of unfinished work and the visiting order of plants in the sub-areas of unfinished work.
[0207] In some embodiments, the segmentation module 510 is also used to: divide the target plot into multiple independent areas using a preset method according to the obstacles in the target plot, and the multiple independent areas do not contain obstacles. The preset method includes any one of the following: boustrophedon area decomposition method, trapezoidal division method, and Morse decomposition method.
[0208] In some embodiments, the processing module 520 is further configured to: update boundaries of the plurality of sub-regions using a convex hull algorithm.
[0209] In some embodiments, the device 500 also includes an acquisition module and a control module. The multiple plants include a first plant. When spraying the first plant, the acquisition module is used to: acquire the diameter of the first plant, the height of the first plant and the coordinates of the center point of the first plant; the control module is used to: if the diameter of the first plant is less than or equal to the spray width of the drone, then control the drone to perform in-situ spinning spraying at the coordinates of the center point of the first plant; or, if the diameter of the first plant is greater than the spray width of the drone, and the height of the first plant is less than or equal to the preset height, then control the drone to spray the first plant in a concentric circle spraying manner; or, if the diameter of the first plant is greater than the spray width of the drone, and the height of the first plant is greater than the preset height, then control the drone to spray the first plant in a spiral rising spraying manner.
[0210] Fig.13 A schematic structural block diagram of a drone provided in an embodiment of the present application.
[0211] like Fig.13 As shown, the UAV 600 may include a segmentation module 610, a processing module 620 and a route planning module 630, wherein the segmentation module 610 is used to: segment the target plot into multiple areas, the target plot includes multiple plants; perform secondary segmentation on the multiple areas according to the ridge line of the target plot to determine multiple sub-areas; the processing module 620 is used to: determine the geometric center point of each plant in the target plot; divide the multiple plants into different sub-areas according to the geometric center point of each plant; determine the visiting order of the multiple sub-areas using the traveling salesman problem TSP algorithm; determine the visiting order of the plants in each sub-area using the TSP algorithm; the route planning module 630 is used to: determine the spraying flight route of the UAV according to the visiting order of the multiple sub-areas and the visiting order of the plants in each sub-area.
[0212] In some embodiments, the multiple regions are all regions containing plants, and the segmentation module 610 is further used to: determine the region that crosses the ridge line and the region that does not cross the ridge line based on the ridge line and the multiple regions; perform secondary segmentation on the region that crosses the ridge line to obtain the region after the secondary segmentation; and determine multiple sub-regions based on the region after the secondary segmentation and the region that does not cross the ridge line.
[0213] In some embodiments, the processing module 620 is also used to: determine the take-off point of the drone; determine the geometric center points of multiple sub-areas; and use the TSP algorithm to determine the access order of multiple sub-areas, including: constructing a first energy consumption matrix based on the take-off point of the drone and the geometric center points of multiple sub-areas; based on the first energy consumption matrix, calling the TSP algorithm to determine the access order of multiple sub-areas.
[0214] Exemplarily, the first energy consumption matrix is determined according to the cost values between different sub-regions, where the different sub-regions include sub-region i and sub-region j, and the coordinates of the geometric center point of sub-region i are (x i ,y i ), the coordinates of the geometric center point of sub-region j are (x j ,y j ).
[0215] When sub-region i and sub-region j are located on the same side of the ridgeline, the cost value E from sub-region i to sub-region j is ij Calculated by the following formula:
[0216]
[0217] In the case where sub-region i and sub-region j are located on different sides of the ridgeline, the cost value E from sub-region i to sub-region j is ij Calculated by the following formula:
[0218] d is a positive number and is greater than the first threshold.
[0219] In some embodiments, the processing unit 620 is further used to: construct a second energy consumption matrix according to the geometric center points of the plants in each sub-region; and based on the second energy consumption matrix, call the TSP algorithm to determine the access order of the plants in each sub-region.
[0220] Exemplarily, the second energy consumption matrix is determined according to the cost values between different plants in each sub-area, where the different plants include plant m and plant n, and the three-dimensional coordinates of the geometric center point of plant m are (x m ,y m , z m ), the three-dimensional coordinates of the geometric center point of plant n are (x n ,y n , z n ).
[0221] When the height of plant m is less than or equal to the height of plant n, the cost of plant m to plant n is E mn Calculated by the following formula:
[0222]
[0223] When the height of plant m is greater than the height of plant n, the cost of plant m to plant n is E mn Calculated by the following formula:
[0224]
[0225] Among them, a and b are both positive numbers, and a is greater than b.
[0226] In some embodiments, the drone 600 further includes a storage module for recording the spraying status of a single plant, where the spraying status of a single plant includes any of the following: spraying not started, spraying completed, sprayed range, or range to be sprayed.
[0227] In some embodiments, the processing module 620 is also used to: determine the sub-areas of unfinished work; determine the visiting order of the sub-areas of unfinished work by using the TSP algorithm according to the take-off point of the drone and the sub-areas of unfinished work; determine the visiting order of plants in the sub-areas of unfinished work by using the TSP algorithm according to the spraying status of individual plants; the route planning module 630 is also used to: re-plan the spraying flight route of the drone according to the visiting order of the sub-areas of unfinished work and the visiting order of plants in the sub-areas of unfinished work.
[0228] In some embodiments, the segmentation module 610 is also used to: divide the target plot into multiple independent areas according to the obstacles in the target plot using a preset method, and the multiple independent areas do not contain obstacles. The preset method includes any one of the following: boustrophedon area decomposition method, trapezoidal division method, and Morse decomposition method.
[0229] In some embodiments, the processing module 620 is further configured to: update boundaries of the plurality of sub-regions using a convex hull algorithm.
[0230] In some embodiments, the drone 600 also includes an acquisition module and a control module. The multiple plants include a first plant. When spraying the first plant, the acquisition module is used to: acquire the diameter of the first plant, the height of the first plant and the coordinates of the center point of the first plant; the control module is used to: if the diameter of the first plant is less than or equal to the spray width of the drone, then control the drone to perform in-situ spinning spraying at the coordinates of the center point of the first plant; or, if the diameter of the first plant is greater than the spray width of the drone, and the height of the first plant is less than or equal to the preset height, then control the drone to spray the first plant in a concentric circle spraying manner; or, if the diameter of the first plant is greater than the spray width of the drone, and the height of the first plant is greater than the preset height, then control the drone to spray the first plant in a spiral rising spraying manner.
[0231] An embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the method of plant protection spraying path planning in the above-mentioned embodiment.
[0232] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the method for plant protection spraying path planning in the above-mentioned embodiment.
[0233] In addition, an embodiment of the present application further provides a device, which may be a chip, a component or a module, and the device may include a connected processor and a memory. The memory is used to store computer-executable instructions, and when the device is running, the processor may execute the computer-executable instructions stored in the memory, so that the chip executes the method of plant protection spraying path planning in the above-mentioned method embodiments.
[0234] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.
[0235] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0236] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0237] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0238] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0239] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0240] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0241] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for crop protection spraying path planning, characterized in that: Applications in drones include: Dividing a target plot into a plurality of regions, wherein the target plot includes a plurality of plants; Performing secondary segmentation on the multiple regions according to the ridgeline of the target plot to determine multiple sub-regions; Determining the geometric center point of each plant in the target plot; Dividing the plurality of plants into different sub-areas according to the geometric center point of each plant; Determine the visiting order of the plurality of sub-areas by using the traveling salesman problem (TSP) algorithm; Determine the order of visiting plants in each sub-area by using the TSP algorithm; The spraying flight route of the UAV is determined according to the visiting order of the multiple sub-areas and the visiting order of the plants in each sub-area.
2. The method according to claim 1, characterized in that The multiple regions are all regions containing plants, and the multiple regions are divided twice according to the ridge line of the target plot to determine multiple sub-regions, including: Determine, based on the ridgeline and the plurality of areas, an area crossing the ridgeline and an area not crossing the ridgeline; Performing secondary segmentation on the area crossing the ridge line to obtain a secondary segmented area; The plurality of sub-regions are determined according to the secondarily segmented region and the region that does not cross the ridge line.
3. The method according to claim 2, characterized in that Before determining the access order of the plurality of sub-areas by using the TSP algorithm, the method further includes: determining a take-off point for the drone; Determining the geometric center points of the multiple sub-areas; Determining the access order of the plurality of sub-areas by using the TSP algorithm comprises: Constructing a first energy consumption matrix according to the take-off point of the UAV and the geometric center points of the multiple sub-areas; Based on the first energy consumption matrix, the TSP algorithm is called to determine an access order of the multiple sub-areas.
4. The method according to claim 3, characterized in that The first energy consumption matrix is determined according to the cost values between different sub-areas, wherein the different sub-areas include sub-area i and sub-area j, and the coordinates of the geometric center point of sub-area i are (x i ,y i ), the coordinates of the geometric center point of the sub-region j are (x j ,y j ); In the case where the sub-region i and the sub-region j are located on the same side of the ridgeline, the cost value E from the sub-region i to the sub-region j ij Calculated by the following formula: In the case where the sub-region i and the sub-region j are located on different sides of the ridgeline, the cost value E from the sub-region i to the sub-region j ij Calculated by the following formula: The d is a positive number and is greater than a first threshold.
5. The method according to any one of claims 1 to 4, characterized in that The step of using the TSP algorithm to determine the order of visiting plants in each sub-area includes: Constructing a second energy consumption matrix according to the geometric center points of the plants in each sub-area; Based on the second energy consumption matrix, the TSP algorithm is called to determine the order of visiting the plants in each sub-area.
6. The method according to claim 5, characterized in that The second energy consumption matrix is determined according to the cost values between different plants in each sub-area, wherein the different plants include plant m and plant n, and the three-dimensional coordinates of the geometric center point of plant m are (x m ,y m , z m ), the three-dimensional coordinates of the geometric center point of the plant n are (x n ,y n , z n ); When the height of the plant m is less than or equal to the height of the plant n, the cost E of the plant m to the plant n is mn Calculated by the following formula: In the case where the height of the plant m is greater than the height of the plant n, the cost E of the plant m to the plant n is mn Calculated by the following formula: Wherein, both a and b are positive numbers, and a is greater than b.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: The spraying status of a single plant is recorded, wherein the spraying status of the single plant includes at least one of the following: spraying not started, spraying completed, spraying in progress, sprayed range, or to-be-sprayed range.
8. The method according to claim 7, characterized in that In the case where the drone needs to return to the take-off point, the method further includes: Identify sub-areas of unfinished work; Determine the access order of the sub-areas of the unfinished operations by using a TSP algorithm according to the take-off point of the drone and the sub-areas of the unfinished operations; According to the spraying status of the single plant, the TSP algorithm is used to determine the visiting order of the plants in the sub-area where the operation is not completed; The spraying flight route of the UAV is replanned according to the visiting order of the sub-areas of the unfinished operation and the visiting order of the plants in the sub-areas of the unfinished operation.
9. The method according to any one of claims 1 to 8, characterized in that The step of dividing the target plot into a plurality of regions comprises: According to the obstacles in the target plot, the target plot is divided into multiple independent areas using a preset method, and the multiple independent areas do not contain the obstacles. The preset method includes any one of the following: ox-plowing area decomposition method, trapezoidal division method, and Morse decomposition method.
10. The method according to any one of claims 1 to 9, characterized in that Before determining the access order of the plurality of sub-areas by using the TSP algorithm, the method further includes: The boundaries of the plurality of sub-regions are updated using a convex hull algorithm.
11. The method according to any one of claims 1 to 10, characterized in that The plurality of plants include a first plant, and when spraying the first plant, the method further includes: Acquire the diameter of the first plant, the height of the first plant and the coordinates of the center point of the first plant; If the diameter of the first plant is less than or equal to the spray width of the drone, the drone performs in-situ spinning spraying at the coordinates of the center point of the first plant; or, If the diameter of the first plant is larger than the spray width of the drone, and the height of the first plant is less than or equal to the preset height, the drone sprays the first plant in a concentric circle spraying manner; or, If the diameter of the first plant is larger than the spray width of the drone, and the height of the first plant is larger than the preset height, the drone sprays the first plant in a spiral rising spraying manner.
12. A drone, characterized in that: Comprising means for performing the method as claimed in any one of claims 1 to 11.
13. A device for crop protection spraying path planning, characterized in that: Comprising means for performing the method as claimed in any one of claims 1 to 11.
14. A chip, characterized in that: The chip comprises a processor and a memory, wherein the processor is used to read instructions stored in the memory, and when the processor executes the instructions, the chip implements the method according to any one of claims 1 to 11.
15. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a computer, the computer is caused to implement the method according to any one of claims 1 to 11.
16. A computer program product, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 11.