A soil moisture prediction method and device based on deep learning
By combining STL decomposition and causal LSTM models, the accuracy and responsiveness of soil moisture prediction are enhanced, solving the problem of insufficient prediction of traditional methods under extreme climatic conditions, and is suitable for precision agriculture and water resources management.
Patent Information
- Application Number
- CN202510889383.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2045-06-30
AI Technical Summary
Existing soil moisture prediction methods are subject to data scarcity, high model complexity, and insufficient response capabilities under extreme climatic conditions, resulting in insufficient prediction accuracy and making it difficult to meet the needs of precision agriculture and water resources management.
A soil moisture prediction method based on deep learning is adopted. Multi-time scale features are extracted through STL decomposition. Combined with the causal LSTM model, a causal tree structure is constructed to enhance the interpretability and responsiveness of the model, and the fully connected layer is integrated for prediction.
It improves the accuracy and responsiveness of soil moisture forecasting, especially in the case of long-term trends and short-term mutations, and provides reliable technical support.
Smart Images

Figure CN120387148B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a soil moisture prediction method, and in particular to a soil moisture prediction method and device based on deep learning. Background Art
[0002] Soil moisture is a crucial factor influencing agricultural production, drought disaster warning, and water resource management. With the intensification of global climate change, extreme weather events (such as droughts and heavy rains) are becoming more frequent, significantly impacting the dynamics of soil moisture. Therefore, accurate and timely soil moisture prediction is crucial for precision agriculture and efficient water resource utilization. Currently, soil moisture prediction primarily relies on physical models and statistical methods, but these approaches often face challenges such as data scarcity, high model complexity, and insufficient responsiveness to extreme climate conditions.
[0003] Traditional soil moisture prediction methods mostly rely on physics-based hydrological models (such as water infiltration and evaporation transport models). These methods simulate soil moisture movement to predict its changes. However, these physical models typically require extensive input data and rely on complex soil parameters and environmental factors, making accurate predictions difficult in practical applications, especially under climate change or extreme meteorological conditions. Furthermore, the high computational complexity and slow processing speed of physical models limit their application in rapid-response scenarios.
[0004] With the development of machine learning technologies, particularly deep learning methods, soil moisture forecasting has gradually shifted to prediction models based on historical data. LSTM (Long Short-Term Memory) networks, as a deep learning model, have been widely used in time series forecasting, demonstrating their superiority in capturing long-term dependencies. However, the accuracy of LSTM models is often limited by the quality of input data and the model's modeling capabilities. This is particularly true given the complex meteorological drivers of soil moisture, significantly compromising their accuracy. Summary of the Invention
[0005] Purpose of the invention: To address the above problems, the present invention proposes a soil moisture prediction method and device based on deep learning, which enhances the interpretability of the model and its ability to respond to long-term trends and short-term mutations.
[0006] Technical solution: The technical solution adopted by the present invention is a soil moisture prediction method based on deep learning, including:
[0007] Obtain the historical time series of soil moisture and various meteorological factors;
[0008] According to the soil moisture historical time series, a decomposition term time series is obtained by using the seasonal trend decomposition method STL, wherein the decomposition terms include: trend term, seasonal term and residual term;
[0009] Based on the historical time series of each meteorological factor and the time series of each decomposition item, a prediction result of each decomposition item is obtained by using a causal long short-term memory network LSTM sub-model corresponding to each decomposition item. The process of constructing the causal long short-term memory network LSTM sub-model includes: based on the historical time series of the trend item and each meteorological factor, using a causal test method, analyzing the causal relationship between the trend item and the meteorological variable to obtain a dynamic causal adjacency matrix, obtaining a causal tree structure based on the dynamic causal adjacency matrix, and constructing a causal LSTM sub-model based on the causal tree structure.
[0010] The prediction results of the decomposition items output by each causal LSTM sub-model are fused through the fully connected layer, and the final prediction value of soil moisture in the future period is output through the output layer.
[0011] A preferred solution is that the causal long short-term memory network LSTM sub-models corresponding to each decomposition item include: a trend item sub-model, a seasonal item sub-model, and a residual item sub-model, and each sub-model architecture is constructed based on the causal LSTM structure;
[0012] The trend item sub-model adopts a single-item causal LSTM structure;
[0013] The seasonal term sub-model has a global pooling layer after the seasonal encoder and layer normalization to extract global seasonal features. An attention mechanism is introduced before the fully connected layer of the seasonal term sub-model to generate context vectors and attention weights.
[0014] The residual term sub-model adopts a bidirectional causal LSTM structure and combines the two global feature extraction methods of maximum pooling and average pooling to obtain maximum pooling features and average pooling features. The maximum pooling features and average pooling features are connected with the residual encoding features through the tensor connection function and then input into the fully connected layer of the residual term sub-model.
[0015] In a preferred embodiment, the causal test method includes the Pearson correlation coefficient, the maximum information coefficient, and the Granger causality test; by calculating the correlation and causal relationship between the soil moisture trend time series and the meteorological factors, a binary matrix corresponding to each test method is generated according to a set threshold, and the binary matrix is merged using a logical or strategic method to obtain a dynamic causal adjacency matrix;
[0016] Obtaining a causal tree structure based on a dynamic causal adjacency matrix includes: the causal tree structure expands layer by layer from bottom to top, starting from a leaf node, and connecting layer by layer to the parent node that has a causal influence on the current node; setting soil moisture as a leaf node, and searching for a factor with a value of 1 through the causal adjacency matrix as the parent node pointing to the soil moisture leaf node, and the parent node as the tree node of the second layer; then searching for a causal node pointing to the tree node of the second layer through the causal adjacency matrix as the tree node of the third layer, until there is no root node with causal pointing.
[0017] A preferred solution is that the fully connected layer fuses the prediction results of each decomposition item by adaptively adjusting the weight of each decomposition item; the fully connected layer adopts a ReLU activation layer.
[0018] The causal long short-term memory network LSTM sub-model is trained using a data set. The training process includes: dividing the data set into a training set, a validation set, and a test set. The training set is used for model training, the validation set is used for hyperparameter optimization, and the test set is used to evaluate the effectiveness of the model prediction. The data set includes the time series of each decomposition item and the historical time series of each meteorological factor.
[0019] The acquisition of the historical time series of soil moisture and the historical time series of various meteorological factors is carried out over a period of two years or more.
[0020] The present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the soil moisture prediction method based on deep learning is implemented.
[0021] The present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the soil moisture prediction method based on deep learning is implemented.
[0022] The present invention provides a computer program product, comprising a computer program and / or instructions, which, when executed by a processor, implement the soil moisture prediction method based on deep learning.
[0023] The present invention also provides a soil moisture prediction device based on deep learning, comprising:
[0024] Data acquisition module, used to obtain the historical time series of soil moisture and various meteorological factors;
[0025] A time series decomposition module is used to decompose the soil moisture historical time series according to the seasonal trend decomposition method STL to obtain a decomposition term time series, wherein the decomposition terms include: trend term, seasonal term and residual term;
[0026] The causal analysis module is used to obtain key meteorological driving factors by analyzing the historical time series of decomposition items and various meteorological factors. This includes: analyzing the causal relationship between each decomposition item and the meteorological variable through the causal test method based on the historical time series of the decomposition items and various meteorological factors, obtaining a dynamic causal adjacency matrix, and obtaining a causal tree structure based on the dynamic causal adjacency matrix;
[0027] The causal LSTM prediction module builds a causal LSTM sub-model based on the causal tree structure. It is used to obtain the prediction results of each decomposition item based on the historical time series of each meteorological factor and the time series of each decomposition item through the causal long short-term memory network LSTM sub-model corresponding to each decomposition item.
[0028] The fusion output module is used to fuse the prediction results of the decomposition items output by each LSTM sub-model through the fully connected layer, and output the final predicted value of soil moisture in the future period through the output layer.
[0029] Beneficial effects: Compared with the existing technology, the present invention has the following advantages: the present invention effectively extracts the multi-time scale characteristics of soil moisture data through STL decomposition; comprehensively applies a variety of causal monitoring methods to dynamically screen meteorological driving factors, improves the accuracy and adaptability of causal relationships, and enhances the interpretability of the model; integrates STL, causal information and time-dependent characteristics to optimize soil moisture prediction accuracy, effectively solves the problem of insufficient prediction accuracy of traditional prediction models under complex meteorological conditions, significantly improves the stability of long-term trends and the ability to respond to short-term mutations (such as extreme weather events), and provides reliable technical support for precision agricultural irrigation, drought and flood warning, etc. The innovation of the present invention lies in the integration of causal information and time-dependent characteristics, which enhances the interpretability of the model and its ability to respond to long-term trends and short-term mutations. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 is a flow chart of the soil moisture prediction method based on deep learning according to the present invention;
[0031] Figure 2 It is the STL decomposition flowchart;
[0032] Figure 3 is a schematic diagram of the causal LSTM architecture of the present invention;
[0033] Figure 4 This paper compares the results of soil moisture process prediction using different soil moisture prediction methods. DETAILED DESCRIPTION
[0034] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0035] Example 1:
[0036] The soil moisture prediction method based on deep learning described in the present invention has a flow chart as follows: Figure 1 The present invention is based on soil moisture prediction calculations that integrate time series decomposition and causal deep learning. Taking data collected from station A in a certain river basin from 2015 to 2023 as an example, the specific implementation steps are as follows (the step numbers are for convenience in introducing the specific implementation method and do not indicate a specific order between the steps):
[0037] Step 1: Obtain time series data on soil moisture and meteorological data for the station. Soil moisture data can come from soil moisture observation sites or satellite data, such as SMAP. These data typically include dates and corresponding soil moisture values. Meteorological data, including variables such as temperature, precipitation, and evaporation, are obtained from site observations or satellite data, such as the ERA5-Land dataset, which also includes corresponding date information.
[0038] Soil moisture data: The data is formatted as a CSV file, containing a date column and a measured soil moisture column. You can use the Python pandas library to load the data and preprocess it to ensure that the date format is correct and that the numeric columns contain no outliers.
[0039] Meteorological data: Also in CSV format, it contains a date column (date) and multiple meteorological variables (temperature, precipitation, and evaporation). Missing meteorological data can be interpolated and filled, and the date can be aligned with the soil moisture data to ensure the integrity of the time series.
[0040] Step 2: Use seasonal trend decomposition (STL) to decompose the soil moisture time series data. Decompose the soil moisture time series data of station A into three components: trend term, seasonal term, and residual term. The STL decomposition process is as follows: Figure 2 As shown in the figure, decomposition items are output through operations such as detrending and deseasonalization. The decomposition items and the meteorological factors after date alignment are combined into a single dataset, which is then divided into training, validation, and test sets in a ratio of 7:1:2. The training set serves as the model training input, the validation set is used for hyperparameter optimization, and the test set is used to evaluate the final actual performance of the model prediction.
[0041] Step 3: Perform causal tests on the trend term, seasonal term, and residual term of the historical soil moisture time series with different meteorological factors to construct a causal tree structure. The following is an example of the trend term of station A:
[0042] The Pearson correlation coefficient was used to test for possible linear correlations between the trend term and different meteorological factors, with a threshold of 0.5. The maximum information coefficient was used to test for possible nonlinear relationships between the trend term and different meteorological factors, with a threshold of 0.5. The Granger causality test was used to test for possible time series causal relationships between the trend term and different meteorological factors, with a p-value threshold of 0.05. Correlations and causal relationships between the soil moisture trend term and meteorological factors were calculated. Depending on the threshold, each test method generated a binary matrix (0 or 1), representing the causal relationship discovered by that test method. The multiple binary matrices obtained from the analysis were merged to form a dynamic causal adjacency matrix. "Dynamic" means that different causal adjacency matrices can be generated based on different thresholds or merging strategies set by the test method. For example, a Pearson correlation coefficient threshold of 0.7 or 0.5 might produce different matrices, or a "logical union" strategy might produce different matrices. This is at the causal test level, at the input level, where different meteorological factors are selected, resulting in different matrices. The adjacency matrix merging process uses a "logical OR" strategy. That is, if any test method finds a causal relationship, the relationship is retained in the final matrix. The adjacency matrix is used to determine the causal dependency between features and further construct a causal tree structure. The core idea of the causal tree is to represent the causal relationship between time series features as a directed tree structure, so that the LSTM can process features according to the causal relationship, rather than simply treating all features equally. The causal tree structure expands layer by layer from the bottom up, starting from the leaf node and connecting the parent nodes that have a causal influence on the current node.
[0043] Preferably, soil moisture is selected as a leaf node. The causal adjacency matrix is used to find factors with a value of 1, which serve as parent nodes pointing to them. For example, evaporation and precipitation serve as second-level tree nodes. This process continues by analogy, searching for causal nodes pointing to factors like evaporation through the adjacency matrix until a root node with no causal links remains. A simple example is: air temperature → evaporation → soil moisture. The causal tree structure is used to describe the causal state of units in LSTM, assigning different weights to each variable to prevent completely black-box predictions.
[0044] Step 4: Based on the trend term, seasonal term, and residual term obtained from the STL decomposition, construct an independent causal LSTM sub-model for each decomposition term. The specific steps are explained using the construction of the causal LSTM sub-model for the soil moisture trend term as an example:
[0045] like Figure 3As shown in the figure, within each node unit, the standard LSTM structure is used to process the input features, the hidden state (h_prev) of the previous time step, and the unit state (c_prev), and the input gate (i), forget gate (f), and output gate (o) are used to control the flow of information. By calculating the activation values of the input gate, forget gate, and output gate, the unit state (c) and hidden state (h) are updated.
[0046] The state update of each node unit depends not only on its own input and the state of the previous time step, but also on the state of its child nodes (i.e., the nodes associated with it in the causal tree). This vertical information transmission mechanism updates the state of the current node by considering the state and influence of the parent node (or upstream node) in the causal relationship tree between the soil moisture trend item and the meteorological factor.
[0047] The causal LSTM sub-model is constructed based on the causal tree structure. The LSTM model architecture based on the causal relationship structure is adopted. In order to integrate causal information into LSTM, Introducing a new state (called a causal state, denoted by ), through the parent node in the causal structure (corresponding to the current node ) to constrain the hidden state of LSTM (denoted as ), which can be used to The causal relationship (i.e. ) to constrain the nodes generated by the original LSTM The hidden state of ). Because the causal state contains both temporal dependency and causal information, the causal state of the leaf node is input into the fully connected layer for prediction in a non-hidden state.
[0048] CLSTM can learn the temporal dependency and causal information of each node in the causal structure through the following formulas. These formulas can be adjusted or improved as needed.
[0049] For the time step Each node on , whose input includes the feature vector , the hidden state and cell state of the previous time step ( and ), and the causal state of the parent node in the upper layer of the causal structure , Representation node The set of all parent node indexes.
[0050] First, the time step t( and )’s hidden state and cell state, the design process is consistent with the classic LSTM model:
[0051] Input Gate:
[0052] ;
[0053] Forget Gate:
[0054] ;
[0055] Current cell status:
[0056] ;
[0057] Output gate:
[0058] ;
[0059] Current hidden status:
[0060] ;
[0061] Secondly, use the parent node through the following steps The causal state of the hidden state Perform combined constraints to obtain nodes The causal state at the current time step. This process consists of three steps:
[0062] Step 1: For the parent node set Each node (or index) j in the hidden state and nodes The corresponding weights of the causal state are calculated as follows:
[0063] ;
[0064] Step 2: The weights generated by the previous step Integration Node Causal state information of all parent nodes:
[0065] ;
[0066] Step 3: Calculate the parent node Combine causal information with the current hidden state The weights of the nodes are generated by weighted summation The causal state of:
[0067] ;
[0068] ;
[0069] ;
[0070] in represents the weight, Represents deviation, is the S-type function, tanh is the hyperbolic tangent function, Represents point-by-point multiplication. Note that the formulas in steps 2 and 3 do not apply to the root node (i.e., a node without a parent node). The causal state of the root node is Equivalent to hidden state , because there is no information from the causal driver to constrain the hidden state. The causal state of the leaf node is input into the fully connected layer (the number of neurons is 1 and the activation function is tanh) to obtain the predicted value.
[0071] The above weight calculation formula is the one used in this embodiment, and various other formulas can be used. The formula can be adjusted or improved as needed.
[0072] Trend items usually manifest as long-term, smooth changes and do not require complex feature extraction. Therefore, a single-item LSTM structure is used to model trend items to capture long-term changes in the data. This sub-model can handle long-term dependencies in time series data and predict long-term trends in soil moisture.
[0073] To better capture the seasonal changes in soil moisture, the seasonal term sub-model designs a global pooling layer to capture the overall seasonal pattern, and introduces an attention mechanism that can automatically identify key time points in seasonal changes, enabling it to perform well in processing periodic patterns.
[0074] In order to capture short-term fluctuations and noise and improve the model's adaptability to abnormal situations, the residual term sub-model adopts a bidirectional LSTM structure and combines two global feature extraction methods, maximum pooling and average pooling, so that the model can simultaneously capture prominent abnormal fluctuations (through maximum pooling) and overall fluctuation trends (through average pooling).
[0075] Step 5: Fusion the prediction results of the three sub-models to obtain the final soil moisture prediction result. The specific operations are as follows:
[0076] The fusion process uses a fully connected layer (such as a ReLU activated layer) to process the output of each sub-model to produce a comprehensive prediction result. The aggregator does not simply add the prediction values of the three components, but intelligently combines them through learnable weights, which can adaptively adjust the contribution of each component in different situations.
[0077] During the fusion process, the outputs of each sub-model are first concatenated (that is, the prediction results of the trend term, seasonal term, and residual term are concatenated into a vector), and then processed through multiple fully connected layers. These fully connected layers further improve the prediction accuracy by learning the relationship between the sub-models. The activation function uses ReLU, which can effectively capture nonlinear relationships and improve the expressiveness of the model.
[0078] After being processed by the fusion network, the soil moisture prediction result is finally generated through a linear output layer. The function of this output layer is to map the fused features to the target variable, that is, the numerical prediction of soil moisture. Figure 4 As shown in the figure, the results of soil moisture process prediction using different methods are compared. SCL is the method proposed by this invention, namely STL+Cause and Effect+LSTM; SLSTM is STL+LSTM; CLSTM is Cause and Effect+LSTM, and LSTM is a prediction model that uses long short-term memory network alone. Figure 4 It can be seen that the soil moisture prediction method proposed in the present invention has extremely high accuracy during the long-term smooth decline of soil moisture, and its response ability to short-term mutations is also improved to a certain extent.
[0079] Step 6: Select R² (coefficient of determination), RMSE (root mean square error), MAE (mean absolute error), and KGE (Kling-Gupta efficiency coefficient) as the accuracy evaluation indicators of the model prediction results. The specific formula is as follows:
[0080] ;
[0081] ;
[0082] ;
[0083] ;
[0084] Table 1 Comparison of the SCL results of the proposed method and other different methods (ablation experiments)
[0085]
[0086] The above prediction results are multi-step prediction results for the next seven days. In terms of accuracy, single-step prediction can achieve higher accuracy.
[0087] Example 2:
[0088] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned soil moisture prediction method based on deep learning when executing the computer program.
[0089] Example 3:
[0090] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the computer program implements the above-mentioned soil moisture prediction method based on deep learning.
[0091] Example 4:
[0092] In one embodiment, a computer program product is provided, comprising a computer program / instruction, which, when executed by a processor, implements the soil moisture prediction method based on deep learning.
[0093] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0094] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0095] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0096] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0097] Example 5:
[0098] The soil moisture prediction device based on deep learning of the present invention comprises:
[0099] Data acquisition module: used to obtain soil moisture and meteorological factor data in real time as model input.
[0100] Time series decomposition module: Execute the seasonal trend decomposition method (STL method) to extract the trend term, seasonal term and residual term of the historical soil moisture time series as the input item of the next module. The results can also be selectively published to the user terminal.
[0101] Causal analysis module: Based on the generated causal adjacency matrix, it analyzes the causal relationship between soil moisture and meteorological factors, and further builds a causal tree to provide a basis for subsequent causal LSTM modeling. The causal tree construction results are published to the user terminal for users to make causal decisions.
[0102] The Causal LSTM Prediction Module includes three independent sub-models, one for trend, one for seasonality, and one for residuals. Each sub-model uses causal LSTM node units for time series modeling. A causal LSTM model is constructed based on the causal tree generated by the causal analysis module to convey causal information. The dataset is divided into training, validation, and test sets in a ratio of 7:1:2. The training set serves as the model training input, the validation set is used for hyperparameter optimization, and the test set is used to evaluate the final performance of the model's predictions.
[0103] Fusion output module: The output of the sub-model is fused through a fully connected network (such as the ReLU activation layer), the final soil moisture prediction value is calculated, and published to the user terminal.
[0104] The detailed execution process of each module can be found in the specific content of Example 1.
Claims
1. A soil moisture prediction method based on deep learning, characterized in that: include: Obtain the historical time series of soil moisture and various meteorological factors; According to the soil moisture historical time series, a seasonal trend decomposition method STL is used to decompose the time series of decomposition items, wherein the decomposition items include trend items, seasonal items and residual items; Based on the historical time series of each meteorological factor and the time series of each decomposition item, a prediction result of each decomposition item is obtained by using a causal long short-term memory network LSTM sub-model corresponding to each decomposition item. The process of constructing the causal long short-term memory network LSTM sub-model includes: analyzing the causal relationship between each decomposition item and the meteorological variable through a causal test method based on the historical time series of the decomposition item and each meteorological factor to obtain a dynamic causal adjacency matrix, obtaining a causal tree structure based on the dynamic causal adjacency matrix, and constructing a causal LSTM sub-model based on the causal tree structure. The prediction results of the decomposition items output by each causal LSTM sub-model are fused through the fully connected layer, and the final predicted value of soil moisture in the future period is output through the output layer; The causal long short-term memory network (LSTM) sub-models corresponding to each decomposition item include: trend item sub-model, seasonal item sub-model, and residual item sub-model. The architecture of each sub-model is built based on the causal LSTM structure. The trend item sub-model adopts a unidirectional LSTM structure; The seasonal term sub-model has a global pooling layer after the seasonal encoder and layer normalization to extract global seasonal features. An attention mechanism is introduced before the fully connected layer of the seasonal term sub-model to generate context vectors and attention weights. The residual term sub-model adopts a bidirectional LSTM structure and combines the two global feature extraction methods of maximum pooling and average pooling to obtain maximum pooling features and average pooling features. The maximum pooling features and average pooling features are connected with the residual encoding features through the tensor connection function and then input into the fully connected layer of the residual term sub-model.
2. The soil moisture prediction method based on deep learning according to claim 1, characterized in that: The causal test methods include Pearson correlation coefficient, maximum information coefficient and Granger causality test; by calculating the correlation and causal relationship between the time series of each decomposition item of soil moisture and meteorological factors, a binary matrix corresponding to each test method is generated according to a set threshold, and the binary matrix is merged using logic or strategy to obtain a dynamic causal adjacency matrix; Obtaining a causal tree structure according to the dynamic causal adjacency matrix includes: expanding the causal tree structure layer by layer from bottom to top, starting from a leaf node, and connecting the parent nodes that have a causal influence on the current node layer by layer; Set soil moisture as a leaf node, and use the dynamic causal adjacency matrix to find a factor with a value of 1 as the second-level tree node pointing to the soil moisture leaf node; then use the dynamic causal adjacency matrix to find the causal node pointing to the second-level tree node as the third-level tree node, until there is no root node with causal pointing.
3. The soil moisture prediction method based on deep learning according to claim 1, characterized in that: The fully connected layer adaptively adjusts the weights of each decomposition item to fuse the prediction results of each decomposition item; the fully connected layer adopts a ReLU activation layer.
4. The soil moisture prediction method based on deep learning according to claim 1, characterized in that: The causal long short-term memory network LSTM sub-model is trained using a data set. The training process includes: dividing the data set into a training set, a validation set, and a test set. The training set is used for model training, the validation set is used for hyperparameter optimization, and the test set is used to evaluate the effectiveness of the model prediction. The data set includes the time series of each decomposition item and the historical time series of each meteorological factor.
5. The soil moisture prediction method based on deep learning according to claim 1, characterized in that: The acquisition of the historical time series of soil moisture and the historical time series of various meteorological factors is carried out over a period of two years or more.
6. A computer 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 soil moisture prediction method based on deep learning described in any one of claims 1 to 5 is implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the soil moisture prediction method based on deep learning as described in any one of claims 1 to 5.
8. A computer program product comprising a computer program and / or instructions, characterized in that When the computer program and / or instructions are executed by a processor, the soil moisture prediction method based on deep learning described in any one of claims 1 to 5 is implemented.
9. A soil moisture prediction device based on deep learning, characterized in that: include: Data acquisition module, used to obtain the historical time series of soil moisture and various meteorological factors; A time series decomposition module is used to decompose the soil moisture historical time series according to the seasonal trend decomposition method STL to obtain a time series of decomposition items, wherein the decomposition items include: trend items, seasonal items and residual items; The causal analysis module is used to obtain key meteorological driving factors by analyzing the historical time series of decomposition items and various meteorological factors. This includes: analyzing the causal relationship between each decomposition item and the meteorological variable through the causal test method based on the historical time series of the decomposition items and various meteorological factors, obtaining a dynamic causal adjacency matrix, and obtaining a causal tree structure based on the dynamic causal adjacency matrix; The causal LSTM prediction module constructs a causal LSTM sub-model based on the causal tree structure. It is used to obtain the prediction results of each decomposition item based on the historical time series of each meteorological factor and the time series of each decomposition item through the causal long short-term memory network LSTM sub-model corresponding to each decomposition item. The causal long short-term memory network LSTM sub-model corresponding to each decomposition item includes: a trend item sub-model, a seasonal item sub-model, and a residual item sub-model. The architecture of each sub-model is constructed based on the causal LSTM structure. The trend item sub-model adopts a unidirectional LSTM structure. The seasonal item sub-model has a global pooling layer after the seasonal encoder and layer normalization to extract global seasonal features, and introduces an attention mechanism before the fully connected layer of the seasonal item sub-model to generate context vectors and attention weights. The residual item sub-model adopts a bidirectional LSTM structure and combines the two global feature extraction methods of maximum pooling and average pooling to obtain maximum pooling features and average pooling features. The maximum pooling features and average pooling features are connected with the residual encoding features through a tensor connection function and then input into the fully connected layer of the residual item sub-model. The fusion output module is used to fuse the prediction results of the decomposition items output by each causal LSTM sub-model through the fully connected layer, and output the final predicted value of soil moisture in the future period through the output layer.
Citation Information
Patent Citations
Soil moisture content prediction method based on LSTM deep learning model
CN110084367A
Weather prediction method and system based on sequence decomposition composition and attention mechanism
CN117852729A
Short-term load prediction method and system fusing time sequence decomposition and machine learning model, and storage medium
CN118229119A