River management-oriented multi-parameter water quality intelligent prediction method and system

By employing a hybrid architecture of CNN and Bi-LSTM and a Gaussian likelihood function optimization method, the data processing and prediction problems in multi-parameter water quality monitoring of rivers are solved, achieving high-precision water quality prediction and supporting real-time decision-making in water resource management.

CN121393643APending Publication Date: 2026-01-23POWER CHINA KUNMING ENG CORP LTD +1

Patent Information

Application Number
CN202511477816.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-16
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Existing technologies for river water quality monitoring suffer from insufficient data processing capabilities, inadequate feature extraction, limitations in model architecture, and insufficient optimization of prediction errors, making it difficult to achieve high-precision and high-reliability predictions of multi-parameter river water quality.

Method used

A hybrid architecture combining convolutional neural networks (CNN) and bidirectional long short-term memory networks (Bi-LSTM) is adopted, along with mean interpolation algorithm to handle missing values, and loss function is optimized by Gaussian likelihood function to achieve nonlinear feature fusion and bidirectional time series modeling of multi-parameter water quality data.

Benefits of technology

It significantly improves the accuracy and reliability of water quality prediction, reduces the risk of overfitting, and provides high-precision multi-parameter water quality prediction capabilities, providing strong data support for water resource management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121393643A_ABST
    Figure CN121393643A_ABST
Patent Text Reader

Abstract

The invention discloses a river management-oriented multi-parameter water quality intelligent prediction method and a river management-oriented multi-parameter water quality intelligent prediction system, relates to the technical field of environment monitoring and artificial intelligence, and particularly discloses a water quality intelligent prediction system and a water quality intelligent prediction method. According to the system, original water quality monitoring data is cleaned and repaired through the missing value filling module, so that the data integrity is ensured; performing deep feature extraction and fusion on the multi-parameter water quality data by using a convolutional neural network (CNN) to generate high-dimensional feature mapping; then, a bidirectional long-short-term memory network (Bi-LSTM) model is adopted to carry out forward and backward bidirectional learning on the extracted time sequence features, and a complex dynamic rule and a long-term dependency relationship of water quality parameter changes are accurately captured; and finally, an optimized loss function module is introduced to minimize a training error, so that the prediction accuracy is further improved. According to the method, the problems of insufficient precision, high model calculation complexity and weak multi-parameter collaborative prediction capability caused by data missing in the existing river water quality prediction technology are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of environmental monitoring and artificial intelligence, and specifically discloses a water quality intelligent prediction method. BACKGROUND

[0002] Water is an indispensable basic resource for maintaining ecological balance and human social development. Rivers, as an important surface water resource, their water quality directly affects drinking water safety, agricultural irrigation, industrial production and ecosystem health. Therefore, continuous and accurate monitoring and prediction of river water quality is of great significance for developing effective water environment protection strategies and risk management measures.

[0003] Traditional river water quality monitoring methods mainly rely on manual sampling and laboratory chemical analysis, usually including fixed-point sampling, sample preservation, transportation to the laboratory, and analysis using professional instruments. This process is not only time-consuming and costly, but also has the risk of human operation errors and sample contamination during transportation, which limits the real-time and accuracy of the monitoring results. In addition, this method is difficult to achieve continuous and dynamic monitoring of large-scale watersheds, and cannot meet the demand for real-time data and high-frequency prediction of modern water resource management.

[0004] In order to overcome the limitations of traditional methods, in recent years, machine learning and data-driven models have been increasingly applied to the field of water quality prediction. This kind of method uses historical monitoring data to build a prediction model, which can quickly and cost-effectively predict water quality parameters at future time points. Various models have been tried in existing technologies, such as traditional machine learning methods such as support vector regression and multiple linear regression, which perform stably on small data sets, but their performance is heavily dependent on manual feature engineering, and it is difficult to capture complex nonlinear relationships and long-term time series dependence characteristics in water quality data. Methods such as artificial neural networks (ANN) and random forests (RF) can better handle nonlinear problems, but ANN models are prone to local optimal solutions and unstable training processes, and RF and other ensemble learning methods do not accurately depict the feature interaction of multi-parameter time series data. Long short-term memory network (LSTM), as a variant of recurrent neural network (RNN), has shown significant advantages in handling time series prediction problems, as its built-in gating mechanism can effectively learn long-term dependencies. Existing research has applied it to the prediction of single parameters such as dissolved oxygen (DO) and chemical oxygen demand (COD). However, the single LSTM model still has insufficient accuracy for collaborative prediction of multiple water quality parameters, and the model training process is computationally complex and prone to overfitting.

