Water pollution tracing method based on graph attention neural network

The water quality abnormality is judged through improved attention modules and variational autoencoders, and a space-time graph is constructed using heterogeneous graph attention neural network model, which solves the existing technology of water pollution traceability when dealing with uncertainty and nonlinear processes. The shortcomings of the source traceability accuracy and efficiency are improved.

CN119251014APending Publication Date: 2025-01-03BEIJING UNIV OF TECH
View PDF 0 Cites 10 Cited by

Patent Information

Application Number
CN202411282955.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The existing water pollution traceability methods have insufficient adaptability and learning ability when dealing with uncertainty and nonlinear processes, and cannot effectively process directed graph topology information of river networks, resulting in large errors and low accuracy of traceability calculations.

Method used

The improved attention module and variational autoencoder are used to judge the distribution of water quality abnormalities, and the spatial and timing dependence relationship between pollutants and water quality monitoring sections is constructed through the heterogeneous pattern attention neural network model to realize pollutants traceability.

Benefits of technology

It improves the calculation accuracy and efficiency of water pollution traceability, can effectively deal with uncertainty and nonlinear effects in sudden water pollution events, reduces traceability errors, and enhances the adaptability to input parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251014A_ABST
    Figure CN119251014A_ABST
Patent Text Reader

Abstract

The invention relates to a water pollution event-oriented traceability analysis method, in particular to a water pollutant traceability method based on the combination of an improved attention module, an improved variational auto-encoder and a heterogeneous graph attention neural network model. According to the method, firstly, an improved attention module is utilized to extract correlation between water pollution characteristics, then data are input into an improved variational auto-encoder to reconstruct time sequence distribution, and whether a water pollution event occurs or not is judged. Then, a heterogeneous space-time diagram is constructed for the space and time sequence dependence of the pollution source and the water quality monitoring section, and finally, the abnormal upstream water quality monitoring section and surrounding pollutants are traced to determine the position of the pollution source.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for tracing the source of water pollutants, and in particular to a method for tracing the source of water pollutants based on an improved attention module, an improved variational autoencoder, and a heterogeneous graph attention neural network model. Background Art

[0002] People's lives are closely related to the water environment. In recent years, the quality of my country's water environment has continued to improve, but the risks and control of the water environment are still severe. With the rapid development of the new generation of information technology represented by big data, artificial intelligence, cloud computing and the Internet of Things, it is bringing new changes to the traditional ecological environment. The new generation of information technology supports short-term analysis of prominent water ecological environment problems, making the decision-making and governance in the field of water ecological environment intelligent. Among them, the source tracing of sudden water pollution incidents in rivers is also known as the problem of pollution source identification and positioning. Based on the monitored water quality index data, it tracks and locates the source of pollutants entering the river, and finds out the key information of the pollution source such as the pollution leakage node, leakage time, and leakage intensity. Tracing the source of pollutants that cause sudden water pollution incidents is the key and prerequisite for effectively obtaining the pollution situation of water areas, and it is of great significance for timely control of water environment pollution.

[0003] The existing methods for tracing the source of water pollution mainly include numerical simulation analysis, optimization methods and probability statistics. The numerical simulation analysis method solves the tracing problem by timely inverting the control equation and reconstructing the historical distribution of observed pollutants. However, this method cannot effectively deal with uncertainty, nonlinearity and other processes. These methods cannot handle the directed graph topological structure information on the river network well, and have poor adaptive and learning abilities. There are problems such as high requirements for input parameters and large errors in tracing calculations. The optimization method obtains the identification value of the pollution source parameter by minimizing the difference between the observed value and the predicted value of the pollutant concentration. The optimization method generally converts the pollution source identification problem into an extreme value optimization problem. At present, the common pollution source identification optimization algorithms include genetic algorithm, simulated annealing algorithm, particle swarm optimization algorithm and hybrid optimization algorithm. However, the optimization method is often prone to fall into the local optimum during the solution process and cannot find the global optimal solution in time. The probability statistics method estimates the probability of an event and continuously improves the identification value based on the likelihood function to identify the parameters of the pollution source. The main methods include Bayesian reasoning and minimum relative entropy. However, the probability statistics method is difficult to accurately capture the nonlinear changes in water quality indicators, resulting in low accuracy in tracing the source. Therefore, there is currently a lack of effective methods for tracing the source of water pollution events. Summary of the invention

