Water quality data abnormal drift identification and alarm method and device and storage medium

By performing local stability detection on the median sequence of water quality data and analyzing sensor data, abnormal drift in the water quality monitoring system is identified and alerted, solving the problem of lack of anomaly identification and alarm in the existing system and improving the accuracy and reliability of water quality monitoring.

CN121453697APending Publication Date: 2026-02-03CORE VISION (BEIJING) TECHNOLOGY CO LTD

Patent Information

Application Number
CN202511775330.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

Existing water quality monitoring systems lack the ability to identify abnormal data drift and provide alarm functions, making it difficult for maintenance personnel to quickly locate problems and take targeted measures, thus affecting the accuracy and reliability of water quality monitoring.

Method used

By acquiring and preprocessing water quality data within a set time period, calculating the local stability of the median sequence for anomaly detection, generating drift judgment results, and determining the cause of abnormal drift based on sensor data from water quality monitoring equipment as system disturbance or external environmental anomaly, alarm information is generated.

Benefits of technology

It improves the accuracy and robustness of identifying abnormal drift in water quality data, reduces false alarms and missed alarms, and enhances the accuracy, reliability, and operation and maintenance efficiency of the water quality monitoring system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121453697A_ABST
    Figure CN121453697A_ABST
Patent Text Reader

Abstract

The invention relates to a water quality data abnormal drift identification and alarm method and device and a storage medium. The method comprises the following steps: acquiring water quality data within a set time length, preprocessing the water quality data, and calculating a median for data in each preset time granularity unit in the processed water quality data to obtain a corresponding median sequence; performing anomaly detection based on the local stability of the median sequence, and generating a drift judgment result when the relatively most stable part in the median sequence significantly changes; and under the condition that the drift judgment result indicates that abnormal drift data exists, determining that an occurrence reason of the abnormal drift is system disturbance based on corresponding data collected by a target sensor in the water quality monitoring equipment, and further generating alarm information aiming at the abnormal drift data. According to the embodiment of the invention, false alarm and missing alarm caused by data drift due to system disturbance can be effectively reduced, and the accuracy, the reliability and the operation maintenance efficiency of the water quality monitoring system are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the field of water quality monitoring, and particularly relates to a water quality data abnormal drift identification and alarm method, device and storage medium. BACKGROUND

[0002] Water quality monitoring is an important part of environmental protection and water resource management. Traditional water quality monitoring methods mainly rely on manual sampling and laboratory analysis, which have problems such as low monitoring efficiency, limited coverage, and inability to monitor in real time. With the acceleration of urbanization, the discharge of industrial wastewater and domestic sewage is increasing, and water pollution problems are becoming increasingly serious, which puts forward higher requirements for water quality monitoring.

[0003] Existing water quality monitoring systems usually only have data collection and storage functions, lack the ability to identify data abnormal drift, and lack related alarm functions. Moreover, once the water quality data abnormally drifts in the existing system, it cannot further diagnose the specific reasons for the abnormal drift, making it difficult for operation and maintenance personnel to quickly locate the problem and take targeted measures, resulting in low accuracy and reliability of water quality monitoring results. Therefore, a new water quality data abnormal drift identification and alarm technology is urgently needed to improve the accuracy and reliability of water quality monitoring. SUMMARY

[0004] In view of this, the present disclosure proposes a water quality data abnormal drift identification and alarm method, device and storage medium.

[0005] According to an aspect of the present disclosure, a water quality data abnormal drift identification and alarm method is provided. The method comprises: obtaining water quality data within a set time length and pre-processing to obtain processed water quality data, wherein the water quality data is collected by a water quality monitoring device according to a set frequency; calculating the median of the data in each preset time granularity unit of the processed water quality data to obtain a median sequence corresponding to the multiple time granularity units; performing abnormal detection based on the local stability of the median sequence, and generating a drift determination result when a relatively most stable part of the median sequence changes significantly, the drift determination result indicating whether there is abnormal drift data in the water quality data, wherein: the abnormal detection based on the local stability of the median sequence, and generating a drift determination result when a relatively most stable part of the median sequence changes significantly, comprises: starting from the Nth time granularity unit of the median sequence, sequentially calculating the relative deviation degree between the median of the Nth time granularity unit and the median of the set of medians of the previous N-1 time granularity units, to obtain a deviation degree sequence composed of multiple relative deviation degrees, wherein N is a positive integer greater than 1; when the minimum relative deviation degree in the deviation degree sequence is greater than a preset deviation threshold, it is determined that there is abnormal drift data in the water quality data; in the case where the drift determination result indicates that there is abnormal drift data, determining the cause of the occurrence of the abnormal drift based on the corresponding data collected by the target sensor in the water quality monitoring device; generating alarm information for the abnormal drift data based on the cause of the occurrence of the abnormal drift.

[0006] In a possible implementation, in the case where the drift determination result indicates that there is abnormal drift data, determining the cause of the occurrence of the abnormal drift based on the data collected by the target sensor in the water quality monitoring device includes: in the case where the drift determination result indicates that there is abnormal drift data, determining the cause of the occurrence of the abnormal drift to be a water quality monitoring device working state abnormality based on the data collected by the target sensor and related to any one or more of the optical system state, the mechanical component state and the device posture state of the water quality monitoring device.

[0007] In a possible implementation, in the case where the drift determination result indicates that there is data of abnormal drift, based on data collected by a target sensor and related to any one or more of an optical system state, a mechanical component state and a device posture state of the water quality monitoring device, a cause of the abnormal drift is determined, including: obtaining spectral data collected by a spectral sensor in the water quality monitoring device as data related to the optical system state of the water quality monitoring device; when the optical system state related data meets a first preset condition, it is determined that the cause of the abnormal drift is an abnormal optical system state of the water quality monitoring device; and / or, obtaining current operation data of a preset component in the water quality monitoring device, comparing the current operation data with pre-stored standard operation data, and when the current operation data exceeds a preset difference, it is determined that the cause of the abnormal drift is an abnormal working state of the preset component in the water quality monitoring device; and / or, obtaining device posture data collected by an image sensor and / or a position sensor in the water quality monitoring device as data related to the device posture state of the water quality monitoring device; when the device posture data meets a third preset condition, it is determined that the cause of the abnormal drift is that the posture of the water quality monitoring device deviates.

[0008] In a possible implementation, in the case where the drift determination result indicates that there is data of abnormal drift, based on data collected by a target sensor in the water quality monitoring device, a cause of the abnormal drift is determined to be system disturbance, including: in the case where the drift determination result indicates that there is data of abnormal drift, based on data collected by the target sensor and related to a time sequence variation feature of a water body contact state and / or a water quality parameter of the water quality monitoring device, it is determined that the cause of the abnormal drift is an external environment anomaly.

