Method for determining importance of prediction factors and its application in prediction of soil moisture content

CN122548448APending Publication Date: 2026-08-11TIANJIN NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-25
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

1、缺乏物理约束:数据驱动模型通常忽略土壤水分收支守恒、蒸散发机制等基本水文规律,容易出现物理不一致的预测结果;

Benefits of technology

本发明通过引入融合物理机制的损失函数(包括水量平衡、彭曼蒸散发估算和二阶差分平滑等约束),显著提升了基于Transformer及其变体的土壤含水量预测模型的精度、稳定性与物理一致性;同时结合DeepSHAP方法,实现了对各气象与环境因素贡献度的量化分析,增强了模型的可解释性。实验验证表明,该方法在Informer、Flowformer、Reformer等模型结构中均保持良好性能,具有较强的泛化能力和实用价值,适用于复杂的长时序、多变量水文预测场景。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122548448A_ABST
    Figure CN122548448A_ABST
Patent Text Reader

Abstract

This invention discloses a method for determining the importance of predictive factors and its application in soil moisture prediction. The method standardizes time-series data of different predictive factors and target results, and then inputs the standardized data into a deep learning Transformer model for normalization. The standardized and normalized time-series data of predictive factors and target results are then input into the deep learning Transformer model for training. Based on the trained deep learning Transformer model, the dynamic changes of the target results are predicted. A composite loss function based on a physical mechanism is constructed and introduced into the deep learning Transformer model. Sensitivity analysis and DeepSHAP methods are used to calculate the contribution of each predictive factor to the output of the deep learning Transformer model with the composite loss function. The calculated contributions of each predictive factor to the output of the deep learning Transformer model with the composite loss function are ranked from largest to smallest, and non-important predictive factors are removed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method for determining the importance of predictive factors and its application in predicting soil moisture content. Background Technology

[0002] Soil moisture content is a key variable in the terrestrial hydrological cycle, playing a crucial role in agricultural irrigation, water resource management, ecosystem modeling, and drought monitoring. Currently, two main types of observation methods are relied upon to obtain soil moisture information: One category is in-situ measurement methods, such as time domain reflectometers (TDR), neutron detectors, and tensiometers. These methods can provide high-precision point data, but they are costly to deploy, have limited coverage, and are difficult to reflect the spatial distribution of moisture at a regional scale. The other category is remote sensing observation methods, which obtain large-scale soil moisture information by inverting satellite data. However, their accuracy is limited by surface vegetation cover, meteorological conditions, and remote sensing resolution, and are prone to errors and uncertainties.

[0003] To compensate for the limitations of observational methods, some studies have attempted to use physical mechanism-based modeling methods to extrapolate changes in soil moisture content. These methods are typically based on the principle of soil water balance, quantifying processes such as precipitation, evapotranspiration, surface runoff, and deep infiltration to describe the input-output relationship of water per unit time. To estimate evapotranspiration, a key output, this study introduces the Penman Equation. This equation, which combines multiple meteorological factors such as solar radiation, wind speed, temperature, and humidity, is used to calculate the evapotranspiration rate of a reference crop and is an important component in constructing a physically consistent model.

[0004] However, in practice, models based on physical mechanisms still face certain limitations, such as high parameter requirements, poor regional adaptability, and strong structural rigidity, making it difficult to cope with varying terrain and climate conditions. Furthermore, model development and parameter tuning are complex and not user-friendly for non-professionals. To improve modeling efficiency and adaptability, researchers have widely adopted machine learning methods to predict soil moisture content in recent years. These methods include traditional algorithms such as Support Vector Machines (SVM), Random Forests (RF), and neural networks, as well as emerging deep learning models such as Convolutional Neural Networks (CNN) and Recurrent Neural Networks (RNN). They achieve data-driven modeling by learning the mapping relationship between historical observation data and factors such as meteorology and terrain, exhibiting strong fitting capabilities and prediction accuracy.