[0004] In view of the shortcomings of the above numerical simulation analysis method, optimization method and probability statistics method for pollutant source tracing, the present invention provides a water pollutant source tracing method based on an improved attention module, an improved variational autoencoder and a heterogeneous graph attention neural network model. It includes: judging abnormal water quality distribution based on the improved attention module and the improved variational autoencoder; realizing pollution source tracing of pollutants and water quality monitoring sections based on the heterogeneous graph attention neural network model. The present invention is implemented by the following technical solutions.

[0005] A method for tracing pollutants in water pollution incidents based on a graph attention neural network, the method comprising the following steps:

[0006] 1) Obtain environmental water pollution data of pollutant emissions;

[0007] 2) Global temporal encoding is performed on the water quality time series of the same feature, and the correlation between multiple features is extracted using an improved attention module;

[0008] 3) Based on 2), the data is input into the improved variational autoencoder to reconstruct the time series distribution and determine whether a sudden water pollution incident occurs;

[0009] 4) Based on 3), a heterogeneous spatiotemporal graph is constructed for the spatial and temporal dependencies of pollutants and monitoring sections;

[0010] 5) Based on 4), trace the source of abnormal upstream water quality monitoring sections and surrounding pollutants. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 A schematic diagram of the composition of a water pollution source tracing method based on graph attention neural network;

[0012] Figure 2 Improved attention module and improved variational autoencoder structure diagram;

[0013] Figure 3 Schematic diagram of pollution-aware tracing based on end-to-end heterogeneous spatiotemporal graph reasoning. DETAILED DESCRIPTION

[0014] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. The following description covers many specific details in order to provide a comprehensive understanding of the present invention. However, it will be apparent to those skilled in the art that the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a clearer understanding of the present invention by illustrating examples of the present invention. The present invention is by no means limited to any specific configuration and algorithm proposed below, but covers any modification, replacement and improvement of related elements, parts and algorithms without departing from the spirit of the present invention.

[0015] The following will refer to the attached Figure 1 This paper describes a water pollutant source tracing method based on an improved attention module, an improved variational autoencoder, and a heterogeneous graph attention neural network model.

[0016] The first step is to obtain water pollution data in the pollutant emission environment.

[0017] In order to better measure the proposed method, the proposed method can better combine the spatiotemporal factors of the water environment, consider the actual downstream distribution of the river network, select multiple pollution sources and pollutant emission environments of water quality monitoring sections, and obtain water pollution data based on the selected pollutant emission environment.

[0018] In the second step, global temporal encoding is performed on the water quality time series of the same feature, and the correlation between multiple features is modeled using an improved attention module.

[0019] In order to effectively describe the time series change process of water quality in the overall time period, the water quality time series with the same characteristics is globally encoded and mapped into a high-dimensional feature representation. Set the input sequence to X = {x 1 ,x 2 ,...,x T}, after global encoding, the global temporal feature representation H = f(X) is obtained, H is a global temporal feature representation, f is a convolutional neural network function used for the global temporal encoder. Then, H is mapped to a high-dimensional space, which is realized by Z = g(H), where g is a nonlinear mapping function and Z is a high-dimensional feature representation.

[0020] In order to model the correlation between multiple features in water quality data, an improved multi-head self-attention mechanism is used. The traditional self-attention mechanism obtains the attention score by calculating the dot product between the query vector Query (Q), the key vector Key (K) and the value vector Value (V), thereby determining the correlation between each feature. The formula is as follows.

[0021]

[0022] where dk is the dimension of the Key vector, and the sotmax() operation normalizes the calculated attention scores.

[0023] The improved multi-head self-attention mechanism further processes and associates the attention scores of multiple features by introducing a multivariate correlation graph to generate a more representative correlation matrix M.

[0024] In the third step, the data is input into the improved variational autoencoder to reconstruct the time series distribution and determine whether a sudden water pollution incident has occurred.

