A water quality anomaly detection method of dynamic window correlation test and feature fusion

The water quality anomaly detection method, which integrates dynamic window correlation test and multi-feature recognition, solves the problems of low detection accuracy and poor real-time performance in existing technologies, and achieves accurate detection of water quality anomalies, supporting water quality management and protection.

CN116858920BActive Publication Date: 2025-11-25SOUTH CHINA UNIV OF TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310821148.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-06
Publication Date
2025-11-25
Estimated Expiration
2043-07-06

AI Technical Summary

Technical Problem

Existing water quality monitoring methods suffer from low detection accuracy, poor real-time performance, and complex operation, failing to meet the needs of modern water quality monitoring. Furthermore, traditional current time-series signal analysis methods cannot comprehensively determine water quality anomalies.

Method used

A dynamic window correlation test and multi-feature recognition fusion method was adopted to obtain current time series data through two microbial electrolysis cells, calculate correlation coefficients and feature parameters, and combine multiple feature parameters to make a comprehensive judgment on water quality anomalies.

Benefits of technology

It enables accurate and timely detection of water quality anomalies, improves the accuracy and reliability of detection, and supports water quality management and protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116858920B_ABST
    Figure CN116858920B_ABST
Patent Text Reader

Abstract

The application discloses a water quality anomaly detection method based on dynamic window correlation test and feature fusion, which comprises the following steps: injecting non-toxic water samples into microbial electrolysis cells MEC1 and MEC2 respectively, and obtaining current time series data MEC1-DB1 and MEC2-DB1 output by the microbial electrolysis cells MEC1 and MEC2 respectively; injecting a water sample to be detected into the microbial electrolysis cells MEC1 and MEC2, and obtaining current time series data MEC1-ST1 and MEC2-ST1 output by the microbial electrolysis cells MEC1 and MEC2; performing correlation test on the MEC1-DB1, MEC2-DB1, MEC1-ST1 and MEC2-ST1 to obtain current time series data correlation coefficients, calculating the maximum value of the four current time series data correlation coefficients according to the correlation coefficients; calculating a correlation determination coefficient according to the maximum value of the current time series data correlation coefficients; performing statistical analysis on the correlation determination coefficient to obtain a water quality anomaly determination threshold; and determining whether the water quality is abnormal according to the size relationship between the correlation determination coefficient and the water quality anomaly determination threshold.
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 detection, and particularly relates to a water quality anomaly detection method based on dynamic window correlation test and multi-feature recognition fusion. BACKGROUND

[0002] At present, with the development of human economic society and the acceleration of industrialization process, water environmental pollution problems are increasingly prominent, and water quality monitoring and management have become an important task for protecting water resources and ecological environment. However, the traditional water quality monitoring method often has problems such as low detection accuracy, poor real-time performance, and complex operation, which cannot meet the needs of modern water quality monitoring.

[0003] In recent years, microbial electrolysis cell (MEC) as a new type of water quality detection technology has gradually attracted attention. MEC realizes the correlation between water quality parameters and current signals through the metabolic activity of electrochemical microorganisms in the electrolytic cell. However, the analysis method of current time series signal is very important for judging water quality, so it is necessary to comprehensively analyze the time series current signal from multiple angles to provide a basis for water quality anomaly detection method and system; dynamic window correlation test is an effective data analysis method, which can capture the correlation and trend between data. By calculating the correlation coefficient between different data sequences, it can be judged whether the water quality monitoring data is abnormal. However, relying solely on correlation test may not be able to comprehensively judge the abnormality of water quality, so it is necessary to combine other features for comprehensive identification.

