A Water Quality Monitoring and Prediction Method and System Based on Multi-Factor Correlation Analysis

By using multi-factor association analysis and conditional generative adversarial networks, the problem of underutilization of indicator correlation information in water quality monitoring was solved, achieving accuracy and timeliness in water quality prediction and ensuring the safety of the water environment.

CN120930934BActive Publication Date: 2026-01-30山东省菏泽生态环境监测中心
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511073753.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-01
Publication Date
2026-01-30
Estimated Expiration
2045-08-01

AI Technical Summary

Technical Problem

Existing water quality monitoring and prediction technologies have failed to fully explore and utilize the deep-seated, cross-timescale correlations between water quality indicators, resulting in insufficient ability of models to capture the evolution patterns of water quality and failure to distinguish the characteristics of indicators, leading to inaccurate prediction results.

Method used

Water quality evaluation indicators were determined through multi-factor correlation analysis. Data were collected and preprocessed, and the comprehensive correlation between indicators was calculated. The indicators were classified into single-factor, multi-factor, and isolated indicators. Different data support sets were constructed, and conditional generative adversarial networks were used for prediction. Prediction models for single-factor, multi-factor, and isolated indicators were constructed respectively.

Benefits of technology

It improves the accuracy and efficiency of water quality monitoring and forecasting, enabling timely early warning and ensuring water environment safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120930934B_ABST
    Figure CN120930934B_ABST
Patent Text Reader

Abstract

This invention relates to the field of water quality monitoring technology, and in particular to a water quality monitoring and prediction method and system based on multi-factor correlation analysis. The method includes the following steps: determining water quality evaluation indicators and collecting water quality evaluation indicator data for water bodies in a monitored watershed, thereby evaluating the water quality level and obtaining a water quality monitoring dataset for the water bodies in the monitored watershed; based on the water quality monitoring dataset, determining the correlation between the various water quality evaluation indicators through correlation analysis, and then constructing data support sets for each water quality evaluation indicator; based on the data support sets of the water quality evaluation indicators, using an indicator prediction model to obtain the predicted values ​​of the water quality evaluation indicators; predicting the future water quality level of the monitored water body based on the predicted values ​​of each water quality evaluation indicator, and triggering an early warning when the early warning conditions are met. This invention improves the accuracy of water quality monitoring and prediction through multi-factor correlation analysis and classification modeling.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of water quality monitoring, and in particular to a water quality monitoring prediction method and system based on multi-factor correlation analysis. BACKGROUND

[0002] Water environment quality is directly related to ecological safety, drinking water health and sustainable development of social economy. With the intensification of industrial and agricultural activities and the acceleration of urbanization, the problem of water pollution in the basin is becoming increasingly complex and variable. Water quality monitoring and early warning have become the core of water resources management and protection. Traditional methods relying on manual sampling and laboratory analysis are time-consuming and costly, and cannot meet the needs of large-scale, high-frequency and real-time dynamic monitoring. Therefore, it is an urgent need and important research direction in the field of water environment management to use sensor networks, Internet of Things technology and big data analysis methods to build an intelligent water quality monitoring and prediction system to realize early identification and warning of water pollution risks. Precise prediction of future water quality trends has important practical significance for scientific pollution prevention and control measures and water safety.

[0003] However, existing water quality monitoring and prediction technologies still face many challenges and limitations. First, existing methods often ignore or simplify the complex nonlinear and time-lagging correlation between water quality indicators. Water is an organic whole, and the changes in indicators such as pH, dissolved oxygen, ammonia nitrogen and total phosphorus are not isolated, but interact and cause each other. Existing technologies usually do not consider this when predicting water quality, making it difficult to fully exploit and utilize the deep and cross-time-scale correlation information between indicators, resulting in insufficient ability of the model to capture water quality evolution patterns. Second, existing water quality monitoring and prediction models based on ARIMA, SVM or general LSTM mostly use a "one-size-fits-all" approach to handle all indicators, without distinguishing between indicator characteristics, making it difficult to integrate effective information provided by interrelated indicators for joint prediction, which may result in inaccurate water quality prediction results. Therefore, it is necessary to explore new water quality monitoring and prediction schemes. SUMMARY

[0004] In view of the defects in the prior art, the present application provides a water quality monitoring and prediction method and system based on multi-factor correlation analysis.

[0005] In order to achieve the above-mentioned purpose, the first aspect, the application provides a water quality monitoring prediction method based on multi-factor correlation analysis, the method comprises the following steps: determining water quality evaluation indexes, collecting water quality evaluation index data of water bodies in a monitoring watershed, then evaluating water quality grades and obtaining a water quality monitoring data set of the water bodies in the monitoring watershed; based on the water quality monitoring data set, the correlation between each water quality evaluation index is judged by correlation analysis, and then a data support set of each water quality evaluation index is constructed; according to the data support set of the water quality evaluation indexes, the predicted values of the water quality evaluation indexes are obtained by using an index prediction model; the future water quality grade of the detected water body is predicted according to the predicted values of each water quality evaluation index, and an early warning is triggered when the early warning condition is met. The application improves the accuracy of water quality monitoring prediction through multi-factor correlation analysis and classification modeling.

[0006] Optionally, the step of determining water quality evaluation indexes, collecting water quality evaluation index data of water bodies in a monitoring watershed, then evaluating water quality grades and obtaining a water quality monitoring data set of the water bodies in the monitoring watershed comprises the following steps:

