A water quality monitoring and early warning method and system

Real -time collection of water quality parameters data through multiple groups of sensors and constructing multi -factor water quality predictive models solve the problem of lacking time and coverage of traditional water quality monitoring methods, realize the precise monitoring and prediction of water quality parameters, and generate early warning signals to improve The scientific and response speed of water environment management.

CN119005539BActive Publication Date: 2025-01-28WATER RESOURCES RES INST OF SHANDONG PROVINCE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411487634.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-01-28
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

Traditional water quality monitoring methods have problems such as poor timeliness, high cost and limited coverage. Online monitoring systems based on sensor networks face challenges such as data noise, complex processing of missing values ​​and insufficient prediction and early warning capabilities.

Method used

Collect multi -dimensional water quality parameter data in real time with multiple groups of sensors. The early warning model realizes precise monitoring and prediction of water quality parameters, and generate early warning signals.

Benefits of technology

It significantly improves the timeliness and coverage of water quality monitoring, reduces the cost of relying on artificial sampling, enhances the scientific and response speed of water environmental management, and ensures the safety and stability of the water environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119005539B_ABST
    Figure CN119005539B_ABST
Patent Text Reader

Abstract

The present invention relates to a water quality monitoring and early warning method and system, and belongs to the field of water quality monitoring. It comprises the following steps: collecting multidimensional water quality parameter data through multiple groups of sensors, obtaining time series data, performing preprocessing, and obtaining preprocessed time series data; constructing a multi-factor water quality prediction model, the multi-factor water quality prediction model comprises a single factor prediction module, a feature fusion module, a Transformer encoder module, and a prediction output module, the single factor prediction module is a single factor time series monitoring model, the preprocessed time series data multi-factor water quality prediction model obtains the multidimensional water quality parameter prediction value of the future time step; constructing an early warning model based on the multi-factor time series prediction result, the multi-dimensional water quality parameter prediction value is processed by the early warning model based on the multi-factor time series prediction result, and a warning signal is generated. The present invention realizes the accurate monitoring and prediction of water quality parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of water quality monitoring, and in particular relates to a water quality monitoring and early warning method and system. Background Art

[0002] Water resources are an important foundation for human survival and social and economic development. The quality of water directly affects the ecological environment, public health and industrial production. With the acceleration of industrialization and urbanization, water pollution is becoming more and more serious. Although the traditional water quality monitoring method that relies on manual sampling and laboratory analysis is accurate, it has the disadvantages of poor timeliness, high cost and limited coverage. In recent years, online real-time monitoring systems based on sensor networks have been developed, which can collect multidimensional water quality parameters in real time, but still face challenges such as data noise, complex missing value processing and insufficient prediction and early warning capabilities. With the advancement of big data and artificial intelligence technology, time series analysis methods based on deep learning have excellent performance in processing complex multidimensional data, providing new technical means for the construction of intelligent water quality monitoring and early warning systems. Based on this background, the present invention proposes a water quality monitoring and early warning method, which aims to achieve accurate monitoring and prediction of water quality parameters through advanced data processing and deep learning models, and build an efficient early warning mechanism to improve the scientificity and response speed of water quality management and ensure the safety and stability of the water environment. Summary of the invention

[0003] In order to achieve accurate monitoring and prediction of water quality parameters, the present invention provides a water quality monitoring and early warning method.

[0004] In order to achieve the above object, the present invention is implemented through the following technical solutions:

[0005] The present invention provides a water quality monitoring and early warning method, comprising the following steps:

[0006] S1. Data collection and preprocessing: collecting multidimensional water quality parameter data through multiple sets of sensors to obtain time series data, preprocessing the time series data to obtain preprocessed time series data;

[0007] S2. Water quality parameter prediction: construct a multi-factor water quality prediction model, which includes a single factor prediction module, a feature fusion module, a Transformer encoder module and a prediction output module; the pre-processed time series data is passed through the single factor prediction module to obtain the predicted value of each water quality parameter at the current time step, the predicted value of each water quality parameter at the current time step is fused with the pre-processed time series data to obtain a comprehensive feature vector, the comprehensive feature vector is encoded through the Transformer encoder module to obtain the dynamic association and complex nonlinear relationship between the multi-dimensional water quality parameters, and then mapped through the prediction output module to obtain the predicted value of the multi-dimensional water quality parameters in the future time step;

[0008] S3. Prediction result warning: construct a warning model based on the multi-factor time series prediction results, and the multi-dimensional water quality parameter prediction values ​​are processed by the warning model based on the multi-factor time series prediction results to generate a warning signal.

