Intelligent underground water level prediction method based on graph attention mechanism and bidirectional time convolution
Through the combination of graph attention mechanism and bidirectional time convolution, the accuracy and calculation efficiency of groundwater level prediction in the existing technology are solved, efficient and flexible space-time dynamic feature mining of groundwater systems is achieved, and the accuracy and stability of long-term prediction are improved.
Patent Information
- Application Number
- CN202510511604.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-08-01
AI Technical Summary
When processing large-scale groundwater monitoring data, it is difficult for the prior art to effectively quantify complex time-varying boundary conditions and nonlinear characteristics, resulting in low prediction accuracy and computational efficiency, high dependence on data quality and prior knowledge, and difficult to adapt to dynamic changes in groundwater systems.
Using the intelligent prediction method of groundwater level based on graph attention mechanism and bidirectional time convolution, the stacked spatiotemporal layer and output layer are constructed, combined with the graph attention layer, bidirectional causal convolution layer and gated channel attention layer, the spatiotemporal dependence and long-term time information of the groundwater system are learned, and the residual connection is used to retain the initial feature information to generate the groundwater level prediction results.
It improves the accuracy and robustness of groundwater level prediction, can process large-scale multi-dimensional monitoring data, adapt to the nonlinear and time-varying characteristics of groundwater systems, reduces information loss, and improves the accuracy and stability of long-term prediction.
Smart Images

