A county-level winter wheat yield estimation analysis method and system based on GNN-LSTM

Combining remote sensing and meteorological data with the GNN-LSTM model solves the problem of time and space correlation in winter wheat yield prediction, achieves efficient and accurate county-level winter wheat yield prediction, and reduces manpower and material costs.

CN117592619BActive Publication Date: 2024-08-30AEROSPACE INFORMATION RES INST CAS
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202311742195.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-18
Publication Date
2024-08-30
Estimated Expiration
2043-12-18

AI Technical Summary

Technical Problem

Existing technologies are difficult to effectively capture complex temporal relationships and spatial correlations in winter wheat yield prediction, and traditional methods consume a lot of manpower and material resources, and may cause errors when masking the area of ​​a single crop.

Method used

The GNN-LSTM-based county winter wheat yield estimation analysis method is used, combined with Sentinel-2 remote sensing images and meteorological data, and through the fusion of graph neural network and long short-term memory network to extract red edge, near-infrared and short-wave infrared band features and meteorological data features to construct Time series and spatial relationship models are used to predict winter wheat yield in counties.

Benefits of technology

It achieves better spatial distribution trend prediction, and the spatial distribution of high and low values ​​is moderate, which improves the spatial effect and accuracy of prediction and reduces human and material costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117592619B
    Figure CN117592619B
Patent Text Reader

Abstract

The present invention proposes a method and system for estimating winter wheat yield in a county based on GNN-LSTM. The method includes: calculating the winter wheat yield data of each county in the study area, and then making a mass production file with labels, and converting it into a county adjacency matrix file; obtaining remote sensing images and meteorological data; selecting input features of the yield estimation analysis model in the remote sensing images and meteorological data; using the input features, the mass production file with labels and the county adjacency matrix file to make a training set and a test set; using the training set to train the yield estimation analysis model and adjust the model parameters; using the test set to predict the winter wheat yield of the county with the trained yield estimation analysis model, and evaluating the training results of the yield estimation analysis model. It can be seen from the scheme proposed by the present invention that the spatial distribution trends of the predicted and true yield values ​​are also roughly the same, the spatial distribution of high and low values ​​is moderate, and the spatial prediction effect is also very good.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of crop yield estimation, and in particular relates to a county winter wheat yield estimation analysis method and system based on GNN-LSTM. Background Art

[0002] The impact of climate change is becoming more and more obvious. In addition to increasing the probability of extreme events, it is also gradually affecting the yield of major crops. As one of the three major grains, estimating winter wheat yield before harvest so as to make early scheduling is of practical significance to maintaining the stability of the agricultural market. It can enable crop insurance stakeholders to estimate losses and compensation in advance, and it is also beneficial for agricultural stakeholders to understand the potential yield before planting, thereby helping them make decisions when dealing with farm and government activities such as machinery leasing, contract signing, price negotiation and logistics planning. Therefore, it is of great significance to estimate wheat yield in advance to reserve more time for agricultural management decisions.

[0003] In traditional crop yield estimation methods, it is necessary to rely on a large amount of field survey data and variables related to crop growth to simulate the crop growth process in order to establish a crop yield estimation model, which is relatively labor-intensive and resource-intensive. With the development of remote sensing technology, more and more remote sensing data are being applied to crop yield estimation. Generally speaking, crop growth is a dynamic and long-term process, and different growth stages have different effects on the final yield. In this process, it is difficult to jointly model complex temporal correlations. Crop yield prediction usually chooses to use multi-temporal images to show temporal correlations. Representative technologies include support vector regression (SVR) and random forest (RF). However, simple machine learning methods cannot capture complex temporal relationships, and more and more deep learning methods are being applied to yield prediction tasks, such as LSTM. In addition, many studies use vegetation indices calculated from raw spectra, which require manual production and computational screening and are not suitable for large-scale yield prediction. To solve this problem, many methods that use deep learning methods to extract raw band features are applied to feature extraction, such as using CNN to screen the bands most relevant to yield.

[0004] In addition, due to the similarities in soil characteristics and weather conditions, there is geospatial correlation between different prediction units. Therefore, in crop yield prediction, exploring the spatiotemporal relationship of multi-temporal remote sensing data is a very challenging problem. In addition to models related to time series, the input of remote sensing images also contains spatial relationships, and each county is not independent and identically distributed. For example, if a county has a good harvest, then the neighboring counties are also likely to have high yields, which violates the independence assumption. Although some statistical methods have been proposed to incorporate spatial correlation into crop yield prediction models, the linear assumptions in these methods, such as geographically weighted regression and multivariate conditional autoregression, can lead to errors in the results.

[0005] Prior art

[0006] In a study called A GNN-RNN Approach for Harnessing Geospatial and Temporal Information: Application to Crop Yield Prediction, meteorological data features (weather, surface, and soil) were used, verified and tested in more than 2,000 counties in 41 states in the continental United States, and a new graph-based framework GNN-RNN was proposed, which integrates geospatial and temporal knowledge into reasoning to estimate corn and soybean yields in the United States, and its model is better than existing models.