[0009] Furthermore, the data collection in step S1 specifically includes:

[0010] Multi-dimensional water quality parameter data including pH value is collected by multiple sets of sensors distributed in the water body. , dissolved oxygen concentration , ammonia nitrogen , total phosphorus Chemical oxygen demand , the multiple groups of sensors are separated by time intervals Perform a data sampling to obtain time series data , the formula is as follows:

[0011] ,

[0012] in, represents the sampling time point of the time series, Represents the dimensionality of water quality parameter data.

[0013] Furthermore, the preprocessing of the time series data in step S1 specifically includes:

[0014] The collected time series data are interpolated by linear interpolation method. The missing data in are filled to obtain complete time series data. The formula is as follows:

[0015] ,

[0016] in, Indicates the time point for filling No. The value of the parameter, ,When there are multiple consecutive missing points, the moving average method based on ,historical mean is used to fill them;

[0017] The complete time series data is denoised by wavelet transform to obtain denoised time series data, and the parameters in the denoised time series data are standardized to obtain preprocessed time series data. , the formula is as follows:

[0018] ,

[0019] = ,

[0020] in, represents the mean, represents the standard deviation, Represents the time point in the preprocessed time series data No. parameters, Represents the denoised time series data.

[0021] Furthermore, the pre-processed time series data in step S2 is passed through a single factor prediction module to obtain a predicted value of each water quality parameter at the current time step, specifically including:

[0022] The single factor prediction module adopts a single factor time series monitoring model based on long short-term memory network LSTM; for each pre-processed water quality parameter data , establish an independent single-factor time series monitoring model based on long short-term memory network LSTM, and convert the past Historical data of water quality parameters at time steps Input into the single factor time series monitoring model based on long short-term memory network LSTM to obtain each pre-processed water quality parameter data The predicted value for the current time step ;

[0023] In the training process of the single-factor time series monitoring model based on the long short-term memory network LSTM, the predicted value is used With the true value The mean square error between is used as the loss function, and the calculation formula is as follows:

[0024] ,

[0025] in, represents the mean square error loss, Represents the total number of time steps of historical time series data used in the model training process; the back propagation algorithm combined with the adaptive optimization algorithm is used to iteratively update the parameters and bias items of the long short-term memory network LSTM.

[0026] Furthermore, in step S2, the predicted value of each water quality parameter at the current time step is fused with the preprocessed time series data to obtain a comprehensive feature vector, specifically including:

[0027] The predicted value of each preprocessed water quality parameter data at the current time step With the preprocessed time series data Fusion to obtain a comprehensive feature vector , the formula is as follows:

[0028] .

[0029] Furthermore, the Transformer encoder module and the prediction output module in step S2 specifically include:

[0030] The comprehensive feature vector After the Transformer encoder module, the fusion feature vector is fused using the multi-head self-attention mechanism. The encoded fusion feature vector is obtained, and the encoded fusion feature vector is passed through the prediction output module and the mapping operation of the fully connected layer to obtain the predicted value of the water quality parameter in the future time step. .

[0031] Furthermore, the training process of the multi-factor water quality prediction model in step S2 includes:

[0032] The mean square error is used to train the multi-factor water quality prediction model, and the formula is as follows:

[0033] ,

[0034] in, Represents the true value of the preprocessed multidimensional water quality parameter data, Represents the predicted values ​​of multidimensional water quality parameters at future time steps;

[0035] The Adam optimizer is used to iteratively update the parameters of the multi-factor water quality prediction model and all bias items; the Dropout layer and L2 regularization technology are introduced to prevent model overfitting.

[0036] Furthermore, step S3 specifically includes:

[0037] Get the predicted values ​​of water quality parameters at future time steps output by the multi-factor water quality prediction model ;

[0038] Set an early warning threshold for each water quality parameter data , including warning thresholds and warning thresholds , using dynamic threshold adjustment method to dynamically adjust the warning threshold according to real-time data and model prediction results and warning thresholds ,in the past In each time step, the mean and standard deviation of the pre-processed water quality parameter data are calculated, and the threshold is dynamically adjusted according to the statistical characteristics. The formula is as follows:

[0039] ,

[0040] ,

[0041] ,

[0042] ,

[0043] in, Indicates the past The mean value within the time step, Indicates the past The standard deviation within a time step, Represents the coefficient corresponding to the warning threshold, represents a coefficient corresponding to a warning threshold, wherein the statistical characteristics include a mean value and a standard deviation;