[0007] The water quality evaluation indexes include pH value, dissolved oxygen concentration, chemical oxygen demand, five-day biochemical oxygen demand, ammonia nitrogen, total nitrogen, total phosphorus, permanganate index, lead concentration, mercury concentration and fluoride;

[0008] The water quality evaluation index data of the detected water body is collected, and the water quality evaluation index data is preprocessed to obtain time series data of the water quality evaluation index data;

[0009] After data preprocessing, the current water quality evaluation index data is used to evaluate the water quality grade, and all the time series data is used to construct a water quality monitoring data set.

[0010] Further, the method can improve data quality and improve the accuracy of water quality monitoring by collecting and preprocessing water quality evaluation index data, and can provide a reliable data basis for water quality prediction by constructing a water quality monitoring data set.

[0011] Optionally, the step of judging the correlation between each water quality evaluation index based on the water quality monitoring data set by correlation analysis, and then constructing a data support set of each water quality evaluation index comprises the following steps:

[0012] Based on the water quality monitoring data set, the comprehensive correlation between each water quality evaluation index is calculated, and then the water quality evaluation indexes are divided into single-factor indexes, multi-factor indexes and isolated indexes;

[0013] According to the water quality monitoring data set, a corresponding data support set is constructed for each single-factor index, multi-factor index and isolated index.

[0014] Further, the method helps to deeply understand the mutual relationship between the indexes through correlation analysis, and then classifies the water quality evaluation indexes and respectively constructs data support sets, so as to facilitate subsequent use of different analysis methods for different types of indexes, provide data basis for index prediction, and improve water quality prediction accuracy.

[0015] Optionally, the comprehensive correlation between each water quality evaluation index is calculated based on the water quality monitoring data set, and then the water quality evaluation indexes are divided into single-factor indexes, multi-factor indexes and isolated indexes, including the following steps:

[0016] The mean value of the maximum information coefficient and time lag correlation between each water quality evaluation index is calculated as the comprehensive correlation between each water quality evaluation index;

[0017] For any water quality evaluation index A, if there is another water quality evaluation index B with a comprehensive correlation greater than a correlation threshold, then B is a related index of A;

[0018] For any water quality evaluation index A, if there is one related index, A is the single-factor index, if there are multiple related indexes, A is the multi-factor index, and if there is no related index, A is the isolated index.

[0019] Further, the method comprehensively considers the linear correlation and nonlinear correlation between the indexes, as well as the time lag relationship, so that the correlation analysis is more comprehensive and accurate, and the indexes are classified quickly and accurately.

[0020] Optionally, the data support set of each single-factor index, multi-factor index and isolated index is constructed according to the water quality monitoring data set, including the following steps:

[0021] For any single-factor index, time series data of the single-factor index and time series data of its related indexes are extracted from the water quality monitoring data set to construct the data support set of the single-factor index;

[0022] For any multi-factor index, multiple indexes are selected as its main related indexes from its related indexes according to the size of the comprehensive correlation;

[0023] Time series data of the multi-factor index and its main related indexes are extracted from the water quality monitoring data set to construct the data support set of the multi-factor index;

[0024] For any isolated index, the time series data thereof is extracted from the water quality monitoring data set to construct a data support set thereof.

[0025] Further, the method classifies different water quality evaluation indexes and constructs data support sets respectively, so as to facilitate subsequent use of different prediction methods for different types of indexes, provide a data basis for index prediction, and improve water quality prediction accuracy. For multi-factor indexes, the main associated indexes thereof are selected to realize joint prediction of the indexes, and the prediction efficiency is improved to a certain extent.

[0026] Optionally, the index prediction model comprises a first type of index prediction model, a second type of index prediction model and a third type of index prediction model.

[0027] The index prediction model comprises a first type of index prediction model, a second type of index prediction model and a third type of index prediction model.

[0028] For the single-factor index, a first type of index prediction model is constructed using the data support set and the conditional generative adversarial network of the single-factor index, and then the single-factor index is predicted.

[0029] For the multi-factor index, the multivariate empirical mode decomposition is performed on each time series data in the data support set of the multi-factor index, and a modal decomposition set of the multi-factor index is further obtained.

[0030] The training and verification of the conditional hierarchical generative adversarial network are completed using the modal decomposition set of the multi-factor index, and then the second type of index prediction model is obtained, which is used to predict the multi-factor index.

[0031] For the isolated index, a third type of index prediction model is constructed using the data support set and the generative adversarial network of the isolated index, and then the isolated index is predicted.

[0032] Further, the method classifies different water quality evaluation indexes and constructs data support sets respectively, so as to facilitate subsequent use of different prediction methods for different types of indexes, provide a data basis for index prediction, and improve water quality prediction accuracy. For multi-factor indexes, the main associated indexes thereof are selected to realize joint prediction of the indexes, and the prediction efficiency is improved to a certain extent.

[0033] Optionally, the multivariate empirical mode decomposition is performed on each time series data in the data support set of the multi-factor index, and a modal decomposition set of the multi-factor index is further obtained.

[0034] For the multi-factor index, the multivariate empirical mode decomposition is performed on each time series data in the data support set of the multi-factor index, and a modal decomposition set of the multi-factor index is further obtained.