[0007] In a study called KSTAGE: A knowledge-guided spatial-temporal attention graph learning network for crop yield prediction, remote sensing and meteorological data were used to propose a new knowledge-guided Temporal Multi-head Attention Algorithm (KTMA). Under the guidance of prior knowledge, the self-attention mechanism was used to automatically generate temporal attention weights, and the location-aware spatial attention graph network that aggregated spatial neighborhood features using geographic spatial knowledge was used for final yield prediction. Experimental results on the county-level yield prediction task in China and the adjacent United States (CONUS) showed that KSTAGE has achieved significant improvements over previous models.

[0008] Existing technology defects

[0009] In the A GNN-RNN Approach for Harnessing Geospatial and Temporal Information: Application to Crop Yield Predictio study, only meteorological characteristics were used, and remote sensing data that can monitor crop growth conditions over a large area were not considered. The use of remote sensing data may provide new ideas for yield estimation in large-scale areas.

[0010] In the KSTAGE: A knowledge-guided spatial-temporal attention graph learning network for crop yield prediction study, MODIS data were used to predict the yield of Chinese winter wheat, corn and CONUS soybeans. However, only remote sensing data were used, and when making single crop area masks, the MCD12Q1 product could not accurately distinguish between winter wheat and corn types, which may cause errors. Summary of the invention

[0011] In order to solve the above technical problems, the present invention proposes a technical solution of a county winter wheat yield estimation analysis method based on GNN-LSTM to solve the above technical problems.

[0012] The first aspect of the present invention discloses a county-level winter wheat yield estimation and analysis method based on GNN-LSTM, wherein GNN-LSTM represents the fusion of graph neural network and long short-term memory network, specifically, GNN represents graph neural network, and LSTM represents long short-term memory network; the method comprises:

[0013] Step S1, calculate the winter wheat yield data of each county in the study area, then make a labeled mass production shp file and convert it into a county adjacency matrix file;

[0014] Step S2, obtaining the original reflectivity data of Sentinel-2 that has not been processed by atmospheric correction, that is, Sentinel-2 remote sensing images and meteorological data including precipitation, temperature and air pressure; wherein Sentinel-2 is the Sentinel-2 satellite;

[0015] Step S3, selecting input features of the yield estimation analysis model based on GNN and LSTM from the Sentinel-2 remote sensing images and meteorological data;

[0016] Step S4, using the input features, the mass production shp file with labels and the county adjacency matrix file to prepare a training set and a test set;

[0017] Step S5: Using the training set to train the GNN and LSTM-based production estimation analysis model and adjust the model parameters;

[0018] Step S6: Use the test set to predict the winter wheat yield in the county using the trained yield estimation analysis model, and evaluate the training results of the yield estimation analysis model.

[0019] According to the method of the first aspect of the present invention, in step S3, the input features selected in the Sentinel-2 remote sensing image include:

[0020] There are 4 bands in total, including two red edge bands, near infrared and short wave infrared, specifically:

[0021] Red-edge 3: central wavelength is 783nm, wavelength is 20nm, and spatial resolution is 20m;

[0022] Red-edge 4: central wavelength is 865nm, wavelength is 20nm, and spatial resolution is 20m;

[0023] Near infrared NIR: central wavelength is 842nm, wavelength is 115nm, and spatial resolution is 10m;

[0024] Shortwave infrared SWIR2: The central wavelength is 2190nm, the wavelength is 180nm, and the spatial resolution is 20m.

[0025] According to the method of the first aspect of the present invention, in step S3, the input features selected in the meteorological data include:

[0026] The average, minimum and maximum temperatures of the air at a height of 2m from the ground, the total precipitation and the surface air pressure.

[0027] According to the method of the first aspect of the present invention, in step S4, the method of using the input features, the mass production shp file with labels and the county adjacency matrix file to prepare the training set and the test set includes:

[0028] The Sentinel-2 remote sensing images and meteorological data are constructed into a time series with each time step being 5 days and containing 50 time steps;

[0029] Selecting input features in the time series, and clipping the selected input features so that each vector unit can obtain 9 feature means of 50 time steps corresponding thereto;

[0030] The training set and the test set are prepared using the 9 feature means of the 50 time steps, the mass-produced shp file with labels, and the county adjacency matrix file.

[0031] According to the method of the first aspect of the present invention, in step S5, the production estimation analysis model based on GNN and LSTM includes:

[0032] The input features of Sentinel-2 remote sensing images and meteorological data are input into their respective LSTM networks, and then the results of the last time step are concat, connected with the output through a fully connected layer to obtain the time series features;

[0033] The time series features are input into the GraghSAGE layer to further extract neighborhood spatial information.

[0034] According to the method of the first aspect of the present invention, in step S5, the model structure of the LSTM network of the input features of the Sentinel-2 remote sensing image and the LSTM network of the input features of the meteorological data are the same, both of which are two-layer LSTM network layers, specifically 128 neurons in the first layer and 256 neurons in the second layer, followed by a fully connected layer, a relu activation function, and finally connected to the output through a fully connected layer.

[0035] According to the method of the first aspect of the present invention, in step S5, the GraghSAGE layer is a two-layer GraghSAGE network, each layer of the GraghSAGE network adopts a "mean" aggregation method, and the dropout value is set to 0.1.

[0036] The second aspect of the present invention discloses a county-level winter wheat yield estimation and analysis system based on GNN-LSTM, the system comprising:

[0037] The first processing module is configured to calculate the winter wheat yield data of each county in the study area, and then make a labeled mass production shp file and convert it into a county adjacency matrix file;

[0038] The second processing module is configured to obtain the original reflectance data of Sentinel-2 that has not been processed by atmospheric correction, that is, the Sentinel-2 remote sensing image and meteorological data including precipitation, temperature and air pressure;

[0039] The third processing module is configured to select input features of the yield estimation analysis model based on GNN and LSTM from the Sentinel-2 remote sensing image and meteorological data;

[0040] The fourth processing module is configured to use the input features, the mass production shp file with labels and the county adjacency matrix file to prepare a training set and a test set;

[0041] A fifth processing module is configured to use the training set to train and adjust the model parameters of the production estimation analysis model based on GNN and LSTM;

[0042] The sixth processing module is configured to use the test set to predict the winter wheat yield in the county using the trained yield estimation analysis model, and to evaluate the training results of the yield estimation analysis model.

[0043] The third aspect of the present invention discloses an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps in any one of the GNN-LSTM-based county winter wheat yield estimation analysis methods in the first aspect of the present disclosure are implemented.

[0044] The fourth aspect of the present invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any one of the GNN-LSTM-based county winter wheat yield estimation analysis methods in the first aspect of the present disclosure are implemented.

[0045] In summary, the solution proposed in the present invention can show that the spatial distribution trends of the predicted and actual output values ​​are roughly the same, the spatial distribution of high and low values ​​is moderate, and the spatial prediction effect is also very good. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0047] Figure 1 It is a flow chart of a method for estimating winter wheat yield in a county based on GNN-LSTM according to an embodiment of the present invention;

[0048] Figure 2 It is a structural diagram of a production estimation analysis model based on GNN and LSTM according to an embodiment of the present invention;

[0049] Figure 3 It is a scatter plot of the actual value and predicted value of LSTM and GNN-LSTM according to an embodiment of the present invention;

[0050] Figure 4 A distribution diagram of the actual output value and the predicted output value of the GNN-LSTM according to an embodiment of the present invention;

[0051] Figure 5 This is a structural diagram of a county-level winter wheat yield estimation and analysis system based on GNN-LSTM according to an embodiment of the present invention;

[0052] Figure 6 The figure is a structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of 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.

[0054] The first aspect of the present invention discloses a county winter wheat yield estimation analysis method based on GNN-LSTM. Figure 1 FIG. 4 is a flow chart of a method for estimating winter wheat yield in a county based on GNN-LSTM according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0055] Step S1, calculate the winter wheat yield data of each county in the study area, then make a labeled mass production shp file and convert it into a county adjacency matrix file;

[0056] Step S2, obtaining the original reflectivity data of Sentinel-2 that has not been processed by atmospheric correction, that is, Sentinel-2 remote sensing images and meteorological data including precipitation, temperature and air pressure; wherein Sentinel-2 is the Sentinel-2 satellite;

[0057] Step S3, selecting input features of the yield estimation analysis model based on GNN and LSTM from the Sentinel-2 remote sensing images and meteorological data;

[0058] Step S4, using the input features, the mass production shp file with labels and the county adjacency matrix file to prepare a training set and a test set;

[0059] Step S5: Using the training set to train the GNN and LSTM-based production estimation analysis model and adjust the model parameters;

[0060] Step S6: Use the test set to predict the winter wheat yield in the county using the trained yield estimation analysis model, and evaluate the training results of the yield estimation analysis model.

[0061] In step S1, the winter wheat yield data of each county in the study area is calculated, and then a labeled mass production shp file is made and converted into a county adjacency matrix file.

[0062] Specifically, the study area selected eight provinces that mainly grow winter wheat, namely Henan, Hebei, Shandong, Anhui, Hubei, Shanxi, Shaanxi, and Jiangsu provinces. The winter wheat yield data of each county was counted on the official website of the municipal statistics bureau. The data for the four years from 2016 to 2020 were counted, and the yield label of each year was attached to the corresponding year county.shp in ArcGIS to prepare for the next step of extracting corresponding features.

[0063] In addition, you can use the spatial joins tool in ArcGIS, select one_to_many as the connection method, and open the attribute table after running to get the sparse adjacency matrix of the graph. Sparse adjacency matrices are applicable in most graph neural networks, but further conversion is required in the model. You can use the to_numpy_matrix() function of networks in Python to convert it to an adjacency matrix to prepare for GNN network training.

[0064] In step S2, the original reflectivity data of Sentinel-2 without atmospheric correction processing is obtained, that is, the Sentinel-2 remote sensing image and the meteorological data including precipitation, temperature and air pressure.

[0065] Specifically, Sentinel-2 remote sensing images and meteorological data were obtained on Google Earth Engine (GEE), using Sentinel-2 1C-level data, which was called by the ee.ImageCollection('COPERNICUS / S2') command. Here, the original reflectivity data of Sentinel-2 without atmospheric correction was used. The meteorological data used was ERA5, and the monthly / daily meteorological data of ERA5 on the GEE platform was used. A total of five features were used, including precipitation, temperature and air pressure, including mean_2m_air_temperature, max_2m_air_temperature, min_2m_air_temperature, surface_pressure and total_precipitation. The feature data of the four years from 2016 to 2020 were used in the growth range from October of the first year of wheat sowing to June of the second year of harvest.