[0044] Compare predicted values The corresponding threshold and , generate warning signal; no warning: , then there is no warning; low-level warning: , a low-level warning signal is triggered; a high-level warning: , a high-level warning signal is triggered.

[0045] The present invention also provides a water quality monitoring and early warning system, comprising:

[0046] Data acquisition and preprocessing unit: used to collect multi-dimensional water quality parameter data through multiple sets of sensors to obtain time series data, and preprocess the time series data to obtain preprocessed time series data;

[0047] Water quality parameter prediction unit: used to construct a multi-factor water quality prediction model, which includes a single factor prediction module, a feature fusion module, a Transformer encoder module and a prediction output module; the pre-processed time series data is passed through the single factor prediction module to obtain the predicted value of each water quality parameter at the current time step, and the predicted value of each water quality parameter at the current time step is fused with the pre-processed time series data to obtain a comprehensive feature vector, which is encoded through the Transformer encoder module to obtain the dynamic association and complex nonlinear relationship between the multi-dimensional water quality parameters, and then mapped through the prediction output module to obtain the predicted value of the multi-dimensional water quality parameters in the future time step;

[0048] Prediction result warning unit: used to construct a warning model based on multi-factor time series prediction results. The multi-dimensional water quality parameter prediction value is processed by the warning model based on multi-factor time series prediction results to generate a warning signal.

[0049] The advantages of the present invention are:

[0050] A water quality monitoring and early warning method of the present invention realizes accurate monitoring and prediction of water quality parameters by real-time collection of multi-dimensional water quality parameter data and efficient preprocessing, combined with LSTM and Transformer deep learning models. This method significantly improves the timeliness and coverage of monitoring, reduces the cost of relying on manual sampling, and through dynamic threshold adjustment and multi-level early warning mechanism, it can timely discover potential water pollution risks, enhance the scientific nature and response speed of water environment management. In addition, data denoising, missing value filling and standardized processing techniques are used to ensure data quality and accuracy of model prediction, and improve the overall reliability and stability of the system. In summary, the present invention not only optimizes the water quality monitoring process, but also provides intelligent early warning means, effectively guarantees the safety and stability of the water environment, and has broad application prospects and significant social benefits. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0052] Figure 1 is a flow chart of the method of the present invention;

[0053] Figure 2 It is a comparison chart of the predicted value and the measured value of ammonia nitrogen concentration of the present invention. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] Example 1

[0056] In this embodiment, Figure 1 As shown, the present invention provides a water quality monitoring and early warning method, the specific steps include:

[0057] S1. Data collection and preprocessing: collecting multidimensional water quality parameter data through multiple sets of sensors to obtain time series data, preprocessing the time series data to obtain preprocessed time series data;

[0058] S2. Water quality parameter prediction: construct a multi-factor water quality prediction model, which includes a single factor prediction module, a feature fusion module, a Transformer encoder module and a prediction output module; the pre-processed time series data is passed through the single factor prediction module to obtain the predicted value of each water quality parameter at the current time step, the predicted value of each water quality parameter at the current time step is fused with the pre-processed time series data to obtain a comprehensive feature vector, the comprehensive feature vector is encoded through the Transformer encoder module to obtain the dynamic association and complex nonlinear relationship between the multi-dimensional water quality parameters, and then mapped through the prediction output module to obtain the predicted value of the multi-dimensional water quality parameters in the future time step;

[0059] S3. Prediction result warning: construct a warning model based on the multi-factor time series prediction results, and the multi-dimensional water quality parameter prediction values ​​are processed by the warning model based on the multi-factor time series prediction results to generate a warning signal.

[0060] Specifically, data collection: multi-dimensional water quality parameter data is collected through multiple sets of sensors distributed in the water body, and the multi-dimensional water quality parameter data includes pH value , dissolved oxygen concentration , ammonia nitrogen , total phosphorus Chemical oxygen demand , the multiple groups of sensors are separated by time intervals Perform a data sampling to obtain time series data , the formula is as follows:

[0061] ,

[0062] in, represents the sampling time point of the time series, Represents the dimensionality of water quality parameter data.

[0063] Specifically, the time series data is preprocessed by using a linear interpolation method to The missing data in are filled to obtain complete time series data. The formula is as follows:

[0064] ,

[0065] in, Indicates the time point for filling No. The value of the parameter, ,When there are multiple consecutive missing points, the moving average method based on ,historical mean is used to fill them;

