Water quality monitoring and early warning method, system, medium and equipment

By embedding GRU units in the Kalman filter algorithm and combining it with a deep learning model, the assumption dependence and nonlinear applicability problems of water quality prediction in existing technologies are solved, and high-precision water quality prediction and early warning are achieved.

CN119721490BActive Publication Date: 2025-09-12SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411916476.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-09-12
Estimated Expiration
2044-12-24

AI Technical Summary

Technical Problem

Existing water quality prediction methods rely on the Kalman filter algorithm, which requires rough approximate assumptions and a large number of experiments, and are not applicable to nonlinear systems, resulting in low prediction accuracy.

Method used

The GRU unit is embedded in the Kalman filter algorithm to replace the covariance matrix in the traditional Kalman filter. The deep learning model is combined to predict and optimize water quality indicators, and the GRU-KF algorithm is used to process nonlinear systems.

Benefits of technology

It improves the accuracy of water quality prediction, reduces the reliance on covariance matrix assumptions, is applicable to a variety of ecological and environmental scenarios, and provides high-precision water quality early warning and trend analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119721490B_ABST
    Figure CN119721490B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of water quality monitoring and provides a water quality monitoring and early warning method, system, medium, and device. The method comprises: using a deep learning model to predict water quality indicators at each moment in a future period based on water quality indicators for a current period; optimizing the water quality indicators for the future period predicted by the deep learning model using a Kalman filter algorithm embedded in a gated recurrent unit to update the water quality indicators for each moment in the future period; the Kalman filter algorithm embedded in the gated recurrent unit includes three gated recurrent units, which respectively replace the state transition matrix, process noise matrix, and measurement noise matrix in the Kalman filter; and performing single-factor water quality evaluation, comprehensive pollution index evaluation, and water quality indicator change trend analysis based on the updated water quality indicators for the future period, and issuing an early warning. This method can overcome the deficiency of the standard Kalman filter algorithm, which is only applicable to linear systems, and improve the accuracy of water quality prediction for nonlinear systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] Water quality directly reflects the health of aquatic ecosystems, including rivers, lakes, estuaries, and oceans, and is crucial for environmental stability, human production, and drinking water resources. With climate change and intensified human activities, deteriorating water quality has led to numerous disasters and adverse events, garnering widespread public attention. The United Nations 2030 Sustainable Development Goals emphasize the need to protect water bodies and maintain water quality. Therefore, water quality monitoring and prediction models can provide more timely and accurate insights into changes in aquatic ecosystems, particularly in areas where monitoring capacity is limited.

[0004] Water quality monitoring encompasses a wide range of indicators, including physical parameters (e.g., water temperature, turbidity), chemical parameters (e.g., pH, dissolved oxygen, total nitrogen, total phosphorus, ammonia nitrogen, chemical oxygen demand), biological indicators, heavy metals, and petroleum residues. Furthermore, water quality monitoring is required in diverse ecological settings, including rivers, lakes, reservoirs, estuaries, coastal waters, and oceans, and the monitoring indicators of interest vary across these settings. Given the diversity of these indicators and the complexity of various ecosystems, achieving high-frequency and high-precision measurements is both expensive and challenging. Therefore, water quality prediction can provide critical support for water resource monitoring and management, including pollution early warning.

[0005] In recent years, with the development of artificial intelligence (AI) technology, the use of machine learning or deep learning models, such as convolutional neural networks (CNNs) and long short-term memory (LSTM) neural networks, has become a popular approach for water quality prediction. The Kalman filter algorithm improves prediction accuracy through data assimilation. Existing prediction work optimizes the prediction results of deep learning models through Kalman filters to achieve improved accuracy.

[0006] However, this type of method has certain limitations. First, this type of method usually requires assumptions about several covariance matrices in the Kalman filter, which is a rough approximation of the actual situation, will cause certain errors and often requires a large number of experiments to obtain a relatively accurate assumption; at the same time, since the standard Kalman filter algorithm is a linear algorithm, it has certain limitations for nonlinear models. Summary of the Invention

[0007] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a water quality monitoring and early warning method, system, medium and equipment. By embedding the GRU unit into the Kalman filter assimilation algorithm, the three covariance matrices in the previous Kalman filter algorithm are replaced, so that there is no need for rough approximation assumptions, continuous attempts and manual updates. In addition, the GRU-KF can make up for the deficiency that the standard Kalman filter algorithm is only applicable to linear systems, thereby improving the accuracy of water quality prediction of nonlinear systems.

