Water quality prediction method based on multi-source data

By using LSTM and GNN models of multi-source data in water quality prediction, the problem of large errors in existing water quality prediction methods when data is unstable is solved, and short-term real-time online prediction of surface water quality factors is achieved, and the accuracy and efficiency of prediction are improved.

CN119598124APending Publication Date: 2025-03-11CHONGQING INST OF GREEN & INTELLIGENT TECH CHINESE ACAD OF SCI +3

Patent Information

Application Number
CN202411648291.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The existing water quality prediction methods have large errors when the data is unstable, and the calculations based on neural networks are complex and the convergence speed is slow.

Method used

The water quality prediction model of long-term and short-term memory network (LSTM) and graph neural network (GNN) based on multi-source data is adopted, and the surface water monitoring data, meteorological data, hydrological data and pollution source online monitoring data is combined to achieve short-term real-time online prediction of surface water quality factors.

Benefits of technology

Real-time online prediction of water quality factors is realized, which improves the accuracy and efficiency of prediction, and reduces the difficulty of computing resource occupation and data acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119598124A_ABST
    Figure CN119598124A_ABST
Patent Text Reader

Abstract

The invention discloses a water quality prediction method based on multi-source data, and constructs a water quality prediction model based on a long short-term memory network (LSTM) and a graph neural network (GNN) of multi-source data (surface water monitoring data, meteorological data, hydrological data and pollution source on-line monitoring data), so that short-term real-time on-line prediction of surface water quality factors can be realized. According to the method, on the basis of multi-source data such as section water quality monitoring data, historical meteorological data, forecast meteorological data, hydrological monitoring data, pollution source online monitoring data and upstream and downstream relations, multiple main water quality influence factors such as water quality, meteorology, hydrology, pollution sources and upstream and downstream section water quality are comprehensively considered; the LSTM or the graph neural network is adopted to establish a water quality prediction model, and the comprehensive influence of various influence factors and the time-space relationship on the water quality is simulated, so that the simulation result is more accurate and reliable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of resource and environmental technology, and in particular to a water quality prediction method based on multi-source data. Background Art

[0002] The factors that affect the prediction of surface water environmental quality are complex, involving multiple aspects of natural factors (such as rainfall, flow, basin topography, and basin soil characteristics) and human factors (such as domestic source emissions, industrial source emissions, and agricultural non-point source pollution). Reliable water quality prediction methods are of great significance for predicting the trend of water quality changes, taking governance measures, and establishing a decision-making and early warning mechanism. At present, the methods for surface water quality prediction can be mainly divided into the following two categories: ① Mathematical models driven by mechanisms such as surface water environmental dynamics and material migration and conversion laws. Commonly used water environment models include pollution load models (GWLF and PLOAD), receiving water quality models (QUAL2E and WASP), integrated watershed models integrating pollution load and water quality (HSPF, SWAT, AGNPS, AnnAGNPS, SWMM), water quality models (CE-QUAL-W2, EFDC, and AQUATOX), and integrated watershed models (GLEAMS and MIKE SHE).

[0003] This type of method can use a large amount of historical monitoring data and forecast meteorological data to simulate and predict the hourly concentration of various pollutants in a unit water body. The higher the abundance and resolution of the input data, the higher the prediction accuracy. Because this method often requires the input of a large amount of detailed basic data, including basin topography, soil, land use, population, water body boundary, bottom elevation, water quality along the way, and pollution source emissions along the way, it is difficult to obtain its basic data. At the same time, because this method is also limited by parameter settings and computing resources, its actual prediction effect is often not very ideal. ② Data-driven prediction model: Common data-driven models include time series prediction, regression analysis, neural network, gray system prediction, etc. Among them, the time series prediction data demand is small and the application is simple, but because there are many factors affecting water quality prediction, the accuracy of the time series prediction algorithm is low. When the regression analysis prediction algorithm based on mathematical statistics is applied to water quality prediction, it can be attributed to the process of examining the quantitative relationship between several independent variables and a dependent variable, thereby predicting the dependent variable. It has a large demand for data and high requirements for sample distribution.

