CROP YIELD ESTIMATION METHOD BASED ON DEEP TEMPORAL AND SPATIAL FEATURE COMBINED LEARNING

20220405864 · 2022-12-22

Assignee

Inventors

Cpc classification

International classification

Abstract

A crop yield estimation method based on spatio-temporal deep learning including: obtaining regional historical crop yield data and meteorological data, preprocessing the meteorological data and the yield data to respectively obtain meteorological parameters and a detrended yield as input and output of the crop yield spatio-temporal deep learning model; constructing the spatio-temporal deep learning model for crop yield estimation, and optimizing hyperparameters; and building a training set by taking the meteorological parameters as an input and the detrended yield as output to train the model and obtain parameters of the model; for the crop yield to be estimated, feeding meteorological parameters into the trained model, and obtaining the crop yield estimation result. The model combined temporal and spatial learning to achieve better crop yield estimation accuracy and stability at large spatial scales.

Claims

1. A crop yield estimation method based on spatio-temporal deep learning, comprising the following steps: step 1): a historical crop yield data and a meteorological data of a region are obtained and preprocessed, and the meteorological data is preprocessed to obtain meteorological parameters, the yield data is preprocessed to obtain a detrended yield, the meteorological parameters and the detrended yield are respectively taken as an input data and an output data of a subsequent crop yield spatio-temporal deep learning model; step 2): the crop yield spatio-temporal deep learning model is constructed, and hyperparameters of the model are optimized; step 3): a training set sample is formed by taking the meteorological parameters obtained in step 1) as an input and the detrended yield obtained in step 1) as an output so as to train the crop yield spatio-temporal deep learning model, thereby obtaining parameters of the model by using Adam optimization method combined with backpropagation method training, optimal parameters are obtained after multiple rounds of the training, and then a trained model is obtained; and step 4): the meteorological parameters of a crop yield to be estimated are input into the trained model, and an estimation result is output, thereby obtaining a crop yield estimation result.

2. The crop yield estimation method based on spatio-temporal deep learning according to claim 1, wherein in the step 1), the data preprocessing comprises: a yield-year univariate linear regression equation is constructed according to the historical crop yield data, and detrending is performed to the crop yield data, a residual error obtained by fitting the yield-year univariate linear regression equation is taken as the detrended yield and output by the model as a true value; and the meteorological parameters from planting to maturity of crop in a time sequence is extracted from the historical meteorological data to be subjected to normalization and taken as the input of the model.

3. The crop yield estimation method based on spatio-temporal deep learning according to claim 1, wherein the historical meteorological data specifically comprises a daily highest temperature, a daily lowest temperature and a daily average temperature within a fixed time period and a daily precipitation within the fixed time period.

4. The crop yield estimation method based on spatio-temporal deep learning according to claim 1, wherein in the step 2), the crop yield spatio-temporal deep learning model is mainly composed of an input layer, a long short-term memory neural network layer, an attention neural network layer and a multi-task output layer connected in sequence; in the input layer, the meteorological parameter time sequence during a crop growth period is input, and a min-max normalization process is performed to transform a range of each of the meteorological parameters into [0,1]; the long short-term memory neural network layer is composed of long short-term memory neural units, the meteorological parameter x.sub.t at various moments is input into a corresponding long short-term memory group composed of three of the consecutively connected long short-term memory neural units, first long short-term memory neural unit in the long short-term memory group corresponding to the meteorological parameters x.sub.t at all the moments are transmitted and connected in sequence along a time, and share parameters of a neural network; second long short-term memory neural unit in the long short-term memory group corresponding to the meteorological parameters x.sub.t at all the moments are transmitted and connected in sequence along the time, and share the parameters of the neural network; third long short-term memory neural unit in the long short-term memory group corresponding to the meteorological parameters x.sub.t at all the moments are transmitted and connected in sequence along the time, and share the parameters of the neural network; finally, the meteorological parameters x.sub.t at the various moments are processed by the long short-term memory group to output their respective hidden layer features h.sub.t; the attention neural network layer adopts a fully connected neural network layer, inputs the hidden feature h.sub.t extracted by the long short-term memory neural network layer at the various moments t, outputs an attention value α.sub.t at the various moments, and then adjusts the hidden feature h.sub.t of the entire time sequence according to the attention value α.sub.t, and performs processing according to the following formula to obtain an attention-weighted hidden feature α.sub.th.sub.t, the attention-weighted hidden features of all the time sequences are merged into a feature vector H;
α.sub.t=softmax(W.sub.A*h.sub.t+b.sub.A)
H=α.sub.1h.sub.1+α.sub.2h.sub.2+ . . . +α.sub.th.sub.t in the formula, W.sub.A and b.sub.A respectively represent a learnable weight matrix and a bias vector of the attention neural network layer, and softmax( ) is an activation function; the multi-task output layer outputs the crop yield y in a corresponding geographic region r, and the processing is expressed as follows:
y=W.sub.r*H+b.sub.r in the formula, r represents an index of the corresponding geographic region, and w.sub.r and b.sub.r respectively represent the learnable weight matrix and the bias vector of the multi-task output layer corresponding to the geographic region r, respectively.