Figure CN120409802A_ABST
Abstract
Description
Technical Field
[0001] The present invention provides an intelligent prediction method for groundwater levels based on graph attention mechanism and bidirectional temporal convolution, belonging to the field of spatio-temporal prediction. Background Art
[0002] Groundwater resources are an important part of the ecological environment and the development of human society, and their changes directly affect the stability of the ecosystem and the sustainable utilization of water resources. However, with the intensification of global climate change and human activities, groundwater resources are facing increasingly severe challenges. Excessive pumping of groundwater has caused serious problems such as land subsidence, water quality deterioration, and water resource depletion in many regions, bringing far-reaching negative impacts to the ecological environment and economic society. Therefore, studying the dynamic change process of groundwater has important theoretical significance and practical value.
[0003] The change of groundwater level is jointly affected by multiple factors, including meteorological factors (such as precipitation, evaporation, temperature), geological structure, human water use behavior, hydrogeomorphic conditions, and the internal circulation of groundwater, etc. Its change mechanism is very complex, with significant spatio-temporal heterogeneity and non-linear characteristics.
[0004] Currently, the mainstream methods mainly rely on hydrological models and statistical methods based on physical mechanisms, such as the finite difference method, the finite element method, and hydrogeological models. These traditional methods can reflect the basic hydrogeological mechanisms of the groundwater system to a certain extent by constructing mathematical models using physical equations such as Darcy's law. However, although these physical models can provide a basic understanding of groundwater flow and distribution, in practical applications, in the face of complex time-varying boundary conditions, such as factors like extraction activities, climate fluctuations, and the interaction between groundwater and geological structures, traditional methods often struggle to effectively quantify these complex coupling effects. Therefore, they show certain limitations in predicting the long-term behavior and response of the groundwater system. Existing numerical simulation methods, although having certain application effects in many scenarios, face several key challenges when dealing with large-scale monitoring network data. First, it is often very difficult to determine the parameters in traditional methods. Especially in the absence of sufficient prior information, the accuracy and reliability of the model are easily affected. Second, the computational efficiency is low. Especially when dealing with large-scale spatio-temporal data, the computational overhead of numerical models is large, resulting in difficulty in obtaining results quickly in practical applications. These methods also usually require a large amount of prior knowledge and accurate parameter settings, often relying on a detailed understanding of the groundwater system. However, in many practical situations, the complexity and incompleteness of groundwater data limit the effectiveness of these methods. In addition, existing numerical simulation methods have a strong dependence on data quality and model structure, especially with extremely high requirements for the accuracy and integrity of input data. Once the data quality is not high or there are missing data, it will significantly affect the prediction results. More importantly, traditional physical models often struggle to effectively characterize the non-linear evolution law of the groundwater system in the spatio-temporal dimension. Especially when facing the long-term series prediction of groundwater levels, the model usually has difficulty capturing complex dynamic change patterns. With the increase in the amount of monitoring data, how to effectively extract predictive features from massive spatio-temporal data has become an urgent problem to be solved. Therefore, there is an urgent need to develop a new type of prediction method that can more flexibly and efficiently mine the spatio-temporal dynamic characteristics of groundwater. This method can not only overcome the limitations of traditional numerical simulation methods but also better adapt to the non-linear and time-varying characteristics of the groundwater system. By combining advanced data-driven technologies such as machine learning and deep learning, it can more accurately model the spatio-temporal evolution law of the groundwater system, thereby improving the accuracy and practicality of groundwater level prediction. This method can better handle large-scale and multi-dimensional monitoring data, has strong robustness and generalization ability, and is expected to play an important role in groundwater management, sustainable utilization, and environmental protection. Summary of the Invention
[0005] The present invention provides an intelligent groundwater level prediction method based on graph attention mechanism and bidirectional temporal convolution to address the deficiencies of existing groundwater prediction methods in terms of dynamics and accuracy. The present invention provides the following technical solutions:
[0006] It includes the following steps: First, obtain the water level data of multiple groundwater monitoring points and construct a spatial data volume and a temporal data volume; among them, the spatial data volume is used to represent the spatial correlation between monitoring points, and the temporal data volume is used to represent the trend of the water level of each monitoring point changing over time;
[0007] The intelligent groundwater level prediction method proposed in this specification is based on the graph attention mechanism and bidirectional temporal convolution (BiGAT-Net). The model framework consists of stacked spatio-temporal layers and an output layer. Each spatio-temporal layer contains a graph attention layer, a bidirectional dilated causal convolution layer, and a gated channel attention layer. By stacking multiple spatio-temporal layers, the model can handle the spatial dependencies at different time scales, and the bidirectional mechanism is more conducive to learning long-term time information. The channel attention mechanism follows the graph attention layer to learn the importance of each feature channel. At the same time, the use of residual connections ensures the effective transmission of features during training, avoiding the gradual loss of information in the deep network, thereby retaining the effective information of the initial features. The model proposed by the present invention improves the accuracy of spatio-temporal prediction of groundwater levels and is superior to existing models.
[0008] The present invention provides an intelligent groundwater level prediction method based on graph attention mechanism and bidirectional temporal convolution. The overall architecture is as Figure 2 shown, and the method includes:
[0009] Step1: Perform a linear transformation on the feature map input to the model to expand its dimension and map the original input to a higher dimension for subsequent feature processing;
[0010] Step2: Process the feature map sequentially through the stacked spatio-temporal layers. There are a total of 8 spatio-temporal layers in the model. Each spatio-temporal layer contains a bidirectional temporal convolution, a graph attention mechanism module, and a channel attention mechanism module;
[0011] Step3: Inside each spatio-temporal layer, use a residual connection to add the input feature to the processed feature to ensure the effective transmission of features during training, avoid the gradual disappearance of information in the deep network, and retain the effective information of the initial features;
[0012] Step4: Through linear transformation, map the output of the last spatio-temporal layer to the prediction space to generate the prediction result of the groundwater level.
[0013] Further, in the Step1, a linear transformation is performed on the input feature map to expand its dimension, map the original input to a higher dimension, and enhance the feature representation ability. The calculation formula is as follows:
[0014]
[0015] In the formula, X represents the input tensor, and X ′ represents the output tensor after linear transformation. b represents the size of the training batch, n represents the number of spatial nodes, t represents the time step, c represents the number of original input channels, and c ′ represents the number of transformed channels. W and b represent the weight and bias term of the convolutional layer respectively.
[0016] Further, in the Step2, each spatio-temporal layer consists of three parts: a bidirectional time convolution module, a graph attention mechanism module, and a channel attention mechanism module. First, the input feature map enters the bidirectional time convolution module. This module uses one-dimensional convolution operations in both the forward and backward directions to capture the bidirectional dependencies of sequence data in the time dimension. Through this module, the model can simultaneously perceive historical information and future trends, thereby enhancing its expressive ability in long-term time series modeling. Subsequently, the feature map is sent to the graph attention mechanism module. This module is used to model the dynamic association relationships between spatial nodes. In this process, the model generates attention weights between nodes according to the predefined spatial adjacency matrix, thereby adaptively adjusting the information transfer intensity between different nodes and realizing the efficient learning and expression of spatial dependencies. Finally, the feature map passes through the channel attention mechanism module. This module first performs a global feature pooling operation on each channel and generates channel attention weights through a non-linear transformation. These weights are used to weight the information in the original channel dimension, strengthen the key feature channels, suppress redundant or invalid information, and further improve the selectivity and expressive ability of the model in the feature dimension. Through the organic combination of the above three modules, each spatio-temporal feature extraction unit can comprehensively model the potential correlations of the input data in the three dimensions of time, space, and channel, providing a richer and more accurate feature representation for subsequent prediction tasks.
[0017] Among them, the working process of the bidirectional time convolution module is summarized as follows:
[0018] 1) Gated causal time convolution: The input feature map undergoes two parallel one-dimensional causal convolution operations, which are used to construct the filter branch and the gating branch respectively. The filter branch uses the tanh activation function to extract signal features, and the gating branch uses the sigmoid activation function to generate control weights. Finally, the two are multiplied point by point to achieve feature extraction under the control of the gating mechanism. The formula is as follows:
[0019] x = tanh(Θ1 * X + b) ⊙ sig mod(Θ2 * X + b)
[0020] Where, θ1 and θ2 represent the filter and the gating convolutional kernel respectively, * represents the convolutional operation, and ⊙ represents the element-wise multiplication.
[0021] 2) Bidirectional input processing: In addition to the standard forward-time path, this module also introduces a reverse path to capture future trend information in the time dimension. Causal convolutional processing of the filter and gating branches is also applied to this reverse path; capture future trend information in the time dimension.
[0022] 3) Channel fusion convolution: After concatenating the forward and reverse outputs in the channel dimension, they are input into a 1×1 convolutional layer for channel fusion to obtain the final temporal convolution result.
[0023] After completing the modeling in the time dimension, the feature map is fed into the graph attention mechanism module to further capture the dynamic correlation features between spatial nodes. The working process of the graph attention mechanism module is summarized as follows:
[0024] 1) For each time step and each sample, first, the original feature vector h of each node i ′ obtains a new representation through a learnable linear transformation matrix w, and the formula is as follows:
[0025] h′ i = wh i
[0026] 2) For the target node i and its neighbor node j, after concatenating their feature vectors, calculate the attention score, and the formula is as follows:
[0027] e ij = LeakyReLU(α T [Wh i ||Wh j )
[0028] Where, || represents vector concatenation, and α is a learnable attention vector.
[0029] 3) Normalize the scores of all neighbor nodes for node iii through the SoftMax function to obtain the attention coefficient, and the formula is as follows:
[0030]
[0031] Where, N i represents the set of adjacent nodes of node i, and e ik is the attention score between node i and node k.
[0032] 4) The update of the target node i is represented as a weighted sum of the features of its neighbor nodes, and the formula is as follows:
[0033]
[0034] After the feature map passes through the graph attention mechanism module, the feature map is fed into the channel attention mechanism module. The main purpose of this module is to dynamically adjust the activation degree of different channels according to the feature importance of each channel, so as to enhance the model's attention ability to key feature channels and suppress redundant or invalid information. The working process of the channel attention mechanism module is summarized as follows:
[0035] 1) Through the gated channel attention module, first perform a global feature pooling operation on each channel to obtain the global information embedding E of the channel. The formula is as follows:
[0036]
[0037] 2) Adjust the features through the gating mechanism to generate a dynamic gating factor G, and the formula is as follows:
[0038] G = 1 + tanh(E·norm + β)
[0039] where β is a learnable bias and norm is a normalization factor.
[0040] 3) By multiplying the gating factor with the input feature map, a weighted feature map is obtained. The formula is as follows:
[0041] x out = x·G
[0042] Furthermore, in Step 3, to ensure the effective transmission of key information and reduce information loss, we introduce a residual connection. Specifically, the input feature x in is directly passed to the output result of the spatio-temporal layer and added to the processed feature map F(x in ). The formula is as follows:
[0043] x out = F(x in ) + x in
[0044] where F(x in ) represents the feature processed by the bidirectional temporal convolution module, the graph attention mechanism, and the channel attention mechanism, and x inThe original input features. The residual connection ensures that the effective information of the input features can be retained and enhanced by combining with the high-level features processed through the spatio-temporal layer. The residual connection not only ensures the smooth transmission of the feature information of each layer but also strengthens the feature representation layer by layer. At each layer, the input features are combined with the processed feature map through the residual connection to form a more refined and complex feature representation, enabling the network to gradually extract the high-level features in the data and promoting the training and optimization of the deep network. It ensures the effective transmission of features within the spatio-temporal layer and provides a more accurate and robust feature representation for the groundwater level prediction task.
[0045] Further, in the Step4, the feature map processed through the spatio-temporal layer is mapped to the target prediction space through the fully connected layer, thereby outputting the corresponding prediction result. This prediction result is further subjected to an inverse normalization operation to restore the original groundwater level scale, and then the predicted result is output. Brief Description of the Drawings
[0046] Figure 1 is the technical flow chart of the present invention
[0047] Figure 2 is the overall structure diagram of the BiGAT-Net of the present invention
[0048] Figure 3 The structure diagram of the bidirectional temporal convolution in the BiGAT-Net of the present invention
[0049] Figure 4 The structure diagram of the channel attention mechanism in the BiGAT-Net of the present invention Detailed Embodiment
[0050] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0051] The present invention provides an intelligent groundwater level prediction method based on graph attention mechanism and bidirectional temporal convolution, and the overall architecture is as Figure 2 shown, and the method includes:
[0052] Step1. Perform a linear transformation on the feature map input to the model to expand its dimension, map the original input to a higher dimension for subsequent feature processing;
[0053] Step 2: Process the feature map successively through the stacked spatio-temporal layers. There are a total of 8 spatio-temporal layers in the model. Each spatio-temporal layer contains a bidirectional temporal convolution, a graph attention mechanism module, and a channel attention mechanism module;
[0054] Step 3: Inside each spatio-temporal layer, use residual connection to add the input feature and the processed feature to ensure the effective transmission of features during training, avoid the gradual disappearance of information in the deep network, and retain the effective information of the initial features;
[0055] Step 4: Through linear transformation, map the output of the last spatio-temporal layer to the prediction space to generate the prediction result of the groundwater level.
[0056] Now, some English meanings in the present invention are explained. BiGAT-Net: A network model based on graph attention mechanism and bidirectional temporal convolution; Tanh and Sigmoid: Commonly used activation functions.
[0057] Dataset preparation:
[0058] The groundwater level data used in this paper comes from the MDB region of Australia, covering the groundwater levels and their related explanatory variables during the period from 1971 to 2021. The dataset contains various environmental factors and climate variables, such as precipitation, temperature, evaporation, etc. These factors have an important impact on the change of groundwater level. To establish the spatial relationship required for the model, we constructed an adjacency matrix based on the road network in this region and calculated the similarity between nodes using a threshold Gaussian kernel. This method can effectively reflect the geographical correlation between each node and capture the mutual influence between different geographical locations in groundwater level prediction by dynamically adjusting the similarity, thereby enhancing the performance of the model in the spatial dimension.
[0059] In terms of data preprocessing, first, all input features were normalized using the Z-score method to ensure that the features could be compared on the same scale. Normalization not only avoids the adverse effects of overly large differences in feature values on model training but also accelerates the convergence speed of the model, especially in deep learning models. In addition, Z-score normalization helps the model avoid certain features dominating the model training process when dealing with features of different dimensions and units, improving the stability and robustness of the model. The dataset was randomly divided into a training set, a validation set, and a test set in a ratio of 6:2:2. This division method can ensure the diversity of the model during training and provide sufficient basis for model evaluation. The training set is used to optimize the model parameters, the validation set is used to continuously adjust the hyperparameters during training to ensure the optimal configuration of the model, and the test set is used for the final performance evaluation. Through this reasonable dataset division method, overfitting can be effectively prevented, and the generalization ability of the model on unseen data can be enhanced, ensuring that the model can show strong adaptability in practical applications. This dataset division method and preprocessing strategy provide a good foundation for subsequent model training, enabling the model to fully utilize the information in the training data and ensuring higher accuracy and stability in predicting groundwater levels in the real world. The reasonable preprocessing and segmentation of the data play a crucial role in improving model performance, reducing training bias, and enhancing generalization ability.
[0060] Parameters and Experiments:
[0061] The code in this study was implemented using the PyTorch framework, and the experiment used an RTX 4080 GPU. No pre-trained model was used during training. The model was trained using the Adam optimizer with an initial learning rate of 0.001, a weight decay rate of 0.0001, and a dropout ratio of 0.3. The training batch size was 4, and training stopped after 100 epochs. During training, we chose to use the mean absolute error (MAE) as the loss function to supervise the training of the model. The specific formula is as follows:
[0062]
[0063] In the formula, $L$ is the loss value during training, which is the mean absolute error between the model prediction result and the true value. $T$ is the predicted time step, and $N$ is the number of groundwater monitoring points. $\hat{y}_{j,t + i}$ is the predicted value of node $j$ at time step $t + i$, which is the predicted groundwater level value obtained through the model output. $y_{j,t + i}$ is the true groundwater level value of node $j$ at time step $t + i$.
[0064] Three commonly used metrics are used to evaluate the performance of the prediction, including the Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Mean Absolute Percentage Error (MAPE). These three metrics are often used to evaluate the prediction effect in regression tasks, especially suitable for continuous value tasks such as groundwater prediction. The formulas for the three metrics are as follows:
[0065]
[0066]
[0067] Table 1 shows the results of the comparative experiments on the MDB dataset. From the experimental results, the performance of this model is significantly better than other models under different prediction time horizons, especially showing strong stability and accuracy in long-term prediction tasks. In the one-year prediction task, the MAE of this model is 1.1588, the RMSE is 1.7271, and the MAPE is 7.83%, showing significant accuracy, especially the MAPE is lower than that of STAEformer (9.94%), GWnet (9.57%), STGCN (9.81%), and MTGNN (16.37%). As the prediction time horizon increases, the error increase of this model is relatively gentle. The prediction MAEs for two years and three years are 1.1982 and 1.3845 respectively, the RMSEs are 1.8447 and 2.0891 respectively, and the MAPEs are 9.58% and 12.57% respectively. Compared with other models, the error growth of this model is smaller. Especially in the three-year prediction, the error growth of other models such as STAEformer (MAE 1.7345, RMSE 2.5533, MAPE 13.95%), GWnet (MAE 2.0891, RMSE 2.8798, MAPE 19.87%), and STGCN (MAE 1.8821, RMSE 2.7809, MAPE 19.24%) is more obvious. Especially for MTGNN, the MAE is as high as 3.3921, the RMSE is 5.0967, and the MAPE reaches 20.27% in the three-year prediction. These results indicate that as the prediction time horizon extends, this model has stronger time series learning ability and smaller error accumulation compared with other models, is particularly suitable for long-term prediction tasks, and has higher robustness and accuracy.
[0068] Generally speaking, this model continuously maintains a low error level in the prediction tasks of one year, two years, and three years, especially having an obvious advantage in the MAPE metric, demonstrating its strong generalization ability and adaptability to long-term time series data. Therefore, this model performs excellently in groundwater time series prediction, especially suitable for practical application scenarios of long-term prediction.
[0069]
[0070] Comparison experiments of Table 1 with previous methods and related models on the MDB dataset
[0071] The above experiments show that in the groundwater spatio-temporal prediction task, by combining graph attention mechanism, bidirectional temporal convolution and channel attention mechanism, this model significantly improves the prediction accuracy and stability, and especially outperforms traditional spatio-temporal prediction models in long-term prediction.
[0072] This model uses the graph attention mechanism to model the spatial dependence in groundwater data. Different from traditional graph convolutional networks (such as GWnet and STGCN), the graph attention mechanism can dynamically assign different weights to each node, enabling the model to flexibly capture the non-linear relationships between different spatial positions. This mechanism avoids the limitations of the fixed neighborhood structure in traditional graph convolution methods and can automatically adjust the weights of neighbor nodes according to different characteristics of the data, thus being more accurate in modeling complex spatio-temporal relationships. In groundwater spatio-temporal prediction, the spatial distribution of groundwater is often affected by various factors, such as the flow path of groundwater, geological features, precipitation, etc. These factors have strong locality and dynamic variability. The graph attention mechanism can perform adaptive modeling for these complex spatial features, significantly improving the prediction ability of the model.
[0073] In terms of temporal feature learning, this model uses bidirectional temporal convolution to process time series data. This mechanism enables the model to not only capture past time information but also effectively utilize future information for prediction, which is crucial for long-term time series prediction. Traditional temporal convolution networks (such as STGCN) often rely only on past data for prediction, resulting in large error accumulation when the model deals with long-term dependencies. In contrast, bidirectional temporal convolution significantly improves the model's ability to capture temporal changes by processing the forward and backward time series in parallel. Especially in long-term prediction, it can effectively reduce error diffusion and accumulation. Therefore, this model can more stably handle the changes in long time series in groundwater spatio-temporal prediction and maintain a high prediction accuracy.
[0074] The use of channel attention mechanism can improve the model's learning ability in the high-dimensional feature space. Traditional convolutional neural networks usually use fixed convolutional kernels to process input features, which may ignore some feature channels that are important for prediction. The channel attention mechanism can automatically evaluate the importance of each channel and dynamically adjust the channel weights according to their contributions to the task, reducing the interference of irrelevant or redundant information. In groundwater spatio-temporal prediction, groundwater data usually contains multiple feature dimensions, such as water level, flow rate, temperature, precipitation, etc., and the influence degrees of these features may vary at different times and spatial positions. Through the channel attention mechanism, this model can effectively filter out unimportant features and focus on the key features that have a greater impact on the prediction results, thus improving the accuracy and robustness of the prediction.
[0075] Secondly, a series of ablation experiments were conducted in the present invention to verify the effectiveness of the graph attention mechanism module and the bidirectional temporal convolutional module in the groundwater spatio-temporal prediction task. Table 2 summarizes the results of the ablation experiments. In this model, the three modules of the graph attention mechanism, the bidirectional temporal convolutional module, and the channel attention mechanism play crucial roles in the model performance. According to the experimental data, the complete model performs best in the one-year prediction task, with an MAE of 1.1588, a MAPE of 0.0783, and an RMSE of 1.7271, and the prediction error is the smallest. When the graph attention mechanism module is missing, the model performance significantly decreases, especially in the long-term prediction task. Specifically, in the two-year prediction, the MAE is 1.3056, the RMSE is 1.9294, and the MAPE is 0.0984 after removing the graph attention mechanism, and the error is significantly larger compared with the complete model. In the three-year prediction, the MAE is 1.3803, the RMSE is 2.1135, and the MAPE is 0.1102, and the error further increases, indicating that the graph attention mechanism plays an important role in capturing complex spatial dependencies. When the bidirectional temporal convolutional module is removed, although the model performance in the one-year prediction is not affected (MAE is 1.1588, RMSE is 1.7271), the error slightly increases in the two-year and three-year predictions, with MAEs of 1.1982 and 1.3845, RMSEs of 1.8447 and 2.0891, and MAPEs of 0.0958 and 0.1257 respectively, indicating that the bidirectional temporal convolutional module has an important impact on capturing long-term temporal dependencies. Finally, when all three modules are missing, the model performance drops significantly, with an MAE of 1.9625, an RMSE of 2.695, and a MAPE of 0.1518 in the three-year prediction, indicating that the absence of these three modules will lead to a significant reduction in the model's effective modeling ability for spatio-temporal data and a substantial increase in the prediction error. In summary, the graph attention mechanism and the bidirectional temporal convolutional module are crucial for improving the spatio-temporal prediction ability of the model. The absence of any one module will lead to a performance decline, especially in the long-term prediction task, and the synergistic effect between modules is crucial for ensuring the stability and accuracy of the model.
[0076] Table 2 Ablation Experiments on the MDB Dataset
[0077]
[0078] The results of a series of comparative and ablation experiments show that: the model network proposed in the present invention has good performance in prediction accuracy, is superior to several other networks, and improves the generalization of the model.
[0079] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features, and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. The present invention provides an intelligent prediction method for groundwater level based on graph attention mechanism and bidirectional temporal convolution, characterized in that, The method includes the following steps: Step 1: Perform a linear transformation on the feature map of the input model to expand its dimension and map the original input to a higher dimension for subsequent feature processing; Step 2: Process the feature map through stacked spatio-temporal layers in sequence. There are a total of 8 spatio-temporal layers in the model. Each spatio-temporal layer contains a bidirectional temporal convolution, a graph attention mechanism module, and a channel attention mechanism module; Step 3: Inside each spatio-temporal layer, use a residual connection to add the input feature to the processed feature to ensure the effective transmission of features during training, avoid the gradual disappearance of information in the deep network, and retain the effective information of the initial features; Step 4: Through a linear transformation, map the output of the last spatio-temporal layer to the prediction space to generate the prediction result of the groundwater level.
2. The intelligent prediction method for groundwater level based on graph attention mechanism and bidirectional temporal convolution according to claim 1, characterized in that, In the above Step 1, a linear transformation is performed on the input feature map to expand its dimension and map the original input to a higher dimension to enhance the representation ability of the features. The calculation formula is as follows: In the formula, X represents the input tensor, and X′ represents the output tensor after linear transformation. b represents the size of the training batch, n represents the number of spatial nodes, t represents the time step, c represents the number of original input channels, and c′ represents the number of transformed channels. W and b represent the weight and bias term of the convolutional layer respectively.
3. An intelligent prediction method for groundwater level based on graph attention mechanism and bidirectional temporal convolution according to claim 1, characterized in that, In the above Step 2, each spatio-temporal layer contains three parts: a bidirectional temporal convolution, a graph attention mechanism module, and a channel attention mechanism module. First, the input feature map enters the bidirectional temporal convolution module. This module uses one-dimensional convolution operations in both the forward and backward directions to capture the bidirectional dependencies of the sequence data in the time dimension. Through this module, the model can simultaneously perceive historical information and future trends, thereby enhancing its expression ability in long-term time series modeling. Subsequently, the feature map is sent to the graph attention mechanism module. This module is used to model the dynamic association relationships between spatial nodes. During this process, the model generates attention weights between nodes according to the predefined spatial adjacency matrix, thereby adaptively adjusting the information transmission intensity between different nodes and achieving efficient learning and expression of spatial dependencies. Finally, the feature map passes through the channel attention mechanism module. This module first performs a global feature pooling operation on each channel and generates channel attention weights through a non-linear transformation. These weights are used to weight the information in the original channel dimension, strengthen the key feature channels, suppress redundant or invalid information, and further improve the selectivity and expression ability of the model in the feature dimension. Through the organic combination of the above three modules, each spatio-temporal feature extraction unit can comprehensively model the potential correlations of the input data in the three dimensions of time, space, and channel, providing a richer and more accurate feature expression for the subsequent prediction task.
4. An intelligent prediction method for groundwater level based on graph attention mechanism and bidirectional temporal convolution according to claim 1, characterized in that, In the aforementioned Step 3, to ensure the effective transmission of key information and reduce information loss, we introduce residual connections. Specifically, the input feature x in is directly passed to the output result of the spatio-temporal layer and added to the processed feature map F(x in ), and the formula is as follows: x out = F(x in ) + x in Among them, F(x in ) represents the feature processed by the bidirectional temporal convolution, graph attention mechanism, and channel attention mechanism, while x in is the original input feature.
5. The intelligent prediction method for groundwater level based on graph attention mechanism and bidirectional temporal convolution according to claim 1, characterized in that In the above Step 4, the feature map processed by the spatio-temporal layer is mapped to the target prediction space through a fully connected layer, thereby outputting the corresponding prediction result. This prediction result is further subjected to an inverse normalization operation to restore the original groundwater level scale, and then the predicted result is output.