[0004] The grey system prediction model has good short-term prediction effect and simple calculation process, so many scholars in my country have also applied it to water quality prediction. However, when the data is unstable, the error of this method is large. The artificial neural network water quality prediction method based on the principle of neural network has developed rapidly in recent years. It is based on a large amount of sample data for calculation and has a slow convergence speed.

[0005] In order to solve the above technical problems, we designed a water quality prediction method based on multi-source data. Summary of the invention

[0006] The purpose of the present invention is to provide a water quality prediction method based on multi-source data, which has the advantage of realizing short-term real-time online prediction of surface water quality factors, and solves the problem that when the data in water quality prediction is unstable, the error is large. The artificial neural network water quality prediction method based on the neural network principle has developed rapidly in recent years. It is based on a large amount of sample data for calculation and has a slow convergence speed.

[0007] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: a water quality prediction method based on multi-source data, which constructs a long short-term memory network (LSTM) and graph neural network (GNN) water quality prediction model based on multi-source data (surface water monitoring data, meteorological data, hydrological data, and online monitoring data of pollution sources), which can realize short-term real-time online prediction of surface water quality factors.

[0008] Preferably, the long short-term memory network (LSTM) water quality prediction model is specifically based on the long short-term memory network model (LSTM) water quality prediction AI model architecture. The long short-term memory network model (LSTM) is a deep learning model used to process sequence data with time dependence, such as natural language. It is a network composed of multiple memory units, each memory unit has three gates (input gate, output gate and forget gate), which can control the information stored and transmitted in the memory unit. The LSTM network balances short-term memory and long-term memory through these gates, thereby retaining long-term dependencies in the sequence data while still effectively processing complex sequence data.

[0009] Preferably, each time step of the LSTM network includes multiple gates, including an input gate, an output gate and a forget gate. In the input gate, the LSTM network selects important information from the input sequence and outputs it to the next time step. In the output gate, the LSTM network selects information to be passed to the next time step and outputs it to the output part of the sequence. In the forget gate, the LSTM network controls which information is stored in the memory unit and which information should be forgotten. The LSTM network stores and operates sequence data through memory units. The memory unit is controlled by three gates and can store important information in the input sequence in its local state and pass it to the next time step when needed. In each time step, the memory unit will update its state to better reflect the important information in the input sequence.

[0010] Preferably, the LSTM is formed by the interaction of four neural layers, and the first layer uses a forget gate to determine the state of the input unit. The formula is as shown in formula (1), which is used to determine how much to retain and how much information to pass to the next round, and whether to retain is determined by sigmoid conversion;

[0011] ft = σ(Wf·[ht-1·xt]+bf) (1)

[0012] The next step is to decide to store new information, which consists of two parts, including the sigmoid layer and the tanh layer. The former determines which values ​​are modified, and the latter generates a new vector. The input gate formula is shown in formula (2), and the state formula of the new unit is shown in formula (3):

[0013] it = σ(Wi·[ht-1·xt]+bi) (2)

[0014] Ct = tanh(Wc·[ht-1·xt]+bc) (3)

[0015] Then update the old cell state, multiply the old cell state by the forget gate and add the new candidate value, and finally filter the new additions through the output gate and determine the output content. The output gate formula is as shown in formula (4), and the final output formula is as shown in formula (5):

[0016] ot = σ(Wo·[ht-1·xt]+bo) (4)

[0017] ht = ot·tanh(Ct) (5).

[0018] Preferably, the graph neural network water quality prediction model is specifically a water quality prediction AI model architecture based on a graph neural network. Graph Neural Network (GNN) is a deep learning method based on a graph structure. From its definition, it can be seen that the graph neural network is mainly composed of two parts, namely "graph" and "neural network". The "graph" here is the graph data structure in graph theory, and the "neural network" is the deep neural network we are familiar with. Graph neural networks can be used to process various types of graph data.

