Soil Moisture Prediction Method Based on Physical Process Attention Encoding-Decoding LSTM Model

By using physical process-based attention encoding decoding LSTM model in soil moisture prediction, combined with the intermediate variables of the HBV hydrological physical model, the problems of spatiotemporal variability processing and physical process integration in soil moisture prediction are solved, and higher prediction accuracy and generalization ability are achieved.

CN118940160BActive Publication Date: 2025-06-24CHANGCHUN NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411153495.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2025-06-24
Estimated Expiration
2044-08-21

AI Technical Summary

Technical Problem

The prior art is difficult to effectively deal with the spatiotemporal variability of soil characteristics and integrate physical processes and data-driven models to improve soil moisture prediction accuracy.

Method used

The LSTM model is decoded based on physical processes. By obtaining the surface soil moisture value and its influencing factors at historical moments, the HBV hydrological physical model is input to obtain intermediate variable data, and the correlation analysis is performed to select key characteristic variables. Combining these variables for model training is carried out to predict future soil moisture.

Benefits of technology

Improved the accuracy and generalization ability of soil moisture prediction, especially in extreme climate regions, which outperforms traditional deep learning models, demonstrating the strong potential of combining deep learning with physical models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118940160B_ABST
    Figure CN118940160B_ABST
Patent Text Reader

Abstract

The present invention provides a method for predicting soil moisture based on a physical-process-based attention-encoding and decoding LSTM model, including: obtaining the surface soil moisture values and their influencing factors at each historical moment, where the influencing factors include atmospheric forcing variables, land surface variables, and static variables; inputting some of the influencing factors into the HBV hydrological physical model and running it to obtain intermediate variable data; performing a correlation analysis between the intermediate variable data and the surface soil moisture to select the intermediate feature variable combination most relevant to the surface soil moisture; using the influencing factors and the intermediate feature variable combination as input data to train a preset attention-based encoding and decoding LSTM model so that the model reaches a preset accuracy, obtaining a trained soil moisture model; and predicting the surface soil moisture at a future moment through the trained soil moisture model. The present invention demonstrates the powerful potential of the combination of deep learning and physical models, providing a new direction for efficient and accurate hydrological models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of soil moisture prediction, and particularly relates to a soil moisture prediction method based on a physical process attention-encoded and decoded LSTM model. Background Art

[0002] Soil is a natural material, and its properties may vary significantly in space and time. Traditional machine learning models usually do not have the ability to handle time dependence and capture long-term dependence relationships when dealing with soil moisture time series data, while deep learning models are specifically designed to handle these challenges and can better predict future states. Deep learning models can learn complex non-linear functions, transform low-level information into high-level features, thereby strengthening the representation of the original data. They are flexible and efficient in data processing and feature extraction, can automatically handle data missing and noise, and at the same time extract effective features from multiple data sources, such as meteorological data, soil types, etc., further improving the prediction accuracy. These models show excellent generalization ability in soil moisture prediction and are applicable to different regions, seasons, and soil types.

[0003] In hydrology, the long short-term memory (LSTM) architecture is particularly popular and shows great performance advantages in soil moisture prediction, representing a "performance leap". However, although the LSTM model shows high accuracy and generalization ability in soil moisture simulation, deep learning lacks physical mechanisms, which may lead to predictions that do not conform to physical laws and false predictions, and its application is limited.

[0004] Physical hydrological models usually allow the variability of different parameters in space and the dynamics over time, which is crucial for capturing hydrological peaks and valleys caused by geographical or seasonal changes. However, they usually require a large amount of computing resources and may not be able to accurately capture complex non-linear relationships. On the contrary, deep learning models learn complex patterns and relationships in a data-driven manner, reducing the computing requirements. Although deep learning models may lack an understanding of physical laws, they perform excellently in capturing complex non-linear relationships.

[0005] The challenge of current soil moisture prediction models is to effectively handle the spatio-temporal variability of soil properties and integrate physical processes with data-driven models to improve prediction accuracy. Although deep learning models, especially LSTM and its variants, perform excellently in dealing with time series and long-term dependencies, they usually cannot directly encode physical processes, which may lead to prediction results that do not conform to actual physical laws. Summary of the Invention

[0006] To solve the technical problems existing in the above-mentioned background art, the present invention provides a soil moisture prediction method based on a physical process attention-encoded and decoded LSTM model, including:

[0007] Obtain the surface soil moisture values and their influencing factors at each historical moment, and the influencing factors include atmospheric forcing variables, land surface variables, and static variables;

[0008] Input part of the influencing factors into the HBV hydrological physical model and run it to obtain intermediate variable data;

[0009] Conduct a correlation analysis between the intermediate variable data and the surface soil moisture, and select the intermediate characteristic variable combination that is most relevant to the surface soil moisture;

[0010] Use the influencing factors and the intermediate characteristic variable combination as input data to train a preset attention-based encoded and decoded LSTM model so that the model reaches a preset accuracy, and obtain a trained soil moisture model;

[0011] Predict the surface soil moisture at future moments through the trained soil moisture model.

[0012] As a further description of the present invention, the atmospheric forcing variables include two-meter temperature, 10-meter east-west component wind speed, 10-meter north-south component wind speed, precipitation, surface air pressure, and specific humidity;

[0013] The land surface variables include volumetric soil water layer, surface solar radiation, surface thermal radiation, soil temperature, and evaporation;

[0014] The static variables include soil water content, clay, sand, silt, and elevation data DEM.

[0015] As a further description of the present invention, the influencing factors input into the HBV hydrological physical model are the two-meter temperature, precipitation in the atmospheric forcing variables, and evaporation data in the land surface variables.

[0016] As a further description of the present invention, the intermediate variable data are snowmelt, recondensation, soil moisture content, recharge water volume, water infiltrating into the soil, shallow aquifer, and deep aquifer data.

[0017] As a further description of the present invention, the intermediate characteristic variable combination is soil moisture content and deep aquifer data.

[0018] As a further description of the present invention, the correlation analysis includes Pearson correlation coefficient calculation and random forest importance analysis.