[0009] In a possible implementation, in a case where the drift determination result indicates that there is abnormally drifted data, based on data collected by the target sensor and related to the time sequence variation feature of the water quality monitoring device water body contact state and / or water quality parameter, the cause of the abnormal drift is determined to be an external environment anomaly, including: obtaining water level data collected by a water level sensor in the water quality monitoring device and chemical oxygen demand data obtained by a spectrum sensor in the water quality monitoring device through collected spectrum data as data related to the water quality monitoring device water body contact state; when the chemical oxygen demand data meets a fourth preset condition and the water level data meets a seventh preset condition, it is determined that the cause of the abnormal drift is that the water quality monitoring device contacts the water bottom; and / or, obtaining temperature data collected by a temperature sensor in the water quality monitoring device and conductivity data collected by a conductivity sensor as data related to the time sequence variation feature of the water quality parameter; when the temperature data and the conductivity data meet a fifth preset condition, it is determined that the cause of the abnormal drift is that the ambient temperature is abnormal; and / or, obtaining data collected by a dissolved oxygen sensor in the water quality monitoring device, and when the data meets a sixth preset condition, it is determined that the cause of the abnormal drift is that the ambient biological state of the water quality monitoring device is abnormal.

[0010] In a possible implementation, the fifth preset condition includes that the temperature data and the conductivity data both show a downward trend within a first preset time length; and the sixth preset condition includes that the minimum value or the average value of the data collected by the dissolved oxygen sensor within a second preset time length is less than a preset threshold.

[0011] In a possible implementation, the water quality data within a set time length is obtained and preprocessed to obtain processed water quality data, including: based on conductivity data collected by a conductivity sensor in the water quality monitoring device and / or water level data collected by a water level sensor in the water quality monitoring device, removing data in the water quality data that does not meet a preset condition to obtain processed water quality data.

[0012] According to another aspect of the present disclosure, a water quality data abnormal drift identification and alarm device is provided. The device comprises: a preprocessing module configured to obtain water quality data within a set time period and perform preprocessing to obtain processed water quality data, wherein the water quality data is collected by a water quality monitoring device at a set frequency; a first determination module configured to calculate the median of data in each preset time granularity unit in the processed water quality data to obtain a median sequence corresponding to multiple time granularity units; a generation module configured to perform abnormality detection based on the local stability of the median sequence, and generate a drift determination result when a relatively most stable part of the median sequence changes significantly, the drift determination result indicating whether there is abnormal drift data in the water quality data; a second determination module configured to, in a case where the drift determination result indicates that there is abnormal drift data, determine the cause of the abnormal drift based on corresponding data collected by a target sensor in the water quality monitoring device; and an alarm module configured to generate alarm information for the abnormal drift data based on the cause of the abnormal drift.

[0013] In a possible implementation, the second determination module is further configured to, in a case where the drift determination result indicates that there is abnormal drift data, determine the cause of the abnormal drift based on data collected by the target sensor and related to any one or more of an optical system state, a mechanical component state, and a device posture state of the water quality monitoring device.

[0014] In a possible implementation, the second determination module is further configured to: obtain spectral data collected by a spectral sensor in the water quality monitoring device as the data related to the optical system state of the water quality monitoring device; when the optical system state related data satisfies a first preset condition, determine that the cause of the abnormal drift is an optical system state anomaly of the water quality monitoring device; and / or, obtain current operation data of a preset component in the water quality monitoring device, compare the current operation data with pre-stored standard operation data, and when the current operation data exceeds a preset difference, determine that the cause of the abnormal drift is a preset component state anomaly of the water quality monitoring device; and / or, obtain device posture data collected by an image sensor and / or a position sensor in the water quality monitoring device as the data related to the device posture state of the water quality monitoring device; when the device posture data satisfies a third preset condition, determine that the cause of the abnormal drift is a posture deviation of the water quality monitoring device.

[0015] In a possible implementation, the second determination module is further configured to, in a case where the drift determination result indicates that there is abnormal drift data, determine the cause of the abnormal drift based on data collected by the target sensor and related to a water body contact state of the water quality monitoring device and / or a time sequence variation feature of a water quality parameter.

[0016] In a possible implementation, the second determining module is further configured to: acquire water level data collected by a water level sensor in the water quality monitoring device and chemical oxygen demand data obtained by the spectrum sensor in the water quality monitoring device through collected spectrum data as data related to the contact state of the water quality monitoring device with the water body; when the chemical oxygen demand data meets a fourth preset condition and the water level data meets a seventh preset condition, determine that the cause of the abnormal drift is that the water quality monitoring device contacts the water bottom; and / or, acquire temperature data collected by a temperature sensor in the water quality monitoring device and conductivity data collected by a conductivity sensor as data related to the time sequence variation characteristics of the water quality parameter; when the temperature data and the conductivity data meet a fifth preset condition, determine that the cause of the abnormal drift is that the environment temperature of the water quality monitoring device is abnormal; and / or, acquire data collected by a dissolved oxygen sensor in the water quality monitoring device, and when the data meets a sixth preset condition, determine that the cause of the abnormal drift is that the environment biological state of the water quality monitoring device is abnormal.

[0017] In a possible implementation, the fifth preset condition comprises that the temperature data and the conductivity data both show a downward trend within a first preset time length; and the sixth preset condition comprises that the minimum value or the average value of the data collected by the dissolved oxygen sensor within a second preset time length is less than a preset threshold.

[0018] In a possible implementation, the preprocessing module is specifically configured to: according to the conductivity data collected by the conductivity sensor in the water quality monitoring device and / or the water level data collected by the water level sensor in the water quality monitoring device, remove data in the water quality data that does not meet a preset condition to obtain processed water quality data.

[0019] According to another aspect of the present disclosure, there is provided a water quality data abnormal drift identification and alarm device, comprising a memory, a processor and a computer program stored in the memory, the processor executes the computer program to implement the steps of the above method.

[0020] According to another aspect of the present disclosure, there is provided a non-volatile computer readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the steps of the above method.

[0021] According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program, or a non-volatile computer readable storage medium carrying the computer program, the computer program being executed by a processor to implement the steps of the above method.

[0022] According to the embodiment of the present disclosure, by acquiring water quality data within a set time length and preprocessing to obtain processed water quality data, the median of data in each preset time granularity unit in the processed water quality data is calculated respectively to obtain a median sequence corresponding to multiple time granularity units, and the local stability of the median sequence is used for anomaly detection, when the relatively most stable part of the median sequence changes significantly, a drift determination result is generated, which can effectively weaken the influence of single-point noise or short-time fluctuation on the detection result, thereby improving the accuracy and robustness of water quality data anomaly drift identification. In the case where the drift determination result indicates that there is data with abnormal drift, the cause of the occurrence of the abnormal drift is determined to be system disturbance based on the corresponding data collected by the target sensor in the water quality monitoring device, and the corresponding data collected by the target sensor in the water quality monitoring device is a data set monitored synchronously with the above-mentioned water quality data used for anomaly detection, so that intelligent diagnosis of the abnormal drift can be realized. By generating alarm information for the data with abnormal drift based on the cause of the occurrence of the abnormal drift, the alarm result is more accurate and has guidance, which facilitates the operation and maintenance personnel to quickly locate the problem source and take timely measures. The scheme of the embodiment of the present disclosure can effectively reduce false positives and false negatives caused by data drift due to system disturbance, and significantly improve the accuracy, reliability and operation and maintenance efficiency of the water quality monitoring system.

[0023] Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, taken in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0024] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the present disclosure and serve to explain the principles of the present disclosure.

[0025] Figure 1 A flowchart of a water quality data anomaly drift identification and alarm method according to an embodiment of the present disclosure is shown.

[0026] Figure 2 A schematic diagram of data anomaly according to an embodiment of the present disclosure is shown.