[0005] Despite the progress made by existing technologies, they still universally suffer from the following technical defects: first, insufficient data processing capability. Actual collected water quality monitoring data often have a large number of missing values (due to equipment failure, sampling interruption, etc.), and most existing models directly ignore this problem or use simple linear interpolation, which seriously affects the data quality and subsequent prediction accuracy. Second, insufficient feature extraction. Most models fail to effectively mine and utilize the deep, nonlinear correlation features between multiple water quality parameters, and fail to integrate feature extraction and time series prediction organically. Third, limitations in model architecture. Unidirectional LSTM models can only learn sequence information from front to back, and cannot fully utilize the "future" context information in the data for more accurate prediction, limiting their performance ceiling. Fourth, insufficient prediction error optimization. The loss function design of many models is relatively simple, and the uncertainty of the predicted values is not fully considered, resulting in large training errors and the need for improved prediction accuracy. Therefore, there is an urgent need for a new water quality prediction scheme that can comprehensively address the above problems to achieve high-precision and high-reliability prediction of river multi-parameter water quality, providing key technical support for intelligent management of water resources.

[0006] The method for intelligent prediction of multi-parameter water quality for river management comprises the following steps:

[0007] S1, data collection and missing value filling

[0008] The original multi-parameter time series water quality data of the conventional monitoring points of different river sections of the target river are collected and formed into a data set; the mean interpolation algorithm is used to automatically identify and fill in the missing values in the original data set, and a complete and continuous multi-parameter water quality time series data set is formed;

[0009] S2, model construction

[0010] The complete data set preprocessed by step S1 is input into the convolutional neural network module for nonlinear feature fusion and mapping;

[0011] The convolutional neural network module is composed of at least one one-dimensional convolution and at least one one-dimensional max-pooling layer stacked alternately;

[0012] S3, bidirectional time series dependency modeling and prediction

[0013] The high-dimensional deep feature mapping output by the convolutional neural network module of step S2 is input into the bidirectional long short-term memory network module for time series modeling; the bidirectional long short-term memory network module is composed of a forward long short-term memory network layer and a backward long short-term memory network layer in parallel;

[0014] S4, model optimization and result output

[0015] The error between the preliminary prediction value output by the bidirectional long short-term memory network module and the true value is calculated by combining the optimized loss function module of the Gaussian likelihood function;

[0016] The loss function quantifies the uncertainty in the prediction by dynamically adjusting the mean and standard deviation of the prediction value distribution.

[0017] Through the back propagation algorithm, all parameters in the convolutional neural network module and the bidirectional long short-term memory network module, such as weights and biases, are iteratively optimized to minimize the loss function, and finally an optimized high-precision water quality prediction result is output.

[0018] The data set in step S1 includes chemical oxygen demand, five-day biochemical oxygen demand, dissolved oxygen, pH value, ammonia nitrogen, total phosphorus and total nitrogen.

[0019] The mean interpolation algorithm in step S1 is specifically to replace the missing value of any parameter with the arithmetic mean of the data at the adjacent time points before and after it, and finally output a complete and continuous multi-parameter water quality time series data set, providing a high-quality data basis for subsequent model training.

[0020] The one-dimensional convolution layer in step S2 is responsible for convolution operation on multi-parameter water quality data to extract local features and interaction; the one-dimensional maximum pooling layer downsamples the convolution result to retain the most significant features while reducing the data dimension, gradually refining and generating high-dimensional deep feature mapping reflecting the comprehensive condition of water quality.