[0066] The complete time series data is denoised by wavelet transform to obtain denoised time series data, and the parameters in the denoised time series data are standardized to obtain preprocessed time series data. , the formula is as follows:

[0067] ,

[0068] = ,

[0069] in, represents the mean, represents the standard deviation, Represents the time point in the preprocessed time series data No. parameters, Represents the denoised time series data.

[0070] Specifically, the preprocessed time series data is passed through the single factor prediction module to obtain the predicted value of each water quality parameter at the current time step: the single factor prediction module adopts a single factor time series monitoring model based on the long short-term memory network LSTM; for each preprocessed water quality parameter data , establish an independent single-factor time series monitoring model based on long short-term memory network LSTM, and convert the past Historical data of water quality parameters at time steps Input into the single factor time series monitoring model based on long short-term memory network LSTM to obtain each pre-processed water quality parameter data The predicted value for the current time step ;

[0071] In the training process of the single-factor time series monitoring model based on the long short-term memory network LSTM, the predicted value is used With the true value The mean square error between is used as the loss function, and the calculation formula is as follows:

[0072] ,

[0073] in, represents the mean square error loss, Represents the total number of time steps of historical time series data used in the model training process; the back propagation algorithm combined with the adaptive optimization algorithm is used to iteratively update the parameters and bias items of the long short-term memory network LSTM.

[0074] Specifically, the predicted value of each water quality parameter at the current time step is fused with the preprocessed time series data to obtain a comprehensive feature vector:

[0075] The predicted value of each preprocessed water quality parameter data at the current time step With the preprocessed time series data Fusion to obtain a comprehensive feature vector , the formula is as follows:

[0076] .

[0077] Specifically, Transformer encoder module and prediction output module: the comprehensive feature vector After the Transformer encoder module, the fusion feature vector is fused using the multi-head self-attention mechanism. The encoded fusion feature vector is obtained, and the encoded fusion feature vector is passed through the prediction output module and the mapping operation of the fully connected layer to obtain the predicted value of the water quality parameter in the future time step. .

[0078] Specifically, the training process of the multi-factor water quality prediction model includes: using mean square error to train the multi-factor water quality prediction model, and the formula is as follows:

[0079] ,

[0080] in, Represents the true value of the preprocessed multidimensional water quality parameter data, Represents the predicted values ​​of multidimensional water quality parameters at future time steps;

[0081] The Adam optimizer is used to iteratively update the parameters of the multi-factor water quality prediction model and all bias items; the Dropout layer and L2 regularization technology are introduced to prevent model overfitting.

[0082] Specifically, the early warning model comprehensively utilizes the output of the single-factor time series monitoring model and the multi-factor water quality prediction model, and realizes real-time monitoring and early warning of water quality parameters by setting reasonable thresholds and early warning rules. The design of the early warning model aims to improve the response speed and accuracy of the water quality monitoring system and ensure the safety and stability of the water environment. The steps are as follows:

[0083] Get the predicted values ​​of water quality parameters at future time steps output by the multi-factor water quality prediction model ;

[0084] Set an early warning threshold for each water quality parameter data , including warning thresholds and warning thresholds , using dynamic threshold adjustment method to dynamically adjust the warning threshold according to real-time data and model prediction results and warning thresholds ,in the past In each time step, the mean and standard deviation of the pre-processed water quality parameter data are calculated, and the threshold is dynamically adjusted according to the statistical characteristics. The formula is as follows:

[0085] ,

[0086] ,

[0087] ,

[0088] ,

[0089] in, Indicates the past The mean value within the time step, Indicates the past The standard deviation within a time step, Represents the coefficient corresponding to the warning threshold, represents a coefficient corresponding to a warning threshold, wherein the statistical characteristics include a mean value and a standard deviation;

[0090] Compare predicted values The corresponding threshold and , generate warning signal; no warning: , then there is no warning; low-level warning: , a low-level warning signal is triggered; a high-level warning: , a high-level warning signal is triggered.

[0091] Specifically, formulate multi-level warning rules:

[0092] No warning: No action required, continue to monitor water quality changes.

[0093] Low-level warning: Issue a preliminary warning signal to remind relevant personnel to pay attention and strengthen monitoring.

[0094] High-level warning: A high-level warning signal is issued to notify relevant departments to take emergency measures to prevent further deterioration of water pollution.

[0095] Example 2