[0008] In order to achieve the above object, the present invention adopts the following technical solutions:

[0009] A first aspect of the present invention provides a water quality monitoring and early warning method, comprising:

[0010] Get the water quality indicators for several consecutive moments in the current period;

[0011] Based on the water quality indicators of the current period, a deep learning model is used to predict the water quality indicators at each moment in the future period;

[0012] Based on the water quality indicators of the future time period predicted by the deep learning model, a Kalman filter algorithm embedded in a gated recurrent unit is used to optimize and update the water quality indicators at each moment in the future time period; the Kalman filter algorithm embedded in the gated recurrent unit sets three gated recurrent units to replace the state transition matrix, process noise matrix and measurement noise matrix in the Kalman filter respectively;

[0013] Based on the updated water quality indicators for future periods, single factor evaluation of water quality, comprehensive pollution index evaluation and trend analysis of water quality indicator changes are carried out, and early warnings are issued.

[0014] Furthermore, the water quality indicators are hydrogen ion concentration index, total nitrogen, total phosphorus, dissolved oxygen, conductivity, ammonia nitrogen, turbidity, permanganate index and / or water temperature.

[0015] Furthermore, in the Kalman filter algorithm embedded in the gated loop unit, the input of the first gated loop unit is the predicted value of the water quality index at the previous moment, the first gated loop unit generates a current state as the input of the second gated loop unit, the second gated loop unit generates a process covariance, the water quality index at the current moment predicted by the deep learning model is input into the third gated loop unit to generate a measurement covariance, the current state, the water quality index at the current moment predicted by the deep learning model, the process covariance and the measurement covariance enter the Kalman filter algorithm to update the predicted value of the water quality index at the current moment.

[0016] Furthermore, the single factor evaluation of water quality is as follows: Calculate the excess multiples ,in, C i is the predicted value of the i-th water quality index,S i is the evaluation standard value of the i-th water quality index; when P i When the value is >1, a water quality index exceeding the standard signal is issued and the exceeding multiple is output.

[0017] Furthermore, the comprehensive pollution index evaluation is as follows: calculating the comprehensive pollution index ,in, is the excess multiple of the i-th water quality index, m is the number of water quality indexes; when P <0.7, no warning signal is generated; when 0.7 ≤ P <1, a potential pollution signal is issued in combination with the water quality single factor evaluation results; when 1 ≤ P <2, a water pollution warning signal will be issued; when P When the level is ≥ 2, a serious pollution warning signal will be issued.

[0018] Furthermore, the water quality index change trend analysis is as follows: if the water quality index sequence at each moment in the updated future period is X={ }, n is the number of moments in the future period, calculate the trend change of water quality concentration ; ; ; ;when Z MK >0 When the concentration increases, an early warning signal is issued; when Z MK = 0 , no warning signal is generated; when Z MK <0 , no warning signal is generated.

[0019] A second aspect of the present invention provides a water quality monitoring and early warning system, comprising:

[0020] A water quality data acquisition module is configured to: acquire water quality indicators at a number of consecutive moments in a current period;

[0021] The deep learning-based water quality prediction module is configured to: use a deep learning model to predict water quality indicators at each moment in the future time period based on the water quality indicators of the current time period;

[0022] A data assimilation module is configured to optimize the water quality indicators for future time periods predicted by the deep learning model using a Kalman filter algorithm embedded in a gated recurrent unit to update the water quality indicators for each moment in the future time period; the Kalman filter algorithm embedded in the gated recurrent unit has three gated recurrent units that replace the state transition matrix, process noise matrix, and measurement noise matrix in the Kalman filter, respectively;

[0023] The water pollution early warning module is configured to: conduct water quality single factor evaluation, comprehensive pollution index evaluation and water quality index change trend analysis based on updated water quality indicators for future time periods, and issue early warnings.

[0024] Furthermore, the water quality indicators are hydrogen ion concentration index, total nitrogen, total phosphorus, dissolved oxygen, conductivity, ammonia nitrogen, turbidity, permanganate index and / or water temperature.

[0025] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the water quality monitoring and early warning method as described above.

[0026] The fourth aspect of the present invention provides a computer device, including a computer-readable storage medium, a processor, and a computer program stored on the computer-readable storage medium and executable on the processor, wherein when the processor executes the program, the steps in a water quality monitoring and early warning method as described above are implemented.

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

