A multi-site water quality prediction method based on spatial relationship decomposition and continuous kernel graph convolution

By constructing a dual-graph structure of static and dynamic graphs and continuous kernel graph convolution, combined with the Informer model, the problem of insufficient prediction accuracy of traditional water quality prediction methods in complex water environments is solved, and efficient and accurate prediction of water quality changes at multiple sites is achieved.

CN122436033APending Publication Date: 2026-07-21BEIJING TECH & BUSINESS UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING TECH & BUSINESS UNIV
Filing Date
2026-01-05
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing water quality prediction methods suffer from insufficient prediction accuracy, limited spatiotemporal modeling capabilities, and insufficient model generalization ability in complex water environments with multiple sites, multiple time periods, and strong spatial coupling. In particular, traditional methods struggle to characterize spatial dependence information when dealing with hydrodynamic connections and pollution diffusion paths between multiple sites.

Method used

A multi-site water quality prediction method based on spatial relationship decomposition and continuous kernel graph convolution (SRD-CKGConv-Informer) is adopted. By constructing a dual-graph structure of static and dynamic graphs, continuous kernel graph convolution is used to continuously characterize spatial dependencies. In addition, the Informer model is combined to perform long-term series modeling to capture the complex spatiotemporal coupling characteristics of water quality changes at multiple sites.

Benefits of technology

It significantly improves the accuracy and generalization ability of water quality prediction, can accurately model the water quality change patterns of multiple sites, enhances the accuracy and stability of prediction, and is suitable for multi-site water quality prediction in complex water environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122436033A_ABST
    Figure CN122436033A_ABST
Patent Text Reader

Abstract

This invention discloses a multi-site water quality prediction method based on spatial relation decomposition and continuous kernel graph convolution, belonging to the interdisciplinary field of artificial intelligence and environmental monitoring technology. Based on multi-site water quality monitoring data of a watershed, this invention constructs a static graph reflecting long-term geographical structure and a dynamic graph representing time-varying water quality interactions through spatial relation decomposition (SRD), achieving a multi-dimensional characterization of spatial dependencies. Then, continuous kernel graph convolution (CKGConv) is introduced, utilizing pseudo-coordinates based on random walks to construct a continuous kernel function, establishing bi-branch spatial convolution models for both the static and dynamic graphs to obtain stable spatial relationships and dynamic propagation characteristics in the watershed. Furthermore, the Informer temporal modeling module is employed, effectively capturing long-term dependencies in water quality changes through a sparse self-attention mechanism and a sequence downsampling structure, achieving efficient spatiotemporal joint prediction. This invention, by combining a static-dynamic bi-branch structure with continuous kernel convolution, solves the problems of insufficient spatial dependency expression, unreasonable dynamic graph construction, and difficulty in long sequence modeling in traditional water quality prediction methods, significantly improving the accuracy and stability of multi-site water quality prediction. The method of this invention has technical advantages such as high computational efficiency, strong generalization ability, and applicability to multi-site water quality change prediction in watershed monitoring networks, and has good engineering application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a water quality prediction method, belonging to the interdisciplinary field of artificial intelligence technology and environmental science. Specifically, it relates to a multi-site water quality prediction method based on spatial relationship decomposition and continuous kernel graph convolution, which is applicable to multi-site spatiotemporal water quality prediction in complex water environments such as watersheds and lakes. Background Technology

[0002] Water quality prediction, as a crucial component of water environment management and pollution control, is one of the core tasks in the field of ecological and environmental monitoring. With rapid industrialization and urbanization, the pollution level of surface water bodies is increasingly severe, with diverse pollution sources and complex mechanisms of water quality change, exhibiting significant spatial heterogeneity and temporal dynamics. This makes accurately predicting water quality changes at multiple stations within a watershed a critical scientific issue.

[0003] Currently, traditional water quality prediction methods mainly include statistical regression models (such as ARIMA) and single-point deep learning models (such as LSTM and GRU). Although these methods can capture temporal variation characteristics to some extent, they have the following significant shortcomings: there are significant hydrodynamic connections and pollution diffusion paths between different monitoring stations, and traditional methods often model each station independently, failing to reflect the diffusion and coupling relationships of pollutants in the spatial dimension; existing graph neural networks (such as GCN and GAT) mostly rely on static adjacency matrices or single topological graph structures, making it difficult to simultaneously characterize stable geographic topology and time-varying water quality interactions, resulting in insufficient expression of spatial dependency information; in addition, these models treat the dependencies between nodes as discrete edge connections, failing to characterize the interactions of monitoring points in continuous geographic space, making it difficult to adapt to the complex spatial dynamic characteristics of the water environment; mainstream RNN-type networks or Transformer structures suffer from high computational overhead and severe gradient vanishing when processing long-term series data, limiting both prediction accuracy and scalability.