[0066] In step S3, input features of the yield estimation analysis model based on GNN and LSTM are selected from the Sentinel-2 remote sensing images and meteorological data.

[0067] In some embodiments, in step S3, the input features selected in the Sentinel-2 remote sensing image include:

[0068] There are 4 bands in total, including two red edge bands, near infrared and short wave infrared, specifically:

[0069] Red-edge 3: central wavelength is 783nm, wavelength is 20nm, and spatial resolution is 20m;

[0070] Red-edge 4: central wavelength is 865nm, wavelength is 20nm, and spatial resolution is 20m;

[0071] Near infrared NIR: central wavelength is 842nm, wavelength is 115nm, and spatial resolution is 10m;

[0072] Shortwave infrared SWIR2: The central wavelength is 2190nm, the wavelength is 180nm, and the spatial resolution is 20m.

[0073] The input features selected in the meteorological data include:

[0074] The average, minimum and maximum temperatures of the air at a height of 2m from the ground, the total precipitation and the surface air pressure.

[0075] Specifically, the bands of the Sentinel data are directly used as the features of yield inversion. Here, the bands are first screened, and the measured yield data in a small area (Xiaotangshan Precision Agriculture Base) and the results of the deep learning model screening bands are used as prior knowledge. Six phases of hyperspectral images were used for experiments, and four common bands with the highest importance in each phase were obtained. With this as a guide, for Sentinel-2 data, wide bands containing these four narrow bands of hyperspectral are selected as band features, namely B7 (RED EDGE3), B8 (NIR), B8A (RED EDGE4), and B12 (SWIR). In this research patent, 4 bands, including 2 red edge bands, near infrared, and short-wave infrared, were selected as features as shown in Table 1.

[0076] Table 1 Brief introduction of the bands used by Sentinel-2

[0077]

[0078] Five meteorological characteristics were selected, namely, the air temperature at 2 m above the ground (including average, minimum and maximum temperatures), total precipitation and surface pressure, as shown in Table 2. Temperature and precipitation are closely related to crop growth and dry matter accumulation, and surface pressure can indirectly reflect some meteorological disasters such as drought and flood.

[0079] Table 2 Brief introduction of meteorological data

[0080]

[0081] A total of 9 remote sensing and meteorological features were selected, and the calculated raster images were clipped using the vector range boundary of the county yield through the .reduceRegion operation for feature extraction. It should be noted that the winter wheat area product extracted by Peng Dailiang's team at the Chinese Academy of Sciences was used to mask the features. After obtaining the raster area with all winter wheat pixels, the mean pixel value of each county was taken as the feature of the county.

[0082] In step S4, the input features, the mass-produced shp file with labels and the county adjacency matrix file are used to create a training set and a test set.

[0083] In some embodiments, in step S4, the method of using the input features, the mass-produced shp file with labels and the county adjacency matrix file to prepare the training set and the test set includes:

[0084] The Sentinel-2 remote sensing images and meteorological data are constructed into a time series with each time step being 5 days and containing 50 time steps;

[0085] Selecting input features in the time series, and clipping the selected input features so that each vector unit can obtain 9 feature means of 50 time steps corresponding thereto;

[0086] The training set and the test set are prepared using the 9 feature means of the 50 time steps, the mass-produced shp file with labels, and the county adjacency matrix file.

[0087] Specifically, winter wheat is planted from October to June of the following year, a total of 250 days. A time series of T = 5 days is constructed, and the starting time is set by .filterDate to calculate the images of the required month. For each county that grows winter wheat, the mean of several images within the time range will be calculated in each time step, and finally a time series of 50 time steps with each time step of 5 days is obtained. In GEE, the pre-screened bands or meteorological features are selected through the select function, and the features are cropped using the county vector file (the corresponding yield value has been attached) through the .reduceRegion operation. According to this operation, each vector unit can obtain the 9 feature means of the corresponding 50 time steps.