[0005] However, these types of models generally suffer from the following problems: 1. Lack of physical constraints: Data-driven models often ignore basic hydrological laws such as soil moisture balance and evapotranspiration mechanisms, which can easily lead to prediction results that are inconsistent with physical constraints. 2. Low model transparency: Most models have complex structures and poor interpretability, making it difficult to reveal the role of various environmental factors in prediction, which is not conducive to scientific research and practical management. 3. Insufficient generalization ability: The model relies on a large amount of high-quality training data, is sensitive to the quantity and quality of observed samples, and has poor regional transfer ability.

[0006] Therefore, all current methods, from traditional observation and physical modeling to data-driven modeling, have certain bottlenecks in practical applications. Summary of the Invention

[0007] The purpose of this application is to address the technical deficiencies in the existing technology by providing a method for determining the importance of predictive factors in deep learning models and its application in soil moisture content prediction.

[0008] The technical solution adopted to achieve the purpose of this application is: A method for determining the importance of predictive factors in deep learning models includes the following steps: Step 1: Standardize the time series data of different predictors and target results, and input the standardized data into the deep learning Transformer model for normalization. Step 2: Input the time series data of the prediction factors and target results after the standardization and normalization processing in Step 1 into the deep learning Transformer model for training, and predict the dynamic changes of the target results based on the trained deep learning Transformer model. Step 3: Construct a composite loss function based on physical mechanisms and introduce a deep learning Transformer model; The physical mechanism involves constructing corresponding physical consistency terms for the physical processes involved in each predictor and incorporating them into the composite loss function. Step 4: Using sensitivity analysis and DeepSHAP, the contribution of each predictor to the output of the deep learning Transformer model with the composite loss function is calculated. Step 4 includes the following steps: S4.1: Select the target input sample x to be explained based on the factors to be calculated; S4.2: Based on the data matrix of different predictive factors, from the background sample set Randomly select a background reference sample z; S4.3: Based on the prediction factor data of the target input sample x and the background reference sample z at different locations, construct two mixed samples for difference calculation; S4.4: Based on the two mixed samples used for difference calculation, calculate their average difference in the deep learning Transformer model with the introduction of a composite loss function, and use it as the DeepSHAP value of the current factor. Step 5: Sort the contributions of each predictor calculated in Step 3 to the output of the deep learning Transformer model with the composite loss function from largest to smallest, locate the most important predictor in the deep learning Transformer model, and remove the unimportant predictor.

[0009] In the above technical solution, the deep learning Transformer model includes a multi-layer encoder and decoder structure; The deep learning Transformer model incorporates residual connections and layer normalization mechanisms in each encoder and decoder layer; a masking mechanism is also included in the decoder section.

[0010] In the above technical solution, the deep learning Transformer model is a non-recursive structure, which performs deep modeling of input data through a multi-head self-attention mechanism and a feedforward neural network.

[0011] In the above technical solution, the multi-head self-attention mechanism includes: S211: Perform a linear transformation on the input feature sequence to generate query vector, key vector and value vector respectively; S212: The query vector, key vector and value vector are each uniformly divided into h independent sub-vectors along the last feature dimension, and each sub-vector corresponds to an attention head; S213: Multiple attention heads are computed independently and in parallel. Each attention head performs scaled dot product attention on its own subvectors, and finally obtains the attention output of each attention head. S214: Reassemble the attention outputs of multiple attention heads along the last feature dimension to complete the initial fusion of the sub-vector features of multiple attention heads and obtain the concatenated feature matrix. S215: The concatenated feature matrix is ​​linearly transformed using a learnable weight matrix to achieve deep fusion and feature mapping of multi-head information, ultimately outputting the result of the multi-head self-attention mechanism.

[0012] In the above technical solution, the feedforward neural network adopts a two-layer fully connected structure. The first layer introduces nonlinearity through the ReLU activation function, and the second layer outputs the feature mapping result. The expression of the feedforward neural network is as follows:

[0013] In the formula, Represents the input vector of a certain layer. ; The weight matrix represents the first fully connected layer; This represents the bias vector of the first fully connected layer. The weight matrix represents the second fully connected layer; This represents the bias vector of the second fully connected layer.

