Wheat stem rot prediction method based on random forest
By constructing a random forest-based stem rot prediction model, the problem of lack of stem rot risk prediction in existing technologies was solved, and accurate prediction and precise prevention and control of the risk of wheat stem rot were achieved.
Patent Information
- Application Number
- CN202510524782.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-09-19
AI Technical Summary
Existing technologies lack an effective risk prediction model for stem base rot, making it difficult to guide precise prevention and control.
A random forest-based machine learning algorithm was used to construct a database of stem rot disease grades and prediction factors. The risk of wheat stem rot was predicted through appropriate oversampling and characteristic factor organization methods.
It has achieved accurate prediction of the risk of wheat stem rot, provided widely applicable and highly accurate prevention and control support, and filled the gap in domestic stem rot prediction research.
Smart Images

Figure CN120674100A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a wheat stem rot prediction method based on random forest, and belongs to the technical field of crop disease monitoring. Background Art
[0002] Wheat stem rot is a soil-borne disease caused by various pathogens, including Fusarium graminearum. It is a worldwide disease, occurring in numerous countries worldwide and posing a devastating threat to wheat production. It has been dubbed the "cancer" of wheat. The incidence of wheat stem rot exhibits significant temporal and spatial heterogeneity, with disease indices varying by over 40% between fields within the same ecological zone. This complex temporal and spatial heterogeneity makes traditional empirical control strategies inadequate for meeting the demands of modern agricultural production.
[0003] Based on the urgent need for a wheat stem rot prediction model described above, we provide a wheat stem rot prediction method based on random forest. Summary of the Invention
[0004] The purpose of the present invention is to solve the shortcomings of the existing technology that there is a lack of a risk prediction model for stem base rot to guide the precise prevention and control of stem base rot. The present invention provides a wheat stem base rot prediction method based on random forest. By constructing a database of stem base rot disease grades and prediction factors, adopting appropriate oversampling and characteristic factor organization methods, and using a random forest machine learning algorithm to train a model, the risk of wheat stem base rot is predicted.
[0005] To achieve the above object, the present invention provides a method for predicting wheat stem rot based on random forest, comprising the following steps: The steps include: S1: Based on the field survey of wheat stem rot incidence in the Huanghuai wheat region over the years, a wheat stem rot disease database was established; S2: Based on the meteorological data of each disease survey site obtained by interpolation from the daily dataset of China's meteorological element observation stations, as well as the soil pathogen content during the sowing period, the stem rot resistance of wheat varieties, and the wheat growth period at the disease survey site as epidemiological factors, an epidemiological database of the survey site was established; S3: Based on the actual occurrence patterns and prevention and control needs of wheat stem rot, meteorological data from 60 days after sowing and 30 days before and after jointing, as well as soil pathogen content during the sowing period and wheat variety stem rot resistance, were selected as predictive factors. The meteorological data was organized using time windows, and after feature screening and oversampling, a stem rot model training database was established. S4: Split the model data into training and test sets, and call the random forest in the sklearn package on the Python platform to train and adjust the prediction model; S5: Use the test data set to predict the model, and judge the model prediction accuracy based on the corresponding indicators of the test set prediction results.
[0006] Furthermore, in step S1, the constructed database includes 147 disease monitoring points in Henan, Hebei and Shandong provinces, and a total of 329 survey data from 2019 to 2023. The data content includes information on disease monitoring point number, longitude and latitude, survey time, wheat growing period, field wheat stem base rot rate, and white ear rate.
[0007] Furthermore, the diseased plant rate of wheat base rot in the field was set at 1% as the threshold, and the risk level of base rot was classified into two categories of 0 and 1, with 0 being low risk and 1 being high risk.
[0008] Furthermore, in step S2, the content of soil pathogens during the sowing period is obtained by collecting the surface soil after sowing and performing quantitative PCR.
[0009] Furthermore, in step S2, the constructed survey point epidemiological database also includes five meteorological factors: air temperature, relative humidity, 0cm surface temperature, rainfall, and sunshine hours.
[0010] Furthermore, in step S3, the data 30 days after jointing are weather forecast data, and the prediction factor adopts the time pane method with a length of 10 days and a step size of 1 day to count the meteorological data, and then the AutoFeatureSelect library based on the Python platform is used for feature screening, and the SMOTE library based on the Python platform is used for oversampling.
[0011] Furthermore, in step S4, 20% of the data is selected as test data and 80% as training data during model training. The imported random forest model is a classification model, and the parameters are optimized by the grid search method to find the maximum number of features for the best segmentation.
[0012] Furthermore, the grid search method optimizes the following parameters: "n_estimators": the number of decision trees; "max_depth": the maximum depth of the decision tree; "min_samples_split": the minimum number of samples required for an internal node to split; "min_samples_leaf": the minimum number of samples required for a leaf node; "max_features": when building each decision tree.
[0013] Furthermore, in step S5, the model accuracy is judged by comparing the predicted results of the test set with the actual results using four indicators: accuracy, recall, F1 value, and ROC-AUC value.
[0014] The present invention proposes a method for predicting wheat stem base rot based on random forest, which has the following beneficial effects: the data source of the method for predicting wheat stem base rot based on random forest provided by the present invention is the survey data of multiple disease monitoring points in the Huanghuai wheat region for many years, including meteorological data 60 days after sowing and meteorological data 30 days before and after jointing, with high data accuracy and large data volume. The prediction result of the risk level of wheat stem base rot is given during the jointing period, which has the advantages of wide application range, high prediction accuracy, and early prediction time. At the same time, new data can be added to the database year by year to optimize model parameters and improve model accuracy. It can be widely used in the monitoring and early warning of wheat stem base rot across the country, filling the gap in the field of research on ergot prediction in my country, providing technical support for the comprehensive prevention and control of wheat stem base rot, and ensuring the safe production of wheat. Specifically: 1) The present invention uses wheat stem rot survey data from Henan, Hebei, and Shandong provinces, which are currently the areas where wheat stem rot often occurs in the country. At the same time, the survey period is long and the number of survey points is large, which can well represent the occurrence of wheat stem rot in the Huanghuai wheat region and even the whole country. This makes the model possible to be promoted to other provinces. At the same time, new disease monitoring point data can be continuously added to the database year by year. As the model database continues to expand, the model prediction accuracy will continue to increase.
[0015] 2) The meteorological data used in the present invention covers a relatively long period of time, including 60 days after wheat sowing and 60 days before and after jointing. This covers the main infection stages of the pathogen and is as close as possible to the main damage period of the pathogen, which can better simulate the infection and pathogenic process of the pathogen. At the same time, the model uses epidemiological factors such as the pathogen content in the soil after sowing and the resistance of wheat varieties to stem rot, fully considering the plant disease triangle relationship, so that the model can simulate the disease, crop, and environment throughout the entire process of stem rot, and thus accurately predict the risk of disease occurrence.
[0016] 3) This invention uses time pane, feature factor screening, oversampling and other technologies to build a data-rich model database, and uses the well-researched random forest machine learning model for modeling and prediction, ensuring the prediction accuracy of the model.
[0017] 4) According to the prediction results of the model, the present invention has high prediction accuracy and good stability. It can well predict the binary risk level of wheat stem rot, filling the domestic research gap in the prediction of the occurrence of wheat stem rot, and can provide technical support for the precise prevention and control of wheat stem rot. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings: Figure 1 It is a technical flow chart of the present invention. DETAILED DESCRIPTION
[0019] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention; it is obvious that 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, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0020] Example 1: See also Figure 1 A wheat stem rot prediction method based on random forests specifically comprises the following steps: S1. Establishment of wheat stem rot disease database: Based on the field incidence survey of wheat stem rot in Henan, Hebei and Shandong provinces from 2019 to 2023, a disease database was constructed to establish a wheat stem rot disease database; S2. Establish an epidemiological database of survey sites: An epidemiological database for each disease survey site was established based on meteorological data interpolated from daily datasets of meteorological element observation stations in China, as well as epidemiological factors such as soil pathogen content during the sowing period, wheat variety resistance to stem rot, and wheat growth period. S3. Establishing a training database for the stem base rot model: Based on the actual occurrence patterns and prevention and control needs of wheat stem rot, meteorological data from 60 days after sowing and 30 days before and after jointing, as well as soil pathogen content during the sowing period and wheat variety stem rot resistance, were selected as predictive factors. The meteorological data was organized using time windows, and a stem rot model training database was established through feature screening and oversampling. S4. Random forest training and parameter adjustment: The model data is divided into training set and test set, and the random forest in the sklearn package is called on the Python platform to train and adjust the prediction model; S5. Whether the model evaluation indicators meet the standards: The model is predicted using the test data set, and the model prediction accuracy is judged based on the corresponding indicators of the test set prediction results.
[0021] The database constructed in step S1 includes 147 disease monitoring points in Henan, Hebei and Shandong provinces, and a total of 329 survey data from 2019 to 2023. The data content includes information such as the disease monitoring point number, longitude and latitude, survey time, wheat growing period, field wheat stem base rot plant rate, and white ear rate. The diseased plant rate is set at 1% as the threshold, and the risk level of stem base rot is divided into two categories of data: 0 (low risk) and 1 (high risk), of which 166 are 0 (low risk) and 163 are 1 (high risk).
[0022] The database constructed in step S2 includes five meteorological factors: air temperature, relative humidity, 0cm surface temperature, rainfall, and sunshine hours. The five cumulative factors include mean air temperature (tmean), maximum air temperature (tmax), minimum air temperature (tmin), air temperature difference (trange), mean relative humidity (rhmean), minimum relative humidity (rhmin), mean 0cm surface temperature (stmean), maximum 0cm surface temperature (stmax), minimum 0cm surface temperature (stmin), 0cm surface temperature difference (strange), total rainfall (pcp), and total sunshine hours (dh). The content of soil pathogens in the database during the sowing period is obtained by collecting the surface soil after sowing and performing PCR quantification. The data on wheat variety stem rot resistance comes from the wheat crop fungal disease research team of the Institute of Plant Protection, Chinese Academy of Agricultural Sciences, which identifies the stem rot resistance of varieties participating in the wheat regional trial each year and the main varieties recommended in each region, as shown in Table 1.
[0023] When selecting meteorological data in step S3, it is taken into account that the model can only obtain the actual meteorological data before the model application time node in actual application, but the data after the node can only use weather forecast data. The application time node of the model is the initial stage of jointing. Therefore, weather forecast data is used for the data 30 days after jointing. Due to the excessive amount of meteorological data, the factor uses a time pane method with a length of 10 days and a step size of 1 day to count the meteorological data and then uses the AutoFeatureSelect library based on the Python platform for feature screening. Finally, 32 items are used. The specific parameters and meanings are shown in Table 1. At the same time, considering that the model data volume is small, the SMOTE library based on the Python platform is used for oversampling, and the sample size of class 0 and class 1 is oversampled to 1600 respectively.
[0024] During model training in step S4, 20% of the data is selected as test data and 80% as training data. The imported random forest model is a classification model, and the parameters are optimized using the grid search method. The parameters include "n_estimators": 100, "max_depth": None, "min_samples_split": 2, "min_samples_leaf": 1, and "max_features": 10.
[0025] In step S5, the prediction results of the test set are compared with the actual results, and the accuracy is 97%, the recall rate is 93%, the F1 value is 0.98, and the ROC-AUC value is 0.99. The model accuracy is excellent based on these four indicators.
[0026] Table 1 Variable names and meanings The above description is merely an implementation example of the present invention and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A wheat stem rot prediction method based on random forest, characterized by: The steps include: S1: Based on the field survey of wheat stem rot incidence in the Huanghuai wheat region over the years, a wheat stem rot disease database was established; S2: Based on the meteorological data of each disease survey site obtained by interpolation from the daily dataset of China's meteorological element observation stations, as well as the soil pathogen content during the sowing period, the stem rot resistance of wheat varieties, and the wheat growth period at the disease survey site as epidemiological factors, an epidemiological database of the survey site was established; S3: Based on the actual occurrence patterns and prevention and control needs of wheat stem rot, meteorological data from 60 days after sowing and 30 days before and after jointing, as well as soil pathogen content during the sowing period and wheat variety stem rot resistance, were selected as predictive factors. The meteorological data was organized using time windows, and after feature screening and oversampling, a stem rot model training database was established. S4: Split the model data into training and test sets, and call the random forest in the sklearn package on the Python platform to train and adjust the prediction model; S5: Use the test data set to predict the model, and judge the model prediction accuracy based on the corresponding indicators of the test set prediction results.
2. A wheat stem rot prediction method based on random forest according to claim 1, characterized in that: In step S1, the constructed database includes 147 disease monitoring points in Henan, Hebei and Shandong provinces, and a total of 329 survey data from 2019 to 2023. The data content includes information on disease monitoring point number, longitude and latitude, survey time, wheat growing period, field wheat stem base rot rate, and white ear rate.
3. A wheat stem rot prediction method based on random forest according to claim 2, characterized in that: The diseased plant rate of wheat base rot in the field was set at 1% as the threshold, and the risk level of base rot was classified into two categories of 0 and 1, with 0 representing low risk and 1 representing high risk.
4. A wheat stem rot prediction method based on random forest according to claim 1, characterized in that: In step S2, the soil pathogen content during the sowing period is obtained by collecting the surface soil after sowing and performing quantitative PCR.
5. A wheat stem rot prediction method based on random forest according to claim 1, characterized in that: In step S2, the constructed survey point epidemiological database also includes five meteorological factors: air temperature, relative humidity, 0cm surface temperature, rainfall, and sunshine hours.
6. The method for predicting wheat stem rot based on random forest according to claim 1, characterized in that: In step S3, weather forecast data is used for the data 30 days after jointing. The prediction factor uses a time pane method with a length of 10 days and a step size of 1 day to count the meteorological data, and then the AutoFeatureSelect library based on the Python platform is used for feature screening, and the SMOTE library based on the Python platform is used for oversampling.
7. The method for predicting wheat stem rot based on random forest according to claim 1, characterized in that: In step S4, 20% of the data is selected as test data and 80% as training data during model training. The imported random forest model is a classification model, and the parameters are optimized by the grid search method to find the maximum number of features for the best segmentation.
8. A method for predicting wheat stem rot based on random forest according to claim 7, characterized in that: The grid search optimization parameters include: "n_estimators": the number of decision trees; "max_depth": the maximum depth of the decision tree; "min_samples_split": the minimum number of samples required for an internal node to split; "min_samples_leaf": the minimum number of samples required for a leaf node; "max_features": when building each decision tree.
9. The method for predicting wheat stem rot based on random forest according to claim 1, characterized in that: In step S5, the model accuracy is judged by comparing the predicted results of the test set with the actual results using four indicators: accuracy, recall, F1 value, and ROC-AUC value.
Citation Information
Patent Citations
Method for high-flux identification of ralstonia solanacearum resistance
CN104082055A
Road visibility short-term and temporary prediction method based on ensemble learning
CN111915068A
Wheat scab prediction method based on deep forest algorithm
CN113205205A
Comprehensive prevention and treatment method for wheat basal stem rot
CN114651625A
Wheat scab prediction method based on XGBoost algorithm
CN116028834A