[0004] The judgment of water quality anomaly needs to consider multiple feature parameters, such as the change rate of current time series data, the peak value change rate, the rising rate and the falling rate, etc. These feature parameters can reflect the comprehensive change of water quality, and through comprehensive identification, the water quality can be more accurately judged. Therefore, it is of great significance to develop a multi-feature recognition method that can comprehensively consider multiple feature parameters to comprehensively evaluate water quality. Therefore, the present application aims to provide a water quality anomaly detection method and system based on dynamic window correlation test and multi-feature recognition fusion to solve the problems existing in the prior art. By combining dynamic window correlation test and multi-feature recognition method, this technology can accurately judge the water quality anomaly and provide strong support for water quality management and protection. SUMMARY

[0005] To solve the above technical problems, the purpose of the present application is to provide a water quality anomaly detection method based on dynamic window correlation test and feature fusion.

[0006] The purpose of the present application is realized by the following technical solutions:

[0007] A water quality anomaly detection method based on dynamic window correlation test and feature fusion, comprising:

[0008] A, the non-toxic water sample is injected into the microbial electrolysis cell MEC1 and the microbial electrolyysis cell MEC2 respectively, the current time series data MEC1-DB1 output by the microbial electrolysis cell MEC1 and the current time series data MEC2-DB1 output by the microbial electrolysis cell MEC2 are obtained;

[0009] B, the water sample to be detected is injected into the microbial electrolysis cell MEC1 and the microbial electrolysis cell MEC2, the current time series data MEC1-ST1 output by the microbial electrolysis cell MEC1 and the current time series data MEC2-ST1 output by the microbial electrolysis cell MEC2 are obtained;

[0010] C, the correlation test is performed on the current time series data MEC1-DB1, MEC2-DB1, MEC1-ST1 and MEC2-ST1, the correlation coefficient of the current time series data is obtained, and the maximum value of the correlation coefficient of the four current time series data is calculated according to the correlation coefficient;

[0011] D, the correlation determination coefficient is calculated according to the maximum value of the correlation coefficient of the current time series data;

[0012] E, the water quality anomaly determination threshold T is obtained by statistical analysis of the correlation determination coefficient e-1 ;

[0013] F, the size between the correlation determination coefficient and the water quality anomaly determination threshold is used to determine whether the water quality is abnormal.

[0014] Compared with the prior art, one or more embodiments of the present application can have the following advantages:

[0015] Firstly, the dynamic window correlation test method can capture the relevant features of water quality changes in time; secondly, the fusion application of multiple feature recognition improves the accuracy and reliability of water quality anomaly detection; finally, the method can monitor the water quality in real time, providing strong support for water quality management and protection. Therefore, the water quality anomaly detection method of the present application has a wide application prospect in the field of water quality monitoring and can be used for water quality monitoring and anomaly warning in water sources, water treatment plants, industrial wastewater discharge and other environments, which is of great significance to human health and environmental protection. BRIEF DESCRIPTION OF DRAWINGS

[0016] Figure 1 is a flow chart of the water quality anomaly detection method based on dynamic window correlation test and feature fusion;

[0017] Figure 2 is a dynamic window charge rate calculation flow chart;

[0018] Figure 3 is a peak change rate and time difference cycle proportion calculation flowchart;

[0019] Figure 4 is a rising rate and falling rate calculation flowchart;

[0020] Figure 5 is a multi-feature fusion water quality anomaly judgment flowchart;

[0021] Figure 6 is a peak area feature extraction diagram;

[0022] Figure 7 is a time series current signal dynamic window division-charge calculation diagram. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below in combination with examples and drawings. The present application relates to a water quality anomaly detection method based on dynamic window correlation test and feature fusion. The method realizes efficient and accurate detection of water quality anomalies by combining dynamic window correlation test and multi-feature recognition technology. The water quality anomaly detection method comprises: first, providing two parallel running electrochemical microbial electrolysis cells MEC-1 and MEC-2 for water quality detection. Independently and in parallel, MEC-1 and MEC-2 are subjected to zero point calibration and water sample detection, two test processes, to obtain corresponding data. Next, the dynamic window correlation test method is used to analyze the correlation of the obtained data, and the correlation coefficient is calculated. Through the correlation test judgment method, the water quality is judged. If the water quality is abnormal, the water quality warning is output; if the correlation test fails to judge the water quality anomaly, subsequent feature recognition judgment is required. In order to further improve the accuracy of water quality anomaly detection, the present application adopts a multi-feature recognition method. On the basis of correlation test, a plurality of feature parameters are extracted from the current time series data, including dynamic sliding window charge rate, peak change rate and peak time difference proportion, rising rate change rate and falling rate change rate, etc. By calculating and analyzing these feature parameters, it is comprehensively judged whether the water quality is abnormal.