[0004] In recent years, some studies have attempted to introduce dynamic graph learning into spatiotemporal prediction, but these often lack fine-grained decomposition of spatial relationships and cannot effectively distinguish between stable geographical constraints and time-varying dynamic correlations. In summary, existing water quality prediction methods still suffer from insufficient prediction accuracy, limited spatiotemporal modeling capabilities, and inadequate model generalization ability when facing complex water environments with multiple sites, multiple time periods, and strong spatial coupling. Summary of the Invention

[0005] To address the shortcomings of existing methods, such as insufficient spatial dependency modeling, inadequate dynamic graph structure representation, and limited long-term series prediction capabilities, this invention proposes a multi-site water quality prediction method (SRD-CKGConv-Informer) based on spatial relationship decomposition and continuous kernel graph convolution. This method jointly constructs a dual-graph structure of static and dynamic graphs, utilizes continuous kernel graph convolution to achieve a continuous characterization of spatial dependencies, and combines an Informer model to achieve efficient long-term series modeling. This method can fully capture the complex spatiotemporal coupling characteristics of water quality changes at multiple sites, improving prediction accuracy and generalization ability, and providing a new approach for water quality prediction in the interdisciplinary field of artificial intelligence and environmental science. Specifically, the method of this invention includes the following five main steps:

[0006] Step 1: Multi-site water quality data collection and preprocessing. This invention targets complex aquatic environments such as watersheds or lakes, collecting time-series water quality data from multiple monitoring stations, including key parameters such as water temperature, pH, conductivity, dissolved oxygen, turbidity, permanganate index, ammonia nitrogen, total phosphorus, and total nitrogen, while simultaneously acquiring the latitude and longitude information of each monitoring station. The raw data undergoes integrity verification and outlier removal, missing values ​​are filled using multiple interpolation methods, and standardization and normalization are performed to ensure the consistency and comparability of multi-site data across time and space.

[0007] Step two: Construction of a dual-graph based on spatial relation decomposition. To accurately characterize the spatial dependencies between monitoring stations, this invention introduces a spatial relation decomposition (SRD) mechanism, simultaneously constructing a static graph and a dynamic graph. Based on prior information such as station geographical locations, a static adjacency matrix reflecting long-term stable spatial relationships is constructed; based on similarity patterns in water quality time-series data, a spatial correlation matrix is ​​generated through variable embedding learning. Through a min-max co-optimization strategy, stable constraints on static spatial relationships and adaptive adjustments to dynamic spatial dependencies are achieved, thereby obtaining a dual-graph spatial relation matrix that can simultaneously reflect global structure and local changes, providing a foundation for subsequent graph convolution calculations.

[0008] Step 3: Simultaneous extraction of spatial features via bi-branch continuous kernel graph convolution. Based on the static and dynamic graphs constructed in Step 2, this invention introduces a bi-branch continuous kernel graph convolution (CKGConv) module. Taking the static and dynamic graphs as inputs respectively, continuous kernel functions are used to model the continuous spatial adjacency relationships. CKGConv maps the discrete graph structure to a continuous spatial representation by introducing pseudo-coordinates (such as a random walk probability matrix), and then uses a learnable multilayer perceptron (MLP) to generate continuous convolution kernels, achieving weighted aggregation of node features in the global support domain. The bi-branch structure can extract long-term stable spatial dependencies and short-term dynamic features in parallel, and integrate the information of both through a fusion layer, thereby obtaining a more expressive spatial feature embedding.

[0009] Step four: The Informer temporal modeling module captures long-term dependencies. This invention employs an Informer structure for long-sequence feature modeling in the time dimension. This module utilizes the ProbSparse self-attention mechanism to retain key temporal dependency information while reducing computational complexity, and extracts multi-scale temporal features by compressing the sequence length layer by layer through an inter-layer distilling structure. Furthermore, the generative decoder structure can output the complete prediction sequence at once, avoiding the error accumulation problem of traditional recurrent structures. Through this module, the model can capture long-term trends, periodic fluctuations, and sudden abnormal events in the process of water quality change, achieving efficient and stable temporal feature extraction.

[0010] Step 5: Construct the SRD-CKGConv-Informer water quality prediction model. This invention integrates the aforementioned modules to construct an end-to-end SRD-CKGConv-Informer water quality prediction model. The SRD module performs static and dynamic decomposition of spatial relationships; the CKGConv module extracts spatial features from the dual-branch structure; and the Informer module captures long-term dependencies in the temporal dimension. Finally, a feature fusion layer embeds spatial and temporal data into the joint input prediction head, outputting the target water quality index value for future timeframes. This model can accurately model the water quality change patterns of multiple sites under complex spatiotemporal coupling conditions, thereby significantly improving prediction accuracy and generalization performance.