[0014] In the above technical solution, the expression for the composite loss function is as follows:

[0015] In the formula, Represents the total composite loss function; Representative data fitting term; Hyperparameters representing the weights of adjustment terms are used to balance the trade-off between numerical accuracy and physical consistency. This represents the constraint loss term constructed based on physical mechanisms.

[0016] On the other hand, the application of the deep learning model prediction factor importance determination method in soil moisture content prediction includes the following steps: Step 1: Standardize and normalize the time series data of different climatic factors and soil moisture content; Step 2: Predict dynamic changes in soil moisture content based on a deep learning Transformer model; Step 3: Construct a composite loss function based on physical mechanisms and introduce a deep learning Transformer model. Analyze the prediction effect of soil moisture content based on the deep learning Transformer model with the composite loss function. Step 4: Using sensitivity analysis and DeepSHAP, the contribution of different climate factors to the output of the deep learning Transformer model with a composite loss function is calculated. Step 5: Sort the contributions of each climate factor calculated in Step 3 to the output of the deep learning Transformer model with the composite loss function from largest to smallest, locate the most important climate factor in the deep learning Transformer model, and remove the unimportant climate factors.

[0017] In the above technical solution, the climate factors include maximum temperature, minimum temperature, maximum relative humidity, minimum relative humidity, longwave radiation, shortwave radiation, rainfall, evaporation, and wind speed.

[0018] The beneficial effects of this invention are as follows: This invention significantly improves the accuracy, stability, and physical consistency of soil moisture prediction models based on Transformer and its variants by introducing a loss function that incorporates physical mechanisms (including constraints such as water balance, Penman evapotranspiration estimation, and second-order difference smoothing). Simultaneously, by combining the DeepSHAP method, it achieves quantitative analysis of the contributions of various meteorological and environmental factors, enhancing the model's interpretability. Experimental verification shows that this method maintains good performance across Informer, Flowformer, and Reformer model structures, demonstrating strong generalization ability and practical value, and is suitable for complex long-term, multivariate hydrological prediction scenarios. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 The diagram shown is a flowchart of the method for determining the importance of prediction factors in deep learning models according to the present invention.

[0021] Figure 2 The diagram shows the application of the deep learning model prediction factor importance determination method of the present invention in soil moisture content.

[0022] Figure 3 The diagram shows a comparison of soil moisture content prediction with and without the physical mechanism described in this invention.

[0023] Figure 4 The figure shown is a horizontal bar chart illustrating the sensitivity analysis of soil moisture content according to the present invention.

[0024] Figure 5 The figure shown is a sensitivity analysis point diagram of soil moisture content according to the present invention.

[0025] Figure 6 The diagram shows a comparison of the prediction of soil moisture content in shallow and deep layers using the deep learning Transformer model and its variants described in this invention. Detailed Implementation

[0026] To enable those skilled in the art to better understand the present invention, the technical solution of the present invention will be further described below with reference to specific embodiments. Example 1

[0027] A method for determining the importance of predictive factors in deep learning models, see [link to relevant documentation]. Figure 1This includes the following steps: Step 1: Standardize the time-series data of different predictive factors and target results, and then input the standardized data into the deep learning Transformer model for normalization. The deep learning Transformer model is sensitive to the distribution of input features. If there are significant differences in the time-series data of different predictive factors and target results, directly inputting them into the model will lead to feature dominance, reducing the model's predictive performance. Therefore, before inputting the time-series data of different predictive factors and target results into the deep learning Transformer model, standardization and normalization are performed to improve training stability and the fairness of feature contributions, and effectively enhance the convergence speed, robustness, and generalization ability of the deep learning Transformer model in time-series data prediction tasks.

[0028] The standardized expression for the time series data of the target result is as follows:

[0029] In the formula, Time series data representing the target result after standardization; Time series data representing the original target outcome; The mean of the time series data representing the target outcome; The standard deviation of the time series data representing the target outcome.