[0024] As shown in Figure 1 , it is a specific dynamic window correlation test method flowchart, which comprises:

[0025] A, the non-toxic water sample is injected into the microbial electrolysis cell MEC1 and the microbial electrolysis cell MEC2 respectively, and the current time series data MEC1-DB1 output by the microbial electrolysis cell MEC1 and the current time series data MEC2-DB1 output by the microbial electrolysis cell MEC2 are obtained;

[0026] B, inject the water sample to be detected into the microbial electrolysis cell MEC1 and the microbial electrolysis cell MEC2, obtain the current time series data MEC1-ST1 output by the microbial electrolysis cell MEC1 and the current time series data MEC2-ST1 output by the microbial electrolysis cell MEC2;

[0027] C, perform correlation test on the current time series data MEC1-DB1, MEC2-DB1, MEC1-ST1 and MEC2-ST1, obtain a correlation coefficient of the current time series data, and calculate a maximum value of the four correlation coefficients of the current time series data according to the correlation coefficient;

[0028] D, calculate a correlation determination coefficient according to the maximum value of the correlation coefficient of the current time series data;

[0029] E, perform statistical analysis on the correlation determination coefficient to obtain a water quality anomaly determination threshold T e-1 ;

[0030] F, determine whether the water quality is abnormal by the size between the correlation determination coefficient and the water quality anomaly determination threshold.

[0031] The correlation coefficient of MEC1-DB1 and MEC2-DB1 is r 1 1-2DB ;

[0032] The correlation coefficient of MEC1-DB1 and MEC1-ST1 is r 1 1-1DS ;

[0033] The correlation coefficient of MEC1-DB1 and MEC2-ST1 is r 1 1-2DS ;

[0034] The correlation coefficient of MEC2-DB1 and MEC1-DB1 is r 2 2-1DB ;

[0035] The correlation coefficient of MEC2-DB1 and MEC1-ST1 is r 2 2-1DS ;

[0036] The correlation coefficient of MEC2-DB1 and MEC2-ST1 is r 2 2-2DS ;

[0037] The maximum value of the four correlation coefficients of the current time series data is MAX(r 1 1-1DS , r 1 1-2DS ; r 2 2-1DS , r 22-2DS );

[0038] The correlation coefficient formula is Ce=r 1 1-2DB -MAX(r 1 1-1DS , r 1 1-2DS ; r 2 2-1DS , r 2 2-2DS ).

[0039] In the above F: if Ce>T e-1 , it is determined that the water quality is abnormal; if Ce<T e-1 , the following features are identified for water quality abnormality judgment:

[0040] 1) Water quality abnormality judgment based on dynamic sliding window charge;

[0041] 2) Water quality abnormality judgment based on peak value change rate and peak value time difference proportion in the entire detection period;

[0042] 3) Calculate the left and right slopes centered on the peak point, and make water quality abnormality judgment based on the left rising rate and the right falling rate;

[0043] 4) Water quality abnormality judgment based on multiple features.

[0044] As shown in Figure 2 and Figure 7 , wherein 1) water quality abnormality judgment based on dynamic sliding window charge includes:

[0045] Zero calibration is performed on the electrolytic cell MEC1 to obtain current time series data MEC1-DB1 output by the electrolytic cell;