[0011] Compared with the prior art, the advantages of the present invention are:

[0012] (1) The method of this invention introduces a spatial relationship decomposition mechanism to achieve collaborative modeling of static and dynamic spatial dependencies. Traditional water quality prediction methods often rely solely on fixed topological structures for spatial modeling, failing to simultaneously capture both long-term stable relationships and time-varying dynamic relationships between stations in a watershed. This invention introduces a spatial relationship decomposition module, explicitly dividing spatial correlation into two parts: a static graph and a dynamic graph. The former characterizes long-term steady-state dependencies based on station geographical location and flow direction relationships, while the latter adaptively updates the dynamic correlation structure based on time-series monitoring data. A min-max co-optimization paradigm is employed to balance the common and individual information of the two graphs. This design enables the model to maintain structural stability and expressive flexibility under multi-scale spatial relationships, significantly enhancing the accuracy and robustness of spatial dependency modeling in complex water environments.

[0013] (2) The method of this invention introduces a bi-branch continuous kernel graph convolution module to achieve continuous and adaptive representation of spatial features. Compared with traditional discrete graph convolution (such as GCN or GAT), which can only handle discrete edge relationships under a fixed adjacency structure, this invention uses continuous kernel graph convolution to achieve continuous representation of spatial dependencies. Pseudo-coordinates are generated by random walk probability (RRWP) to map discrete node relationships to a continuous space, and a learnable multilayer perceptron is used to construct a continuous kernel function, thereby achieving smooth feature aggregation in the global support domain. The bi-branch structure corresponds to static and dynamic graph inputs respectively, which can simultaneously capture stable and dynamically changing spatial patterns within the watershed, avoiding the over-smoothing and local dependency problems of traditional graph convolution, and achieving high accuracy and strong generalization of spatial feature extraction.

[0014] (3) The method of this invention achieves efficient prediction and spatiotemporal collaborative modeling of long-sequence water quality changes by integrating the Informer temporal structure. Traditional recurrent neural networks suffer from gradient decay and computational redundancy when processing long-sequence water quality monitoring data. This invention introduces the Informer model into the temporal modeling part, reduces the attention complexity to O(LlnL) through the ProbSparse self-attention mechanism, and extracts multi-scale temporal features through a multi-level distillation mechanism, achieving accurate capture of long-term dependence, seasonal fluctuations, and sudden pollution events. Combined with the aforementioned SRD and CKGConv modules, the Informer achieves joint modeling in both the temporal and spatial dual-graph structure, thereby significantly improving the model's ability to express complex spatiotemporal coupling relationships across multiple sites and its prediction accuracy. Attached Figure Description

[0015] Figure 1 This is an overall flowchart of the multi-site water quality prediction method based on spatial relationship decomposition and continuous kernel graph convolution of the present invention;

[0016] Figure 2 This is a flowchart of the dual-graph construction process based on spatial relationship decomposition of the present invention;

[0017] Figure 3 This is a schematic diagram of the spatial module continuous kernel graph convolution of the present invention;

[0018] Figure 4 This is a schematic diagram of the Informer time module of the present invention;

[0019] Figure 5 This is a diagram of the SRD-CKGConv-Informer prediction model architecture of the present invention;

[0020] Figure 6 This is a comparison chart of the prediction results of the ablation experimental model in the embodiments of the present invention. Detailed Implementation

[0021] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.

[0022] This invention proposes a multi-site water quality prediction method based on spatial relationship decomposition and continuous kernel graph convolution. The method mainly consists of three parts: a spatial relationship decomposition module, a bi-branch continuous kernel graph convolution module, and an Informer temporal modeling module. Specifically, the SRD module decomposes and models the static and dynamic spatial relationships between water quality monitoring stations; the CKGConv module extracts spatial features from both static and dynamic graphs simultaneously; and the Informer module captures long-term dependencies in the water quality monitoring sequence. Through the organic integration of these modules, the method solves the problems of insufficient spatial dependency modeling, unreasonable dynamic graph construction, and difficulty in capturing long-term features in traditional multi-site water quality prediction. It achieves efficient modeling and prediction of the spatiotemporal characteristics of multi-site water quality, significantly improving the accuracy, stability, and generalization ability of the prediction, and providing a new approach for multi-site water quality prediction within a watershed.