[0019] Preferably, the training process of the graph neural network is similar to that of the traditional convolutional neural network, and both use the back-propagation algorithm to update the model parameters. The difference is that the graph neural network needs to process both node features and edge features at the same time, so different input and output formats need to be designed. Currently common graph neural network types include: GCN, GraphSAGE, GAT and other classic graph networks.

[0020] Preferably, the water quality prediction based on Graph Neural Network (GNN) is a method for water quality prediction using graph structure data. Water quality prediction usually involves multiple factors, such as pollutant concentration, temperature, flow rate, etc. There may be complex interactions between these factors, and the graph structure can well represent this relationship;

[0021] In water quality prediction based on graph neural networks, we first need to build a graph model in which nodes represent water quality parameters (such as pollutant concentration, temperature, etc.) and edges represent the interaction between these parameters. Then, by training a graph neural network model, we can learn the relationship between these parameters and thus achieve water quality prediction.

[0022] Preferably, the LSTM model is integrated with the graph neural network water quality prediction AI model, with section monitoring data, meteorological data, hydrological data, and pollution source online monitoring data as input data. For rivers with only 1-2 sections, an LSTM model is constructed to simulate water quality; for rivers with 3 or more sections, a graph neural network model is constructed based on the upstream and downstream relationship of the river to better simulate the spatial correlation between the upstream and downstream sections, making the simulation results more accurate.

[0023] Compared with the prior art, the present invention has the following beneficial effects:

[0024] 1. The LSTM and graph neural network water quality prediction model based on multi-source data can realize real-time online prediction of cross-section water quality, which is of great significance for the changing trend of water quality, taking treatment measures and establishing a decision-making and early warning mechanism.

[0025] 2. The present invention is based on multi-source data such as section water quality monitoring data, historical meteorological data, forecast meteorological data, hydrological monitoring data, online monitoring data of pollution sources, and upstream and downstream relationships. It comprehensively considers various major water quality influencing factors such as water quality, meteorology, hydrology, pollution sources, and upstream and downstream section water quality. According to the distribution of river sections, LSTM or graph neural network is used to establish a water quality prediction model to simulate the comprehensive impact of multiple influencing factors and time-space relationships on water quality, so that the simulation results are more accurate and reliable. At the same time, the model takes up little computing resources, is easy to acquire data, simple to process data, and has a fast running speed, so it can realize real-time online prediction of section water quality.

[0026] 3. Fusion application of multi-source data: This method comprehensively considers various major water quality influencing factors such as historical water quality change patterns, meteorological influences, hydrological influences, pollution source emission influences, upstream and downstream topological relationships, and upstream water quality influences. Multi-source data such as section historical water quality monitoring data, historical meteorological data, forecast meteorological data, historical hydrological monitoring data, online monitoring data of pollution sources, upstream historical water quality, and upstream and downstream topological relationships are used as input data.

[0027] 4. Automatic selection of models and parameters: Based on the distribution of river sections, the data involved in the sections, and the accuracy of model simulation, the algorithm background automatically selects the LSTM or graph neural network model, as well as the parameters of the model input data and its weight configuration.

[0028] 5. Realize real-time prediction of hourly data: Compared with traditional mathematical models such as EFDC, this method takes up less computing resources, is easy to obtain data, simple to process data, and has a fast running speed, and can realize real-time online prediction of cross-section water quality.

[0029] 6. High simulation accuracy: The accuracy of the daily concentration of water quality factors such as permanganate index, total phosphorus, ammonia nitrogen and dissolved oxygen simulated by this method is as high as over 90%. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 This is a structural diagram of the model of the present invention;

[0031] Figure 2 The convolutional neural network of the present invention is used for time series prediction graph;

[0032] Figure 3 This is a diagram of the algorithm architecture of the present invention;

[0033] Figure 4 The figure shows the prediction results of the present invention. DETAILED DESCRIPTION

[0034] See also Figure 1-Figure 4 A water quality prediction method based on multi-source data was proposed. A long short-term memory network (LSTM) and graph neural network (GNN) water quality prediction model based on multi-source data (surface water monitoring data, meteorological data, hydrological data, and online monitoring data of pollution sources) was constructed, which can realize short-term real-time online prediction of surface water quality factors.