[0027] Figure 3 A structure diagram of a water quality data anomaly drift identification and alarm device according to an embodiment of the present disclosure is shown.

[0028] Figure 4 A block diagram of a device 1900 for water quality data anomaly drift identification and alarm according to an exemplary embodiment is shown. DETAILED DESCRIPTION

[0029] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numbers in different drawings represent the same or similar elements / functionally similar elements. Although various aspects of embodiments are illustrated in the drawings, the drawings are not necessarily drawn to scale unless specifically noted.

[0030] As used herein, the terms "comprise", "comprising", "have", "having", "include", "including", "contain", "containing", or variants thereof are open-ended, and include one or more stated features, integers, elements, steps, components or functions but do not preclude the presence or addition of one or more other features, integers, elements, steps, components, functions or groups thereof.

[0031] When an element is referred to as being "connected", "coupled", "responsive", or variants thereof to another element, it can be directly connected, coupled, or responsive to the other element, or intervening elements can be present.

[0032] Although the terms first, second, third, etc. can 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 element / operation. Thus, a first element / operation in some embodiments could be termed a second element / operation in other embodiments without departing from the teachings of the present inventive concept.

[0033] The word "exemplary" is used herein to mean "serving as an example, instance, or illustration." Any implementation described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other implementations.

[0034] In addition, for the purpose of convenience and brevity, detailed descriptions of well-known devices, methods, procedures, components and circuits will not be described in detail since they would be apparent to one skilled in the art. Thus, the drawings and descriptions are to be regarded as illustrative in nature, and not as restrictive.

[0035] Water quality monitoring is an important part of environmental protection and water resource management. Traditional water quality monitoring methods mainly rely on manual sampling and laboratory analysis, which has the problems of low monitoring efficiency, limited coverage, and inability to monitor in real time. With the acceleration of urbanization, the discharge of industrial wastewater and domestic sewage is increasing, and water pollution problems are becoming increasingly serious, which puts forward higher requirements for water quality monitoring.

[0036] The existing water quality monitoring system usually only has data collection and storage functions, lacks the ability to identify data abnormal drift, and lacks related alarm functions. Moreover, once the water quality data abnormally drifts in the existing system, the specific reason for the abnormal drift cannot be further diagnosed, which makes it difficult for the operation and maintenance personnel to quickly locate the problem and take targeted measures, resulting in low accuracy and reliability of the water quality monitoring result. Therefore, a new water quality data abnormal drift identification and alarm technology is urgently needed to improve the accuracy and reliability of water quality monitoring.

[0037] In view of this, the embodiments of the present disclosure provide a water quality data abnormal drift identification and alarm method, device and storage medium. The method of the embodiments of the present disclosure obtains water quality data within a set time period, and pre-processes to obtain processed water quality data. The median of the data in each preset time granularity unit of the processed water quality data is calculated respectively to obtain a median sequence corresponding to multiple time granularity units. Abnormal detection is performed based on the local stability of the median sequence. When the relatively most stable part of the median sequence changes significantly, a drift determination result is generated. The influence of single-point noise or short-term fluctuations on the detection result can be effectively weakened, thereby improving the accuracy and robustness of water quality data abnormal drift identification. In the case where the drift determination result indicates that there is abnormally drifted data, the cause of the abnormal drift is determined to be system disturbance based on the corresponding data collected by the target sensor in the water quality monitoring device. The corresponding data collected by the target sensor in the water quality monitoring device is a data set monitored synchronously with the above-mentioned water quality data used for abnormal detection, so that intelligent diagnosis of abnormal drift can be realized. Based on the cause of the abnormal drift, alarm information for the abnormally drifted data is generated, so that the alarm result is more accurate and has guidance, which facilitates the operation and maintenance personnel to quickly locate the problem source and take timely countermeasures. The scheme of the embodiments of the present disclosure can effectively reduce false positives and false negatives caused by data drift due to system disturbance, and significantly improve the accuracy, reliability and operation and maintenance efficiency of the water quality monitoring system.

[0038] The water quality data abnormal drift identification and alarm method of the embodiments of the present disclosure can be executed by a processor, a terminal device or a server, etc. electronic device. Among them, the terminal device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. Fixed or mobile terminal. The server can be a separate server or a server cluster composed of multiple servers. The electronic device can realize the water quality data abnormal drift identification and alarm method of the embodiments of the present disclosure by calling the computer readable instructions stored in the memory through the processor.

[0039] Figure 1 A flowchart of a water quality data abnormal drift identification and alarm method according to an embodiment of the present disclosure is shown. As shown in the figure, the method comprises: Figure 1

[0040] In step S101, water quality data within a set time length is obtained and preprocessed to obtain processed water quality data.

[0041] The water quality data can be time series data collected by a water quality monitoring device, which is collected by the water quality monitoring device at a set frequency. Since the device can continuously collect data for a long time, the amount of water quality data stored by the device is usually greater than the amount of data required within the set time length, and the length of the water quality data collected by the water quality monitoring device at the set frequency can be greater than or equal to the water quality data within the set time length. The present embodiment can extract data that meets the set time length requirement from the historical water quality data stored by the device as needed for analysis and processing.

[0042] The present embodiment does not limit the set time length, for example, 14 days. The set time length can also be adjusted based on the size of the amount of water quality data: for example, when the amount of water quality data is large, the set time length can be appropriately shortened to reduce the computational load; when the amount of water quality data is small, the set time length can be appropriately extended to ensure the completeness and representativeness of the analysis sample. In this way, the efficiency and accuracy of data processing can be balanced, and the total amount of data to be processed can be controlled.

[0043] The water quality monitoring device can be integrated with multiple types of sensors, and different types of sensors can be arranged at the same or different positions to collect different types of water quality data. The types of water quality data can include, but are not limited to, chemical oxygen demand (COD), dissolved oxygen data (DO), conductivity, ammonia nitrogen, total phosphorus, total nitrogen, suspended solids, dissolved total solids, petroleum, pH, anionic surfactants, cyanide, sulfide, fluoride, chloride, organic phosphorus, sulfate, mercury, chromium, cadmium, arsenic, lead, nickel, beryllium, silver, selenium, copper, zinc, manganese, iron, volatile phenol, benzene series, aniline, nitrobenzene. The chemical oxygen demand can be obtained based on the spectrum collected by the quantum dot spectrum sensor and the preset model.

[0044] The preprocessing can include removing data in the water quality data that does not meet the preset condition (such as off-water data). In one possible implementation, step S101 comprises:

[0045] According to the conductivity data collected by the conductivity sensor in the water quality monitoring device and / or the water level data collected by the water level sensor in the water quality monitoring device, the data in the water quality data that does not meet the preset condition is removed to obtain the processed water quality data.

[0046] ​Therefore, abnormal data interference caused by abnormal working conditions such as water quality monitoring equipment leaving water can be effectively excluded, and the accuracy of subsequent water quality data processing and the reliability of identifying abnormal drift can be improved.

[0047] The abnormal working condition data can include water quality data leaving water, that is, data collected when the water quality monitoring equipment is in a water leaving state. The conductivity sensor and the water level sensor in the water quality monitoring equipment can be arranged at the same or different positions. When the water level data is less than the preset water level threshold (that is, data that does not meet the preset condition), it can be determined that the water quality monitoring equipment is in a water leaving state in the corresponding time period, and / or when the conductivity data is less than the preset conductivity threshold (that is, data that does not meet the preset condition), it can be determined that the water quality monitoring equipment is in a water leaving state in the corresponding time period.