[0035] the multi-factor index and the IMF components of the main associated indexes thereof are divided into high-frequency components and low-frequency components by sample entropy;

[0036] the high-frequency components, the low-frequency components and the residual terms of the main associated indexes of the multi-factor index are fused into high-frequency condition vectors, low-frequency condition vectors and residual condition vectors respectively by using weighted summation;

[0037] the time series data, the high-frequency components, the low-frequency components and the residual terms of the multi-factor index, and the high-frequency condition vectors, the low-frequency condition vectors and the residual condition vectors are used to construct the modal decomposition set.

[0038] Further, the method uses multivariate empirical mode decomposition to decompose the time series data of each water quality evaluation index in the same period in the multi-factor index data support set, which can effectively extract different frequency components of the data and provide more abundant information for subsequent analysis and prediction. The IMF components are divided into high-frequency components and low-frequency components by sample entropy, which helps to distinguish different characteristics in the data and provides a basis for subsequent condition vector construction. The high-frequency components, the low-frequency components and the residual terms of the main associated indexes of the multi-factor index are fused into high-frequency condition vectors, low-frequency condition vectors and residual condition vectors respectively by using weighted summation, which can comprehensively consider the influence of the main associated indexes and improve the performance of the prediction model. The modal decomposition set provides comprehensive and abundant data support for the training and verification of the conditional hierarchical generative adversarial network by constructing the modal decomposition set.

[0039] Optionally, the conditional hierarchical generative adversarial network comprises a condition combination module, a generator module and a four-level discriminator module, the four-level discriminator module comprises three condition discriminators and one total discriminator, the condition discriminators comprise a first condition discriminator, a second condition discriminator and a third condition discriminator, and the first condition discriminator, the second condition discriminator and the third condition discriminator correspond to one condition respectively;

[0040] When the conditional hierarchical generative adversarial network is running, the following steps are performed:

[0041] The condition combination module extracts the features of each condition input by a lightweight feature extraction network and splices them to obtain a condition fusion vector;

[0042] The condition fusion vector and random noise are input into the generator module to generate simulated samples;

[0043] The conditions, the simulated samples and real samples are input into the condition discriminators corresponding to the conditions to determine whether the simulated samples are true or false and whether they meet the conditions;

[0044] The conditional fusion vector, the simulation sample and a real sample are input into the total discriminator for discriminating the authenticity of the simulation sample and whether the simulation sample meets the conditional fusion vector.

[0045] Further, the conditional hierarchical generative adversarial network of the method can fully consider the influence of different conditions, improve the quality and accuracy of the generated sample, and further improve the water quality prediction accuracy.

[0046] Optionally, the method further comprises the following steps of:

[0047] The water quality grade is predicted according to the predicted value of each water quality evaluation index by using a single-factor evaluation method;

[0048] The water quality requirement of the water body in the monitored river basin is determined, and the early warning is triggered when the water quality evaluation index and the water quality grade do not meet the water quality requirement.

[0049] Further, the method uses the single-factor evaluation method to predict the water quality grade, so that the prediction result of the water quality grade can be quickly obtained, the early warning can be triggered in time according to the water quality prediction result and the water quality requirement of the water body in the monitored river basin, and it is beneficial to take measures in time to cope with the water quality problem and ensure the safety of the water environment.

[0050] In a second aspect, the present application provides a water quality monitoring and prediction system based on multi-factor correlation analysis, which comprises a data acquisition device, a data output device, a processor and a storage, the storage comprises a computer readable storage medium, the computer readable storage medium stores a computer program, the computer program comprises program instructions, and the program instructions enable the processor to implement the water quality monitoring and prediction method based on multi-factor correlation analysis provided by the present application when the program instructions are executed by the processor. The system can improve the practicability of the method and facilitate the popularization of the method. BRIEF DESCRIPTION OF DRAWINGS

[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0052] Figure 1 The flowchart of the water quality monitoring and prediction method based on multi-factor correlation analysis of the embodiments of the present application is shown in the figure.

[0053] Figure 2A structure diagram of a conditional hierarchical generative adversarial network is provided for an embodiment of the present application.

[0054] Figure 3 A framework schematic diagram of a water quality monitoring and prediction system based on multi-factor correlation analysis is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0055] The specific embodiments of the present application will be described in detail below, and it should be noted that the embodiments described herein are only used for illustration and do not limit the present application. In the following description, a large number of specific details are set forth in order to provide a thorough understanding of the present application. However, it is obvious to those skilled in the art that the present application does not have to be implemented with these specific details. In other instances, well-known circuits, software or methods are not specifically described in order not to obscure the present application.

[0056] Throughout the specification, the mention of "one embodiment", "an embodiment", "one example" or "an example" means that a particular feature, structure or characteristic described in connection with the embodiment or example is included in at least one embodiment of the present application. Therefore, the phrases "in one embodiment", "in an embodiment", "one example" or "an example" appearing throughout the specification are not necessarily all referring to the same embodiment or example. In addition, specific features, structures or characteristics can be combined in any appropriate combination and / or subcombination in one or more embodiments or examples. In addition, those skilled in the art should understand that the diagrams provided herein are for illustrative purposes only and the diagrams are not necessarily drawn to scale.

[0057] It should be noted in advance that in an alternative embodiment, in addition to making independent descriptions, the same symbols or letters appearing in all formulas have the same meaning and value.