[0046] Water sample detection is performed on the electrolytic cell MEC1 to obtain current time series data MEC1-ST1 output by the electrolytic cell;

[0047] MEC1-DB1 and MEC1-ST1 are taken as two groups of equal-length time series signal data, and are numbered as NO-1-NO-h (such as NO_1-NO_510);

[0048] The first ten data points of the sequence are defined as baseline data, and are represented as XD1 and XS1, respectively;

[0049] The dynamic sliding window length L is set to 50, and the data points are traversed to the tail end, and the charge rate in each window is calculated;

[0050] According to the microbial electrolysis cell MEC1, the non-toxic water sample test and the change rate of the charge generated by the water sample test in each window are detected to judge the water quality anomaly.

[0051] The charge amount S of the first window 1 Q-DB1 , S 1 Q-ST1 , and the charge amount of the nth window is: n Q-DB1 , S n Q-ST1 ;

[0052] The change rate of the charge generated by the microbial electrolysis cell MEC1 in each window during the non-toxic water sample test and the water sample test is calculated, and the change rate of the nth window is:

[0053] r n q = (S n Q-ST1 -S n Q-DB1 ) / S n Q-DB1 .

[0054] As Figure 3 and Figure 6 indicate, the above-mentioned 2) water quality anomaly judgment based on the peak value change rate and the peak value time difference ratio in the entire detection period includes:

[0055] The MEC1-DB1 and MEC1-ST1 are traversed to obtain the maximum value and the corresponding time sequence signal;

[0056] The peak value change rate Δp is calculated;

[0057] The peak time difference Δt is calculated;

[0058] The entire measurement period ratio d is calculated;

[0059] The water quality anomaly is judged according to the peak value change rate and the peak value time difference ratio in the entire detection period.

[0060] The above-mentioned MEC1-DB1 and MEC1-ST1 are traversed to obtain the maximum value and the corresponding time sequence signal, and the serial numbers of the maximum value and the corresponding time sequence signal obtained by traversing the two groups of data signals are n and m, respectively, which are recorded as: P n DB1 , P m ST1 ;

[0061] The peak value change rate is calculated:

[0062]

[0063] The peak time difference At = f * (m-n) is calculated, where f is the sampling frequency of the timing signal, and At represents the time difference of the peak value occurrence;

[0064] The entire measurement period ratio d = At / T is calculated, where T is the measurement period length;

[0065] As shown in Figure 4 The above 3) water quality anomaly judgment based on the rising rate and the falling rate includes:

[0066] The left and right slopes are calculated with the peak point as the center;

[0067] The rising slope and the falling slope are calculated;

[0068] The rising slope change rate and the falling slope change rate are calculated;

[0069] The water quality anomaly is judged according to the rising rate and the falling rate.

[0070] The left side of the peak point is the rising slope, and the rising slope is: taking the peak point as the endpoint, selecting n points on the left side, and fitting a straight line;

[0071] The MEC1: non-toxic test data fitting straight line is: y = K a DB1 *t + b1;

[0072] The detection water sample data fitting straight line is: y = K a ST1 *t + b2;

[0073] The rising slopes are respectively: K a DB1 , K a ST1 ;

[0074] The rising slope change rate is:

[0075] The right side of the peak point is the falling slope:

[0076] The falling slopes are respectively: K d DB1 , K d ST1

[0077] The falling slope change rate is:

[0078] As shown in Figure 5 The above 4) water quality anomaly judgment according to multiple characteristics includes:

[0079] According to the set weight coefficient, the dynamic sliding n window charge amount change rate rn q , peak change rate Δp, peak time difference ratio d, rising slope change rate r a k and falling slope change rate r d k weighted sum is performed;

[0080] define the water quality anomaly parameter A:

[0081]

[0082] wherein W1, W2, W3, W4 and W (k+4)

k takes the value of 1-n