[0048] The data in the time period in which the water quality monitoring equipment is determined to be in a water leaving state in the water quality data can be removed to obtain processed water quality data. The above water quality data includes other water quality data in addition to conductivity, such as chemical oxygen demand.

[0049] In step S102, the median of the data in each preset time granularity unit in the processed water quality data is calculated respectively to obtain a median sequence corresponding to a plurality of time granularity units.

[0050] The time granularity unit is used to represent a time interval for dividing the processed water quality data in a set time length. The time granularity unit can be set as needed, for example, set to 1 day. For example, when the set time length is 14 days, the processed water quality data in 14 days can be divided into 14 time granularity units, and the median of the data in each unit is calculated respectively, thereby obtaining 14 medians to form the median sequence corresponding to the plurality of time granularity units.

[0051] In step S103, abnormality detection is performed based on the local stability of the median sequence, and a drift determination result is generated when a relatively most stable part of the median sequence changes significantly. The significant change is a change amplitude exceeding a preset value.

[0052] The local stability can represent the degree of change of the median sequence between adjacent time granularity units, reflecting the smoothness of the water quality data in the sliding calculation window. The relatively most stable part of the median sequence can be a sliding calculation window with the smallest relative deviation in the median sequence, that is, a sliding calculation window with the smallest change and the lowest fluctuation in the median sequence.

[0053] The embodiments of the present disclosure do not limit the way of performing anomaly detection based on the local stability of the median sequence. In the process of performing anomaly detection, the relative deviation between any two adjacent medians in the median sequence can be calculated. When the smallest relative deviation is greater than a set threshold, it is determined that the relatively most stable part of the median sequence has changed significantly, so that it can be determined that the water quality data has an abnormal deviation. The statistical characteristics (such as variance, range, etc.) of multiple medians in the median sequence can also be calculated, and the statistical characteristics are compared with a preset stability threshold. When the statistical characteristics exceed the preset stability threshold, it is determined that the local stability of the median sequence is destroyed (that is, the relatively most stable part of the median sequence has changed significantly), so that it is determined that the water quality data has an abnormal deviation.

[0054] The drift determination result can be used to indicate whether there is abnormal drift data in the water quality data. For example, in the case where there is abnormal drift data in the water quality data, the drift determination result can include the abnormal drift data and the corresponding time period thereof.

[0055] In a possible implementation, the step S103 comprises:

[0056] Starting from the Nth time granularity unit of the median sequence, the relative deviation between the median of the Nth time granularity unit and the median of the set of medians of the previous N-1 time granularity units is calculated in sequence, to obtain a deviation sequence composed of multiple relative deviations. When the smallest relative deviation in the deviation sequence is greater than a preset deviation threshold, it is determined that there is abnormal drift data in the water quality data.

[0057] Wherein, N is a positive integer greater than 1, which can be set as needed, representing the size of the sliding calculation window. The deviation threshold can also be set in advance as needed, for example, 0.

[0058] For example, for the above setting, the length of time is 14 days, the median sequence corresponding to the median including 14 medians, if N is set to 4, then the size of the above sliding calculation window is 4. The relative deviation degree between the median of the fourth time granularity unit and the median of the median set of the previous three consecutive time granularity units can be represented as y = (x4-np.median([x1,x2,x3])) / np.median([x1,x2,x3]), where x1, x2, x3 and x4 can represent the medians of the first, second, third and fourth time granularity units respectively, and np.median([x1,x2,x3]) represents the median of the median set of the three time granularity units. In this example, the relative deviation degrees of the fourth to fourteenth time granularity units can be calculated in turn using the sliding calculation window, thereby obtaining 11 deviation degree values (i.e. 11 y values) as the deviation degree sequence. When the minimum relative deviation degree in the deviation degree sequence is greater than 0, which is set in advance according to needs, it can be determined that there is an abnormal drift in the water quality data.

[0059] Therefore, based on the statistical stationary change between adjacent time windows, the abnormal drift data can be accurately identified, avoiding false positives caused by single-point fluctuations, and improving the stability and robustness of drift detection.

[0060] Step S104, in the case where the drift determination result indicates that there is data with abnormal drift, based on the corresponding data collected by the target sensor in the water quality monitoring device, the cause of the abnormal drift is determined to be system disturbance.

[0061] The target sensor can be any one or more types of sensors in the water quality monitoring device, and the corresponding data collected by the target sensor in the water quality monitoring device is a data set synchronously monitored with the water quality data used for abnormal detection.

[0062] The system disturbance includes water quality monitoring device working state abnormality and external environment abnormality. The water quality monitoring device working state abnormality refers to drift caused by abnormal working state of the water quality monitoring device itself or its internal sensors. The external environment abnormality refers to drift caused by mutation or interference of external environmental conditions in which the water quality monitoring device works, and the external environment abnormality is not water pollution abnormality itself. The external environment abnormality includes environmental biological state abnormality, environmental temperature abnormality, etc. The specific types of water quality monitoring device working state abnormality and external environment abnormality are not limited in the embodiments of the present disclosure.

[0063] In one possible implementation, the step S104 includes:

[0064] In a case where the drift determination result indicates that there is data with abnormal drift, based on data collected by a target sensor and related to any one or more of an optical system state, a mechanical component state, and a device posture state of the water quality monitoring device, a cause of the abnormal drift is determined to be system disturbance.

[0065] The optical system state can represent an operating condition of an optical measurement module of the water quality monitoring device, the mechanical component state can represent a working condition of a mechanical structure inside or outside the water quality monitoring device, and the device posture state can represent stability of a spatial posture of the device during operation.

[0066] In this way, by comprehensively analyzing the above-mentioned state data, data drift caused by abnormal working condition of the water quality monitoring device can be accurately identified, thereby improving reliability of drift tracing analysis and enhancing intelligent level of the water quality monitoring system.

[0067] In a possible implementation, in a case where the drift determination result indicates that there is data with abnormal drift, based on data collected by a target sensor and related to any one or more of an optical system state, a mechanical component state, and a device posture state of the water quality monitoring device, a cause of the abnormal drift is determined to be abnormal working condition of the water quality monitoring device, including:

[0068] Obtaining spectral data collected by a spectral sensor in the water quality monitoring device as data related to the optical system state of the water quality monitoring device; when the optical system state related data satisfies a first preset condition, determining that the cause of the abnormal drift is abnormal optical system state of the water quality monitoring device; and / or,

[0069] Obtaining current operating data of a preset component in the water quality monitoring device, comparing the current operating data with pre-stored standard operating data, and when a preset difference is exceeded, determining that the cause of the abnormal drift is abnormal working condition of the preset component in the water quality monitoring device; and / or,

[0070] Obtaining device posture data collected by an image sensor and / or a position sensor in the water quality monitoring device as data related to the device posture state of the water quality monitoring device; when the device posture data satisfies a third preset condition, determining that the cause of the abnormal drift is posture deviation of the water quality monitoring device.

[0071] The abnormal optical system state of the water quality monitoring device can be caused by attachment of external water grass, aquatic organisms, or rotten deposits of suspended particulate matter on the surface of an optical lens, thereby causing obstruction or abnormal scattering of light propagation path.