[0023] The overall flowchart of the multi-site water quality prediction method based on spatial relationship decomposition and continuous kernel graph convolution proposed in this invention is as follows: Figure 1 As shown, the method of the present invention will be explained in detail through the following five steps.

[0024] Step 1: Collection and preprocessing of water quality data from multiple sites.

[0025] This invention first targets a multi-site water quality monitoring system for a target watershed or lake, collecting time-series data of water quality indicators and their geographic coordinates from multiple monitoring points. The collected data includes, but is not limited to, conventional monitoring indicators such as water temperature (T), pH value (pH), conductivity (EC), dissolved oxygen (DO), permanganate index (CODMn), ammonia nitrogen (NH3-N), total phosphorus (TP), and total nitrogen (TN). To ensure the reliability and data quality of subsequent model training, the data undergoes systematic cleaning and standardization, including the following three steps:

[0026] (1) Outlier detection and removal: The Z-score method is used to standardize each monitored value in the time series. When the standard score |Z| of the observed value is greater than 3, it is identified as an outlier and removed. This method can effectively identify sudden drift or sensor errors and avoid outliers from interfering with model training.

[0027] (2) Missing Value Imputation: Missing data is imputed using Multiple Imputation by Chained Equations (MICE) within the Multiple Imputation (MI) method. MICE constructs a separate regression model for each missing variable in the dataset, with the missing variable as the dependent variable and other observed variables (including imputed variables) as independent variables. All missing values ​​are imputed iteratively. The specific logic is as follows: Instead of imputing all missing values ​​in the entire dataset, a separate imputation model is designed for each missing variable (e.g., linear regression for continuous variables, logistic regression for categorical variables) to suit the distribution characteristics of different variables. Each missing variable is imputed sequentially in a preset order. The imputation model for the next variable utilizes the "complete data" already imputed by the previous variable, forming a "chain dependency." This iterative process continues until the imputed values ​​of each variable converge (fluctuations are less than a threshold), ensuring consistent correlation between the imputed values ​​and the variables. This method better preserves the statistical dependency structure between features and improves data quality compared to mean imputation.

[0028] (3) Sequence alignment and normalization: Time alignment is performed on the monitoring times of different stations, and Min-Max normalization is used to map all indicators to the range of [0,1].

[0029] After processing, high-quality, complete, and time-synchronized multi-site time-series data were obtained, laying a solid foundation for subsequent spatial relationship decomposition and time-series modeling.

[0030] Step 2: Construction of a dual graph based on spatial relationship decomposition.

[0031] To characterize the multidimensional spatial dependence among monitoring points within the watershed, this invention designs a spatial relationship decomposition module, which decomposes the overall spatial structure into a static diagram A. (s) With animated graph A (d) This is to respectively characterize long-term spatial structure and dynamic interaction features. The flowchart of the dual-graph construction based on spatial relationship decomposition in this invention is as follows: Figure 2 As shown.

[0032] First, based on the latitude and longitude information of the monitoring stations, the geographical distance d between the nodes is calculated using the Haversine spherical distance formula. ij :

[0033]

[0034] Where R≈6371km represents the Earth's radius. λ i This represents the latitude and longitude of the i-th station. λ j Let d represent the latitude and longitude of the j-th station. ij This represents the spherical distance between stations i and j.

[0035] Construct a static adjacency matrix based on spherical distance.

[0036]

[0037] This matrix represents the geographical topology between sites and the long-term spatial dependence within the watershed.

[0038] Multidimensional water quality characteristics at each moment x i Input MLP to obtain node embedding h i :

[0039] h i =MLP(x i (3)

[0040] A dynamic adjacency matrix is ​​constructed based on the embedding similarity between nodes.

[0041]

[0042] Where h i ,h j The node embeddings of sites i and j are represented, and the Top-k strategy is used to preserve the most significant dynamic dependencies.

[0043] To prevent structural redundancy in static and dynamic graphs, a minimum-maximum constraint mechanism is introduced:

[0044]

[0045] Static graphs capture steady-state spatial features, while dynamic graphs focus on dynamic features that change over time. The two complement each other to construct more expressive spatial relationships.

[0046] Step 3: Use bi-branch continuous kernel graph convolution to achieve synchronous extraction of spatial features.

[0047] To extract continuous spatial dependencies in static and dynamic graphs, this invention designs a dual-branch continuous kernel graph convolution module, mapping the discrete graph structure to a continuous space, thereby enhancing the graph feature representation capability and achieving simultaneous modeling of static and dynamic spatial features. A schematic diagram of the spatial module continuous kernel graph convolution of this invention is shown below. Figure 3As shown, the specific steps include:

[0048] (3.1) Generate relative pseudo-coordinate vectors for node pairs:

[0049] Based on RRWP, construct a K-dimensional pseudo-coordinate vector P for each pair of nodes (i,j). ij :

[0050] P i,j =f walk (A,i,j) (6)

[0051] in Let A represent the relative pseudo-coordinates of stations i and j, and let A represent the adjacency matrix of the input graph (static graph A). (s) Or A (d) ), f walk The function representing the generation of K-dimensional positional codes based on graph-based random walks or shortest paths is the random walk matrix, where K represents the pseudo-coordinate dimension (i.e., the number of random walk steps).