[0088] When making the shp file, there is identification information such as the county number and output. After calculating the features and putting them into the attribute table through .set, the feature values ​​calculated for each county (with the county's output and number paired) can be directly downloaded from the csv table through the Export.table.toDrive operation. The output is the corresponding label during training. The remote sensing and meteorological data calculated and downloaded on GEE are the features of the model training, preparing for the next step of dividing the training set and test set.

[0089] In step S5, the training set is used to train and adjust the parameters of the production estimation analysis model based on GNN and LSTM.

[0090] In some embodiments, in step S5, the production estimation analysis model based on GNN and LSTM includes:

[0091] like Figure 2 As shown in the figure, the input features of Sentinel-2 remote sensing images and the input features of meteorological data are input into their respective LSTM networks, and then the results of the last time step are concat, connected with the output through a fully connected layer to obtain the time series features;

[0092] The time series features are input into the GraghSAGE layer to further extract neighborhood spatial information.

[0093] The model structure of the LSTM network for the input features of Sentinel-2 remote sensing images and the LSTM network for the input features of meteorological data is the same, both of which are two-layer LSTM network layers, specifically 128 neurons in the first layer and 256 neurons in the second layer, followed by a fully connected layer, a relu activation function, and finally a fully connected layer connected to the output.

[0094] The GraghSAGE layer is a two-layer GraghSAGE network, each layer of the GraghSAGE network adopts the "mean" aggregation method, and the dropout value is set to 0.1.

[0095] Specifically, GraphSAGE is an important framework in graph neural networks that exploits node feature information and learns node embeddings by aggregating from the local neighborhood of the node. GraphSAGE is suitable for crop yield prediction because most counties only border a few counties and have sparse adjacency matrices.

[0096] Model training: Input the tabular data containing features and labels and the sorted adjacency matrix into the network, use the data from 2016, 2017 and 2018 for training, and the data from 2019 for testing, to obtain train_data, train_label, val_data and val_label, which are used for model training and verification respectively.

[0097] Model parameter adjustment: There are three parameters in the experiment that are most relevant to the quality of model training, namely learning rate, epoch, and batch size. The grid search method was used to find the best parameters. It was finally found that the parameter combination of learning rate LR = 0.0001, epoch = 200, and batch size = 128 can achieve the best training results.

[0098] In step S6, the test set is used to predict the winter wheat yield in the county using the trained yield estimation analysis model, and the training results of the yield estimation analysis model are evaluated.

[0099] Specifically, in order to have a more comprehensive evaluation of the experimental results, the correlation coefficient (Corr), root mean square error (RMSE), and coefficient of determination (R 2 ) The optimal model has the largest R 2 , Corr and minimum RMSE. The model prediction result is used as the test value, the corresponding actual output is the true value, and the r2_score, mean_squared_error and corrcoef of numpy are called in python to calculate, and three accuracy evaluations of model prediction can be obtained, as shown below.

[0100] Root mean square error RMSE represents the sample standard deviation of the difference between the predicted value and the observed value (called residual). The root mean square error is used to illustrate the degree of dispersion of the sample and is a nonlinear fit. The smaller the RMSE, the smaller the error, and the higher the accuracy of the obtained model. The specific calculation formula is as follows:

[0101]

[0102] y i represents the true value of output, h(x i ) represents the output value predicted by the model, X represents the input model characteristics, h represents the output estimation analysis model, and m is the number of samples.

[0103] Coefficient of determination R2 Also known as goodness of fit, it is the square of the correlation coefficient. It means that the variation of the dependent variable can be explained by the variation of the independent variable, and the size of the determination coefficient determines the closeness of the correlation. The greater the goodness of fit, the higher the degree of explanation of the independent variable to the dependent variable, and the higher the percentage of the change caused by the independent variable in the total change. The range of the determination coefficient value is generally between 0 and 1, and it is generally used to evaluate the model fitting regression effect. The closer the determination coefficient value is to 1, the better the fitting regression effect. The specific calculation formula is as follows:

[0104]

[0105] Represents the average value of actual production.

[0106] The correlation coefficient Corr is also called the association coefficient. The Pearson correlation coefficient (Corr) measures the strength of the linear correlation between the true value and the predicted value. It takes a value between -1 and 1. It is essentially a standardized measure of the covariance between two sets of data.

[0107]

[0108] is the mean of the output values ​​predicted by the model.

[0109] Example

[0110] We conducted two groups of experimental areas and compared the effects of adding and not adding the GNN layer. We found that adding the GNN layer can aggregate the features of the surrounding counties. Our three accuracy indicators all showed that, as shown in Table 3, the accuracy was improved after adding the GNN, R2 and Corr were improved, and RMSE was reduced. Figure 3 , we can see that the scatter point fitting straight line of the model with GNN is closer to the 1:1 line, indicating that the scatter point fitting result is better, and the difference between the output predicted by the model and the true value is smaller after adding GNN. Figure 4 , we can see that the spatial distribution trends of the predicted and actual yield values ​​are roughly the same, the spatial distribution of high and low values ​​is moderate, and the spatial prediction effect is also very good.

[0111] Table 3 Comparison of the accuracy results of the two models

[0112]

[0113] The second aspect of the present invention discloses a county winter wheat yield estimation and analysis system based on GNN-LSTM. Figure 5 : is a structural diagram of a county winter wheat yield estimation and analysis system based on GNN-LSTM according to an embodiment of the present invention; Figure 5 As shown, the system 100 includes:

[0114] The first processing module 101 is configured to calculate the winter wheat yield data of each county in the study area, and then make a mass production shp file with labels and convert it into a county adjacency matrix file;

[0115] The second processing module 102 is configured to obtain the original reflectivity data of Sentinel-2 that has not been processed by atmospheric correction, that is, the Sentinel-2 remote sensing image and the meteorological data including precipitation, temperature and air pressure;

[0116] The third processing module 103 is configured to select input features of the yield estimation analysis model based on GNN and LSTM from the Sentinel-2 remote sensing image and meteorological data;

[0117] The fourth processing module 104 is configured to use the input features, the mass production shp file with labels and the county adjacency matrix file to prepare a training set and a test set;

[0118] The fifth processing module 105 is configured to use the training set to train and adjust the model parameters of the production estimation analysis model based on GNN and LSTM;

[0119] The sixth processing module 106 is configured to use the test set to predict the winter wheat yield of the county using the trained yield estimation analysis model, and to evaluate the training results of the yield estimation analysis model.

[0120] According to the system of the second aspect of the present invention, the first processing module 101 is specifically configured as follows: the study area selected eight provinces that mainly grow winter wheat, namely Henan, Hebei, Shandong, Anhui, Hubei, Shanxi, Shaanxi, and Jiangsu provinces, and the winter wheat yield data of each county were counted on the official website of the municipal statistics bureau. The data for the four years from 2016 to 2020 were counted, and the yield label of each year was attached to the corresponding year county.shp in ArcGIS to prepare for the next step of extracting corresponding features.

[0121] In addition, you can use the spatial joins tool in ArcGIS, select one_to_many as the connection method, and open the attribute table after running to get the sparse adjacency matrix of the graph. Sparse adjacency matrices are applicable in most graph neural networks, but further conversion is required in the model. You can use the to_numpy_matrix() function of networks in Python to convert it to an adjacency matrix to prepare for GNN network training.

[0122] According to the system of the second aspect of the present invention, the second processing module 102 is specifically configured as follows: Sentinel-2 remote sensing images and meteorological data are obtained on Google Earth Engine (GEE), using Sentinel-2 1C-level data, called by the ee.ImageCollection('COPERNICUS / S2') command, and the original reflectivity data of Sentinel-2 without atmospheric correction is used here. The meteorological data uses ERA5, and the ERA5 monthly / daily meteorological data on the GEE platform is used. A total of five features, mean_2m_air_temperature, max_2m_air_temperature, min_2m_air_temperature, surface_pressure, and total_precipitation, are used, including precipitation, temperature, and air pressure. A total of four years from 2016 to 2020 were used in the growth interval from October of the first year of wheat sowing to June of the second year of harvest.

[0123] According to the system of the second aspect of the present invention, the third processing module 103 is specifically configured to select the input features in the Sentinel-2 remote sensing image including:

[0124] There are 4 bands in total, including two red edge bands, near infrared and short wave infrared, specifically:

[0125] Red-edge 3: central wavelength is 783nm, wavelength is 20nm, and spatial resolution is 20m;

[0126] Red-edge 4: central wavelength is 865nm, wavelength is 20nm, and spatial resolution is 20m;

[0127] Near infrared NIR: central wavelength is 842nm, wavelength is 115nm, and spatial resolution is 10m;

[0128] Shortwave infrared SWIR2: The central wavelength is 2190nm, the wavelength is 180nm, and the spatial resolution is 20m.

[0129] The input features selected in the meteorological data include:

[0130] The average, minimum and maximum temperatures of the air at a height of 2m from the ground, the total precipitation and the surface air pressure.

[0131] Specifically, the bands of the Sentinel data are directly used as the features of yield inversion. Here, the bands are first screened, and the measured yield data in a small area (Xiaotangshan Precision Agriculture Base) and the results of the deep learning model screening bands are used as prior knowledge. Six phases of hyperspectral images were used for experiments, and four common bands with the highest importance in each phase were obtained. With this as a guide, for Sentinel-2 data, wide bands containing these four narrow bands of hyperspectral are selected as band features, namely B7 (RED EDGE3), B8 (NIR), B8A (RED EDGE4), and B12 (SWIR). In this research patent, 4 bands, including 2 red edge bands, near infrared, and short-wave infrared, were selected as features as shown in Table 1.

[0132] Table 1 Brief introduction of the bands used by Sentinel-2

[0133]

[0134] Five meteorological characteristics were selected, namely, the air temperature at 2 m above the ground (including average, minimum and maximum temperatures), total precipitation and surface pressure, as shown in Table 2. Temperature and precipitation are closely related to crop growth and dry matter accumulation, and surface pressure can indirectly reflect some meteorological disasters such as drought and flood.

[0135] Table 2 Brief introduction of meteorological data

[0136]

[0137]

[0138] A total of 9 remote sensing and meteorological features were selected, and the calculated raster images were clipped using the vector range boundary of the county yield through the .reduceRegion operation for feature extraction. It should be noted that the winter wheat area product extracted by Peng Dailiang's team at the Chinese Academy of Sciences was used to mask the features. After obtaining the raster area with all winter wheat pixels, the mean pixel value of each county was taken as the feature of the county.

[0139] According to the system of the second aspect of the present invention, the fourth processing module 104 is specifically configured as follows: the method of applying the input features, the mass production shp file with labels and the county adjacency matrix file to prepare the training set and the test set includes:

[0140] The Sentinel-2 remote sensing images and meteorological data are constructed into a time series with each time step being 5 days and containing 50 time steps;

[0141] Selecting input features in the time series, and clipping the selected input features so that each vector unit can obtain 9 feature means of 50 time steps corresponding thereto;

[0142] The training set and the test set are prepared using the 9 feature means of the 50 time steps, the mass-produced shp file with labels, and the county adjacency matrix file.

[0143] Specifically, winter wheat is planted from October to June of the following year, a total of 250 days. A time series of T = 5 days is constructed, and the starting time is set by .filterDate to calculate the images of the required month. For each county that grows winter wheat, the mean of several images within the time range will be calculated in each time step, and finally a time series of 50 time steps with each time step of 5 days is obtained. In GEE, the pre-screened bands or meteorological features are selected through the select function, and the features are cropped using the county vector file (the corresponding yield value has been attached) through the .reduceRegion operation. According to this operation, each vector unit can obtain the 9 feature means of the corresponding 50 time steps.

[0144] When making the shp file, there is identification information such as the county number and output. After calculating the features and putting them into the attribute table through .set, the feature values ​​calculated for each county (with the county's output and number paired) can be directly downloaded from the csv table through the Export.table.toDrive operation. The output is the corresponding label during training. The remote sensing and meteorological data calculated and downloaded on GEE are the features of the model training, preparing for the next step of dividing the training set and test set.

[0145] According to the system of the second aspect of the present invention, the fifth processing module 105 is specifically configured as follows: the production estimation analysis model based on GNN and LSTM includes:

[0146] like Figure 2 As shown in the figure, the input features of Sentinel-2 remote sensing images and the input features of meteorological data are input into their respective LSTM networks, and then the results of the last time step are concat, connected with the output through a fully connected layer to obtain the time series features;

[0147] The time series features are input into the GraghSAGE layer to further extract neighborhood spatial information.

[0148] The model structure of the LSTM network for the input features of Sentinel-2 remote sensing images and the LSTM network for the input features of meteorological data is the same, both of which are two-layer LSTM network layers, specifically 128 neurons in the first layer and 256 neurons in the second layer, followed by a fully connected layer, a relu activation function, and finally a fully connected layer connected to the output.

[0149] The GraghSAGE layer is a two-layer GraghSAGE network, each layer of the GraghSAGE network adopts the "mean" aggregation method, and the dropout value is set to 0.1.

[0150] Specifically, GraphSAGE is an important framework in graph neural networks that exploits node feature information and learns node embeddings by aggregating from the local neighborhood of the node. GraphSAGE is suitable for crop yield prediction because most counties only border a few counties and have sparse adjacency matrices.

[0151] Model training: Input the tabular data containing features and labels and the sorted adjacency matrix into the network, use the data from 2016, 2017 and 2018 for training, and the data from 2019 for testing, to obtain train_data, train_label, val_data and val_label, which are used for model training and verification respectively.

[0152] Model parameter adjustment: There are three parameters in the experiment that are most relevant to the quality of model training, namely learning rate, epoch, and batch size. The grid search method was used to find the best parameters. It was finally found that the parameter combination of learning rate LR = 0.0001, epoch = 200, and batch size = 128 can achieve the best training results.

[0153] According to the system of the second aspect of the present invention, the sixth processing module 106 is specifically configured to use the correlation coefficient (Corr), root mean square error (RMSE), coefficient of determination (R) for a more comprehensive evaluation of the experimental results. 2 ) The optimal model has the largest R 2, Corr and minimum RMSE. The model prediction result is used as the test value, the corresponding actual output is the true value, and the r2_score, mean_squared_error and corrcoef of numpy are called in python to calculate, and three accuracy evaluations of model prediction can be obtained, as shown below.

[0154] Root mean square error RMSE represents the sample standard deviation of the difference between the predicted value and the observed value (called residual). The root mean square error is used to illustrate the degree of dispersion of the sample and is a nonlinear fit. The smaller the RMSE, the smaller the error, and the higher the accuracy of the obtained model. The specific calculation formula is as follows:

[0155]

[0156] y i represents the true value of output, h(x i ) represents the output value predicted by the model, X represents the input model characteristics, h represents the output estimation analysis model, and m is the number of samples.

[0157] Coefficient of determination R 2 Also known as goodness of fit, it is the square of the correlation coefficient. It means that the variation of the dependent variable can be explained by the variation of the independent variable, and the size of the determination coefficient determines the closeness of the correlation. The greater the goodness of fit, the higher the degree of explanation of the independent variable to the dependent variable, and the higher the percentage of the change caused by the independent variable in the total change. The range of the determination coefficient value is generally between 0 and 1, and it is generally used to evaluate the model fitting regression effect. The closer the determination coefficient value is to 1, the better the fitting regression effect. The specific calculation formula is as follows:

[0158]

[0159] Represents the average value of actual production.

[0160] The correlation coefficient Corr is also called the association coefficient. The Pearson correlation coefficient (Corr) measures the strength of the linear correlation between the true value and the predicted value. It takes a value between -1 and 1. It is essentially a standardized measure of the covariance between two sets of data.

[0161]

[0162] is the mean of the output values ​​predicted by the model.

[0163] The third aspect of the present invention discloses an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps in any one of the methods for estimating winter wheat yield in a county based on GNN-LSTM in the first aspect of the present invention are implemented.

[0164] Figure 6 is a structural diagram of an electronic device according to an embodiment of the present invention, such as Figure 6 As shown, the electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, near field communication (NFC) or other technologies. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covered on the display screen, or a button, a trackball or a touch pad set on the housing of the electronic device, or an external keyboard, touch pad or mouse, etc.

[0165] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a structural diagram of the part related to the technical solution of the present disclosure, and does not constitute a limitation on the electronic device to which the technical solution of the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0166] The fourth aspect of the present invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the methods for estimating winter wheat yield in a county based on GNN-LSTM in the first aspect of the present invention are implemented.