[0019] As a further description of the present invention, the calculation formula of the Pearson correlation coefficient is as follows:

[0020] ;

[0021] Among them, and respectively represent the th observation values of two variables, and respectively represent the average values of the two variables, and ∑ represents the summation operation.

[0022] As a further illustration of the present invention, combining the influencing factors and the intermediate feature variables as input data to train a preset attention-based encoder-decoder LSTM model to make the model reach a preset accuracy, including:

[0023] Dividing the combined data of the influencing factors and the intermediate feature variables into a training set, a validation set, and a test set;

[0024] Training the preset attention-based encoder-decoder LSTM model through the training set;

[0025] Validating the trained soil moisture model through the validation set;

[0026] Testing the validated soil moisture model through the test set to ensure that the soil moisture model reaches the preset accuracy.

[0027] As a further illustration of the present invention, the training process of the attention-based encoder-decoder LSTM model specifically includes:

[0028] Taking the combination of the influencing factors and the intermediate feature variables as input data and processing it through the encoder LSTM layer, enabling the encoder to effectively extract the spatio-temporal feature representation in the input data and convert it into a hidden state of a fixed dimension;

[0029] Using the multi-head attention layer to weight the output of the encoder, highlighting the key features and establishing an effective interaction relationship between the features;

[0030] Performing a linear transformation on the attention-weighted output data through a fully connected layer to further integrate and transform the feature representation;

[0031] Processing the output data through the decoder LSTM layer, using the hidden state information of the encoder and the previous prediction results to gradually generate an output sequence and randomly discard the output data;

[0032] Performing a linear transformation on the output of the last time step through a fully connected layer to obtain the final decoder output result.

[0033] As a further illustration of the present invention, the parameter settings of the attention-based encoder-decoder LSTM model are as follows: the learning rate is set to 0.001, the hidden unit size is 128, the batch size is 64, the number of training epochs is 1000, the number of iterations is 400, the dropout rate is 0.15, the number of heads in the multi-head attention mechanism is set to 2, and the sequence length is 365 days.

[0034] Compared with the prior art, the present invention has the following beneficial technical effects:

[0035] The present invention proposes an AEDLSTM (HBV) model, which is an innovative model that combines deep learning and physics-based methods to predict global soil moisture and meets the basic requirements of flexibility and scalability. The model first utilizes the intermediate features from the HBV hydrological physics model, and these features are used as the data for model training to improve the prediction accuracy. Then, the model adopts an attention-based encoder-decoder LSTM structure, which enhances the expression ability of hydrological process features, especially in dealing with the sensitivity and accuracy of soil moisture prediction in extreme climate regions, showing better performance than traditional deep learning models. This method demonstrates the powerful potential of the combination of deep learning and physical models, providing a new direction for efficient and accurate hydrological models.

[0036] Other features and advantages of this technical solution will be described in the subsequent specification, and partly become apparent from the specification, or are understood by implementing this technical solution. The objectives and other advantages of this technical solution can be achieved and obtained through the structures specifically pointed out in the written specification and the drawings.

[0037] The following further describes the technical solution of this technical solution in detail through the drawings and embodiments. Description of the Drawings

[0038] The drawings are used to provide a further understanding of this technical solution, and constitute a part of the specification. Together with the embodiments of this technical solution, they are used to explain this technical solution and do not constitute a limitation to this technical solution. In the drawings:

[0039] Figure 1 It is a diagram of the actual operation process of the AEDLSTM (HBV) model provided by the present invention;

[0040] Figure 2 It is R in the present invention 2 , KGE and RMSE(m 3 / m 3 ) box plot;

[0041] Figure 3 It is R in the present invention 2 , KGE and RMSE(m3 / m 3 ) Scatter plot;

[0042] Figure 4 For R in the present invention 2 , KGE and RMSE (m 3 / m 3 ) CDF plot. Specific embodiments

[0043] The preferred embodiments of the present technical solution will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present technical solution, and are not used to limit the present technical solution.

[0044] The present invention provides a soil moisture prediction method based on a physical process attention encoding and decoding LSTM model, including the following steps:

[0045] S100. Obtain the surface soil moisture values and their influencing factors at each historical moment, and the influencing factors include atmospheric forcing variables, land surface variables, and static variables.

[0046] Specifically, in step S100, the atmospheric forcing variables include two-meter temperature, 10-meter east-west component wind speed, 10-meter north-south component wind speed, precipitation, surface pressure, and specific humidity; the land surface variables include volumetric soil water layer, surface solar radiation, surface thermal radiation, soil temperature, and evaporation; the static variables include soil water content, clay, sand, silt, and the elevation data DEM.

[0047] The present invention uses the LandBench dataset as the dataset for model training, and this dataset provides a standardized platform for predicting the performance of land surface variables (LSVs). Its land surface variables are derived from the ERA5-land reanalysis dataset, the atmospheric forcing variables are derived from the ERA5 reanalysis dataset, and the static variables are derived from the SoilGrids dataset, the soil water content extracted from the literature, and the vegetation cover type extracted from the literature.

[0048] Table 1 lists all the data used in the present invention. The surface soil moisture is volumetrically insignificant, equivalent to a water layer with an average thickness of 8 mm covering less than 0.001% of the global land surface, but it is crucial for influencing the development and persistence of extreme weather events such as droughts, floods, and heatwaves. Therefore, the predictive variable selected is surface soil moisture (0 - 7 cm). The simulation results of the Land Surface Model (LSM) are driven and influenced by atmospheric data, and its accuracy and reliability depend on the quality and precision of the atmospheric forcing data. The finally selected atmospheric variables include two-meter temperature, 10-meter east-west component wind speed, 10-meter north-south component wind speed, precipitation, surface pressure, and specific humidity. The thermal properties of the soil determine the rate and stability of its temperature change, while soil moisture regulates this effect. Surface radiation affects the energy input and output of the soil, and at the same time, soil moisture is closely related to evapotranspiration. These variables further regulate the energy balance and the climate system. Therefore, the land surface variables used are volumetric soil water layer, surface solar radiation, surface thermal radiation, soil temperature, and evaporation. Static variables represent unchanging soil and vegetation information, and these factors will directly or indirectly affect the distribution and change of soil moisture. The static variables we used are soil water content, clay, sand, silt, and elevation data (DEM) extracted from Yamazaki et al. (2017).