[0035] The long short-term memory network (LSTM) water quality prediction model is specifically based on the long short-term memory network model (LSTM) water quality prediction AI model architecture. The long short-term memory network model (LSTM) is a deep learning model used to process sequence data with time dependencies, such as natural language. It is a network composed of multiple memory units, each of which has three gates (input gate, output gate, and forget gate) that can control the information stored and transmitted in the memory unit. The LSTM network uses these gates to balance short-term memory and long-term memory, thereby retaining long-term dependencies in sequence data while still effectively processing complex sequence data.

[0036] Each time step of the LSTM network contains multiple gates, including input gate, output gate and forget gate. In the input gate, the LSTM network selects important information from the input sequence and outputs it to the next time step. In the output gate, the LSTM network will select the information to be passed to the next time step and output it to the output part of the sequence. In the forget gate, the LSTM network controls which information is saved in the memory cell and which information should be forgotten. The LSTM network stores and operates sequence data through memory cells. The memory cell is controlled by three gates, which can store important information in the input sequence in its local state and pass it to the next time step when needed. In each time step, the memory cell will update its state to better reflect the important information in the input sequence.

[0037] LSTM is formed by the interaction of four neural layers. The first layer uses a forget gate to determine the state of the input unit. The formula is shown in formula (1). It is used to decide how much to retain and how much information to pass to the next round. The sigmoid conversion is used to decide whether to retain or not.

[0038] ft = σ(Wf·[ht-1·xt]+bf) (1)

[0039] The next step is to decide to store new information, which consists of two parts, including the sigmoid layer and the tanh layer. The former determines which values ​​are modified, and the latter generates a new vector. The input gate formula is shown in formula (2), and the state formula of the new unit is shown in formula (3):

[0040] it = σ(Wi·[ht-1·xt]+bi) (2)

[0041] Ct = tanh(Wc·[ht-1·xt]+bc) (3)

[0042] Then update the old cell state, multiply the old cell state by the forget gate and add the new candidate value, and finally filter the new additions through the output gate and determine the output content. The output gate formula is as shown in formula (4), and the final output formula is as shown in formula (5):

[0043] ot = σ(Wo·[ht-1·xt]+bo) (4)

[0044] ht = ot·tanh(Ct) (5)

[0045] The model structure and main parameters are as follows: Figure 1 As shown in the figure, the first layer is an LSTM training model with 300 neurons. According to the above principle, the model learns based on past fitting results and uses the memory characteristics of LSTM to optimize the water quality prediction ability. The purpose of the second layer is to prevent overfitting and allow all neurons to learn better. It is then connected to the third layer to fully connect the neurons in the previous layer, and finally output after the activation function in the fourth layer.

[0046] The graph neural network water quality prediction model is specifically a water quality prediction AI model architecture based on the graph neural network. Graph Neural Network (GNN) is a deep learning method based on graph structure. From its definition, it can be seen that the graph neural network is mainly composed of two parts, namely "graph" and "neural network". The "graph" here is the graph data structure in graph theory, and the "neural network" is the deep neural network we are familiar with. Graph neural networks can be used to process various types of graph data.

[0047] The training process of graph neural networks is similar to that of traditional convolutional neural networks. Both use the back-propagation algorithm to update model parameters. The difference is that graph neural networks need to process both node features and edge features at the same time, so different input and output formats need to be designed. Currently, common graph neural network types include classic graph networks such as GCN, GraphSAGE, and GAT.

[0048] Water quality prediction based on Graph Neural Network (GNN) is a method of using graph structure data to predict water quality. Water quality prediction usually involves multiple factors, such as pollutant concentration, temperature, flow rate, etc. There may be complex interactions between these factors, and the graph structure can well represent this relationship.

[0049] In water quality prediction based on graph neural networks, we first need to build a graph model in which nodes represent water quality parameters (such as pollutant concentration, temperature, etc.) and edges represent the interaction between these parameters. Then, by training a graph neural network model, we can learn the relationship between these parameters and thus achieve water quality prediction.

