Agricultural machine driving track identification method based on deep learning
Through a deep learning-based method combined with GPS data and DBSCAN algorithm, the dependence on high-precision sensors and poor environmental adaptability in traditional agricultural machinery trajectory recognition technology is solved, and efficient and accurate trajectory recognition and classification in complex agricultural environments is achieved, and system stability and data credibility are improved.
Patent Information
- Application Number
- CN202510359976.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-06-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, agricultural machinery trajectory recognition relies on high-precision sensors, which are prone to data errors and inaccuracies due to sensor failures, environmental interference and human adjustments, and it is difficult to achieve efficient and accurate trajectory recognition in complex agricultural environments.
A deep learning-based method is adopted, combining GPS data and DBSCAN density clustering algorithm to intelligently identify and classify agricultural machinery trajectories, avoid dependence on high-precision sensors, and optimize clustering parameters through deep learning to improve the classification accuracy of trajectory data.
It realizes efficient and accurate identification and classification of agricultural machinery trajectories in complex agricultural environments, reduces the impact of sensor failures and human interference, improves the stability of the system and the credibility of data, and is suitable for intelligent agricultural management systems.
Smart Images

Figure CN120162610A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent agriculture, and specifically to a method for identifying the driving trajectory of agricultural machinery based on deep learning. Background Art
[0002] In the prior art, with the rapid development of smart agriculture, agricultural machinery and equipment are increasingly widely used in agricultural production. However, due to the complexity of the agricultural operation environment, the acquisition and analysis of operation data of agricultural machinery still face many challenges. Currently, traditional trajectory recognition methods mainly rely on high-precision sensors to collect operation information. However, the traditional trajectory recognition methods still have the following deficiencies:
[0003] The prior art usually relies on multiple groups of sensors to collect operation data of agricultural machinery. However, sensors are prone to damage during long-term use. Once a failure occurs, it will directly affect the accuracy of the data. In addition, low-cost sensors have low precision and cannot meet the operation requirements in complex environments, while high-precision sensors are costly and cannot be popularized and applied in large-scale agricultural production.
[0004] In the field operation environment, agricultural machinery will encounter different terrain conditions, such as slopes and muddy roads. The complex environment will cause the angle data of traditional sensors to shift, thereby affecting the recognition result of the operation trajectory. For example, when driving on bumpy roads or uphill and downhill, the angle information collected by the sensors will generate errors, resulting in misjudgment and affecting the accuracy of data analysis.
[0005] The installation position and configuration method of the sensors of agricultural machinery will change due to the adjustment of the operator. For example, if the sensor position is moved or the installation method is modified, it will directly affect the recognition accuracy of the operation trajectory. In addition, some operators will adjust the sensor position to fabricate operation data, affecting the authenticity and reliability of the operation data of agricultural machinery.
[0006] In view of the above problems, the present invention proposes a method for identifying the driving trajectory of agricultural machinery based on deep learning to solve the above-mentioned problems. Compared with the traditional method, the present invention has the following advantages:
[0007] This method analyzes the trajectory through GPS data, without the need to additionally install high-precision sensors, thereby reducing the data error caused by sensor failure or improper installation, and improving the stability and applicability of the system.
[0008] When agricultural machinery operates on bumpy roads or slopes, this method can still accurately distinguish the field operation trajectory from the road driving trajectory, avoiding data misjudgment caused by environmental interference in the traditional method.
[0009] This method is not affected by the operator's adjustment of the sensor position or change of the installation method, thereby improving the credibility of the data.
[0010] The present invention is based on the DBSCAN algorithm and optimizes the clustering parameters through deep learning methods to ensure that agricultural machinery trajectory data can be accurately classified, which is helpful for fine agricultural management.
[0011] In summary, by combining deep learning with GPS data, the present invention overcomes the shortcomings of strong dependence on traditional sensors, poor environmental adaptability, and susceptibility to human interference, provides an efficient and accurate solution for agricultural machinery trajectory recognition, and is of great significance to the development of agricultural modernization and intelligentization. Summary of the Invention
[0012] Aiming at the deficiencies of the prior art, the present invention provides a method for recognizing the driving trajectory of agricultural machinery based on deep learning to solve the problems proposed in the above background technology.
[0013] To achieve the above objectives, the present invention is realized through the following technical solutions: A method for recognizing the driving trajectory of agricultural machinery based on deep learning includes:
[0014] Step 1: Extract operation data from the agricultural machinery intelligent device, and arrange all the data in chronological order to form a data source set C.
[0015] Step 2: Traverse the set C, extract the longitude and latitude data, record it in a new set C1, and use the Gauss projection method to convert the spherical coordinates into the horizontal and vertical coordinates (x, y) in the plane rectangular coordinate system to obtain the set C2.
[0016] Step 3: Use the DBSCAN density clustering algorithm to classify the set C2, set the neighborhood radius eps to 20, and the minimum number of samples min_samples for the core object to 120. The DBSCAN clusters according to the distribution density of points, divides the trajectory points into different clusters, the noise points are marked as -1, and other trajectory points are classified by cluster, and the classification results are stored in the set R.
[0017] Step 4: The classification labels in the set R are corresponding to the data in the set C according to the index position one by one, and each classification value in the set R represents the category of the corresponding trajectory point in C.
[0018] Step 5: Combining the actual needs, mark the road driving data and field operation data. The data points with the label -1 in the set R are marked as road driving trajectories, and the data points with other classification labels are marked as field operation trajectories. The field operation trajectories of the same category indicate that the agricultural machinery is operating in the same plot.
[0019] Step 6: Store the classified trajectory data in the database, provide a visual display, and mark the colors of different trajectory types. Red represents road driving, and green represents field operation to generate a visual trajectory map for use by the agricultural machinery management system.
[0020] Preferably, the data includes time, longitude, latitude, and speed information.
[0021] Preferably, in step 2, the Gauss projection method further includes:
[0022] Step 2.1, extracting longitude and latitude data: Extract the longitude and latitude of all trajectory points in the data source set C1 to form a spherical coordinate data set G:
[0023] G = {(λ1, φ1), (λ2, φ2), …, (λ n , φ n )},
[0024] where λ n represents the longitude of the trajectory point p n , and φ n represents the latitude of the trajectory point p n ;
[0025] Step 2.2, selecting the central meridian of the projection: Set the central meridian λ0 of the Gauss projection as the central longitude of the target projection area to reduce projection distortion:
[0026]
[0027] where max(λ) and min(λ) are the maximum and minimum longitude values in the trajectory point data set;
[0028] Step 2.3, calculating the reference ellipsoid parameters:
[0029] Adopt the WGS - 84 coordinate system as the reference ellipsoid to obtain the following parameters:
[0030] The semi - major axis a = 6378137 meters, representing the radius of the Earth's equator;
[0031] The flattening is used to calculate the eccentricity;
[0032] The square of the first eccentricity e 2 = 2f - f 2 , representing the degree of deviation of the ellipsoid shape from a sphere. e is called the first eccentricity, representing the deviation degree of the Earth ellipsoid from a perfect sphere.
[0033] Preferably, in step 2, the Gauss projection method further includes:
[0034] Step 2.4, calculating the meridian arc length:
[0035] According to the latitude φ i calculate the meridian arc length S i from the equator to this point:
[0036] S i= a(Aφ i - Bsin2φ i + Csin4φ i - Dsin6φ i ),
[0037] wherein, the coefficients A, B, C, and D are determined by the eccentricity e 2 :
[0038]
[0039] Step 2.5, calculate the plane rectangular coordinates:
[0040] Convert the spherical coordinates (λ i , φ i ) to the plane coordinates (x i , y i ) under the Gauss projection:
[0041] x i = S i ,
[0042] y i = N i (λ i - λ0) cosφ i ,
[0043] wherein, λ i is the geographical longitude of the trajectory point p i , φ i is the geographical latitude of the trajectory point p i , x i is the X-axis value of the plane rectangular coordinates after the Gauss projection, y i is the Y-axis value of the plane rectangular coordinates after the Gauss projection, and N i is the radius of the prime vertical circle at the latitude φ i :
[0044] wherein, a is the semi-major axis, the equatorial radius of the reference ellipsoid;
[0045] Step 2.6, generate the plane coordinate dataset:
[0046] Store the coordinates of all the converted trajectory points into the plane coordinate dataset C2, and C2 contains the coordinates of all the converted trajectory points:
[0047] C2 = {(x1, y1), (x2, y2), …, (x n , y n )}, which is used for subsequent DBSCAN trajectory classification.
[0048] Preferably, in the said Step 3, the DBSCAN density clustering algorithm further includes:
[0049] Step 3.1, extract all the trajectory points in set C2 to form a point set:
[0050] P = {p1, p2, …, p n}, where p n represents a trajectory point;
[0051] Each trajectory point p i is composed of horizontal and vertical coordinates, p i = (x i , y i );
[0052] Set the neighborhood radius ε and the minimum sample number m of the core object to determine the density relationship of data points;
[0053] Step 3.2, calculate the Euclidean distance: For the trajectory point set P, calculate the Euclidean distance between trajectory point p i and trajectory point p j :
[0054] where d ij represents the straight-line distance between point p i and p j , and x i , y i and x j , y j are all the coordinates of the trajectory points;
[0055] Step 3.3, determine the neighborhood point set: For each trajectory point p i , traverse the point set P to find all the points that meet the following conditions to form the neighborhood point set N i : N i = {p j ∈P | d ij ≤ ε},
[0056] where N i is the neighborhood point set of trajectory point p i , and ε is the neighborhood radius.
[0057] Preferably, in step 3, the DBSCAN density clustering algorithm further includes:
[0058] Step 3.4, classify core objects, border objects, and noise points:
[0059] Traverse all the trajectory points p i , and classify them according to the number of neighborhood points |N i |:
[0060] Core object: If |N i | ≥ m, then pi As the core object;
[0061] Boundary object: If |N i | < m, and p i belongs to the neighborhood of a certain core object, then p i is a boundary object;
[0062] Noise point: If p i is neither a core object nor belongs to the neighborhood of any core object, then p i is a noise point, marked as -1;
[0063] Step 3.5, Cluster expansion: Select an unclassified core object p i , mark it as the new cluster C k , and expand the neighborhood point set N i :
[0064] Add all neighborhood points p i of p j to the cluster C k ;
[0065] If p j is a core object, continue to recursively expand the neighborhood point set N j of p j ;
[0066] Until all reachable core objects and neighborhood points are added to C k , forming a complete cluster;
[0067] Step 3.6, Trajectory classification:
[0068] After completing the classification of all trajectory points, obtain the trajectory classification result set R:
[0069] R = {c1, c2,..., c n}
[0070] where c n is the classification label of the trajectory point p n . -1 represents a noise point, that is, road driving data, and non - negative integers represent field operation trajectories. Different integers represent different plot operation areas.
[0071] Preferably, in the said step 4, the data mapping further includes:
[0072] Step 4.1, Extract the classification result set:
[0073] From the classification label set R calculated in step 3, extract the classification labels of all trajectory points to form a classification label data set: R = {c1, c2,..., c n}
[0074] Among them, c n is the classification label of the trajectory point p n . -1 represents a noise point, that is, road driving data, and non-negative integers represent field operation trajectories. Different integers represent different plot operation areas. The index position n in the dataset corresponds to the index position of the trajectory point in the data set C2 generated in step 2;
[0075] Step 4.2, establish an index mapping relationship:
[0076] The trajectory classification result set R and the original data set C are indexed one by one, and the mapping relationship is:
[0077] M = {(n, c n )},
[0078] where M is the mapping index dataset, containing n and c n , which is used to ensure that the classification result correctly matches the original data.
[0079] Preferably, in the said step 4, the data mapping further includes:
[0080] Step 4.3, index mapping calculation formula:
[0081] For each trajectory point p n , the classification label c n is assigned to the corresponding trajectory point data in the original data set C:
[0082] L n = c n ,
[0083] where L n represents the classification label of the nth trajectory point in the set C;
[0084] Finally, the classification labels of all trajectory points are stored in the new classification result set C L , which contains the complete data information of each trajectory point and the corresponding classification label:
[0085] C L = {(t1, λ1, φ1, v1, L1), (t2, λ2, φ2, v2, L2), …, (t n , λ n , φ n , v n , L n )},
[0086] where t n is the timestamp recorded by the trajectory point p n , λ n is the longitude of the trajectory point p n , φn For the trajectory point p n latitude, v n For the trajectory point p n speed, L n For the trajectory point p n classification label, from the set R;
[0087] Step 4.4, mapping data storage:
[0088] Store the classification result set C L into the database, and sort it in index order to ensure data integrity. The stored data is used in Step 5 to distinguish between road driving trajectories and field operation trajectories.
[0089] A terminal device includes a memory, a processor, and a program communicating with the processor. The program is configured to execute a method for identifying the driving trajectory of agricultural machinery based on deep learning.
[0090] A storage medium stores a computer program. When the computer program is executed by a processor, it causes the terminal device to execute a method for identifying the driving trajectory of agricultural machinery based on deep learning.
[0091] The present invention provides a method for identifying the driving trajectory of agricultural machinery based on deep learning. It has the following beneficial effects:
[0092] 1. The present invention relies on GPS latitude and longitude coordinate data and does not require additional use of high-precision sensors. Consequently, it fundamentally reduces the dependence on hardware devices. Compared with the prior art solutions that highly rely on sensors, this method avoids errors caused by sensor damage and insufficient accuracy, improves system stability, and simultaneously reduces agricultural production costs.
[0093] 2. The present invention uses the DBSCAN density clustering algorithm to intelligently classify GPS trajectory data, ensuring accurate identification of field operation trajectories and road driving trajectories in complex environments such as slopes and muddy roads. In contrast, traditional methods are greatly affected by terrain and are prone to misjudgment due to sensor data deviation. This method eliminates environmental interference through data clustering and improves the robustness of trajectory classification.
[0094] 3. The trajectory recognition process of the present invention is not affected by changes in the installation position of sensors and human adjustment. Compared with the problem in the prior art where the operator falsifies data by modifying the sensor position, this method eliminates the influence of human operation on the accuracy of trajectory recognition and guarantees the authenticity of operation data.
[0095] 4. The present invention combines deep learning to optimize the DBSCAN clustering parameters to achieve fine classification of agricultural machinery trajectories. Compared with traditional classification methods based on rule setting, this method can adapt to different operation modes and improve the accuracy of data analysis. Description of the Drawings
[0096] Figure 1 This is a flow chart of the present invention. Detailed implementation manners
[0097] To enable those skilled in the art to understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0098] The present invention will be described in detail below with reference to the accompanying drawings:
[0099] Embodiment:
[0100] Please refer to the attached Figure 1 , the embodiment of the present invention provides a method for identifying the driving trajectory of agricultural machinery based on deep learning, including:
[0101] Step 1: Extract operation data from the agricultural machinery intelligent device. The data includes time, longitude, latitude, and speed information. All the data is arranged in chronological order to form a data source set C;
[0102] Step 2: Traverse the set C, extract the longitude and latitude data, record it into a new set C1, and use the Gauss projection method to convert the spherical coordinates into the horizontal and vertical coordinates (x, y) in the plane rectangular coordinate system to obtain a set C2;
[0103] Step 2.1: Extract longitude and latitude data: Extract the longitude and latitude of all trajectory points in the data source set C1 to form a spherical coordinate data set G:
[0104] G = {(λ1, φ1), (λ2, φ2), …, (λ n , φ n )},
[0105] where λ n represents the longitude of the trajectory point p n , and φ n represents the latitude of the trajectory point p n ;
[0106] Step 2.2: Select the central meridian of the projection: Set the central meridian λ0 of the Gauss projection as the central longitude of the target projection area to reduce the projection deformation:
[0107]
[0108] where max(λ) and min(λ) are the maximum and minimum longitude values in the trajectory point data set;
[0109] Step 2.3, calculate the reference ellipsoid parameters:
[0110] Adopt the WGS-84 coordinate system as the reference ellipsoid to obtain the following parameters:
[0111] The semi-major axis a = 6,378,137 m, representing the equatorial radius of the earth;
[0112] Flattening Used to calculate the eccentricity;
[0113] The square of the first eccentricity e 2 = 2f - f 2 , representing the degree of deviation of the ellipsoid shape from a sphere. e is called the first eccentricity, representing the degree of deviation of the earth ellipsoid from a perfect sphere;
[0114] Step 2.4, calculate the meridian arc length:
[0115] According to the latitude φ i Calculate the meridian arc length S from the equator to this point i :
[0116] S i = a(Aφ i - Bsin2φ i + Csin4φ i - Dsin6φ i ),
[0117] where the coefficients A, B, C, D are determined by the eccentricity e 2 :
[0118]
[0119] Step 2.5, calculate the plane rectangular coordinates:
[0120] Convert the spherical coordinates (λ i , φ i ) to the plane coordinates (x i , y i ) under the Gauss projection:
[0121] x i = S i ,
[0122] y i = N i (λ i - λ0)cosφ i ,
[0123] where λ i is the geographical longitude of the trajectory point p i , φ iis the trajectory point p i is the geographical latitude of, x i is the X-axis value of the plane rectangular coordinate after Gauss projection, y i is the Y-axis value of the plane rectangular coordinate after Gauss projection, N i is the latitude φ i is the radius of the prime vertical circle at:
[0124] where a is the semi-major axis, the equatorial radius of the reference ellipsoid;
[0125] Step 2.6, generate the plane coordinate dataset:
[0126] Store the coordinates of all the converted trajectory points into the plane coordinate dataset C2, and C2 contains the coordinates of all the converted trajectory points:
[0127] C2 = {(x1, y1), (x2, y2), …, (x n , y n )}, which is used for subsequent DBSCAN trajectory classification;
[0128] Step 3, classify the set C2 using the DBSCAN density clustering algorithm, set the neighborhood radius eps to 20, and the minimum number of samples for core objects min_samples to 120. DBSCAN clusters according to the distribution density of points, divides the trajectory points into different clusters, the noise points are marked as -1, and the other trajectory points are classified by cluster, and the classification results are stored in the set R;
[0129] Step 3.1, extract all the trajectory points in the set C2 to form a point set:
[0130] P = {p1, p2, …, p n}, where p n represents the trajectory point;
[0131] Each trajectory point p i is composed of horizontal and vertical coordinates, p i = (x i , y i ),
[0132] Set the neighborhood radius ε and the minimum number of samples for core objects m to determine the density relationship of data points;
[0133] Step 3.2, calculate the Euclidean distance: For the trajectory point set P, calculate the Euclidean distance between the trajectory point p i and the trajectory point p j :
[0134] where d ij represents the point p i and pj The straight-line distance between them, x i , y i and x j , y j are all the coordinates of the trajectory points;
[0135] Step 3.3, determine the neighborhood point set: For each trajectory point p i , traverse the point set P and find all points that satisfy the following conditions to form the neighborhood point set N i : N i = {p j ∈ P | d ij ≤ ε},
[0136] where N i is the neighborhood point set of the trajectory point p i , and ε is the neighborhood radius;
[0137] Step 3.4, classify core objects, boundary objects, and noise points:
[0138] Traverse all trajectory points p i , and classify them according to the number of neighborhood points |N i |:
[0139] Core object: If |N i | ≥ m, then p i is a core object;
[0140] Boundary object: If |N i | < m and p i belongs to the neighborhood of a certain core object, then p i is a boundary object;
[0141] Noise point: If p i is neither a core object nor belongs to the neighborhood of any core object, then p i is a noise point and is marked as -1;
[0142] Step 3.5, cluster expansion: Select an unclassified core object p i , mark it as a new cluster C k , and expand the neighborhood point set N i :
[0143] Add all neighborhood points p i of p j to the cluster C k ;
[0144] If p j is a core object, then continue to recursively expand the neighborhood point set N j of p j ;
[0145] Until all reachable core objects and neighborhood points are added to C k , a complete cluster is formed;
[0146] Step 3.6, Trajectory Classification:
[0147] After classifying all trajectory points, the trajectory classification result set R is obtained:
[0148] R = {c1, c2, …, c n}},
[0149] where c n is the classification label of the trajectory point p n . -1 represents a noise point, i.e., road driving data, and non-negative integers represent field operation trajectories. Different integers represent different plot operation areas;
[0150] Step 4, The classification labels in the set R are corresponding one by one with the data in the set C according to the index positions. Each classification value in the set R represents the category of the corresponding trajectory point in C;
[0151] Step 4.1, Extract the classification result set:
[0152] From the classification label set R calculated in Step 3, extract the classification labels of all trajectory points to form a classification label data set: R = {c1, c2, …, c n}},
[0153] where c n is the classification label of the trajectory point p n . -1 represents a noise point, i.e., road driving data, and non-negative integers represent field operation trajectories. Different integers represent different plot operation areas. The index position n in the data set corresponds to the index position of the trajectory point in the data set C2 generated in Step 2;
[0154] Step 4.2, Establish an index mapping relationship:
[0155] The trajectory classification result set R and the original data set C are indexed one by one. The mapping relationship is:
[0156] M = {(n, c n )},
[0157] where M is the mapping index data set, containing n and c n , and is used to ensure that the classification results are correctly matched with the original data;
[0158] Step 4.3, Index mapping calculation formula:
[0159] For each trajectory point p n , the classification label c nAssign to the corresponding trajectory point data in the original data set C:
[0160] L n = c n ,
[0161] where L n represents the classification label of the nth trajectory point in set C;
[0162] Finally, the classification labels of all trajectory points are stored in the new classification result set C L , including the complete data information of each trajectory point and the corresponding classification label:
[0163] C L = {(t1, λ1, φ1, v1, L1), (t2, λ2, φ2, v2, L2), …, (t n , λ n , φ n , v n , L n )},
[0164] where t n is the timestamp recorded by the trajectory point p n , λ n is the longitude of the trajectory point p n , φ n is the latitude of the trajectory point p n , v n is the speed of the trajectory point p n , and L n is the classification label of the trajectory point p n , from set R;
[0165] Step 4.4, Mapping data storage:
[0166] Store the classification result set C L in the database and sort it in index order to ensure data integrity. The stored data is used in Step 5 to distinguish between road driving trajectories and field operation trajectories;
[0167] Step 5, Combine with actual requirements to mark road driving data and field operation data. The data points with label -1 in set R are marked as road driving trajectories, and the data points with other classification labels are marked as field operation trajectories. The field operation trajectories of the same category indicate that the agricultural machinery is operating within the same plot;
[0168] Step 6, Store the classified trajectory data in the database, provide visual display, and mark the colors of different trajectory types. Red represents road driving, and green represents field operation to generate a visual trajectory map for use by the agricultural machinery management system.
[0169] The advantage of Step 1 is that data can be directly extracted by agricultural machinery intelligent devices without the need to install additional complex sensors, reducing hardware costs. Moreover, it is arranged in chronological order to ensure the continuity of trajectory data, laying a foundation for subsequent trajectory recognition.
[0170] The advantage of Step 2 is that the Gaussian projection method is adopted to convert spherical coordinates into plane rectangular coordinates, avoiding spherical calculation errors and improving calculation accuracy. At the same time, the central meridian is set to reduce projection deformation, making the projected coordinates conform to the agricultural machinery operation scenario. Additionally, the arc length of the meridian is calculated to ensure accurate conversion of longitudinal coordinates and avoid cumulative errors in traditional longitude and latitude calculations.
[0171] The advantage of Step 3 is that the DBSCAN density clustering algorithm is adopted to automatically classify trajectory data without presetting categories, improving classification adaptability. Moreover, noise points are identified to automatically distinguish road driving and field operation trajectories, enhancing data credibility. At the same time, appropriate neighborhood radii and minimum sample numbers are set to ensure classification stability, so as to accurately classify even in the case of uneven trajectory distribution.
[0172] The advantage of Step 4 is to achieve a one-to-one correspondence between classification labels and the indexes of original data, ensuring data integrity and avoiding loss and misalignment of classification results. Moreover, index mapping is adopted to quickly match classification labels, improving calculation efficiency. At the same time, combined with the original data, a complete trajectory classification data set is formed to provide support for subsequent data storage and analysis.
[0173] The advantage of Step 5 is that it can clearly distinguish road driving and field operation trajectories, facilitating subsequent agricultural machinery operation statistics and management. Moreover, the field operation trajectories are further subdivided into categories to help accurately divide different plots and improve the accuracy of agricultural machinery management. By adopting an automatic marking method, manual intervention is reduced to ensure data objectivity.
[0174] The advantage of Step 6 is to store the trajectory data in a database, facilitating long-term storage and retrieval, supporting large-scale data management. At the same time, visual display is provided, with different trajectory types marked with different colors to intuitively display the agricultural machinery operation trajectories, which is applicable to the agricultural machinery management system.
[0175] In summary, the method of the present invention adopts deep learning + trajectory clustering technology to accurately identify the driving trajectories of agricultural machinery, distinguish road driving and field operation, and improve the accuracy of data analysis. Compared with traditional methods, this method is applicable to the intelligent agricultural management system and helps to promote the development of agricultural modernization.
[0176] A terminal device includes a memory, a processor, and a program communicated with the processor. The program is configured to execute a method for identifying the driving trajectory of agricultural machinery based on deep learning.
[0177] A storage medium stores a computer program. When the computer program is executed by a processor, it causes the terminal device to execute a method for identifying the driving trajectory of agricultural machinery based on deep learning.
[0178] The terminal device is built-in with a high-performance processor, supports real-time data processing, ensures the efficiency of agricultural machinery trajectory recognition, and adopts an optimized algorithm structure to reduce the occupation of computing resources and improve the data processing speed. At the same time, the terminal device is designed with a low-power architecture and can operate in the wild for a long time to meet the needs of agricultural operations. It is applicable to unmanned agricultural machinery and intelligent devices such as agricultural robots and can operate stably in the field environment.
[0179] The storage medium is used for different computing devices, facilitating migration between agricultural machinery, servers, and edge computing devices. At the same time, it is compatible with Windows, Linux, and Android systems to adapt to different agricultural machinery management systems; the computer program can be remotely updated to support the upgrade of new algorithms and new functions, improve the maintainability of the system, adapt to different agricultural operation modes, and enhance the intelligent capabilities of agricultural machinery.
[0180] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for identifying agricultural machinery driving trajectories based on deep learning, characterized in that: include: Step 1: extract operation data from agricultural machinery intelligent equipment, and arrange all data in chronological order to form a data source set C; Step 2, traverse the set C, extract the longitude and latitude data, record them in the new set C1, and use the Gauss projection method to convert the spherical coordinates into the horizontal and vertical coordinates (x, y) in the plane rectangular coordinate system to obtain the set C2; Step 3, using the DBSCAN density clustering algorithm to classify the set C2, setting the neighborhood radius eps to 20, and the minimum number of core object samples min_samples to 120. The DBSCAN clusters the points according to their distribution density, and divides the trajectory points into different clusters. Noise points are marked as -1, and other trajectory points are classified by cluster. The classification results are stored in the set R; Step 4: The classification labels in set R correspond one-to-one with the data in set C according to the index position. Each classification value in set R represents the category of the corresponding trajectory point in C. Step 5: Based on actual needs, mark the road driving data and field operation data. The data points with the label -1 in the set R are marked as road driving trajectories, and the data points with other classification labels are marked as field operation trajectories. Field operation trajectories of the same category indicate that the agricultural machinery is operating in the same plot. Step 6: Store the classified trajectory data into the database, provide a visual display, and mark the colors of different trajectory types, with red representing road driving and green representing field operations, to generate a visual trajectory map for use in the agricultural machinery management system.
2. The method for identifying agricultural machinery driving trajectories based on deep learning according to claim 1, characterized in that: The data contains time, longitude, latitude and speed information.
3. The method for identifying agricultural machinery driving trajectories based on deep learning according to claim 1, characterized in that: In step 2, the Gaussian projection method further comprises: Step 2.1, extract longitude and latitude data: extract the longitude and latitude of all trajectory points in the data source set C1 to form a spherical coordinate data set G: G={(λ1,φ1),(λ2,φ2),…,(λ n ,f n )}, Among them, λ n represents the trajectory point p n Longitude, φ n represents the trajectory point p n Latitude; Step 2.2, select the central meridian of the projection: Set the central meridian λ0 of the Gaussian projection as the central longitude of the target projection area to reduce projection deformation: Among them, max(λ) and min(λ) are the maximum and minimum longitude values in the trajectory point data set; Step 2.3, calculate the reference ellipsoid parameters: Using the WGS-84 coordinate system as the reference ellipsoid, obtain the following parameters: The major axis a = 6378137 meters, representing the equatorial radius of the earth; Flattening Used to calculate eccentricity; The first eccentricity squared e 2 =2f-f 2 , which indicates the degree to which the ellipsoid shape deviates from the sphere, and e is called the first eccentricity, which indicates the degree of deviation of the earth's ellipsoid from the perfect sphere.
4. The method for identifying agricultural machinery driving trajectories based on deep learning according to claim 1, characterized in that: In step 2, the Gaussian projection method further comprises: Step 2.4, calculate the meridian arc length: According to latitude φ i Calculate the meridian arc length S from the equator to the point i : S i =a(Aφ i -Bsin2φ i +Csin4φ i -Dsin6φ i ), Among them, the coefficients A, B, C, and D are determined by the eccentricity e 2 Sure: Step 2.5, calculate the plane rectangular coordinates: Spherical coordinates (λ i ,φ i ) is converted to the plane coordinates (x) under Gauss projection i ,y i ): x i =S i , y i =N i (λ i -λ0)cosφ i , Among them, λ i is the trajectory point p i The geographical longitude, φ i is the trajectory point p i The geographical latitude, x i is the X-axis value of the plane rectangular coordinate after Gaussian projection, y i is the Y-axis value of the plane rectangular coordinate after Gaussian projection, N i is the latitude φ i The radius of the Maoyou circle at: Where a is the semi-major axis, the equatorial radius of the reference ellipsoid; Step 2.6, generate plane coordinate data set: The transformed coordinates of all trajectory points are stored in the plane coordinate data set C2, which contains the transformed coordinates of all trajectory points: C2={(x1,y1),(x2,y2),…,(x n ,y n )}, which is used for subsequent DBSCAN trajectory classification.
5. The method for identifying agricultural machinery driving trajectories based on deep learning according to claim 1, characterized in that: In step 3, the DBSCAN density clustering algorithm further includes: Step 3.1, extract all trajectory points in set C2 to form a point set: P={p1,p2,…,p n }, where p n represents the trajectory point; Each trajectory point p i It is composed of horizontal and vertical coordinates, p i =(x i ,y i ), Set the neighborhood radius ε and the minimum number of core object samples m to determine the density relationship of data points; Step 3.2, calculate the Euclidean distance: for the trajectory point set P, calculate the trajectory point p i and trajectory point p j The Euclidean distance between: Among them, d ij Represents point p i and p j The straight-line distance between i ,y i and x j ,y j are the coordinates of trajectory points; Step 3.3, determine the neighborhood point set: for each trajectory point p i , traverse the point set P, find all points that meet the following conditions, and form the neighborhood point set N i :N i ={p j ∈P|d ij ≤ε}, Among them, N i is the trajectory point p i is the neighborhood point set, and ε is the neighborhood radius.
6. The method for identifying agricultural machinery driving trajectories based on deep learning according to claim 1, characterized in that: In step 3, the DBSCAN density clustering algorithm further includes: Step 3.4, classify core objects, boundary objects and noise points: Traverse all trajectory points p i , according to the number of neighborhood points |N i |Category: Core Object: If | N i |≥m, then p i As the core object; Boundary Object: If | N i |<m, and p i belongs to the neighborhood of a core object, then p i is a boundary object; Noise point: If p i If it is neither a core object nor a neighborhood of any core object, then p i is a noise point, marked as -1; Step 3.5, cluster expansion: select the unclassified core objects p i , marked as new cluster C k , and for the neighborhood point set N i To expand: The p i All neighboring points p j Join Cluster C k ; If p j Is a core object, then continue to recursively expand p j The neighborhood point set N j ; Until all reachable core objects and neighboring points are added to C k , forming a complete cluster; Step 3.6, trajectory classification: After completing the classification of all trajectory points, the trajectory classification result set R is obtained: R={c1,c2,…,c n }, Among them, c n is the trajectory point p n The classification label is, -1 represents the noise point, that is, the road driving data, the non-negative integer represents the field operation track, and different integers represent different plot operation areas.
7. The method for identifying agricultural machinery driving trajectories based on deep learning according to claim 1, characterized in that: In step 4, data mapping further includes: Step 4.1, extract the classification result set: From the classification label set R calculated in step 3, extract the classification labels of all trajectory points to form a classification label dataset: R = {c1, c2, …, c n }, Among them, c n is the trajectory point p n The classification label, -1 represents a noise point, that is, road driving data, non-negative integers represent field operation trajectories, and different integers represent different plot operation areas. The index position n in the data set corresponds to the index position of the trajectory point in the data set C2 generated in step 2; Step 4.2, establish index mapping relationship: The trajectory classification result set R and the original data set C index correspond one to one, and the mapping relationship is: M={(n,c n )}, Where M is the mapping index dataset, including n and c n , which is used to ensure that the classification results correctly match the original data.
8. The method for identifying agricultural machinery driving trajectories based on deep learning according to claim 1, characterized in that: In step 4, data mapping further includes: Step 4.3, index mapping calculation formula: For each trajectory point p n , classification label c n Assign values to the corresponding trajectory point data in the original data set C: L n =c n , Among them, L n Represents the classification label of the nth trajectory point in set C; Finally, the classification labels of all trajectory points are stored in the new classification result set C L , containing the complete data information of each trajectory point and the corresponding classification label: C L ={(t1,λ1,φ1,v1,L1),(t2,λ2,φ2,v2,L2),…,(t n ,l n ,f n ,v n ,L n )}, Among them, t n is the trajectory point p n The timestamp of the record, λ n is the trajectory point p n Longitude, φ n is the trajectory point p n The latitude, v n is the trajectory point p n The speed, L n is the trajectory point p n The classification label of comes from the set R; Step 4.4, Map data storage: The classification result set C L The data are stored in the database and sorted in index order to ensure data integrity. The stored data are used in step 5 to distinguish between road driving trajectories and field operation trajectories.
9. A terminal device, characterized in that: It includes a memory, a processor and a program communicating with the processor, and the program is configured to execute the agricultural machinery driving trajectory recognition method based on deep learning as described in any one of claims 1 to 8.
10. A storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the terminal device executes the agricultural machinery driving trajectory recognition method based on deep learning as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Agricultural machinery motion mode recognition method combining road network map and agricultural machinery track clustering algorithm
CN116738313A
Agricultural machine track identification method based on deep transfer learning
CN117951580A
Traveling track establishment method based on intelligent agricultural machine
CN119128629A
Method and system for agricultural machinery trajectory recognition
WO2025044115A1
Cited By
Multi-dimensional data clustering dimensionality reduction collaborative learning index construction method for agricultural machinery track
CN121350038A