[0072] The preset component of the water quality monitoring device includes a cleaning brush, an output shaft, a motor, and the like, Figure 2 A schematic diagram of data anomaly according to an embodiment of the present disclosure is shown. As shown in FIG. 1, a water quality monitoring device 100 is shown.Figure 2 As shown, in the presence of a preset component working state exception, for example, a brush exception, the COD data collected by the water quality monitoring device can be caused to drift (COD greater than 1000 mg / L in the figure is drift data).

[0073] The posture deviation of the water quality monitoring device can be caused by device tilting, rotation, etc., and the device posture data collected by the image sensor or the position sensor can be data information that can reflect the spatial posture or position change of the device. For example, the image sensor can determine the tilting angle or offset direction of the device by recognizing reference marker points or background image changes; the position sensor can determine whether the device posture has changed by detecting the displacement of the device relative to the fixed reference position.

[0074] The third preset condition can include a tilting angle or offset indicated in the device posture data being greater than a preset threshold. The preset threshold can be set according to the device structure characteristics, installation environment, and running experience value, for example, set as the upper limit of the allowed offset angle or the maximum allowed displacement distance.

[0075] Thus, when the device posture abnormally deviates, the problem cause can be detected and located in time, thereby improving the accuracy and reliability of the abnormal drift diagnosis, preventing monitoring data errors caused by device posture changes, and ensuring the stability and credibility of the water quality monitoring results.

[0076] In one possible implementation, the step S104 includes:

[0077] In the case where the drift determination result indicates that there is abnormal drift data, based on the data collected by the target sensor and related to the time sequence change characteristics of the water body contact state and / or the water quality parameter of the water quality monitoring device, the occurrence cause of the abnormal drift is determined to be an external environment exception.

[0078] The data related to the water body contact state of the water quality monitoring device can be data that can reflect the contact state of the water quality monitoring device with the external water body. For example, it can include water level change data detected by a liquid level sensor, water pressure change data collected by a pressure sensor, or instantaneous temperature mutation information detected by a temperature sensor, etc. When the device probe is not completely immersed, floats on the water surface, or is impacted by the water flow to cause the probe to be partially exposed, these data will show obvious abnormalities, thereby reflecting the abnormal change of the device contact state with the water body.

[0079] The data related to the time sequence variation characteristics of the water quality parameters of the water quality monitoring device can be data reflecting the change trend of the water quality indexes (such as conductivity, dissolved oxygen, turbidity, pH value, etc.) in the time sequence dimension. For example, when there are strong water flow disturbances, sediment deposition, algae outbreaks and the like in the environment, the time sequence curve of the related water quality parameters will appear mutation, abnormal fluctuation or non-continuous change. Through the analysis of these time sequence characteristics, it can be effectively judged whether the abnormal drift is caused by external environmental factors.

[0080] Therefore, by comprehensively analyzing the above state data, the data drift caused by external environmental abnormalities can be accurately identified, thereby improving the reliability of drift tracing analysis and enhancing the intelligent level of the water quality monitoring system.

[0081] In a possible implementation, in a case where the drift determination result indicates that there is abnormal drift data, based on the data related to the time sequence variation characteristics of the water body contact state and / or the water quality parameters of the water quality monitoring device collected by the target sensor, it is determined that the cause of the abnormal drift is external environmental abnormalities, including:

[0082] The water level data collected by the water level sensor in the water quality monitoring device and the chemical oxygen demand data obtained by the spectrum data collected by the spectrum sensor in the water quality monitoring device are obtained as data related to the water body contact state of the water quality monitoring device; when the chemical oxygen demand data meets the fourth preset condition and the water level data meets the seventh preset condition, it is determined that the cause of the abnormal drift is that the water quality monitoring device contacts the water bottom; and / or,

[0083] The temperature data collected by the temperature sensor in the water quality monitoring device and the conductivity data collected by the conductivity sensor are obtained as data related to the time sequence variation characteristics of the water quality parameters; when the temperature data and the conductivity data meet the fifth preset condition, it is determined that the cause of the abnormal drift is that the environment temperature of the water quality monitoring device is abnormal; and / or,

[0084] The data collected by the dissolved oxygen sensor in the water quality monitoring device is obtained, and when the data meets the sixth preset condition, it is determined that the cause of the abnormal drift is that the biological state of the environment where the water quality monitoring device is located is abnormal.

[0085] The chemical oxygen demand data corresponding to the moment can be calculated by using a pre-established spectrum feature model and the like based on the change of the spectrum intensity in a specific characteristic band indicated in the spectrum data. The chemical oxygen demand data can reflect the change of the concentration of organic pollutants in the water body, thereby indirectly representing the actual contact state of the device probe and the water body.

[0086] The monitoring object of the probe of the water quality monitoring device should avoid environmental interference as much as possible, but when the probe contacts or approaches the water bottom due to insufficient water, such as floating installation and arrangement, the monitoring result deviates from the true value due to the interference of the bottom environment. Therefore, the fourth preset condition can be set to include: the total change rate of the chemical oxygen demand data in a preset time length, for example, 30 minutes or 1 hour, or 2 hours, or 3 hours; in addition to the total change rate, the change rate of any two points in the preset time length range can also be further selected. The seventh preset condition can be set to include: the total change rate of the water level data in the time period corresponding to the chemical oxygen demand data, for example, 30 minutes or 1 hour, or 2 hours, or 3 hours; in addition to the total change rate, the change rate of any two points in the preset time length range can also be further selected. The total change rate of the fourth preset condition should be greater than 0, preferably the minimum value of the change rate of any two points is greater than or equal to 0 and less than or equal to 10%, further preferably the minimum value is greater than or equal to 0 and less than or equal to 5%; the total change rate of the seventh preset condition should be less than 0, preferably the absolute minimum value of the change rate of any two points is greater than or equal to 0 and less than or equal to 10%, further preferably the absolute minimum value is greater than or equal to 0 and less than or equal to 5%.

[0087] Therefore, by dynamically analyzing the chemical oxygen demand data output by the spectrum sensor and the water level data output by the water level sensor, it can be accurately identified whether the water quality monitoring device is in contact with the water bottom, thereby realizing intelligent diagnosis of the running state of the device, avoiding confusion of data anomalies caused by water quality data drift and pollution caused by abnormal position of the probe, and improving the accuracy and reliability of the monitoring data.

[0088] Among them, the environmental temperature anomaly includes that in a low temperature environment, a blocking layer is formed on the surface or surrounding water body of the monitoring device (sensor probe, sampling port), which blocks the normal contact between the device and the water body, and further causes the abnormal state of data distortion. Its judgment parameter can be determined by temperature value and conductivity value. Further, the charging efficiency or charging current of the power supply device in the water quality monitoring device can be monitored, if the charging efficiency or charging current is reduced, it is judged that the external environmental temperature of the water quality monitoring device is abnormal. Also according to a large amount of modeling data analysis, the above situation is accompanied by a change in light intensity, therefore, the environmental temperature anomaly can be further judged by the absolute value of light intensity being less than a preset threshold, the light intensity preferably considering the reference light path light intensity value.

[0089] The fifth preset condition can be set to include: the temperature data and the conductivity data both show a downward trend in a first preset time length (for example, 30 minutes or 1 hour, which can be set according to the monitoring scene).

