Water quality monitoring method and device, electronic equipment and storage medium
By acquiring and preprocessing time series of water quality indicators, identifying characteristic values and differential indicators, and using quantum dot spectral sensors for water quality monitoring, the problem of accuracy in identifying water quality anomalies has been solved, enabling timely and accurate water quality monitoring.
Patent Information
- Application Number
- CN202512031335.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-10
AI Technical Summary
In existing technologies, the accuracy of identifying abnormal data in water quality monitoring is insufficient, leading to untimely or incorrect judgments of water quality anomalies, which affects the effectiveness of water body protection.
By acquiring time series of water quality indicators for different time periods, preprocessing them, determining characteristic values and differential indicators, generating alarm information to identify water quality data anomalies, and using quantum dot spectral sensors for real-time monitoring and data analysis.
It has improved the accuracy and timeliness of water quality monitoring, reduced false alarms, and enhanced the reliability and accuracy of water pollution alarms.
Smart Images

Figure CN121831072A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of water environment monitoring technology, and in particular to a water quality monitoring method and apparatus, electronic equipment and storage medium. Background Technology
[0002] Water resources are essential for human survival. With decades of rapid economic development, water quality abnormalities have become increasingly frequent, necessitating water quality monitoring to promptly detect and address these anomalies, thereby protecting water bodies.
[0003] Abnormal data refers to sudden and unexpected drastic fluctuations in data during the data acquisition process, such as a sharp increase in value or irregular data oscillations. This phenomenon may be caused by various equipment or system disturbances, or by abnormal water quality (pollution, etc.) in the water body itself.
[0004] On the one hand, it is necessary to identify abnormal data promptly and accurately from massive amounts of dynamically changing data; on the other hand, if abnormal data caused by equipment, operating conditions, etc., is used to judge water quality anomalies, the accuracy of the judgment will be severely affected, potentially leading to the failure to treat water bodies with abnormal water quality in a timely manner, or resulting in misjudgments and wasted human and material resources. Therefore, accurately and promptly identifying abnormal data and improving the accuracy of water quality monitoring is extremely important. However, the accuracy of abnormal data identification in related technologies needs to be improved. Summary of the Invention
[0005] In view of this, this disclosure proposes a water quality monitoring scheme.
[0006] According to one aspect of this disclosure, a water quality monitoring method is provided, comprising: acquiring a water quality index time series within a first time period prior to a monitoring time as a first water quality index time series; acquiring a water quality index time series within a second time period prior to the monitoring time as a second water quality index time series, wherein the second time period is longer than the first time period, wherein: the water quality index time series is acquired in situ and in real time by a water environment monitoring device, the water environment monitoring device comprising: a quantum dot spectral sensor; and preprocessing the first water quality index time series and the second water quality index time series to obtain a processed first water quality index time series and a processed second water quality index time series. Water quality index time series; determining a first feature value characterizing the central tendency of the processed first water quality index time series; sorting at least a portion of the data in the processed second water quality index time series according to their numerical values from smallest to largest, and determining a second feature value based on the data whose rank is greater than or equal to a first rank threshold; determining a first difference index based on the first feature value and the second feature value; generating an alarm message containing the start time of the data anomaly when the first difference index meets a first judgment condition, wherein the data anomaly warning is used to indicate that the water quality data anomaly is not caused by water pollution, and the start time of the data anomaly is determined according to the monitoring time.
[0007] In one possible implementation, the method further includes: after the start of the data anomaly, acquiring a water quality index time series within the first time period before the first monitoring time as a third water quality index time series; preprocessing the third water quality index time series to obtain a processed third water quality index time series; determining a third feature value characterizing the central tendency of the processed third water quality index time series; determining a fourth feature value characterizing the central tendency of the processed second water quality index time series; obtaining a second difference index based on the third feature value and the fourth feature value; and generating a stop alarm message containing the end time of the data anomaly when the second difference index meets a second judgment condition, wherein the end time of the data anomaly is determined according to the first monitoring time.
[0008] In one possible implementation, determining the first difference index based on the first feature value and the second feature value includes: determining a first difference between the first feature value and the second feature value; determining a first growth ratio of the first difference relative to the second feature value; using the first growth ratio as the first difference index; and / or, determining a first feature value characterizing the central tendency of the processed first water quality index time series includes: determining the median of the processed first water quality index time series; using the median of the processed first water quality index time series as the first feature value; and / or, the first ranking threshold is any value not less than the 80th percentile and not greater than the 90th percentile.
[0009] In one possible implementation, after sorting at least a portion of the data in the processed second water quality index time series according to their numerical values in ascending order, determining the second feature value based on the data whose ranking is greater than or equal to a first ranking threshold includes: dividing the processed second water quality index time series according to a first duration to obtain multiple first sub-time series; determining the median of each first sub-time series; sorting each median according to its numerical values in ascending order, and using the data equal to the first ranking threshold as the second feature value.
[0010] In one possible implementation, determining the fourth feature value characterizing the central tendency of the processed second water quality index time series includes: dividing the processed second water quality index time series according to a second duration to obtain multiple second sub-time series; determining the median of each second sub-time series and arranging the medians according to the time sequence of each second sub-time series to obtain a second median sequence; determining the median of the second median sequence and using the median of the second median sequence as the fourth feature value; and / or removing alarm information generated by data anomalies from the water pollution alarm information to obtain optimized water pollution alarm information, and issuing water pollution alarms based on the optimized water pollution alarm information.
[0011] In one possible implementation, the method further includes: determining the cause of system disturbance of the water environment monitoring equipment based on the first difference index and the preset correspondence between the first difference index and the cause of system disturbance; and / or, in the absence of generating alarm information containing the start time of data anomaly, the time interval between any two adjacent monitoring times is a first interval; in the presence of generating alarm information containing the start time of data anomaly, the time interval between any two adjacent first monitoring times is a second interval; the first interval is greater than the second interval.
[0012] In one possible implementation, the preprocessing of the first water quality index time series and the second water quality index time series to obtain the processed first water quality index time series and the processed second water quality index time series includes: based on the conductivity data in the water quality index time series, removing moments in the conductivity data that do not meet the preset first condition from the corresponding first water quality index time series and the second water quality index time series, respectively, based on a preset first condition, to obtain the processed first water quality index time series and the processed second water quality index time series; and / or, based on the acquired liquid level data corresponding to the time of the first water quality index time series and the second water quality index time series, removing moments in the liquid level data that do not meet the preset second condition from the corresponding first water quality index time series and the second water quality index time series, respectively, based on a preset second condition, to obtain the processed first water quality index time series and the processed second water quality index time series.
[0013] According to another aspect of this disclosure, a water quality monitoring device is provided, comprising:
[0014] The first water quality index time series acquisition unit is used to acquire the water quality index time series within the first time period before the monitoring time as the first water quality index time series.
[0015] The second water quality index time series acquisition unit is used to acquire the water quality index time series within a second time period before the monitoring time as the second water quality index time series, wherein the second time period is longer than the first time period.
[0016] The first preprocessing unit is used to preprocess the first water quality index time series and the second water quality index time series to obtain the processed first water quality index time series and the processed second water quality index time series.
[0017] The first feature value determination unit is used to determine the first feature value that characterizes the central tendency of the time series of the first water quality index after treatment;
[0018] The second feature value determination unit is used to sort at least a portion of the data in the processed second water quality index time series according to the numerical values from smallest to largest, and then determine the second feature value based on the data whose ranking is greater than or equal to the first ranking threshold.
[0019] The first difference index determination unit is used to determine the first difference index based on the first feature value and the second feature value;
[0020] An alarm unit is used to generate alarm information containing the start time of data anomaly when the first difference index meets the first judgment condition. The alarm information is used to indicate that the water quality data anomaly is not caused by water pollution. The start time of data anomaly is determined according to the monitoring time. The water quality index time series is collected in situ and in real time by water environment monitoring equipment, which includes a quantum dot spectral sensor.
[0021] In one possible implementation, the device further includes:
[0022] The third water quality indicator time series acquisition unit is used to acquire the water quality indicator time series within the first time period before the first monitoring time after the start of the data anomaly as the third water quality indicator time series.
[0023] The second preprocessing unit is used to preprocess the time series of the third water quality index to obtain the processed time series of the third water quality index.
[0024] The third feature value determination unit is used to determine the third feature value that characterizes the central tendency of the time series of the third water quality index after treatment.
[0025] The fourth feature value determination unit is used to determine the fourth feature value that characterizes the central tendency of the time series of the treated second water quality index.
[0026] The second difference index determination unit is used to obtain the second difference index based on the third feature value and the fourth feature value;
[0027] An alarm stop unit is used to generate a stop alarm message containing the end time of the data anomaly when the second difference indicator meets the second judgment condition, wherein the end time of the data anomaly is determined based on the first monitoring time.
[0028] In one possible implementation, the first difference index determining unit is further configured to:
[0029] Determine the first difference between the first feature value and the second feature value;
[0030] Determine a first growth ratio of the first difference relative to the second characteristic value;
[0031] The first growth rate is used as the first difference indicator;
[0032] And / or,
[0033] The first feature value determination unit is further configured to:
[0034] Determine the median of the time series of the first water quality index after processing, and use the median of the time series of the first water quality index after processing as the first feature value;
[0035] And / or,
[0036] The first ranking threshold is any value that is not less than the 80th percentile and not greater than the 90th percentile.
[0037] In one possible implementation, the second feature value determining unit is further configured to:
[0038] According to the first duration, the time series of the processed second water quality index is divided into multiple first sub-time series;
[0039] Determine the median of each first sub-time series;
[0040] The medians are sorted in ascending order of value, and the data that is equal to the first ranking threshold is used as the second feature value.
[0041] In one possible implementation, the fourth feature value determining unit is further configured to:
[0042] According to the second duration, the time series of the processed second water quality index is divided into multiple second sub-time series;
[0043] The median of each second sub-time series is determined, and the medians are arranged according to the time sequence of each second sub-time series to obtain the second median sequence;
[0044] The median of the second median sequence is determined, and the median of the second median sequence is used as the fourth feature value; and / or, it further includes: a water pollution alarm unit, used to remove alarm information generated by data anomalies from the water pollution alarm information to obtain optimized water pollution alarm information, and to issue a water pollution alarm based on the optimized water pollution alarm information.
[0045] In one possible implementation, the device further includes:
[0046] The system disturbance cause determination unit is used to determine the system disturbance cause of the water environment monitoring equipment based on the first difference index and the preset correspondence between the first difference index and the system disturbance cause.
[0047] And / or, if no alarm information containing the start time of the data anomaly is generated, the time interval between any two adjacent monitoring times is a first interval; if an alarm information containing the start time of the data anomaly is generated, the time interval between any two adjacent first monitoring times is a second interval; the first interval is greater than the second interval.
[0048] In one possible implementation, the first preprocessing unit is further configured to:
[0049] Based on the conductivity data in the water quality index time series, and according to a preset first condition, the moments in the conductivity data that do not meet the preset first condition are removed from the corresponding first water quality index time series and second water quality index time series, respectively, to obtain the processed first water quality index time series and the processed second water quality index time series; and / or,
[0050] Based on the liquid level data obtained that corresponds to the time series of the first water quality index and the second water quality index, and based on a preset second condition, the times in the liquid level data that do not meet the preset second condition are removed from the corresponding first water quality index time series and the second water quality index time series, respectively, to obtain the processed first water quality index time series and the processed second water quality index time series.
[0051] According to another aspect of this disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-described method.
[0052] According to another aspect of this disclosure, a non-volatile computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the above-described method.
[0053] According to another aspect of this disclosure, a computer program product is provided, including a computer program or a non-volatile computer-readable storage medium carrying the computer program, wherein the computer program, when executed by a processor, implements the steps of the above-described method.
[0054] In this embodiment, a first difference index is determined based on a first feature value and a second feature value. The second feature value is calculated based on data (head data) in the second water quality indicator time series that rank greater than or equal to a first rank threshold. Therefore, the second feature value highlights the head data of the second water quality indicator time series, rather than focusing on the entire time series. This ensures that even if the second water quality indicator time series exhibits periodic changes, the first difference index can accurately reflect the difference between the first and second water quality indicator time series, reducing the probability of this difference being obscured by periodically changing water quality indicator data. This makes data anomaly identification more accurate and reliable, improves the accuracy of water pollution alarms, and reduces false alarms.
[0055] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0056] The accompanying drawings, which are included in and form part of this specification, illustrate exemplary embodiments, features, and aspects of this disclosure together with the specification and serve to explain the principles of this disclosure.
[0057] Figure 1 This is a flowchart illustrating the abnormal data identification method provided in an embodiment of the present disclosure.
[0058] Figure 2 This is a schematic diagram of the structure of the abnormal data identification device provided in an embodiment of the present disclosure.
[0059] Figure 3 This is a schematic diagram of the structure of an electronic device for identifying abnormal data provided in an embodiment of this disclosure. Detailed Implementation
[0060] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0061] As used herein, the terms “comprising,” “including,” “having,” or variations thereof are open-ended and include one or more of the stated features, integrals, elements, steps, components, or functions, but do not exclude the presence or addition of one or more other features, integrals, elements, steps, components, functions, or groups thereof.
[0062] When an element is referred to as “connected,” “coupled,” “responding,” or a variation thereof relative to another element, it may be directly connected, coupled, or responding to another element, or there may be an intermediate element present.
[0063] Although the terms first, second, third, etc., may be used herein to describe various elements / operations, these elements / operations should not be limited by these terms. These terms are only used to distinguish one element / operation from another. Therefore, without departing from the teachings of the inventive concept, a first element / operation in some embodiments may be referred to as a second element / operation in other embodiments.
[0064] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0065] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.
[0066] Figure 1 This is a schematic flowchart illustrating a water quality monitoring method provided in an embodiment of this disclosure. The method includes:
[0067] S1, obtain the water quality index time series within the first time period before the monitoring time as the first water quality index time series.
[0068] In this embodiment, the monitoring time can be one or more preset times. The time interval between any two adjacent monitoring times can be the same, different, or partially the same. For example, a monitoring time can be set at equal time intervals, resulting in multiple monitoring times over time. The time interval between two adjacent monitoring times can be shortened according to actual needs to improve the timeliness of identifying abnormal data. The first time period can be a preset duration, such as 30 minutes or one hour. The interval between monitoring times can be equal to or greater than the monitoring frequency of the water environment monitoring equipment. Water quality index time series data are collected in situ and in real time by the water environment monitoring equipment.
[0069] In this embodiment of the disclosure, water quality indicator data can be collected in a time sequence by a water environment monitoring device within a first time period, and these water quality indicator data can be arranged according to the collection time sequence to obtain a first water quality indicator time series. The objects monitored by the water environment monitoring device can include various water bodies, such as rivers, lakes, groundwater, reservoirs, and pipe network water bodies.
[0070] Water quality indicators may include at least two of the following: chemical oxygen demand (COD), conductivity, refractive index, ammonia nitrogen, total hardness, temperature, pH value, turbidity, total organic carbon, five-day biochemical oxygen demand (BOD5), total phosphorus, total nitrogen, suspended solids, total dissolved solids, petroleum hydrocarbons, anionic surfactants, cyanide, sulfide, fluoride, organophosphorus compounds, sulfate, mercury, chromium, cadmium, arsenic, lead, nickel, beryllium, silver, selenium, copper, zinc, manganese, iron, volatile phenols, benzene series compounds, aniline compounds, and nitrobenzene, etc. The time series of different types of water quality indicators can be determined according to actual needs. This disclosure does not limit this. Water environment monitoring equipment may include: quantum dot spectral sensors, and the real-time measurement frequency of the water environment monitoring equipment can be 3-60 minutes / time.
[0071] S2, obtain the water quality index time series within a second time period before the monitoring time as the second water quality index time series, where the second time period is longer than the first time period.
[0072] The second time period can be a preset duration longer than the first time period. For example, the second time period can be 60 hours or 72 hours. In this embodiment of the present disclosure, the water environment monitoring equipment can collect water quality index data in chronological order during the second time period, and arrange these water quality index data in chronological order to obtain the second water quality index time series.
[0073] In one example, the first time period can be 1 hour and the second time period can be 72 hours, so that the accuracy of identifying abnormal data can be improved when using the water quality index data collected by the aforementioned water environment monitoring equipment.
[0074] The time series of the first water quality indicator and the time series of the second water quality indicator can be the time series corresponding to the same water quality indicator.
[0075] S3, preprocess the first water quality index time series and the second water quality index time series to obtain the processed first water quality index time series and the processed second water quality index time series.
[0076] In this embodiment, preprocessing can remove interfering data from the time series of the first and second water quality indicators. The processed time series of the first and second water quality indicators more accurately reflect the true water quality situation and improve the accuracy of anomaly warnings.
[0077] S4, determine a first characteristic value that characterizes the central tendency of the time series of the first water quality index after treatment.
[0078] The first eigenvalue can be a statistic used to characterize the typical characteristics of water quality index data collected in the first time period before the monitoring time, or it can be a statistic used to characterize the central position of the processed first water quality index time series. The first eigenvalue can be the median, mean, or mode of the processed first water quality index time series, etc.
[0079] The first characteristic value can be calculated using all or part of the water quality index data in the processed first water quality index time series. Alternatively, it can be obtained by using an intermediate value calculated from all the water quality index data in the processed first water quality index time series, and then using that intermediate value for further calculation to obtain the first characteristic value.
[0080] S5, after sorting at least a portion of the data in the processed second water quality index time series according to the numerical values from smallest to largest, the second feature value is determined based on the data whose ranking is greater than or equal to the first ranking threshold.
[0081] In this embodiment of the disclosure, all or at least a portion of the water quality index data (i.e., representative water quality index data in the processed second water quality index time series) can be arranged in ascending order of value. Each water quality index data participating in the arrangement can correspond to a rank, and water quality index data with a rank greater than or equal to a preset first rank threshold are selected. For ease of description, water quality index data with a rank greater than or equal to the preset first rank threshold can be named header data. The number of header data can be one or more. One of the one or more header data can be arbitrarily selected as the second feature value. Alternatively, the maximum value among the one or more header data can be used as the second feature value; or, the average value among the one or more header data can be used as the second feature value.
[0082] S6. Based on the first feature value and the second feature value, determine the first difference index.
[0083] The first difference index can be an indicator that quantifies the difference between the first characteristic value and the second characteristic value. In this embodiment of the disclosure, the first difference index can characterize the growth rate of the treated first water quality indicator time series compared to the treated second water quality indicator time series. For example, the first difference index can be the growth amount or growth rate of the first characteristic value compared to the second characteristic value.
[0084] S7, if the first difference index meets the first judgment condition, generate alarm information including the start time of the data anomaly, the alarm information is used to indicate that the water quality data anomaly is not caused by water pollution, and the start time of the data anomaly is determined according to the monitoring time.
[0085] The first judgment condition can be that the first difference index is greater than the first difference threshold. If the first difference index does not meet the first judgment condition, it means that the growth rate of the processed second water quality index time series compared to the processed first water quality index series is limited, and no abnormal data has appeared, so no alarm information is issued. If the first difference index meets the first judgment condition, it means that the processed second water quality index time series has a significant growth rate compared to the processed first water quality index series, and the growth rate can indicate the presence of abnormal data, and an alarm information including the start time of the data anomaly can be generated. In addition, the start time of the data anomaly and the corresponding monitoring point information can be recorded in the alarm table. The abnormal data here can be jump data. The start time of the data anomaly is determined based on the monitoring time. That is, the monitoring time corresponding to the water quality index time series when the data anomaly is judged can be used as the start time of the abnormal data. For example, the water quality index time series in the first time period before 9 o'clock (monitoring time) is obtained as the first water quality index time series, and the water quality index time series in the second time period before 9 o'clock (monitoring time) is obtained as the second water quality index time series. The first water quality index time series and the second water quality index time series are preprocessed to obtain the processed first water quality index time series and the processed second water quality index time series. The first feature value, the second feature value, and the first difference index are obtained. If the first difference index meets the first judgment condition, it is considered that there is a data anomaly. At this time, 9 o'clock (monitoring time) is taken as the start time of the abnormal data.
[0086] In this embodiment, a first difference index is determined based on a first feature value and a second feature value. The second feature value is calculated based on data (head data) in the processed second water quality index time series that rank greater than or equal to a first rank threshold. Therefore, the second feature value highlights the head data of the processed second water quality index time series, rather than focusing on the entire processed second water quality index time series. Thus, even if the processed second water quality index time series exhibits periodic changes, the first difference index can accurately reflect the difference between the processed first water quality index time series and the processed second water quality index time series, reducing the probability of this difference being obscured by periodically changing water quality index data. This makes data anomaly identification more accurate and reliable, improves the availability of water quality monitoring data, enhances the accuracy of water pollution alarms, and reduces false alarms.
[0087] In one possible implementation, the method further includes: after the start time of the data anomaly (e.g., 9:00 AM), acquiring the water quality index time series within the first time period before the first monitoring time as a third water quality index time series; preprocessing the third water quality index time series to obtain a processed third water quality index time series; determining a third feature value characterizing the central tendency of the processed third water quality index time series; determining a fourth feature value characterizing the central tendency of the processed second water quality index time series; obtaining a second difference index based on the third feature value and the fourth feature value; and generating a stop alarm message containing the end time of the data anomaly when the second difference index meets a second judgment condition, wherein the end time of the data anomaly is determined according to the first monitoring time.
[0088] The first monitoring moment can be either after the start of the data anomaly or during the occurrence of the anomaly. Multiple first monitoring moments can exist during the occurrence of the anomaly. Water environment monitoring equipment can collect water quality indicator data in chronological order from a first time period preceding this first monitoring moment, and arrange these water quality indicator data according to the collection time sequence to obtain a third water quality indicator time series. The third water quality indicator time series can contain the same types of water quality indicator data as the first or second water quality indicator time series.
[0089] In this embodiment, preprocessing can remove interfering data from the time series of the third water quality indicator. The processed time series of the third and second water quality indicators more accurately reflect the true water quality situation, improving the accuracy of anomaly warnings. The preprocessing of the third water quality indicator time series can be the same as the preprocessing of the first and second water quality indicator time series.
[0090] The third eigenvalue can be a statistic used to characterize the typical characteristics of water quality index data collected in the first time period before the alarm time, or it can be a statistic used to characterize the central position of the processed third water quality index time series. The third eigenvalue can be the median, mean, or mode of the processed third water quality index time series, etc.
[0091] The fourth characteristic value can be a statistic used to characterize the typical characteristics of water quality index data collected in the second time period prior to the monitoring time, or it can be a statistic used to characterize the central position of the processed second water quality index time series. The fourth characteristic value can be the median, mean, or mode of the processed second water quality index time series, etc.
[0092] The second difference index can be an indicator that quantifies the difference between the third and fourth eigenvalues. For example, the second difference index can be the amount or rate of decrease of the third eigenvalue compared to the fourth eigenvalue.
[0093] In this embodiment of the disclosure, the second difference index can characterize the difference in data stationarity between the processed third water quality index time series and the processed second water quality index time series.
[0094] The second criterion can be that the second difference index is less than the second difference threshold. In this embodiment of the disclosure, the time series of the second water quality index can be regarded as a normal and stable water quality index time series.
[0095] If the second difference indicator does not meet the second judgment condition, it means that the processed third water quality indicator time series still has a significant difference in data stability compared to the processed second water quality indicator time series, and the data is still abnormal; therefore, the alarm message will continue to be issued. If the second difference indicator meets the second judgment condition, it means that the processed third water quality indicator time series has similar data stability compared to the processed second water quality indicator series, and the third water quality indicator time series is recovering or has already recovered to a normal level; then, a stop alarm message containing the end time of the data anomaly can be generated. Additionally, the end time of the data anomaly can be recorded in the alarm table.
[0096] In this embodiment of the disclosure, after the start of the data anomaly, water quality index data can be monitored at each first monitoring time to promptly detect data recovery to normal. Furthermore, using the third and fourth feature values to determine the second difference index can accurately characterize the difference between the third and second water quality index time series while reducing computational load. Therefore, the method of this embodiment can improve the timeliness of determining when to stop data anomalies. It can also reduce the probability of mistaking normal data for abnormal data, improving the usability of the collected water quality index data. The end time of the data anomaly is determined based on the first monitoring time. For example, if 9:00 AM is the start time of the data anomaly, and 10:00 AM is the first monitoring time to begin acquiring the third water quality index time series, calculating the third feature value, fourth feature value, and second difference index, if the second difference index does not meet the second judgment condition, then the next round of acquiring and judging the third water quality index time series is performed; if the second difference index does not meet the second judgment condition, then 10:00 AM is taken as the end time of the data anomaly.
[0097] In one possible implementation, determining the first difference index based on the first feature value and the second feature value includes: determining a first difference between the first feature value and the second feature value; determining a first growth ratio of the first difference relative to the second feature value; using the first growth ratio as the first difference index; and / or, determining a first feature value characterizing the central tendency of the processed first water quality index time series includes: determining the median of the processed first water quality index time series; using the median of the processed first water quality index time series as the first feature value; and / or, the first ranking threshold is any value not less than the 80th percentile and not greater than the 90th percentile.
[0098] In this embodiment, using the first growth rate can more intuitively and accurately show the growth rate of the processed second water quality index time series compared to the processed first water quality index time series, using the processed first water quality index time series as a benchmark, thus improving the reliability of issuing alarm information. Furthermore, using the median of the processed first water quality index time series as the first feature value can improve the accuracy of the first feature value in representing the central tendency of the first water quality index time series, thereby improving the accuracy of anomaly alarms.
[0099] Setting the first ranking threshold to any quantile between the 80th and 90th percentiles ensures that the first feature value is compared only with the head data in the processed second water quality index time series, improving the accuracy of issuing alarm information; while minimizing comparison with extreme values in the head data, thus improving the reliability of issuing alarm information.
[0100] In one possible implementation, obtaining the second difference index based on the third feature value and the fourth feature value includes: determining a second difference between the third feature value and the fourth feature value; determining a second growth ratio of the second difference relative to the fourth feature value; using the second growth ratio as the second difference index; and / or, determining the third feature value characterizing the central tendency of the time series of the treated third water quality index includes: determining the median of the time series of the treated third water quality index, and using the median of the time series of the treated third water quality index as the third feature value.
[0101] In this embodiment, using the second growth ratio can more intuitively and accurately demonstrate the difference in data stability between the processed third water quality index time series and the processed second water quality index time series, using the processed second water quality index time series as a benchmark, thus improving the reliability of determining whether to stop the alarm. Furthermore, using the median of the processed third water quality index time series as the third feature value can improve the accuracy of the third feature value in characterizing the central tendency of the processed third water quality index time series, thereby improving the reliability of determining whether to stop the alarm.
[0102] In one possible implementation, after sorting at least a portion of the data in the processed second water quality index time series according to their numerical values in ascending order, determining the second feature value based on the data whose ranking is greater than or equal to a first ranking threshold includes: dividing the processed second water quality index time series according to a first duration to obtain multiple first sub-time series; determining the median of each first sub-time series; sorting each median according to its numerical values in ascending order, and using the data equal to the first ranking threshold as the second feature value.
[0103] In this embodiment, a first time window can be set, and the length of the first time window can be a first duration. The first time window can slide on the processed second water quality index time series, with a sliding step size of the first duration. This divides the processed second water quality index time series into multiple first sub-time series. The first duration can be set according to actual needs. The first duration can be less than one-thirtieth of the duration of the corresponding second time period. This reduces the amount of data for subsequent calculations while accurately determining the second feature value. For example, if the second time period is 72 hours, the first duration can be 1 hour.
[0104] Each first sub-time series can correspond to a median. Sort the medians in ascending order to obtain the first median sequence. A single data point in the first median sequence is a single median. Each data point in the first median sequence can correspond to a rank. The rank represents the position of the data point (median) in the first median sequence. The rank also represents the relationship between each data point (median) and other data points in the first median sequence. Data points with a rank equal to the first rank threshold can be used as second feature values.
[0105] In this embodiment, sorting the data in the first median sequence by size and selecting data whose rank equals the first rank threshold results in a smaller data volume compared to performing the same sorting and selection operation on the processed second water quality index time series. Since the median can characterize the central tendency of each first sub-time series, the first median sequence can retain the central tendency of the second water quality index time series, thus maintaining the accuracy of the second eigenvalue. Therefore, using the method of this embodiment, the amount of data processing can be reduced and the efficiency of determining the second eigenvalue can be improved while ensuring the accuracy of the second eigenvalue.
[0106] In one possible implementation, determining the fourth feature value characterizing the central tendency of the processed second water quality index time series includes: dividing the processed second water quality index time series according to a second duration to obtain multiple second sub-time series; determining the median of each second sub-time series and arranging the medians according to the time sequence of each second sub-time series to obtain a second median sequence; determining the median of the second median sequence and using the median of the second median sequence as the fourth feature value.
[0107] In this embodiment, a second time window can be set, and the length of the second time window can be a second duration. The second time window can slide on the processed second water quality index time series, with a sliding step size of the second duration. This divides the processed second water quality index time series into multiple second sub-time series. The second duration can be set according to actual needs. The second duration can be equal to the first duration. The second duration can be less than one-thirtieth of the corresponding duration of the second time period. This reduces the amount of data for subsequent calculations and allows for accurate determination of the fourth feature value. For example, if the second time period is 72 hours, the second duration can be 1 hour.
[0108] Each second sub-time series can correspond to a median. Since the second sub-time series are sequential, the medians can be sorted according to their temporal order to obtain the second median sequence. As mentioned earlier, the fourth eigenvalue can be used to characterize the central tendency of the processed second water quality index time series. Furthermore, the second median sequence is a sequence composed of the medians of the second sub-time series divided from the processed second water quality index time series. Therefore, the eigenvalue characterizing the central tendency of the second median sequence can be used as the eigenvalue characterizing the central tendency of the processed second water quality index time series. That is, the median of the second median sequence can be used as the fourth eigenvalue.
[0109] When water quality index data exhibits periodic variations, the processed second water quality index time series is first divided into multiple second sub-time series. The median of the median of each sub-time series (the fourth eigenvalue) is then determined. This fourth eigenvalue is more robust to local outliers in the processed second water quality index time series. The fourth eigenvalue characterizes the central tendency of the processed second water quality index time series while preserving its periodicity. This further improves the accuracy of alarm termination determination in scenarios where water quality index data exhibits periodic variations.
[0110] In one possible implementation, the method further includes: determining the cause of system disturbance of the water environment monitoring equipment based on the first difference index and the preset correspondence between the first difference index and the cause of system disturbance.
[0111] System disturbances in water quality monitoring equipment can generate abnormal data. Different causes of these disturbances will result in varying degrees of aberration relative to normal data. These disturbances can be caused by abnormal equipment conditions and environmental conditions, specifically sensor malfunctions, signal interference, power supply issues, temperature problems, aquatic organism problems, and cleaning brush malfunctions. For example, the magnitude of aberrations caused by signal interference and calibration problems can differ for abrupt data changes.
[0112] Therefore, a correspondence between system disturbance causes and the first difference index can be established in advance. This correspondence can be represented by each system disturbance cause corresponding to a value range. Once the first difference index is determined, the target value range into which the first difference index falls can be determined. The target value range can be one of the value ranges in the aforementioned correspondence. The system disturbance cause corresponding to the target value range can be used as the system disturbance cause of the water environment monitoring equipment.
[0113] In this embodiment of the disclosure, the cause of equipment system disturbance can be determined while monitoring abnormal data, which improves the efficiency of system disturbance identification and can eliminate equipment system disturbance in a timely manner, thereby improving the availability of water quality index data.
[0114] In one possible implementation, when no alarm information containing the start time of the data anomaly is generated, the time interval between any two adjacent monitoring times is a first interval; when an alarm information containing the start time of the data anomaly is generated, the time interval between any two adjacent first monitoring times is a second interval; the first interval is greater than the second interval.
[0115] In most cases, the data collected by water environment monitoring equipment is normal. The frequency of acquiring abnormal data is lower than the frequency of acquiring normal data. Furthermore, after an alarm is issued, system disturbances can be promptly investigated and eliminated, so the duration of acquiring abnormal data is also shorter than the duration of acquiring normal data. Therefore, setting the second interval to be shorter than the first interval increases the frequency of checking whether the data has returned to normal after anomaly detection. This allows for timely identification of data recovery, stopping alarm issuance, reducing data discard, and improving data usability.
[0116] In some optional implementations, this application can adjust the duration of the first and second time periods to ensure that the identified jump data is not caused by pollution, or further determine the cause of the jump based on the identified jump data to find jump data not caused by pollution. The method also includes: removing alarm information generated by data anomalies from the water pollution alarm information to obtain optimized water pollution alarm information, and issuing water pollution alarms based on the optimized water pollution alarm information. This can improve the accuracy of water pollution alarms and reduce false alarms. The water pollution alarm information is based on water quality data (data from the same time period as the data used for anomaly data judgment, or data from the same monitoring location), analyzed or calculated according to preset rules or models to obtain alarm information about water pollution. After obtaining the alarm information, it is further determined whether alarm information exists within a set time period or time before the alarm time; if so, it is removed to reduce false alarms.
[0117] In one possible implementation, the preprocessing of the first water quality index time series and the second water quality index time series to obtain the processed first water quality index time series and the processed second water quality index time series includes: based on the conductivity data in the water quality index time series, removing moments in the conductivity data that do not meet the preset first condition from the corresponding first water quality index time series and the second water quality index time series, respectively, based on a preset first condition, to obtain the processed first water quality index time series and the processed second water quality index time series; and / or, based on the acquired liquid level data corresponding to the time of the first water quality index time series and the second water quality index time series, removing moments in the liquid level data that do not meet the preset second condition from the corresponding first water quality index time series and the second water quality index time series, respectively, based on a preset second condition, to obtain the processed first water quality index time series and the processed second water quality index time series.
[0118] Water quality time series can include conductivity time series, as well as water quality time series other than initial conductivity, such as chemical oxygen demand time series.
[0119] The first condition can be that the conductivity is less than a conductivity threshold. In this embodiment, conductivity data in the conductivity time series that are less than the conductivity threshold can be used as target conductivity data, and the time corresponding to the target conductivity data can be used as the first target time. Data corresponding to the first target time is removed from the first water quality index time series and the second water quality index time series to obtain the processed first water quality index time series and the processed second water quality index time series. Alternatively, data corresponding to the first target time can be removed from the third water quality index time series and the second water quality index time series to obtain the processed third water quality index time series and the processed second water quality index time series.
[0120] The second condition can be that the liquid level is less than a liquid level threshold. In this embodiment, the liquid level at the location of the water environment monitoring equipment measuring the water quality indicators can be acquired according to the frequency of acquiring water quality indicators, resulting in a liquid level time series. This ensures that the liquid level time series is time-matched with the water quality indicator time series. The water quality indicator time series can include a first water quality indicator time series and a second water quality indicator time series. The water quality indicator time series can also include a third water quality indicator time series. In this embodiment, liquid level data below the liquid level threshold in the liquid level time series can be used as target liquid level data, and the time corresponding to the target liquid level data can be used as a second target time. Data corresponding to the second target time in the first and second water quality indicator time series is removed to obtain processed first and second water quality indicator time series. Alternatively, data corresponding to the second target time in the third water quality indicator time series can be removed to obtain a processed third water quality indicator time series.
[0121] Figure 2 This is a schematic diagram of the water quality monitoring device provided in an embodiment of the present disclosure. The device 20 is used for abrupt data identification and includes:
[0122] The first water quality index time series acquisition unit 21 is used to acquire the water quality index time series within a first time period before the monitoring time as the first water quality index time series.
[0123] The second water quality index time series acquisition unit 22 is used to acquire the water quality index time series within a second time period before the monitoring time as the second water quality index time series, wherein the second time period is longer than the first time period.
[0124] The first preprocessing unit 23 is used to preprocess the first water quality index time series and the second water quality index time series to obtain the processed first water quality index time series and the processed second water quality index time series.
[0125] The first feature value determination unit 24 is used to determine a first feature value that characterizes the central tendency of the time series of the first water quality index after treatment;
[0126] The second feature value determination unit 25 is used to sort at least a portion of the data in the processed second water quality index time series according to the numerical values from smallest to largest, and then determine the second feature value based on the data whose ranking is greater than or equal to the first ranking threshold.
[0127] The first difference index determination unit 26 is used to determine the first difference index based on the first feature value and the second feature value;
[0128] Alarm unit 27 is used to generate alarm information including the start time of data anomaly when the first difference index meets the first judgment condition. The alarm information is used to indicate that the water quality data anomaly is not caused by water pollution. The start time of data anomaly is determined according to the monitoring time. The water quality index time series is collected in situ and in real time by water environment monitoring equipment. The water environment monitoring equipment includes a quantum dot spectral sensor.
[0129] In one possible implementation, the device 20 further includes:
[0130] The third water quality indicator time series acquisition unit is used to acquire the water quality indicator time series within the first time period before the first monitoring time after the start of the data anomaly as the third water quality indicator time series.
[0131] The second preprocessing unit is used to preprocess the time series of the third water quality index to obtain the processed time series of the third water quality index.
[0132] The third feature value determination unit is used to determine the third feature value that characterizes the central tendency of the time series of the third water quality index after treatment.
[0133] The fourth feature value determination unit is used to determine the fourth feature value that characterizes the central tendency of the time series of the treated second water quality index.
[0134] The second difference index determination unit is used to obtain the second difference index based on the third feature value and the fourth feature value;
[0135] The alarm stop unit is used to generate stop alarm information including the end time of data abnormality when the second difference index meets the second judgment condition, wherein the end time of data abnormality is determined according to the first monitoring time.
[0136] In one possible implementation, the first difference index determining unit 26 is further configured to:
[0137] Determine the first difference between the first feature value and the second feature value;
[0138] Determine a first growth ratio of the first difference relative to the second characteristic value;
[0139] The first growth rate is used as the first difference indicator;
[0140] And / or,
[0141] The first feature value determination unit 24 is further configured to:
[0142] Determine the median of the time series of the first water quality index after processing, and use the median of the time series of the first water quality index after processing as the first feature value;
[0143] And / or,
[0144] The first ranking threshold is any value that is not less than the 80th percentile and not greater than the 90th percentile.
[0145] In one possible implementation, the second feature value determining unit 25 is further configured to:
[0146] According to the first duration, the time series of the processed second water quality index is divided into multiple first sub-time series;
[0147] Determine the median of each first sub-time series;
[0148] The medians are sorted in ascending order of value, and the data that is equal to the first ranking threshold is used as the second feature value.
[0149] In one possible implementation, the fourth feature value determining unit is further configured to:
[0150] According to the second duration, the time series of the processed second water quality index is divided into multiple second sub-time series;
[0151] The median of each second sub-time series is determined, and the medians are arranged according to the time sequence of each second sub-time series to obtain the second median sequence;
[0152] The median of the second median sequence is determined, and the median of the second median sequence is used as the fourth feature value; and / or, it further includes: a water pollution alarm unit, used to remove alarm information generated by data anomalies from the water pollution alarm information to obtain optimized water pollution alarm information, and to issue a water pollution alarm based on the optimized water pollution alarm information.
[0153] In one possible implementation, the device 20 further includes:
[0154] The system disturbance cause determination unit is used to determine the system disturbance cause of the water environment monitoring equipment based on the first difference index and the preset correspondence between the first difference index and the system disturbance cause.
[0155] And / or, if no alarm information containing the start time of the data anomaly is generated, the time interval between any two adjacent monitoring times is the first interval; if an alarm information containing the start time of the data anomaly is generated, the time interval between any two adjacent monitoring times is the second interval; the first interval is greater than the second interval.
[0156] In one possible implementation, the first preprocessing unit 23 is further configured to:
[0157] Based on the conductivity data in the water quality index time series, and according to a preset first condition, the moments in the conductivity data that do not meet the preset first condition are removed from the corresponding first water quality index time series and second water quality index time series, respectively, to obtain the processed first water quality index time series and the processed second water quality index time series; and / or,
[0158] Based on the liquid level data obtained that corresponds to the time series of the first water quality index and the second water quality index, and based on a preset second condition, the times in the liquid level data that do not meet the preset second condition are removed from the corresponding first water quality index time series and the second water quality index time series, respectively, to obtain the processed first water quality index time series and the processed second water quality index time series.
[0159] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0160] This disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.
[0161] This disclosure also provides a non-volatile computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the above-described method.
[0162] This disclosure also provides a computer program product, including a computer program or a non-volatile computer-readable storage medium carrying the computer program, wherein the computer program, when executed by a processor, implements the steps of the above method.
[0163] Figure 3 This is a schematic diagram of the structure of an electronic device for identifying abnormal data provided in an embodiment of this disclosure. For example, the electronic device 1900 can be provided as a server or a terminal device. (Refer to...) Figure 3 The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by the processing component 1922. The application programs stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the methods described above.
[0164] Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input / output interface 1958 (I / O interface). Electronic device 1900 can operate on an operating system, such as Windows Server, stored in memory 1932. TM Mac OS X TM Unix TM Linux TM FreeBSD TM Or similar.
[0165] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by a processing component 1922 of an electronic device 1900 to perform the above-described method.
[0166] Computer-readable storage media can be tangible devices capable of holding and storing programs / instructions used by instruction execution devices. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0167] The computer program (or computer-readable program instructions) described herein can be downloaded from a computer-readable storage medium to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage medium in the respective computing / processing device.
[0168] The computer program (or computer program instructions) used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions to implement various aspects of this disclosure.
[0169] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0170] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0171] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0172] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0173] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A water quality monitoring method, characterized in that, include: The time series of water quality indicators within the first time period before the monitoring time is obtained as the first water quality indicator time series; The water quality index time series within a second time period prior to the monitoring time is obtained as the second water quality index time series. The second time period is longer than the first time period. The water quality index time series is collected in situ and in real time by a water environment monitoring device, which includes a quantum dot spectral sensor. Preprocessing the first water quality index time series and the second water quality index time series yields the processed first water quality index time series and the processed second water quality index time series. Determine a first eigenvalue that characterizes the central tendency of the time series of the first water quality indicator after the treatment; After sorting at least a portion of the data in the processed second water quality index time series according to their numerical values from smallest to largest, the second feature value is determined based on the data whose ranking is greater than or equal to the first ranking threshold. Based on the first feature value and the second feature value, a first difference index is determined; If the first difference index meets the first judgment condition, an alarm message containing the start time of the data anomaly is generated. The alarm message is used to indicate that the water quality data anomaly is not caused by water pollution. The start time of the data anomaly is determined according to the monitoring time.
2. The method according to claim 1, characterized in that, The method further includes: After the start of the data anomaly, the water quality index time series within the first time period before the first monitoring time is obtained as the third water quality index time series. The time series of the third water quality index is preprocessed to obtain the processed time series of the third water quality index. Determine the third eigenvalue that characterizes the central tendency of the time series of the third water quality indicator after the treatment; Determine a fourth characteristic value that characterizes the central tendency of the time series of the second water quality indicator after the treatment; Based on the third and fourth feature values, a second difference index is obtained; If the second difference index meets the second judgment condition, a stop alarm message containing the end time of the data anomaly is generated, and the end time of the data anomaly is determined according to the first monitoring time.
3. The method according to claim 1, characterized in that, The step of determining the first difference index based on the first feature value and the second feature value includes: Determine the first difference between the first feature value and the second feature value; Determine a first growth ratio of the first difference relative to the second characteristic value; The first growth rate is used as the first difference indicator; And / or, Determining a first eigenvalue characterizing the central tendency of the time series of the treated first water quality indicator includes: Determine the median of the time series of the first water quality index after processing, and use the median of the time series of the first water quality index after processing as the first feature value; And / or, The first ranking threshold is any value that is not less than the 80th percentile and not greater than the 90th percentile.
4. The method according to claim 1, characterized in that, After sorting at least a portion of the data in the processed second water quality index time series according to their numerical values from smallest to largest, the second feature value is determined based on the data whose rank is greater than or equal to the first rank threshold, including: According to the first duration, the time series of the processed second water quality index is divided into multiple first sub-time series; Determine the median of each first sub-time series; The medians are sorted in ascending order of value, and the data that is equal to the first ranking threshold is used as the second feature value.
5. The method according to claim 2, characterized in that, The determination of the fourth characteristic value, which characterizes the central tendency of the time series of the treated second water quality index, includes: According to the second duration, the time series of the processed second water quality index is divided into multiple second sub-time series; The median of each second sub-time series is determined, and the medians are arranged according to the time sequence of each second sub-time series to obtain the second median sequence; Determine the median of the second median sequence and use the median of the second median sequence as the fourth feature value; and / or, remove alarm information generated by data anomalies from the water pollution alarm information to obtain optimized water pollution alarm information, and issue water pollution alarms based on the optimized water pollution alarm information.
6. The method according to any one of claims 2-5, characterized in that, The method further includes: Based on the first difference index and the preset correspondence between the first difference index and the cause of system disturbance, the cause of system disturbance of the water environment monitoring equipment is determined; and / or, in the absence of generating alarm information containing the start time of data anomaly, the time interval between any two adjacent monitoring times is the first interval; in the presence of generating alarm information containing the start time of data anomaly, the time interval between any two adjacent first monitoring times is the second interval; the first interval is greater than the second interval.
7. The method according to any one of claims 1-5, characterized in that, The preprocessing of the first water quality index time series and the second water quality index time series to obtain the processed first water quality index time series and the processed second water quality index time series includes: Based on the conductivity data in the water quality index time series, and according to a preset first condition, the moments in the conductivity data that do not meet the preset first condition are removed from the corresponding first water quality index time series and second water quality index time series, respectively, to obtain the processed first water quality index time series and the processed second water quality index time series; and / or, Based on the liquid level data obtained that corresponds to the time series of the first water quality index and the second water quality index, and based on a preset second condition, the times in the liquid level data that do not meet the preset second condition are removed from the corresponding first water quality index time series and the second water quality index time series, respectively, to obtain the processed first water quality index time series and the processed second water quality index time series.
8. A water quality monitoring device, characterized in that, include: The first water quality index time series acquisition unit is used to acquire the water quality index time series within the first time period before the monitoring time as the first water quality index time series. The second water quality index time series acquisition unit is used to acquire the water quality index time series within a second time period before the monitoring time as the second water quality index time series, wherein the second time period is longer than the first time period. The first preprocessing unit is used to preprocess the first water quality index time series and the second water quality index time series to obtain the processed first water quality index time series and the processed second water quality index time series. The first feature value determination unit is used to determine the first feature value that characterizes the central tendency of the time series of the first water quality index after treatment; The second feature value determination unit is used to sort at least a portion of the data in the processed second water quality index time series according to the numerical values from smallest to largest, and then determine the second feature value based on the data whose ranking is greater than or equal to the first ranking threshold. The first difference index determination unit is used to determine the first difference index based on the first feature value and the second feature value; An alarm unit is used to generate alarm information containing the start time of data anomaly when the first difference index meets the first judgment condition. The alarm information is used to indicate that the water quality data anomaly is not caused by water pollution. The start time of data anomaly is determined according to the monitoring time. The water quality index time series is collected in situ and in real time by water environment monitoring equipment, which includes a quantum dot spectral sensor.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.
10. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.