[0049] Table 1. Summary of data sources and variables of the LandBench1.0 dataset model for evaluation and comparison.

[0050]

[0051] S200. Input some influencing factors into the HBV hydro-physical model and run it to obtain intermediate variable data.

[0052] The Hydrologiska Byråns Vattenbalansavdelning (HBV) model is a well-known hydrological model for its simplicity, high performance, and persistence. The HBV model started with a basic lumped approach and later evolved into a distributed model. It includes three main physical components: snow accumulation and melting, soil moisture accounting, and runoff response, including groundwater dynamics. Its success is attributed to three key factors: simplicity, which makes the model easy to understand and reprogram; strong performance, which is particularly evident in comparative studies; and persistence, which has been continuously improved in years of continuous development and application. This simplicity and adaptability make the HBV model suitable for various climates and terrains, providing a reliable tool for global hydrological modeling. Although the core structure of the model remains consistent, many variants have been developed to adapt to different regions and applications.

[0053] In an implementable manner, the influencing factors input into the HBV hydro-physical model are the two-meter temperature, precipitation in the atmospheric forcing variables, and evaporation data in the land surface variables. The present invention utilizes the above-mentioned data including two-meter temperature, precipitation, and evaporation to simulate and generate intermediate variable data such as snowmelt (melt), refreezing, soil wetness content, recharge, water infiltration into the soil (tosoil), shallow aquifer (SUZ), and deep aquifer (SLZ) of the HBV model.

[0054] S300. Conduct a correlation analysis between the intermediate variable data and the surface soil moisture, and select the combination of intermediate characteristic variables that is most relevant to the surface soil moisture.

[0055] When combining intermediate variables with AEDLSTM, consideration of feature selection is required. The HBV model is a complex hydrological model. The combination of multiple intermediate variables may contain a large amount of information, but it may also introduce noise, resulting in a decline in model performance. Adding too many features may introduce noise, increase the risk of the curse of dimensionality, lead to overfitting and an increase in computational cost, and reduce the model efficiency and generalization ability. Therefore, selecting appropriate variables from the intermediate variables of the HBV model to add to the deep learning model training is also the key to improving model performance. The greedy nature of the feature selection algorithm may result in the inability to guarantee that the selected feature set is the best, and may select features that are not conducive to model performance. Therefore, the present invention selects correlation analysis and random forest for feature selection to improve the performance and generalization ability of the model.

[0056] Through the calculation of the correlation coefficient, the present invention quantifies the linear correlation degree between each intermediate variable and the soil moisture. The random forest, on the other hand, can capture non-linear relationships and interactions, and measure its contribution to the soil moisture by evaluating the importance of each variable in the model.

[0057] The Pearson correlation coefficient is a statistical indicator used to measure the linear correlation degree between two variables. Its value range is between -1 and 1, indicating the strength and direction of the linear relationship between the two variables. When the correlation coefficient is 1, it indicates a perfect positive correlation; when it is -1, it indicates a perfect negative correlation; when it is 0, it indicates no linear correlation. The calculation formula of the Pearson correlation coefficient is as follows:

[0058] ;

[0059] where and respectively represent the th observation values of the two variables, and represent the average values of two variables respectively, and ∑ represents the summation operation. By calculating the covariance between two variables divided by their respective standard deviations, the Pearson correlation coefficient can help researchers understand and quantify the association between variables.

[0060] Random forest is an ensemble learning method that combines multiple independent decision trees for prediction. During the training process, random forest uses the "bagging" technique to randomly sample the data, and then each decision tree is trained on a different data subset, which helps to reduce overfitting. The final prediction result is obtained by voting or averaging all the decision trees. This ensemble method effectively reduces the variance of the model and improves the generalization ability.

[0061] The present invention uses random forest and correlation analysis to evaluate the importance and correlation of seven intermediate process variables of the HBV model. As shown in Table 2, it is found that soil moisture content (soil_wetness) has the highest feature importance (0.71) and correlation (0.27), while the feature importance (0.21) and correlation (0.18) of the deep aquifer (SLZ) rank second. These two variables are the most critical factors for predicting soil moisture. Based on these results, soil moisture content and the deep aquifer are selected as the input variables of the AEDLSTM(HBV) model, aiming to enhance the prediction ability of the model through these key physical information. Introducing these two variables provides the important physical process information required for the model to accurately predict soil moisture. This step is based on the objective data of feature importance and correlation, demonstrating the application value of the deep learning model that combines data-driven and physical processes in the field of atmospheric science.

[0062] Table 2. Random forest importance and Pearson correlation coefficient of HBV model features.

[0063]

[0064] Based on the results of these feature selection methods, the present invention selects the combination of feature variables that is most relevant to the surface soil moisture. This method provides us with a general, flexible, and scalable prediction scheme, which can flexibly adjust the combination of feature variables according to the actual object to be predicted, so as to achieve better prediction results. Here, we use the word "flexible" to mean that the model can both integrate additional soil moisture information and learn the complex dependencies in the data without assuming a specific functional form. We use the word "scalable" to mean that the model can be efficiently trained on large datasets and improve as additional data increases. These features provide a basis for exploring the contributions of different geophysical datasets, relaxing model assumptions, and incorporating more data into current predictions.

[0065] S400. Use the combination of influencing factors and intermediate feature variables as input data to train a preset attention-based encoder-decoder LSTM model until the model reaches the preset accuracy, obtaining a trained soil moisture model;

[0066] Long short-term memory network (LSTM) is a special type of recurrent neural network (RNN) and has important applications in processing time series data. Compared with traditional RNN structures, LSTM introduces a gating mechanism. Through structures such as the forget gate, input gate, and output gate, it effectively solves problems such as gradient vanishing and gradient explosion in traditional RNNs, enabling it to better capture long-term dependencies, thereby improving the performance and effectiveness of the model.