[0090] Therefore, by analyzing the time sequence variation characteristics of multi-dimensional hydrological and water quality parameters such as temperature and conductivity, the abnormal drift caused by environmental temperature anomaly can be accurately identified, thereby effectively improving the adaptability of the water quality monitoring system to extreme environmental conditions and the accuracy of drift traceability analysis, and ensuring the stability and reliability of water quality data.

[0091] Under normal circumstances, the dissolved oxygen concentration in the water body will change dynamically with factors such as water exchange, temperature change, and photosynthesis; however, when the water quality monitoring equipment is affected by organisms (such as water grass, algae, etc.), the local water flow is blocked, and the gas exchange is weakened, which will cause the dissolved oxygen concentration in the monitoring area to deviate. Therefore, the sixth preset condition can be set to include that the minimum value or the average value of the data collected by the dissolved oxygen sensor in the second preset time length is less than a preset threshold value, and the second preset time length can be set according to an empirical value, for example, 1h, 2h; the above-mentioned threshold value can be dynamically adjusted according to different periods and different water areas. According to a large amount of modeling data analysis, the above-mentioned situation is accompanied by a change in light intensity, therefore, the biological state anomaly judgment can be further determined by the light intensity absolute value being less than a preset threshold value, and the light intensity preferably considers the reference light path light intensity value.

[0092] When the biological state of the environment where the water quality monitoring equipment is located is abnormal, the time series of each water quality parameter collected can cause the COD data collected by the water quality monitoring equipment to drift, the dissolved oxygen concentration data is low, and the dissolved oxygen concentration data loses periodicity. After cleaning the environmental organisms, the dissolved oxygen concentration data can be periodically restored.

[0093] Therefore, by detecting the persistent low value characteristics of the dissolved oxygen concentration data, the abnormal drift caused by the environmental biological state anomaly can be accurately identified, thereby improving the identification accuracy of the external environmental interference of the water quality monitoring system and the reliability of the drift traceability analysis, and ensuring the accuracy and stability of the monitoring data.

[0094] Step S105, generating alarm information for the data of the abnormal drift based on the cause of the abnormal drift.

[0095] The alarm information can include the occurrence time of the abnormal drift, the drift type, the corresponding abnormal reason, the recommended treatment measures, etc., so that the operation and maintenance personnel can timely locate the problem and take targeted maintenance operations.

[0096] For example, if it is determined that the water quality monitoring equipment is in an abnormal working state, the working state of the water quality monitoring equipment is adjusted to normal, and if it is determined that the external environment is abnormal, the environment is cleaned or the water quality monitoring equipment is transferred to a new location.

[0097] According to the embodiment of the present disclosure, by acquiring water quality data within a set time length and preprocessing to obtain processed water quality data, the median of the data in each preset time granularity unit of the processed water quality data is calculated respectively to obtain a median sequence corresponding to multiple time granularity units, and the local stability of the median sequence is used for anomaly detection. When the relatively most stable part of the median sequence changes significantly, a drift determination result is generated, which can effectively weaken the influence of single-point noise or short-time fluctuation on the detection result, thereby improving the accuracy and robustness of water quality data anomaly drift identification. By determining the cause of the occurrence of the abnormal drift based on the corresponding data collected by the target sensor of the water quality monitoring device in the case where the drift determination result indicates that there is abnormal drift data, the corresponding data collected by the target sensor of the water quality monitoring device is a data set monitored synchronously with the above-mentioned water quality data used for anomaly detection, thereby enabling intelligent diagnosis of abnormal drift. By generating alarm information for the data of the abnormal drift based on the cause of the occurrence of the abnormal drift, the alarm result is more accurate and has guidance, which facilitates the operation and maintenance personnel to quickly locate the problem source and take timely measures. The scheme of the embodiment of the present disclosure can effectively reduce false positives and false negatives caused by data drift due to system disturbance, and significantly improve the accuracy, reliability and operation and maintenance efficiency of the water quality monitoring system.

[0098] After identifying the drift data, further, the alarm information generated by the abnormal drift data can be removed from the water quality anomaly alarm information (obtained according to the preset alarm information) to obtain optimized water quality anomaly alarm information, and water quality anomaly alarm is performed based on the optimized water quality anomaly alarm information. When the alarm is performed based on the preset alarm rule, it can be further determined whether there is alarm information generated by the drift data in the alarm time period or within the set time length, and if so, such information can be removed, and water quality anomaly alarm is performed based on the optimized water quality anomaly alarm information, thereby improving the accuracy of pollution alarm and reducing false positives.

[0099] Figure 3 A structure diagram of a water quality data anomaly drift identification and alarm device according to an embodiment of the present disclosure is shown. As shown in Figure 3 The device comprises:

[0100] The preprocessing module 301 is configured to acquire water quality data within a set time length and perform preprocessing to obtain processed water quality data, wherein the water quality data is collected by a water quality monitoring device at a set frequency.

[0101] The first determination module 302 is configured to calculate the median of the data in each preset time granularity unit of the processed water quality data respectively to obtain a median sequence corresponding to multiple time granularity units.

[0102] The generating module 303 is configured to perform anomaly detection based on the local stability of the median sequence, and generate a drift determination result when a relatively most stable part of the median sequence changes significantly, the drift determination result indicating whether there is abnormal drift data in the water quality data.

[0103] Starting from an Nth time granularity unit of the median sequence, a relative deviation degree between a median of the Nth time granularity unit and a median of a set of medians of N-1 consecutive time granularity units before the Nth time granularity unit is calculated in sequence to obtain a deviation degree sequence composed of a plurality of relative deviation degrees, where N is a positive integer greater than 1.

[0104] When the minimum relative deviation degree in the deviation degree sequence is greater than a preset deviation degree threshold, it is determined that there is abnormal drift data in the water quality data.

[0105] The second determining module 304 is configured to, in a case where the drift determination result indicates that there is abnormal drift data, determine, based on corresponding data collected by a target sensor in the water quality monitoring device, a cause of the occurrence of the abnormal drift as a system disturbance.

[0106] The warning module 305 is configured to generate warning information for the abnormal drift data based on the cause of the occurrence of the abnormal drift.

[0107] In a possible implementation, the second determining module 304 is further configured to, in a case where the drift determination result indicates that there is abnormal drift data, determine, based on data collected by the target sensor and related to any one or more of an optical system state, a mechanical component state, and a device posture state of the water quality monitoring device, the cause of the occurrence of the abnormal drift as an abnormal working state of the water quality monitoring device.

[0108] In a possible implementation, the second determining module 304 is further configured to: acquire spectrum data collected by a spectrum sensor in the water quality monitoring device as the data related to the optical system state of the water quality monitoring device; when the optical system state related data meets a first preset condition, determine that the cause of the abnormal drift is an abnormal optical system state of the water quality monitoring device; and / or, acquire current operation data of a preset component in the water quality monitoring device, compare the current operation data with pre-stored standard operation data, and when the current operation data exceeds a preset difference, determine that the cause of the abnormal drift is an abnormal working state of the preset component in the water quality monitoring device; and / or, acquire device posture data collected by an image sensor and / or a position sensor in the water quality monitoring device as the data related to the device posture state of the water quality monitoring device; when the device posture data meets a third preset condition, determine that the cause of the abnormal drift is a posture deviation of the water quality monitoring device.

