Double-Token graph convolution multi-station water level forecasting method based on interpretability
By introducing dual Token graph convolution technology into the water level forecast model, cross-variable and cross-time learning is carried out, the problem of existing models being difficult to capture the dynamic interdependence and spatial-temporal changes of multi-site water level data is solved, and higher prediction accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202510119775.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-25
- Publication Date
- 2025-03-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing water level forecast models are difficult to effectively capture the dynamic interdependence and spatiotemporal changes between multi-site water level data, especially in inland watersheds, resulting in insufficient prediction accuracy and reliability.
A dual Token graph convolution multi-site water level forecast method based on interpretability is proposed. Through the embedding of variable tokens and time tokens, cross-variable learning and cross-time learning are carried out respectively, spatial correlation and time dependence are captured, and adaptive fusion is carried out to generate prediction sequences.
It improves the accuracy and reliability of hydrological forecasts, enhances the generalization ability of externally distributed samples, reduces the impact of performance degradation and external interference in different scenarios, and is especially suitable for hydrological forecasts in large and transbasins.
Smart Images

Figure CN119557604A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water level forecasting, and more specifically, to an interpretable dual-Token graph convolution multi-site water level forecasting method. Background Art
[0002] Usually, deep learning models treat hydrological forecasting as a time series forecasting task. However, these methods have certain limitations. For example, RNN is limited by the gradient vanishing problem; CNN and self-attention mechanism have defects in capturing long-term dependencies; MLP's fully connected structure has inherent local agnostic defects, etc. For this reason, GNN is introduced to reveal the correlation between forecast factors through graph structure, showing great advantages in time series modeling and predictive analysis.
[0003] In recent years, due to human intervention and sudden changes in the circulation patterns of regional water bodies, meteorological and environmental factors have had a significant impact on water levels in the temporal and spatial dimensions, resulting in the interdependencies between water level data at different sites being often dynamic and evolving. Although some methods consider using dynamic and time-varying graph structures to model feature correlations, they ignore the key fact that these correlations may be closely related to significantly stable time scales. In addition, existing forecast models rarely consider the spatiotemporal changes of water bodies at the same time, making them difficult to use for water level prediction at multiple reservoir sites in inland basins. Summary of the invention
[0004] The purpose of the present invention is to address the deficiencies of the prior art and propose a multi-site water level forecasting method based on interpretable dual-Token graph convolution.
[0005] First, a dual-Token graph convolution multi-site water level forecasting method based on interpretability is provided, including:
[0006] S1, obtaining an input sequence, and performing preprocessing and dimension embedding on the input sequence; the dimension embedding includes variable token embedding and time token embedding;
[0007] S2. Based on the variable tokens and time tokens, cross-variable learning and cross-time learning are performed to capture the spatial correlation and time dependency of the sequence, and the spatial representation vector and the time representation vector are obtained;
[0008] S3. Adaptively fuse the space representation vector and the time representation vector to obtain a prediction sequence.
[0009] Preferably, S2 comprises:
[0010] S201, inputting variable tokens into a graph module with multiple layers stacked in parallel, performing cross-variable learning to capture the spatial correlation of the sequence, and obtaining a spatial representation vector, wherein the cross-variable learning includes:
[0011] S2011, construct graph adjacency matrix;
[0012] S2012, adding a unit matrix to the graph adjacency matrix to ensure that each node has self-connection, and capturing the spatial correlation of the sequence through the MixHop method;
[0013] S2013, spatial correlation learning via convolutional encoder;
[0014] S202: Input the time token into a multi-layer scalar graph module stacked in parallel, perform cross-time learning to capture the temporal dependency of the sequence, and obtain a time representation vector.
[0015] Preferably, in S202, the cross-time learning includes:
[0016] S201, performing scale division by using FFT method;
[0017] S202, performing cycle-by-cycle dynamic graph convolution learning on multiple time scales;
[0018] S203. Integrate tensors of different scales and perform hybrid expert learning according to their respective amplitude strengths.
[0019] Preferably, in S1, the variable token embedding includes: embedding the C prediction factors of S sites into a D-dimensional vector through a two-dimensional convolution, and reshaping the obtained two-dimensional feature map into a one-dimensional feature map; the time token embedding includes: treating the C prediction factors of each site at the same timestamp as a D-dimensional token, and embedding the position code PE and the time code TE at the same time.
[0020] As a preference, it also includes:
[0021] S4. According to the true value and the predicted value, the trainable parameters are optimized by the L1 loss function, and the trainable parameters include the number of samples, the number of hydrological stations and the future time step.
[0022] In a second aspect, a dual-Token graph convolution multi-site water level forecasting system based on interpretability is provided, which is used to execute any of the methods described in the first aspect, including:
[0023] A dual token embedding module, used for obtaining an input sequence, and performing preprocessing and dimension embedding on the input sequence; the dimension embedding includes variable token embedding and time token embedding;
[0024] A parallel graph learning module, which is used to perform cross-variable learning and cross-time learning according to variable tokens and time tokens, respectively, to capture the spatial correlation and time dependency of the sequence, and obtain a spatial representation vector and a time representation vector;
[0025] The adaptive fusion output module is used to adaptively fuse the space representation vector and the time representation vector to obtain a prediction sequence.
[0026] According to a third aspect, a computer storage medium is provided, wherein a computer program is stored in the computer storage medium; when the computer program is executed on a computer, the computer executes any method described in the first aspect.
[0027] In a fourth aspect, an electronic device is provided, including:
[0028] Memory, used to store computer programs;
[0029] A processor is used to execute the computer program to implement any method as described in the first aspect.
[0030] The beneficial effects of the present invention are as follows: the water level forecasting method provided by the present invention establishes a learnable adjacency matrix from the time and space perspectives respectively to capture the ever-changing time dependency and spatial correlation, thereby improving the reliability and accuracy of the hydrological forecast, and the present invention has a strong generalization ability for out-of-distribution samples, and exhibits a small performance degradation and a strong ability to resist external interference in different scenarios, thereby providing important value for attempts to conduct hydrological forecasting research in large river basins and across river basins, and focusing on large-scale sites and more water resource forecasts. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A schematic diagram of the process of the explainable dual-Token graph convolution multi-site water level forecasting method provided by the present invention;
[0032] Figure 2-1 Scatter density plots of the predicted and observed values of reservoir water levels forecasted one day in advance for the four comparison models;
[0033] Figure 2-2 Scatter density plots of predicted and observed reservoir water levels for the other four comparison models one day in advance;
[0034] Figure 3 The bar chart shows the mean values of the four indicators obtained by all models under the four forecast periods;
[0035] Figure 4-1 It is a MAPE spatial diagram obtained by predicting the water level of 31 stations in the irrigation area at different time scales;
[0036] Figure 4-2Another MAPE spatial diagram obtained by predicting the water level of 31 stations in the irrigation area at different time scales;
[0037] Figure 5 It is the distribution map of irrigation area water level data in dry season, mid-flood season and flood season;
[0038] Figure 6-1 The results are the comparison between the observed water level of the reservoir in the dry season and the predicted values of all the comparison models;
[0039] Figure 6-2 It is the comparison result between the water level observation value of the reservoir in the mid-flood season and the forecast value of all comparison models;
[0040] Figure 6-3 It is the comparison result between the water level observation value of the reservoir in flood season and the forecast value of all comparison models;
[0041] Figure 7-1 This is a schematic diagram of the sensitivity analysis of the embedding dimension and the lookback window when the present invention performs multi-site water level forecasting;
[0042] Figure 7-2 This is a schematic diagram of the node dimension and learning rate sensitivity analysis when the present invention performs multi-site water level forecasting;
[0043] Figure 7-3 This is a schematic diagram of sensitivity analysis of TOP K and number of stacking layers when performing multi-site water level forecasting in the present invention;
[0044] Figure 7-4 A schematic diagram of sensitivity analysis of the number of convolutional encoder channels and the convolutional encoder kernel size when the present invention performs multi-site water level forecasting;
[0045] Figure 7-5 This is a schematic diagram of the depth sensitivity analysis of the graph when the present invention performs multi-site water level forecasting;
[0046] Figure 8-1 A schematic diagram of the adjacency matrix learned from a multi-scale time perspective in the present invention;
[0047] Figure 8-2 Schematic diagram of the adjacency matrix and the reservoir site diagram learned from a spatial perspective by the present invention;
[0048] Figure 8-3 This is a schematic diagram of hydrological data from 12:00 on 2023 / 06 / 21 to 11:00 on 2023 / 06 / 23;
[0049] Fig. 9 This is a schematic diagram for comparing the model calculation efficiency under multi-site water level datasets;
[0050] Figure 10-1 It is a visualization diagram of the reservoir water level forecast by the present invention and the SOTA baseline under the forecast period H=24;
[0051] Figure 10-2 It is a visualization diagram of the reservoir water level forecast by the present invention and the SOTA baseline under the forecast period H=192;
[0052] Figure 10-3 It is a visualization diagram of the reservoir water level forecast by the present invention and the SOTA baseline under the forecast period H=336;
[0053] Figure 10-4 This is a visualization diagram of the reservoir water level forecast by the present invention and the SOTA baseline under the forecast period H=720. DETAILED DESCRIPTION
[0054] The present invention is further described below in conjunction with embodiments. The description of the following embodiments is only used to help understand the present invention. It should be noted that for ordinary persons in the art, without departing from the principle of the present invention, the present invention can also be modified in some ways, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
[0055] Embodiment 1:
[0056] Before introducing the method of the present invention, the hydrological forecast problem is first defined. The hydrological forecast formalization in the embodiment of the present invention corresponds to a spatiotemporal forecast task, the goal of which is to accurately estimate the water level information at different time steps by describing the complex relationship between historical records and the water levels of multiple stations in the future. Given a basin consisting of S observation stations, each station can observe C prediction factors, namely the water level sequence and the corresponding dynamic environmental factors. The historical data records observed by all stations in T time windows are recorded as Specifically, the following definitions are given:
[0057] Definition 1 (Spatiotemporal hydrological forecast): Assuming the current timestamp is t, the hydrological forecast problem is to use the historical dynamics of T time steps Simultaneously predict the water level information of S reservoir sites in the future H time steps , formulated as follows:
[0058]
[0059] in, is from arrive The mapping function of represents all learnable model parameters.
[0060] Definition 2 (Figure): Assume represents a graph where represents the set of nodes of the entire graph, Represents the set of edges connecting nodes. Edges measure the correlation between nodes and can be represented by the adjacency matrix Indicates that Representation Node and The correlation between them, N represents the number of nodes.
[0061] In order to address the limitations of existing models, Example 1 of the present invention provides a dual-token graph convolution multi-site water level forecasting method based on interpretability, invents an interpretable dual-token perceptual graph convolutional network (DTAGCN), and conducts long-term irrigation water level forecasting research on irrigation areas. The proposed graph learning layer establishes a learnable adjacency matrix from the perspective of time and space to capture the ever-changing long-term dependencies and spatial correlations. Then, a graph convolution module is constructed to capture different dependencies in the corresponding feature graph structure. Finally, the cross-time learning correlation and cross-space learning correlation are adaptively fused and output by experts to obtain the prediction results.
[0062] Specifically, Figure 1 As shown, the interpretable dual-Token graph convolution multi-site water level forecasting method provided by the present invention includes:
[0063] S1. Obtain an input sequence, and perform preprocessing and dimension embedding on the input sequence; the dimension embedding includes variable token embedding and time token embedding.
[0064] Hydrological data often exhibit complex patterns, as the multifaceted underlying signals are often complex and changing. Existing methods usually embed the data of all stations at the same timestamp into the feature vector to capture the temporal dependency, while ignoring the potential spatial correlation in the data of the same station at different time steps. Therefore, it is necessary to study the hydrological data from both spatial and temporal perspectives. Potential multifaceted correlations, such as Figure 1 As shown in part (a), the variable token is obtained and time token Note that before embedding, the original data needs to be standardized to eliminate the influence of different dimensions and outliers. The formula is as follows:
[0065]
[0066] in, . and The original data are The mean and standard deviation of .
[0067] In addition, the effectiveness of identifying and utilizing important signals for future water level prediction is hampered by the complex hydrological and meteorological relationships between different stations. The predictors observed at different stations have different correlations with future water levels, and this correlation will also change over time. Making full use of the spatial dependencies between these stations is beneficial to water level prediction. A 2D convolution (kernel=3, stride=1) is used to embed the C predictors of S stations into a D-dimensional vector, and the resulting 2D feature map is reshaped into a 1D feature map. The specific process of variable token embedding is as follows:
[0068]
[0069] in, , D is the variable embedding dimension.
[0070] For time token embedding, similarly, following the generative formulation of the TSF task, the C predictors of each site at the same timestamp are regarded as a D-dimensional tag, and the position code PE and the time code TE are embedded at the same time (following the standard protocol in FEDformer). The formula is described as follows:
[0071]
[0072]
[0073] in, ,and Represents geographic location information, that is, the longitude and latitude of each site. GL is projected to ( )-dimensional matrix. , D is the time embedding dimension. is a learnable global timestamp embedding with a bounded vocabulary size (60 minutes as the finest granularity).
[0074] S2. According to the variable tokens and time tokens, cross-variable learning and cross-time learning are performed respectively to capture the spatial correlation and temporal dependency of the sequence, and the spatial representation vector and the temporal representation vector are obtained.
[0075] In S2, the variable token and time token As the initial input, it is stacked in parallel with L layers of adaptive graph convolution blocks (i.e., graph module GraphBlock and scale graph module ScaleGraphBlock) to capture the temporal and spatial dependencies of the sequence, such as Figure 1 The calculation process of PGL at the lth layer is as follows:
[0076]
[0077]
[0078] These two parts will be introduced in detail below.
[0079] S2 includes:
[0080] S201. Input variable tokens into a graph module with multiple layers stacked in parallel, perform cross-variable learning to capture the spatial correlation of the sequence, and obtain a spatial representation vector.
[0081] like Figure 1 As shown, It is the input of the lth graph module and is implemented in a residual manner. Its cross-variable learning process mainly consists of three parts: adaptive graph learning, dynamic graph convolution, and convolutional attention.
[0082] (1) Adaptive graph learning: Existing studies mainly measure the water level correlation of hydrological station observations between regions through Euclidean distance, but the explicit graph structure may limit the representation ability to capture spatial dependencies. In order to adaptively learn the hidden dependencies between multiple stations, this paper adopts embedding technology and similarity measurement to construct a graph adjacency matrix The specific process is as follows:
[0083]
[0084] Where l and T represent the layer index and matrix transpose respectively. and is a randomly initialized trainable node embedding that is continuously optimized during training. N represents the number of nodes (in this case, N=S), and d represents the node embedding dimension.
[0085] (2) Dynamic graph convolution: After obtaining the adjacency matrix After that, first Adding the identity matrix ensures that each node has self-connection. Then, the MixHop method is introduced to capture spatial correlation, because it can produce more expressive node representations without adding additional memory and computational complexity. The formula is defined as follows:
[0086]
[0087] in, and σ is the activation function, the hyperparameter P is an integer set of adjacent powers, d gc represents the network depth of GCN. In addition, Indicates column concatenation, which is used to connect the intermediate variables generated by each iteration. express Specifically, if j=3, then .
[0088] (3) Convolutional Attention: Previous predictors usually use attention mechanisms to promote sequence modeling, but this will significantly increase the computational burden of the model. This invention uses a convolutional encoder (Conv Encoder) for fast and efficient correlation learning, such as Figure 1 As shown in part (c), the calculation process is as follows:
[0089]
[0090] Among them, DW is the depth convolution, PW 1 and PW 2 is point convolution and LN is layer normalization.
[0091] S202: Input the time token into a multi-layer scalar graph module stacked in parallel, perform cross-time learning to capture the temporal dependency of the sequence, and obtain a time representation vector.
[0092] In the cross-temporal learning stage, we need to pay attention to multi-scale temporal patterns and use the scalogram module to learn the temporal correlation of sequences at different period scales. Figure 1 The figure shows the learning details of the scale graph module, which includes three parts: scale recognition, multi-scale dynamic graph convolution, and adaptive expert aggregation.
[0093] (1) Scale division: In long-term hydrological forecasting, water level data usually exhibit multi-periodic characteristics, and using periodic information to decouple long-term series has been proven to be effective, among which FFT is one of the most popular decoupling methods. To this end, FFT is used as the time scale to detect prominent periodic changes in the series. Specifically, FFT is used to decouple the input data from the lth layer. Perform frequency domain analysis and select the top-K unnormalized amplitude values and the corresponding frequency , and calculate the period information , and finally reshape the input 1D data into K 2D tensors based on period and frequency , the calculation process is as follows:
[0094]
[0095]
[0096]
[0097] in, and Represent the calculation of FFT and amplitude values respectively. represents the calculated amplitude value for each frequency, Indicated in The function to average over dimensions.
[0098] (2) Multi-scale dynamic graph convolution: Perform cycle-length dynamic graph convolution learning on K time scales. The principle is the same as cross-variable learning, except that the number of nodes N is a cycle and the adjacency matrix , the calculation formula is as follows:
[0099]
[0100] (3) Adaptive expert aggregation: In order to enter the next ScaleGraphBlock, it is necessary to integrate the top K tensors of different scales. . Hybrid expert learning is performed according to the respective amplitude strengths to promote the effective fusion and propagation of multi-scale features and enhance the model's ability to capture complex patterns. The formula is as follows:
[0101]
[0102]
[0103] in, The amplitude of the selected frequency after normalization can reflect the relative importance of frequency and period.
[0104] S3. Adaptively fuse the space representation vector and the time representation vector to obtain a prediction sequence.
[0105] In order to make the final prediction output, two final representation vectors learned from the stacked L PGL modules are required and Adaptive fusion output is performed to improve the overall performance of the proposed model. In S3, the two vectors need to be linearly projected first and then fused and outputted. The specific expression is as follows:
[0106]
[0107] in, Indicates a concatenation operation. , , and are the learnable weights and biases of different feedforward networks, respectively.
[0108] Embodiment 2:
[0109] Based on Example 1, Example 2 of the present invention provides a more specific interpretable dual-Token graph convolution multi-site water level forecasting method, including:
[0110] S1. Obtain an input sequence, and perform preprocessing and dimension embedding on the input sequence; the dimension embedding includes variable token embedding and time token embedding.
[0111] S2. According to the variable tokens and time tokens, cross-variable learning and cross-time learning are performed respectively to capture the spatial correlation and temporal dependency of the sequence, and the spatial representation vector and the temporal representation vector are obtained.
[0112] S3. Adaptively fuse the space representation vector and the time representation vector to obtain a prediction sequence.
[0113] S4. According to the true value and the predicted value, the trainable parameters are optimized by the L1 loss function, and the trainable parameters include the number of samples, the number of hydrological stations and the future time step.
[0114] Specifically, represents all trainable parameters in the proposed DTAGCN model and minimizes the following L1 loss function To learn, as follows:
[0115]
[0116] in, and are the true value and the predicted value, respectively. B, S, and H are the number of samples, the number of hydrological stations, and the future time step, respectively. In addition, the training process of the proposed model is summarized in Table 1.
[0117] Table 1
[0118]
[0119] On the basis of the above method, this embodiment also experimentally verifies the method of the present invention. Specifically, the study area and data selected the real water level and rainfall data observed every hour from January 1, 2022 to August 31, 2023 at 31 reservoir sites in the irrigation area, totaling 14,592 moments and 62 variables. In addition, all experiments were implemented under the PyTorch framework and repeated 5 times on a single NVIDIA Geforce RTX 3090 24GB GPU, and the average was taken as the final prediction result to reduce randomness. As shown in Table 2, the hyperparameter settings of the proposed model on the irrigation area dataset are given, and the experimental analysis of important hyperparameter settings is given. If the verification loss does not decrease within three iterations, the training process will stop early.
[0120] Table 2 Parameter settings of the proposed model DTAGCN
[0121]
[0122] Note: k represents the period of K scales learned by FFT and k=1, 2, …, K.
[0123] In addition, DTAGCN is compared with three types of baselines: (1) classic methods: ARIMA, DeepAR and LSTNet; (2) the latest (state-of-the-art, SOTA) methods, including 1 MLP (DLinear), 2 Transformers (iTransformer and PatchTST), 2 TCNs (MICN and TimesNet) and 3 GNNs (MTGNN, MAGNN and MSGNet); (3) popular hydrological forecasting methods: STA-LSTM, TATCN and CNN-GRU. It should be noted that all the baseline models used are implemented based on the configuration of the original file or official code. Only the length of the input and output sequences is changed, and the other parameter settings are consistent with the original text. In addition, the embodiments of the present invention use RMSE, MAE, CORR, NSE and MAPE to evaluate the accuracy and reliability of the model.
[0124] Based on the above implementation details, the embodiment of the present invention analyzes the results:
[0125] 1) Single-site forecast
[0126] In order to verify the reliability and accuracy of the proposed model in hydrological forecasting, four representative SOTA models (i.e., PatchTST, DLinear, MSGNet, and TimesNet) and three very popular classic models in the field of hydrology (LSTNet, DeepAR, and ARIMA) were selected to study their performance in forecasting the water levels of six important reservoirs in the irrigation area at different time scales (i.e., one day, one week, half a month, and one month). Note that the first four models are direct multi-step forecasts (DMS), which can directly obtain the water level value of the forecast period at one time, while the last three models are iterative multi-step forecasts (IMS).
[0127] Table 3 Average statistical results of reservoir water levels in six irrigation areas predicted by DATGCN and the comparison model at different time scales
[0128] In Table 3, “ / ” indicates that no results were obtained from the model; “ave” indicates the mean. , the optimal value is bolded and the suboptimal value is underlined.
[0129] The experimental results in Table 3 show that DTAGCN has the best prediction performance among all models, successfully achieving an average RMSE and MAE improvement of 35.86% (0.923→0.592) and 31.07% (0.560→0.386). For medium- and long-term forecasts, ARIMA has the worst prediction results. This is because ARIMA is not suitable for learning non-stationary nonlinear data, and the statistical results reflect the embarrassment of ARIMA in medium- and long-term forecasts. Moreover, iterative predictions will accumulate errors and cause the performance of the model to deteriorate, and the instability of the model will increase with the increase of the forecast period. Therefore, LSTNet and DeepAR, which perform well in short-term forecasts, cannot adapt well to long-term forecasts. On the contrary, the four models using the DMS method show unique advantages. In addition, further observation shows that PatchTST, DLinear, MSGNet and TimesNet, which perform well on the benchmark dataset, perform poorly when actually predicting the water level in the irrigation area, especially when the forecast interval becomes larger, the model instability becomes greater. This is because the local fluctuation of reservoir water level data in the irrigation area is very small, and the interference of other external factors leads to greater uncertainty in the data. The proposed model DTAGCN captures the spatial correlation between different sites to reduce the interference of uncertainty, and captures multi-scale temporal correlation to improve the model accuracy. The dual-line parallel learning process provides the model with more stable output performance.
[0130] like Figure 2-1 and Figure 2-2 The predicted values and true values of the reservoir water level forecasted one day in advance by all models on the entire test set are compared, and their NSE values and fitted regression lines are calculated to further evaluate the prediction ability of the model, where the black dotted line represents the 1:1 scale line, and the red solid line represents the fitted regression line. The closer the NSE value is to 1, the better the model performance. As can be seen from the figure, the scatter points of DTAGCN are more concentrated on the 1:1 scale line, and its NSE value of 0.983 is the best among all models, followed by PatchTST (NSE=0.941) and TimesNet (NSE=0.952), while the NSE values of DeepAR and ARIMA are close to 0 or even negative, which shows that the model can basically not complete the prediction task well. These conclusions are consistent with those drawn in Table 3.
[0131] 2) Multi-site forecast
[0132] In order to further verify the multi-site forecasting performance of the proposed model, 8 SOTA multivariable TSF models and 5 water level forecasting models specifically for multi-sites were selected. Figure 3The performance comparison results of all methods in irrigation area multi-site prediction are summarized. Table 4 also shows the average values of the four performance evaluation indicators obtained by all models. These results fully highlight the excellent performance of DTAGCN. Specifically, DTAGCN successfully achieved an average RMSE, MAE, CORR and NSE improvement of 13.01% (5.336→4.642), 6.02% (1.942→1.825), 2.37% (0.716→0.733) and 0.84% (0.956→0.964). From the data in the table, it can be seen that DeepAR has the worst performance. This is because there is a lot of noise in the multi-site data collected in practice, resulting in weakly correlated sites affecting the overall prediction performance of the model. The RNNs-based LSTNet, CNN-GRU and STA-LSTM models have the risk of gradient explosion in long-term forecasts, so they decrease significantly with the increase of the forecast period. In contrast, the multivariate TSF model of SOTA has more stable performance and accuracy. In addition, it is observed that the MTGNN, iTransformer, and DLinear models are significantly weaker than other models as the forecast period increases due to their lack of attention to different time scales. In addition, among these models, the performance of PatchTST, MSGNet, and TimesNet is slightly inferior to DTAGCN. PatchTST improves model performance and computational efficiency through patch operations, but the potential interaction noise between temporally misaligned patches. While MSGNet and TimesNet both use multi-scale information, the three models essentially enhance the learning ability of temporal correlation, but ignore spatial correlation. It can be seen that the proposed model DTAGCN has more stable and accurate performance for actual water level data prediction by simultaneously learning spatial correlation and multi-scale temporal correlation.
[0133] Table 4 Average statistical results of DATGCN and the comparison model for directly predicting the water levels of 31 reservoirs in the irrigation area at different time scales
[0134]
[0135] In Table 4, the look-back window T = 96 and the look-forward period , the optimal value is bolded and the suboptimal value is underlined.
[0136] also, Figure 4-1 and Figure 4-2The spatial distribution of MAPE obtained by DTAGCN for predicting water levels at 31 stations in the irrigation area under different forecast periods and the comparison results between the predicted water level and the observed value of the S1 station (i.e., the reservoir) are visualized. As can be seen from Table 4, the MAPE values obtained by the proposed model for all stations under different forecast periods range from 0.06% to 2.38%. Although the MAPE values obtained by the model increase with the increase of the forecast period, the overall prediction performance of the model remains stable and can still maintain the development trend and fluctuation of the actual water level data, which is consistent with the above conclusions and emphasizes the importance of the DTE and PGL modules. It is well known that the predicted water level value has different degrees of lag as the forecast period increases, which is affected by the change trend of the water level sequence itself. By observing the visualization of the predicted and observed values of the reservoir water level, it can be seen that the lag phenomenon of the proposed DTAGCN model in the long-term prediction process has been greatly improved.
[0137] Furthermore, with the increasing trend of climate warming, extreme events such as drought and rainstorms are showing a clear increasing trend worldwide. In order to explore the performance of DTAGCN in resisting external influences under different weather conditions, a generalization ability test study was carried out. According to the actual collected rainfall information, the dataset was divided into dry season (rainfall = 0), mid-flood season (0 < rainfall ≤ 10) and flood season (rainfall > 10) to explore the generalization ability of all comparison baselines under different weather modes. T +Performance within the 24h forecast period. Figure 5 The distribution diagram of reservoir water level data for training / validation / testing under three weather modes is depicted. It can be seen that the model under different scenarios needs to perform generalization tasks under scenarios with distribution changes. For example, there is a distribution shift in water level data samples during drought and flood seasons, that is, the out-of-distribution problem, which poses a greater challenge to the performance of the model.
[0138] like Figure 6-1 to Figure 6-3As shown in the figure, the present invention uses Taylor diagram to show the correlation comparison between the predicted values and observed values of all models under three weather modes, because Taylor diagram can give a more specific and conclusive argument, in which the scattered points in the figure represent the model, the radial lines represent CORR, the horizontal and vertical axes represent the standard deviation, and the dotted line represents RMSE. Note that the closer the model is to the reference point (REF), the better the performance. The results show that the output of the DTAGCN model is closer to the observation results than other application models and is more robust. On the contrary, the performance of other models decreases significantly in different scenarios. The proposed model captures spatial correlation and temporal dependence in parallel through dual Tokens perception, showing a small performance degradation and strong resistance to external interference. Therefore, DTAGCN has a strong generalization ability for out-of-distribution samples, while the inability of the comparison models to accurately follow these changes may be due to architectural constraints and lack of multi-faceted learning, which hinders their ability to grasp complex temporal patterns, sudden changes or spatial correlations. In addition, the prediction results of all models in the dry season are better than those in the flood season, mainly due to the small amount of data in the flood season, which leads to insufficient learning and training of the models.
[0139] In addition, to explore the effectiveness of the DTAGCN component design, detailed ablation experiments were conducted. Six variants were considered and their average performance on multi-scale water level forecasting at multiple sites in irrigation areas was evaluated. The following is a description of these variants.
[0140] w / o-GB: GraphBlock is removed from the model, and only multi-scale temporal correlation learning is performed, which is similar to MSGNet.
[0141] w / o-SGB: ScaleGraphBlock is removed from the model, and only spatial correlation learning is performed. This process is similar to iTransformer, except that iTransformer uses the native Transformer encoder for cross-variable learning.
[0142] w / o-AG: Use predefined layers to replace the adaptive graph learning layers in the model;
[0143] w / o-MS: Use a shared graph convolution layer to replace multi-scale graph convolution to learn the cross-temporal dependencies of the entire sequence;
[0144] w / o-CE: Multi-head self-attention is used to replace the convolutional encoder for intra-sequence correlation learning;
[0145] w / o-Mix: Use the traditional convolution method to replace the mixed jump convolution method.
[0146] Table 5 shows the ablation study results of DTAGCN, iTransforner, MSGNet and 6 variants for multi-site water level prediction at different forecast periods. The specific improvements are as follows:
[0147] (1) Improvement of dual-token perception: From the results of DTAGCN, MSGNet, iTransformer, w / o-GB and w / o-SGB, we can see that DTAGCN based on dual-token parallel perception has better prediction performance. In addition, multi-scale cross-temporal learning contributes more significantly to model performance, which can also be concluded from the results of MSGNet and iTransformer.
[0148] (2) Improvements in multi-scale and dynamic graph learning: The performance of the w / o-AG variant without the dynamic graph structure is significantly reduced, indicating that learning variables and temporal correlations are crucial for irrigation area water level prediction. In addition, due to the lack of attention to different time scales, the w / o-MS variant that maintains adaptive graph learning is better than MSGNet and iTransformer, but slightly worse than DTAGCN, which further highlights the importance of multi-scale learning of temporal patterns.
[0149] (3) Improvements in Conv Encoder and Mixed Hop Convolution: Examining the results of the w / o-CE and w / o-Mix variants, we can see that using convolutional attention produces a more significant marginal improvement in performance than multi-head self-attention, and the mixed skip convolution method is also very effective in improving model performance, because MixHop itself has the ability to learn various features and thus can represent data more comprehensively.
[0150] Table 5 Ablation analysis of water level forecast results at multiple sites in irrigation areas
[0151]
[0152] The data in the table represent the The mean and standard deviation of the indicator are obtained, denoted as ave ± std.
[0153] In addition, the present invention also analyzes the DTAGCN model, including:
[0154] 1) Hyperparameter sensitivity
[0155] The DTAGCN model mainly involves 9 important hyperparameters, namely, embedding dimension D, lookback window T, node dimension d, stacking layer number L, graph depth d gc , the cycle-by-cycle scale K, the number of channels and kernel size of the Conv Encoder, and the learning rate. Figure 7-1 to Figure 7-5A sensitivity analysis of these parameters is provided, where all prediction lengths H=24 and input lengths T=48, except for the analysis of hyperparameter T. Overall, the experimental results show that despite the changes in different hyperparameters, the performance of the proposed model is quite stable in most cases. In addition, large convolution kernels, which are shown to have greater potential, do not perform well in actual irrigation water level prediction, while small convolution kernels are competent. Further observation shows that stacking more graph learning layers and GCN depth can improve the performance of the model, but will also increase the computational burden accordingly. In general, a network structure with a depth of 2 layers is sufficient to meet the actual prediction accuracy needs. Considering the balance between performance and efficiency of the model, these parameters are set to D=64, T=48, L=2, d ... gc =2, K=4, the number of channels and kernel size of Conv Encoder are 32 and 51 respectively, and the initial learning rate is 1e-4, which is consistent with the settings in Table 4.
[0156] 2) Correlation Visualization
[0157] Figure 8-1 to Figure 8-3 The adjacency matrices learned by DTAGCN from spatial and temporal scale perspectives are shown when predicting water levels at multiple sites in an irrigation area for 96 time steps in the future, including a reservoir site map and corresponding hydrological data from 2023 / 06 / 21 12:00 to 2023 / 06 / 23 11:00. In this case, the proposed model identifies four important period scales, namely 24, 12, 6, and 4 hours, corresponding to .like Figure 8-1 As shown, DTAGCN learns different adaptive adjacency matrices for different time scales, effectively reducing the negative impact of noise in the lookback window T. Figure 8-2 The relationship between the adjacency matrix and the corresponding reservoir site graph of the six important reservoir sites in the irrigation area was visualized, which fully reflects the interaction between different reservoir sites. Taking the S6 reservoir site as an example, it is located upstream of the S1 and S3 reservoirs, so it mainly has a substantial impact on these two reservoirs, while the S2, S4 and S5 reservoirs are located upstream of S6 and at a longer distance, showing lower correlation. In addition, Figure 8-3 The water level and rainfall changes of the six stations from 12:00 on 2023 / 06 / 21 to 11:00 on 2023 / 06 / 23 are also shown. It can be seen that there are obvious changes and gaps in the water level curve of the S4 station. This is because the water storage capacity of the S4 reservoir is small, resulting in obvious water level changes, while other reservoirs show similar trends, and the water level fluctuations are not large or even no change in the short term. These real-life scenarios can also be reflected in the adjacency matrix, which fully explains the possible spatial correlation between reservoir sites.
[0158] 3) Computational efficiency
[0159] To summarize the computational efficiency of DTAGCN and eight SOTA multivariate TSF models, a rigorous performance comparison was conducted in the setting of multi-site water level prediction, including the execution time consumption, number of parameters, and memory usage of the models. For memory cost comparison, the maximum memory usage was recorded. As shown in Figure 9, among these methods, our model has great competitive potential in terms of execution time, number of model parameters, and memory usage. Specifically, DLinear is the most computationally efficient among all models, thanks to its simple linear complexity model structure, but the number of parameters of this model increases rapidly with the increase of output length. In contrast, MICN has the largest model parameters and memory, mainly due to the increased computational cost of the local-global-based multi-scale convolution operation. In addition, PatchTST, DTAGCN, TimesNet, MAGNN, and MSGNet have similar memory, among which MAGNN and MSGNet have fewer model parameters but slower execution time; PatchTST has faster execution time but larger number of parameters; followed by DTAGCN and TimesNet at a medium level. The reason is that PatchTST uses patch operations to improve the computation time but also brings higher computational complexity. TimesNet and MAGNN benefit from shared hidden layer parameters. When the output length changes, the number of parameters remains unchanged, but TimesNet performs 2D convolution in both scale and scale number dimensions, increasing the computational cost. In contrast, DTAGCN and MSGNet share the same graph convolution operation between each scale, so the computational complexity of their modules remains unchanged without increasing the number of scales. The difference is that MSGNet uses multi-head attention for correlation learning, which has quadratic complexity; while DTAGCN replaces it with a convolutional encoder. It is worth noting that the constraints of the parallel learning structure of DTAGCN make the model more computationally intensive, which is natural and reasonable. Overall, DTAGCN still has commendable performance.
[0160] Furthermore, if Figure 10-1 to Figure 10-4 The comparison results of DTAGCN and SOTA baseline for multi-scale reservoir water level forecasting are visualized, where the input length T = 48. ,The prediction curve of DTAGCN is more consistent with the ground truth curve, indicating its outstanding prediction performance. At the same time, the effectiveness of DTAGCN in capturing the multi-periodic and complex trends existing in the actual water level samples of the irrigation area proves its adaptive graph modeling ability for multi-scale features.
[0161] It should be noted that the parts in this embodiment that are the same or similar to those in Embodiment 1 can be referenced to each other and will not be described in detail in this application.
[0162] Embodiment 3:
[0163] Based on Example 1, Example 3 of the present invention provides a dual-Token graph convolution multi-site water level forecasting system based on interpretability, including:
[0164] Dual token embedding module DTE, used to obtain input sequence , and preprocessing and dimension embedding the input sequence; the dimension embedding includes variable token embedding and time token embedding;
[0165] The parallel graph learning module PGL is used to perform cross-variable learning and cross-time learning based on variable tokens and time tokens to capture the spatial correlation and time dependency of the sequence, and obtain the spatial representation vector and the time representation vector;
[0166] The adaptive fusion output module AFO is used to adaptively fuse the space representation vector and the time representation vector to obtain a prediction sequence.
[0167] The learning process is briefly described as follows:
[0168]
[0169]
[0170]
[0171] in, Represents normalized data. and They are the embedding representations from different perspectives, and D is the dimension of embedded tokens. and They are the learned representations of cross-spatial and cross-temporal correlations, respectively, and the superscript l represents the layer index. Represents the final result of the prediction.
[0172] Specifically, the system provided in this embodiment is a system corresponding to the method provided in Embodiment 1. Therefore, the parts in this embodiment that are the same or similar to those in Embodiment 1 can be referenced to each other and will not be repeated in this application.
Claims
1. The dual-Token graph convolution multi-site water level forecasting method based on interpretability is characterized by: include: S1, obtaining an input sequence, and performing preprocessing and dimension embedding on the input sequence; the dimension embedding includes variable token embedding and time token embedding; S2. Based on the variable tokens and time tokens, cross-variable learning and cross-time learning are performed to capture the spatial correlation and time dependency of the sequence, and the spatial representation vector and the time representation vector are obtained; S3. Adaptively fuse the space representation vector and the time representation vector to obtain a prediction sequence.
2. The interpretable dual-Token graph convolution multi-site water level forecasting method according to claim 1 is characterized in that S2 include: S201, inputting variable tokens into a graph module with multiple layers stacked in parallel, performing cross-variable learning to capture the spatial correlation of the sequence, and obtaining a spatial representation vector, wherein the cross-variable learning includes: S2011, construct graph adjacency matrix; S2012, adding a unit matrix to the graph adjacency matrix to ensure that each node has self-connection, and capturing the spatial correlation of the sequence through the MixHop method; S2013, Spatial Correlation Learning via Convolutional Encoders; S202: Input the time token into a multi-layer scalar graph module stacked in parallel, perform cross-time learning to capture the temporal dependency of the sequence, and obtain a time representation vector.
3. The interpretable dual-Token graph convolution multi-site water level forecasting method according to claim 2 is characterized in that: In S202, the cross-time learning includes: S201, performing scale division by using FFT method; S202. Perform cycle-by-cycle dynamic graph convolution learning on multiple time scales. S203. Integrate tensors of different scales and perform hybrid expert learning according to their respective amplitude strengths.
4. The interpretable dual-Token graph convolution multi-site water level forecasting method according to claim 3 is characterized in that: In S1, the variable token embedding includes: transforming S Site C The predictors are embedded in D dimensional vector, and reshape the obtained two-dimensional feature map into a one-dimensional feature map; the time token embedding includes: C The predictor is considered as a D Dimensional tokens, while embedding positional encoding PE and time coding TE .
5. The interpretable dual-Token graph convolution multi-site water level forecasting method according to claim 3 is characterized in that: Also includes: S4, according to the true value and the predicted value, through L 1 loss function optimizes the trainable parameters, which include the number of samples, the number of hydrological stations, and the future time step.
6. The explainable dual-token graph convolution multi-site water level forecasting system is characterized by: The method for executing any one of claims 1 to 5 comprises: A dual token embedding module, used for obtaining an input sequence, and performing preprocessing and dimension embedding on the input sequence; the dimension embedding includes variable token embedding and time token embedding; A parallel graph learning module, which is used to perform cross-variable learning and cross-time learning according to variable tokens and time tokens, respectively, to capture the spatial correlation and time dependency of the sequence, and obtain a spatial representation vector and a time representation vector; The adaptive fusion output module is used to adaptively fuse the space representation vector and the time representation vector to obtain a prediction sequence.
7. A computer storage medium, characterized in that: The computer storage medium stores a computer program; when the computer program is executed on a computer, the computer executes any one of the methods described in claims 1 to 5.
8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Incoming water quantity prediction method based on multi-site spatio-temporal data fusion
CN118114806A
Multivariable time sequence prediction method based on collaborative graph
CN119166905A
Artificial-intelligence-based prediction of storage capacities in water reservoirs
US20240273358A1