[0067] Memory cells operate by selectively remembering and forgetting input data, including an input gate, an output gate, and a forget gate. When the input passes through the memory cell, it selectively retains and discards information. The first step in the LSTM network's processing is through the forget gate , and the forget gate controls whether the information in the previous memory cell is to be retained or forgotten. Its output value ranges from 0 to 1, where 1 means completely retained and 0 means completely forgotten. The calculation of the forget gate is given by formula (1). The input gate determines which new information will be stored in the memory cell. It contains a sigmoid function and a tanh function for generating update candidate values. It contains a sigmoid function and a tanh function for generating update candidate values. The sigmoid function in the input gate determines the values to be updated, and the tanh layer generates a potential update vector ; and are calculated according to formulas (2) and (3) respectively. Where is a vector with a value range of (0, 1); , and are a series of learnable parameters defined for the input gate, , and are another series of learnable parameters. Updating the memory cell will determine how the values in the memory cell are updated. It forgets past information by multiplying the old memory cell value by the output of the forget gate and updates the information in the memory cell by multiplying the new candidate value by the output of the input gate. The calculation of updating the memory cell is given by formula (4). Where ⊙ represents element-wise multiplication, ⊙ defines that the information stored in will be forgotten, ⊙ Defines new information that will be added to the cell state in the last output gate determines how the information in the memory cell is passed to the hidden state of the next time step . The output and the hidden state are shown in equations (5) and (6). Where is a vector with a value range of (0, 1), , and are three learnable parameters defined for the input gate

[0068]

[0069] In the present invention, since soil moisture data exhibits time dependence and complex non - linear patterns, affected by factors such as season, climate, and terrain, it is necessary to effectively capture the lag effect and non - linear relationship. The LSTM is selected as the neural network algorithm for processing time - series data such as soil moisture observations. Many modern machine learning software packages provide the LSTM layer as a standard function, such as PyTorch. PyTorch is an open - source Python machine learning library, originally developed by the artificial intelligence research team of Meta Platforms and now affiliated with the Linux Foundation. It is widely used in artificial intelligence fields such as computer vision and natural language processing. Therefore, the present invention uses the LSTM layer component built into the PyTorch framework

[0070] In order to further improve the accuracy of soil moisture prediction, especially in challenging predictions in extreme climate regions, the present invention takes into account that the encoder - decoder LSTM and the attention mechanism have been widely verified as effective tools in soil moisture prediction. At the same time, the present invention realizes that the physical model contains rich hydrological information, especially intermediate process variables. In view of this, the present invention proposes a new surface soil moisture prediction model named AED - LSTM (HBV). This model combines the LandBench dataset with the intermediate variable data output by the HBV hydrological physical model after feature selection as the input of the AED - LSTM model, in order to further improve the prediction performance

[0071] In one implementable way, the above - mentioned step S400 specifically includes

[0072] S410: Divide the combination data of influencing factors and intermediate feature variables into a training set, a validation set, and a test set

[0073] S420: Train a preset attention - based encoder - decoder LSTM model through the training set

[0074] S430: Validate the trained soil moisture model using the validation set;

[0075] S440: Test the validated soil moisture model using the test set to ensure that the soil moisture model reaches the preset accuracy.

[0076] The training process of the attention-based encoder-decoder LSTM model in the above step S420 specifically includes:

[0077] S421: Use the combination of influencing factors and intermediate feature variables as input data, which is processed by the encoder LSTM layer, enabling the encoder to effectively extract the spatio-temporal feature representation in the input data and convert it into a hidden state of a fixed dimension;

[0078] S422: Use the multi-head attention layer to perform weighted processing on the output of the encoder, highlighting key features and establishing an effective interaction relationship between features;

[0079] S423: Perform a linear transformation on the attention-weighted output data through a fully connected layer to further integrate and transform the feature representation;

[0080] S424: Process the output data through the decoder LSTM layer, and use the hidden state information of the encoder and previous prediction results to gradually generate the output sequence, and randomly discard the output data;

[0081] S425: Perform a linear transformation on the output of the last time step through a fully connected layer to obtain the final decoder output result.

[0082] As Figure 1 shown, it is the process diagram of the actual operation of the above AEDLSTM (HBV) of the present invention. The present invention uses the temperature, precipitation, and evapotranspiration data from 2000 to 2020 in the dataset as the input of the HBV model, runs the HBV model to obtain 20-year intermediate variable data, and calculates the correlation coefficient and random forest importance between these variable data and the surface soil moisture. Thus, we select the optimal combination according to the correlation and importance rankings of these variables for experiments. Finally, the land surface variables, atmospheric forcing variables, static variables, and the optimal intermediate variables are used as input data for training, validation, and testing.

[0083] First, the input data is processed by the encoder LSTM layer. The encoder can effectively extract the spatio-temporal feature representation in the input data and convert it into a hidden state of a fixed dimension. Then, the output of the encoder is weighted by the multi-head attention layer to highlight the key features and establish an effective interaction relationship between the features. Subsequently, the attention-weighted output is linearly transformed by the fully connected layer to further integrate and transform the feature representation. Then, the output data is processed by the decoder LSTM layer, and the hidden state information of the encoder and the previous prediction results are used to gradually generate the output sequence. After that, to prevent overfitting problems, a random dropout operation is performed on the output data. Finally, the output of the last time step is linearly transformed by the fully connected layer to obtain the final decoder output result, completing the entire prediction process. Such a model design and processing flow effectively combines the feature extraction ability of the encoder, the key feature weighting and interaction of the attention mechanism, the sequence decoding ability of the decoder, and the preventive measures for overfitting problems, thereby improving the performance and generalization ability of the model in the soil moisture prediction task.

