Method and device for determining field main operation direction of agricultural machine

By processing the boundary points of field plots and fitting mathematical theories, the main operating direction of agricultural machinery is determined, which solves the problem of insufficient generalization ability of agricultural machinery field operation path planning in existing technologies and realizes efficient and globally optimal operation path planning.

CN120765730AActive Publication Date: 2025-10-10INTELLIGENT EQUIPMENT RESEARCH CENTER BEIJING ACADEMY OF AGRICULTURE AND FORESTRY SCIENCES +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510619966.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2025-10-10
Estimated Expiration
2045-05-14

AI Technical Summary

Technical Problem

The existing path planning methods for agricultural machinery field operations have limited applicability and insufficient generalization capabilities, making it difficult to ensure the determination of the globally optimal main operation direction.

Method used

By determining the boundary points of the field plots, connecting them to form closed circles, dividing the shorter sides and calculating the half-angle values ​​of the internal angles, identifying the second-class edges, deduplication and clustering, linearly fitting the polygonal area, calculating the allowable angle slope range, determining the allowable sides and determining the main operating direction of the agricultural machinery.

Benefits of technology

It achieves high-precision fitting of field plots of various shapes, ensuring that agricultural machinery can complete the operation in one go without segmentation, thereby improving operation efficiency and the global optimality of path planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120765730A_ABST
    Figure CN120765730A_ABST
Patent Text Reader

Abstract

The invention provides a method and a device for determining a main field operation direction of an agricultural machine, and the method comprises the steps: fitting a fitting polygonal region of a field plot through employing the mathematical theories of concave points, edges and included angles, and then determining an allowable edge through employing the mathematical theories of edges, slopes and the like on the basis of the fitting polygonal region, thereby planning the main operation direction of the agricultural machine. According to the method, the real field plot area can be restored with high precision, the method can be suitable for various field plots which do not need to be segmented and can be completed in one time in different shapes, the generalization ability is high, it can be ensured that the optimal path is planned, and the operation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of agricultural production, and in particular to a method and device for determining a main operation direction of a farm machine in a field. BACKGROUND

[0002] Developing automatic driving research of farm machines is a general trend of future agricultural development in China, and is an important part of smart agriculture, which has important significance for improving production efficiency, reducing production cost and liberating labor. For farm machines equipped with automatic navigation system terminals, a clear field operation path needs to be specified as a navigation tracking target input by the system to enable normal walking and operation. The quality of path planning is closely related to the final operation quality of the farm machine. Optimized operation path design is conducive to better exerting the operation advantages of automatic navigation farm machines in complex field environments and operation tasks, and is conducive to standardizing field operations.

[0003] Current path planning methods mostly treat farmland plots as a certain type of special polygon after approximating the shape of the farmland plot, such as a convex polygon with no more than 8 sides, a concave polygon with less than 10 sides, etc. Most of the selected plot shapes are relatively regular, so the application scope of these methods is also limited, and the generalization ability is insufficient. When finding the main operation direction, the conventional processing method is to test each edge of the plot to determine whether the operation along the extension direction of the edge can achieve full coverage of the plot without interruption. If it can, the longest edge that meets the requirements is selected as the main operation direction. If all edges cannot achieve this, the plot is divided. However, this method has certain problems: only the direction determined by each edge can be tested, but there is a lack of efficient calculation and optimization means for other driving angles, which makes the result fall into local optimization, and it is difficult to guarantee global optimization. SUMMARY

[0004] The present application provides a method and device for determining a main operation direction of a farm machine in a field, to solve the problem of limited application scope, insufficient generalization ability, and difficulty in guaranteeing global optimization when determining the main operation direction in the prior art.

[0005] The present application provides a method for determining a main operation direction of a farm machine in a field, characterized by comprising: determining the boundary points of the field plot, and connecting the boundary points by edges to obtain a closed loop of the field plot; dividing shorter edges from the edges according to a preset edge length threshold, and dividing second-type edges from the shorter edges according to the half-angle value of the internal angle in the closed loop; determining the near-neighbor edges of each second-type edge in the closed loop, and sequentially performing deduplication and clustering on the edge set composed of the second-type edges and the near-neighbor edges to obtain a target set; linear fitting is performed on the end points associated with each edge in the target set to obtain a fitted polygonal region of the field plot; For the concave point in the fitted polygonal region, a range of allowable angle slopes is calculated, and a range of intersection of the straight line slopes of the allowable driving direction of the concave point is determined according to the range of the allowable angle slopes; After removing the slope set of the edge determined by the adjacent concave points in the intersection, the allowable edge is determined from the plot allowable driving angle slope interval in the fitted polygonal region, and the main operation direction of the agricultural machine is determined based on the allowable edge.

[0006] In some embodiments, the second type of edge is divided from the shorter edge by the half-angle value of the internal angle in the closed loop, comprising: For each boundary point in the closed loop, the half-angle value of the internal angle of the boundary point is calculated according to the first edge unit vector entering the boundary point and the second edge unit vector leaving the boundary point; For each shorter edge, the first half-angle value and the second half-angle value of the two end points are searched from the half-angle value set composed of the half-angle values; The maximum internal shrinkage distance of the shorter edge is calculated according to the first half-angle value and the second half-angle value, and the shorter edge with a maximum internal shrinkage distance not greater than the product of the agricultural machine width and the agricultural operation lock edge number is determined as the second type of edge.

