Large-scale crop water requirement forecasting method based on spatiotemporal fusion model under physical constraints
By using a space-time fusion model under physical constraints in the prediction of crop water demand, combining multi-layer perceptron, graph convolution network and Informer model, the problem of inaccurate prediction in the existing technology is solved, and higher accuracy and reliability are achieved sex.
Patent Information
- Application Number
- CN202411429222.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-14
AI Technical Summary
In the prior art, the method for predicting crop water demand is difficult to consider comprehensively, resulting in inaccurate prediction.
Using the space-time fusion model under physical constraints, by obtaining multi-source data (meteorological, soil, crop data), using one-dimensional convolution and multi-layer perceptron for encoding and fusion, combining graph convolution networks and Informer models for space and timing Feature extraction, and finally trained under the constraints of WOFOST physical model.
It improves the accuracy and reliability of crop water demand prediction, can more effectively capture the interaction relationship between data on different site and the temporal trend of historical data, and enhances the generalization ability of the model in different regions.
Smart Images

Figure CN118966569B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of crop water requirement prediction, and in particular to a large-scale crop water requirement prediction method using a spatiotemporal fusion model under physical constraints. Background Art
[0002] Crop water requirement prediction is an important research direction in the agricultural field. It predicts the amount of water needed for crop growth through scientific methods, which helps to arrange irrigation and increase crop yields. As global climate change becomes increasingly significant, fluctuations in temperature and rainfall are also increasing, which has an impact on the water demand for crop growth. Therefore, accurate prediction of crop water requirement is crucial to the sustainability and stability of agricultural production.
[0003] The crop water requirement calculation methods in related technologies are mostly based on empirical formula fitting, but crop water requirement is affected by many factors, such as weather, soil, crops, irrigation and other factors. There are complex interactions and dynamic changes among them, and the crop water requirement prediction methods in related technologies are difficult to consider comprehensively, resulting in inaccurate predictions. Summary of the invention
[0004] The present invention provides a large-scale crop water requirement forecasting method based on a spatiotemporal fusion model under physical constraints, which is used to solve the defect of inaccurate prediction in the crop water requirement forecasting method in the prior art and improve the accuracy and reliability of crop water requirement forecasting.
[0005] The present invention provides a method for predicting large-scale crop water demand using a spatiotemporal fusion model under physical constraints, comprising the following steps: obtaining multi-source data at a starting time and multi-source data at at least one sampling interval, wherein the multi-source data includes meteorological data, soil data, and crop data; encoding and fusing the multi-source data at the starting time and the multi-source data at at least one sampling interval through one-dimensional convolution and multi-layer perceptron to obtain a comprehensive feature expression, wherein the comprehensive feature expression includes meteorological features at each time, soil features at each time, and crop features at each time; inputting the comprehensive feature expression into a trained spatiotemporal feature fusion model to obtain a crop water demand prediction result at a target time output by the trained spatiotemporal feature fusion model, wherein the spatiotemporal feature fusion model includes a graph convolutional network model and an informer model; the graph convolutional network model is used to extract spatial features from the comprehensive feature expression, and the informer model is used to extract temporal features from the comprehensive feature expression.
[0006] According to a method for forecasting large-scale crop water demand using a spatiotemporal fusion model under physical constraints provided by the present invention, after obtaining multi-source data at a starting time and multi-source data at at least one sampling interval, the method further includes: inputting the multi-source data in a table form, and performing time alignment on the multi-source data to obtain multi-source data in a unified format; removing outliers from meteorological data in the multi-source data in the unified format based on a sliding window box plot to obtain cleaned meteorological data; removing outliers from soil data in the multi-source data in the unified format based on Mahalanobis distance to obtain cleaned soil data; removing outliers from crop data in the multi-source data in the unified format based on a preset value range to obtain cleaned crop data; using the cleaned meteorological data, the cleaned soil data, and the cleaned crop data as cleaned multi-source data; performing K-nearest neighbor interpolation on missing values of the spatial position of the cleaned multi-source data, and performing linear interpolation on missing values of the temporal position of the cleaned multi-source data to obtain filled multi-source data; and normalizing the filled multi-source data based on maximum and minimum normalization to obtain preprocessed multi-source data.
[0007] According to a method for forecasting large-scale crop water demand using a spatiotemporal fusion model under physical constraints provided by the present invention, the multi-source data at the starting time and the multi-source data at at least one sampling interval are encoded and fused through one-dimensional convolution and a multi-layer perceptron to obtain a comprehensive feature expression, including: constructing a meteorological feature matrix based on the meteorological characteristics of the meteorological data, the starting time, the sampling interval, and the number of sampling points, wherein the meteorological characteristics include temperature, humidity, air pressure, wind speed, precipitation, and sunshine hours; performing one-dimensional convolution processing on the meteorological feature matrix to obtain an output feature map of the meteorological feature data; constructing a soil feature matrix based on the soil characteristics of the soil data, the starting time, the sampling interval, and the number of sampling points, wherein the soil characteristics include multiple depth positions. The method comprises the following steps: performing one-dimensional convolution processing on the soil characteristic matrix to obtain an output characteristic graph of the soil characteristic data; constructing a crop characteristic matrix based on the crop characteristics of the crop data, the starting time, the sampling interval and the number of sampling points, wherein the crop characteristics include crop type, crop plant height, crop root depth, crop leaf area index and crop chlorophyll content; performing one-dimensional convolution processing on the crop characteristic matrix to obtain an output characteristic graph of the crop characteristic data; inputting the output characteristic graph of the meteorological characteristic data, the output characteristic graph of the soil characteristic data and the output characteristic graph of the crop characteristic data into a multi-layer perceptron neural network to obtain a comprehensive characteristic expression output by the multi-layer perceptron neural network.
[0008] According to a method for predicting large-scale crop water requirement of a spatiotemporal fusion model under physical constraints provided by the present invention, the comprehensive feature expression is input into a trained spatiotemporal feature fusion model to obtain a crop water requirement prediction result at a target moment output by the trained spatiotemporal feature fusion model, including: determining a target node corresponding to meteorological data at the target moment, soil data at the target moment, and crop data at the target moment in the comprehensive feature expression; performing weighted aggregation on features of neighborhood nodes of the target node through a graph convolutional network model of a trained spatiotemporal feature fusion model to obtain spatial features of the target node; determining a long time series of the comprehensive feature expression based on a self-attention mechanism through an Informer model of a trained spatiotemporal feature fusion model; and determining the temporal features of the target node based on the long time series of the comprehensive feature expression; and determining the crop water requirement prediction result at the target moment based on the spatial features of the target node and the temporal features of the target node through a trained spatiotemporal feature fusion model.
[0009] According to a method for predicting large-scale crop water requirement using a spatiotemporal fusion model under physical constraints provided by the present invention, before the comprehensive feature expression is input into a trained spatiotemporal feature fusion model to obtain a crop water requirement prediction result at a target moment output by the trained spatiotemporal feature fusion model, the method further includes: acquiring multi-source data samples, and dividing the multi-source data samples into a training sample set and a test sample set according to a preset ratio; training a preset spatiotemporal feature fusion model based on the training sample set, and gradient updating the preset spatiotemporal feature fusion model based on an Adam optimizer to obtain a trained spatiotemporal feature fusion model; and evaluating the trained spatiotemporal feature fusion model based on the root mean square error, the mean absolute error, and the determination coefficient to obtain a trained spatiotemporal feature fusion model.
[0010] According to a method for predicting large-scale crop water requirement of a spatiotemporal fusion model under physical constraints provided by the present invention, the method also includes: inputting the training sample set into a preset WOFOST physical model to obtain a simulated crop water requirement output by the preset WOFOST physical model; inputting the training sample set into a preset spatiotemporal feature fusion model to obtain a predicted crop water requirement output by the preset spatiotemporal feature fusion model; and determining a loss function of the preset spatiotemporal feature fusion model under the constraints of the WOFOST physical model based on the actual crop water requirement of the training sample set, the simulated crop water requirement and the predicted crop water requirement.
[0011] The present invention also provides a large-scale crop water requirement forecasting device of a spatiotemporal fusion model under physical constraints, comprising the following modules: an acquisition module, used to acquire multi-source data at a starting moment and multi-source data at at least one sampling interval, wherein the multi-source data includes meteorological data, soil data and crop data; a feature fusion module, used to encode and fuse the multi-source data at the starting moment and the multi-source data at at least one sampling interval through one-dimensional convolution and multi-layer perceptron to obtain a comprehensive feature expression, wherein the comprehensive feature expression includes meteorological features at each moment, soil features at each moment and crop features at each moment; a prediction module, used to input the comprehensive feature expression into a trained spatiotemporal feature fusion model to obtain a crop water requirement prediction result at a target moment output by the trained spatiotemporal feature fusion model, wherein the spatiotemporal feature fusion model includes a graph convolutional network model and an Informer model; the graph convolutional network model is used to perform spatial feature extraction on the comprehensive feature expression, and the Informer model is used to perform temporal feature extraction on the comprehensive feature expression.
[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for predicting large-scale crop water demand using a spatiotemporal fusion model under any of the physical constraints described above is implemented.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for predicting large-scale crop water demand using a spatiotemporal fusion model under any of the physical constraints described above is implemented.
[0014] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements a large-scale crop water requirement forecasting method using a spatiotemporal fusion model under any of the physical constraints described above.
[0015] The method for predicting large-scale crop water requirement of a spatiotemporal fusion model under physical constraints provided by the present invention can fully consider various factors such as crop type, soil characteristics, climatic conditions, etc. by acquiring meteorological data, soil data and crop data at the starting time and multiple subsequent sampling intervals; encode and fuse multi-source data at the starting time and multiple subsequent sampling intervals through one-dimensional convolution and multi-layer perceptron to obtain a comprehensive feature expression for expressing meteorological characteristics, soil characteristics and crop characteristics at each time, thereby exploring the relationship between features and combining original features into more meaningful high-order features, thereby reducing feature dimensions and improving the comprehensiveness of feature expression; inputting the comprehensive feature expression into a trained spatiotemporal feature fusion model to extract spatial features through a graph convolutional network model and extract temporal features through an informer model to obtain a crop water requirement prediction result at a target time, thereby more effectively capturing the interactive relationship between data from different sites and the time trend of historical data, thereby improving the generalization ability of the model in different regions and the prediction accuracy of crop water requirement; thereby solving the technical problem that crop water requirement prediction methods in related technologies are difficult to consider comprehensively, resulting in inaccurate predictions. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced one by one below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a flow chart of a large-scale crop water requirement forecasting method using a spatiotemporal fusion model under physical constraints provided by the present invention.
[0018] Figure 2 It is a schematic diagram of the overall process of the large-scale crop water requirement forecasting method of the spatiotemporal fusion model under physical constraints provided by the present invention.
[0019] Figure 3 It is a schematic diagram of the technical idea of the large-scale crop water requirement forecasting method of the spatiotemporal fusion model under physical constraints provided by the present invention.
[0020] Figure 4 It is a structural schematic diagram of a large-scale crop water requirement forecasting device of a spatiotemporal fusion model under physical constraints provided by the present invention.
[0021] Figure 5 It is a schematic diagram of the physical structure of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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 creative work are within the scope of protection of the present invention.
[0023] Crop water requirement prediction is an important research direction in the agricultural field. It predicts the amount of water required for crop growth through scientific methods, which helps to arrange irrigation reasonably and increase crop yields. With the increasing global climate change, fluctuations in temperature and rainfall have also increased, which has affected the water demand for crop growth. Therefore, accurate prediction of crop water requirement is crucial for the sustainability and stability of agricultural production. Using big data technology, meteorology and model algorithms, crop water requirements can be predicted based on various factors such as crop type, soil characteristics, climate conditions, etc., so as to make scientific irrigation decisions, improve farmland utilization, reduce water resource waste, and achieve efficient and intelligent management of agricultural production.
[0024] Traditional crop water requirement calculation methods are mostly based on empirical formula fitting, but crop water requirement is affected by many factors, such as meteorology, soil, crops, irrigation and other factors, which have complex interactions and dynamic changes, and traditional crop water requirement calculation methods are difficult to consider comprehensively, resulting in inaccurate predictions. In addition, the current crop water requirement calculation method is mainly based on the site scale, which cannot effectively support large-scale or regionalized water management, and lacks sufficient interpretability. Therefore, there is an urgent need for a large-scale interpretable crop water requirement forecasting method that can combine spatiotemporal characteristics to improve the accuracy and reliability of crop water requirement prediction.
[0025] Traditional methods for predicting crop water requirements mainly include the following:
[0026] Empirical formula method: Based on historical meteorological data and crop growth characteristics, calculations and forecasts are performed using empirical formulas. These formulas often rely on previous research or practical experience.
[0027] Statistical regression method: By establishing a statistical model, the relationship between historical meteorological data and crop water requirements is analyzed to make predictions. This method usually requires a large amount of historical data for regression analysis and is only effective under specific meteorological and agricultural conditions. These methods cannot be applied in areas with different conditions.
[0028] Model method: This method establishes a statistical analysis of historical data, finds the relationship between crop water demand and external factors, and uses mathematical modeling to predict crop water demand. Although this method can take into account the influence of multiple factors, it may over-rely on historical data and ignore the physical constraints and mechanisms behind crop water demand, such as soil type, crop characteristics, topography, etc. Ignoring these factors will still affect the accuracy of the prediction results.
[0029] Therefore, in order to overcome the shortcomings of related technologies and improve the accuracy and interpretability of crop water requirement prediction on a large scale, the research of this invention mainly focuses on the following three aspects:
[0030] Multi-source information coupling: Crop water requirements are often affected by multiple factors such as weather, soil, and crops. However, in the data collection and analysis of agricultural production, data missing is often encountered, which may affect the accurate assessment of key parameters such as crop water requirements and the feasibility of irrigation management. Through multi-source data coupling technology, information from different data sources can be cross-validated, supplemented, and corrected to make up for the lack of data from a certain source, improve the integrity and accuracy of the data, and provide strong data support for subsequent model training.
[0031] Fusion of spatiotemporal models: Traditional crop water requirement prediction models are usually based on data modeling from a single site. Such models may lack generalization capabilities in different regions or at different times, resulting in limited prediction accuracy. Therefore, the present invention considers factors such as the climate environment, soil characteristics, and crop growth conditions in different regions to establish a prediction model GCN-Informer that comprehensively considers spatiotemporal changes. In the graph convolution network (GCN), the graph convolution layer can capture information propagation and interaction between different locations by performing convolution operations on the spatial adjacency matrix to obtain spatial information of different time segments. In Informer, through the self-attention distillation technology, Informer can efficiently process extremely long input sequences, effectively capture long-term dependencies in spatial information in different time series segments, and predict the entire long time series at one time, greatly improving efficiency in the prediction process. Through the fusion of spatiotemporal features, the prediction accuracy and large-scale prediction capabilities of crop water requirements can be effectively improved.
[0032] Physical mechanism constraints: Since neural network models are usually data-driven, they learn patterns and regularities through large amounts of data. If the data is insufficient or the data quality is poor, the model may overfit, resulting in unstable or inaccurate prediction results. In order to overcome the problem of excessive reliance on data by neural network models, the present invention considers combining physical mechanism knowledge with neural network models, and designs a GCN-Informer model based on WOFOST physical constraints. By embedding the loss function in the WOFOST physical model, the model training is constrained to generate a more robust and effective model, thereby ensuring the accuracy and reliability of crop water requirement prediction.
[0033] In summary, the present invention proposes a large-scale crop water requirement forecasting method based on a spatiotemporal fusion model under physical mechanism constraints. This method integrates multi-source information such as meteorology, soil, and crops, and combines deep learning technology to construct a GCN-Informer model with spatiotemporal feature fusion. It fully considers the temporal characteristics of physical location information and historical data in different regions, and combines the WOFOST physical model to constrain neural network training to improve the accuracy and practicability of crop water requirement prediction, providing a strong scientific basis and technical support for irrigation management.
[0034] Optionally, the method for predicting large-scale crop water requirement using a spatiotemporal fusion model under physical constraints in an embodiment of the present application can be executed by a server, by a terminal device, or jointly by a server and a terminal device, taking the example of a server executing the method for predicting large-scale crop water requirement using a spatiotemporal fusion model under physical constraints in this embodiment.
[0035] Figure 1 : is a flow chart of a method for predicting large-scale crop water demand using a spatiotemporal fusion model under physical constraints provided by the present invention. Figure 1 As shown, the method includes the following steps.
[0036] Step 101, acquiring multi-source data at a starting time and multi-source data at at least one sampling interval, wherein the multi-source data includes meteorological data, soil data, and crop data.
[0037] The current crop water requirement calculation method is mainly based on the site scale, which only analyzes the relationship between historical meteorological data and crop water requirement to make predictions. This method usually requires a large amount of historical data for regression analysis and is only effective under specific meteorological and agricultural conditions. These methods cannot be applied in areas with different conditions.
[0038] In an embodiment of the present invention, data on weather, soil, and crops at multiple sites at multiple times are collected and integrated to establish a comprehensive database, so as to facilitate the subsequent prediction of crop water requirements based on various factors such as crop type, soil characteristics, climatic conditions, etc., and can effectively support large-scale or regionalized water management.
[0039] In an embodiment of the present invention, after obtaining multi-source data (meteorological data, soil data, and crop data) at each site at each time, data cleaning technology is used to remove noise and outliers, and the quality of model training data is improved through processing methods such as standardization and normalization.
[0040] For example, using meteorological stations or satellite remote sensing data from different regions, we can obtain meteorological data such as daily average temperature, relative humidity, air pressure, wind speed, precipitation, and sunshine hours, and establish a meteorological database. Using soil profiles or soil samples, we can obtain soil physical and chemical properties at different depths, including soil layers, soil temperature, soil moisture, soil water content, and other soil properties, and establish a soil database. Through crop planting conditions and relevant literature, we can obtain parameters such as crop type, crop height, crop root depth, crop leaf area index, and crop chlorophyll content, and establish a crop database.
[0041] In an embodiment of the present invention, the meteorological data extracted from each site is input into a table according to time sampling intervals, wherein the sampling intervals of soil data and crop data are the same as the sampling intervals of meteorological data, and the specific starting time and sampling interval (for example, usually every day) can be determined according to the actual application scenario of crop water demand prediction.
[0042] Step 102, encoding and fusing the multi-source data at the starting moment and the multi-source data at at least one sampling interval through one-dimensional convolution and multi-layer perceptron to obtain a comprehensive feature expression, wherein the comprehensive feature expression includes meteorological characteristics at each moment, soil characteristics at each moment, and crop characteristics at each moment.
[0043] In an embodiment of the present invention, a multi-input structure is adopted, and the meteorological data, soil data and crop data input separately are encoded and fused through one-dimensional convolution and multi-layer perceptron, so that they meet the input of the subsequent graph convolution, while retaining the ability of the graph convolution to learn the spatial features of the data.
[0044] For example, the meteorological data input is an m n matrix, where m is the number of sampling points (e.g., meteorological stations). One-dimensional convolution is used to encode meteorological features, with a convolution kernel size of n and an output channel of 1. The convolution operation is performed on the meteorological features at each moment to obtain a comprehensive feature expression of the meteorological feature data.
[0045] The convolution process of soil data and crop data is similar to the above-mentioned meteorological data, and the present invention will not be repeated here.
[0046] A multilayer perceptron (MLP) neural network is used to couple the comprehensive feature expressions of the fused meteorological feature data (meteorological features), the comprehensive feature expressions of soil data (soil features), and the comprehensive feature expressions of crop data (crop features). The input layer consists of three neurons, representing the three input features of meteorology, soil, and crops respectively. The output is one neuron, representing the comprehensive feature expression after the three features are coupled.
[0047] Through the embodiments of the present invention, multi-source information (meteorological data, soil data, and crop data) is coupled through one-dimensional convolution and MLP algorithms to automatically explore the relationships between features, capture the interactions and nonlinearities between features, better express the complexity of the data, and combine the original features into more meaningful high-order features, thereby reducing feature dimensions and alleviating the complexity of model training.
[0048] Step 103, input the comprehensive feature expression into the trained spatiotemporal feature fusion model to obtain the crop water requirement prediction result at the target time output by the trained spatiotemporal feature fusion model, wherein the spatiotemporal feature fusion model includes a graph convolutional network model and an informer model; the graph convolutional network model is used to extract spatial features from the comprehensive feature expression, and the informer model is used to extract temporal features from the comprehensive feature expression.
[0049] Related technologies mainly rely on data from a certain region or site. Since data from the same region or site are similar, the trained models are often only applicable to a specific region. These models are difficult to cross geographical boundaries, limiting their application in different regions.
[0050] Secondly, most existing model methods are single models, lacking diversity and comprehensiveness. A single model may not perform well when dealing with complex data, and different model structures should have different learning capabilities for data features. Therefore, it is necessary to adopt a model fusion method that combines spatial information with comprehensive and diverse data sets to fully learn the different structural features of the data in order to better capture the changes and regularities between different regions and improve the accuracy of the model and its large-scale prediction capabilities.
[0051] In the embodiment of the present invention, in order to combine the spatial location information of different regions and the changing rules of each site data in historical time, the present invention constructs a GCN-Informer spatiotemporal feature fusion model, in which the graph convolutional network model extracts spatial features by weighted aggregation of the features of neighborhood nodes through the graph structure. Informer uses the self-attention mechanism to model the long-term dependencies in time series data and extract important features hidden in the time series data.
[0052] refer to Figure 2 , Figure 2 It is a schematic diagram of the overall process of the method for predicting large-scale crop water requirement of the spatiotemporal fusion model under physical constraints provided by the present invention, which specifically includes the following steps.
[0053] Step S1, collect and process data: integrate meteorological, soil, and crop data to establish a comprehensive database. Use data cleaning technology to remove noise and outliers, and improve the quality of model training data through standardization and normalization.
[0054] Step S2, multi-source data coupling: Use the multivariate regression method to use different data to fill in the missing source data, and use one-dimensional convolution and multi-layer perceptron to fuse and encode the filled multi-source data to meet the input of the subsequent model.
[0055] Step S3, spatiotemporal fusion model construction: Through the convolution operation of the graph convolution layer in the GCN model on the spatial adjacency matrix and the self-attention distillation technology in the Informer model, the spatiotemporal change law of the data is comprehensively considered to improve the prediction accuracy of the model.
[0056] Step S4, physical mechanism constraint: embed the WOFOST physical model into the loss function to constrain model training so that the model's prediction results conform to the physical laws of the real world and improve the robustness of the model.
[0057] Step S5, model training and evaluation: Use a large amount of historical data to train the constructed model. Use indicators such as root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R²) to evaluate the model's prediction results. Adjust the model's hyperparameters based on the evaluation results to optimize the model performance.
[0058] Apply the trained and optimized model to actual scenarios, input current weather, soil, crop and other data to predict crop water requirements. Based on the prediction results, provide scientific basis and decision support for irrigation management in agricultural production, achieve precision irrigation, improve water resource utilization efficiency, and promote sustainable agricultural development.
[0059] The purpose of the present invention is to overcome the defects of existing crop water requirement prediction methods and propose a large-scale crop water requirement forecasting method based on a spatiotemporal fusion model under physical mechanism constraints to improve the accuracy and practicability of crop water requirement prediction and provide a strong scientific basis and technical support for irrigation management.
[0060] Specifically, the present invention aims to solve the following problems:
[0061] The present invention establishes a spatiotemporal feature fusion model of GCN-Informer through the model fusion method, realizes the effective combination of large-scale spatial features and temporal features, and improves the accuracy of the model and the large-scale regional prediction capability.
[0062] The present invention introduces the WOFOST physical formula to establish a model training method under physical constraints, which helps the model to better understand and interpret data, thereby significantly improving the accuracy and reliability of crop water requirement prediction.
[0063] According to a method for predicting large-scale crop water requirement using a spatiotemporal fusion model under physical constraints provided by the present invention, after obtaining multi-source data at a starting time and multi-source data at at least one sampling interval, the method further includes:
[0064] Input multi-source data in a table format and perform time alignment on the multi-source data to obtain multi-source data in a unified format;
[0065] Based on the sliding window box plot, the meteorological data in the unified format of multi-source data are eliminated for outliers to obtain the cleaned meteorological data;
[0066] Based on Mahalanobis distance, outliers are removed from soil data in the unified format of multi-source data to obtain cleaned soil data.
[0067] Based on a preset value range, outliers are removed from the crop data in the unified format of multi-source data to obtain cleaned crop data;
[0068] The cleaned meteorological data, the cleaned soil data, and the cleaned crop data are used as cleaned multi-source data;
[0069] Perform K-nearest interpolation on the missing values of the spatial position of the cleaned multi-source data, and perform linear interpolation on the missing values of the temporal position of the cleaned multi-source data to obtain the filled multi-source data;
[0070] The filled multi-source data is normalized based on maximum and minimum normalization to obtain the preprocessed multi-source data.
[0071] Crop water requirement is often affected by multiple factors such as weather, soil, and crops. However, when collecting and analyzing data in agricultural production, data missing is often encountered, which may affect the accurate assessment of key parameters such as crop water requirement and the feasibility of irrigation management.
[0072] In an embodiment of the present invention, through multi-source data coupling technology, information from different data sources can be cross-validated, supplemented and corrected to make up for the lack of data in a certain source, improve the integrity and accuracy of the data, and provide strong data support for subsequent model training.
[0073] The present invention uses the following method to collect and process weather, soil, crop and other element data:
[0074] S1.1 Collect meteorological data. Use meteorological stations or satellite remote sensing data from different regions to obtain meteorological data such as daily average temperature, relative humidity, air pressure, wind speed, precipitation, and sunshine hours, and establish a meteorological database.
[0075] S1.2 Collect soil data. Use soil profiles or soil samples to obtain soil physical and chemical properties at different depths, including soil layers, soil temperature, soil moisture, soil water content and other soil properties, and establish a soil database.
[0076] S1.3 Collect crop data. Obtain crop type, crop plant height, crop root depth, crop leaf area index, crop chlorophyll content and other parameters through crop planting conditions and relevant literature to establish a crop database.
[0077] S1.4 Data processing. Clean the collected meteorological, soil and crop data, including checking whether the data format is unified, identifying and deleting outliers and duplicate data, interpolating missing values, normalizing data, etc., so that the data meets the requirements of model input. The specific methods are as follows:
[0078] S1.4.1 Unified data format. All data are input in tabular form, and the data of different time scales are time-aligned, and data with many missing values are eliminated to ensure that the format of each type of data is unified.
[0079] S1.4.2 Data cleaning.
[0080] The sliding window box plot method is used to remove outliers from meteorological data. The quartiles of meteorological data in each time window are calculated. and , and the interquartile range , then any value less than or greater than The data points are considered as outliers and are deleted.
[0081] For soil data, a method based on Mahalanobis distance is used to detect and remove outliers: for each soil parameter in each layer, its mean is calculated. and standard deviation , and the Mahalanobis distance ,in, represents soil parameters, and any data point with a Mahalanobis distance greater than 3 is considered an outlier and deleted.
[0082] For crop data, an expert knowledge-based method is used to detect and remove outliers: for each crop, a reasonable value range is determined based on relevant literature or experience, and then data points outside this range are deleted.
[0083] S1.4.3 Data interpolation.
[0084] For missing values in spatial locations, the K-nearest neighbor interpolation method is used: k samples with similar spatial locations in the data set are identified through distance measurement. These k samples are then used to estimate the value of the missing data point. The missing value of each sample is filled or interpolated using the weighted average of the k neighbors found in the data set. The weight is the inverse of the distance, which can be specifically referred to in the following formula (1):
[0085] (1)
[0086] in, For the The missing values of the grid, For the The data of the nearest neighbor grid, For the The weight of the nearest neighbor grid, For the The nearest neighbor grid and the The distance of the grid, is the total number of grids.
[0087] For missing values in the time series position, linear interpolation of the vertically adjacent upper and lower data is used to fill them. For details, please refer to the following formula (2):
[0088] (2)
[0089] in, For the Missing values at time points, and For the and Data at a point in time.
[0090] For crop data, a common sense-based approach was used to interpolate data: for each crop parameter, if there were missing values, they were filled with the mean or median of the same or similar crop data in the same or different regions.
[0091] S1.4.4 Data normalization. Use the maximum and minimum normalization method: for each type of data, find its minimum value min and maximum value max. For each data point , normalized to interval to eliminate the dimension and scale differences of the data:
[0092] (3)
[0093] in, is the normalized value, For the The original value, and are the minimum and maximum values of all data.
[0094] Through the embodiments of the present invention and the above data processing method, a database of pre-processed meteorological, soil, crop and other data can be obtained to provide data support for subsequent simulation calculations.
[0095] According to a large-scale crop water requirement forecasting method of a spatiotemporal fusion model under physical constraints provided by the present invention, multi-source data at the starting time and multi-source data at at least one sampling interval are encoded and fused through one-dimensional convolution and multi-layer perceptron to obtain a comprehensive feature expression, including:
[0096] A meteorological feature matrix is constructed based on the meteorological features, starting time, sampling interval and number of sampling points of the meteorological data, wherein the meteorological features include temperature, humidity, air pressure, wind speed, precipitation and sunshine hours;
[0097] Perform one-dimensional convolution processing on the meteorological feature matrix to obtain an output feature map of the meteorological feature data;
[0098] A soil characteristic matrix is constructed based on the soil characteristics, starting time, sampling interval and number of sampling points of the soil data, wherein the soil characteristics include daily average soil temperature at multiple depth positions, humidity at multiple depth positions and water content at multiple depth positions;
[0099] Perform one-dimensional convolution processing on the soil characteristic matrix to obtain an output characteristic map of the soil characteristic data;
[0100] A crop feature matrix is constructed based on the crop features, starting time, sampling interval and number of sampling points of the crop data, wherein the crop features include crop type, crop plant height, crop root depth, crop leaf area index and crop chlorophyll content;
[0101] Perform one-dimensional convolution processing on the crop feature matrix to obtain an output feature map of the crop feature data;
[0102] The output feature map of meteorological characteristic data, the output feature map of soil characteristic data and the output feature map of crop characteristic data are input into a multi-layer perceptron neural network to obtain a comprehensive feature expression of the output of the multi-layer perceptron neural network.
[0103] Traditional methods for calculating crop water requirement are mostly based on fitting empirical formulas, but crop water requirement is affected by many factors, such as weather, soil, crops, irrigation, etc. There are complex interactions and dynamic changes among them, and traditional methods for calculating crop water requirement are difficult to consider comprehensively, resulting in inaccurate predictions.
[0104] In an embodiment of the present invention, a multi-input structure is adopted, and the meteorological data, soil data and crop data input separately are encoded and fused through one-dimensional convolution and multi-layer perceptron, so that they meet the input of the subsequent graph convolution, while retaining the ability of the graph convolution to learn the spatial features of the data, which specifically includes the following steps.
[0105] S2.1 Construct meteorological data input. The meteorological data extracted from each station is organized into an input table according to the time sampling interval. This includes data such as temperature, humidity, air pressure, wind speed, precipitation, and sunshine hours. The meteorological data input structure can refer to the following formula (4):
[0106] (4)
[0107] in, Indicates meteorological data input, Indicates Meteorological characteristics ( is the index), Indicates the starting time point (starting moment), represents the sampling interval (e.g., daily), Indicates the number of sampling points, so the meteorological data input is an m n matrix. One-dimensional convolution is used to fuse meteorological features. The convolution kernel size is n, the output channel is 1, and the convolution operation is performed on the meteorological features at each moment to obtain the comprehensive feature expression of meteorological feature data. , the output characteristic graph of meteorological characteristic data can refer to the following formula (5):
[0108] (5)
[0109] in, Represents the comprehensive feature expression of meteorological characteristic data, Indicates meteorological data input, Indicates the starting time point (starting moment), represents the sampling interval, Indicates the number of sampling points.
[0110] S2.2 Construct soil data input. Through soil sensors, record the daily average soil temperature, humidity, water content and other data at four depths of 20cm, 40cm, 60cm and 80cm, and sample according to the sampling interval of meteorological data. The data structure of soil data input can refer to the following formula (6):
[0111] (6)
[0112] in, represents soil data input, For the Soil characteristics ( is the index), the same feature data at different depths is a column respectively, is the starting time point (starting moment), is the sampling interval (daily), is the number of sampling points, so the soil data input is also one m The same one-dimensional convolution is used for feature fusion encoding, the convolution kernel size is n, the output channel is 1, and the soil characteristics at each moment are convolved to obtain the comprehensive feature expression of the soil characteristic data. , the output characteristic map of soil characteristic data can refer to the following formula (7):
[0113] (7)
[0114] in, Represents the comprehensive feature expression of soil characteristic data, represents soil data input, is the starting time point (starting moment), is the sampling interval (daily), is the number of sampling points.
[0115] S2.3 Construct crop data input. According to the crop planting situation, obtain parameters such as crop type, crop plant height, crop root depth, crop leaf area index, crop chlorophyll content, etc., and establish a crop database. Assume that the number of crop types is C, and the data of each crop is a two-dimensional matrix. The crop data input structure can refer to the following formula (8):
[0116] (8)
[0117] in, represents crop data input, For the Crop data types ( is the index), is the starting time point (starting moment), is the sampling interval (daily), is the number of sampling points. One-dimensional convolution is used to transform the crop data vector of each sampling point Perform convolution operation with a convolution kernel size of n and an output channel of 1 to obtain a comprehensive feature expression of crop feature data , the output feature map of crop feature data can refer to the following formula (9):
[0118] (9)
[0119] in, Represents the comprehensive feature expression of crop feature data, represents crop data input, is the starting time point (starting moment), is the sampling interval (daily), is the number of sampling points.
[0120] S2.4 Feature coupling. An MLP neural network is used to couple the fused meteorological, soil, and crop features. The input layer is composed of three neurons, representing the three input features of meteorological, soil, and crop, respectively. The output is a neuron, representing the comprehensive feature expression after the three features are coupled. The structure can refer to the following formula (10):
[0121] (10)
[0122] in, represents the comprehensive input data, Represents the comprehensive characteristic expression of meteorological, soil and crop characteristics. is the starting time point (starting moment), is the sampling interval (daily), is the number of sampling points.
[0123] Construct the MLP input vector as , the weight vector is , the bias term is , then the output of the model is expressed by the following formula (11):
[0124] (11)
[0125] in, Represents the comprehensive feature expression of the multi-layer perceptron neural network output, represents the input vector of the multilayer perceptron neural network, represents the weight vector, represents the bias term, Represents a multilayer perceptron neural network (function).
[0126] Through the embodiments of the present invention, multi-source information coupling automatically explores the relationship between features through one-dimensional convolution and MLP algorithm, can capture the interaction and nonlinearity between features, better express the complexity of data, and combine the original features into more meaningful high-order features, thereby reducing the feature dimension and alleviating the complexity of model training.
[0127] According to a large-scale crop water requirement forecasting method of a spatiotemporal fusion model under physical constraints provided by the present invention, the comprehensive feature expression is input into a trained spatiotemporal feature fusion model to obtain the crop water requirement forecast result at the target time output by the trained spatiotemporal feature fusion model, including:
[0128] Determine the target nodes corresponding to the meteorological data at the target time, the soil data at the target time, and the crop data at the target time in the comprehensive feature expression;
[0129] Through the graph convolutional network model of the trained spatiotemporal feature fusion model, the features of the target node's neighborhood nodes are weighted and aggregated to obtain the spatial features of the target node;
[0130] Through the Informer model of the trained spatiotemporal feature fusion model, the long time series expressed by the comprehensive features is determined based on the self-attention mechanism; and based on the long time series expressed by the comprehensive features, the temporal features of the target node are determined;
[0131] Through the trained spatiotemporal feature fusion model, the crop water requirement prediction result at the target moment is determined based on the spatial characteristics of the target node and the temporal characteristics of the target node.
[0132] In order to combine the spatial location information of different regions and the changing rules of each site data in historical time, the present invention constructs a GCN-Informer spatiotemporal feature fusion model, in which the graph convolution network (GCN) extracts spatial features by weighted aggregation of the features of neighborhood nodes through the graph structure. Informer uses the self-attention mechanism to model the long-term dependencies in time series data and extract important features hidden in the time series data, which specifically includes the following steps.
[0133] S3.1, GCN spatial feature extraction. GCN is a variant of multi-layer convolutional neural network (CNN) that can learn features from unstructured graphs running directly on the network. GCN acts as a feature extractor, just like CNN. It learns each node by iteratively aggregating and fusing feature information from its topological neighbors. The information of the target node is derived by GCN using data from other nodes. Assume that there is a A batch of data of nodes, each node has its own number of features And form × The characteristic matrix Then, the relationship between each node will also form a × Adjacency Matrix , and is the input of GCN.
[0134] The GCN algorithm relies on the use of the Laplacian matrix, which is commonly used to represent graphs in graph theory. , whose Laplacian matrix is defined as ,in is the Laplacian matrix, is the degree matrix of the vertices, which indicates how many degrees each node has, that is, how many edges are connected to it, is the adjacency matrix of the graph. The specific steps and formulas of GCN are as follows:
[0135] Step 1: The core of GCN is the spectral decomposition based on the Laplacian matrix. For a Laplacian matrix, its spectral decomposition is ,in, is the Laplacian matrix, is the diagonal matrix of eigenvalues, is a vector (orthogonal matrix) consisting of eigenvectors, is an orthogonal matrix The transposed matrix of .
[0136] Step 2: Perform convolution operation on the graph. For details, please refer to the following formula (12):
[0137] (12)
[0138] in, Represents the feature vector The graph convolution operation, first, input feature vector The Fourier transform of , then, the Fourier transform result is scaled, that is , and finally, invert the scaled Fourier transform result to obtain .
[0139] Step 3: Simplify the solution of graph convolution. First, define the polynomial distribution disorder table . The above formula (12) is converted into the following formula (13) form through the polynomial:
[0140] (13)
[0141] in, is a multinomial distribution unordered table, is the diagonal matrix of eigenvalues, is a vector (orthogonal matrix) consisting of eigenvectors, is an orthogonal matrix The transposed matrix of are input features.
[0142] Then use the Chebyshev formula to simplify the calculation. The description formula (14) of the Chebyshev formula is as follows:
[0143] (14)
[0144] in, , and the eigenvalues belong to . Every Chebyshev polynomial All can be obtained through the first two polynomials and And variables This recursive relationship allows us to get from the basic polynomial and Starting from , we gradually build up higher order Chebyshev polynomials.
[0145] Since the eigenvalues of L are between [0,2], we can define ,in, Represents the Laplace matrix, "=" is used for assignment, Represents a Laplacian matrix A matrix of the same shape, used to adjust the Laplacian matrix The eigenvalues of Finally, the graph convolution formula is rewritten as the following formula (15):
[0146] (15)
[0147] According to the empirical value, K is set to 1, that is, the first-order approximation is , and represents two shared parameters, where Represents the feature vector The graph convolution operation, is the Laplacian matrix, is the diagonal matrix of eigenvalues, is a vector (orthogonal matrix) consisting of eigenvectors, is an orthogonal matrix The transposed matrix of Indicates about The Chebyshev polynomial of item.
[0148] Step 4, share parameters so that The final formula can be organized as follows (16):
[0149] (16)
[0150] Finally, the GCN layer-to-layer propagation formula can refer to the following formula (17):
[0151] (17)
[0152] in, represents the learnable parameters, represents the degree matrix, Represents the GCN layer-to-layer propagation formula, , Represents the node connected to The information matrix composed of other matrix nodes, is the identity matrix, yes The degree matrix of . Represents a trainable parameter matrix. Represents a nonlinear activation function, and leakyrelu is used in the present invention. The weight matrix of the layer is specified as . is the feature of the Lth layer Through the GCN model, the features of the neighboring sites of a site can be aggregated, the spatial dependencies between different sites can be established, and the data from other nodes can be fully utilized to infer the information of the node.
[0153] S3.2, Informer time series feature extraction. Informer is a time series prediction model based on Transformer. Compared with the traditional Transformer, Informer has three unique features: ProbSparse Self-attention, Self-attention Distilling, and the use of a decoder architecture to generate prediction sequences in parallel (One forward operation).
[0154] The probability-based sparse self-attention mechanism reduces computational complexity by sparsifying the attention matrix. The self-attention distillation technique compresses the output of the multi-head attention mechanism to obtain a more compact feature representation, reducing the number of model parameters and computational complexity, enabling Informer to efficiently process extremely long input sequences. The parallel simultaneous generation of prediction sequence mechanism can directly predict all target values in one forward propagation without the need for step-by-step decoding like traditional decoders.
[0155] Among them, the probability-based sparse self-attention mechanism (ProbSparse Self-attention) realizes the time complexity of the dot product calculation of the self-attention mechanism from arrive The optimization of , its calculation steps are as follows:
[0156] Step S1: For each query, randomly sample some keys, the default value is 5 ln L, where L is the length of the input sequence.
[0157] Step S2: Calculate the sparsity score of each query and all keys The sparsity score reflects the correlation between the query and the key. The higher the score, the stronger the correlation.
[0158] Step S3: Select the N queries with the highest sparsity scores. The default value of N is 5. ln L.
[0159] Step S4: Calculate the dot product results of N queries and keys to obtain the attention result.
[0160] Step S5: The remaining LN queries do not perform attention calculation. These queries directly output the average of all inputs of the self-attention layer, which ensures that the input and output sequence lengths of the ProbSparse layer are both L.
[0161] The probabilistic sparse self-attention mechanism optimizes the matrix form into a probabilistic form. For details, please refer to the following formulas (18) and (19):
[0162] (18)
[0163] in, represents the self-attention mechanism, The input matrix represents the query, key, and value respectively. represents the feature dimension (usually the dimension of the embedding vector), represents the dot product of the query matrix and the transpose of the key matrix, Used to convert the attention score matrix into a probability distribution.
[0164] (19)
[0165] in, represents the attention score, Indicates queries, represents a key set, Represents a set of values, is the kernel function , measure the The input and The correlation between the inputs, is the dimension of the input features. Respectively represent The matrix OK. Represent the query matrix, key value matrix, and value matrix respectively. represents the transposed matrix, yes right The attention weight is In the attention distribution over all keys The proportion of is the weighted sum of all keys, that is Attention output; This means that the above weighted sum is interpreted as Under the conditions of Select expectations.
[0166] No. indivual For all The attention is defined as the probability ,if Close to uniform distribution ,distributed and The “sparseness” between can be used to distinguish “important” queries. Its sparsity is calculated by and The KL divergence is used to quantitatively describe, and the specific reference is the following formula (20):
[0167] (20)
[0168] in, represents the true distribution, represents the model distribution, is the dimension of the input features, for The matrix OK, is the Kth matrix OK, represents the transposed matrix, is the length of the K matrix, Indicates the length The transpose of the K matrix, Represents the natural logarithm.
[0169] Discarding the constant term, the final definition of the "sparseness measure" of the i-th query can refer to the following formula (21):
[0170] (twenty one)
[0171] in, represents the sparsity measure, Indicates queries, Represents a key set, the first item is all keys The second term is the logarithm and exponent (LSE) of all the keys. The arithmetic mean of .
[0172] Last Use replace , further simplify the formula, and obtain the approximate sparsity evaluation result as shown in formula (22):
[0173] (twenty two)
[0174] in, The meaning of the parameters is consistent with the above formula and will not be repeated here.
[0175] The distilled self-attention mechanism specifically includes:
[0176] In the encoding layer of Informer, the distilled self-attention mechanism is used for the second time. The input sequence is downsampled by two one-dimensional convolutional maximum pooling, and then a sparse attention operation is performed. Its formula (23) is as follows:
[0177] (twenty three)
[0178] in, Input matrix for the sparse self-attention time series features of the second layer; is the 1-layer time series feature matrix after the sparse self-attention operation, Represents the input, and performs a one-dimensional convolution operation on it ( ) and then use the ELU function to activate, and then perform maximum pooling ( )get .
[0179] The decoder architecture is used to generate prediction sequences in parallel, including:
[0180] A time series before the time point to be predicted As the first part of the Decoder input sequence, the second part of the Decoder input is the corresponding all-0 input sequence at the position to be predicted. , the Informer model is based on All prediction outputs are generated at once, and the calculation formula (24) is as follows:
[0181] (twenty four)
[0182] in, is through The operation converts two tensors and The result of splicing together, The shape is A tensor of , where Indicates the number (or length) of tokens in the input sequence, Represents the embedding dimension (or model dimension) of each token; Represents the shape A tensor of , where Indicates the length of the passed placeholder or specific token, Represents a matrix space.
[0183] The Informer model effectively captures the long-term dependencies in time series data, overcoming the problem that traditional RNN models are difficult to model long sequences. At the same time, Informer breaks away from the sequential calculation limitations of RNN and can perform parallel calculations, greatly improving the reasoning efficiency, allowing it to better utilize historical information and make accurate predictions for multiple time steps in the future.
[0184] In summary, building a GCN-Informer spatiotemporal feature fusion model can better mine the hidden spatiotemporal dependencies in the data and improve prediction accuracy. At the same time, Informer improves the prediction ability of long sequences and can predict multiple time step data at one time, greatly improving prediction efficiency.
[0185] According to a method for predicting large-scale crop water demand using a spatiotemporal fusion model under physical constraints provided by the present invention, the method further includes:
[0186] The training sample set is input into the preset WOFOST physical model to obtain the simulated crop water requirement output by the preset WOFOST physical model;
[0187] The training sample set is input into a preset spatiotemporal feature fusion model to obtain the predicted crop water requirement output by the preset spatiotemporal feature fusion model;
[0188] Based on the actual crop water requirement, simulated crop water requirement and predicted crop water requirement of the training sample set, the loss function of the preset spatiotemporal feature fusion model under the constraints of the WOFOST physical model is determined.
[0189] At present, most of the crop water requirement prediction methods based on statistical models are data-driven, but this method requires a large amount of labeled data, is easily affected by uneven data distribution and noise, and the data quality determines the model effect. If the data is missing or the data quality is poor, it often leads to unstable performance of the model on new data or inaccurate prediction. Physical constraints can constrain or regulate the model based on known physical laws or domain knowledge to ensure that the model's prediction results conform to the physical laws of the real world.
[0190] In the embodiment of the present invention, in the prediction of crop water requirement, the introduction of physical constraints can help the model better understand and interpret the data, improve the robustness and accuracy of the model, and reduce the risk of overfitting.
[0191] In the prediction of crop water requirement, the introduction of physical constraints can help the model better understand and interpret data. By introducing the physical mechanism of crop growth, such as transpiration process, soil moisture content and other factors, the present invention can effectively constrain the model in the process of predicting crop water requirement, making it more in line with the actual situation. Doing so can not only improve the interpretability of the model, but also make the model's prediction results more reasonable and better guide agricultural production practices.
[0192] The present invention uses WOFOST constraint model training. WOFOST can be used for long-term simulation and can simulate the entire crop growth cycle, including sowing, growth, harvesting and other stages. WOFOST has accumulated a large amount of experimental data, which can be used to verify the accuracy of the model, making it a powerful tool for decision support and policy analysis. The principle of the WOFOST model is as follows:
[0193] Phenological development: The rate of development of each growth stage is affected by temperature and photoperiod. In the WOFOST model, the crop growth stage is represented by a dimensionless state variable - Development Stage (DVS). When the crop seedlings emerge, DVS = 0, during flowering, DVS = 1, and during maturity, DVS = 2. Its formula (25) is as follows:
[0194] (25)
[0195] in, Indicates the developmental stage, is the accumulated temperature, The accumulated temperature required for crops to enter the next stage of development.
[0196] The growth rate of some crops is also affected by the photoperiod. The calculation formula (26) is as follows:
[0197] (26)
[0198] in, represents the photoperiod influence factor, Indicates the actual photoperiod (actual daylight duration), For the optimal photoperiod, is the critical light period. The DVS of its developmental stage is calculated by formula (27):
[0199] (27)
[0200] in, Indicates the developmental stage, is the accumulated temperature, The accumulated temperature required for crops to enter the next stage of development, Represents the photoperiod influence factor.
[0201] Assimilation and respiration: Assimilation refers to the process by which plants convert carbon dioxide and water into organic matter through photosynthesis. Respiration refers to the process by which plants decompose organic matter into carbon dioxide and water, releasing energy to sustain life activities. The assimilation rate of crops in WOFOST is calculated by formula (28):
[0202] (28)
[0203] in, is the total assimilation rate, is the maximum total assimilation rate, is the original light energy utilization rate of a single leaf, and It is related to temperature. Determined by the characteristics of the crop, Leaf layer The absorbed radiation is given by formula (29) as follows:
[0204] (29)
[0205] in, Leaf layer The absorbed radiation, is the extinction coefficient, which is a function of radiation characteristics, solar altitude angle, leaf angle distribution and single leaf diffuse coefficient; is the reflection coefficient, which is a function of the sun’s altitude angle, the blade’s angular distribution, and the blade’s reflection and conduction properties; is the leaf area index; represents the natural logarithm; The radiation at the top of the canopy on a sunny day can be referred to the following formula (30):
[0206] (30)
[0207] in, is the solar constant, is the angle between the sun and the earth's surface.
[0208] Transpiration: Transpiration refers to the continuous release of water into the air by the pores (stomata) on the surface of leaves, which lowers the temperature of the leaves and helps the plant regulate its body temperature and prevent overheating. The reference crop evapotranspiration in WOFOST is calculated using the following formulas (31) to (33):
[0209] (31)
[0210] (32)
[0211] (33)
[0212] in, is the reference evapotranspiration rate, is the evapotranspiration rate due to net absorbed radiation, For evaporation demand, is the slope of the saturated water vapor pressure curve, is the wet-dry bulb constant, is the water vapor pressure difference at a height of 2 m, is the empirical coefficient of wind function, is the 24-hour average wind speed at a height of 2m, The daily temperature difference is is an empirical parameter, with vegetation canopy as 1 and water surface evaporation as 0.5. A correction factor can be used to calculate the potential evapotranspiration between different crops. , please refer to the following formula (34):
[0213] (34)
[0214] in, represents potential evapotranspiration, is the correction factor, For reference evapotranspiration rates, most crops use a factor of 1, water-saving crops use 0.8, and water-storing crops use 1.2.
[0215] Actual crop evapotranspiration is equal to potential evapotranspiration multiplied by light interception, water stress, and general crop correction factors. When crops respond to water stress by closing their stomata, stomatal closure leads to a decrease in the exchange of O2 and CO2 between the crop and the atmosphere, and the assimilation rate of CO2 also decreases. At this time, the actual crop evapotranspiration calculation formula (35) is as follows:
[0216] (35)
[0217] in, is the assimilation rate, is the potential assimilation rate, is the actual evapotranspiration, is potential evapotranspiration.
[0218] Soil water balance: Calculate the soil water content and water deficit of each layer in the soil profile based on factors such as precipitation, infiltration, evaporation, transpiration, and drainage. The soil water molecule module in WOFOST is divided into three parts. First, under potential production conditions, the soil is continuously moist, and the crop water demand is quantified as the amount of water evaporated from the crop transpiration and the soil surface under the shade of the canopy. Second, under water-limited production conditions, the water in the soil can flow freely, and the groundwater level in this type of soil is so deep that it has no effect on the soil moisture content in the root zone. The third is also under water-limited production conditions, where the water balance is affected by shallow groundwater in the root zone. This submodule is similar to the second case, except that the soil water holding capacity is determined by the depth of the groundwater level, and there is capillary rise water, and the root zone moisture content does not change with depth.
[0219] The soil in the model is divided into three parts: the actual root zone (RDact), the part below the actual root zone to the groundwater level, and the part below the groundwater level to 1000 cm from the surface soil layer. The maximum root depth is RDm and the groundwater level depth is Z. When groundwater enters the root zone, the root zone is further divided into a water-saturated area and an unsaturated area. The calculation of water flux includes precipitation (R), surface storage water (SS), surface runoff (SR), surface evapotranspiration (E), crop transpiration (T), water infiltrating from the root zone to deeper soil layers (PC), and capillary rise water (CR) rising to the root zone. The soil water balance formula can be expressed by the following formula (36):
[0220] (36)
[0221] in, represents soil water balance, R represents precipitation, SS represents surface storage water, SR represents surface runoff, E represents surface evaporation, T represents crop transpiration, PC represents water that penetrates from the root zone to deeper soil layers, and CR represents capillary rise water that rises to the root zone.
[0222] In machine learning and deep learning, loss functions are used to guide the model training process. By minimizing the loss function, the model parameters can be adjusted to better fit the training data and improve the model performance. In regression prediction tasks, the commonly used loss function is MSE, and its specific formula (37) is as follows:
[0223] (37)
[0224] Among them, MSE represents mean square error, For the The actual crop water requirement value of samples, For the The predicted crop water requirement value for samples, Represents the total number of samples.
[0225] If only this pure difference loss function is used without any physical constraints, the model may learn some mathematically feasible solutions that do not actually conform to physical laws, and such solutions may be meaningless in practical applications. Therefore, the present invention embeds the water demand calculation formula of the WOFOST physical model into the loss function, so the model loss function formula is as follows:
[0226] (38)
[0227] in, represents the loss function, is the weight coefficient of the water demand item, which can be determined by adjusting parameters. is the actual crop water requirement, is the predicted crop water requirement. Crop water demand simulated by WOFOST model (For details, please refer to Formula 34), represents the total number of samples, Indicates the sample index.
[0228] Therefore, the above method can constrain model training under the WOFOST physical mechanism to ensure that the model not only fits the observed data during the learning process, but also conforms to the physical laws of crop water demand described by the WOFOST model, helping to improve the interpretability and robustness of the model, thereby enhancing its application ability in actual irrigation areas.
[0229] According to a method for predicting large-scale crop water requirement using a spatiotemporal fusion model under physical constraints provided by the present invention, before inputting the comprehensive feature expression into a trained spatiotemporal feature fusion model to obtain a crop water requirement prediction result at a target time output by the trained spatiotemporal feature fusion model, the method further includes:
[0230] Obtain multi-source data samples, and divide the multi-source data samples into a training sample set and a test sample set according to a preset ratio;
[0231] The preset spatiotemporal feature fusion model is trained based on the training sample set, and the preset spatiotemporal feature fusion model is gradient updated based on the Adam optimizer to obtain the trained spatiotemporal feature fusion model;
[0232] The trained spatiotemporal feature fusion model is evaluated based on the root mean square error, mean absolute error, and determination coefficient to obtain the trained spatiotemporal feature fusion model.
[0233] The present invention divides historical data into training set and test set in the ratio of 8:2. The training set is used to train the model, and the test set is used for model evaluation. The training adopts Adam optimizer for gradient update, and RMSE, MAE and R2 are selected as the evaluation indicators of the model.
[0234] Adam (Adaptive Moment Estimation) is a widely used deep learning optimization algorithm. It combines the ideas of momentum and RMSProp, and aims to adjust the learning rate of each parameter by calculating the first-order moment estimate and second-order moment estimate of the gradient, thereby achieving more efficient network training.
[0235] The root mean square error (RMSE) is a typical indicator of regression models, which is used to indicate how large the error in model prediction is. For larger errors, the weight is higher. The specific formula (39) is as follows:
[0236] (39)
[0237] in, represents the root mean square error, represents the total number of samples, represents the sample index, is the actual value, and is the predicted value, the smaller the RMSE, the better.
[0238] The mean absolute error (MAE) is used to measure the average absolute error between the predicted value and the true value. It is a non-negative value. The smaller the MAE, the better the model. The specific formula (40) is as follows:
[0239] (40)
[0240] in, represents the mean absolute error, is the actual value, and is the predicted value, represents the total number of samples, Indicates the sample index.
[0241] Coefficient of determination ( ) is another commonly used metric to evaluate the performance of linear regression models. It represents the proportion of the dependent variable variation explained by the model to the total variation. The specific formula (41) is as follows:
[0242] (41)
[0243] in, represents the coefficient of determination, is the actual value, and is the predicted value, represents the total number of samples, Indicates the sample index.
[0244] Through the above methods, the model training process is monitored, the optimal model weights in the training evaluation process are saved, deployed to the production environment for use, and its prediction effect on new data is continuously monitored, and the model is retrained and optimized in a timely manner.
[0245] The present invention proposes a method for multi-source information coupling that comprehensively utilizes meteorological, soil, and crop data, and designs a 1DCNN-MLP data coupling method. The features of various types of data are integrated through one-dimensional convolution to obtain a comprehensive feature expression of the three features of meteorology, soil, and crops. Then, an MLP neural network is used to fuse the three features as feature inputs for subsequent models. This method uses one-dimensional convolution to capture the correlation and potential patterns between different data of the same type. Compared with manually designed features, this automatic feature extraction method is more efficient. MLP has good nonlinear fitting capabilities and can effectively capture the complex interactive relationships between different features, thereby achieving better feature fusion. This method makes full use of the advantages of the multi-source of data and technical methods, and innovates in feature engineering and feature fusion, which can improve the prediction performance and generalization ability of the model.
[0246] The present invention proposes a spatiotemporal feature fusion model under physical constraints to predict crop water requirement. The present invention uses deep learning technology to design a spatiotemporal feature fusion model based on GNN and Informer. The model fully utilizes the advantages of graph convolution spatial structure feature expression and the long-term memory ability of Informer, and can effectively learn the interactive relationship between data from different sites and the time trend changes of historical data. In addition, in model training, the present invention also uses the WOFOST crop model as the physical constraint embedding model loss function to ensure that the model not only fits the observed data during the learning process, but also conforms to the physical laws of crop water requirement described by the WOFOST model. This method combines the advantages of different deep learning models and crop models, innovates in model construction and model training, and can effectively improve the prediction accuracy of crop water requirement and the robustness of the model.
[0247] Through the above-mentioned embodiments of the present invention, the feature expression capability is enhanced: the features of meteorological, soil and crop data are automatically extracted through 1DCNN-MLP, the correlation and potential patterns between different types of data are fully captured, and the comprehensiveness of feature expression is improved. The generalization and accuracy of the model are improved: by fusing the GNN and Informer models, the interactive relationship between data from different sites and the time trend of historical data can be more effectively captured, thereby improving the generalization ability of the model in different regions and the prediction accuracy of crop water demand. The robustness of the model is enhanced: the introduction of the WOFOST crop model as a physical constraint helps to ensure that the model not only fits the observed data, but also conforms to the established physical laws of crop water demand, thereby improving the robustness and reliability of the model.
[0248] refer to Figure 3 , Figure 3 It is a schematic diagram of the technical idea of the large-scale crop water requirement forecasting method of the spatiotemporal fusion model under physical constraints provided by the present invention, which includes data collection, multi-source data coupling, spatiotemporal feature extraction and physical constraints.
[0249] Among them, data collection includes: meteorological data (including average temperature, wind speed, precipitation, air pressure, relative humidity and sunshine hours), crop data (including crop type, crop height, crop root depth, leaf area index, chlorophyll content and growth rate) and soil data (including 0-20cm soil moisture, 0-20cm soil temperature, 20-40cm soil moisture, 20-40cm soil temperature, 40-60cm soil moisture, 40-60cm soil temperature, 60-80cm soil moisture and 60-80cm soil temperature). Multi-source data coupling includes: one-dimensional convolution feature extraction, MLP feature fusion (see the above embodiment for details). Spatiotemporal feature extraction includes: GCN spatial feature extraction and Informer temporal feature extraction (see the above embodiment for details). Physical constraints include: crop model WOFOST and loss function (see the above embodiment for details).
[0250] The following describes an example of a method for predicting large-scale crop water requirement using a spatiotemporal fusion model under physical constraints in a specific application scenario provided by the present invention.
[0251] Data acquisition: Meteorological parameters involved include air temperature, humidity, air pressure and wind speed, etc. These data are obtained through meteorological stations or satellite remote sensing technology. In addition, soil moisture monitoring equipment collects data once an hour. The data recorded by the soil moisture sensor covers the year, month, day, hour, minute and second in the time dimension; the measurement dimension includes the volumetric water content of soil moisture at a depth of 20cm, 40cm, 60cm and 80cm; the spatial dimension data includes longitude, latitude and elevation information, and also records parameters such as the battery power of the device.
[0252] All collected data will be sent back to the data receiving program of the cloud server. In order to more effectively display the changes in soil moisture, the data is processed and converted into daily averages, that is, the average value of the sampling data every 24 hours is calculated.
[0253] In order to ensure the quality and reliability of data, a series of verification measures were implemented, including format check, extreme value detection, internal consistency check and time consistency check. All selected data were verified and met the quality standards, providing a reliable basis for subsequent data analysis and related decision-making.
[0254] Model construction: In this example, the deep learning GNN and Informer models are used, which can be implemented in the Tensorflow framework using Python. The WOFOST crop model can be implemented using PCSE, which is a Python package for building crop simulation models. Therefore, the two models can run in the same environment, providing a good foundation for the subsequent integration of crop models and deep learning models.
[0255] Example verification results: According to the scheme design, historical data from different sites with the same sampling interval are selected as model input, and the GCN adjacency matrix is constructed according to the site location relationship. The historical data is divided into training set and test set according to 8:2, and the GCN-Informer model is trained with the training set data. The optimal model weight is saved to predict the test set. The prediction results show that the training set R2 is 0.96 and the validation set R2 is 0.94. It can be seen that this method can accurately predict crop water requirements.
[0256] The following is a description of the large-scale crop water requirement forecasting device using a spatiotemporal fusion model under physical constraints provided by the present invention. The large-scale crop water requirement forecasting device using a spatiotemporal fusion model under physical constraints described below and the large-scale crop water requirement forecasting method using a spatiotemporal fusion model under physical constraints described above can be referenced to each other.
[0257] refer to Figure 4 , Figure 4 It is a structural schematic diagram of a large-scale crop water requirement forecasting device of a spatiotemporal fusion model under physical constraints provided by the present invention, which includes: an acquisition module 401, a feature fusion module 402 and a prediction module 403.
[0258] An acquisition module 401 is used to acquire multi-source data at a starting time and multi-source data at at least one sampling interval, wherein the multi-source data includes meteorological data, soil data, and crop data;
[0259] The feature fusion module 402 is used to encode and fuse the multi-source data at the starting time and the multi-source data at at least one sampling interval through one-dimensional convolution and multi-layer perceptron to obtain a comprehensive feature expression, wherein the comprehensive feature expression includes meteorological features at each time, soil features at each time, and crop features at each time;
[0260] The prediction module 403 is used to input the comprehensive feature expression into the trained spatiotemporal feature fusion model to obtain the crop water requirement prediction result at the target time output by the trained spatiotemporal feature fusion model, wherein the spatiotemporal feature fusion model includes a graph convolutional network model and an informer model; the graph convolutional network model is used to extract spatial features from the comprehensive feature expression, and the informer model is used to extract temporal features from the comprehensive feature expression.
[0261] Specifically, the device for predicting large-scale crop water requirement using the spatiotemporal fusion model under the above-mentioned physical constraints provided by the present invention can implement all the method steps implemented in the method embodiment for predicting large-scale crop water requirement using the spatiotemporal fusion model under the above-mentioned physical constraints, and can achieve the same technical effects. The parts and beneficial effects in this embodiment that are the same as those in the method embodiment will not be described in detail herein.
[0262] Figure 5 is a schematic diagram of the physical structure of the electronic device provided by the present invention, such as Figure 5 As shown, the electronic device may include: a processor (processor) 510, a communication interface (Communications Interface) 520, a memory (memory) 530 and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call the logic instructions in the memory 530 to execute the large-scale crop water requirement forecasting method of the spatiotemporal fusion model under physical constraints, the method comprising: obtaining multi-source data at the starting moment and multi-source data at at least one sampling interval, wherein the multi-source data comprises meteorological data, soil data and crop data; encoding and fusing the multi-source data at the starting moment and the multi-source data at at least one sampling interval through one-dimensional convolution and multi-layer perceptron to obtain a comprehensive feature expression, wherein the comprehensive feature expression comprises meteorological features at each moment, soil features at each moment and crop features at each moment; inputting the comprehensive feature expression into the trained spatiotemporal feature fusion model to obtain the crop water requirement prediction result at the target moment output by the trained spatiotemporal feature fusion model, wherein the spatiotemporal feature fusion model comprises a graph convolutional network model and an informer model; the graph convolutional network model is used to extract spatial features from the comprehensive feature expression, and the informer model is used to extract temporal features from the comprehensive feature expression.
[0263] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0264] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the large-scale crop water requirement forecasting method of the spatiotemporal fusion model under physical constraints provided by the above methods, and the method includes: obtaining multi-source data at the starting time and multi-source data at at least one sampling interval, wherein the multi-source data includes meteorological data, soil data and crop data; encoding and fusing the multi-source data at the starting time and the multi-source data at at least one sampling interval through one-dimensional convolution and multi-layer perceptron to obtain a comprehensive feature expression, wherein the comprehensive feature expression includes meteorological characteristics at each time, soil characteristics at each time and crop characteristics at each time; inputting the comprehensive feature expression into a trained spatiotemporal feature fusion model to obtain the crop water requirement prediction result at the target time output by the trained spatiotemporal feature fusion model, wherein the spatiotemporal feature fusion model includes a graph convolutional network model and an Informer model; the graph convolutional network model is used to extract spatial features from the comprehensive feature expression, and the Informer model is used to extract temporal features from the comprehensive feature expression.
[0265] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the method for predicting large-scale crop water requirement under physical constraints of the spatiotemporal fusion model provided by the above-mentioned methods, the method comprising: obtaining multi-source data at a starting moment and multi-source data at at least one sampling interval, wherein the multi-source data comprises meteorological data, soil data and crop data; encoding and fusing the multi-source data at the starting moment and the multi-source data at at least one sampling interval through one-dimensional convolution and multi-layer perceptron to obtain a comprehensive feature expression, wherein the comprehensive feature expression comprises meteorological features at each moment, soil features at each moment and crop features at each moment; inputting the comprehensive feature expression into a trained spatiotemporal feature fusion model to obtain a crop water requirement prediction result at a target moment output by the trained spatiotemporal feature fusion model, wherein the spatiotemporal feature fusion model comprises a graph convolutional network model and an Informer model; the graph convolutional network model is used to extract spatial features from the comprehensive feature expression, and the Informer model is used to extract temporal features from the comprehensive feature expression.
[0266] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0267] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0268] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A large-scale crop water requirement forecasting method based on a spatiotemporal fusion model under physical constraints, characterized in that: include: Acquire multi-source data at a starting time and multi-source data at at least one sampling interval, wherein the multi-source data includes meteorological data, soil data, and crop data; The multi-source data at the starting time and the multi-source data at the at least one sampling interval are encoded and fused by one-dimensional convolution and multi-layer perceptron to obtain a comprehensive feature expression, wherein the comprehensive feature expression includes meteorological features at each time, soil features at each time, and crop features at each time; The comprehensive feature expression is input into a trained spatiotemporal feature fusion model to obtain a crop water requirement prediction result at a target time output by the trained spatiotemporal feature fusion model, wherein the spatiotemporal feature fusion model includes a graph convolutional network model and an informer model; the graph convolutional network model is used to extract spatial features from the comprehensive feature expression, and the informer model is used to extract temporal features from the comprehensive feature expression; The layer-to-layer propagation of the graph convolutional network model refers to the following formula: ; in, A layer-to-layer propagation formula representing the graph convolutional network model; represents a nonlinear activation function; yes The degree matrix of , Represents the node connected to The information matrix composed of other matrix nodes, is the identity matrix; Represents the graph convolutional network model Characteristics of the layer; Represents the graph convolutional network model The weight matrix of the layer; The Informer model is a time series prediction model based on Transformer, including: a probability-based sparse self-attention mechanism, a distilled self-attention mechanism, and a decoder architecture to generate prediction sequences in parallel; The water demand calculation formula of the WOFOST physical model is embedded into the loss function of the spatiotemporal feature fusion model, wherein the loss function of the spatiotemporal feature fusion model refers to the following formula: ; in, represents the loss function of the spatiotemporal feature fusion model, represents the total number of samples, represents the sample index, Indicates the actual crop water requirement value, represents the predicted crop water requirement value, represents the weight coefficient of the water demand term, represents the crop water requirement simulated by the WOFOST physical model.
2. The method for predicting large-scale crop water demand using a spatiotemporal fusion model under physical constraints according to claim 1 is characterized in that: After acquiring the multi-source data at the start time and the multi-source data at at least one sampling interval, the method further includes: Inputting the multi-source data in a table form and performing time alignment on the multi-source data to obtain multi-source data in a unified format; Based on the sliding window box plot, outliers are removed from the meteorological data in the multi-source data in the unified format to obtain cleaned meteorological data; Based on the Mahalanobis distance, outliers are removed from the soil data in the unified format of multi-source data to obtain cleaned soil data; Based on a preset value range, outliers are removed from the crop data in the multi-source data in the unified format to obtain cleaned crop data; The cleaned meteorological data, the cleaned soil data, and the cleaned crop data are used as cleaned multi-source data; Performing K-nearest neighbor interpolation on the missing values of the spatial position of the cleaned multi-source data, and performing linear interpolation on the missing values of the temporal position of the cleaned multi-source data, to obtain filled multi-source data; The filled multi-source data is normalized based on maximum and minimum normalization to obtain preprocessed multi-source data.
3. The method for predicting large-scale crop water demand using a spatiotemporal fusion model under physical constraints according to claim 1, characterized in that: The encoding and fusing of the multi-source data at the starting time and the multi-source data at the at least one sampling interval by one-dimensional convolution and multi-layer perceptron to obtain a comprehensive feature expression includes: Constructing a meteorological characteristic matrix based on the meteorological characteristics of the meteorological data, the starting time, the sampling interval and the number of sampling points, wherein the meteorological characteristics include temperature, humidity, air pressure, wind speed, precipitation and sunshine hours; Performing one-dimensional convolution processing on the meteorological characteristic matrix to obtain an output characteristic graph of meteorological characteristic data; Constructing a soil characteristic matrix based on the soil characteristics of the soil data, the starting time, the sampling interval, and the number of sampling points, wherein the soil characteristics include daily average soil temperature at multiple depth positions, humidity at multiple depth positions, and water content at multiple depth positions; Performing one-dimensional convolution processing on the soil characteristic matrix to obtain an output characteristic map of soil characteristic data; Constructing a crop feature matrix based on the crop features of the crop data, the starting time, the sampling interval, and the number of sampling points, wherein the crop features include crop type, crop plant height, crop root depth, crop leaf area index, and crop chlorophyll content; Performing one-dimensional convolution processing on the crop feature matrix to obtain an output feature map of the crop feature data; The output feature map of the meteorological feature data, the output feature map of the soil feature data and the output feature map of the crop feature data are input into a multi-layer perceptron to obtain a comprehensive feature expression of the multi-layer perceptron output.
4. The method for predicting large-scale crop water demand using a spatiotemporal fusion model under physical constraints according to claim 1, characterized in that: The step of inputting the comprehensive feature expression into a trained spatiotemporal feature fusion model to obtain a crop water requirement prediction result at a target time output by the trained spatiotemporal feature fusion model includes: Determine the target node corresponding to the meteorological data at the target time, the soil data at the target time, and the crop data at the target time in the comprehensive feature expression; The features of the neighboring nodes of the target node are weightedly aggregated through the graph convolutional network model of the trained spatiotemporal feature fusion model to obtain the spatial features of the target node; By using the Informer model of the trained spatiotemporal feature fusion model, a long time series expressed by the comprehensive features is determined based on a self-attention mechanism; and based on the long time series expressed by the comprehensive features, the temporal features of the target node are determined; Through the trained spatiotemporal feature fusion model, the crop water requirement prediction result at the target moment is determined based on the spatial feature of the target node and the temporal feature of the target node.
5. The method for predicting large-scale crop water demand using a spatiotemporal fusion model under physical constraints according to claim 1, characterized in that: Before inputting the comprehensive feature expression into the trained spatiotemporal feature fusion model to obtain the crop water requirement prediction result at the target time output by the trained spatiotemporal feature fusion model, the method further includes: Acquire multi-source data samples, and divide the multi-source data samples into a training sample set and a test sample set according to a preset ratio; The preset spatiotemporal feature fusion model is trained based on the training sample set, and the preset spatiotemporal feature fusion model is gradient updated based on the Adam optimizer to obtain a trained spatiotemporal feature fusion model; The trained spatiotemporal feature fusion model is evaluated based on the root mean square error, the mean absolute error, and the determination coefficient to obtain a trained spatiotemporal feature fusion model.
6. The method for predicting large-scale crop water demand using a spatiotemporal fusion model under physical constraints according to claim 5, characterized in that: The method further comprises: Inputting the training sample set into a preset WOFOST physical model to obtain a simulated crop water requirement output by the preset WOFOST physical model; Inputting the training sample set into a preset spatiotemporal feature fusion model to obtain a predicted crop water requirement output by the preset spatiotemporal feature fusion model; Based on the actual crop water requirement of the training sample set, the simulated crop water requirement and the predicted crop water requirement, a loss function of the preset spatiotemporal feature fusion model under the constraints of the WOFOST physical model is determined.
7. A large-scale crop water demand forecasting device based on a spatiotemporal fusion model under physical constraints, characterized in that: include: An acquisition module, used to acquire multi-source data at a starting time and multi-source data at at least one sampling interval, wherein the multi-source data includes meteorological data, soil data and crop data; A feature fusion module, used for encoding and fusing the multi-source data at the starting time and the multi-source data at the at least one sampling interval through one-dimensional convolution and multi-layer perceptron to obtain a comprehensive feature expression, wherein the comprehensive feature expression includes meteorological features at each time, soil features at each time, and crop features at each time; A prediction module, used for inputting the comprehensive feature expression into a trained spatiotemporal feature fusion model to obtain a crop water requirement prediction result at a target time output by the trained spatiotemporal feature fusion model, wherein the spatiotemporal feature fusion model includes a graph convolutional network model and an informer model; the graph convolutional network model is used for performing spatial feature extraction on the comprehensive feature expression, and the informer model is used for performing temporal feature extraction on the comprehensive feature expression; The layer-to-layer propagation of the graph convolutional network model refers to the following formula: ; in, A layer-to-layer propagation formula representing the graph convolutional network model; represents a nonlinear activation function; yes The degree matrix of , Represents the node connected to The information matrix composed of other matrix nodes, is the identity matrix; Represents the graph convolutional network model Characteristics of the layer; Represents the graph convolutional network model The weight matrix of the layer; The Informer model is a time series prediction model based on Transformer, including: a probability-based sparse self-attention mechanism, a distilled self-attention mechanism, and a decoder architecture to generate prediction sequences in parallel; The large-scale crop water requirement forecasting device of the spatiotemporal fusion model under physical constraints is also used to embed the water requirement calculation formula of the WOFOST physical model into the loss function of the spatiotemporal feature fusion model, wherein the loss function of the spatiotemporal feature fusion model refers to the following formula: ; in, represents the loss function of the spatiotemporal feature fusion model, represents the total number of samples, represents the sample index, Indicates the actual crop water requirement value, represents the predicted crop water requirement value, represents the weight coefficient of the water demand term, represents the crop water requirement simulated by the WOFOST physical model.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for predicting large-scale crop water demand using a spatiotemporal fusion model under physical constraints as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for predicting large-scale crop water demand using a spatiotemporal fusion model under physical constraints as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for predicting large-scale crop water demand using a spatiotemporal fusion model under physical constraints as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Long-time-sequence traffic flow prediction method based on graph convolution-Informer model
CN113487061A
Traffic speed prediction method and device based on space-time attention graph convolutional network
CN113705880A