[0167] Please note that the technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification. The above embodiments only express several implementation methods of the present application, and their descriptions are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, without departing from the concept of the present application, several variations and improvements can be made, which all belong to the scope of protection of the present application. Therefore, the scope of protection of the patent in this application shall be based on the attached claims.

Claims

1. A county-level winter wheat yield estimation analysis method based on GNN-LSTM, characterized in that: The method comprises: Step S1, calculate the winter wheat yield data of each county in the study area, then make a labeled mass production shp file and convert it into a county adjacency matrix file; Step S2, obtaining the original reflectivity data of Sentinel-2 that has not been processed by atmospheric correction, that is, Sentinel-2 remote sensing images and meteorological data including precipitation, temperature and air pressure; Step S3, selecting input features of the yield estimation analysis model based on GNN and LSTM from the Sentinel-2 remote sensing images and meteorological data; Step S4, using the input features, the mass production shp file with labels and the county adjacency matrix file to prepare a training set and a test set; Step S5: Using the training set to train the GNN and LSTM-based production estimation analysis model and adjust the model parameters; Step S6: using the test set to predict the winter wheat yield in the county using the trained yield estimation analysis model, and evaluating the training results of the yield estimation analysis model; GNN-LSTM represents the fusion of graph neural network and long short-term memory network; In the step S3, the input features selected in the Sentinel-2 remote sensing image include: There are 4 bands in total, including two red edge bands, near infrared and short wave infrared, specifically: Red-edge 3: central wavelength is 783nm, wavelength is 20nm, and spatial resolution is 20m; Red-edge 4: central wavelength is 865nm, wavelength is 20nm, and spatial resolution is 20m; Near infrared NIR: central wavelength is 842nm, wavelength is 115nm, and spatial resolution is 10m; Short-wave infrared SWIR2: central wavelength is 2190nm, wavelength is 180nm, and spatial resolution is 20m; In step S3, the input features selected in the meteorological data include: The average, minimum and maximum air temperatures at 2m above the ground, the total precipitation and the surface air pressure; In step S4, the method of using the input features, the mass-produced shp file with labels and the county adjacency matrix file to prepare the training set and the test set includes: The Sentinel-2 remote sensing images and meteorological data are constructed into a time series with each time step being 5 days and containing 50 time steps; Selecting input features in the time series, and clipping the selected input features so that each vector unit can obtain 9 feature means of 50 time steps corresponding thereto; The training set and the test set are prepared by using the 9 feature means of the 50 time steps, the mass production shp file with labels and the county adjacency matrix file; In step S5, the production estimation analysis model based on GNN and LSTM includes: The input features of Sentinel-2 remote sensing images and meteorological data are input into their respective LSTM networks, and then the results of the last time step are concat, connected with the output through a fully connected layer to obtain the time series features; Input the time series features into the GraghSAGE layer to further extract neighborhood spatial information; In step S5, the model structure of the LSTM network of the input features of the Sentinel-2 remote sensing image and the LSTM network of the input features of the meteorological data is the same, both of which are two-layer LSTM network layers, specifically 128 neurons in the first layer and 256 neurons in the second layer, followed by a fully connected layer, a relu activation function, and finally a fully connected layer and the output are connected; In step S5, the GraghSAGE layer is a two-layer GraghSAGE network, each layer of the GraghSAGE network adopts the "mean" aggregation method, and the dropout value is set to 0.