[0058] In an alternative embodiment, referring to Figure 1 The present application provides a water quality monitoring and prediction method based on multi-factor correlation analysis, which comprises the following steps:

[0059] S1, determining water quality evaluation indexes and collecting water quality evaluation index data of water bodies in a monitoring watershed, and then evaluating water quality grades and obtaining water quality monitoring data sets of the water bodies in the monitoring watershed.

[0060] Specifically, step S1 comprises the following steps:

[0061] S11, determining water quality evaluation indexes, including pH value, dissolved oxygen concentration, chemical oxygen demand, five-day biochemical oxygen demand, ammonia nitrogen, total nitrogen, total phosphorus, permanganate index, lead concentration, mercury concentration and fluoride.

[0062] Specifically, in the present embodiment, the water quality evaluation indexes of the water body in the monitoring basin include, but are not limited to, pH value, dissolved oxygen concentration, chemical oxygen demand, five-day biochemical oxygen demand, ammonia nitrogen, total nitrogen, total phosphorus, permanganate index, lead concentration, mercury concentration, and fluoride. The reason for selecting these indexes is that they are representative in common water quality monitoring and can reflect the acid-base degree, oxidation-reduction state, organic pollution degree, nutrient salt content, and heavy metal pollution situation of the water body, which is of great significance to the evaluation of the water quality of the monitoring basin. More water quality evaluation indexes can refer to the current “Surface Water Environmental Quality Standard (GB3838-2002)”.

[0063] S12, collecting water quality evaluation index data of the water body and preprocessing the water quality evaluation index data to obtain time series data of the water quality evaluation index data.

[0064] Specifically, in the present embodiment, the water quality evaluation index data of the water body is collected in real time by different types of water quality monitoring sensors, and the collected data is subjected to preprocessing operations such as outlier rejection, missing value filling, discretization, and normalization, thereby obtaining time series data of each water quality evaluation index data. Preprocessing the collected data can improve the data quality and thus improve the accuracy of water quality monitoring prediction.

[0065] S13, after data preprocessing, using the current water quality evaluation index data to evaluate the water quality grade, and using all the time series data to construct a water quality monitoring data set.

[0066] Specifically, in the present embodiment, the current “Surface Water Environmental Quality Standard (GB3838-2002)” divides surface water into five categories according to the function and protection target of the water area, so the water quality classification method of the current “Surface Water Environmental Quality Standard (GB3838-2002)” can be referred to for evaluating the water quality grade using the single-factor evaluation method according to the current water quality evaluation index data, i.e., determining which category the water in the monitoring basin belongs to.

[0067] Further, the sliding window method is used to cut each water quality evaluation index data time series data into multiple sub-sequences of the same length to construct a water quality monitoring data set, providing a reliable data basis for water quality prediction. The window length is selected as 24 and the sliding step is selected as 4.

[0068] S2, based on the water quality monitoring data set, determining the correlation between each water quality evaluation index through correlation analysis, and then constructing a data support set for each water quality evaluation index.

[0069] The step obtains the mutual relationship between the indexes through correlation analysis, and then classifies the water quality evaluation indexes and respectively constructs data support sets, so as to facilitate subsequent use of different analysis methods for different types of indexes, provide a data basis for index prediction, and improve the accuracy of water quality prediction. Step S2 specifically includes the following steps:

[0070] S21, based on the water quality monitoring data set, calculate the comprehensive correlation between each water quality evaluation index, and then divide the water quality evaluation indexes into single factor indexes, multiple factor indexes and isolated indexes.

[0071] Specifically, step S21 specifically includes the following steps:

[0072] S211, calculate the mean value of the maximum information coefficient and time lag correlation between each water quality evaluation index, which is used as the comprehensive correlation between each water quality evaluation index.

[0073] Specifically, in this embodiment, when calculating the time lag correlation between each water quality evaluation index, the time lag range is selected as 5 days, and the time lag correlation is represented by calculating the Pearson correlation coefficient. The calculation method of the maximum information coefficient and the time lag correlation is a prior art means, which will not be described in detail here.

[0074] More specifically, the comprehensive correlation satisfies the following relationship:

[0075]

[0076] Wherein, R is the comprehensive correlation, MIC is the maximum information coefficient, and r is the time lag correlation. The method calculates the comprehensive correlation between each water quality evaluation index, comprehensively considers the linear correlation and nonlinear correlation between the indexes, and the time lag relationship, so that the correlation analysis is more comprehensive and accurate, and the indexes are classified quickly and accurately.

[0077] S212, for any water quality evaluation index A, if there is another water quality evaluation index B with a comprehensive correlation greater than a correlation threshold, then B is the associated index of A.

[0078] Specifically, in this embodiment, the correlation threshold needs to be set for different water bodies. Generally, if the correlation threshold is set too large, the accuracy of water quality prediction will be reduced, but if it is set too small, the data processing amount will be increased, which is not conducive to improving the efficiency of water quality prediction. Therefore, the correlation threshold should not be too large or too small. Based on this consideration, the correlation threshold is set to 0.5 in this embodiment.

[0079] S213. For any water quality evaluation indicator A, if it has one of the associated indicators, then A is the single-cause indicator; if it has multiple associated indicators, then A is the multi-cause indicator; if it does not have any associated indicators, then A is the isolated indicator.

