Pre-training and fine-tuning methods for precision planting in agriculture based on AI large models

By using AI-based large-scale model pre-training and fine-tuning training methods, the problems of efficiency and quality fluctuations in traditional agricultural planting methods have been solved, enabling precise monitoring and management of farmland crops, and improving the level of intelligence in agricultural production and the scientific nature of planting plans.

CN119475082BActive Publication Date: 2026-01-06HEBEI NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411476438.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2026-01-06
Estimated Expiration
2044-10-22

AI Technical Summary

Technical Problem

Traditional agricultural planting methods are affected by complex factors such as geography, weather and soil, resulting in fluctuations in production efficiency and quality, and lacking intelligence and adaptability.

Method used

We employ a pre-training and fine-tuning training method based on large AI models. We pre-train on a large amount of agricultural data using deep learning technology, and combine self-attention mechanism and feedforward neural network to identify and process missing and outlier values. We optimize the model using Transformer decoder and fine-tune it in actual farmland environment, with real-time monitoring and adjustment.

Benefits of technology

It has improved the level of intelligence in agricultural production, enhanced adaptability to specific regions and crops, enabled precise monitoring and management of crop conditions in farmland, and improved the scientific nature and efficiency of planting plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119475082B_ABST
    Figure CN119475082B_ABST
Patent Text Reader

Abstract

This invention discloses a pre-training and fine-tuning method for precision agricultural planting based on a large AI model. It utilizes deep learning technology to extract key information from large-scale agricultural data, predicting optimal planting patterns to improve crop yield and quality. By analyzing historical data and real-time monitoring, it predicts and alerts farmers to potential pests and diseases, allowing them to take preventative measures. For different regions and environmental conditions, the model can be fine-tuned to adapt to specific planting requirements, improving its universality and accuracy. Predicting soil, weather, and plant growth patterns provides intelligent decision support for agricultural production, helping farmers optimize planting plans, increase yields, reduce resource waste, and thus improve the scientific nature and efficiency of agriculture. The model enables farmers to plant scientifically, improve crop yield and quality, conserve resources, reduce environmental burden, and promote sustainable agricultural development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of agricultural technology, specifically to a method for pre-training and fine-tuning precision planting in agriculture based on a large AI model. Background Technology

[0002] With the advancement of agricultural modernization, precision agriculture has become an important way to improve agricultural production efficiency and reduce resource waste. Against this backdrop, the application of artificial intelligence (AI) technology has brought new opportunities to the agricultural field. In particular, using large AI models for pre-training and fine-tuning precision planting has become a technology with enormous potential. The article "Agricultural Artificial Intelligence Technology: Wings of Modern Agricultural Science and Technology," published in the journal *Journal of South China Agricultural University* in 2024, reviews several key technologies of agricultural AI and the current status of AI applications in crop cultivation, animal husbandry, and agricultural product traceability and grading. The article "Application of Large AI Models in Smart Agriculture," published in the journal *Agricultural Engineering Technology* in 2024, introduces the basic concepts of large AI models, analyzes the current status and challenges of smart agriculture, and elaborates on the application of large AI models in smart agriculture.

[0003] Traditional agricultural planting methods are often constrained by complex factors such as geography, weather, and soil, leading to fluctuations in production efficiency and quality. However, pre-training and fine-tuning methods based on large-scale AI models, utilizing deep learning technology, allow for model pre-training on massive amounts of agricultural data, thereby enhancing the model's intelligence and adaptability. Subsequently, through fine-tuning training in actual farmland environments, the model is optimized to adapt to different agricultural scenarios, enabling intelligent analysis and prediction of various factors such as crop growth, soil conditions, and weather changes. This technological background highlights the potential advantages of using large-scale AI models for precision agriculture, including improving agricultural production efficiency, reducing production costs, and minimizing resource waste, thereby promoting the sustainable development of modern agriculture. Summary of the Invention

[0004] The technical problem to be solved by this invention is to provide a method for pre-training and fine-tuning training of precision agricultural planting based on a large AI model.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0006] A method for pre-training and fine-tuning precision planting in agriculture based on AI large models includes the following steps:

[0007] Step 1: Data Preprocessing: Data will be collected from open-source datasets and field surveys. Soil, weather, crop growth, crop type, location, time, crop problems, and solutions will be cleaned and organized into a dataset. This process consists of the following specific steps:

[0008] Step 1-1: Identify and handle missing values: Identify missing values ​​in the dataset and mark them as preset placeholders. If the number of missing data is less than the preset data size, delete the rows or columns containing missing values; if the number of missing data exceeds the preset data size, fill the missing values ​​with the mean of the corresponding data or neighboring data.

[0009] Step 1-2: Data Transformation: Normalize the values ​​of each feature in the dataset using the minimum-maximum normalization method; the normalization method is as follows:

[0010] x_norm = (x - min) / (max - min)

[0011] Where, x norm These are normalized values, where min and max are the minimum and maximum values, respectively.

[0012] Steps 1-3: Identify and handle outliers: Values ​​greater than the standard deviation (std) are identified as outliers; replace outliers with the nearest normal values ​​before and after them.

[0013] Step 2: Pre-training: The model structure consists of stacked Transformer decoders; each decoder includes two main components: a self-attention mechanism and a feedforward neural network; the self-attention mechanism in the model allows the model to capture longer-term dependencies between different features when processing each feature;

[0014] Model pre-training is performed using a training set: that is, the dataset contains information on the region, soil moisture, meteorological information, and crop type as the independent variables X = {x1, x2, ..., x3} as the model input. m}, where m is the number of independent variables, and the solutions to crop problems encountered in the dataset and the corresponding expert advice information are used as the model's label information Y={y1,y2,···,y3}. n}, where y n Let n be one type of output answer from the model, and n be the number of output answer types. The loss function used during model training is the cross-entropy loss function.

[0015]

[0016] in This represents the distribution of the results predicted by the model;

[0017] Step 3: Fine-tuning: Fine-tune the pre-trained large model using real-time collected farmland data, crop growth conditions, problem-solving strategies encountered in actual situations, and expert advice.

[0018] Step 4: Real-time monitoring and adjustment: Deploy the fine-tuned model in the agricultural production environment, monitor farmland data in real time, and output precise planting suggestions in real time.

[0019] Furthermore, in step 1, the nearest neighbor method is used to determine the missing values. First, the K nearest samples to the sample with missing data are determined based on Euclidean distance. Then, the weighted average of these K values ​​is used to fill the current missing value.

[0020] Furthermore, the method used to identify outliers in steps 1-3 is the density-based spatial clustering method DBSCAN.

[0021] Furthermore, the humidity index in steps 1-3 is the ratio of precipitation to temperature, and the seasonal cycle position is encoded using sine and cosine functions.

[0022] Furthermore, in step 2, the model training parameters are set with a random seed of 3407 and a learning rate of 5e. -4 The optimizer was set to Adam.

[0023] The beneficial effects of this invention are as follows:

[0024] 1. By pre-training a large model, the system can learn complex soil, weather, and plant growth patterns from a large amount of agricultural data, enabling the model to gain a deeper understanding of the agricultural environment. Through fine-tuning training, the large model can be personalized and optimized according to actual farmland conditions, improving its adaptability to specific regions and crops. This comprehensive pre-training and fine-tuning method significantly enhances the intelligence level of agricultural production, providing farmers with more scientific and precise planting solutions.

[0025] 2. This invention enables the prediction of edge wear on farmland crops, which effectively improves the accuracy of crop condition identification. Through large-scale model learning and fine-tuning, the system can accurately predict the degree of wear on crops at different growth stages, thereby providing farmers with reasonable agricultural management suggestions. This technology improves the accuracy of crop condition monitoring, helping farmers better adjust planting strategies and minimize the quality decline caused by plants being in undesirable environments for extended periods.

[0026] 3. Compared with traditional methods, this invention improves the efficiency of agricultural data processing. The pre-training stage enables large models to automatically learn key features from large-scale agricultural data, while the fine-tuning stage makes personalized adjustments based on actual farm data. This process makes full use of large amounts of data and avoids the tedious process of manually adjusting parameters required in traditional methods, improving the computational efficiency of the algorithm and enabling farmers to obtain personalized agricultural management plans more quickly.

[0027] 4. This invention integrates multiple feature information, including soil data, meteorological data, and plant growth data, thereby achieving comprehensive optimization of precision agricultural planting. By fusing different features, the system can more comprehensively assess the farm's condition and improve the accuracy of fragment similarity. This multi-feature information fusion method allows the system to more comprehensively consider various factors in agricultural production, thereby improving the accuracy and operability of planting recommendations. Attached Figure Description

[0028] Figure 1 This is a flowchart of the present invention. Detailed Implementation