[0030] This embodiment standardizes different predictive factors, adjusting the data of different predictive factors to a uniform scale of zero mean and unit variance, to ensure that the weight allocation of the deep learning Transformer model in the self-attention mechanism is not shifted due to numerical differences.

[0031] This embodiment introduces a layer normalization mechanism within the deep learning Transformer model structure to normalize the input features (standardized data) of each Transformer layer. The normalization expression is as follows:

[0032] In the formula, Represents the input vector of a certain layer. ; This represents the mean of the input vector; Represents the variance of the input vector; This represents a minimal constant that prevents the denominator from being zero. , These represent learnable parameters, used to restore the model's expressive power.

[0033] Step 2: Input the time series data of the predictive factors and target results after the standardization and normalization processing in Step 1 into the deep learning Transformer model for training, and predict the dynamic changes of the target results based on the trained deep learning Transformer model.

[0034] The deep learning Transformer model is a neural network model based on the Transformer structure, used for feature extraction and result prediction of the input target result's time series or multidimensional data. The deep learning Transformer model includes several layers of encoder and decoder structures. Preferably, in this embodiment, both the encoder and decoder are set to a three-layer structure, and the dimension of each hidden unit is set to 128.

[0035] In this embodiment, residual connections and layer normalization mechanisms are introduced in each encoder and decoder layer of the deep learning Transformer model to improve the stability of model training and the expressive power of deep features. Preferably, this embodiment includes a masking mechanism in the decoder to prevent information leakage, ensuring that the deep learning Transformer model cannot access subsequent information when predicting the current time step, thus achieving autoregressive properties. Therefore, the deep learning Transformer model provided by this invention can effectively capture long-range dependencies and improve feature extraction and prediction performance without relying on recurrent structures, making it suitable for various application scenarios such as financial data modeling and time series trend prediction.

[0036] During the training of the deep learning Transformer model, the Adam optimizer is selected as the optimization algorithm, and the number of training steps is set to 100 steps to achieve the optimal update of the parameters of the deep learning Transformer model.

[0037] The described deep learning Transformer model is a non-recursive structure that uses a multi-head self-attention mechanism and a feed-forward network to perform deep modeling of the input data. Compared with existing recurrent neural networks (such as LSTM), the deep learning Transformer model in this embodiment has stronger parallel computing capabilities and long-range dependency capture capabilities, which can effectively improve the model's performance in sequence modeling and prediction tasks.

[0038] The multi-head self-attention mechanism includes: S211: Perform a linear transformation on the input feature sequence to generate the query vector (Q), key vector (K), and value vector (V), respectively.

[0039] S212: The query vector, key vector and value vector are each uniformly divided into h independent sub-vectors along the last feature dimension, and each sub-vector corresponds to an attention head.

[0040] S213: Multiple attention heads are computed independently and in parallel. Each attention head performs scaled dot product attention on its own subvectors, and finally obtains the attention output of each attention head.

[0041] S214: Reassemble the attention outputs of multiple attention heads along the last feature dimension to complete the initial fusion of the sub-vector features of multiple attention heads and obtain the concatenated feature matrix.

[0042] The formula for calculating attention weights is as follows:

[0043] In the formula, Represents the query vector; Represents the key vector; Represents a value vector; This represents the scaling factor, preventing the gradient from becoming unstable due to an excessively large dot product.

[0044] S215: The concatenated feature matrix is ​​linearly transformed using a learnable weight matrix to achieve deep fusion and feature mapping of multi-head information, ultimately outputting the result of the multi-head self-attention mechanism.

[0045] The feedforward neural network employs a two-layer fully connected structure. The first layer introduces nonlinearity through the ReLU activation function, and the second layer outputs the feature mapping result. The expression for the feedforward neural network is as follows:

[0046] In the formula, Represents the input vector of a certain layer. ; The weight matrix represents the first fully connected layer; This represents the bias vector of the first fully connected layer. The weight matrix represents the second fully connected layer; This represents the bias vector of a two-layer fully connected layer.