[0028] The present invention replaces the three covariance matrices in the previous Kalman filter algorithm by embedding the GRU unit into the Kalman filter assimilation algorithm, so that it does not need to make rough approximation assumptions, continuous attempts and manual updates. In addition, the GRU-KF can make up for the deficiency that the standard Kalman filter algorithm is only applicable to linear systems, and improve the accuracy of water quality prediction for nonlinear systems.

[0029] The present invention performs data assimilation between the deep learning model and the GRU-KF algorithm, effectively improving the water quality prediction accuracy of the deep learning model to obtain high-precision water quality prediction results, and performs water quality evaluation and trend analysis on the prediction results to form a water pollution early warning. It can be applied to a variety of water quality indicators and can also be applied to different ecological and environmental scenarios such as rivers, lakes, estuaries, and oceans. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0031] Figure 1 Schematic diagram of a single GRU-KF structure according to the first embodiment of the present invention;

[0032] Figure 2 Schematic diagram of the GRU-KF algorithm according to the first embodiment of the present invention;

[0033] Figure 3This is a flow chart of a water quality monitoring and early warning method according to the first embodiment of the present invention;

[0034] Figure 4 It is a structural diagram of a computer device according to the fourth embodiment of the present invention. DETAILED DESCRIPTION

[0035] To make the objectives, technical solutions and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0036] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.

[0037] Example 1

[0038] This embodiment provides a water quality monitoring and early warning method.

[0039] This embodiment provides a water quality monitoring and early warning method, which embeds a gated recurrent unit (GRU) into a Kalman filter assimilation algorithm (KF) to implement a water quality monitoring and early warning method (GRU-KF). The GRU unit replaces the three covariance matrices in the Kalman filter assimilation algorithm, and the GRU unit is trained to replace a large number of experiments to assume the pattern of the covariance matrix. In this way, the Kalman filter is continuously updated over time (data input), eliminating the need for rough approximate assumptions, continuous attempts, and manual updates. The improved GRU-KF can make up for the deficiency of the standard Kalman filter algorithm that is only applicable to linear systems due to the GRU's ability to process nonlinear data. Therefore, it can be used for water quality prediction of nonlinear systems.

[0040] This embodiment provides a water quality monitoring and early warning method, such as Figure 3 As shown, the following steps are included:

[0041] Step 1: Collect daily monitoring data (including pH, total nitrogen, total phosphorus, dissolved oxygen, conductivity, ammonia nitrogen, turbidity, permanganate index, water temperature, etc.) from multiple water quality monitoring sections in a study area (e.g., rivers, lakes, estuaries, oceans, etc.), and preprocess the historical monitoring data through interpolation, missing value filling, normalization, etc.

[0042] Step 2: Based on historical monitoring data, use a deep learning model (such as convolutional neural network (CNN), recurrent neural network (RNN), long short-term memory (LSTM) neural network) to build a water quality index prediction model and output the basic prediction data for a period of time ( Y base ).

[0043] Step 3: Divide the basic prediction data (time series prediction value) in step 2 and the corresponding observation data into training set and test set in a ratio of 7:3, and input them into GRU-KF for training and testing.

[0044] Step 4: Construct GRU-KF (GRU embedded in KF algorithm), perform GRU-KF training and testing, and output the result accuracy evaluation.

[0045] The standard Kalman filter algorithm formula is as follows:

[0046] Prediction stage: ; ;

[0047] Update phase: ; ; .

[0048] Where A is the state transition matrix, Q is the process noise matrix, and R is the measurement noise matrix. is the estimated noise covariance, is the Kalman gain; H is the mapping matrix, which is set to the unit matrix I in this embodiment. It can be understood that all the results predicted at time t enter the time t+1; is the noise covariance at time t after the update; represents the predicted water quality index at time t; represents the observation value at time t.

[0049] In this embodiment, three GRU units GRU are set in the GRU-KF algorithm. f , GRU Q and GRU R , respectively replace the state transition matrix (A), process noise matrix (Q) and measurement noise matrix (R) in the Kalman filter. The structural diagram of the three GRUs embedded in the Kalman filter is as follows: Figure 1 shown.