[0007] In some embodiments, the near neighbor edge of each second type of edge in the closed loop is determined, and the edge set composed of the second type of edge and the near neighbor edge is sequentially de-duplicated and clustered to obtain a target set, comprising: The two adjacent edges of the second type of edge are searched in the closed loop, the Euclidean distance between the midpoint of the adjacent edge and the midpoint of the second type of edge is calculated, and the adjacent edge with the minimum Euclidean distance is determined as the near neighbor edge of the second type of edge; Each of the second type of edge and the corresponding near neighbor edge forms an edge set; The de-duplication processing is performed on the edge set, and the clustering processing is performed on the de-duplicated edge set to obtain a target set.

[0008] In some embodiments, the linear fitting is performed on the end points associated with each edge in the target set to obtain a fitted polygonal region of the field plot, comprising: The end points associated with each edge in the target set form a point set, and linear fitting is performed on the point set to obtain a fitted edge; The edge in the closed loop is updated by the fitted edge to obtain a fitted closed loop; When it is determined that the fitted closed loop does not include the shorter edge, or there is no second type of edge in the shorter edge, the region formed by the fitted closed loop is determined as the fitted polygonal region of the field plot.

[0009] In some embodiments, calculating the allowable angular slope range for the concave points in the fitted polygonal area includes: In the xy-axis rectangular coordinate system, calculate the component product in the x-axis direction according to the third side unit vector entering the concave point and the fourth side unit vector leaving the concave point; Dividing the concave points into first-category vertices and second-category vertices according to the component products; For the first-type vertices and the second-type vertices, respectively calculating a first slope of the third side unit vector and a second slope of the fourth side unit vector; Sort the first slopes and the second slopes of the first type of vertices in ascending order to obtain a first closed interval, and determine the allowable angular slope range of the first type of vertices based on the elements in the first closed interval; The second slopes and the second slopes of the second-type vertices are sorted in ascending order to obtain a second closed interval, and the allowable angular slope range of the second-type vertices is determined based on the elements in the second closed interval.

[0010] In some embodiments, after removing the slope set of the edges determined by adjacent concave point pairs from the intersection, determining the allowable edges from the fitted polygonal area according to the obtained allowable driving angle slope range of the land parcel includes: Searching for adjacent concave point pairs in the boundary of the fitted polygonal region, and calculating a set of slopes of edges determined by the adjacent concave point pairs; Remove the elements in the slope set from the intersection to obtain the allowable driving angle slope range of the land parcel; When the allowable driving angle slope interval of the land parcel is not empty, traversing each target edge in the fitting polygon area; When the slope value of the target edge is an element in the allowable driving angle slope range of the land parcel, the target edge is determined as an allowable edge.

[0011] In some embodiments, determining the main operating direction of the agricultural machinery based on the allowable edge includes: For each allowed edge, calculating the distance from each vertex in the fitted polygonal area to the allowed edge, and constructing a distance set corresponding to the allowed edge; The difference between the maximum value and the minimum value of the distance set is used as the span length of the allowed edge; The unit vector direction of the allowable side with the smallest span length is determined as the main operating direction of the agricultural machinery.

[0012] The present invention also provides a device for determining the main operating direction of agricultural machinery in the field, comprising: a connection module, configured to determine the boundary points of the field plots and connect the boundary points through edges to obtain a closed circle of the field plots; a dividing module, configured to divide the shorter edges from the edges according to a preset edge length threshold, and divide the second type of edges from the shorter edges according to the half-angle value of the inner angle in the closed circle; a deduplication module, configured to determine the neighboring edges of each second-category edge in the closed loop, and sequentially perform deduplication and clustering on an edge set consisting of the second-category edges and the neighboring edges to obtain a target set; a fitting module, configured to perform linear fitting based on the endpoints associated with each edge in the target set to obtain a fitting polygonal area of ​​the field plot; a determination module, configured to calculate an allowable angular slope range for a concave point in the fitted polygonal area, and determine, based on the allowable angular slope range, an intersection of a straight line slope range of an allowable driving direction of the concave point; After removing the slope set of the edges determined by adjacent concave point pairs in the intersection, the allowable edges are determined from the fitting polygonal area according to the obtained allowable driving angle slope range of the plot, and the main operating direction of the agricultural machinery is determined based on the allowable edges.

[0013] The present invention also provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for determining the main operating direction of agricultural machinery in the field as described above is implemented.

[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for determining the main operating direction of agricultural machinery in the field as described in any one of the above is implemented.

[0015] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-described methods for determining the main operating direction of agricultural machinery in the field.

[0016] The method and device for determining the primary operating direction of agricultural machinery in the field, provided by this invention, utilizes a universal plot shape fitting method to fit a polygonal area within a plot, accurately recreating the true plot shape. This method is applicable to a variety of field shapes, eliminating the need for segmentation and enabling a single operation. It demonstrates strong generalization capabilities. Based on the fitted polygonal area, the method then determines the permissible edges based on the mathematical theory of concave points and edges. This allows the primary operating direction of the agricultural machinery to be determined based on these permissible edges, ensuring optimal path planning and improving operational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced one by one below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 It is a flow chart of the method for determining the main operating direction of agricultural machinery in the field provided by the present invention.

[0019] Figure 2 This is a diagram showing the principle of dividing the first type of edges and the second type of edges provided by the present invention.

[0020] Figure 3 It is a schematic diagram of the allowable angle range of the concave angle provided by the present invention.

[0021] Figure 4 This is a schematic diagram of the division of the first type of vertices and the second type of vertices provided by the present invention.

[0022] Figure 5 It is a schematic diagram of the running discontinuity between two adjacent concave points provided by the present invention.

[0023] Figure 6 Schematic diagram of the half plane and span length provided by the present invention.

[0024] Figure 7 It is a schematic diagram of the full-coverage field path planning provided by the present invention.

[0025] Figure 8 It is a structural schematic diagram of the device for determining the main operating direction of agricultural machinery in the field provided by the present invention.

[0026] Figure 9 It is a schematic diagram of the physical structure of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0027] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0028] The following describes the method and device for determining the main operating direction of agricultural machinery in the field according to the present invention with reference to the accompanying drawings.