[0047] Step 3: Construct a composite loss function based on physical mechanisms and introduce a deep learning Transformer model to improve prediction accuracy and physical consistency with the deep learning Transformer model. By introducing prior knowledge of physical mechanisms as a constraint on the loss function, the physical rationality and generalization performance of the prediction results can be effectively improved while maintaining the training efficiency of the deep learning Transformer model. This is particularly suitable for industrial, environmental and engineering time series prediction tasks with clear physical backgrounds.

[0048] In traditional deep learning models, the loss function often relies solely on the numerical error between the predicted and true values ​​(such as mean squared error), neglecting the physical constraints of the prediction process. This can easily lead to results deviating from the actual physical process. Therefore, this invention introduces a composite loss function based on physical mechanisms into the deep learning Transformer model to improve its physical interpretability and prediction accuracy.

[0049] Specifically, this embodiment constructs corresponding physical consistency terms for the physical processes (such as conservation relationships, boundary conditions, energy balance, or system dynamics) involved in each prediction factor, and incorporates them into the composite loss function. The preset prediction value of the deep learning Transformer model is... The true value y, the traditional loss is The expression for the composite loss function is as follows:

[0050] In the formula, Represents the total composite loss function; Representative data fitting term; Hyperparameters representing the weights of adjustment terms are used to balance the trade-off between numerical accuracy and physical consistency. This represents the constraint loss term constructed based on physical mechanisms.

[0051] Step 4: Sensitivity analysis, combined with the DeepSHAP method, is used to calculate the contribution (DeepSHAP value) of each predictor factor to the output of the deep learning Transformer model with a composite loss function. The sensitivity analysis method combined with the DeepSHAP method effectively approximates the marginal contribution calculation across all subsets required by the Shapley value, while utilizing the forward propagation structure to achieve a scalable interpretation of the Transformer. This embodiment employs a sensitivity analysis method combined with the DeepSHAP algorithm to interpret the deep learning Transformer model in deep learning, in order to determine the key input features that affect the prediction results. The contribution of each input factor is quantified by the DeepSHAP method, which combines Shapley value theory and DeepLIFT's forward propagation attribute attribution method, and can efficiently estimate the attribution value of each input feature (i.e., the contribution of different prediction factors to the target result) in complex structures such as Transformers.

[0052] The DeepSHAP method compares the Transformer's input (such as embedded word vectors or token sequences) with reference samples. By simulating output changes after feature perturbation, it estimates the attribution value of each input token. To improve efficiency in practical applications, this embodiment uses a Monte Carlo sampling strategy, averaging only a limited number of reference samples to obtain the attribution value of each input token. (Compared to the traditional Shapley value method, DeepSHAP not only retains the theoretical basis of interpretability fairness but also improves computational speed and interpretability when processing deep learning Transformer models.) In estimating the contribution of different predictive factors to the output of the deep learning Transformer model, a set of background samples (such as representative sentences in the training set) is selected, and each token in the current input sample (different predictive factors) is replaced to observe its marginal change on the output of the deep learning Transformer model.

[0053] For each input feature (e.g., the first...) The formula for calculating the attribution value of (each token) is as follows:

[0054] In the formula, Representing the Attribution values ​​for each input feature; This represents a set of background samples, such as representative sentences from the training set. This means preserving the current input within the context of the background sample z. The input consists of the features of the input; This represents using background samples entirely. Input.

[0055] Step 4 includes the following steps: S4.1: Select the target input sample x to be explained based on the factors to be calculated.

[0056] S4.2: Based on the data matrix of different predictive factors, from the background sample set Randomly select a background reference sample z.

[0057] S4.3: Based on the predictor data of the target input sample x and the background reference sample z at different locations, construct two mixed samples (i.e., samples containing feature samples) for difference calculation. Excluded Feature Samples ).

[0058] S4.4: Based on the two mixed samples used for difference calculation, calculate their average difference in the deep learning Transformer model with the introduction of a composite loss function, as the DeepSHAP value of the current factor.