[0050] The GRU-KF algorithm after embedding GRU into the Kalman filter algorithm is as follows: Figure 2 As shown, the first gated recurrent unit GRU f The input is the water quality index prediction value of the previous moment, and generates a current state As the second gated recurrent unit GRU Q Input, second gated recurrent unit GRU Q The process covariance is generated ; In addition, the water quality index observation value at the current moment (The water quality index at the current moment predicted by the deep learning model) is input to the third gated recurrent unit GRU R , which produces a measurement covariance ;final, 、 、 and Enter the Kalman filter algorithm to obtain the final water quality index prediction value at time t The formula is as follows:

[0051] During the forecasting phase: ; ;in, Represents GRU f , yes The Jacobian form of It is GRU Q Output of GRU Q GRU f The output of is the input;

[0052] During the update phase: ; ; .in, It is GRU R Input, is the observed value at time t; is the Kalman gain; GRU R Take observations as input.

[0053] Three GRU units GRU f , GRU Q and GRU R The structural parameter settings of GRU are different. f It consists of two GRU layers with 200 hidden units, a random dropout (Dropout) of 0.1, and a fully connected layer. Q and GRU R They are composed of a 50 hidden unit and a fully connected layer, and the activation function is the linear rectification function (ReLU).

[0054] The output of the deep learning model in step 2 ( Y base ) as the observation input of GRU-KF algorithm Z={ }, the output of the GRU-KF algorithm is the predicted value Y={ }.

[0055] The first 70% of the data was used as the training set. The GRU-KF loss function was RMSE, and the learning rate was 0.01. Through training, each GRU module replaced the three matrices in the standard Kalman filter algorithm, avoiding the tedious process of rough estimation, trial and error, and manual adjustment. It also learned the hidden patterns in the monitoring data, which helped improve accuracy.

[0056] After training, the last 30% of the data is used as a test set to evaluate the final prediction accuracy.

[0057] Step 5: Use the trained deep learning model and GRU-KF to predict water quality and provide warnings for water quality exceeding standards, pollution, and concentration increase trends (trend change warning analysis).

[0058] Step 401: Acquire monitoring data for a number of consecutive moments in the current period (eg, moments 1 to t on November 10).

[0059] The monitoring data can be water quality indicators such as pH, total nitrogen, total phosphorus, dissolved oxygen, conductivity, ammonia nitrogen, turbidity, permanganate index, water temperature, etc. at a water quality monitoring section in a certain study area.

[0060] Step 402: Based on the monitoring data of several consecutive moments in the current period, the trained deep learning model is used to predict the water quality index ( Y base ).

[0061] Step 403: Output of the deep learning model ( Y base ) as the observation input of GRU-KF algorithm Z={ }, optimize the water quality index of the future period predicted by the deep learning model, and update the water quality index of the future period Y={ }.

[0062] Step 403: Output the water quality prediction at time t in the future period. C t ( C (1)t , C (2)t …C (n)t ) to conduct single factor evaluation and comprehensive pollution index evaluation, among which, C (i)tIt represents the predicted value of the i-th water quality index at time t in the future period output by the GRU-KF algorithm.

[0063] Based on the single factor evaluation and comprehensive pollution index calculation method, the water quality is evaluated for the predicted value output at each moment, and the exceeding standard threshold and alarm threshold are set according to the degree of pollution to issue an early warning for potential pollution.

[0064] The calculation method of single factor evaluation is as follows: ;in, C i is the predicted concentration of pollutants, that is, the predicted value of the i-th water quality index; S i is the evaluation standard value of the i-th water quality index. Here, several types of evaluation standard values ​​are set according to different scenarios and water quality management goals. P i >1, that is, when the water quality index exceeds the standard limit, an index exceeding the standard signal will be issued and the exceeding multiple will be output ( P i The value is the multiple of the excess standard).

[0065] The evaluation method of the comprehensive pollution index is as follows: ,in, P is the comprehensive pollution index. P The value can determine the comprehensive level of the water body, that is, the degree of pollution of the water body. P <0.7, it will show that the overall water quality is good and no warning signal will be generated; when 0.7 ≤ P <1, the water quality is potentially polluted, and a potential pollution signal is issued in combination with the single factor evaluation results; when 1 ≤ P <2, the predicted values ​​of several water quality indicators exceed the standard, and a water pollution warning signal is issued; P When it is ≥ 2, that is, the predicted values ​​of a large number of indicators exceed the standard limit and some indicators exceed the verification, a serious pollution warning signal is issued.