[0096] In this embodiment, in order to verify the effectiveness of the water quality monitoring and early warning method of the present invention, a series of comparative experiments were designed. The experiment constructed a water quality monitoring data set and compared it with the traditional manual sampling method and other mainstream time series prediction models (such as ARIMA model and basic LSTM model). The experiment comprehensively analyzed the advantages of the method of the present invention by evaluating the performance of each method in indicators such as prediction accuracy (mean square error MSE), monitoring timeliness (data processing time), and early warning accuracy (ratio of correct warning times to total warning times).

[0097] Table 1 Comparison of experimental data between the method of the present invention and the existing method

[0098]

[0099] As can be seen from Table 1, compared with the traditional manual sampling method, the method of the present invention has greatly improved in various evaluation indicators; compared with the ARIMA model, the method of the present invention is insufficient in data processing time, but the warning accuracy is much higher than the ARIMA model, and the mean square error is also lower than the ARIMA model; compared with the basic LSTM model, the method of the present invention is better than the basic LSTM model in three evaluation indicators. The experimental results show that the deep learning model based on the combination of LSTM and Transformer of the present invention is better than the traditional method and other models in various indicators, which verifies the efficiency and reliability of the method of the present invention in water quality monitoring and early warning.

[0100] like Figure 2 As shown in the figure, it is a curve chart of predicted value and measured value of ammonia nitrogen concentration in sewage predicted by the method of the present invention. The vertical axis represents ammonia nitrogen concentration and the horizontal axis represents time. It can be seen from the figure that the method of the present invention can predict the predicted value of ammonia nitrogen concentration in the future time according to the current ammonia nitrogen concentration in sewage, and the predicted value is relatively close to the measured value, which proves the effectiveness of the method of the present invention.

[0101] Example 3

[0102] This embodiment provides a water quality monitoring and early warning system, including:

[0103] Data acquisition and preprocessing unit: used to collect multi-dimensional water quality parameter data through multiple sets of sensors to obtain time series data, and preprocess the time series data to obtain preprocessed time series data;

[0104] Water quality parameter prediction unit: used to construct a multi-factor water quality prediction model, which includes a single factor prediction module, a feature fusion module, a Transformer encoder module and a prediction output module; the pre-processed time series data is passed through the single factor prediction module to obtain the predicted value of each water quality parameter at the current time step, and the predicted value of each water quality parameter at the current time step is fused with the pre-processed time series data to obtain a comprehensive feature vector, which is encoded through the Transformer encoder module to obtain the dynamic association and complex nonlinear relationship between the multi-dimensional water quality parameters, and then mapped through the prediction output module to obtain the predicted value of the multi-dimensional water quality parameters in the future time step;

[0105] Prediction result warning unit: used to construct a warning model based on multi-factor time series prediction results. The multi-dimensional water quality parameter prediction value is processed by the warning model based on multi-factor time series prediction results to generate a warning signal.