[0052] Static branches are constructed based on the static adjacency matrix P s Dynamic branching is based on the dynamic graph to construct P d The pseudo-coordinates contain multi-hop reachability information, and this step provides continuous input for subsequent successive convolutions.

[0053] (3.2) Constructing a continuous kernel function:

[0054] To model the spatial influence between nodes in a continuous space, a learnable kernel function κ(·) is introduced to calculate the weights:

[0055] w i,j =κ(P i,j (7)

[0056] in κ(·) represents the continuous convolutional kernel weights generated from the pseudo-coordinates, and κ(·) represents the continuous kernel function implemented using a multilayer perceptron, which can map the relative positions of nodes to "mutual influence strength". It is similar to a convolutional kernel but supports continuous input, and d represents the feature dimension.

[0057] (3.3) Neighborhood weighted aggregation based on continuous kernels:

[0058] Feature aggregation of node neighborhoods is performed using continuous kernel weights:

[0059]

[0060] Where z i This represents the aggregated feature of node i after convolution. Let i represent the set of neighbors of node i. ⊙ represents the input features of node j, and ⊙ represents element-wise multiplication.

[0061] Neighbor node features are adaptively weighted according to continuous kernel weights to achieve continuous spatial convolution.

[0062] (3.4) Node Update and Linear Projection:

[0063] The resulting convolution is projected back into the feature space to form the node update representation:

[0064] h i ′=σ(Wz i +b) (9)

[0065] Where h i ′ represents the updated feature of node i, W,b represents the learnable linear transformation parameters, and σ(·) represents the ReLU activation function.

[0066] (3.5) Two-branch structure: static branch and dynamic graph branch

[0067] The CKGConv operation described above applies to static and dynamic graphs respectively:

[0068] Static branching (based on A) (s) ):

[0069] H (s) =CKGConv(H,A (s) (10)

[0070] Dynamic branching (based on A) (d) ):