[0084] The encoder-decoder structure is more excellent than the traditional LSTM model in tasks such as machine translation. Its advantages are mainly reflected in the flexibility and better information management ability when dealing with input and output sequences of different lengths in hydrological data. It consists of two key parts: an encoder and a decoder. The encoder converts the entire input sequence into an intermediate context vector, enabling the model to better capture global information and effectively handle the complex relationship between the input and output. The decoder then decodes this vector into the target sequence. In addition, the encoder-decoder structure can better handle long sequences, making the prediction results more accurate while reducing the burden of long-term dependencies, which makes it more advantageous in the prediction of hydrological data. Considering the successful application of the encoding-decoding structure in other fields of hydrology, such as excellent performance in tasks like runoff prediction, it is expected that the encoding-decoding structure will also show better performance in the soil moisture prediction model that takes the intermediate variables in the HBV physical model as additional outputs.

[0085] The attention mechanism (AM) is a solution for allocating resources in the field of computer vision, which selects the key information to focus on to obtain the best possible output. It also has excellent applications in sequence-to-sequence tasks. For each output time step, by weighted summing all the input time steps at the encoder end, it focuses on the part of the input sequence relevant to the current output. Here, the multi-head attention layer used in the present invention is an extension of the attention mechanism. Through multi-head attention, the model can focus on different features from many representations of the multi-head attention. In hydrological forecasting, this means that the model can more effectively learn the relationships between each time step in the input sequence, such as seasonal changes, periodic changes, etc. The formula for the multi-head attention mechanism is as follows:

[0086]

[0087] The attention score calculated for each head is obtained by multiplying the query vector , the key vector and the value vector by their respective weight matrices, and then summing them with weights. After passing through the softmax activation function, the attention score serves as the output value at the corresponding position. The key has a dimension of 128, is the weight matrix for the -th head, is the weight matrix for the output. The query , the key and the value are all the same, i.e., they are all the outputs of the encoder. This operation is usually referred to as self-attention. This setting is helpful for capturing the importance of each position in the sequence, and helps the model better understand the dependencies and important information in the sequence. In the field of hydrological forecasting, the attention mechanism has been widely used due to its advantage of being able to effectively process complex hydrological data features.

[0088] In one implementable way, the present invention uses data with a spatial resolution of 1° during the period from 2000 to 2020. It is found that the resolution of the dataset has no effect on the trend of model performance improvement; the 1° resolution not only avoids dealing with an overly large amount of data but also meets the requirements of model training. The above dataset is divided into three parts: the data from 2000 to 2019 is used for the training set and the validation set, while the data in 2020 is used as the test set. The ratio of the training set to the validation set is 4:1. To improve the computational efficiency, all training data is collected by randomly sampling all grids. The original DEM resolution is 3″ (90m), and the Köppen-Geiger climate classification map uses a resolution of 0.5°. To match the LandBench data, in this embodiment, bilinear interpolation is used to interpolate all variables to a 1° resolution, covering a total of 180×360 grid points. To accelerate the convergence speed of the model, the min-max normalization method is adopted to scale the data to the range of [0, 1]. The specific formula is as follows:

[0089]

[0090] where , , , are the original value, maximum value, minimum value, and normalized value of the training data on the grid, respectively.

[0091] Through a large number of experimental processes, the present invention finally determined a set of optimized long short-term memory (LSTM) model parameters. Specifically, the learning rate was set to 0.001 to promote stable convergence of the model during training; the hidden unit size was 128, and the batch size was set to 64, effectively reducing the risk of overfitting; the training period was set to 1000 to ensure that the model could deeply learn the complex characteristics in the dataset; the number of iterations was 400, ensuring sufficient parameter updates within each training period and facilitating the search for the optimal weight configuration; the dropout rate was set to 0.15 to prevent the model from being overly sensitive to any single feature or pattern in the training data; the number of heads in the multi-head attention mechanism was set to 2, maintaining the generalization ability of the model. Finally, the sequence length was 365 days, enabling the model to identify seasonal changes and long-term dependencies throughout the year. All experiments were conducted on a server equipped with an Intel Core (TM) i9-10980XE, 3.00 GHz × 36 CPUs, 128 GB of memory, and two NVIDIA RTX A800 graphics cards.

[0092] During all model training and testing processes, the present invention repeatedly selected and fixed random seeds. Fixing the seeds reduces the random differences caused by initial parameters to fairly and accurately compare the performance of different models. At the same time, this strategy ensures result consistency, enhances the reproducibility of experiments, and facilitates other researchers to verify and expand the work of the present invention. This strict experimental design significantly improves the credibility and repeatability of the research, effectively promoting the progress of scientific research.

[0093] S500. Predict the surface soil moisture at future times through the trained soil moisture model.

[0094] Performance evaluation of the prediction model:

[0095] The present invention selects the coefficient of determination (R 2 ), Kling-Gupta efficiency (KGE), and root mean square error (RMSE) as indicators for evaluating performance. The coefficient of determination (R 2 ) is used to verify the percentage of variance explained by the prediction model, the Kling-Gupta efficiency (KGE) is used to evaluate the goodness of fit based on correlation, conditional bias, and systematic bias, and the root mean square error (RMSE) is used to observe the volatility of the prediction. The formulas are shown as follows:

[0096]

[0097] and respectively represent the actual value and the predicted value at the th time step. and are the average values of the actual value and the predicted value, respectively. is the linear correlation coefficient between the actual value and the predicted value, is the proportionality coefficient between the actual value and the predicted value, is the temporal correlation coefficient between the actual value and the predicted value.

[0098] In the field of hydrological prediction, the long short-term memory network (LSTM) and its enhanced version, namely LSTM with an encoder-decoder structure (EDLSTM), are both highly influential. Therefore, I choose them as the benchmarks to evaluate our advanced model AEDLSTM(HBV). For a meticulous comparison, the present invention not only analyzes the traditional LSTM and EDLSTM models, but also specifically considers the versions that incorporate the physical hydrological model (HBV) as an intermediate variable, namely LSTM(HBV) and EDLSTM(HBV). In addition, to more comprehensively evaluate the impact, the present invention also tests the AEDLSTM model without integrating the HBV variable. Through the performance comparison of these models, the role of the HBV variable in enhancing the prediction accuracy of soil moisture can be explored in depth. At the same time, this also helps us evaluate the potential advantages of AEDLSTM in dealing with the HBV variable compared with the traditional LSTM and EDLSTM models, thus providing a scientific basis and technical support for future model development and application.