[0080] S22. Based on the water quality monitoring dataset, construct corresponding data support sets for each of the single-factor indicators, multi-factor indicators, and isolated indicators.

[0081] This step constructs separate data support sets for different water quality assessment indicators, facilitating the application of different prediction methods for different types of indicators and providing a data foundation for indicator prediction, thereby improving the accuracy of water quality prediction. Step S22 specifically includes the following steps:

[0082] S221. For any of the single-factor indicators, extract the time series data of the single-factor indicator and the time series data of its related indicators from the water quality monitoring dataset to construct the data support set of the single-factor indicator.

[0083] S222. For any of the multi-factor indicators, select multiple indicators from its associated indicators as its main associated indicators according to the magnitude of the comprehensive correlation.

[0084] Specifically, in this embodiment, for any multi-factor indicator, the two most correlated indicators with which it has the strongest overall correlation are selected as its primary correlated indicators. For multi-factor indicators, selecting two primary correlated indicators not only enables joint prediction of the indicators but also prevents excessive data processing, thereby improving prediction efficiency to some extent. In other alternative embodiments, other numbers of primary correlated indicators may be selected, or no primary correlated indicators may be selected.

[0085] S223. Extract the time series data of the multifactor indicators and their main related indicators from the water quality monitoring dataset, and then construct the data support set of the multifactor indicators.

[0086] Specifically, in this embodiment, for any multifactor indicator, the time series data of the multifactor indicator and its main related indicators are extracted from the water quality monitoring dataset, and then a data support set for the multifactor indicator is constructed.

[0087] S224. For any of the isolated indicators, extract its time series data from the water quality monitoring dataset to construct its data support set.

[0088] S3. Based on the data support set of the water quality evaluation indicators, use the indicator prediction model to obtain the predicted values ​​of the water quality evaluation indicators.

[0089] The index prediction model includes a first type of index prediction model, a second type of index prediction model, and a third type of index prediction model. The step of classified modeling for different types of water quality evaluation indexes can give full play to the advantages of different models, improve the accuracy of water quality evaluation index prediction, and further improve the accuracy of water quality prediction. Step S3 specifically includes the following steps:

[0090] S31, for the single-factor index, a first type of index prediction model is constructed using its data support set and conditional generative adversarial network, thereby realizing prediction of the single-factor index.

[0091] Specifically, in the embodiment, for the single-factor index, its data support set is strictly divided into a training set, a validation set, and a test set according to time sequence and a ratio of 7:1:2, ensuring that the training set data is earlier than the validation set, and the validation set data is earlier than the test set, thereby preventing future information leakage.

[0092] Further, a conditional generative adversarial network based on Wasserstein distance and gradient penalty is constructed, the time series data of the associated index of the single-factor index is used as the conditional input of the generator and the discriminator, and the generator is used to generate the future prediction value of the single-factor index under the given condition. The core network architecture of the generator and the discriminator of the conditional generative adversarial network adopts a model capable of effectively capturing time sequence dependency, such as a long short-term memory network. The conditional generative adversarial network adopts a Wasserstein distance loss function, and a gradient penalty term is introduced to stabilize the training process and avoid mode collapse. The goal of the discriminator is to maximize the Wasserstein distance estimate between the real sample pair and the generated sample pair, and the goal of the generator is to minimize the distance estimate.

[0093] Further, the training set, the validation set, and the test set are used to complete the training, validation, and testing of the conditional generative adversarial network, respectively. During the training process, the prediction results are evaluated using mean square error, mean absolute error, accuracy, and recall rate, and the finally obtained generator is used as the first type of index prediction model. Each single-factor index needs to construct a corresponding first type of index prediction model. After obtaining the first type of index prediction model, the time series data of the associated index of the single-factor index is input into the first type of index prediction model as a condition to generate N samples, and the mean value of the N samples is taken as the final prediction value of the single-factor index.

[0094] S32, for the multi-factor index, each time series data in the data support set of the multi-factor index is subjected to multivariate empirical mode decomposition, and a mode decomposition set of the multi-factor index is further obtained.

[0095] Specifically, step S32 further includes the following steps:

[0096] S321, for the multi-factor index, using multivariate empirical mode decomposition to decompose the time series data of each group of time series data in the data support set of the multi-factor index, to obtain the IMF component and residual term of the multi-factor index and its main associated indicators.

[0097] Specifically, in this embodiment, for the multi-factor index, multivariate empirical mode decomposition is used to decompose each group of time series data in the data support set of the multi-factor index. In the data support set of the multi-factor index, a group of time series data contains time series data of the multi-factor index and its main associated indicators in the same time period. Through multivariate empirical mode decomposition, each IMF component and residual term of the multi-factor index and its main associated indicators can be obtained, which can effectively extract different frequency components of the data and provide more abundant information for subsequent analysis and prediction.

[0098] S322, dividing the IMF component of the multi-factor index and its main associated indicators into high-frequency components and low-frequency components by sample entropy.

[0099] Specifically, in this embodiment, sample entropy values are calculated for the IMF component of each index obtained in step S321, and a sample entropy threshold is set to divide the IMF component into high-frequency components and low-frequency components. Specifically, a sample entropy threshold is set for different water quality evaluation indicators. For a certain time series data of a water quality evaluation indicator, if the sample entropy of its IMF component is not less than the sample entropy threshold, the IMF component is determined to be a high-frequency sub-component, otherwise it is a low-frequency sub-component. This step divides the IMF component into high-frequency components and low-frequency components by sample entropy, which helps to distinguish different characteristics in the data and provides a basis for subsequent condition vector construction.