[0071] H (d) =CKGConv(H,A (d) (11)

[0072] The two branches represent the static structure (long-term geographical dependence) and the dynamic structure (water quality propagation relationships that change over time), respectively, and their outputs enter the dual-path Informer time-series modeling module in step four. Through the smooth mapping of continuous kernel weights and the structural fusion of the two branches, the model can simultaneously capture stable and time-varying spatial dependence features, improving the continuity and generalization ability of spatial feature representation.

[0073] Step 4: The Informer time series modeling module captures long-term dependencies.

[0074] In step three, the static spatial feature sequence H is obtained. (s) and dynamic space feature sequence H (d)Subsequently, this invention introduces the Informer module to model long-term sequence dependencies over a time dimension. This module achieves efficient modeling of water quality change trends, periodicity, and sudden disturbances over long time spans through a sparse self-attention mechanism, hierarchical sequence compression, and a generative decoder. A schematic diagram of the Informer time module of this invention is shown below. Figure 4 As shown. Specifically, it includes the following steps:

[0075] (4.1) ProbSparse sparse self-attention mechanism:

[0076] To reduce the computational overhead of long sequences, this invention defines a query vector q. i Sparsity importance:

[0077]

[0078] Where q i ,k j This represents the attention query and key vector, where d represents the vector dimension, L represents the sequence length, and S represents the key vector. i This represents the "sparse score" of query i (used to measure the importance of the query). The top-u most important queries are selected based on their sparse scores to form a sparse query set.

[0079]

[0080] Attention calculation is performed only on the selected query:

[0081]

[0082] This sparse attention reduces the complexity from O(L) to O(L) 2 The value decreased to O(LlnL).

[0083] (4.2) Sequence downsampling (Distilling) for extracting multi-scale temporal features:

[0084] Even after passing through the attention module, the original long sequence still contains a lot of redundancy. Therefore, a layered compression method using convolution and pooling is employed:

[0085] H l+1 =Pool(σ(Conv1D(H) l (15)

[0086] Where H l Let represent the input sequence of the l-th layer, Conv1D represents the convolution integrating local temporal features, and Pool represents max pooling with a stride of 2 (halving the sequence length).

[0087] In this step, distillation can shorten the time series, reduce subsequent computation, and extract multi-scale trends. After stacking multiple layers, a compressed time representation is obtained.

[0088] H enc =Concat([H1,H2,···]) (16)

[0089] (4.3) Generative decoder achieves one-time multi-step prediction:

[0090] To avoid error accumulation in traditional autoregressive models, this invention employs a non-autoregressive generative decoder. First, the decoding input sequence is constructed:

[0091] X de =Concat(X) tok ,0) (17)

[0092] Where X tok 0 represents the end segment of historical data (start token), and 0 represents the placeholder sequence corresponding to the future prediction length (all inputs are zero, and timestamp information is retained).

[0093] The decoder employs masked sparse self-attention:

[0094] D = MaskedAttention(X) de H enc (18)

[0095] Finally, the future L is generated in one step through a linear layer. y Step prediction:

[0096] Y = W0D + b0 (19)

[0097] (4.4) Two-branch timing modeling: static and dynamic two-way Informer:

[0098] Step 3 will obtain the static spatial feature sequence H. (s) and dynamic space feature sequence H (d) Input two Informer structures respectively, and capture the temporal dependency features of static and dynamic branches:

[0099]

[0100] Each Informer consists of a sparse attention layer, a multi-layer distillation stack, and a generative decoder. Two time-series encoding methods capture the static branch that models long-term trends and stable time-series patterns, and the dynamic branch that models sudden events, short-term fluctuations, and disturbance propagation, respectively.

[0101] Step 5: Construct the SRD-CKGConv-Informer water quality prediction model.

[0102] Based on the aforementioned Spatial Relationship Decomposition (SRD) module, dual-branch Continuous Kernel Graph Convolution (CKGConv) module, and dual-path Informer temporal modeling module, this step constructs the final end-to-end multi-site spatiotemporal water quality prediction model SRD-CKGConv-Informer. The architecture diagram of the SRD-CKGConv-Informer prediction model of this invention is as follows: Figure 5 As shown in the figure. This model achieves simultaneous expression of stable spatial structure and time-varying spatial disturbances through collaborative modeling of static and dynamic branches, and combines long-sequence time-series modeling to achieve high-precision prediction of future multi-step water quality parameters. Specifically, it includes the following steps:

[0103] (5.1) Spatial-temporal feature joint modeling framework:

[0104] In step three, the input static graph and dynamic graph respectively generate two types of spatial feature sequences H. (s) H (d) In step four, the two embedded branches are respectively fed into the corresponding dual-path Informer modules to obtain static and dynamic timing features. (5.2) Dual-branch prediction head (static prediction + dynamic prediction):

[0105] The hidden representation output by the Informer module is mapped to the target dimension (such as total nitrogen TN) via the prediction head (linear regression layer):

[0106]

[0107] in, This represents the prediction results under a static spatial structure. W represents the prediction result under dynamic spatial structure. s W d and b s ,b d These are learnable parameters.

[0108] (5.3) The final prediction is obtained by averaging the static and dynamic dual branches:

[0109] To simultaneously characterize both the geographical steady-state structure and the time-varying perturbation structure, this invention employs a mean fusion strategy to obtain the final prediction result:

[0110]

[0111] The static prediction branch captures long-term stable dependencies related to geographical location and river network structure, while the dynamic prediction branch captures time-varying dependencies such as pollution diffusion, seasonal changes, and sudden disturbances. Mean fusion avoids single-branch bias, effectively improving the stability and generalization of predictions.

[0112] (5.4) Loss function (prediction loss + decomposition constraint loss):

[0113] During the training phase, the model optimization objective includes two parts: prediction loss. Used to measure the error between predicted and observed values; minimum-maximum decomposition loss. This is used to constrain the feature decoupling between static and dynamic graphs, preventing information redundancy between the two graphs. The comprehensive loss function is:

[0114]

[0115] Where α1 and α2 are balance coefficients.

[0116] Through the aforementioned joint optimization mechanism, the static graph captures globally stable relationships, while the dynamic graph learns local time-varying dependencies, thereby achieving spatiotemporal water quality prediction based on common-specific decomposition. The final model can simultaneously capture the complex spatial structure and long-term temporal variations within the watershed, enabling high-precision prediction of water quality parameters at multiple monitoring stations in multi-site monitoring tasks.

[0117] Finally, based on the constructed SRD-CKGConv-Infoemer water quality prediction model, the model evaluation functions RMSE, MAE, and R were used. 2 The model is evaluated as follows: (30), (31) and (32):

[0118]

[0119] Among them, y i It is the i-th true value. It is the i-th predicted value. It is the average of the true values, that is n is the number of samples.

[0120] Example 1:

[0121] This invention uses daily water quality data published by the National Surface Water Quality Automatic Monitoring Real-time Data Release System of the China National Environmental Monitoring Centre as an example. Data from ten monitoring stations near the Shangguanting Reservoir in the Haihe River Basin are selected, including nine water quality parameters: water temperature, pH, dissolved oxygen, conductivity, turbidity, permanganate index, ammonia nitrogen, total phosphorus, and total nitrogen. The experiment focuses on predicting total nitrogen, employing the proposed SRD-CKGConv-Informer model to perform spatiotemporal joint prediction of total nitrogen concentration at the ten stations. The specific dataset is shown in Table 1.

[0122] Table 1 Experimental Dataset

[0123]

[0124] Step 1: Collection and preprocessing of water quality data from multiple sites.

[0125] The original dataset was cleaned, with outlier removal and missing value imputation performed to ensure the quality and reliability of the model training data. Specifically, missing values ​​refer to situations where certain features in the dataset are empty or not recorded, which may be due to errors or omissions during data collection. The geographical information of the ten sites selected in the experiment is shown in Table 2.

[0126] Table 2 Site Geographic Location Information

[0127]

[0128] Step 2: Construction of a dual graph based on spatial relationship decomposition.

[0129] After data cleaning and preprocessing, this invention calculates the spherical distances between 10 monitoring stations based on their latitude and longitude coordinates, and then normalizes the distance results by their inverse to construct a static spatial similarity matrix. This matrix characterizes the long-term, unchanging geographical topological relationships between the stations. Subsequently, the multivariate water quality time series data from each station is input into the embedded network to generate node-level temporal feature representations. A dynamic graph adjacency matrix is ​​calculated based on the similarity between the embedded vectors, and a Top-k strategy is used to retain the most significant relevant edges to construct a dynamic association structure that changes over time. The dynamic graph is primarily used to characterize the time-varying interaction characteristics caused by pollution diffusion, short-term water quality linkages, and sudden events.

[0130] Ultimately, static graphs and time-updated dynamic graphs are obtained for subsequent spatial modeling, providing the model with structured spatial prior knowledge that better reflects real hydrodynamic processes.

[0131] Step 3: Use bi-branch continuous kernel graph convolution to achieve synchronous extraction of spatial features.

[0132] After constructing static and dynamic graphs, this invention calculates relative positional encodings (pseudo-coordinates) based on random walks on both graphs, forming static and dynamic pseudo-coordinate matrices. Subsequently, the preprocessed multivariate water quality sequence is used as input features, combined with the corresponding pseudo-coordinates, and fed into a two-branch continuous kernel graph convolution module. Both branches output spatial feature sequences of the same length as the original sequence, providing spatially augmented input for subsequent temporal dimension modeling.

[0133] Step 4: The Informer time series modeling module captures long-term dependencies.

[0134] This invention inputs the static spatial feature sequence and the dynamic spatial feature sequence obtained in step three into two independent Informer time series models to extract multi-scale time dependency structures. The final results are a static branch prediction sequence and a dynamic branch prediction sequence, representing the time series prediction results under long-term geographical relationships and short-term dynamic relationships, respectively.

[0135] Step 5: Construct the SRD-CKGConv-Informer water quality prediction model.

[0136] After completing spatial and temporal modeling, this invention obtains static branch prediction output and dynamic branch prediction output, respectively. To comprehensively reflect the two types of spatial structure information, this invention performs mean fusion on the two prediction results to obtain the final TN prediction value. This fusion strategy can balance the influence of long-term geographical constraints and short-term dynamic changes within the watershed, thereby improving prediction stability.

[0137] Based on the SRD-CKGConv-Informer model described above, spatiotemporal joint predictions of TN concentrations at ten monitoring stations in the Haihe River Basin were performed. After model training, RMSE, MAE, and R were calculated using test set samples. 2 The accuracy of the model was evaluated using three indicators. The prediction and evaluation results for different sites are shown in Table 3, and the comparison results of the prediction experiments are shown in the figure below. Figure 6 As shown.

[0138] Table 3. Results of Predictive Evaluation Indicators for Different Sites

[0139]

[0140] As shown in Table 3, the SRD-CKGConv-Informer model proposed in this invention achieves high prediction accuracy at all ten monitoring stations. Overall, the model performs well in terms of RMSE, MAE, and R... 2 All indicators performed excellently, stably depicting the spatiotemporal variation trend of TN. The indicators for all ten stations were greater than 0.84, with seven stations showing R... 2 A value exceeding 0.90 indicates that the model of this invention can accurately fit the actual trend of TN change, and the prediction effect is stable and reliable.

[0141] In summary, the model of this invention can achieve stable and accurate multi-site TN concentration prediction under complex aquatic environment conditions, and has good engineering practicality and promotion value.

[0142] Except for the technical features described in the specification, all other technologies are known to those skilled in the art. Descriptions of well-known components and technologies are omitted in this invention to avoid redundancy and unnecessary limitation. The embodiments described above do not represent all embodiments consistent with this application. Various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of this invention are still within the protection scope of this invention.

Claims

1. A multi-site water quality prediction method based on spatial relation decomposition and continuous kernel graph convolution, characterized in that, Includes the following steps: Step 1: Collect and preprocess water quality time series data from multiple monitoring stations within the watershed; perform outlier removal, missing value filling, time alignment, and normalization on monitoring indicators such as water temperature, pH, conductivity, dissolved oxygen, permanganate index, ammonia nitrogen, total phosphorus, and total nitrogen at different stations to form a continuous water quality characteristic sequence for multiple stations. Step 2: Introduce the spatial relationship decomposition module to construct static and dynamic maps. The static map is constructed based on the latitude and longitude of the monitoring stations through distance calculation, representing the long-term stable geospatial dependence. The dynamic map is constructed based on the water quality feature embedding vectors of each station, representing the water quality propagation and interaction relationships that change over time. Step 3: Construct static graph branches and dynamic graph branches based on continuous kernel graph convolution (CKGConv) to synchronously model the spatial features of multiple sites; and achieve continuous convolution extraction of spatial information of static and dynamic graphs by performing continuous kernel mapping on the random walk pseudo coordinates between node pairs. Step 4: Use the dual-path Informer temporal modeling module to perform long-term dependency modeling on the static spatial feature sequence and the dynamic spatial feature sequence respectively; use ProbSparse sparse self-attention and sequence downsampling structure to obtain the static branch prediction output and the dynamic branch prediction output. Step 5: The predicted outputs of the static branch and the dynamic branch are fused by mean to obtain the final water quality prediction result; the prediction error loss and the static graph-dynamic graph decomposition constraint loss are used to train the model together, so that the dynamic graph focuses on the time-varying structure and the static graph focuses on the long-term spatial structure, thereby improving the water quality prediction performance.

2. The method according to claim 1, characterized in that, In step 2, the static map is constructed using the Haversine spherical distance formula to calculate the spatial distance between any two monitoring stations. The adjacency matrix elements are defined as the reciprocals of the distances to obtain the geospatial similarity matrix.

3. The method according to claim 1, characterized in that, The bi-branch continuous kernel graph convolution in step 3 includes a static branch CKGConv built based on a static graph, used to extract long-term stable spatial associations; and a dynamic branch CKGConv built based on a dynamic graph, used to extract time-varying dynamic spatial dependencies. The two branches use independent kernel function parameters and independent pseudo-coordinate generation methods, forming a parallel modeling architecture for spatial structures.

4. The method according to claim 1, characterized in that, The continuous kernel graph convolution in step 3 is used to process two types of spatial graph structures from different sources. Its operations include: generating K-dimensional random walk pseudo-coordinates for each pair of nodes; inputting the pseudo-coordinates into a continuous kernel function to obtain the convolution weights of the node pairs; performing continuous weighted aggregation and updating node features in both static and dynamic graphs; thereby achieving adaptive spatial feature extraction of static and dynamic graphs under a unified convolution framework.

5. The method according to claim 1, characterized in that, In step 4, the output of the dual-branch CKGConv is used as the input of the two Informer models to realize the serial fusion structure of spatial continuous modeling and long temporal modeling. This structure is different from the design in the traditional spatiotemporal model and realizes the joint modeling of continuous spatial kernel and sparse temporal attention.

6. The method according to claim 1, characterized in that, In step 4, the static branch Informer and the dynamic branch Informer adopt independent encoder-decoder structures. By modeling long-term stable time series patterns and short-term dynamic time series fluctuations respectively, decoupled prediction of static time series features and dynamic time series features is achieved.

7. The method according to claim 1, characterized in that, In step 5, the final predicted value is obtained by fusing the static and dynamic prediction results through element-wise mean fusion. This is used to simultaneously retain the prediction contributions of the static and dynamic structures and enhance the model's ability to balance sudden disturbances and long-term trends.

8. The method according to claim 1, characterized in that, This method combines spatial relationship decomposition, bi-branch continuous kernel graph convolution, dual-path Informer long-term modeling, and prediction fusion module to form the SRD-CKGConv-Informer spatiotemporal joint prediction model, which is used for high-precision prediction of water quality at multiple sites.