[0099] Comparative Analysis of the Utilization Efficiency of HBV Intermediate Variable and AED Mechanism in Each Model

[0100] Table 3. Median values of the R², KGE, and RMSE (m 3 / m 3 ) metrics for the prediction results of all models.

[0101]

[0102] As can be clearly seen from the provided Table 3, when the HBV intermediate variable is not added, compared with the original LSTM model, EDLSTM shows a slight improvement (about 3%) in the R 2 and KGE metrics, and a significant improvement (about 7.5%) in the RMSE metric. However, compared with EDLSTM, AEDLSTM shows a slight decrease (about 2.5% - 2.8%) in the R 2 and KGE metrics and a regression (about 6%) in the RMSE metric. Adding the encoder-decoder structure has a positive impact on the model performance, but after adding the attention mechanism, it may not always be able to further improve the model performance, and sometimes it may even lead to a performance decline, which needs to be evaluated and adjusted according to the specific situation.

[0103] After adding the HBV intermediate variable, AEDLSTM, EDLSTM, and LSTM all show improvements in the three metrics. This improvement is particularly prominent in the AEDLSTM(HBV) model, whose R2 The value increased from 0.8328 to 0.8922 (an improvement of approximately 7.13%), the KGE value increased from 0.8440 to 0.8882 (an improvement of approximately 5.24%), and at the same time, the RMSE value also had a significant improvement, decreasing from 0.0195 to 0.0161 (an improvement of approximately 17.44%). In contrast, although the EDLSTM and LSTM models also improved after adding the HBV variable, the improvement amplitude was much smaller than that of AEDLSTM. This indicates that the AEDLSTM model makes more effective use of the HBV intermediate variable and can better capture and integrate this information to improve the prediction accuracy. In addition, it is worth noting that the performance of AEDLSTM decreased compared with the EDLSTM model when the HBV intermediate variable was not fused. This may imply that without combining the HBV intermediate variable, the attention encoding and decoding mechanism of AEDLSTM did not fully play its role or the performance was inferior to that of EDLSTM focusing on the basic LSTM structure because the model was too dependent on the HBV variable. However, when the HBV intermediate variable was introduced, the performance of AEDLSTM was greatly improved, which indicates its great potential in using this physical process information. By effectively integrating the HBV intermediate variable, AEDLSTM(HBV) not only improved its own prediction accuracy but also highlighted the powerful advantages of the hybrid physical knowledge and deep learning method, providing strong evidence for the further development and application of the hydrological model.

[0104] Box plots provide a robustness assessment method that does not rely on the assumption of data normal distribution, helping us identify outliers and making model comparisons more objective and accurate. To comprehensively show the performance of different deep learning models in hydrological forecasting, such as Figure 2 shown, the present invention uses box plots to visually display the performance of each model in key performance indicators such as R 2 , KGE, and RMSE, including the data distribution range, median, quartiles, and outliers. This graphical method highlights the stability of the model and its sensitivity to outliers. From R 2 ​From the box plots, it can be seen that the variants with the HBV model added as input (green, light blue, and blue) generally have more compact boxes, indicating that the models after adding HBV may provide more consistent prediction performance. The median of the AEDLSTM model (red) is lower, but after adding HBV (blue), the median increases, and the box is also more compact, indicating that the combination of the attention mechanism and HBV can effectively improve the model performance. The performance of the encoder-decoder structured LSTM (light green and light blue) seems to make little difference with or without the addition of HBV. This may be because when the feature richness is insufficient to meet the requirements of the encoder-decoder structured network, the model may overfit the noise in the training data rather than learning the generalized features. In contrast, the simple LSTM model, due to its relatively simple structure, may be better at using the newly introduced and valuable features for learning, especially in these cases. In the box plot, the "whisker" part represents the range of variation in model performance, which shows the upper and lower bounds of the data point distribution. Specifically for LSTM(HBV) and AEDLSTM(HBV), the lower whisker (i.e., the straight line below the box plot) of both is shorter than that of the corresponding LSTM and AEDLSTM without the HBV model, indicating that the versions after adding the HBV model have improved in the worst performance. For LSTM(HBV), the R 2 minimum value has improved compared to the basic LSTM model. For AEDLSTM(HBV), its R 2 minimum value is also higher than that of the AEDLSTM model without the HBV model. This indicates that after adding the HBV model, the performance of the model in the least ideal situation is also better than that without HBV, that is, the stability and robustness of the model have been enhanced. This may mean that in the most difficult prediction situations, the intermediate variables provided by the HBV model help the LSTM model better capture the important features in the data. Similarly, from the box plots of KGE and RMSE, it can be seen that in terms of the KGE and RMSE performance metrics, after adding the HBV physical model input to the LSTM model, such as EDLSTM(HBV) and AEDLSTM(HBV), the consistency of their performance has improved, manifested as more compact boxes and shorter lower performance bound "whiskers". The performance of the EDLSTM and LSTM models has been slightly improved after adding HBV, but it is still lower than that of AEDLSTM(HBV), highlighting the advantage of the latter. Moreover, the KGE of the LSTM model after adding HBV even decreases, indicating that it needs to be improved in the utilization of HBV intermediate variables.