[0066] Step 404: In addition to the pollution warning for the predicted concentration at time t, a warning for the indicator concentration change trend is also set for the prediction results in a future time period.

[0067] A trend analysis is performed on the predicted values ​​output for a period of time. If an increasing concentration trend is shown, a corresponding concentration increase warning signal will be generated.

[0068] Let the time series of a water quality index be X={ }, the water quality concentration trend change calculation formula is as follows: ; ; ; .

[0069] when Z MK >0 When , it means that the predicted concentration of water quality indicators in this period has an upward trend, and an early warning signal of concentration increase will be issued; when Z MK = 0 , which means that there is no obvious change trend in the concentration during this period and no warning signal is generated; when Z MK < 0 , which means that the predicted concentration will decrease during this time period and no warning signal will be generated. The length of time X can be set according to the user's needs.

[0070] In this embodiment, deep learning models such as LSTM are used to assimilate data with the GRU-KF algorithm to effectively improve the water quality prediction accuracy of LSTM, obtain high-precision water quality prediction results, and perform water quality evaluation and trend analysis on the prediction results to form a water pollution warning. It can be applied to a variety of water quality indicators and can also be applied to different ecological and environmental scenarios such as rivers, lakes, estuaries, and oceans.

[0071] This embodiment provides a water quality monitoring and early warning method, which replaces the three covariance matrices in the previous Kalman filter algorithm by embedding the GRU unit into the Kalman filter assimilation algorithm, so that it does not need to make rough approximation assumptions and continuous attempts and manual updates. In addition, the GRU-KF can make up for the deficiency that the standard Kalman filter algorithm is only applicable to linear systems.

[0072] This embodiment provides a water quality monitoring and early warning method that can improve prediction accuracy by integrating a deep learning algorithm with a GRU-KF, thereby better providing data and technical support for water quality prediction and pollution early warning services of ecological and environmental management departments.

[0073] Example 2

[0074] This embodiment provides a water quality monitoring and early warning system, which specifically includes:

[0075] A water quality data acquisition module is configured to: acquire water quality indicators at a number of consecutive moments in a current period;

[0076] The deep learning-based water quality prediction module is configured to: use a deep learning model to predict water quality indicators at each moment in the future time period based on the water quality indicators of the current time period;

[0077] A data assimilation module is configured to optimize the water quality indicators for future time periods predicted by the deep learning model using a Kalman filter algorithm embedded in a gated recurrent unit to update the water quality indicators for each moment in the future time period; the Kalman filter algorithm embedded in the gated recurrent unit has three gated recurrent units that replace the state transition matrix, process noise matrix, and measurement noise matrix in the Kalman filter, respectively;

[0078] The water pollution early warning module is configured to: conduct water quality single factor evaluation, comprehensive pollution index evaluation and water quality index change trend analysis based on updated water quality indicators for future time periods, and issue early warnings.

[0079] It should be noted here that the various modules in this embodiment correspond one-to-one to the various steps in Example 1, and the specific implementation processes are the same, which will not be repeated here.

[0080] Example 3

[0081] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the water quality monitoring and early warning method described in the first embodiment are implemented.

[0082] Example 4

[0083] This embodiment provides a computer device, such as Figure 4 As shown, the system includes a computer-readable storage medium 1003, a processor 1001, a communication interface 1002, and a computer program stored on the computer-readable storage medium 1003 and executable on the processor 1001. The processor 1001, the communication interface 1002, and the computer-readable storage medium 1003 may be connected via a bus or other means. The communication interface 1002 is configured to receive and transmit data, and when the processor 1001 executes the program, the steps of the water quality monitoring and early warning method described in the first embodiment are implemented.

[0084] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A water quality monitoring and early warning method, characterized in that: include: Get the water quality indicators for several consecutive moments in the current period; Based on the water quality indicators of the current period, a deep learning model is used to predict the water quality indicators at each moment in the future period; Based on the water quality indicators of the future time period predicted by the deep learning model, a Kalman filter algorithm embedded in a gated recurrent unit is used to optimize and update the water quality indicators at each moment in the future time period; the Kalman filter algorithm embedded in the gated recurrent unit sets three gated recurrent units to replace the state transition matrix, process noise matrix and measurement noise matrix in the Kalman filter respectively; Based on updated water quality indicators for future periods, conduct water quality single factor evaluation, comprehensive pollution index evaluation, and water quality indicator change trend analysis, and issue early warnings; In the Kalman filter algorithm embedded in the gated loop unit, the input of the first gated loop unit is the predicted value of the water quality index at the previous moment, the first gated loop unit generates a current state as the input of the second gated loop unit, the second gated loop unit generates a process covariance, the water quality index at the current moment predicted by the deep learning model is input into the third gated loop unit to generate a measurement covariance, the current state, the water quality index at the current moment predicted by the deep learning model, the process covariance and the measurement covariance enter the Kalman filter algorithm to update the predicted value of the water quality index at the current moment.