[0100] More specifically, in determining the sample entropy threshold of different water quality evaluation indicators, the sample entropy of all IMF components of the index can be calculated first, and then a histogram of sample entropy can be drawn to select the sample entropy threshold artificially. In other alternative embodiments, a fixed sample entropy threshold can also be used for all water quality evaluation indicators, thereby reducing the amount of data processing, but at the same time it will also have a negative impact on the accuracy of water quality prediction.

[0101] Further, for any water quality evaluation indicator, all its high-frequency sub-components are added to obtain the high-frequency component of the water quality evaluation indicator, and similarly the low-frequency component can be obtained.

[0102] S323, using weighted summation to fuse the high-frequency components, low-frequency components and residual terms of each main associated indicator of the multi-factor index into high-frequency condition vectors, low-frequency condition vectors and residual condition vectors.

[0103] Specifically, in the embodiment, the comprehensive correlation between the multi-factor index and each of its main associated indicators is normalized to serve as a reference weight for the fusion of the high-frequency component, the low-frequency component and the residual term of the main associated indicator, and then the high-frequency component, the low-frequency component and the residual term of each main associated indicator of the multi-factor index are fused into a high-frequency condition vector, a low-frequency condition vector and a residual condition vector respectively by using the weighted summation method. The high-frequency condition vector satisfies the following relationship:

[0104]

[0105] wherein, is the high-frequency condition vector, N is the number of main associated indicators of the multi-factor index, is the reference weight of the i th main associated indicator, is the high-frequency component of the i th main associated indicator. The calculation method of the low-frequency condition vector and the residual condition vector can refer to the calculation method of the high-frequency condition vector, which will not be repeated here.

[0106] In this step, the high-frequency component, the low-frequency component and the residual term of each main associated indicator of the multi-factor index are fused into a high-frequency condition vector, a low-frequency condition vector and a residual condition vector respectively by using the weighted summation method, so as to comprehensively consider the influence of different components of each main associated indicator on the main associated indicator and improve the performance of the prediction model.

[0107] S324, using the time series data, the high-frequency component, the low-frequency component and the residual term of the multi-factor index, and the high-frequency condition vector, the low-frequency condition vector and the residual condition vector to construct the modal decomposition set.

[0108] Specifically, in the embodiment, for any multi-factor index, the high-frequency component, the low-frequency component, the residual term, the high-frequency condition vector, the low-frequency condition vector and the residual condition vector corresponding to different time series data of the multi-factor index are used to construct a modal decomposition set, which provides comprehensive and rich data support for the subsequent training and verification of the conditional hierarchical generative adversarial network.

[0109] S33, using the modal decomposition set of the multi-factor index to complete the training and verification of the conditional hierarchical generative adversarial network, and then obtaining the second type of index prediction model for predicting the multi-factor index.

[0110] Specifically, in the present embodiment, the standard CGAN usually adopts a simple splicing method to input the conditional information into the generator and the discriminator. This method may be effective when dealing with low-dimensional, homogeneous, and semantically simple conditions. However, under the input of complex conditions with multiple factors, multiple scales, and clear physical meanings, the simple splicing of conditional information of different types and scales may cause information confusion, making it difficult for the generator and the discriminator to effectively extract and utilize the information, thereby causing feature entanglement and affecting the quality of the generated results. The single discriminator of the standard CGAN is difficult to impose fine-grained and scale-specific conditional constraints on complex conditional inputs. In the water quality prediction scenario, the influence degree and manner of different conditions on the prediction results may be different, and a single discriminator cannot effectively judge and feedback these differences, resulting in large errors in the prediction results.

[0111] See Figure 2 To improve the accuracy of water quality evaluation index prediction and thus improve the accuracy of water quality evaluation, the present embodiment uses a conditional hierarchical generative adversarial network. The conditional hierarchical generative adversarial network includes a conditional combination module, a generator module, and a four-level discriminator module, the four-level discriminator module includes three conditional discriminators and a total discriminator, the conditional discriminators include a first conditional discriminator, a second conditional discriminator, and a third conditional discriminator, and the first conditional discriminator, the second conditional discriminator, and the third conditional discriminator correspond to one condition respectively.

[0112] More specifically, when predicting multi-factor indicators, the corresponding high-frequency condition vector, low-frequency condition vector, and residual condition vector are taken as three conditions, and the input conditions of the first conditional discriminator, the second conditional discriminator, and the third conditional discriminator are the high-frequency condition vector, the low-frequency condition vector, and the residual condition vector in turn. The operation process of the conditional hierarchical generative adversarial network is as follows: first, the conditional combination module extracts the features of the three input conditions through three lightweight feature extraction networks 1D CNN respectively and splices them to obtain a condition fusion vector; then the condition fusion vector and random noise are input into the generator module to generate simulated samples of the multi-factor indicators; next, the conditions, simulated samples of the multi-factor indicators, and real samples are input into the conditional discriminators corresponding to the conditions to determine whether the simulated samples are true or false and whether they meet the corresponding conditions, and the condition fusion vector, simulated samples of the multi-factor indicators, and real samples are input into the total discriminator to determine whether the simulated samples are true or false and whether they meet the condition fusion vector.