[0109] In a possible implementation, the second determining module 304 is further configured to: in a case where the drift determination result indicates that there is abnormal drift data, determine that the cause of the abnormal drift is an external environment abnormality based on data collected by a target sensor and related to the time sequence variation feature of the water body contact state and / or the water quality parameter of the water quality monitoring device.

[0110] In a possible implementation, the second determining module 304 is further configured to: acquire water level data collected by a water level sensor in the water quality monitoring device and chemical oxygen demand data obtained by the spectrum data collected by a spectrum sensor in the water quality monitoring device as the data related to the water body contact state of the water quality monitoring device; when the chemical oxygen demand data meets a fourth preset condition and the water level data meets a seventh preset condition, determine that the cause of the abnormal drift is that the water quality monitoring device contacts the water bottom; and / or, acquire temperature data collected by a temperature sensor in the water quality monitoring device and conductivity data collected by a conductivity sensor in the water quality monitoring device as the data related to the time sequence variation feature of the water quality parameter; when the temperature data and the conductivity data meet a fifth preset condition, determine that the cause of the abnormal drift is that the environment temperature in which the water quality monitoring device is located is abnormal; and / or, acquire data collected by a dissolved oxygen sensor in the water quality monitoring device, and when the data meets a sixth preset condition, determine that the cause of the abnormal drift is that the biological state in which the water quality monitoring device is located is abnormal.

[0111] In a possible implementation, the fifth preset condition includes that the temperature data and the conductivity data both show a downward trend within a first preset time length; and the sixth preset condition includes that the minimum value or average value data collected by the dissolved oxygen sensor within a second preset time length is less than a preset threshold.

[0112] In a possible implementation, the preprocessing module 301 is specifically configured to remove data in the water quality data that does not satisfy a preset condition according to conductivity data collected by a conductivity sensor in the water quality monitoring device and / or water level data collected by a water level sensor in the water quality monitoring device, to obtain the processed water quality data.

[0113] According to the embodiments of the present disclosure, by obtaining water quality data in a set time length, and preprocessing to obtain processed water quality data, calculating the median of data in each preset time granularity unit in the processed water quality data respectively to obtain a median sequence corresponding to multiple time granularity units, performing anomaly detection based on the local stability of the median sequence, and generating a drift determination result when a relatively most stable part in the median sequence changes significantly, the influence of single-point noise or short-time fluctuation on the detection result can be effectively weakened, thereby improving the accuracy and robustness of water quality data anomaly drift identification. By determining the cause of the occurrence of the anomaly drift based on corresponding data collected by a target sensor in the water quality monitoring device in the case where the drift determination result indicates that there is data with abnormal drift, the corresponding data collected by the target sensor in the water quality monitoring device being a data set monitored synchronously with the water quality data used for anomaly detection, the intelligent diagnosis of the anomaly drift can be realized. By generating alarm information for the data with the anomaly drift based on the cause of the occurrence of the anomaly drift, the alarm result is more accurate and has guidance, which facilitates the operation and maintenance personnel to quickly locate the problem source and take timely measures. The scheme of the embodiments of the present disclosure can effectively reduce false positives and false negatives caused by drift due to system disturbance, and significantly improve the accuracy, reliability and operation and maintenance efficiency of the water quality monitoring system.

[0114] In some embodiments, the apparatus provided by the embodiments of the present disclosure has functions or includes modules that can be used to perform the methods described in the above method embodiments, and the specific implementation can refer to the description of the above method embodiments. For brevity, they will not be described here.

[0115] The embodiments of the present disclosure also provide 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.

[0116] The embodiments of the present disclosure also provide a non-volatile computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the above method.

[0117] Figure 4 FIG. 19 is a block diagram of an apparatus 1900 for water quality data anomaly drift identification and alarm according to an example embodiment. For example, the apparatus 1900 can be provided as a server or a terminal device. For details, refer to the description of the apparatus 1000. Figure 4The apparatus 1900 includes a processing assembly 1922, which is further comprised of one or more processors, and memory resources represented by the memory 1932 for storing instructions, such as an application program, executable by the processing assembly 1922. The application programs stored in the memory 1932 can include one or more modules each corresponding to a set of instructions. In addition, the processing assembly 1922 is configured to execute the instructions to perform the methods described above.

[0118] The apparatus 1900 can also include a power supply assembly 1926 configured to perform power management of the apparatus 1900, a wired or wireless network interface 1950 configured to connect the apparatus 1900 to a network, and an input output interface 1958 (I / O interface). The apparatus 1900 can operate based on an operating system stored in the memory 1932, such as Windows Server TM , MacOS X TM , Unix TM , Linux TM , FreeBSD TM or the like.

[0119] In exemplary embodiments, there is also provided a non-transitory computer- readable storage medium, such as the memory 1932 comprising computer program instructions executable by the processing assembly 1922 of the apparatus 1900 to perform the methods described above.

[0120] The computer-readable storage medium can be a tangible device that can retain and store programs (instructions) for use by an instruction execution device. The computer-readable storage medium, for example, can be, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or punched-tape, and any suitable combination of the foregoing. A computer-readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.

[0121] The computer program (or computer readable program instructions) described herein can be downloaded from a computer readable storage medium to various computing / processing devices by way of a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing / processing device.

[0122] Computer readable program instructions for carrying out operations of the present disclosure can be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions can execute entirely on the user's computing / processing device, partly on the user's computing / processing device, as a stand-alone software package, partly on the user's computing / processing device and partly on a remote computing / processing device or entirely on the remote computing / processing device or server. In the latter scenario, the remote computing / processing device can be connected to the user's computing / processing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing / processing device, for example, through the Internet using an Internet Service Provider. In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate array (FPGA), or programmable logic array (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present disclosure.

[0123] The computer readable program instructions can also be loaded onto a computing / processing device, other programmable data processing apparatus, or other device to cause a series of operations to be performed on the computing / processing device, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computing / processing device, other programmable apparatus, or other device implement the operations specified in the flow diagrams and / or block diagrams.

[0124] These computer readable program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer readable program instructions can also be stored in a computer readable storage medium that can include a non-transitory computer readable storage medium that can be a computer- readable storage medium having no data storage cycles that change state. The instructions can be executed by one or more processors of a computer, to cause a series of operational steps to be performed on the computer to produce a computer-implemented process. The instructions can also cause one or more processors of a computer or other programmable data processing apparatus to

[0125] The computer readable program instructions can 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, such that the instructions which execute on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0126] The computer readable program instructions can 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, such that the instructions which execute on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0127] Embodiments of the present disclosure have been described above, and the description is intended to be illustrative of the embodiments and not restrictive of the disclosure. Many modifications and variations of the described embodiments are possible in light of this disclosure. It is intended that the scope of the disclosure be limited not by this detailed description, but rather by the claims appended hereto. The use of the terms "may" and "can" in the description is intended to convey that various embodiments of the present disclosure include, among other things, these and other possible features.

Claims