[0106] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A water quality monitoring and early warning method, characterized in that: The following steps are involved: S1. Data collection and preprocessing: Collect multi-dimensional water quality parameter data through multiple sets of sensors to obtain time series data , preprocess the time series data to obtain preprocessed time series data ; S2. Water quality parameter prediction: construct a multi-factor water quality prediction model, which includes a single factor prediction module, a feature fusion module, a Transformer encoder module and a prediction output module; the pre-processed time series data is passed through the single factor prediction module to obtain the predicted value of each water quality parameter at the current time step, the predicted value of each water quality parameter at the current time step is fused with the pre-processed time series data to obtain a comprehensive feature vector, the comprehensive feature vector is encoded through the Transformer encoder module to obtain the dynamic association and complex nonlinear relationship between the multi-dimensional water quality parameters, and then mapped through the prediction output module to obtain the predicted value of the multi-dimensional water quality parameters in the future time step; The specific process is as follows: The single factor prediction module adopts a single factor time series monitoring model based on long short-term memory network LSTM; for each pre-processed water quality parameter data , establish an independent single-factor time series monitoring model based on long short-term memory network LSTM, and convert the past Historical data of water quality parameters at time steps Input into the single-factor time series monitoring model based on the long short-term memory network LSTM to obtain each pre-processed water quality parameter data The predicted value for the current time step ; In the training process of the single-factor time series monitoring model based on the long short-term memory network LSTM, the predicted value is used With the true value The mean square error between is used as the loss function, and the calculation formula is as follows: , in, represents the mean square error loss, Indicates the total number of time steps of the historical time series data used in the model training process; the back propagation algorithm combined with the adaptive optimization algorithm is used to iteratively update the parameters and bias items of the long short-term memory network LSTM; The predicted value of each preprocessed water quality parameter data at the current time step With the preprocessed time series data Fusion to obtain a comprehensive feature vector , the formula is as follows: ; The comprehensive feature vector After the Transformer encoder module, the fusion feature vector is fused using the multi-head self-attention mechanism. The encoded fusion feature vector is obtained, and the encoded fusion feature vector is passed through the prediction output module and the mapping operation of the fully connected layer to obtain the predicted value of the water quality parameter in the future time step. ; The mean square error is used to train the multi-factor water quality prediction model, and the formula is as follows: , in, Represents the true value of the preprocessed multidimensional water quality parameter data, Represents the predicted values ​​of multidimensional water quality parameters at future time steps; The Adam optimizer is used to iteratively update the parameters of the multi-factor water quality prediction model and all bias items; the Dropout layer and L2 regularization technology are introduced to prevent the model from overfitting; S3. Prediction result warning: constructing a warning model based on the multi-factor time series prediction results, wherein the multi-dimensional water quality parameter prediction values ​​are processed by the warning model based on the multi-factor time series prediction results to generate a warning signal; The specific process is as follows: Obtain the predicted values ​​of multidimensional water quality parameters at future time steps output by the multi-factor water quality prediction model ; Set an early warning threshold for each water quality parameter data , including warning thresholds and warning thresholds , using dynamic threshold adjustment method to dynamically adjust the warning threshold according to real-time data and model prediction results and warning thresholds ,in the past In each time step, the mean and standard deviation of the pre-processed water quality parameter data are calculated, and the threshold is dynamically adjusted according to the statistical characteristics. The formula is as follows: , , , , in, Indicates the past The mean value within the time step, Indicates the past The standard deviation within a time step, Represents the coefficient corresponding to the warning threshold, represents a coefficient corresponding to a warning threshold, wherein the statistical characteristics include a mean value and a standard deviation; Compare predicted values The corresponding threshold and , generate warning signal; no warning: , then there is no warning; low-level warning: , a low-level warning signal is triggered; a high-level warning: , a high-level warning signal is triggered.

2. A water quality monitoring and early warning method according to claim 1, characterized in that: The data collection in step S1 specifically includes: Multi-dimensional water quality parameter data including pH value is collected by multiple sets of sensors distributed in the water body. , dissolved oxygen concentration , ammonia nitrogen , total phosphorus Chemical oxygen demand , the multiple groups of sensors are separated by time intervals Perform a data sampling to obtain time series data , the formula is as follows: , in, represents the sampling time point of the time series, Represents the dimensionality of water quality parameter data.

3. A water quality monitoring and early warning method according to claim 2, characterized in that: The preprocessing of the time series data in step S1 specifically includes: The collected time series data are interpolated by linear interpolation method. The missing data in are filled to obtain complete time series data. The formula is as follows: , in, Indicates the time point for filling No. The value of the parameter, ,When there are multiple consecutive missing points, the moving average method based on the ,historical mean is used to fill them; The complete time series data is denoised by wavelet transform to obtain denoised time series data, and the parameters in the denoised time series data are standardized to obtain preprocessed time series data. , the formula is as follows: , = , in, represents the mean, represents the standard deviation, Represents the time point in the preprocessed time series data No. parameters, Represents the denoised time series data.

4. A system using the water quality monitoring and early warning method according to claim 1, characterized in that: include: Data acquisition and preprocessing unit: used to collect multi-dimensional water quality parameter data through multiple sets of sensors to obtain time series data, and preprocess the time series data to obtain preprocessed time series data; Water quality parameter prediction unit: used to construct a multi-factor water quality prediction model, which includes a single factor prediction module, a feature fusion module, a Transformer encoder module and a prediction output module; the pre-processed time series data is passed through the single factor prediction module to obtain the predicted value of each water quality parameter at the current time step, and the predicted value of each water quality parameter at the current time step is fused with the pre-processed time series data to obtain a comprehensive feature vector, which is encoded through the Transformer encoder module to obtain the dynamic association and complex nonlinear relationship between the multi-dimensional water quality parameters, and then mapped through the prediction output module to obtain the predicted value of the multi-dimensional water quality parameters in the future time step; Prediction result warning unit: used to construct a warning model based on multi-factor time series prediction results. The multi-dimensional water quality parameter prediction value is processed by the warning model based on multi-factor time series prediction results to generate a warning signal.

Citation Information

Patent Citations

  • Water quality index prediction method based on hybrid long-short-term memory neural network

    CN110852515A

  • Water quality and water quantity early warning method based on deep learning

    CN116502758A