1.

2. A county-level winter wheat yield estimation and analysis system based on GNN-LSTM, the system adopts the method of claim 1, characterized in that: The system comprises: The first processing module is configured to calculate the winter wheat yield data of each county in the study area, and then make a labeled mass production shp file and convert it into a county adjacency matrix file; The second processing module is configured to obtain the original reflectance data of Sentinel-2 that has not been processed by atmospheric correction, that is, the Sentinel-2 remote sensing image and meteorological data including precipitation, temperature and air pressure; The third processing module is configured to select input features of the yield estimation analysis model based on GNN and LSTM from the Sentinel-2 remote sensing image and meteorological data; The fourth processing module is configured to use the input features, the mass production shp file with labels and the county adjacency matrix file to prepare a training set and a test set; A fifth processing module is configured to use the training set to train and adjust the model parameters of the production estimation analysis model based on GNN and LSTM; The sixth processing module is configured to use the test set to predict the winter wheat yield in the county using the trained yield estimation analysis model, and to evaluate the training results of the yield estimation analysis model.

3. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps in the county winter wheat yield estimation and analysis method based on GNN-LSTM described in claim 1 are implemented.

4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps in the county winter wheat yield estimation analysis method based on GNN-LSTM described in claim 1 are implemented.

Citation Information

Patent Citations

  • County-scale crop yield estimation method based on CNN-LSTM

    CN110728446A

  • Network traffic prediction method based on combination of GNN-LSTM

    CN112906982A

  • PM2.5 concentration long-term prediction method based on deep mixed graph neural network

    CN115438848A

  • Winter wheat yield estimation analysis method and system based on long short-term memory network

    CN115578637A

  • Multivariable time sequence prediction method and device based on graph neural network

    CN115906954A