[0050] Although traditional deep learning methods have been applied with great success in extracting features of Euclidean spatial data, water quality monitoring data is generated from non-Euclidean space, and the performance of traditional deep learning methods in processing non-Euclidean spatial data is still unsatisfactory. In this context, in view of the extremely high complexity and nonlinear characteristics of water quality data, this method takes into account the spatial and temporal dependencies between water quality monitoring sections, and proposes a method based on spatiotemporal graph convolutional network to solve the problem of water quality index prediction. The temporal and spatial information contained in the data is used to predict the water quality indicators of different monitoring sections in the future region. The water quality monitoring network is defined as an undirected graph, and the spatiotemporal dependency of water quality monitoring sections is modeled using spatiotemporal convolutional blocks, which can effectively capture spatiotemporal correlations.

[0051] In the spatial dimension, spatial correlation is captured. In the convolution process, not only the state of neighboring nodes but also the state of the node itself is considered. In the time dimension, gated convolution is used to capture time dependency. Different from the traditional convolution method, the model considers the problem of time series and adopts causal convolution to perform parallel calculations on data, which makes the model training faster. The above graph convolution and gated convolution are combined into Figure 3 The structure shown uses a bottleneck strategy to achieve scale compression and feature compression, and a normalization layer is connected after each layer to prevent overfitting. The final model is a stack of two St-ConvBlocks followed by an output layer, in which the output layer first uses a time dimension convolution to merge the time dimension of the previous output data, and then outputs the final predicted data after a convolution. The predicted data is a picture of the next time dimension.

[0052] The fusion of the LSTM model and the graph neural network water quality prediction AI model uses section monitoring data, meteorological data, hydrological data, and online monitoring data of pollution sources as input data. For rivers with only 1-2 sections, an LSTM model is constructed to simulate water quality. For rivers with 3 or more sections, a graph neural network model is constructed based on the upstream and downstream relationship of the river to better simulate the spatial correlation between the upstream and downstream sections, making the simulation results more accurate.

[0053] To sum up: this water quality prediction method based on multi-source data, through the long short-term memory network (LSTM) and graph neural network (GNN) water quality prediction model based on multi-source data (surface water monitoring data, meteorological data, hydrological data, pollution source online monitoring data), solves the problem that when the data is unstable in water quality prediction, the error is large. The artificial neural network water quality prediction method based on the principle of neural network has developed rapidly in recent years. It is based on a large amount of sample data for calculation and has a slow convergence speed.

Claims

1. A water quality prediction method based on multi-source data, characterized in that: A water quality prediction model based on long short-term memory network (LSTM) and graph neural network (GNN) based on multi-source data (surface water monitoring data, meteorological data, hydrological data, and online monitoring data of pollution sources) was constructed, which can realize short-term real-time online prediction of surface water quality factors.

2. The water quality prediction method based on multi-source data according to claim 1, characterized in that: The long short-term memory network (LSTM) water quality prediction model is specifically based on the long short-term memory network model (LSTM) water quality prediction AI model architecture. The long short-term memory network model (LSTM) is a deep learning model used to process sequence data with time dependence, such as natural language. It is a network composed of multiple memory units, each of which has three gates (input gate, output gate and forget gate) that can control the information stored and transmitted in the memory unit. The LSTM network balances short-term memory and long-term memory through these gates, thereby retaining long-term dependencies in sequence data while still effectively processing complex sequence data.

3. The water quality prediction method based on multi-source data according to claim 2 is characterized in that: Each time step of the LSTM network contains multiple gates, including input gate, output gate and forget gate. In the input gate, the LSTM network selects important information from the input sequence and outputs it to the next time step. In the output gate, the LSTM network will select the information to be passed to the next time step and output it to the output part of the sequence. In the forget gate, the LSTM network controls which information is stored in the memory cell and which information should be forgotten. The LSTM network stores and operates sequence data through memory cells. The memory cell is controlled by three gates, which can store important information in the input sequence in its local state and pass it to the next time step when needed. In each time step, the memory cell will update its state to better reflect the important information in the input sequence.