[0083] compare the water quality anomaly parameter A C with the set threshold Te_2, if A C is greater than Te_2, it is determined that the water quality is abnormal; otherwise, it is determined that the water quality is normal.

[0084] Although the embodiments disclosed by the present application are as above, the content described is only for the purpose of facilitating understanding of the present application, and is not intended to limit the present application. Any person skilled in the art of the present application can make any modification and change in the form of implementation and details without departing from the spirit and scope of the present application, but the patent protection scope of the present application shall be subject to the scope defined by the appended claims.

Claims

1. A water quality anomaly detection method of dynamic window correlation test and feature fusion, characterized in that, The method comprises: A. Injecting non-toxic water samples into microbial electrolysis cells MEC1 and MEC2 respectively, obtaining current time series data MEC1-DB1 output by the microbial electrolysis cell MEC1 and current time series data MEC2-DB1 output by the microbial electrolysis cell MEC2; B. Injecting the water sample to be detected into the microbial electrolysis cells MEC1 and MEC2, obtaining current time series data MEC1-ST1 output by the microbial electrolysis cell MEC1 and current time series data MEC2-ST1 output by the microbial electrolysis cell MEC2; C. Correlation test is performed on the current time series data MEC1-DB1, MEC2-DB1, MEC1-ST1 and MEC2-ST1 to obtain a current time series data correlation coefficient, and the maximum value of the four current time series data correlation coefficients is calculated according to the correlation coefficient; D. The correlation determination coefficient Ce is calculated according to the maximum value of the current time series data correlation coefficient; E、Statistical analysis of the correlation coefficient to obtain water quality anomaly determination threshold T e-1 ; F. The size between the correlation determination coefficient and the water quality abnormality determination threshold is used to determine whether the water quality is abnormal; In the F: if Ce > T e-1 , it is determined that the water quality is abnormal; if Ce < T e-1 , the water quality abnormality is determined according to the following characteristics: Water quality abnormality judgment is performed based on the change rate of the charge amount of the dynamic sliding window; Water quality abnormality judgment is performed based on the proportion of the peak value change rate and the peak time difference in the entire detection period; The left and right slopes are calculated based on the peak point as the center, and water quality abnormality judgment is performed based on the left rising rate and the right falling rate; Water quality abnormality judgment is performed based on multiple features; The water quality abnormality judgment based on multiple features comprises: According to the set weight coefficient, the dynamic slip n-th window charge amount change rate r n q , peak change rate Δp, peak time difference proportion d, rising slope change rate r a k and falling slope change rate r d k weighted sum; Defining water quality abnormality parameters: wherein W1, W2, W3, W4and W (k+4) k is a value from 1-n, respectively, representing a weight coefficient; An abnormal parameter A of water quality is determined C is compared with a set threshold T e-2 , if A C is greater than T e-2 , it is determined that the water quality is abnormal; otherwise, it is determined that the water quality is normal.