[0029] Figure 1 This is a flow chart of the method for determining the main operating direction of agricultural machinery in the field provided by the present invention. Figure 1 As shown, the method includes the following steps 101 to 106, which are described in detail below.

[0030] Step 101: Determine the boundary points of the field plot, and connect the boundary points through edges to obtain a closed circle of the field plot.

[0031] First, the boundary points of the field plots must be determined and a coordinate set of these points constructed. This is typically done by circling the field using a GNSS receiver, positioning and measuring these points at regular intervals. Alternatively, drones can be used to identify and extract the boundary points. The acquired boundary points are arranged in a clockwise order and numbered starting from 1. Since the recorded points are in the geodetic coordinate system (BL), which is not suitable for planar calculations, they must be converted to rectangular coordinates (XY). The corresponding conversion formulas are conventional and will not be detailed here. Furthermore, parameters such as the machine's width w, minimum turning radius r, and the user's desired number of machine turns r_num must be determined.

[0032] After collecting the boundary points, connect them sequentially with edges to form a closed circle. The edges within the circle are also arranged and numbered in a clockwise direction. For example, the endpoints of edge numbered 1 are point 1 and point 2. Furthermore, the coordinates of the midpoint of each edge are calculated and stored sequentially in the set Mid_coor. Arrows are added to each edge in a clockwise direction along the closed circle to convert it into a vector. The length of each vector is calculated, and the resulting set is denoted as L. Using the known length, each vector is normalized to form an edge unit vector. The coordinates of these unit vectors are stored sequentially in the set Unit_V.

[0033] Step 102: Shorter edges are separated from the edges according to a preset edge length threshold, and second-type edges are separated from the shorter edges according to the half-angle value of the inner angle in the closed circle.

[0034] Next, get the preset edge length threshold The edges in the closed circle are divided into shorter edges and longer edges. Here, the length of each edge is counted separately, and the edge length threshold is used. Directly filter and divide, using the edge length threshold As the dividing line, the side length is greater than The edge of is considered as the longer edge. In order to avoid the real shape of the original plot being greatly changed after fitting, the longer edge is generally not processed. Therefore, the purpose of edge length threshold division is mainly to divide the shorter edge. On the contrary, the edge length is not greater than The side that is shorter is called the shorter side.

[0035] Since agricultural machinery needs to lock the edge, the internal reciprocating operation area can be regarded as a polygonal area enclosed by moving the perpendicular vector of each edge of the farmland inward by the same distance. The shape of this area is basically similar to the shape of the farmland periphery. There are three possible situations when shrinking the shorter edge inward: the first situation is as follows Figure 2 As shown in (a), the unit vector of a shorter side is e. If e and the two adjacent sides are inward The distance, the direction of e remains unchanged; the second case is as follows Figure 2 As shown in (b), if e and its two adjacent sides are indented distance, it is found that e does not exist; and the third case is Figure 2 As shown in (c), if e and its two adjacent sides are indented The distance between the two sides is found to be opposite. Based on this principle, the shorter sides can be further divided into first-class sides and second-class sides. The first-class sides correspond to case (a), and the second-class sides correspond to cases (b) and (c). The specific division can be completed by calculating the half-angle value of the inner angle in the closed circle. This half-angle value is half of the value of the inner angle in the closed circle, denoted as For example, the two inward angles formed by e and two adjacent sides are the internal angles in the closed circle, and half of the value of the internal angle is the half-angle value.

[0036] In some embodiments, the second type of edges are divided from the shorter edges by the half-angle value of the inner angle in the closed circle, which can be achieved in the following manner, which is described in detail below.

[0037] First, similar to step 101 , the sets L and Unit_V are constructed and stored.

[0038] Then, for each boundary point, the first side unit vector entering the boundary point can be queried in the set Unit_V and the second side unit vector leaving the boundary point , then according to and Construct a determinant and evaluate it. If the result is positive, the boundary point is considered a concave point in the closed circle. Store the indices of all concave points in the set Conca. Otherwise, it is considered a non-concave point. For concave and non-concave points, calculate the half-angle of the interior angle using different methods.

[0039] Specifically, if the boundary point is not a concave point, then: If the boundary points are concave, then: .in," " is the dot product calculation of the vector, is the arc cosine function. When all boundary points are calculated, all the calculated half-angle values ​​are stored in order to form a set named .

[0040] Next, for each shorter side, the half-angle value set composed of half-angle values Here, each shorter side has two boundary points as endpoints, and each boundary point has a calculated half-angle value. The shorter side has an arrow in the direction of the vector. Here, the half-angle value of the endpoint at the starting point of the shorter side arrow is defined as the first half-angle value, which is recorded as , accordingly, define the half-angle value of the endpoint at the end point of the shorter side arrow as the second half-angle value, denoted as According to the above definition, each shorter side can be selected from the set Search to get the first half-angle value of the two endpoints and the second half-width value .