[0021] The forward long short-term memory network layer in step S3 processes the input sequence in time sequence to capture the influence of past time series information on the future; the backward long short-term memory network layer processes the same input sequence in reverse time sequence to utilize future context information; finally, the output states of the forward and backward long short-term memory network layers are fused, spliced or weighted averaged to realize deeper and more accurate bidirectional learning and modeling of water quality parameter change law, and output preliminary prediction value of at least one water quality parameter at least one future time point.

[0022] The multi-parameter water quality intelligent prediction system for river management implementing the above method, characterized in that it comprises:

[0023] A data preprocessing unit for performing step S1 to complete data acquisition and missing value filling;

[0024] A feature extraction unit with the convolutional neural network module built-in, for performing step S2 to complete deep feature extraction;

[0025] A time series prediction unit with the bidirectional long short-term memory network module built-in, for performing step S3 to complete time series modeling and prediction;

[0026] a model optimization unit, which is internally provided with the optimization loss function module, is used to execute step S4, complete model training and optimization, and output a final prediction result.

[0027] Further, the system can further include a data acquisition and communication unit, which is used to automatically acquire data from a remote water quality sensor and transmit the prediction result to a monitoring center.

[0028] Compared with the prior art, the method has the following remarkable advantages:

[0029] High prediction accuracy: the complex nonlinear characteristics between multi-parameter water quality data are effectively mined through the CNN module, and the powerful bidirectional time series modeling capability of the Bi-LSTM module is combined to fully capture the dynamic law and long-term dependence relationship of water quality change, which significantly improves the prediction accuracy, and the error indicators (such as MSE, MAE) are much lower than those of traditional models.

[0030] Strong data robustness: the built-in missing value automatic filling mechanism can effectively handle the inevitable data missing problem in the real monitoring environment, ensure the quality and continuity of the model input data, and improve the practicability and reliability of the system.

[0031] Advanced model structure: the innovative CNN-Bi-LSTM hybrid deep learning architecture seamlessly connects feature extraction and time series prediction, and is trained in combination with the optimized loss function, effectively reducing the risk of overfitting, accelerating the model convergence speed, and the overall performance is better than that of single LSTM, CNN or traditional machine learning model.

[0032] Outstanding practical value: the present application is not only an algorithm innovation, but also provides a complete system solution, which can be seamlessly integrated into the existing river water quality monitoring network to realize automatic and high-precision prediction of key water quality parameters (such as COD, NH3-N), and provides strong data support and technical support for environmental protection departments to conduct water quality evaluation, pollution tracing and early warning decision-making. BRIEF DESCRIPTION OF DRAWINGS

[0033] Figure 1 The figure is the prediction effect diagram of permanganate index in embodiment 1.

[0034] Figure 2 The figure is the prediction effect diagram of permanganate prediction in embodiment 1.

[0035] Figure 3 The figure is the prediction effect diagram of ammonia nitrogen prediction in embodiment 1. DETAILED DESCRIPTION

[0036] The present application will be further described below in combination with specific embodiments.

[0037] Embodiment 1: Multi-parameter water quality intelligent prediction method for river management, the steps are as follows:

[0038] S1, data collection and missing value filling

[0039] S1-1, data collection

[0040] From the provincial and national control routine monitoring stations of a river in China, the monthly routine water quality monitoring data set from January 2015 to December 2024 for 10 years was obtained.

[0041] The data collection points include three key sections of A, B and C of the river.

[0042] The data set includes seven indicators of chemical oxygen demand (COD), five-day biochemical oxygen demand (BOD), dissolved oxygen (DO), pH value, ammonia nitrogen (NH3-N), total phosphorus (TP), and total nitrogen (TN).

[0043] All the data sets in step S1-1 are arranged in chronological order, and divided into training set (January 2015 to December 2020) and test set (January 2021 to December 2024) in the ratio of 6:4.

[0044] The initial settings of the core parameters of the model are as follows:

[0045] The number of hidden layer units of the Bi-LSTM network is set to 250, the training batch size (Batch Size) is set to 120, the number of iterations (Epochs) is set to 500, the optimizer is selected as Adam, and the initial learning rate is set to 0.001.