[0105] Unlike box plots that are mainly used to show the statistical distribution of a variable, scatter plots can effectively display the distribution of data points by revealing the correlation between predicted values and actual observed values, thereby identifying any linear or non-linear relationships, as well as outliers in the data. By observing whether the points are closely arranged near the diagonal line, we can intuitively judge whether the model's prediction is accurate. To visually display and evaluate the relationship between the prediction accuracy of the model and the observed data, the present invention plots a scatter plot, as shown in Figure 3 shown. As can be seen from the scatter Figure 3 f, the original LSTM model shows reliable baseline performance in soil moisture prediction. In the low moisture range (e.g., 0 to 0.2), the scatter plot shows that the predicted values and the observed values are relatively matched, indicating that the model can predict low soil moisture more accurately. In the high moisture range (e.g., 0.6 to 0.7), it can be seen that the scatter points start to deviate from the 1:1 line, and the prediction accuracy for higher moisture values decreases, indicating that the model is too conservative when predicting near-saturated soil moisture and misestimates the actual moisture value. Comparing the LSTM with the HBV intermediate variable as shown in Figure 3 e, in the high moisture range, the scatter points of the predicted values tend to be closer to the regression line, which can also be seen in the figures of EDLSTM and AEDLSTM, indicating that adding the HBV intermediate variable significantly improves the prediction ability in the high moisture range. However, as can also be seen in Figure 3 e, there are some outliers in the low moisture range for LSTM(HBV), indicating that the LSTM's ability to utilize the HBV intermediate variable in the low moisture range is still lacking. Comparing Figure 3 c and Figure 3 d, it can be seen that in the low moisture range, the scatter density of the EDLSTM model with an encoder-decoder structure increases, indicating that it has improved compared to the ordinary LSTM model. The encoder-decoder structure helps the model better capture the complex dependencies in time series data and may therefore provide more accurate moisture predictions. Comparing Figure 3 a and Figure 3b. The AEDLSTM with the attention mechanism shows that the scatter points are denser and more concentrated around the ideal fitting line in the low humidity range. This indicates that the prediction of the AEDLSTM model is not only more accurate than that of the LSTM model but also superior to the EDLSTM model with only an encoder-decoder structure. The addition of the attention mechanism improves the model's ability to identify important features in the input data. Especially in the case of low humidity, small changes in the data are also important, and the attention mechanism can help the model focus on these subtle changes. Therefore, AEDLSTM can provide more accurate low humidity predictions, which is manifested in a more compact data distribution and lower prediction errors compared to models without the attention mechanism. Due to the combination of HBV intermediate variables and the attention mechanism, AEDLSTM(HBV) shows better prediction ability at the extreme values of high and low humidity, which is particularly important in hydrological modeling because prediction errors at these extreme values may lead to inaccurate predictions of hydrological events, which are crucial for coping with natural disasters and protecting the ecosystem.

[0106] To comprehensively understand and compare the statistical distributions of different model predictions, and to accurately identify the trends, skewness, and outliers in the data, we plotted the cumulative distribution function (CDF) graphs as Figure 4 shown. This type of graph shows the cumulative frequency of data values, thus providing an intuitive way to observe the percentage of data at any given threshold. We can easily compare the distribution differences of data under different models or experimental conditions, and quickly determine the percentiles of the data, such as the median or other specific probability thresholds. From the cumulative distribution function (CDF) Figure 4 a, it can be seen that the CDF curves of all models are closely clustered together, which means that they are very close in terms of performance in R 2 , but some differences can still be observed. AEDLSTM(HBV) shows an overall lead, and its CDF curve is closer to the upper right corner, indicating that this model reaches a higher R 2 value in most cases. Followed by EDLSTM(HBV) and EDLSTM, both of which perform similarly, but in the high R 2 value range, from Figure 4 b, that is, the enlarged part marked by the red box, the performance of AEDLSTM(HBV) is more concentrated in the high R 2 value, indicating that it is more consistent than other models in terms of optimal performance. Similarly, from Figure 4 c and its enlarged part marked by the red box Figure 4 d, Figure 4 e and its enlarged part marked by the red box Figure 4 f, it can also be seen that AEDLSTM(HBV) performs optimally in terms of the KGE and RMSE metrics, providing predictions with higher KGE and lower errors over a wider range.

[0107] Through the above series of detailed analyses, it can be concluded that integrating the intermediate variables of the HBV model into the deep learning model (especially the AEDLSTM structure that integrates the attention mechanism encoder-decoder LSTM) can significantly improve the performance of the model in hydrological prediction. These findings not only verify the positive impact of the integration of HBV intermediate variables but also emphasize the importance of integrating machine learning and physical process knowledge in improving the accuracy of the model. Especially in the AEDLSTM(HBV) model, the integration of the attention mechanism in its structure greatly enhances the prediction ability of the model, demonstrating the great potential and application value of combining data-driven and physics-driven approaches in hydrological model prediction.

[0108] Combined with these findings, a deeper understanding can be gained of the important role of HBV intermediate variables in improving model performance. Especially in the development of hydrological models, the combination of physical process knowledge and machine learning techniques is regarded as the key to improving the generalization ability and prediction accuracy of the model. By integrating HBV intermediate variables into the model, not only can the model performance be improved globally, but also significant performance advantages can be achieved in regions where natural environmental factors dominate the hydrological process. Looking ahead, such methods that combine physical knowledge and deep learning will provide more accurate and reliable prediction tools for the field of hydrological science.

[0109] In summary, the deep learning soil moisture prediction model has been particularly popular recently. However, due to the high spatial heterogeneity of soil texture, in high-latitude regions, high-altitude regions, and arid regions such as deserts with harsh environmental conditions, the prediction ability of the deep learning model still needs to be improved. There are a large number of intermediate variable data in traditional physical hydrological models. These non-linear data also contain a large amount of hydrological information, but there is also noise information. How to use these intermediate variable data may affect the prediction results. The present invention designs a novel AEDLSTM(HBV) model to improve the prediction performance of the deep learning model in extreme geo-geological environments. The proposed model designs the selection of intermediate variables of the HBV hydrological model and uses an attention-based encoder-decoder long short-term memory model (AEDLSTM) to most accurately predict soil moisture, which is superior to the LSTM and EDLSTM models in terms of statistical indicators for soil moisture prediction. It is recommended to use the following hyperparameters when predicting soil moisture in the AEDLSTM(HBV) model: the number of epochs is 1000, the size of the hidden units is 128, the batch size is 64, the learning rate is 1e-4, and the time step is 365.