2. A water quality monitoring and early warning method according to claim 1, characterized in that: The water quality indicators include hydrogen ion concentration index, total nitrogen, total phosphorus, dissolved oxygen, conductivity, ammonia nitrogen, turbidity, permanganate index and / or water temperature.

3. A water quality monitoring and early warning method according to claim 1, characterized in that: The single factor evaluation of water quality is as follows: Calculate the excess multiples ,in, C i is the predicted value of the i-th water quality index, S i is the evaluation standard value of the i-th water quality index; when P i When the value is >1, a water quality index exceeding the standard signal is issued and the exceeding multiple is output.

4. A water quality monitoring and early warning method according to claim 1, characterized in that: The comprehensive pollution index evaluation is as follows: Calculate the comprehensive pollution index ,in, is the excess multiple of the i-th water quality index, m is the number of water quality indexes; when P < 0.7, no warning signal is generated; when 0.7 ≤ P <1, a potential pollution signal is issued in combination with the water quality single factor evaluation results; when 1 ≤ P <2, a water pollution warning signal will be issued; when P When the level is ≥ 2, a serious pollution warning signal will be issued.

5. A water quality monitoring and early warning method according to claim 1, characterized in that: The water quality index change trend analysis is as follows: if the water quality index sequence at each moment in the updated future period is X={ }, n is the number of moments in the future period, calculate the trend change of water quality concentration ; ; ; ;when Z MK > 0 When the concentration increases, an early warning signal is issued; when Z MK = 0 , no warning signal is generated; when Z MK < 0 , no warning signal is generated.

6. A water quality monitoring and early warning system, characterized in that: include: A water quality data acquisition module is configured to: acquire water quality indicators at a number of consecutive moments in a current period; The deep learning-based water quality prediction module is configured to: use a deep learning model to predict water quality indicators at each moment in the future time period based on the water quality indicators of the current time period; A data assimilation module is configured to optimize the water quality indicators for future time periods predicted by the deep learning model using a Kalman filter algorithm embedded in a gated recurrent unit to update the water quality indicators for each moment in the future time period; the Kalman filter algorithm embedded in the gated recurrent unit has three gated recurrent units that replace the state transition matrix, process noise matrix, and measurement noise matrix in the Kalman filter, respectively; A water pollution early warning module is configured to: perform single-factor water quality evaluation, comprehensive pollution index evaluation, and water quality index change trend analysis based on updated future water quality indicators, and issue early warnings; In the Kalman filter algorithm embedded in the gated loop unit, the input of the first gated loop unit is the predicted value of the water quality index at the previous moment, the first gated loop unit generates a current state as the input of the second gated loop unit, the second gated loop unit generates a process covariance, the water quality index at the current moment predicted by the deep learning model is input into the third gated loop unit to generate a measurement covariance, the current state, the water quality index at the current moment predicted by the deep learning model, the process covariance and the measurement covariance enter the Kalman filter algorithm to update the predicted value of the water quality index at the current moment.

7. A water quality monitoring and early warning system according to claim 6, characterized in that: The water quality indicators include hydrogen ion concentration index, total nitrogen, total phosphorus, dissolved oxygen, conductivity, ammonia nitrogen, turbidity, permanganate index and / or water temperature.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of a water quality monitoring and early warning method as described in any one of claims 1 to 5 are implemented.

9. A computer device comprising a computer-readable storage medium, a processor, and a computer program stored on the computer-readable storage medium and executable on the processor, wherein: When the processor executes the program, the steps of the water quality monitoring and early warning method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Stock price prediction method of gated cycle unit neural network based on Kalman filtering

    CN111210089A

  • Photovoltaic generating capacity combined prediction method based on ACO-KF-GRU-EC

    CN115470992A