[0059] Step 5: Sort the contributions of each predictor calculated in Step 3 to the output of the deep learning Transformer model with the composite loss function from largest to smallest, locate the most important predictor in the deep learning Transformer model, remove the non-important predictor, simplify the data of different predictor factors, and maintain or even improve the prediction efficiency. Example 2

[0060] Based on Example 1, Example 1 applies the method for determining the importance of predictive factors in a degree-learning model to soil moisture prediction. See [link to example]. Figure 2 This includes the following steps: Step 1 involves standardizing and normalizing the time series data of different climatic factors and soil moisture content to ensure that the numerical scale of each input feature is consistent in the deep learning Transformer model and that the training process is stable. This can effectively improve the training efficiency and prediction accuracy of the deep learning Transformer model, providing a solid foundation for high-quality prediction of soil moisture content.

[0061] The climate factors include nine variables: maximum temperature, minimum temperature, maximum relative humidity, minimum relative humidity, longwave radiation, shortwave radiation, precipitation, evaporation, and wind speed. These nine variables are standardized to unify their statistical distribution and avoid interference with the training of the deep learning Transformer model due to differences in numerical scale.

[0062] The deep learning Transformer model structure described in this embodiment introduces a layer normalization mechanism to normalize the input features of each Transformer layer, thereby enhancing the robustness of the deep learning Transformer model to feature changes and improving the stability of gradient propagation.

[0063] Step 2: Predict the dynamic changes in soil moisture content based on the deep learning Transformer model.

[0064] Specifically, the soil moisture content at depths of 5cm, 20cm, 40cm, and 60cm under different vegetation cover was monitored using instruments. A deep learning Transformer model was then applied to predict soil moisture content at these depths. The daily data of nine climatic factors and soil moisture content were divided into training data (used to train a deep learning Transformer model with a certain level of accuracy), validation data, and prediction data (used to be input into the trained deep learning Transformer model to predict the dynamic changes in soil moisture content). Figure 6 The image shows the predicted soil moisture content in shallow (5cm, 20cm) and deep (40cm, 60cm) layers of herbaceous vegetation. The solid lines represent the soil moisture content at different depths (5cm, 20cm, 40cm, and 60cm) monitored by instruments; the dashed lines represent the soil moisture content at the same depths based on the deep learning Transformer model; and the dotted lines represent the dynamic changes in the predicted soil moisture content. Figure 6 As can be seen, the NSE (Normalized Squared Error) is around 0.85, therefore the deep learning-based Transformer model can accurately fit the dynamic changes in soil moisture content.

[0065] Step 3: Construct a composite loss function based on physical mechanisms and introduce a deep learning Transformer model. Analyze the prediction effect of soil moisture content based on the deep learning Transformer model with the composite loss function.

[0066] This embodiment introduces a deep learning Transformer model with a composite loss function. Based on Transformer and its structural variants (including Informer, Reformer, and Flowformer), a multi-variable composite loss function is designed in conjunction with hydrophysical constraints. This allows the deep learning Transformer model to learn from historical meteorological and environmental data while conforming to the physical laws of soil moisture movement.

[0067] The expression for the multi-component composite loss function described in this embodiment is as follows:

[0068] In the formula, Represents the total composite loss function; The prediction error term represents the mean square error (MSE) between the model output and the measured water content. The weights representing soil water balance terms; This represents the conservation loss term based on the principle of soil water balance; The weights representing the Penman evaporation constraint terms; This represents the constraint terms used in calculating evaporation based on the Penman formula; The weights represent the smoothing constraint terms; This represents the second-order difference smoothing term, used to penalize abrupt changes in the predicted values.

[0069] In this embodiment, the multi-composite loss function was applied to three Transformer structures: Informer, Flowformer, and Reformer, to predict the soil moisture content at different depths (0–20 cm, 40–60 cm). All models used the same input features and structural configuration.

[0070] See Figure 3 After introducing the physical mechanism, the prediction accuracy of the deep learning Transformer model is further improved on the basis of RMSE≤0.028, the fitting trend is closer to the measured data, and it shows stable effectiveness in different structural models, indicating that the physical mechanism has good universality and robustness. The physical mechanism composite loss function proposed in this embodiment not only improves the prediction accuracy of Transformer-type models, but also enhances their physical interpretability and applicability, providing a unified, efficient, and generalizable modeling framework for modeling complex meteorological-hydrological processes.