2. The dynamic window correlation test and feature fusion water quality abnormality detection method of claim 1, wherein, The correlation coefficient of MEC1-DB1 and MEC2-DB1 is r 1 1-2DB ; The correlation coefficient of MEC1-DB1 and MEC1-ST1 is r 1 1-1DS ; The correlation coefficient of MEC1-DB1 and MEC2-ST1 is r 1 1-2DS ; The correlation coefficient of MEC2-DB1 and MEC1-DB1 is r 2 2-1DB ; The correlation coefficient of MEC2-DB1 and MEC1-ST1 is r 2 2-1DS ; The correlation coefficient of MEC2-DB1 and MEC2-ST1 is r 2 2-2DS ; The maximum value of the four current time series data correlation coefficients is MAX(r 1 1-1DS , r 1 1-2DS ; r 2 2-1DS , r 2 2-2DS ) The correlation determination coefficient formula is Ce = r 1 1-2DB - MAX(r 1 1-1DS , r 1 1-2DS ; r 2 2-1DS , r 2 2-2DS ). 3.The water quality anomaly detection method of claim 1, wherein, Water quality abnormality judgment based on the charge amount of the dynamic sliding window comprises: Zero point calibration is performed on the electrolysis cell MEC1 to obtain current time series data MEC1-DB1 output by the electrolysis cell; Water sample detection is performed on the electrolysis cell MEC1 to obtain current time series data MEC1-ST1 output by the electrolysis cell; MEC1-DB1 and MEC1-ST1 are used as two groups of equal-length time series signal data; The first ten data points of the sequence are defined as baseline data, represented as XD1 and XS1 respectively; The length of the dynamic sliding window is set as L, and the data points are traversed to the tail end to calculate the charge amount change rate in each window; The charge amount change rates generated by the non-toxic water sample test and the detection water sample test on the microbial electrolysis cell MEC1 in each window are calculated to determine the water quality abnormality. 4.The water quality anomaly detection method of claim 3, wherein, The charge amount S of the first window 1 Q-DB1 , S 1 Q-ST1 The charge amount S of the nth window is: n Q-DB1 , S n Q-ST1 ; The charge amount change rates generated by the non-toxic water sample test and the detection water sample test on the microbial electrolysis cell MEC1 in each window are calculated, and the change rate of the nth window is: r n q = (S n Q-ST1 - S n Q-DB1 / S n Q-DB1 .

5. The dynamic windowed correlation test and feature fusion based water quality anomaly detection method of claim 1, wherein, The water quality abnormality judgment based on the proportion of the peak value change rate and the peak time difference in the entire detection period comprises: MEC1-DB1 and MEC1-ST1 are traversed to obtain the maximum value and the corresponding time series signal; The peak value change rate Δp is calculated; The peak time difference Δt is calculated; The entire measurement period ratio d is calculated; Water quality abnormality judgment is performed based on the proportion of the peak value change rate and the peak time difference in the entire detection period.

6. The water quality anomaly detection method of claim 5, wherein the dynamic window correlation test and feature fusion is characterized in that, The MEC1-DB1 and MEC1-ST1 are traversed to obtain the maximum value and the corresponding timing signal, and the maximum value and the corresponding timing signal are obtained by traversing two groups of data signals, and the serial numbers of the maximum value and the corresponding timing signal are i and j, and are recorded as: P i DB1 , P j ST1 ; a peak change rate is calculated; a peak time difference At = f * (j-i) is calculated, where f is a time series signal sampling frequency, and At represents a time difference of peak occurrence; a whole measurement period proportion d = At / T is calculated, where T is a measurement period length.

7. The dynamic windowed correlation test and feature fusion based water quality anomaly detection method of claim 1, wherein, the water quality anomaly judgment based on the left side rising rate and the right side falling rate comprises: a left side and a right side slope are calculated with the peak point as a center; a rising slope and a falling slope are calculated; a rising slope change rate and a falling slope change rate are calculated; water quality anomaly judgment is performed according to the rising rate and the falling rate.

8. The dynamic window correlation test and feature fusion water quality anomaly detection method of claim 7, wherein, specifically comprising: the left side of the peak point is a rising slope, and the slope is: taking the peak point as an endpoint, selecting n points on the left side, and fitting a straight line; MEC1: Non-toxic test data fit line is: y = K a DB1* t + b1; The data fitting straight line of detecting water sample is: y=K a ST1* t+b2; The ascending slopes are K a DB1 , K a ST1 ; The rate of change of the rising slope is: the right side of the peak point is a falling slope: The descending slopes are: K d DB1 , K d ST1 The rate of change of the descent slope is:

Citation Information

Patent Citations

  • Sampling analysis method for industrial factory district heavy metal pollution site

    CN104990976A

  • Ultraviolet spectrum water quality abnormality detection method based on multi-scale sliding window principal component analysis

    CN108801950A