A method for simulating and attributing surface water temperature of reservoir based on TKAT-SHAP coupling model
Patent Information
- Application Number
- CN202611069051.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-17
- Publication Date
- 2026-10-27
AI Technical Summary
[0006]针对现有技术所存在的上述缺点,本发明提供了一种基于TKAT-SHAP耦合模型的水库表层水温模拟与归因方法,能够有效解决传统数据驱动模型在面临水库蓄水等非平稳突变环境时,易产生梯度混乱且对水温极端值模拟失效的问题
1)网络底层架构对水温突变的适应性。本发明将内嵌时序Kolmogorov-Arnold网络(TKAN)的TKAT模型引入水库表层水温模拟领域。其改进的自适应编码-解码逻辑,在数据流向上显式分离了长期的历史状态惯性与短期的突变强迫驱动;同时,结合TKAN可学习的激活函数及滞后窗口交叉训练策略(包含历史状态突变信息的离散数据始终参与训练),增强了模型应对大坝蓄水等人类活动引发的水温非线性跳变和极端水温事件的捕捉能力,克服了传统深度学习模型极易产生梯度混乱和极值预测偏差的技术瓶颈。
Smart Images

Figure CN122987616A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water temperature simulation technology, specifically to a method for simulating and attributing surface water temperature in reservoirs based on the TKAT-SHAP coupling model. Background Technology
[0002] Surface water temperature (SWT), as a key physical quantity reflecting the energy balance of a water body, not only controls the vertical thermal stratification evolution of the water body but also indirectly affects the health of the reservoir's aquatic environment and the stability of the aquatic ecosystem. With the construction of large-scale water conservancy and hydropower projects, human-induced damming and reservoir regulation are profoundly reshaping regional hydrothermal processes. During the period of interception and impoundment from natural river channel succession to still-water reservoirs, the increase in reservoir capacity and water level fluctuations caused by reservoir regulation directly alter the volume and residence time of the water body, leading to significant non-stationarity and phased evolution of the reservoir's surface water and thermal state. Therefore, how to scientifically reconstruct the long-term evolution law of reservoir surface water temperature under the influence of human intervention and interpret the nonlinear mechanism of human regulation activities on changes in reservoir surface water temperature is a common challenge currently faced by the ecohydrological community and reservoir ecological regulation engineering.
[0003] Currently, methods for simulating and reconstructing surface water temperature in reservoirs are mainly divided into two categories: physical mechanism models and data-driven models. However, both face different limitations in practical applications. Traditional two-dimensional or three-dimensional physical deterministic water temperature models, such as CE-QUAL-W2, MIKE, and Delft3D, while having clear physical mechanisms, face the challenge of requiring massive amounts of geometric topographic data and parameter calibration. During the critical period of dramatic hydrothermal changes from before dam construction to the early stage of water storage, water temperature and hydrological observation data are often scarce, making it difficult for physical models to reconstruct long-term hydrothermal evolution characteristics under the constraint of scarce data. In addition, in long-term series simulation tasks, the parameter calibration and water temperature solution of physical mechanism models require huge computational resources, resulting in high computational and time costs. In recent years, traditional data-driven models, represented by Long Short-Term Memory Networks (LSTM) and Artificial Neural Networks (ANN), have shown potential in hydrological modeling, including low computational costs, fewer physical parameter calibration requirements, and high simulation accuracy. However, these data-driven models often rely on learning a global statistical mapping between input features and output response in approximately stationary historical samples. They typically treat natural meteorological factors and human intervention variables as a stationary static network, failing to effectively isolate redundant interference between multidimensional variables. When faced with abrupt changes in the relationship between heat storage capacity and driving response during the "dam construction—water storage—high-level normalization" cycle of a reservoir, traditional data-driven models are prone to gradient chaos, leading to severe overestimation or underestimation biases in fitting extreme temperature rises or drops. They cannot effectively capture the complex nonlinear and abrupt characteristics caused by human intervention events.
[0004] Furthermore, existing data-driven models generally suffer from "black box" limitations, failing to explain the physical mechanisms of water temperature changes driven by both meteorological forcing and human-induced regulation. This lack of mechanism analysis prevents models from quantifying the threshold effect and seasonal patterns of water storage changes at different stages on water temperature, thus hindering the provision of concrete and operational scientific management basis for reservoir ecological scheduling.
[0005] In summary, there is an urgent need for a reservoir surface water temperature simulation method that can adapt to non-stationary hydrological changes, overcome the problem of scarce historical data, and break the "black box" effect to achieve physical mechanism attribution, so as to improve the level of intelligent management of reservoir ecological environment under the dual background of complex climate and human activities. Summary of the Invention
[0006] To address the aforementioned shortcomings of existing technologies, this invention provides a reservoir surface water temperature simulation and attribution method based on the TKAT-SHAP coupled model. This method effectively solves the problem that traditional data-driven models are prone to gradient chaos and failure to simulate extreme water temperature values when facing non-stationary and abrupt environmental changes such as reservoir impoundment.
[0007] To achieve the above objectives, the present invention provides the following technical solution: This invention provides a method for simulating and attributing reservoir surface water temperature based on a TKAT-SHAP coupled model, comprising at least: Acquire surface water temperature observation data of the target reservoir section, as well as meteorological and hydrological driving data including meteorological characteristic factors and water storage characteristics, to construct an initial dataset; Calculate the mutual information between the input feature variables and the target variable of water temperature in the initial dataset, use the variance inflation factor to detect collinearity among the input feature variables, and filter the driving feature set; A TKAT water temperature simulation model was constructed, consisting of a selection layer, an encoding-decoding and temporal extraction layer, a fusion layer, and a global attention and output layer. The continuous measured surface water temperature data is divided into K folds. The historical discrete remote sensing observation surface water temperature data and the K-1 fold continuous measured surface water temperature data are merged to form a training set. The remaining fold continuous measured surface water temperature data is used as the test set for training and testing. The optimal TKAT water temperature simulation model is determined based on the evaluation results. Continuous meteorological and hydrological driving data are input into the optimal TKAT water temperature simulation model, and a long series of continuous surface water temperature is reconstructed by using a sliding window output. Remote sensing satellite water surface temperature data were used as alternative observations to verify the surface water temperature reconstruction results. The long sequence of water temperature reconstruction and the driving feature set are input into the SHAP interpreter, which decomposes the simulated surface water temperature value into the sum of the baseline value and the feature contribution value corresponding to each input feature, and calculates the marginal contribution of each input feature based on the Shapley value.
[0008] The method for filtering the driving feature set is as follows: Calculate the mutual information value corresponding to each input feature variable based on the joint probability mass function and marginal probability mass function between each input feature variable and the target water temperature variable; Sort the input feature variables according to their mutual information values; Multiple linear regression is performed with the i-th input feature variable as the dependent variable and the remaining input feature variables as independent variables. The variance inflation factor corresponding to the i-th input feature variable is calculated based on the determination coefficient obtained from the multiple linear regression. Input feature variables with variance inflation factors greater than a preset threshold are removed, and input feature variables with mutual information values that meet the screening criteria and collinearity requirements are retained to form the final driving feature set.
[0009] The technical solution provided by this invention has the following advantages compared with the known prior art: 1) Adaptability of the underlying network architecture to sudden changes in water temperature. This invention introduces the TKAT model, which embeds a temporal Kolmogorov-Arnold network (TKAN), into the field of reservoir surface water temperature simulation. Its improved adaptive encoder-decoder logic explicitly separates the long-term historical state inertia from the short-term forced change in the data flow. At the same time, combined with the learnable activation function of TKAN and the lag window cross-training strategy (discrete data containing historical state change information always participates in training), it enhances the model's ability to cope with nonlinear temperature jumps and extreme water temperature events caused by human activities such as dam impoundment, and overcomes the technical bottleneck of traditional deep learning models that are prone to gradient confusion and extreme value prediction bias.
[0010] 2) This invention addresses the lack of interpretability in traditional data-driven model simulations by providing a physical mechanism analysis of simulation results. The invention constructs the TKAT-SHAP coupled model, successfully decoupling the true directions of natural climate drivers and anthropogenic regulation forces in a highly coupled non-stationary system. It not only quantifies the driving mechanisms of meteorological factors but also extracts the threshold values of multiple physical mechanisms by which anthropogenic regulation activities (using changes in water storage as a proxy variable) affect surface water temperature, thus endowing the data-driven model with physical credibility.
[0011] 3) Application Value of Reservoir Ecological Scheduling Engineering. This invention quantifies the multiple threshold effects and seasonal evolution patterns of surface water temperature changes driven by human activities through a TKAT-SHAP coupled model, providing clear and operational boundaries for the ecological scheduling of deep-water reservoirs. Managers can refer to the physical thresholds interpreted by the model to optimize the reservoir's ecological scheduling range. This provides a low-cost and reliable scientific decision support tool for the intelligent management of reservoir ecology under the dual pressures of complex climate and human activities. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is a schematic diagram of the overall method of the present invention.
[0014] Figure 2 This is a schematic diagram of the lag window strategy and cross-validation data partitioning strategy for simulating surface water temperature in a high dam reservoir in this invention; (a) is the lag window strategy; (b) is the cross-validation data partitioning strategy. Figure 3 This serves as the input feature for the mutual information and variance inflation factor screening model in this embodiment of the invention; Figure 4 This is a scatter plot of the six-fold cross-validation fitting of the TKAT model in the simulation of surface water temperature in a high dam reservoir, as described in this embodiment of the invention. Figure 5 This is a comparison chart of simulated and observed values of surface water temperature in a high dam reservoir using the TKAT model in an embodiment of the present invention. Figure 6 The figures show the results of long-sequence surface water temperature reconstruction of the high dam reservoir and the results of simulation effect verification during the period without measured data using remote sensing data from downstream adjacent reservoirs in this embodiment of the invention; (a) is the surface water temperature reconstruction result; (b)-(c) are the simulation effect verification during the period without measured data. Figure 7 This is a graph showing the global contribution and importance ranking of features based on SHAP in an embodiment of the present invention. Figure 8 This is a beehive graph showing the feature contribution directions based on SHAP interpreter quantization in this embodiment of the invention. Figure 9The following is a diagram showing the seasonal pattern of surface water temperature changes driven by human-induced regulation (water storage) based on SHAP analysis in this embodiment of the invention: (a) shows the annual variation of reservoir water storage under seasonal human-induced regulation activities; (b) shows the annual seasonal variation of the contribution value of water storage to surface water temperature SHAP. Detailed Implementation
[0015] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0016] Example 1 (see Figure 1-9 A reservoir surface water temperature simulation and attribution method based on the TKAT-SHAP coupled model, comprising at least: Step 1: Acquisition and preprocessing of multi-source meteorological and hydrological datasets. Historical discrete remote sensing observation surface water temperature data and continuous measured surface water temperature data of the target reservoir section are acquired and merged into surface water temperature observation data; corresponding meteorological and hydrological driving data (including meteorological characteristic factors and water storage characteristics representing human-induced regulation) are acquired; outlier removal, missing value imputation, and MinMax normalization scaling are performed on the above data to construct the initial dataset.
[0017] Step 2: Dimensionality reduction and selection of input features. Calculate the nonlinear correlation between each input feature variable X and the target water temperature variable Y using mutual information. I(X;Y) : (1) In the formula, p(x,y) for X and Y The joint probability mass function, p(x) and p(y) These are the marginal probability mass functions; Then use the variance inflation factor The collinearity test for features is calculated using the following formula: (2) In the formula, To make the first i Using one input feature as the dependent variable and all other features as independent variables, a multiple linear regression is performed to determine the coefficients of determination. The mutual information values are sorted from largest to smallest, and then discarded. Redundancy factors exceeding a preset threshold are retained, with variables exhibiting high mutual information and low collinearity being used as the final driving feature set.
[0018] Step 3: Construct the TKAT water temperature simulation model ( Figure 2 ). Build a TKAT network architecture consisting of four core modules: 1) Selection layer: For the first layerj Variables in t Flattened eigenvectors at time step Features are extracted using a gated residual network (GRN). (3) in, This means it belongs exclusively to the first A GRN network with 1 variable, Let represent the original flattened eigenvector of the j-th feature variable at time t. This represents the feature vector output after GRN processing.
[0019] And based on the feature combination matrix Generate sparse weights : (4) Then calculate the weighted combination features. : (5) In the formula, the summation index is... j From 1 to For the total number of features, for The j Each element.
[0020] 2) Encoding-Decoding and Temporal State Extraction Layer. A bifurcated encoding-decoding logic is employed, with an internal temporal Kolmogorov-Arnold network (TKAN) processing the input. x The nonlinear transformation is represented as a composition of multiple functions: (6) in, This represents the nonlinear transformation function matrix of a single layer in the network; L This indicates the total number of function transformation layers contained within the KAN module; t represents time t. The mathematical function composition operator, i.e. ,node j exist t The output at each time step integrates the input features. With hidden memory state : (7) The summation index i From 1 to ; Defined as: connecting the first l Layer i The node to the first l +1 floor jA time-dependent learnable nonlinear transformation function between nodes; Represents a nonlinear transformation function. l Indicates the current layer index. Indicates the first l The source node index of the layer, Indicates the first l The target node index at level +1, where t represents the current time step.
[0021] The formula for dynamically updating the hidden memory state is: (8) In the formula, For the first l The number of nodes in the layer It is a nonlinear activation function with time-varying characteristics. and This is a learnable weight matrix.
[0022] The encoding-decoding approach involves the model employing an adaptive branching architecture for different lag window sizes (t). When the lag period t > 1, the model is split into two parts: the encoder receives the first t days of data. One day's worth of historical covariate data (past features) is used to extract historical environmental states and output hidden states. The decoder receives the covariates from day t (the current day) and inherits the historical states passed from the encoder as initial conditions for evolution. When the lag period t=1, the model automatically degenerates into a pure decoder mode, directly mapping based on the current input features. The adaptive encoder-decoder design explicitly separates the inertia of historical states from the driving forces of current meteorological and hydrological conditions, making the model more robust in simulations across both long and short timescales.
[0023] 3) Fusion Layer. The information flow retention rate γ is controlled by the gated linear unit (GLU). (9) In the formula, σ(·) Here, ⊙ represents the Sigmoid activation function, and ⊙ represents the Hadamard element-wise product. and These represent the learnable weight matrices; and These represent the learnable bias vectors; γ ω represents the feature vector input to the gated linear unit; the subscript ω is the weight sharing index, used to identify the parameter set shared in different components of the network; the numbers 4 and 5 are independent network layer index numbers, with number 4 specifically used to identify the independent parameter set of the left 'information control gate branch' and number 5 specifically used to identify the independent parameter set of the right 'feature content mapping branch'.
[0024] 4) Global Attention and Output Layer. Utilizing multi-head self-attention to capture long-range dependencies: (10) in, The scaled dot product attention function represents the fundamental operational module in the multi-head self-attention mechanism. Its function is to calculate the degree of correlation between different time steps in the input time series and to perform weighted aggregation of features based on this correlation, thereby capturing long-distance temporal dependencies. Q is the query matrix, representing the state of the hydrological / meteorological features to be evaluated at the current time step; K is the key matrix, representing the matching index features of the input features at each historical time step; and V is the value matrix, representing the actual extracted feature content information. The transpose of the key matrix is used to perform a matrix dot product with the Q matrix. This is used to calculate the feature similarity score between the current state and the states at each historical time step.
[0025] The multiple vectors output by the multi-head attention layer are concatenated and flattened into... The final output layer simulates the water temperature in the next stage of the time series. : (11) In the formula, Q, K, and V represent the query, key, and value matrices, respectively. For the attention dimension, and These are the weights and biases for the fully connected layer.
[0026] Step 4: Training and testing the TKAT model. Set the lag window length to L days, and establish a mapping relationship between the lagged features of the model input L-1 days prior and the features of the Lth day. Figure 3 a). Continuous measured surface water temperature data is divided into K folds. In each cross-validation iteration, historical discrete remote sensing observation surface water temperature data is always included in model training. This data is combined with K-1 fold continuous measured data as the training set input to the model, and the remaining 1 fold continuous data is used as the test set. Figure 3 b). Repeat the training and testing process K times to output the optimal TKAT water temperature simulation model after training. Evaluation metrics include Nash efficiency coefficient (NSE), root mean square error (RMSE), mean absolute error (MAE), and correlation coefficient (r), calculated using the following formulas: (12) (13) (14) (15) In the formula, N The sample size; summation index i All from 1 to N ; For the first i The actual surface water temperature observation value of each sample Simulate the surface water temperature value for the corresponding model; This represents the average of actual surface water temperature observations. The average value of the simulated surface water temperature is denoted by . The Nash efficiency coefficient evaluates the agreement between the simulated and observed values; a higher value is better, and a value closer to 1 indicates a stronger simulation capability. The root mean square error (RMSE) measures the magnitude of the error between the simulated and observed values; a smaller value indicates lower simulation error, and a smaller model result should be selected. The mean absolute error (MAE) measures the average deviation between the simulated and observed values; a smaller value indicates a smaller overall prediction deviation, and a smaller model result should be selected. The correlation coefficient evaluates the consistency of the trends between the simulated and observed sequences; a value closer to 1 indicates a more consistent trend, and a larger model result should be selected.
[0027] Step 5: Long-term reconstruction of reservoir surface water temperature. Input the continuous meteorological and hydrological data and water storage characteristics from historical to current times into the optimal TKAT model, and use the sliding window technique to output a continuous long-term reconstruction of reservoir surface water temperature.
[0028] Step 6: Verification of Reconstruction Results Based on Downstream Nearby Remote Sensing Data During the Period Without Actual Measurements. Remote sensing satellite water surface temperature data from nearby reservoirs downstream of the target reservoir are obtained as substitute observations. The reliability of the reconstruction is verified using the correlation coefficient r and the mean absolute error (MAE) index. The calculation formula is as follows: (16) (17) In the formula, N The sample size; summation index i All from 1 to N ; For the first i The actual surface water temperature observation value of each sample Simulate the surface water temperature value for the corresponding model; This represents the average of actual surface water temperature observations. The average value of the surface water temperature is used to simulate the model.
[0029] Step 7: SHAP-based interpretable attribution and mechanism interpretation. The reconstructed long sequence and input features are introduced into the SHAP interpreter, and the simulated values are decomposed using an additive feature attribution model: (18) in, This represents the marginal contribution of the j-th feature variable in the i-th input sample to the model's simulation result in this simulation. Mathematically, it is related to the right-hand side of the equation. They are equivalent, that is benchmark value The marginal contribution of the j-th feature is the expected simulated value of the model on the background dataset. Calculation based on Shapley value in cooperative game theory. Calculation of the marginal contribution of each feature based on Shapley value: (19) In the formula, Let v(S) represent the conditional expected simulated value given by the deep learning model when the feature set of the input model contains all the features of the subset S, and an additional j-th feature is added. C is the set of all input features, S is the subset that does not contain the j-th feature, |S| and |N| are the number of features in the subset and the whole set, respectively, and v(S) is the conditional expected simulated value of the model under the feature subset S.
[0030] Based on the SHAP contribution values of various features to surface water temperature quantified by the SHAP interpreter, the main factors driving changes in reservoir surface water temperature and the driving directions of various driving factors are identified. Then, the monotonic and nonlinear driving mechanisms of meteorological features are quantified and interpreted, as well as the multiple nonlinear threshold effects and seasonal effects of human regulation (water storage) on surface water temperature evolution.
[0031] Example 2: Specific application of the TKAT-SHAP coupled model in the simulation and attribution of surface water temperature in the Lancang River high dam reservoir.
[0032] This embodiment takes a typical deep-water high-dam reservoir in the Lancang River basin as an example. This reservoir has undergone three typical stages: natural river channel (2005-2008), drastic water storage due to dam closure (2009-2011), and normalized high-water-level regulation (2012-2024). Its hydrological and thermodynamic state exhibits non-stationary evolution, making it an ideal object for verifying the effectiveness of this invention. The implementation steps are as follows: S1. Acquisition and Preprocessing of Multi-Source Meteorological and Hydrological Datasets. Meteorological, hydrological, and surface water temperature data for the high dam reservoir from 2005 to 2024 were acquired. The surface water temperature observation data consisted of two parts: historical discrete remote sensing observation surface water temperature data from January 1, 2005 to December 31, 2018 (a total of 211 data points, including hydrothermal abrupt changes before and after dam construction); and continuous measured surface water temperature data acquired using the HOBO thermometer from January 1, 2019 to December 31, 2024 (a total of 2192 data points). Corresponding meteorological and hydrological driving data were acquired, including air temperature, precipitation, relative humidity, evaporation, air pressure, longwave radiation, shortwave radiation, and wind speed characteristics (acquired based on the ERA5-Land reanalysis dataset), as well as high dam reservoir water storage characteristics representing human-induced water storage activities. The above data were preprocessed by using box plots to remove outliers exceeding 1.5 times the interquartile range; missing values were filled in using linear interpolation; and to eliminate the influence of different units on the model gradient descent, all input data were normalized and scaled using MinMax to map them to the [0, 1] interval to construct the initial dataset.
[0033] S2. Dimensionality Reduction and Feature Selection of Input. To avoid information redundancy and collinearity interference, mutual information (MIC) and variance inflation factor (VIF) are used to select features from the initial dataset. Figure 3 ).
[0034] S21. First, use mutual information to calculate each input feature variable. X With water temperature as the target variable Y Nonlinear correlation between I(X;Y) :
[0035] In the formula, p(x,y) for X and Y The joint probability mass function, p(x) and p(y) These are the marginal probability mass functions; S22. Then, the variance inflation factor (VIF) is used to test for collinearity among features. The calculation formula is as follows:
[0036] In the formula, To make the first i The determination coefficients are obtained by performing multiple linear regression with one input feature as the dependent variable and all other input features as independent variables. After calculation and elimination of redundant factors with VIF greater than a preset threshold (set to 5), six types of features with high mutual information and low collinearity are finally selected as the final driving feature set for the TKAT model: temperature, precipitation, relative humidity, evaporation, air pressure, and water storage.
[0037] S3. Construct the TKAT water temperature simulation model. Build the TKAT network architecture, which includes four core modules: S31, Dynamic Feature Selection Layer (VSN): Inputting the lag period and daily covariates, this layer automatically filters noise and focuses on the key factors driving water temperature changes at the current moment. (For the first...) j Variables in t The flattened feature vector at time step is nonlinearly processed by a gated residual network (GRN):
[0038] Generate dynamically sparse variable selection weights based on the combination matrix of all eigenvectors:
[0039] The features are weighted and combined to obtain the processed input features. :
[0040] In the formula, the summation index is... j From 1 to The total number of features.
[0041] S32, Adaptive Encoding-Decoding and Temporal State Extraction Layer: Employs a bifurcation encoding-decoding logic. The encoder receives lagging historical features to extract state inertia, while the decoder receives current-day features for evolution. Internally, it uses a temporal Kolmogorov-Arnold network (TKAN) to capture non-stationary mutations through multi-layered composite nonlinear transformations and dynamic updates of hidden memory states. The specific formula is as follows: No. l Layer TKAN input x Nonlinear transformation KAN(x,t) Represented as the composition of multilevel functions:
[0042] Among them, single-layer nodes j exist t Output at time Integrates input features With hidden memory state :
[0043] The hidden memory state is dynamically updated based on the historical state and the current input:
[0044] S33. Deep Feature Fusion Layer: Utilizing a gated residual network with exponential linear units (GLUs) and GLUs to control the information flow retention rate. γ This enhances the network's expression depth for mutations. The specific formula is:
[0045] In the formula, σ( ) is the Sigmoid activation function, and ⊙ is the Hadamard element-wise product.
[0046] S34, Global Attention and Output Layer: Utilizing multi-head self-attention to capture long-range dependencies, the output is mapped to simulated surface water temperature values via a fully connected layer. The specific formula is: The global attention mechanism employs multi-head self-attention to capture long-distance dependencies:
[0047] The final output layer predicts the water temperature for the next stage of the time series:
[0048] In the formula, Q, K, and V represent the query, key, and value matrices, respectively.
[0049] Training and Testing of S4 and TKAT Models. A lag window simulation strategy was adopted: In this embodiment, the lag window length was set to L=10 days, meaning that the lag features of the first 9 days and the features of the 10th day were input to simulate the surface water temperature on the 10th day. Then, the long-sequence surface water temperature simulation was achieved by continuously moving the window forward. Model hyperparameter optimization used a grid search method. The model hyperparameter search space and the optimal hyperparameter search results are shown in Table 1. A specially designed cross-validation strategy was adopted to handle abrupt changes: The continuous measured surface water temperature data from 2019 to 2024 was divided into 6 sections. In each training iteration, the discrete remote sensing observation surface water temperature data from 2005 to 2018 (because it contains the dramatic evolution patterns during the dam's impoundment period) was always used in model training; this discrete data was merged with 5 sections of continuous measured data as the training set input to the model, and the remaining 1 section of continuous measured data was reserved as the test set. This training and testing process was repeated 6 times. Evaluation metrics include: Nash efficiency coefficient (NSE), root mean square error (RMSE), mean absolute error (MAE), and correlation coefficient (r).
[0050] Table 1. Search range and optimal hyperparameter values for the TKAT model
[0051] The final performance evaluation results (Table 2) show that the TKAT model constructed in this invention achieved an average Nash efficiency coefficient (NSE) of 0.884 on the test set in 6-fold cross-validation, while the root mean square error (RMSE) and mean absolute error (MAE) remained stable at low error levels (RMSE = 1.094℃, MAE = 0.886℃). The model can effectively capture the time-delay sensitivity differences and extreme values of surface water temperature under different reservoir operation conditions.
[0052] Table 2 Evaluation of the Six-Fold Cross-Validation Results of the TKAT Model
[0053] Attached Figure ( Figure 4 Further analysis shows that the TKAT model's six-fold cross-validation fit points are clustered and symmetrically distributed on both sides of the ideal fit line, with a small angle between the fitted line and the ideal fit line. This indicates that the TKAT model accurately captures the surface water temperature variation pattern with small simulation bias, especially with low risk of underestimation for high extreme values and low risk of overestimation for low extreme values. (See attached figure) Figure 5 The results visually demonstrate the perfect capture of surface water temperature variation patterns by the TKAT model across the entire simulation dataset. It accurately simulates extreme high and low values and precisely captures the abrupt changes in surface water temperature during the initial impoundment stage of high dams in 2009-2010.
[0054] S5. Long-term reconstruction of reservoir surface water temperature. Using the optimal TKAT model parameters obtained from training in S4, continuous meteorological and hydrological characteristics and water storage from 2005 to 2024 are input into the model. A sliding window is used to continuously slide to new time steps, outputting a long-term reconstruction of continuous daily surface water temperature of the high dam reservoir from 2005 to 2024. Figure 6 a).
[0055] S6. Verification of Reconstruction Results Based on Downstream Nearby Remote Sensing Data During Periods Without Measured Data. To demonstrate the reliability of the reconstruction results for historical periods without measured data, this embodiment uses remote sensing satellite water surface temperature data from the Manwan Reservoir, which is relatively close to the Gaoba Reservoir, during the period of 2005-2018 as substitute observations. Using the correlation coefficient r and the mean absolute error (MAE) index, the reconstructed surface water temperature sequence of the Gaoba Reservoir during the period without measured data (2005-2018) is fitted and verified with the downstream remote sensing observation surface water temperature values.
[0056] The verification results show that ( Figure 6(bc) The trends of the two are highly consistent, with a correlation coefficient r of 0.84 and a MAE of 1.78℃, proving that the TKAT model can simulate and reconstruct the non-stationary trend of surface water temperature in high dam reservoirs from the natural river period to the dam construction and reservoir filling period when there is no measured data. The long-sequence surface water temperature data of historical non-stationary period reconstructed by this invention has the credibility for engineering applications.
[0057] S7. SHAP-based Interpretable Attribution and Mechanism Explanation. The reconstructed long sequence and input features are introduced into the SHAP (SHapley Additive exPlanations) interpreter. An additive feature attribution model is used to calculate the marginal contribution of each feature, specifically including: An additive feature attribution model is used to convert the simulated values of the deep learning model. Decomposed into the sum of the baseline value and the contribution values of each feature:
[0058] Among them, the benchmark value Let be the expected simulated value of the model on the background dataset, the th j Marginal contribution of each feature Calculation based on Shapley value in cooperative game theory:
[0059] In the formula, C The set of all input features. S Not including the first j A subset of features |S| and |N| These represent the number of features in the subset and the entire set, respectively. v(S) For feature subset S The conditional expected simulated values of the model.
[0060] The quantification results and mechanisms are explained below: 1) Explanation of meteorological driving mechanisms: Analysis revealed that temperature and water storage are the two largest contributing factors (combined contribution of nearly 50%), such as... Figure 7 As shown, the four meteorological characteristics—temperature, air pressure, relative humidity, and evaporation—mainly exhibit monotonic driving effects; increases in their physical values will promote increases in surface water temperature. Precipitation, on the other hand, shows a weak nonlinear effect. Figure 8 As shown.
[0061] 2) Interpretation of Multiple Nonlinear Thresholds in Artificial Storage "N-Type": Breaking the black box of the model, the nonlinear threshold of water storage (a proxy variable for artificial storage) on surface water temperature was quantified and extracted. ① Low storage stage (water storage < 3.5 km³): vertical water exchange is weak, and slight increase in water storage promotes heat accumulation on the surface, resulting in a positive warming effect. ② The stage of intense water storage (3.5 km³ ≤ storage volume ≤ 8.0 km³): The commissioning of the dam causes the water level to rise rapidly, which strongly induces vertical mixing and momentum exchange of the water body. The upwelling of deep cold water breaks the heat accumulation on the surface, which manifests as a negative "cooling" effect. ③ High-level normalized operation stage (water storage > 11.0 km³): The reservoir forms a stable large-volume deep-water lake, the hydrodynamic conditions tend to slow down, the deep thermal stratification is stable, and the surface water body, as an independent thermally active layer, efficiently locks in and stores heat, and once again transforms into a significant positive heat preservation effect.
[0062] 3) Interpretation of seasonal scheduling mechanisms ( Figure 9 During the autumn and winter water storage and high water level operation period (approximately August to March), the large water volume (>9.4 km³) provides great thermal inertia, effectively slowing down interfacial heat loss and maintaining strong thermal stratification of the surface layer. The corresponding SHAP value is generally positive (peak value 0.49℃). The water storage characteristics at this stage mainly promote the warming and heat preservation effect of the surface water. Conversely, during the concentrated drawdown period before the spring and summer floods (approximately April to July), the water volume sharply decreases to a low of 7.7 km³. The decrease in the heat capacity of the shallow water and the shortening of the residence time greatly induce vertical hydrodynamic turbulence and mixing, breaking the thermal stratification and promoting the upwelling of deep cold water, causing the SHAP value to turn into a continuous negative state (as low as -0.31℃), which stimulates a cooling effect on the surface water.
[0063] In summary, this invention, through the TKAT model, adapts to the non-stationary surface water temperature abrupt changes in deep-water reservoirs; and through cross-validation without a measured period and SHAP physical mechanism attribution, it not only ensures the reliability of the reconstructed data, but also provides clear and quantifiable physical thresholds to support the ecological management of deep-water reservoirs under different water levels and seasonal conditions (such as avoiding specific water level fluctuation ranges to prevent abnormal cold water from impacting fish habitats). Furthermore, if the aforementioned function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0064] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0065] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), fiber optic devices, and portable optical disc read-only memory (CDROM). Additionally, computer-readable media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0066] Furthermore, in order to provide a concise description of exemplary embodiments, not all features of actual embodiments (i.e., which features are not relevant to the currently considered best mode for carrying out the invention, or those features that are not relevant to implementing the invention) may be omitted.
[0067] It should be understood that numerous specific implementation decisions can be made during the development of any practical implementation, such as in any engineering or design project. Such development efforts may be complex and time-consuming, but for those skilled in the art who benefit from this disclosure, the development effort will be a routine work of design, manufacturing, and production without requiring much experimentation.
[0068] The above embodiments are only used to illustrate the technical solutions of the present invention; those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions described in the foregoing embodiments without causing the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. A reservoir surface water temperature simulation and attribution method based on the TKAT-SHAP coupled model, comprising: The method involves acquiring surface water temperature observation data of the target reservoir section, as well as meteorological and hydrological driving data including meteorological characteristic factors and water storage characteristics, to construct an initial dataset. Its key feature is that... Calculate the mutual information between the input feature variables and the target water temperature variable in the initial dataset, use the variance inflation factor to detect collinearity among the input feature variables, and filter the driving feature set; A TKAT water temperature simulation model was constructed, consisting of a selection layer, an encoding-decoding and temporal extraction layer, a fusion layer, and a global attention and output layer. The continuous measured surface water temperature data is divided into K folds. The historical discrete remote sensing observation surface water temperature data and the K-1 fold continuous measured surface water temperature data are merged to form a training set. The remaining fold continuous measured surface water temperature data is used as the test set for training and testing. The optimal TKAT water temperature simulation model is determined based on the evaluation results. Continuous meteorological and hydrological driving data are input into the optimal TKAT water temperature simulation model, and a long series of continuous surface water temperature is reconstructed by using a sliding window output. Remote sensing satellite water surface temperature data were used as alternative observations to verify the surface water temperature reconstruction results. The long sequence of water temperature reconstruction and the driving feature set are input into the SHAP interpreter, which decomposes the simulated surface water temperature value into the sum of the baseline value and the feature contribution value corresponding to each input feature, and calculates the marginal contribution of each input feature based on the Shapley value.
2. The method according to claim 1, characterized in that, The method for filtering the driving feature set is as follows: Calculate the mutual information value corresponding to each input feature variable based on the joint probability mass function and marginal probability mass function between each input feature variable and the target water temperature variable; Sort the input feature variables according to their mutual information values; Multiple linear regression is performed with the i-th input feature variable as the dependent variable and the remaining input feature variables as independent variables. The variance inflation factor corresponding to the i-th input feature variable is calculated based on the determination coefficient obtained from the multiple linear regression. Input feature variables with variance inflation factors greater than a preset threshold are removed, and input feature variables with mutual information values that meet the screening criteria and collinearity requirements are retained to form the final driving feature set.
3. The method according to claim 1, characterized in that, The selection layer processes the driving feature set, including: Obtain the flattened feature vector corresponding to the j-th input feature variable at time t, and input it into the gated residual network for feature extraction to obtain the corresponding nonlinear feature vector; Based on the feature combination matrix constructed according to the features corresponding to each input feature variable, the gated residual network is input to generate the corresponding sparse weights. Based on the sparse weights corresponding to each input feature variable, the corresponding nonlinear feature vectors are weighted to obtain the combined features of the input encoding-decoding and temporal state extraction layers.
4. The method according to claim 1, characterized in that, The encoding-decoding and timing state extraction layer adopts an adaptive encoding-decoding structure and performs corresponding data processing procedures based on the lag window length, including: When the lag window length is greater than 1 day, the historical covariate data before the current time in the lag window is input into the encoder, and the encoder extracts the historical environmental state and outputs the hidden state. Input the covariate data corresponding to the current time into the decoder, and use the hidden state as the initial condition of the decoder to perform temporal evolution on the covariate data corresponding to the current time; When the lag window length is equal to 1 day, the adaptive encoder-decoder and time-series state extraction layer is switched to pure decoder mode, and surface water temperature is predicted based on the covariate data corresponding to the current time.
5. The method according to claim 1, characterized in that, The fusion layer, global attention layer, and output layer process the data output from the encoder-decoder and temporal state extraction layers, including: By utilizing a fusion layer consisting of a gated residual network with exponential linear units and a gated linear unit (GLU), the information flow retention rate is controlled by the gated linear unit to fuse the temporal features of the input. The fused temporal features are input into the global attention and output layer, and the long-distance dependencies between different time steps are obtained by using a multi-head self-attention layer. The multiple vectors output by the multi-head self-attention layer are concatenated and flattened to obtain the flattened attention features. The attention features are then mapped to the simulated surface water temperature value corresponding to the next stage time sequence through a fully connected layer.
6. The method according to claim 1, characterized in that, The method for determining the optimal TKAT water temperature simulation model based on the evaluation results is as follows: repeatedly execute the training and testing process, and determine the optimal TKAT water temperature simulation model according to the Nash efficiency coefficient, root mean square error, mean absolute error and correlation coefficient obtained from each training and testing process, in accordance with the preset model evaluation rules.
7. The method according to claim 1, characterized in that, The marginal contribution is determined by using an additive feature attribution model to decompose the surface water temperature simulation value output by the TKAT water temperature simulation model into the sum of the baseline value and the feature contribution value corresponding to each input feature. All input features are combined to form an input feature set, and for the j-th input feature, a feature subset that does not contain the j-th input feature is constructed; Based on the difference between the conditional expected simulated value corresponding to the feature subset and the conditional expected simulated value corresponding to the feature subset after adding the j-th input feature, and combined with the combined weights corresponding to the feature subset, the marginal contribution of the j-th input feature is calculated.
8. The method according to claim 3, characterized in that, The encoding-decoding and temporal state extraction layer includes a temporal Kolmogorov-Arnold network. The temporal Kolmogorov-Arnold network extracts combined feature states, including: The input features are nonlinearly transformed using a multi-layer nonlinear function composition method. In the l-th layer node, the input features corresponding to the current time step and the hidden memory state corresponding to the current time step are fused to obtain the output of the next layer node at the current time step; The hidden memory state at the current time step is dynamically updated based on the hidden memory state at the previous time step, the input features at the current time step, and the corresponding weight matrix.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.