[0029] The following examples are used to illustrate the present invention.

[0030] Example 1

[0031] A method for pre-training and fine-tuning precision planting in agriculture based on AI large models includes the following steps:

[0032] Step 1: Data Acquisition: Obtain a large amount of agricultural data, including but not limited to soil information, meteorological data, crop growth data, time, location, crop type, solutions to crop problems, and expert advice. This data can come from various sensors, such as satellite remote sensing and meteorological station agricultural data acquisition equipment, agricultural department documents, and real sample data collected during actual planting, as well as various agricultural planting datasets: China Crop Growth and Development and Farmland Soil Moisture Ten-Day Value Dataset, China Major Crop Growth and Development Dataset (V2.0).

[0033] Step 2: Data Preprocessing: This involves cleaning and organizing agricultural data from open-source datasets and actual collected data on soil, weather, crop growth, crop type, location, time, and solutions to crop problems. It consists of the following specific steps:

[0034] Step 2-1: Identifying and Handling Missing Values. First, we use the `isnull()`, `isna()` functions, and double equals signs from the Pandas Python data analysis library to identify missing values ​​in the dataset. Missing values ​​in the dataset are labeled as NaN, Null, empty strings, or other placeholders. We use the `.isnull()`, `.dropna()`, and `.replace()` methods from the Pandas library to examine all missing values ​​in the data. If the missing values ​​are less than 5% of the data volume, rows or columns containing missing values ​​are deleted. If the missing values ​​exceed 5% of the data volume, for partial information, the missing values ​​are filled using the mean; for time series data, the previous or next time value is used for filling. To obtain more appropriate missing values, the nearest neighbor method is used to predict missing values ​​based on other variables. Specifically, the K nearest neighbors are determined based on Euclidean distance, and then a weighted average of these K values ​​is used to estimate the missing data of the sample with the current missing value.

[0035] Step 2-2: Perform data transformation, using min-max normalization to convert all data features to the same scale. First, calculate the minimum (min) and maximum (max) for each feature. Then, use the formula x_norm = (x - min) / (max - min) to convert each value x into a normalized value x. norm This scales all values ​​to between 0 and 1. Then, the above formula is applied to all numerical representations of features in the dataset to ensure that they are all normalized.

[0036] Steps 2-3: Identifying and Handling Outliers. First, outliers are identified using standard deviation. Outliers may be caused by faulty sensors, malfunctioning sensors, or atypical events. The method used for outlier identification is the density-based spatial clustering method DBSCAN. The DBSCAN algorithm has two main parameters: eps (ε, neighborhood radius) and minPts (minimum number of samples). eps determines the neighborhood range of a point, and minPts specifies the minimum number of points contained in a cluster. We used values ​​of minPts of 15 and eps of 14. The data in the dataset is clustered, and points that do not belong to any cluster are considered noise, i.e., outliers. Then, each initially identified outlier is evaluated. If an outlier is erroneous, it should be deleted. If an outlier is caused by a known error, it can be corrected based on the context. If an outlier is a real and important data point (e.g., agricultural data under extreme weather conditions), it is retained.

[0037] Step 3: Pre-training: The model used is based on the Transformer architecture, consisting of multiple stacked Transformer decoders. Each decoder includes two main components: a self-attention mechanism and a feedforward neural network. The self-attention mechanism allows the model to notice other features in the data while processing each feature, capturing longer-term dependencies between different features. The dataset is split into three sets: training, validation, and test sets, with each set representing 80%, 10%, and 10% respectively. The model is pre-trained using data from the training set. Region, soil moisture, meteorological information, and crop type information are used as the independent variables X = {x1, x2, ..., x3} as the model input. m}, where x m Let be one independent variable, and m be the number of independent variables. The solutions to crop problems and expert advice are used as the model's label information: Y = {y1, y2, ..., y3}. n}, where y n Let n be one type of output answer from the model, and n be the number of output types. The model training process uses the cross-entropy loss function. The random seed was set to 3407 according to the article "Torch.manual_seed(3407) is all you need: On the influence of random seeds in deep learning architectures for computer vision". To avoid oscillations and overfitting on the training set, a learning rate of 5e-4 was chosen. The optimizedr selected was Adam, which achieves fast convergence, is less sensitive to the initial learning rate, and has strong fault tolerance. Through pre-training, the model can learn the complex relationship between soil, weather, and plant growth, and can predict problems encountered in farmland and provide corresponding solutions based on given agricultural information.