[0046] S1-2, missing value filling

[0047] Receive the original water quality data, detect the missing values in it, and use the mean interpolation algorithm to fill in the missing TP and TN data in some months. Specifically:

[0048] For any parameter missing value at time point t, use the arithmetic mean of the parameter measurement values at the previous time point (t-1) and the next time point (t+1) to replace it, that is, X t =(X t−1 +X t+1 ) / 2, thereby generating a complete time series data set.

[0049] S2, model construction

[0050] S2-2, construction of deep feature extraction module

[0051] The pre-processed complete data set (size: [sequence length: 120, 9], 9 is the number of features) of step S1 is input into a one-dimensional convolutional neural network (1D-CNN) module.

[0052] The 1D-CNN includes two convolutional layers, the first layer uses 64 convolutional kernels with a size of 3, and the second layer uses 128 convolutional kernels with a size of 3, and each convolutional layer is followed by a ReLU activation function and a one-dimensional maximum pooling layer (MaxPooling1D) with a step size of 2, which is used to gradually extract local features and interaction relationships in multi-parameter data and output high-dimensional feature maps.

[0053] S3, bidirectional temporal dependence modeling and prediction

[0054] A bidirectional long short-term memory network (Bi-LSTM) is used; the feature sequence output by the 1D-CNN module is input into a bidirectional long short-term memory network layer, which is composed of two independent long short-term memory network (LSTM) layers, one of which processes the sequence in time order (forward), and the other processes the same sequence in reverse time order (backward).

[0055] The final output state vectors of the forward and backward LSTMs are spliced and input into a fully connected (Dense) layer for linear transformation, and the predicted values of the water quality parameters (such as COD, NH3-N) for the next few months are output.

[0056] S4, model optimization and result output

[0057] S4-1, training the constructed model using the training set data

[0058] During the training process, a loss function (Negative Log-Likelihood Loss) combining a Gaussian likelihood function is used to calculate the prediction error instead of the conventional mean square error (MSE); this loss function not only minimizes the deviation between the predicted value and the true value, but also optimizes the training process by modeling the uncertainty (variance) of the predicted value, and its mathematical expression can be simplified as:

[0059]

[0060] where: y i is the true value, μ i and σ i are the mean and variance of the model prediction, respectively;

[0061] All weight parameters of the model are iteratively updated through the backpropagation algorithm and the Adam optimizer to minimize the loss function. Compared with the traditional mean square error (MSE) loss, it can more finely guide the model training.

[0062] S4-2, prediction and application

[0063] After the model training is completed, the prediction performance is evaluated using the test set data, and the test set data is input into the trained model to obtain the predicted value of the water quality parameter.

[0064] The predicted permanganate and ammonia nitrogen predicted value effects of this embodiment are as follows Figure 2 and Figure 3 The comparative values compared with the existing prediction method are listed in Table 1 and Table 2. From Figure 2 and 3 It can be seen that the predicted value of the present application is basically close to the measured value. Compared with the existing prediction method, the mean squared error (MSE), root mean square error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE) of this embodiment are all significantly improved compared with the existing method.

[0065] Table 1 Comparison table of permanganate prediction effect

[0066]

[0067] Table 2 Comparison table of ammonia nitrogen prediction effect

[0068]

[0069] The system is deployed on a server, and data from river monitoring sensors can be received in real time through a data interface, and the above steps S1 to S4 are automatically executed, and the prediction results are visualized and displayed on the water quality monitoring platform interface, providing decision support for management personnel, such as issuing water quality warnings or evaluating management effects.

Claims