[0041] Finally, when When , the maximum indentation distance H of the shorter side is calculated based on the first half-angle value and the second half-angle value. The calculation formula is as follows: (1) In the above formula (1), Here, the maximum retraction distance is not greater than the width w of the agricultural machinery and the number of locking circles of the agricultural machinery operation. The shorter side of the product of is determined to be the second type of side, that is: (2) When the following formula (3) or (4) is satisfied, the corresponding shorter edge is determined to be a first-class edge: (3) (4) In an embodiment of the present invention, concave points are judged for the boundary points in the closed circle, and then the half-angle value is calculated based on this, and the edges of the closed circle are further divided in combination with the width of the agricultural machinery and the number of edge locking circles of the agricultural machinery operation. In this way, the shape fitting of the field plot can be more in line with the edge locking operation requirements of the agricultural machinery, and there is no need to divide the field plot.

[0042] Step 103: Determine the neighboring edges of each second-type edge in the closed circle, and perform deduplication and clustering on the edge set consisting of the second-type edges and the neighboring edges in sequence to obtain a target set.

[0043] After the second type of edges are determined in the closed loop, the next step is to determine the adjacent edges of each second type of edge. Each second type of edge has two end points, and thus has two adjacent edges. The adjacent edges of each second type of edge are determined, and then each second type of edge and its adjacent edge form an edge set, thereby obtaining a plurality of edge sets. Finally, the edge sets are sequentially de-duplicated and clustered. The de-duplication is used to remove the edge sets with completely identical elements, and the clustering is used to remove the repeated elements in the edge sets, thereby obtaining the target set.

[0044] In some embodiments, the adjacent edges of each second type of edge are determined in the closed loop, and the edge sets formed by the second type of edges and the adjacent edges are sequentially de-duplicated and clustered to obtain the target set. This can be achieved in the following manner, which is described in detail below.

[0045] First, the two adjacent edges of the second type of edge are searched in the closed loop, the Euclidean distance between the midpoints of the adjacent edges and the midpoint of the second type of edge is calculated, and the adjacent edge with the smallest Euclidean distance is determined as the adjacent edge of the second type of edge.

[0046] Therefore, the set Mid_coor constructed according to the closed loop can be searched, which stores the midpoint coordinates of each edge in the closed loop. Thus, the midpoint coordinates of the two adjacent edges of each second type of edge a can be searched, the Euclidean distance between the midpoint coordinates of the second type of edge a and the two adjacent edges is calculated, and the adjacent edge with the smaller Euclidean distance is determined as the adjacent edge b of the second type of edge a.

[0047] Then, each second type of edge and the corresponding adjacent edge form an edge set. Here, the second type of edge a can determine an adjacent edge b to form an edge set {a, b}. Each second type of edge a repeats the above operation to obtain a plurality of edge sets.

[0048] Further, the edge sets are de-duplicated, and the de-duplicated edge sets are clustered to obtain the target set.

[0049] In the plurality of edge sets obtained, there may be edge sets with completely identical elements, such as {3, 4} and {4, 3}. In this case, the edge sets are de-duplicated, and only one of them is retained. Then, the de-duplicated edge sets are clustered. The de-duplicated edge sets are all edge sets with elements that are not completely identical. Here, clustering means calculating the union and removing the repeated elements. In this way, a new set can be obtained as the target set. For example, the plurality of sets are {3, 4}, {4, 3}, {5, 4}, {11, 12}, {12, 13}, and {17, 16}. After de-duplication and clustering, the target set is {3, 4, 5}, {11, 12, 13}, and {17, 16}.

[0050] In an embodiment of the present invention, for the second type of edges in the inner circle, a method of constructing an edge set using neighboring edges is used to perform deduplication, clustering and other operations. This can reduce the number of unnecessary short edges on the land parcel boundary, making the shape smoother and more regular without distortion and easy to plan.

[0051] Step 104: Perform linear fitting based on the endpoints associated with each edge in the target set to obtain a fitting polygonal area of ​​the field plot.

[0052] After performing operations such as deduplication and clustering on the edge set, a fitting operation is performed based on the endpoints associated with the edges in the target set. Each element in the target set represents an edge, and each edge is associated with an endpoint. Here, all endpoints associated with each edge are extracted to form a point set. A linear fit is then performed on this point set to obtain the fitted edges. The fitted edges are then used to update the original edges in the closed loop, ultimately obtaining the fitted polygonal area of ​​the field plot.

[0053] In some embodiments, linear fitting is performed based on the endpoints associated with each edge in the target set to obtain a fitted polygonal area of ​​the field plot, which can be achieved in the following manner, which is described in detail below.

[0054] First, the endpoints associated with each edge in the target set are grouped into a point set. A linear fit is then performed on this point set to obtain fitted edges. Here, all edges with edge numbers in the target set are selected from the target set. All endpoints associated with these edges are taken to form an endpoint set Q. Fitting is then performed on this endpoint set Q to obtain fitted edges. This ensures that each edge in the target set can be refitted to obtain a fitted edge.

[0055] Next, the edges in the closed circle are updated using the fitted edges to obtain a fitted closed circle. Here, the fitted edges are added to the original closed circle and the corresponding set of edges is removed. After the update, a new fitted closed circle is obtained. Furthermore, the intersection points of all adjacent edges in the fitted closed circle are calculated to update the boundary point list.