[0071] Step 4: Using sensitivity analysis and DeepSHAP, we calculate the contribution of different climate factors to the output of the deep learning Transformer model with a composite loss function.

[0072] To further enhance the interpretability of the deep learning Transformer model and explore the physical driving contribution of different climate factors to changes in soil moisture content, this embodiment, based on the deep learning Transformer model after introducing a physical mechanism loss function, uses the improved DeepSHAP method to analyze the contribution of each input variable (each climate factor) to quantify the marginal impact of different meteorological and environmental variables on the predicted output of the deep learning Transformer model, thereby revealing the criticality of each factor in specific contexts.

[0073] This embodiment analyzes various vegetation types (such as herbs and shrubs) and different soil depth ranges (0–20 cm, 40–60 cm), and interprets the output results in conjunction with the soil moisture conservation mechanism. Unlike the "black box" input-output mode in traditional models, a deep learning Transformer model constrained by physical mechanisms is introduced, making the Shapley values ​​more consistent with actual hydrological logic.

[0074] For example, see Figure 4 , Figure 5 Taking the soil moisture content in the shallow layer (0–20 cm) beneath herbaceous vegetation as an example, among multivariate inputs (including climatic factors such as temperature, humidity, rainfall, evaporation, and radiation), the rainfall variable showed the highest Shapley value distribution, clearly indicating its dominant role in short-term soil moisture dynamics. Furthermore, the contribution ranking of temperature and evaporation factors is consistent with Penman evapotranspiration theory, demonstrating that the embedding of physical mechanisms enhances the physical consistency and reliability of the feature importance analysis results.

[0075] Therefore, the physical mechanism-based deep learning Transformer model not only performs well in prediction accuracy, but also provides quantifiable and traceable explanations for the impact of multi-source climate variables on soil moisture changes through integration with the DeepSHAP method, providing data support and logical basis for hydrological mechanism modeling and agro-meteorological decision-making.

[0076] Step 5: Sort the contributions of each climate factor calculated in Step 3 to the output of the deep learning Transformer model with the composite loss function from largest to smallest, locate the most important climate factor in the deep learning Transformer model, remove the unimportant climate factors, simplify the data of different climate factors, and maintain or even improve the prediction efficiency.

[0077] For ease of explanation, spatial relative terms such as “up,” “down,” “left,” and “right” are used in the embodiments to describe the relationship of one element or feature shown in the figures relative to another element or feature. It should be understood that, in addition to the orientations shown in the figures, spatial terms are intended to include different orientations of the device in use or operation. For example, if the device in the figures is inverted, an element described as being “down” of other elements or features would be positioned “up” of those other elements or features. Therefore, the exemplary term “down” can encompass both up and down orientations. The device may be positioned in other ways (rotated 90 degrees or in other orientations), and the spatial relative descriptions used herein will be interpreted accordingly.

[0078] Moreover, relational terms such as “first” and “second” are used merely to distinguish one component from another that has the same name, without necessarily requiring or implying any such actual relationship or order between the components.