1. A multi-parameter water quality intelligent prediction method for river management, characterized in that The method comprises the following steps: S1, data acquisition and missing value filling The original multi-parameter time series water quality data of the conventional monitoring points of different river sections of the target river are collected, and a data set is formed; the missing values in the original data set are automatically identified and filled by using a mean interpolation algorithm, and a complete and continuous multi-parameter water quality time series data set is formed; S2, model construction The complete data set preprocessed by step S1 is input into a convolutional neural network module for nonlinear feature fusion and mapping; The convolutional neural network module is composed of at least one one-dimensional convolution and at least one one-dimensional maximum pooling layer stacked alternately; S3, bidirectional time series dependence modeling and prediction The high-dimensional deep feature mapping output by the convolutional neural network module of step S2 is input into a bidirectional long short-term memory network module for time series modeling; the bidirectional long short-term memory network module is composed of a forward long short-term memory network layer and a backward long short-term memory network layer in parallel; S4, model optimization and result output An optimization loss function module combining a Gaussian likelihood function is used to calculate the error between the preliminary prediction value and the true value output by the bidirectional long short-term memory network module; The loss function quantifies the uncertainty in prediction by dynamically adjusting the mean and standard deviation of the prediction value distribution; Through the back propagation algorithm, all parameters in the convolutional neural network module and the bidirectional long short-term memory network module, such as weights and biases, are iteratively optimized to minimize the loss function, and finally the optimized high-precision water quality prediction result is output.

2. The river management-oriented multi-parameter water quality intelligent prediction method according to claim 1, characterized in that The data set in step S1 includes chemical oxygen demand, five-day biochemical oxygen demand, dissolved oxygen, pH value, ammonia nitrogen, total phosphorus, and total nitrogen.

3. The river management-oriented multi-parameter water quality intelligent prediction method according to claim 1, characterized in that The mean interpolation algorithm in step S1 specifically replaces the missing values of any parameter with the arithmetic mean of the data at the adjacent time points before and after it, and finally outputs a complete and continuous multi-parameter water quality time series data set, providing a high-quality data basis for subsequent model training.

4. The river management-oriented multi-parameter water quality intelligent prediction method according to claim 1, characterized in that The one-dimensional convolution layer in step S2 is responsible for convolution operation on multi-parameter water quality data to extract local features and interaction relationships; the one-dimensional maximum pooling layer down-samples the convolution result to retain the most significant features while reducing the data dimension, gradually refining and generating a high-dimensional deep feature mapping reflecting the comprehensive water quality condition.

5. The river management-oriented multi-parameter water quality intelligent prediction method of claim 1, wherein The forward long short-term memory network layer in step S3 processes the input sequence in time sequence to capture the influence of past time series information on the future; The backward long short-term memory network layer processes the same input sequence in reverse time sequence to utilize future context information; Finally, the output states of the forward and backward long short-term memory network layers are fused, spliced or weighted averaged to realize deeper and more accurate bidirectional learning and modeling of the variation law of water quality parameters, and to output the preliminary prediction value of at least one water quality parameter at least one future time point.

6. A river management-oriented multi-parameter water quality intelligent prediction system for implementing the method, characterized in that, It comprises: a data preprocessing unit for performing step S1 of claim 1 to complete data acquisition and missing value filling; a feature extraction unit with the convolutional neural network module built-in, for performing step S2 of claim 1 to complete deep feature extraction; A time series prediction unit, which is built-in the bidirectional long short-term memory network module, is configured to perform the step S3 of claim 1 to complete time series modeling and prediction. A model optimization unit, which is built-in the optimization loss function module, is configured to perform the step S4 of claim 1 to complete model training and optimization, and output a final prediction result.

7. The river management-oriented multi-parameter water quality intelligent prediction system for implementing the above method according to claim 6, characterized in that The system further comprises a data acquisition and communication unit configured to automatically acquire data from the remote water quality sensor and transmit the prediction result to a monitoring center.

Citation Information

Patent Citations

  • Dam body water seepage amount prediction method based on multi-scale convolutional neural network and bidirectional long-short-term memory neural network

    CN119168115A

  • Water quality prediction method and system based on model set and storage medium

    CN119599495A

  • Medium-and-long-term rainfall prediction method fusing spatial-temporal characteristics

    CN119918000A

  • Water quality data prediction method based on hybrid model and intelligent monitoring system

    CN119990461A

  • Water quality prediction model and prediction method based on spatial-temporal feature fusion and LSTM memory network

    CN120067993A

Cited By

  • CNN-LSTM-based gas flame combustion condition intelligent diagnosis method and system, and storage medium

    CN122049617A