[0110] The AEDLSTM(HBV) model combines an LSTM encoder, an LSTM decoder, and an attention mechanism for modeling and generating sequence data. Intermediate process variables of the HBV hydrological model are added to the input data, which further enriches the model's input. First, the model encodes these rich input sequences into a hidden state sequence through the LSTM encoder layer. Then, through the multi-head attention layer, the model can better understand the importance of each part in the input sequence and transmit the attention-weighted information to the decoder. The decoder part uses this information to generate the final output sequence. During the entire training process, to reduce the risk of overfitting, the model randomly discards some data through the Dropout layer. Generally speaking, by combining multiple information sources, the AEDLSTM model aims to improve the modeling and generation of sequence data, especially suitable for scenarios that need to consider multiple variables and complex associations, such as prediction and simulation tasks in the HBV hydrological model.

[0111] According to the experimental results, in terms of the performance metrics of R 2 , KGE, and RMSE, the AEDLSTM(HBV) model performs best, with an R 2 value of 0.8922, a KGE value of 0.8882, and an RMSE of 0.0161, showing higher prediction accuracy than other models.

[0112] The results show that the AEDLSTM(HBV) model performs outstandingly in soil moisture prediction, especially superior to other models in extreme cases of low and high humidity. It combines HBV intermediate variables and the attention mechanism, capturing the changes during the wet and dry seasons more accurately, emphasizing the importance of the combination of physical process knowledge and deep learning technology, and providing a new method for prediction research in the field of hydrological science. This comprehensive application provides a more reliable and accurate method for soil moisture prediction, which is of great significance for fields such as water resource management and agricultural planning.

[0113] Obviously, those skilled in the art can make various changes and modifications to this technical solution without departing from the spirit and scope of this technical solution. Thus, if these modifications and variations of this technical solution fall within the scope of the claims of this technical solution and its equivalent technologies, this technical solution also intends to include these changes and modifications.

Claims

1. A soil moisture prediction method based on physical process attention encoding and decoding LSTM model, characterized in that: include: Obtaining the surface soil moisture value and its influencing factors at each historical moment, wherein the influencing factors include atmospheric forcing variables, land surface variables and static variables; Input the two-meter temperature and precipitation data in the atmospheric forcing variables and the evaporation data in the land surface variables into the HBV hydrological physical model and run it to obtain intermediate variable data, which are snow melting, recondensation, soil moisture content, recharge water, soil water penetration, shallow aquifer and deep aquifer data; Performing a correlation analysis between the intermediate variable data and the surface soil moisture, selecting an intermediate characteristic variable combination that is most relevant to the surface soil moisture, wherein the intermediate characteristic variable combination is soil moisture content and deep aquifer data; The influencing factors and the intermediate characteristic variables are combined as input data, and a preset attention-based encoding and decoding LSTM model is trained so that the model reaches a preset accuracy, thereby obtaining a trained soil moisture model; The surface soil moisture at future times is predicted using the trained soil moisture model.

2. The soil moisture prediction method based on the physical process attention encoding and decoding LSTM model as claimed in claim 1 is characterized in that: The atmospheric forcing variables include two-meter temperature, 10-meter east-west component wind speed, 10-meter north-south component wind speed, precipitation, surface air pressure, and specific humidity; The land surface variables include volume soil water layer, ground solar radiation, ground thermal radiation, soil temperature and evaporation; The static variables include soil moisture content, clay, sand, silt and elevation data from DEM.

3. The soil moisture prediction method based on the physical process attention encoding and decoding LSTM model as claimed in claim 1 is characterized in that: The correlation analysis includes Pearson correlation coefficient calculation and random forest importance analysis.

4. The soil moisture prediction method based on the physical process attention encoding and decoding LSTM model as claimed in claim 3 is characterized in that: The calculation formula of the Pearson correlation coefficient is as follows: ; in, and Represents the first Observations, and They represent the average values ​​of two variables respectively, and ∑ represents the summation operation.

5. The soil moisture prediction method based on the physical process attention encoding and decoding LSTM model as claimed in claim 1, characterized in that: The influencing factors and the intermediate feature variable combination are used as input data to train the preset attention-based encoding and decoding LSTM model so that the model reaches a preset accuracy, including: Dividing the influencing factors and the intermediate characteristic variable combination data into a training set, a validation set and a test set; Performing model training on the preset attention-based encoding and decoding LSTM model through the training set; Verifying the trained soil moisture model through the verification set; The verified soil moisture model is tested using the test set to ensure that the soil moisture model reaches a preset accuracy.

6. The soil moisture prediction method based on the physical process attention encoding and decoding LSTM model as claimed in claim 5, characterized in that: The training process of the attention-based encoding and decoding LSTM model specifically includes: The influencing factors and the intermediate feature variable combination are used as input data and processed by the encoder LSTM layer, so that the encoder effectively extracts the spatiotemporal feature representation in the input data and converts it into a hidden state of fixed dimension; Using a multi-head attention layer to weight the output of the encoder, highlight key features, and establish effective interactive relationships between features; The attention-weighted output data is linearly transformed through the fully connected layer to further integrate and transform the feature representation; Processing the output data through the decoder LSTM layer, using the encoder's hidden state information and previous prediction results to gradually generate an output sequence, and randomly discarding the output data; The output of the last time step is linearly transformed through the fully connected layer to obtain the final decoder output result.

7. The soil moisture prediction method based on the physical process attention encoding and decoding LSTM model as claimed in claim 6 is characterized in that: The parameter settings of the attention-based encoding and decoding LSTM model are as follows: the learning rate is set to 0.001, the hidden unit size is 128, the batch size is 64, the training cycle is 1000, the number of iterations is 400, the drop rate is 0.15, the number of heads of the multi-head attention mechanism is set to 2, and the sequence length is 365 days.

Citation Information

Patent Citations

  • Hydrological model soil humidity initialization method based on curve fitting and LSTM

    CN118395858A

  • Multi-band frequency spectrum prediction method of power wireless network and terminal

    CN118473565A