5. The crop yield estimation method based on spatio-temporal deep learning according to claim 1, wherein in the step 2), the model hyperparameter optimization comprises the number of layers of the long short-term memory neural network layers, the number of layers of the attention neural network layers, the number of layers of the multi-task output layers and the number of tasks, a hidden feature dimension of the various layers and a learning rate of model training.

6. The crop yield estimation method based on spatio-temporal deep learning according to claim 1, wherein in the step 4), the crop yield of a crop sample is estimated through the output of the model.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

[0032] FIG. 1 is a flowchart for modeling according to a method of the present disclosure.

[0033] FIG. 2 is a schematic diagram of a model structure according to a method of the present disclosure.

[0034] FIG. 3 is a box diagram visually plotting the attention value of the embodiment.

DESCRIPTION OF EMBODIMENTS

[0035] To facilitate better understanding of the present disclosure, the present disclosure will be described in further detail below with reference to the embodiments, but the scope of claims in the present disclosure is not limited to the scope described in the embodiments. The following examples are run on Python software. The present disclosure will be further described below with reference to the accompanying drawings and embodiments.

[0036] This embodiment is applied to quantitative estimation of county-level corn yield. The selected research region is the Corn Belt region in the U.S., which includes county-level data for 11 states: Minnesota (MN), Wisconsin (WI), Michigan (MI), Nebraska (NE), Iowa (IA), Illinois (IL), Indiana (IN), Ohio (OH), Kansas (KS), Missouri (MO) and Kentucky (KY). The data used are county-level corn yield and meteorological data from 1981 to 2016, all from public datasets. The meteorological indicators selected in this embodiment include: Growing Degree Days (GDD), Killing Degree Days (KDD) and the PRCP (accumulated precipitation). The corn yield and meteorological indicators of a county in each year are taken as a sample, and there are a total of 34,403 samples. Classified by years, the samples from 1981-2014 are used as a training set, with a total of 32,778 samples; the samples from 2015-2016 are used as the test set, with a total of 1,625 samples. In all samples, the minimum detrended yield is −7.63 tons/ha, the maximum detrended yield is 4.13 tons/ha, the mean detrended yield is −0.01 tons/ha, and the standard deviation is 1.32 tons/ha.

[0037] As described in the steps shown in FIG. 1, the process of embodiment is as follows:

[0038] 1) The training set data is into the model.

[0039] 2) The hyperparameters of the model are optimized. The structure of the model is shown in FIG. 2, which includes: a three-layer long short-term memory neural network layer, an attention neural network layer and a multi-task output layer. The time sequence of the model is 20 weeks from sowing to maturity of maize. The hidden feature dimension of the three-layer long short-term memory neural network is set to 32. The structure of the attention neural network layer is a single-layer fully connected neural network, which takes the hidden features extracted by the long short-term memory neural network in various time sequences as input, and outputs the attention value of various time sequences. The output attention value is used to quantify the degree of attention of the representation model to various time sequences. The output layers are three region-specific output layers that output the estimated crop yield values of samples in their respective regions. The optimized hyperparameters contained therein include: the number of layers of the long short-term memory network (3 layers) and the hidden feature dimension (32), the number of layers of the attention neural network (1 layer), and the number of layers of the multi-task output layer (1) and the number of tasks (3), and the learning rate is set to 0.00001.

[0040] 3) After the hyperparameters of the model are optimized, all the training set data are used again to train the parameters of the model. The parameters of the model are trained on the training set through the back-propagation algorithm, and the model training iterates until the loss function of the training set converges. There are a total of 15830 epochs of training from initialization to completion of training.

[0041] 4) After the model is trained, the training is terminated, the optimal model is saved, and the effect of the model is tested on the test set. The model accuracy is evaluated based on the RMSE of the predicted and true values of each sample in the test set.

[0042] 5) The conventional LASSO model and the Random Forest model are trained through the training set data, and tested on the test set. The result is that the RMSE of the LASSO model is 1.16 tons/ha, the RMSE of the Random Forest model is 1.07 tons/ha, and the RMSE from the method provided by the present disclosure is 0.87 tons/ha. It can be seen from the comparison that the accuracy of this method is higher than that of the conventional method in crop yield estimation.

[0043] 6) Moreover, by visualizing the attention value α.sub.t calculated by the attention network, a box diagram of the attention value of each state at various moments is illustrated as shown in FIG. 3. It can be learned that the model extracts a feature in the time dimension, and this feature is consistent across states. From the first week to the 20th week, the attention value continues to increase, which means that the model pays more attention to the subsequent moments. This result shows that the embedded attention mechanism can visualize the processing performed on the temporal features by the model and improve the interpretability of the model.