4. The water quality prediction method based on multi-source data according to claim 2 is characterized in that: The LSTM is formed by the interaction of four neural layers. The first layer uses a forget gate to determine the state of the input unit. The formula is as shown in formula (1), which is used to determine how much to retain and how much information to pass to the next round. The sigmoid conversion is used to determine whether to retain; ft = σ(Wf·[ht-1·xt]+bf) (1) The next step is to decide to store new information, which consists of two parts, including the sigmoid layer and the tanh layer. The former determines which values ​​are modified, and the latter generates a new vector. The input gate formula is shown in formula (2), and the state formula of the new unit is shown in formula (3): it = σ(Wi·[ht-1·xt]+bi) (2) Ct = tanh(Wc·[ht-1·xt]+bc) (3) Then update the old cell state, multiply the old cell state by the forget gate and add the new candidate value, and finally filter the new additions through the output gate and determine the output content. The output gate formula is as shown in formula (4), and the final output formula is as shown in formula (5): ot = σ(Wo·[ht-1·xt]+bo) (4) ht = ot·tanh(Ct) (5).

5. The water quality prediction method based on multi-source data according to claim 1 is characterized in that: The graph neural network water quality prediction model is specifically a water quality prediction AI model architecture based on the graph neural network. Graph Neural Network (GNN) is a deep learning method based on graph structure. From its definition, it can be seen that the graph neural network is mainly composed of two parts, namely "graph" and "neural network". The "graph" here is the graph data structure in graph theory, and the "neural network" is the deep neural network we are familiar with. Graph neural network can be used to process various types of graph data.

6. The water quality prediction method based on multi-source data according to claim 5, characterized in that: The training process of the graph neural network is similar to that of the traditional convolutional neural network, and both use the back-propagation algorithm to update the model parameters. The difference is that the graph neural network needs to process both node features and edge features at the same time, so different input and output formats need to be designed. Currently, common graph neural network types include: GCN, GraphSAGE, GAT and other classic graph networks.

7. The water quality prediction method based on multi-source data according to claim 5, characterized in that: The water quality prediction based on Graph Neural Network (GNN) is a method for water quality prediction using graph structure data. Water quality prediction usually involves multiple factors, such as pollutant concentration, temperature, flow rate, etc. There may be complex interactions between these factors, and the graph structure can well represent this relationship. In water quality prediction based on graph neural networks, we first need to build a graph model in which nodes represent water quality parameters (such as pollutant concentration, temperature, etc.) and edges represent the interaction between these parameters. Then, by training a graph neural network model, we can learn the relationship between these parameters and thus achieve water quality prediction.

8. The water quality prediction method based on multi-source data according to claim 1, characterized in that: The fusion of the LSTM model and the graph neural network water quality prediction AI model uses section monitoring data, meteorological data, hydrological data, and pollution source online monitoring data as input data. For rivers with only 1-2 sections, an LSTM model is constructed to simulate water quality. For rivers with 3 or more sections, a graph neural network model is constructed based on the upstream and downstream relationship of the river to better simulate the spatial correlation between the upstream and downstream sections, making the simulation results more accurate.

Citation Information

Patent Citations

  • Context-driven free formation strategy method for hydrological model

    CN108614915A

  • Water quality space-time correlation prediction method based on long and short term memory and radial basis function neural network

    CN113435124A

  • Drainage basin water quality short-term prediction method based on improved LSTM

    CN114386686A

  • CNN-LSTM-based multi-element water quality prediction method

    CN116843076A

Cited By

  • Reservoir water quality model prediction method and system based on big data

    CN120338172A

  • Water quality prediction method based on multi-source data and graph attention long short-term memory network

    CN121279596A

  • Multi-modal water bloom phenomenon identification and prediction method based on graph attention aggregation

    CN122310282A

  • Multi-modal algal bloom phenomenon recognition and prediction method based on graph attention aggregation

    CN122310282B