[0079] The above description is only a preferred embodiment of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for determining the importance of predictive factors in a deep learning model, characterized in that, Includes the following steps: Step 1: Standardize the time series data of different predictors and target results, and input the standardized data into the deep learning Transformer model for normalization. Step 2: Input the time series data of the prediction factors and target results after the standardization and normalization processing in Step 1 into the deep learning Transformer model for training, and predict the dynamic changes of the target results based on the trained deep learning Transformer model. Step 3: Construct a composite loss function based on physical mechanisms and introduce a deep learning Transformer model; The physical mechanism involves constructing corresponding physical consistency terms for the physical processes involved in each predictor and incorporating them into the composite loss function. Step 4: Using sensitivity analysis and DeepSHAP, the contribution of each predictor to the output of the deep learning Transformer model with the composite loss function is calculated. Step 4 includes the following steps: S4.1: Select the target input sample x to be explained based on the factors to be calculated; S4.2: From the data matrix according to different predictors, randomly select one background reference sample z from the set of background samples S4.2: From the data matrix according to different predictors, randomly select one background reference sample z from the set of background samples S4.3: Based on the prediction factor data of the target input sample x and the background reference sample z at different locations, construct two mixed samples for difference calculation; S4.4: Based on the two mixed samples used for difference calculation, calculate their average difference in the deep learning Transformer model with the introduction of a composite loss function, and use it as the DeepSHAP value of the current factor. Step 5: Sort the contributions of each predictor calculated in Step 3 to the output of the deep learning Transformer model with the composite loss function from largest to smallest, locate the most important predictor in the deep learning Transformer model, and remove the unimportant predictor. 2.The method of claim 1, wherein, The deep learning Transformer model includes a multi-layer encoder and decoder structure; The deep learning Transformer model incorporates residual connections and layer normalization mechanisms in each encoder and decoder layer; a masking mechanism is also included in the decoder section. 3.The method of claim 1, wherein, The deep learning Transformer model is a non-recursive structure that uses a multi-head self-attention mechanism and a feedforward neural network to perform deep modeling of the input data. 4.The method of claim 3, wherein, The multi-head self-attention mechanism includes: S211: Perform a linear transformation on the input feature sequence to generate query vector, key vector and value vector respectively; S212: The query vector, key vector and value vector are each uniformly divided into h independent sub-vectors along the last feature dimension, and each sub-vector corresponds to an attention head; S213: Multiple attention heads are computed independently and in parallel. Each attention head performs scaled dot product attention on its own subvectors, and finally obtains the attention output of each attention head. S214: Reassemble the attention outputs of multiple attention heads along the last feature dimension to complete the initial fusion of the sub-vector features of multiple attention heads and obtain the concatenated feature matrix. S215: The concatenated feature matrix is ​​linearly transformed using a learnable weight matrix to achieve deep fusion and feature mapping of multi-head information, ultimately outputting the result of the multi-head self-attention mechanism. 5.The method of claim 1, wherein, The feedforward neural network employs a two-layer fully connected structure. The first layer introduces nonlinearity through the ReLU activation function, and the second layer outputs the feature mapping result. The expression of the feedforward neural network is as follows: In the formula, Represents the input vector of a certain layer. ; The weight matrix represents the first fully connected layer; This represents the bias vector of the first fully connected layer. The weight matrix represents the second fully connected layer; This represents the bias vector of the second fully connected layer. 6.The method of claim 1, wherein, The expression for the composite loss function is as follows: In the formula, Represents the total composite loss function; Representative data fitting term; Hyperparameters representing the weights of adjustment terms are used to balance the trade-off between numerical accuracy and physical consistency. This represents the constraint loss term constructed based on physical mechanisms.

7. The application of the method for determining the importance of factors in deep learning model prediction to soil water content prediction according to claims 1-6, characterized in that, Includes the following steps: Step 1: Standardize and normalize the time series data of different climatic factors and soil moisture content; Step 2: Predict dynamic changes in soil moisture content based on a deep learning Transformer model; Step 3: Construct a composite loss function based on physical mechanisms and introduce a deep learning Transformer model. Analyze the prediction effect of soil moisture content based on the deep learning Transformer model with the composite loss function. Step 4: Using sensitivity analysis and DeepSHAP, the contribution of different climate factors to the output of the deep learning Transformer model with a composite loss function is calculated. Step 5: Sort the contributions of each climate factor calculated in Step 3 to the output of the deep learning Transformer model with the composite loss function from largest to smallest, locate the most important climate factor in the deep learning Transformer model, and remove the unimportant climate factors. 8.The method of claim 7, wherein, The climate factors include maximum temperature, minimum temperature, maximum relative humidity, minimum relative humidity, longwave radiation, shortwave radiation, precipitation, evaporation, and wind speed.