[0056] For example, for a target set {17,16}, select edges 16 and 17 from the set, then take out all the endpoints of these two edges to form a set Q. Then, refit a fitting edge based on all the endpoints in Q, add the fitting edge to the closed circle, and remove edges 16 and 17 to obtain a new fitting closed circle. At this time, the fitted closed circle cannot be used as the fitting polygon area of ​​the field plot. It is necessary to further confirm whether there are shorter edges in the fitted closed circle, or whether there are second-type edges in the shorter edges. When it is determined that the fitted closed circle does not include shorter edges, or that there are no second-type edges in the shorter edges, the area formed by the fitted closed circle can be determined as the fitting polygon area of ​​the field plot. If not, continue to perform steps 101 to 103 above until the obtained fitted closed circle meets the requirements.

[0057] The method and device for determining the main operating direction of agricultural machinery in the field provided by the present invention use a universal plot shape fitting method to fit the polygonal area of ​​the plot, restore the real plot shape with high precision, and can be applied to various field plots of different shapes that do not require segmentation and can be completed in one operation, with strong generalization ability.

[0058] Step 105: Calculate the permissible angular slope range for the concave point in the fitted polygonal area, and determine the intersection of the permissible angular slope range of the straight line of the concave point in the permissible driving direction according to the permissible angular slope range.

[0059] After fitting the polygonal area of ​​the field through the above steps, the main operating direction of the agricultural machinery can be determined on this basis to prepare for subsequent path planning.

[0060] First, you need to determine the number of vertices in the fitting polygon area , vertex coordinates XY, edge unit vector set , concave point set , where the construction of the edge unit vector set and the concave point set can be referred to the closed loop above and will not be repeated here. Due to the restrictions imposed by concave points on the driving direction angle of the agricultural machinery, it is necessary to solve the range of the allowable driving direction straight line slope for each concave point, and then find the intersection of all the obtained intervals. If there are adjacent concave points at the region boundary, it is also necessary to remove the corresponding slope values ​​of the edges determined by all adjacent concave point pairs from the intersection. Finally, the range of the straight line slope that can be passed by the agricultural machinery near any concave point in the plot without interruption can be obtained. This straight line slope range is the allowable angle slope range.

[0061] like Figure 3 As shown in the figure, the marked area between straight lines A and B is the allowable angular slope range of the concave angle v, and the angle If the slope is outside the permissible range, the machine will be discontinuous while traveling through the field, dividing a complete working path into two sections within the field. Therefore, it is necessary to calculate the slope range of a straight line that allows the machine to travel through any concave point in the field without interruption.

[0062] The specific process of calculating the allowable angular slope range for concave points in the fitted polygonal area is described in detail below.

[0063] First, in the xy-axis rectangular coordinate system, the product of the components in the x-axis direction is calculated based on the third side unit vector entering the concave point and the fourth side unit vector leaving the concave point. Each concave point in Search to get the third side unit vector entering the concave point and the fourth side unit vector leaving the concave point ,make , respectively calculate the determinant and , expressed as: (5) Furthermore, calculation As 、 The product of the components of two vectors in the x-axis direction. "*" represents the product operation.

[0064] Then, the concave points are divided into the first and second types of vertices according to the component product. Here, when , determine the concave point as the first type of vertex, and when , then the concave point is determined to be a second-type vertex, and the first-type vertex V can be Figure 4 As shown in (a) in the figure, the second type of vertex V can be Figure 4 As shown in (b) in .

[0065] Next, for the first type of vertices and the second type of vertices, the first slope of the third side unit vector and the second slope of the fourth side unit vector are calculated respectively.

[0066] Here, for all first-class vertices and second-class vertices, the third-side unit vector is calculated separately. The first slope and the fourth side unit vector The second slope , the formula is as follows: (6) (7) In the above formulas (6) and (7), 、 Represent the third side unit vector The first and second elements in 、 They represent the fourth side unit vectors The first and second elements in .

[0067] Next, the first and second slopes of the first-category vertices are sorted in ascending order to obtain a first closed interval. The allowable angular slope range of the first-category vertices is determined based on the elements in the first closed interval. Similar to the first-category vertices, the second and second slopes of the second-category vertices are sorted in ascending order to obtain a second closed interval. The allowable angular slope range of the second-category vertices is determined based on the elements in the second closed interval.

[0068] Here we take the first type of vertex Sort in ascending order to generate the first closed interval , where the elements are and Similarly, for the second type of vertices, a second closed interval can be generated , where the elements are and It is easy to know that the allowable angle slope range of the first type of vertex is , the allowable angle slope range of the second type of vertex is ∪ , where inf represents infinity and -inf represents negative infinity.

[0069] In an embodiment of the present invention, path planning is performed by calculating the allowable angular slope range of all concave points in a fitted polygonal area, thereby ensuring that agricultural machinery can pass through any concave point in the plot without interruption, thereby improving the operating efficiency of agricultural machinery.

[0070] Furthermore, based on the allowable angle slope range, the intersection of the straight line slope range of the concave point's allowable driving direction is determined. Specifically, for the first type of vertex and the second type of vertex, the following relationship exists: (8) (9) In the above formulas (8) and (9), P is the first closed interval The interval set composed of Q is the second closed interval The interval set is composed of max and min, which represent the maximum value function and minimum value function respectively. and The first closed interval The elements in and The first closed interval For elements in , inf represents infinity and -inf represents negative infinity.

[0071] Thus, the concave point allows the intersection of the range of slopes of the straight lines in the direction of travel It can be expressed as: (10) In addition, if Figure 5 As shown, assuming that there are adjacent concave points u and v on the fitting polygon area, the direction angle of uv is When agricultural machinery is operating along When driving, discontinuities will occur. To avoid this, the discontinuities caused by these concave points need to be removed when planning the working direction.