[0113] Through the adversarial training between the generator module and the four-level discriminator module, the generator module continuously optimizes the ability to generate simulation samples, making them more consistent with the distribution of real samples and the conditional constraints; the four-level discriminator module continuously improves the discrimination ability of simulation samples. In addition, in order to improve the stability of model training, the gradient penalty technology is introduced into the conditional hierarchical generative adversarial network. After multiple rounds of training and verification, a stable generator is obtained, which is used as a second-class index prediction model to predict the future values of multi-factor indexes. The conditional hierarchical generative adversarial network of the embodiment can fully consider the influence of different conditions, improve the quality and accuracy of the generated samples, and further improve the water quality prediction accuracy.

[0114] The loss functions of the generator and the discriminator in the conditional hierarchical generative adversarial network satisfy the following relationships respectively:

[0115]

[0116]

[0117]

[0118] wherein, is the loss of the generator; E is the expected value, indicating the average of all possible z and c; z is random noise, sampled from the prior distribution , used to introduce randomness; c is the condition, sampled from the conditional distribution ; M is the number of conditions; is the discrimination result of the jth conditional discriminator on the generated sample and the jth condition ; is the discrimination result of the total discriminator on the generated sample and the condition fusion vector ; is the loss of the jth conditional discriminator, and its calculation method refers to the prior art; is the weight coefficient of the gradient penalty, usually taking 10; is the gradient penalty of the jth conditional discriminator; is a real sample, sampled from the data distribution p; is the discrimination result of the jth conditional discriminator on the real sample and the jth condition ; is the loss of the total discriminator; is the gradient penalty of the total discriminator, and its calculation method refers to the prior art; is the discrimination result of the total discriminator on the real sample and the condition fusion vector ; The total discriminator is used to generate samples and conditional fusion vectors to determine the discrimination results.

[0119] S34, for the isolated indicators, using its data support set and the generative adversarial network to build a third type of indicator prediction model, and then realize the prediction of the isolated indicators.

[0120] Specifically, in this embodiment, since the isolated indicators do not have corresponding conditions, the data support set thereof is directly used to complete the training, verification and testing of the generative adversarial network, and then the finally obtained generator is used as a third type of indicator prediction model to predict the future values of the isolated indicators. Among them, the core network architecture of the generator and the discriminator of the generative adversarial network adopts a model capable of effectively capturing time-dependent relationships, such as a long short-term memory network.

[0121] S4, according to the prediction values of each of the water quality evaluation indicators, the future water quality grade of the detected water body is predicted, and the early warning is triggered when the early warning condition is met.

[0122] Among them, step S4 specifically includes the following steps:

[0123] S41, according to the prediction values of the water quality evaluation indicators, the single-factor evaluation method is used to predict the water quality grade.

[0124] Specifically, in this embodiment, according to the prediction values of the water quality evaluation indicators, the single-factor evaluation method can be used to quickly obtain the future water quality grade by referring to the water quality division method of the current “Surface Water Environmental Quality Standard (GB3838-2002)”.

[0125] S42, determine the water quality requirement of the water body in the monitoring watershed, and trigger the early warning when the water quality evaluation indicators and the water quality grade do not meet the water quality requirement.

[0126] Specifically, in this embodiment, the water quality grade requirement of the water body in the monitoring watershed and the value range of each water quality evaluation indicator are determined, and the early warning is triggered when the water quality evaluation indicators and the water quality grade do not meet the water quality requirement, which is beneficial to timely take measures to deal with water quality problems and protect water environment safety.

[0127] It should be noted that in some cases, the actions described in the specification can be performed in different orders and still achieve the desired results, and in this embodiment, the order of the steps given is only to make the embodiment look clearer and more clear, and is not a limitation.

[0128] In an optional embodiment, referring to FIG. 3, in order to improve the practicability of the method and facilitate the popularization of the method, the application further provides a water quality monitoring and prediction system based on multi-factor correlation analysis, which comprises a data acquisition device 1, a data output device 2, a processor 3 and a storage 4, the storage 4 comprises a computer readable storage medium, the computer readable storage medium stores a computer program, the computer program comprises program instructions, and the program instructions enable the processor 3 to realize the contents of steps S1 to S4 when executed by the processor 3.

[0129] In summary, the application has at least the following beneficial effects:

[0130] Firstly, the method comprehensively considers the linear correlation and nonlinear correlation between indicators and the time lag relationship, classifies water quality evaluation indicators into single-factor indicators, multi-factor indicators and isolated indicators, and respectively constructs data support sets, thereby providing a data basis for indicator prediction and improving water quality prediction accuracy.

[0131] Secondly, the method uses different analysis methods for different types of water quality evaluation indicators and performs classification modeling, which can fully exert the advantages of different models, improve the accuracy of water quality evaluation indicator prediction, and further improve the accuracy of water quality prediction.

[0132] Thirdly, the method uses single-factor evaluation method to predict water quality grade, which can quickly obtain the prediction result of water quality grade, trigger early warning in time according to the water quality prediction result and the water quality requirement of the monitored river basin, and is beneficial to timely taking measures to cope with water quality problems and ensuring water environment safety.

[0133] Finally, the application provides a system adapted to the method, which can improve the practicability of the method and facilitate the popularization of the method.