[0025] The improved variational autoencoder is used to model the potential distribution of water quality time series. Assume that the encoder maps the input data into the latent space with a mean of μ and a variance of δ 2 , latent variable Z, the improved variational autoencoder output (Z) is calculated as follows:

[0026]

[0027] Finally, the anomaly is determined by calculating the KL divergence between the potential distribution and the standard normal distribution. The calculation formula of KL divergence is as follows.

[0028]

[0029] Where q(Z) is the distribution of the latent variable and p(Z) is the standard normal distribution. If the KL divergence is large, there may be anomalies. Where tr(∑) represents the trace of the covariance matrix and logdet(∑) represents the logarithm of the determinant of the covariance matrix to reflect the degree of distribution.

[0030] The fourth step is to construct an end-to-end heterogeneous spatiotemporal graph based on the spatial and temporal dependencies of pollution sources and water quality monitoring sections.

[0031] Divide the pollution source and water quality multidimensional characteristic time series into multiple subsequences. Assume that the original time series is X = {x 1 ,x 2 ,...,x T}, where x t Represents the observation value at time t. By using the sliding window method, X is divided into several subsequences X i ={x i+1 ,x i+2 ,...,x i+k}, each subsequence retains the semantic information of the local time series. Encoding each subsequence separately and extracting features through the Transformer model can effectively reduce the computational complexity of characterizing the multidimensional time series characteristics of pollution sources and water quality, and handle longer time series lengths. The process is as follows, where H i represents the encoded representation of the i-th subsequence.

[0032] H i = Transformer(X i ),

[0033] In the pollution source and water quality monitoring network, the water quality section or pollution source is abstracted as a node in the space-time graph, and the upstream and downstream relationship is abstracted as the edge between nodes. Different types of nodes and their connecting edges constitute a heterogeneous graph. Define a heterogeneous graph G = (V, E), where V represents the node set, E represents the edge set, and different types of nodes and edges are represented as V = {V P ,V W} and E={E P ,E W}.

[0034] Through the graph attention neural network, the relationship weight between the central node and its neighbor nodes is learned. For each node v∈V, the activation function LeakyReLU is used, and the attention weight α of its neighbor nodes ij It can be expressed as:

[0035]

[0036] Where W is the learnable weight matrix, h i and h j are the feature representations of node i and its neighbor j, respectively, ij Represents the attention weight of node i to its neighbor j. Different types of edges in heterogeneous graphs will also learn corresponding weights to capture complex graph structure information.

[0037] Step 5: Trace the abnormal upstream water quality monitoring section and surrounding pollution sources

[0038] Through the Transformer model and the graph attention neural network, a fused feature representation is calculated for each node in the space-time graph, which not only contains the local semantic information of the time series, but also captures the complex association relationship between the node and its neighbors. After identifying a pollution event node, start from the node and trace back upstream along the edges in the space-time graph to track possible pollution paths. This process can be carried out based on the edge weights in the graph. The larger the weight of the edge, the greater the possibility of pollutant transmission. In each step of tracing, the feature information of the current node and its neighboring nodes is aggregated, so as to retain and accumulate the features of the upstream and downstream nodes during the tracing process. The AGG() aggregation operation can be expressed as:

[0039]

[0040] where h u represents the aggregate feature representation of node u, is the set of neighbor nodes of node u.

[0041] Through the aggregated feature representation of the graph model, the abnormality of each node is judged based on KL divergence. The more abnormal the node, the more likely it is to be the source of the pollution event. Assume that the normal distribution of each node is p(h i ), the current observation distribution is q(h i ), use KL divergence to measure the abnormality of the node. If D KL When a certain threshold is exceeded, the node is marked as an abnormal node.

[0042]

[0043] Through the above process, the pollution source of the water quality monitoring section is traced. Each node will be divided into a normal node or an abnormal node according to its aggregated feature information and anomaly detection criteria. Finally, the pollution source of this water pollution incident is traced back.

[0044] Technical contribution of the present invention