[0072] Specifically, we first search for adjacent concave point pairs on the boundary of the fitted polygonal region and calculate the slope set of the edges determined by the adjacent concave point pairs, which is recorded as .

[0073] Then remove the elements in the slope set from the intersection to obtain the allowable driving angle slope range of the plot, which is recorded as , which is expressed as follows: (11) In the above formula (11), if there is or calculated If it is an empty set, it means that there is no driving direction for uninterrupted operation on the land parcel. It is necessary to split the fitting polygon area and then execute step 105 for each sub-fitting polygon area to calculate the allowable driving angle slope range of each land parcel, and then use formula (11) to make a judgment.

[0074] Step 106: After removing the slope set of the edges determined by the adjacent concave point pairs in the intersection, the allowable edges are determined from the fitted polygonal area according to the obtained allowable driving angle slope range of the plot, and the main operating direction of the agricultural machinery is determined based on the allowable edges.

[0075] Through the above step 105, the slope set of the edges determined by the adjacent concave points is removed from the intersection to obtain the allowable driving angle slope range of the land parcel. Then, according to the allowable driving angle slope range of this plot , traverse all edges in the fitted polygonal region and determine the allowed edges from these edges.

[0076] Specifically, within the allowable driving angle slope range of the plot When it is not empty, traverse each target edge in the fitting polygon area. When the slope value of the target edge is within the allowable driving angle slope range of the plot When an element in is found, the target edge is determined as an allowed edge.

[0077] Here, by traversing all the edges of the fitted polygon area, since each edge corresponds to a slope value, when the slope value belongs to When , this edge can be called an allowed edge. Thus, multiple allowed edges can be determined from the fitted polygon area, and the allowed edge set composed of them can be recorded as .

[0078] Finally, based on the allowed edge, the main operating direction of the agricultural machinery is determined. Each allowed edge , needs to be calculated to allow for edge When the main working direction is the total number of tracks contained in the fitting polygon area, the smaller the number, the shorter the turning and transition path length of the agricultural machinery, and the side The direction is better. Known and constant, this is equivalent to calculating the perpendicularity of the plot to The span length.

[0079] First, for each allowed edge, calculate the distance from each vertex in the fitted polygon area to the allowed edge, and construct the distance set corresponding to the allowed edge. and set XY, respectively, the allowed edges The edge unit vector and the starting vector are V and u, and all vertices in the fitted polygon area are calculated. To the allowed edge distance , expressed as: (12) exist The absolute value of any element is the distance from the corresponding vertex to the allowed edge The distance, but the sign is different, that is, It is the distance with direction.

[0080] like Figure 6 As shown, by allowing the edge The two ends extend infinitely, and the two-dimensional plane can be divided into half plane 1 and half plane 2. The distance value has different sign depending on the half plane. Any vertex in half plane 1, such as , the corresponding determinant signs are all negative. On the contrary, any vertex located in half plane 2, such as , and the corresponding determinants are all positive.

[0081] Next, the distance set The maximum value With minimum value The difference between the two values ​​is used as the span length of the allowed edge e In this way, the span length of each allowed edge can be determined, and this span length is Figure 6 The span length d shown is perpendicular to e.

[0082] Finally, the unit vector direction of the edge with the smallest allowable span length is determined as the main operation direction of the agricultural machinery. The schematic diagram of the main operation direction of the agricultural machinery finally planned for a certain field plot can be shown as follows: Figure 7 shown.

[0083] This embodiment of the present invention utilizes a universal plot shape fitting method to fit polygonal areas of plots, accurately restoring the true plot shape. This method is applicable to a variety of field shapes, eliminating the need for segmentation and enabling a single, comprehensive operation. It demonstrates strong generalization capabilities. Based on the fitted polygonal area, the method then determines the permissible edges based on the mathematical theory of concave points and edges. This permissible edge is then used to determine the primary operating direction of agricultural machinery, ensuring optimal path planning and improving operational efficiency.

[0084] The following describes the device for determining the main operating direction of agricultural machinery in the field provided by the present invention. The device for determining the main operating direction of agricultural machinery in the field described below and the method for determining the main operating direction of agricultural machinery in the field described above can be referred to each other.

[0085] like Figure 8 As shown, the device for determining the main working direction of agricultural machinery in the field includes a connection module 801, a division module 802, a deduplication module 803, a fitting module 804, and a determination module 805. Specifically, the connection module 801 is used to determine the boundary points of the field plot, and connect the boundary points through edges to obtain a closed circle of the field plot; the division module 802 is used to divide the shorter edges from the edges according to a preset edge length threshold, and divide the second type of edges from the shorter edges according to the half-angle value of the inner angle in the closed circle; the deduplication module 803 is used to determine the neighboring edges of each second type edge in the closed circle, and deduplication and cluster the edge set composed of the second type edge and the neighboring edges in turn to obtain a target set; the fitting module 804 is used to classify the second type edge according to the predetermined edge length threshold. Linear fitting is performed on the endpoints associated with each edge in the target set to obtain a fitted polygonal area of ​​the field plot; a determination module 805 is used to calculate the allowable angular slope range for the concave points in the fitted polygonal area, and determine the intersection of the linear slope range of the allowable driving direction of the concave points based on the allowable angular slope range; after removing the slope set of the edges determined by adjacent concave points from the intersection, the allowable edges are determined from the fitted polygonal area based on the obtained allowable driving angle slope range of the plot, and the main operating direction of the agricultural machinery is determined based on the allowable edges.