[0134] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the application, and not to limit them; although the application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the application, and they should be covered in the scope of the claims and description of the application.

Claims

1. A water quality monitoring and prediction method based on multi-factor correlation analysis, characterized in that, The method comprises the following steps: determining water quality evaluation indexes, including pH value, dissolved oxygen concentration, chemical oxygen demand, five-day biochemical oxygen demand, ammonia nitrogen, total nitrogen, total phosphorus, permanganate index, lead concentration, mercury concentration and fluoride; collecting water quality evaluation index data of the water body and preprocessing the water quality evaluation index data to obtain time series data of the water quality evaluation index data; After data preprocessing, the current water quality evaluation index data is used to evaluate the water quality grade, and all the time series data is used to construct a water quality monitoring data set; The mean value of the maximum information coefficient and time lag correlation between each water quality evaluation index is calculated as the comprehensive correlation between each water quality evaluation index; For any water quality evaluation index A, if there is another water quality evaluation index B with a comprehensive correlation greater than a correlation threshold, then B is a related index of A; For any water quality evaluation index A, if it has one related index, it is a single-factor index, if it has multiple related indexes, it is a multi-factor index, and if it has no related index, it is an isolated index; For any single-factor index, the time series data of the single-factor index and the time series data of its related index are extracted from the water quality monitoring data set to construct a data support set for the single-factor index; For any multi-factor index, select multiple indexes as its main related indexes from its related indexes according to the size of the comprehensive correlation; The time series data of the multi-factor index and its main related indexes are extracted from the water quality monitoring data set to construct a data support set for the multi-factor index; For any isolated index, its time series data is extracted from the water quality monitoring data set to construct a data support set for it; According to the data support set of the water quality evaluation index, the predicted value of the water quality evaluation index is obtained by using an index prediction model, which includes a first type of index prediction model, a second type of index prediction model and a third type of index prediction model; According to the predicted value of each water quality evaluation index, the future water quality grade of the detected water body is predicted, and a warning is triggered when the warning condition is met; According to the data support set of the water quality evaluation index, the predicted value of the water quality evaluation index is obtained by using an index prediction model, which includes the following steps: For the single-factor index, a first type of index prediction model is constructed using its data support set and a conditional generative adversarial network to predict the single-factor index; For the multi-factor index, the time series data of each water quality evaluation index in the same period in the data support set of the multi-factor index is decomposed by using multivariate empirical mode decomposition to obtain the IMF component and residual term of the multi-factor index and its main related indexes; The IMF components of the multi-factor index and its main related indexes are divided into high-frequency components and low-frequency components by sample entropy; The high-frequency components, low-frequency components and residual terms of each main related index of the multi-factor index are fused into high-frequency condition vectors, low-frequency condition vectors and residual condition vectors by weighted summation. constructing a modal decomposition set using the time series data, the high-frequency component, the low-frequency component and the residual term of the multi-factor index, and the high-frequency condition vector, the low-frequency condition vector and the residual condition vector; training and verifying the conditional hierarchical generative adversarial network using the modal decomposition set of the multi-factor index, thereby obtaining the second-type index prediction model for predicting the multi-factor index; for the isolated index, constructing a third-type index prediction model using its data support set and the generative adversarial network, thereby realizing the prediction of the isolated index.

2. The water quality monitoring and prediction method based on multi-factor correlation analysis according to claim 1, characterized in that: the conditional hierarchical generative adversarial network comprises a conditional combination module, a generator module and a four-level discriminant module, the four-level discriminant module comprises three conditional discriminators and a total discriminator, the conditional discriminators comprise a first conditional discriminator, a second conditional discriminator and a third conditional discriminator, and the first conditional discriminator, the second conditional discriminator and the third conditional discriminator correspond to one condition respectively; the conditional hierarchical generative adversarial network performs the following steps when running: the conditional combination module extracts the features of each input condition through a lightweight feature extraction network and splices them to obtain a condition fusion vector; the condition fusion vector and random noise are input into the generator module, thereby generating simulated samples; the condition, the simulated samples and real samples are input into the conditional discriminators corresponding to the condition, for discriminating the authenticity of the simulated samples and whether they meet the condition; the condition fusion vector, the simulated samples and real samples are input into the total discriminator, for discriminating the authenticity of the simulated samples and whether they meet the condition fusion vector. 3.The water quality monitoring and prediction method based on multi-factor correlation analysis of claim 1, wherein, the steps of predicting the future water quality grade of the detected water body according to the prediction values of each water quality evaluation index and triggering an early warning when the early warning condition is met include: predicting the water quality grade using the single-factor evaluation method according to the prediction values of the water quality evaluation index; determining the water quality requirements of the water body in the monitoring watershed, and triggering an early warning when the water quality evaluation index and the water quality grade do not meet the water quality requirements.

4. A water quality monitoring and prediction system based on multi-factor correlation analysis, characterized in that, The water quality monitoring and prediction system based on multi-factor correlation analysis comprises a data acquisition device, a data output device, a processor and a storage, the storage comprises a computer readable storage medium, the computer readable storage medium stores a computer program, the computer program comprises program instructions, and the program instructions enable the processor to implement the water quality monitoring and prediction method based on multi-factor correlation analysis according to any one of claims 1-3 when executed by the processor.

Citation Information

Patent Citations

  • Water quality prediction and early warning system based on machine learning method

    CN115829120A