1. A water quality data abnormal drift identification and alarm method, characterized in that, The method comprises: acquiring water quality data within a set time length and performing preprocessing to obtain processed water quality data, wherein the water quality data is collected by a water quality monitoring device according to a set frequency; calculating the median of data in each preset time granularity unit in the processed water quality data to obtain a median sequence corresponding to multiple time granularity units; performing anomaly detection based on the local stability of the median sequence, and generating a drift determination result when a relatively most stable part of the median sequence changes significantly, the drift determination result indicating whether there is abnormally drifting data in the water quality data, wherein: the anomaly detection based on the local stability of the median sequence and the generation of the drift determination result when a relatively most stable part of the median sequence changes significantly comprise: starting from the Nth time granularity unit of the median sequence, sequentially calculating the relative deviation degree between the median of the Nth time granularity unit and the median of the set of medians of the previous N-1 time granularity units, to obtain a deviation degree sequence composed of multiple relative deviation degrees, wherein N is a positive integer greater than 1; when the minimum relative deviation degree in the deviation degree sequence is greater than a preset deviation threshold, it is determined that there is abnormally drifting data in the water quality data; in the case where the drift determination result indicates that there is abnormally drifting data, determining the cause of the occurrence of the abnormally drifting data based on the corresponding data collected by a target sensor in the water quality monitoring device; generating alarm information for the abnormally drifting data based on the cause of the occurrence of the abnormally drifting data.

2. The method of claim 1, wherein, The determination of the cause of the occurrence of the abnormally drifting data based on the data collected by the target sensor in the water quality monitoring device in the case where the drift determination result indicates that there is abnormally drifting data comprises: in the case where the drift determination result indicates that there is abnormally drifting data, determining the cause of the occurrence of the abnormally drifting data based on the data collected by the target sensor and related to any one or more of the optical system state, the mechanical component state and the device posture state of the water quality monitoring device.

3. The method of claim 2, wherein, The determination of the cause of the occurrence of the abnormally drifting data based on the data collected by the target sensor and related to any one or more of the optical system state, the mechanical component state and the device posture state of the water quality monitoring device in the case where the drift determination result indicates that there is abnormally drifting data comprises: acquiring spectral data collected by a spectral sensor in the water quality monitoring device as data related to the optical system state of the water quality monitoring device, and determining that the cause of the occurrence of the abnormally drifting data is an abnormal optical system state of the water quality monitoring device when the optical system state related data satisfies a first preset condition; and / or, obtaining current operation data of a preset component in the water quality monitoring device, comparing the current operation data with pre-stored standard operation data, and determining that the abnormal drift is caused by an abnormal working state of the preset component in the water quality monitoring device when the current operation data exceeds a preset difference; and / or, obtaining device posture data collected by an image sensor and / or a position sensor in the water quality monitoring device as data related to a device posture state of the water quality monitoring device; determining that the abnormal drift is caused by a posture deviation of the water quality monitoring device when the device posture data meets a third preset condition.

4. The method of claim 1, wherein, In the case where the drift determination result indicates that there is the abnormal drift data, determining that the abnormal drift is caused by system disturbance based on data collected by a target sensor in the water quality monitoring device, including: In the case where the drift determination result indicates that there is the abnormal drift data, determining that the abnormal drift is caused by external environmental abnormality based on data collected by the target sensor and related to a time sequence change feature of a water body contact state and / or a water quality parameter of the water quality monitoring device.

5. The method of claim 4, wherein, In the case where the drift determination result indicates that there is the abnormal drift data, determining that the abnormal drift is caused by external environmental abnormality based on data collected by the target sensor and related to a time sequence change feature of a water body contact state and / or a water quality parameter of the water quality monitoring device, including: obtaining water level data collected by a water level sensor in the water quality monitoring device and chemical oxygen demand data obtained by spectrum data collected by a spectrum sensor in the water quality monitoring device as data related to a water body contact state of the water quality monitoring device; determining that the abnormal drift is caused by the water quality monitoring device contacting a water bottom when the chemical oxygen demand data meets a fourth preset condition and the water level data meets a seventh preset condition; and / or, obtaining temperature data collected by a temperature sensor in the water quality monitoring device and conductivity data collected by a conductivity sensor in the water quality monitoring device as data related to a time sequence change feature of the water quality parameter; determining that the abnormal drift is caused by an environmental temperature abnormality in which the water quality monitoring device is located when the temperature data and the conductivity data meet a fifth preset condition; and / or, obtaining data collected by a dissolved oxygen sensor in the water quality monitoring device, and determining that the abnormal drift is caused by an environmental biological state abnormality in which the water quality monitoring device is located when the data meets a sixth preset condition.

6. The method of claim 5, wherein, The fifth preset condition includes that the temperature data and the conductivity data both show a downward trend within a first preset time length. The sixth preset condition includes that a minimum value or an average value in the data collected by the dissolved oxygen sensor within a second preset time length is less than a preset threshold.

7. The method according to any one of claims 1 to 6, characterized in that, obtaining water quality data within a set time length and pre-processing the water quality data to obtain processed water quality data, including: According to conductivity data collected by a conductivity sensor in the water quality monitoring device and / or water level data collected by a water level sensor in the water quality monitoring device, data in the water quality data that does not meet a preset condition is removed, to obtain processed water quality data.

8. A water quality data abnormal drift identification and alarm device, characterized in that, The device comprises: a preprocessing module configured to acquire water quality data within a set time length and perform preprocessing to obtain processed water quality data, wherein the water quality data is collected by a water quality monitoring device at a set frequency; a first determination module configured to calculate a median of data in each preset time granularity unit in the processed water quality data, to obtain a median sequence corresponding to multiple time granularity units; a generation module configured to perform anomaly detection based on local stability of the median sequence, and generate a drift determination result when a relatively most stable part of the median sequence changes significantly, the drift determination result indicating whether there is abnormal drift data in the water quality data, wherein the performing of the anomaly detection based on the local stability of the median sequence and the generating of the drift determination result when the relatively most stable part of the median sequence changes significantly include: starting from an Nth time granularity unit of the median sequence, calculating a relative deviation degree between a median of the Nth time granularity unit and a median of a set of medians of N-1 consecutive time granularity units before the Nth time granularity unit, to obtain a deviation degree sequence composed of multiple relative deviation degrees, where N is a positive integer greater than 1; and when a minimum relative deviation degree in the deviation degree sequence is greater than a preset deviation degree threshold, determining that there is abnormal drift data in the water quality data; a second determination module configured to, when the drift determination result indicates that there is the abnormal drift data, determine a cause of occurrence of the abnormal drift based on corresponding data collected by a target sensor in the water quality monitoring device; an alarm module configured to generate alarm information for the abnormal drift data based on the cause of occurrence of the abnormal drift.

9. An electronic device comprising a memory, a processor, and a computer program stored on the memory, wherein the computer program comprises instructions that, when executed by the processor, cause the electronic device to perform the method of any one of claims 1-8. The processor executes the computer program to implement the steps of the method of any one of claims 1 to 7.

10. A non-transitory computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Abnormal data processing method and device, computer equipment and storage medium

    CN114564629A

  • Alarm method and device, electronic equipment and storage medium

    CN116704710A

  • Water environment dynamic monitoring system and method based on Internet of Things

    CN116796907A

  • Photovoltaic abnormal data identification method and device, electronic equipment and storage medium

    CN120296623A

  • Intelligent water affair dynamic monitoring system and monitoring method based on digital twinning

    CN120685153A

Cited By

  • Multi-parameter water quality online monitoring system and method

    CN122193531A

  • Multi-parameter water quality on-line monitoring system and method

    CN122193531B