[0086] It should be noted that the beneficial effects of the device for determining the main operating direction of agricultural machinery in the field and the method for determining the main operating direction of agricultural machinery in the field mentioned above can correspond to each other, so the beneficial effects of the device for determining the main operating direction of agricultural machinery in the field will not be repeated here.

[0087] Figure 9 An example of a physical structure diagram of an electronic device is shown below. Figure 9As shown, the electronic device may include: a processor 910, a communications interface 920, a memory 930 and a communication bus 940, wherein the processor 910, the communications interface 920 and the memory 930 communicate with each other via the communications bus 940. The processor 910 may call the logic instructions in the memory 930 to execute a method for determining the main operating direction of agricultural machinery in the field, the method comprising: determining the boundary points of the field plots, and connecting the boundary points through edges to obtain a closed circle of the field plots; dividing shorter edges from the edges according to a preset edge length threshold, and dividing second-class edges from the shorter edges according to the half-angle value of the inner angle in the closed circle; determining the neighboring edges of each second-class edge in the closed circle, and deduplicating and clustering the edge set consisting of the second-class edge and the neighboring edges in turn to obtain the target set; performing linear fitting according to the endpoints associated with each edge in the target set to obtain a fitting polygonal area of ​​the field plot; calculating the allowable angular slope range for the concave points in the fitting polygonal area, and determining the intersection of the linear slope range of the allowable driving direction of the concave points based on the allowable angular slope range; after removing the slope set of the edges determined by adjacent concave points from the intersection, determining the allowable edges from the fitting polygonal area according to the obtained allowable driving angle slope range of the plot, and determining the main operating direction of the agricultural machinery based on the allowable edges.

[0088] Furthermore, when the logic instructions in the aforementioned memory 930 are implemented as 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 invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0089] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the method for determining the main operating direction of agricultural machinery in the field provided by the above methods, which method includes: determining the boundary points of the field plot, and connecting the boundary points through edges to obtain a closed circle of the field plot; dividing shorter edges from the edges according to a preset edge length threshold, and dividing second-type edges from the shorter edges according to the half-angle value of the inner angle in the closed circle; determining the near side of each second-type edge in the closed circle; Adjacent edges, and the edge set composed of the second type of edges and the neighboring edges is deduplicated and clustered in turn to obtain a target set; linear fitting is performed according to the endpoints associated with each edge in the target set to obtain a fitting polygonal area of ​​the field plot; for the concave points in the fitting polygonal area, the allowable angular slope range is calculated, and according to the allowable angular slope range, the intersection of the straight line slope range of the allowable driving direction of the concave point is determined; after removing the slope set of the edges determined by the adjacent concave points from the intersection, the allowable edges are determined from the fitting polygonal area according to the obtained allowable driving angle slope range of the plot, and the main operating direction of the agricultural machinery is determined based on the allowable edges.

[0090] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented by a processor to perform the method for determining the main operating direction of agricultural machinery in the field provided by the above methods when the computer program is executed. The method includes: determining the boundary points of the field plot, and connecting the boundary points through edges to obtain a closed circle of the field plot; dividing the shorter edges from the edges according to a preset edge length threshold, and dividing the second type of edges from the shorter edges according to the half-angle value of the inner angle in the closed circle; determining the neighboring edges of each second type of edge in the closed circle, and forming a network of the second type of edges and the neighboring edges. The edge sets are deduplicated and clustered in sequence to obtain a target set; linear fitting is performed based on the endpoints associated with each edge in the target set to obtain a fitting polygonal area of ​​the field plot; the allowable angular slope range is calculated for the concave points in the fitting polygonal area, and based on the allowable angular slope range, the intersection of the straight line slope range of the allowable driving direction of the concave point is determined; after removing the slope set of the edges determined by adjacent concave points from the intersection, the allowable edges are determined from the fitting polygonal area based on the obtained allowable driving angle slope range of the plot, and the main operating direction of the agricultural machinery is determined based on the allowable edges.

[0091] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0092] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.