[0038] Step 4: Fine-tuning: Apply the pre-trained large model to a real farmland environment, using actual planting information to fine-tune the model. The data processing is the same as in Step 3. The data used for fine-tuning the model includes real-time farmland data, crop growth conditions, problem-solving strategies encountered in real-world situations, and expert advice. Through fine-tuning, the large model is better adapted to agricultural scenarios under different geographical, meteorological, and soil conditions, resulting in higher accuracy and reliability of the model's output.

[0039] Step 5: Real-time monitoring and adjustment: Deploy the trained precision planting suggestion model in the agricultural production environment, monitor farmland data in real time, and use the acquired data as the input X of the model.

[0040] Step 6: Output Precise Planting Recommendations: Based on the finely tuned large model, output precise planting recommendations in real time. This includes, but is not limited to, optimal crop selection, the best sowing time for the crop, fertilization plans, irrigation strategies, and specific measures for dealing with pests and diseases, or expert advice during the planting process. Planting recommendations can be implemented through agricultural equipment and smart agricultural machinery, thereby efficiently improving the yield and quality of farmland crops.

Claims

1. An AI large model-based agricultural precision planting pre-training and fine-tuning training method, characterized in that, Comprising the following steps: Step 1: Data preprocessing: The soil, weather, crop growth, crop type, location, time, crop problems encountered and solution strategies collected from open source datasets and actual collection are sorted into a dataset, and data cleaning is performed, which consists of the following specific steps: Step 1-1: Identify and handle missing values: Identify missing values in the dataset and mark them as a preset placeholder. If the number of missing data is less than the preset data amount, delete the row or column containing the missing value. If the number of missing data exceeds the preset data amount, use the mean value of the response data or the adjacent data to fill in the missing value; Step 1-2: Data transformation: all data are transformed into the same scale by using min-max normalization; first, the min and max of each feature in the dataset are calculated one by one; then, transformed into normalized values x norm : x_norm = (x-min) / (max-min); Step 1-3: Identify and handle outliers: Identify outliers using standard deviation; Step 2: Pre-training: The model structure is stacked with more than one Transformer decoder; each decoder includes two components: self-attention mechanism and feed-forward neural network; pre-train the model with the training set: that is, the region, soil moisture, weather information, and crop type information in the dataset are used as the independent variables X = {x1, x1, ···, x m}, where x m is an independent variable and m is the number of independent variables; the solution strategies and expert recommendations for the problems encountered by crops in the dataset are used as the label information Y = [y1, y1, ···, y n} of the model, where y n is an answer output type of the model and n is the number of output types. The cross-entropy loss function is used in the model training process: wherein represents the result distribution predicted by the model. Step 3: Fine-tuning: Fine-tune the pre-trained large model using real-time collected farmland data, crop growth, problem solving strategies encountered in actual situations and expert advice information; During fine-tuning, real local values collected by various sensors are preprocessed according to step 1, and correctly formatted data is input into the model to fine-tune the model parameters; Step 4: Real-time monitoring and adjustment: Deploy the fine-tuned model in the agricultural production environment, monitor the farmland data in real time, and output accurate planting recommendations in real time. If problems occur in actual production, return to step 3 to fine-tune the model with actual data. 2.The AI big model-based agricultural precision planting pre-training and fine-tuning training method according to claim 1, characterized in that, In step 1, the nearest neighbor method is used to determine the missing value, which first determines the K samples closest to the sample with missing data according to the Euclidean distance, and then fills in the current missing value by weighted average of the K values. 3.The AI big model-based agricultural precision planting pre-training and fine-tuning training method according to claim 1, characterized in that, The method for identifying outliers in step 1-3 is the density-based spatial clustering method DBSCAN. 4.The AI large model-based agricultural precision planting pre-training and fine-tuning training method of claim 1, wherein, The wetness index in step 1-3 is the ratio of precipitation to temperature, and the seasonal cycle position is encoded with sine and cosine functions. 5.The AI big model-based agricultural precision planting pre-training and fine-tuning training method according to claim 1, characterized in that, The model training parameters in step 2, the random seed is set to 3407, the learning rate is set to 5e -4 , and the selected optimizer is Adam.

Citation Information

Patent Citations

  • Pre-training model fine tuning method, crop monitoring method, device and equipment

    CN118313431A

  • Methods and systems for classifying and benchmarking irrigation performance

    WO2023108213A1