[0045] Tracing the source of pollutants that cause sudden water pollution incidents is the key and prerequisite for effectively obtaining the pollution situation in water areas. Water quality monitoring sections and pollution sources are distributed upstream and downstream of the river network. The water quality of the water quality monitoring section is often affected by many factors such as the upstream water quality monitoring section and surrounding pollution sources. Traditional water environment pollution perception and tracing methods are mainly based on numerical simulation, which cannot effectively deal with uncertain and nonlinear processes, and have poor adaptive and learning capabilities. There are problems such as high requirements for input parameters and large errors in tracing calculations. In response to the above problems, this patent proposes a water quality pollutant tracing method based on an improved attention module, an improved variational autoencoder, and a heterogeneous graph attention neural network model. Compared with existing work, the main contributions of this invention are in the following aspects:

[0046] (1) Compared with the traditional attention module, the present invention uses an improved attention module to introduce a multivariate correlation graph, further strengthening the interaction between features.

[0047] (2) The present invention utilizes an improved variational autoencoder to reconstruct the time series distribution of water quality data to determine whether the location is a water pollution event.

[0048] (3) The present invention uses a heterogeneous graph attention neural network model to trace the source of pollution. It constructs a heterogeneous spatiotemporal graph based on the spatial and temporal dependencies of pollution sources and water quality monitoring sections, learns the complex topological structure implicit in water environment data, and uses spatiotemporal fusion to infer the location of sudden water pollution incidents, effectively handling the uncertainty and nonlinear effects of sudden water pollution incidents, and improving the calculation accuracy and efficiency of pollution tracing.

[0049] The present invention is based on a method proposed above. It should be understood that the detailed description of the technical solution of the present invention with the help of the preferred embodiment is illustrative rather than restrictive. A person of ordinary skill in the art can modify the technical solutions recorded in each example based on reading the specification of the present invention, or replace some of the technical features therein with equivalents, but these modifications or replacements do not make the essence of the corresponding technical solution deviate from the spirit and scope of the technical solutions of each example of the present invention.

Claims

1. A method for tracing the source of water pollution incidents, characterized in that: The method comprises the following steps: 1) Obtain water pollution data in pollutant emission environments; 2) Global temporal encoding is performed on the water quality time series of the same feature, and the correlation between multiple features is extracted using an improved attention module; 3) Reconstruct the time series distribution of the data processed in 2) using an improved variational autoencoder to determine whether a sudden water pollution incident has occurred; 4) Based on 3), a heterogeneous space-time graph is constructed based on the spatial and temporal dependencies of pollution sources and water quality monitoring sections; 5) Trace the source of abnormal upstream water quality monitoring sections and surrounding pollutants.

2. The method according to claim 1, characterized in that The water pollution data based on the water pollution incidents, training the sudden water pollution incident tracing model, comprises: Acquire water quality data from pollutant emission environments to determine whether a sudden water pollution incident has occurred; construct a heterogeneous spatiotemporal graph structure of water quality monitoring sections and pollution sources; use the acquired data to train the sudden water pollution incident tracing model; and conduct pollution tracing for abnormal upstream water quality monitoring sections and surrounding pollutants.

3. The method according to claim 1, characterized in that The sudden water pollution incident tracing model is used to trace the source of the abnormal upstream water quality monitoring section and surrounding pollutants, including: Pollutant data is obtained through water quality monitoring sections and input into the improved variational autoencoder to determine whether water pollution occurs. The pollutant data is then input into the tracing model for tracing.

4. The method according to claim 2 and claim 3, characterized in that The sudden water pollution incident tracing model based on the improved attention module, the improved variational autoencoder, and the heterogeneous graph attention neural network model includes: An improved attention module is used to extract the correlation between multiple features. The modeled data is used as the input of the improved variational autoencoder to determine the abnormal distribution of water quality. The heterogeneous graph attention neural network model is used to trace the pollution sources of water quality detection sections and pollutants.

Citation Information

Cited By

  • Marine pollution traceability big data analysis method based on space-time diagram neural network

    CN120297199A

  • A Big Data Analysis Method for Marine Pollution Source Tracing Based on Spatio-Temporal Graph Neural Network

    CN120297199B

  • Water quality antibiotic tracing method and system based on data analysis

    CN120892686A

  • Intelligent river governance monitoring method and system based on complex network and application of intelligent river governance monitoring method and system

    CN120970604A

  • River intelligent governance monitoring method and system based on complex network and application thereof

    CN120970604B