[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for determining the main operating direction of agricultural machinery in the field, characterized in that: include: Determine the boundary points of the field plot, and connect the boundary points through edges to obtain a closed circle of the field plot; Separating shorter edges from the edges according to a preset edge length threshold, and separating second-type edges from the shorter edges according to the half-angle value of the inner angle in the closed circle; Determine the neighboring edges of each second-category edge in the closed circle, and sequentially perform deduplication and clustering on an edge set consisting of the second-category edges and the neighboring edges to obtain a target set; Performing linear fitting based on the endpoints associated with each edge in the target set to obtain a fitting polygonal area of ​​the field plot; For the concave point in the fitted polygonal area, an allowable angular slope range is calculated, and based on the allowable angular slope range, an intersection of the straight line slope ranges of the allowable driving direction of the concave point is determined; After removing the slope set of the edges determined by adjacent concave point pairs in the intersection, the allowable edges are determined from the fitting polygonal area according to the obtained allowable driving angle slope range of the plot, and the main operating direction of the agricultural machinery is determined based on the allowable edges.

2. The method for determining the main operating direction of agricultural machinery in the field according to claim 1, characterized in that: The step of dividing the second type of edges from the shorter edges by the half-angle values ​​of the inner angles in the closed circle comprises: For each boundary point in the inner circle, calculating a half-angle value of an inner angle of the boundary point according to a first side unit vector entering the boundary point and a second side unit vector leaving the boundary point; For each shorter side, searching the half-angle value set consisting of the half-angle values ​​to obtain the first half-angle value and the second half-angle value of the two end points; The maximum retraction distance of the shorter side is calculated based on the first half-angle value and the second half-angle value, and the shorter side whose maximum retraction distance is not greater than the product of the width of the agricultural machinery and the number of locking circles of the agricultural machinery operation is determined as the second type of side.

3. The method for determining the main operating direction of agricultural machinery in the field according to claim 1, characterized in that: Determining the neighboring edges of each second-type edge in the closed circle, and sequentially performing deduplication and clustering on the edge set consisting of the second-type edges and the neighboring edges to obtain a target set, including: Searching for two adjacent edges of the second-type edge in the closed circle, calculating the Euclidean distance between the midpoint of the adjacent edge and the midpoint of the second-type edge, and determining the adjacent edge with the smallest Euclidean distance as the adjacent edge of the second-type edge; Each of the second-type edges and the corresponding neighboring edges form an edge set; Deduplication processing is performed on the edge set, and clustering processing is performed on the edge set after deduplication to obtain a target set.

4. The method for determining the main operating direction of agricultural machinery in the field according to claim 1, characterized in that: The linear fitting is performed according to the endpoints associated with each edge in the target set to obtain a fitting polygonal area of ​​the field plot, including: The endpoints associated with each edge in the target set are combined into a point set, and a linear fit is performed on the point set to obtain a fitted edge; Updating the edges in the closed circle by using the fitted edges to obtain a fitted closed circle; When it is determined that the fitting closed circle does not include a shorter side, or that no second-type side exists in the shorter sides, the area formed by the fitting closed circle is determined as the fitting polygonal area of ​​the field plot.

5. The method for determining the main operating direction of agricultural machinery in the field according to claim 1, characterized in that: The step of calculating the allowable angular slope range for the concave points in the fitted polygonal area includes: In the xy-axis rectangular coordinate system, calculate the component product in the x-axis direction according to the third side unit vector entering the concave point and the fourth side unit vector leaving the concave point; Dividing the concave points into first-category vertices and second-category vertices according to the component products; For the first-type vertices and the second-type vertices, respectively calculating a first slope of the third side unit vector and a second slope of the fourth side unit vector; Sort the first slopes and the second slopes of the first type of vertices in ascending order to obtain a first closed interval, and determine the allowable angular slope range of the first type of vertices based on the elements in the first closed interval; The second slopes and the second slopes of the second-type vertices are sorted in ascending order to obtain a second closed interval, and the allowable angular slope range of the second-type vertices is determined based on the elements in the second closed interval.

6. The method for determining the main operating direction of agricultural machinery in the field according to claim 1, characterized in that: After removing the slope set of the edge determined by the adjacent concave point pairs in the intersection, determining the allowable edge from the fitting polygonal area according to the obtained allowable driving angle slope range of the land parcel includes: Searching for adjacent concave point pairs in the boundary of the fitted polygonal region, and calculating a set of slopes of edges determined by the adjacent concave point pairs; Remove the elements in the slope set from the intersection to obtain the allowable driving angle slope range of the land parcel; When the allowable driving angle slope interval of the land parcel is not empty, traversing each target edge in the fitting polygon area; When the slope value of the target edge is an element in the allowable driving angle slope range of the land parcel, the target edge is determined as an allowable edge.

7. The method for determining the main operating direction of agricultural machinery in the field according to claim 1, characterized in that: Determining the main operating direction of the agricultural machinery based on the allowable edge includes: For each allowed edge, calculating the distance from each vertex in the fitted polygonal area to the allowed edge, and constructing a distance set corresponding to the allowed edge; The difference between the maximum value and the minimum value of the distance set is used as the span length of the allowed edge; The unit vector direction of the allowable side with the smallest span length is determined as the main operating direction of the agricultural machinery.

8. A device for determining the main operating direction of agricultural machinery in the field, characterized in that: include: a connection module, configured to determine the boundary points of the field plots and connect the boundary points through edges to obtain a closed circle of the field plots; a dividing module, configured to divide the shorter edges from the edges according to a preset edge length threshold, and divide the second type of edges from the shorter edges according to the half-angle value of the inner angle in the closed circle; a deduplication module, configured to determine the neighboring edges of each second-category edge in the closed loop, and sequentially perform deduplication and clustering on an edge set consisting of the second-category edges and the neighboring edges to obtain a target set; a fitting module, configured to perform linear fitting based on the endpoints associated with each edge in the target set to obtain a fitting polygonal area of ​​the field plot; a determination module, configured to calculate an allowable angular slope range for a concave point in the fitted polygonal area, and determine, based on the allowable angular slope range, an intersection of a straight line slope range of an allowable driving direction of the concave point; After removing the slope set of the edges determined by adjacent concave point pairs in the intersection, the allowable edges are determined from the fitting polygonal area according to the obtained allowable driving angle slope range of the plot, and the main operating direction of the agricultural machinery is determined based on the allowable edges.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the method for determining the main operating direction of agricultural machinery in the field as described in any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for determining the main operating direction of agricultural machinery in the field as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Reciprocating path planning method and device and electronic equipment

    CN111750860A

  • Full-coverage path planning method and navigation system

    CN113741425A

  • Method for stretching vector data into three-dimensional block model

    CN114758067A

  • Path generation method and device of sweeping robot, and storage medium

    CN115268471A

  • Sidewalk full-coverage path generation method applied to Ackerman vehicle and vehicle

    CN116295488A