Real-time water quality monitoring method and device for modular water treatment control system
By analyzing the short-term and long-term change rates of water quality parameters and adaptively adjusting the sampling frequency, the problem of fixed monitoring frequency in modular water treatment systems is solved, enabling rapid response and accurate detection of water quality anomalies.
Patent Information
- Application Number
- CN202511156879.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2025-11-28
AI Technical Summary
Existing modular water treatment systems cannot flexibly adjust monitoring frequency, resulting in wasted resources when water quality is stable and missed critical information when water quality is abnormal. They also lack intelligent anomaly identification and response mechanisms, making it difficult to achieve accurate monitoring.
By analyzing the rate of change of water quality parameters through short-term and long-term windows, the water quality change pattern can be determined, and the sampling frequency can be adaptively adjusted according to the number of anomalies, the rate of change, and the magnitude ratio to generate anomaly reports.
It improves the accuracy of anomaly detection results, ensures rapid data recording when water quality is abnormal, reduces resource waste, and achieves a complete closed-loop capability for system self-verification and result generation.
Smart Images

Figure CN121027443A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of water quality detection, and in particular to a real-time water quality monitoring method and device for a modular water treatment control system. BACKGROUND
[0002] Water quality monitoring, as a core technical means to ensure water resource safety and environmental protection, plays a crucial role in modern water treatment systems. Current water quality monitoring methods generally have the problem of fixed monitoring frequency, which cannot flexibly adjust the sampling strategy according to water quality changes, resulting in resource waste when water quality is stable, and missing key change information when water quality is abnormally fluctuating. At the same time, the existing system lacks intelligent abnormality identification and response mechanism, making it difficult to achieve precise monitoring in complex and variable water quality environment.
[0003] Water quality monitoring in modular water treatment systems faces complex technical challenges. The dynamic change characteristics of water quality parameters require the monitoring system to identify different fluctuation patterns, but traditional fixed frequency monitoring methods cannot adapt to such change requirements. When water quality appears abnormal fluctuations, the system cannot capture key change information in time. This mismatch between monitoring frequency and water quality changes further leads to difficulties in trigger mechanism design. The system needs to automatically start the corresponding adjustment strategy when detecting abnormal fluctuation trends, but the lack of effective judgment criteria and response logic makes it difficult to handle abnormal situations in time. More complex is that after the system adjusts the sampling frequency according to the abnormal situation, how to verify the rationality of the adjustment effect and ensure the reliability of the monitoring results becomes a key link in the whole monitoring process, which requires the system to have the complete closed-loop ability of self-verification and result generation.
[0004] Therefore, how to build an intelligent water quality monitoring method that can realize differentiated monitoring frequency setting according to water quality parameter fluctuation characteristics and adaptively adjust the sampling strategy in abnormal situations has become a key problem for the development of modular water treatment control systems. SUMMARY
[0005] The present application provides a real-time water quality monitoring method and device for a modular water treatment control system to realize real-time detection of tap water, improve the accuracy of abnormal detection results, and timely alert and handle abnormal water sources.
[0006] In a first aspect, to solve the above technical problems, the present application provides a real-time water quality monitoring method for a modular water treatment control system, comprising: obtaining water quality parameters of a target water area; the water quality parameters comprising at least one of the following: pH value, dissolved oxygen, turbidity, and conductivity; extracting the water quality parameters using a short-term window and a long-term window, calculating the change rate distribution of the water quality parameters in the short-term window and the long-term window, and obtaining a short-term change rate set and a long-term change rate set; judging the water quality change mode of the target water area according to the short-term change rate set and the long-term change rate set; the water quality change mode comprising: stable mode, slow change mode, or sharp fluctuation mode; in the case that the water quality change mode of the target water area is the sharp fluctuation mode, determining the target sampling frequency of the water quality parameters according to the abnormal number of the water quality parameters, the change rate, and the amplitude ratio of the abnormality; the size of the target sampling frequency being positively correlated with the abnormal number of the water quality parameters, the change rate, and the amplitude ratio of the abnormality; monitoring the target water area based on the target sampling frequency, and generating an abnormal report of the target water area in the case that the abnormal number of the water quality parameters monitored based on the target sampling frequency is greater than an abnormal number threshold.
[0007] Optionally, judging the water quality change mode of the target water area according to the short-term change rate set and the long-term change rate set comprises: if the value in the short-term change rate set is greater than or equal to a change rate threshold, judging the water quality change mode as the sharp fluctuation mode; if the value in the short-term change rate set is less than the change rate threshold and the value in the long-term change rate set is less than the change rate threshold, judging the water quality change mode as the stable mode; and if the value in the short-term change rate set is less than the change rate threshold and the value in the long-term change rate set is greater than or equal to the change rate threshold, judging the water quality change mode as the slow change mode.
[0008] Optionally, determining the target sampling frequency of the water quality parameters according to the abnormal number of the water quality parameters, the change rate, and the amplitude ratio of the abnormality comprises: determining the target sampling frequency according to a frequency adjustment algorithm; the frequency adjustment algorithm satisfying the following relationship:
[0009] f new =f base *(1+αx+βy+γz)
[0010] wherein f new represents the target sampling frequency, f base represents the sampling frequency before adjustment, α represents an abnormal number weight, x represents a first frequency adjustment coefficient corresponding to the abnormal number of the water quality parameters, β represents a change rate weight, y represents a second frequency adjustment coefficient corresponding to the parameter change rate, γ represents an amplitude weight, and z represents a third frequency adjustment coefficient corresponding to the abnormal amplitude ratio.
[0011] Optionally, the abnormal report of the target water area is generated, including: obtaining an abnormal data subset in a case where the number of abnormalities of the water quality parameter of the target water area is greater than a threshold number of abnormalities; the abnormal data subset includes an abnormal water quality parameter type, an abnormal water quality parameter value, and a timestamp corresponding to the abnormal water quality parameter value; the abnormal data subset is compared with a historical data stream processing record to determine an abnormal reason corresponding to the abnormal data subset; the historical data stream processing record includes a sample abnormal data subset and a corresponding abnormal reason; and the abnormal report of the target water area is generated according to the abnormal reason.
[0012] Optionally, the abnormal report of the target water area is generated according to the abnormal reason, including: determining whether the water quality parameter is valid data; and in a case where the water quality parameter is valid data, generating the abnormal report of the target water area according to the abnormal reason; and determining whether the water quality parameter is valid data includes: processing the water quality parameter by using a Kalman filtering algorithm to obtain filtered water quality parameter; determining an evaluation index based on the filtered water quality parameter, and determining that the water quality parameter is valid data in a case where the evaluation index is greater than an index threshold; and the evaluation index includes a filtering consistency index.
[0013] Optionally, the filtering consistency index is determined, including: determining whether data points at different times are trusted data points; a trusted data point at time t satisfies the following relationship: a difference between a state estimation value of the Kalman filtering at the time t and an actual observation value at the time t is within a preset confidence interval; and a ratio of a number of the trusted data points to a total number of the data points is determined as the filtering consistency index.
[0014] In a second aspect, the present application provides a tap water detection device, including: an acquisition unit and a processing unit; the acquisition unit is used to acquire a water quality parameter of a target water area; the water quality parameter includes at least one of the following: pH value, dissolved oxygen, turbidity, and conductivity; the processing unit is used to extract the water quality parameter by using a short-term window and a long-term window, calculate a change rate distribution of the water quality parameter in the short-term window and the long-term window, and obtain a short-term change rate set and a long-term change rate set; the processing unit is further used to determine a water quality change mode of the target water area according to the short-term change rate set and the long-term change rate set; the water quality change mode includes: a stable mode, a slow change mode, or a sharp fluctuation mode; the processing unit is further used to determine a target sampling frequency of the water quality parameter according to a number of abnormalities of the water quality parameter, a change rate, and an abnormal amplitude ratio in a case where the water quality change mode of the target water area is the sharp fluctuation mode; and the processing unit is further used to monitor the target water area based on the target sampling frequency, and generate an abnormal report of the target water area in a case where the number of abnormalities of the water quality parameter of the target water area monitored based on the target sampling frequency is greater than a threshold number of abnormalities.
[0015] In a third aspect, the present application further provides a computer readable storage medium comprising a stored computer program, wherein the computer readable storage medium controls a device in which the computer readable storage medium is located to execute the real-time water quality monitoring method for the modular water treatment control system according to any one of the above aspects when the computer program is running.
[0016] Compared with the prior art, the present application has the following beneficial effects:
[0017] 1. The water quality change mode of the target water area is determined through the change rate distribution of the water quality parameters in the short-term window and the long-term window. In the case that the water quality change mode of the target water area is a sharp fluctuation mode, the target sampling frequency of the water quality parameters is determined according to the number of abnormalities, the change rate and the amplitude ratio of the abnormalities of the water quality parameters. Since the change rate distribution of the water quality parameters in the short-term window and the long-term window can reflect the fluctuation degree of the water quality, the sampling frequency can be increased when the water quality changes greatly, the change data of the water quality can be quickly recorded when pollution occurs, and the accuracy of the abnormal detection result is improved.
[0018] 2. Since the size of the target sampling frequency is positively correlated with the number of abnormalities, the change rate and the amplitude ratio of the abnormalities of the water quality parameters, the sampling frequency can be adaptively adjusted according to the abnormality degree of the water quality parameters, so that the water quality parameters at the time of abnormality occurrence can be more accurately collected, and the accuracy of the abnormal detection result is further improved. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 is a real-time water quality monitoring method flow diagram for a modular water treatment control system provided by an embodiment of the present application. DETAILED DESCRIPTION
[0020] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0021] The real-time water quality monitoring method for a modular water treatment control system provided by the embodiments of the present application will be described and explained in detail below through the following specific embodiments.
[0022] REFERENCE Figure 1 The first embodiment of the present application provides a real-time water quality monitoring method for a modular water treatment control system, comprising the following steps:
[0023] S1, obtaining the water quality parameters of a target water area.
[0024] The water quality parameters include at least one of pH value, dissolved oxygen, turbidity, and conductivity.
[0025] As a possible implementation, the water quality monitoring device can continuously collect data of the water quality parameters through the multi-sensor array, and obtain data streams of the pH value, dissolved oxygen content, turbidity value, and conductivity value of the target water area.
[0026] Specifically, by continuously collecting data of the water quality parameters through the multi-sensor array, the pH value, dissolved oxygen content, turbidity value, and conductivity value of the target water area can be obtained in real time.
[0027] For example, in the monitoring of a city river, the sensor array collects data every second, the pH value ranges from 6.5 to 8.5, the dissolved oxygen content ranges from 4 to 8 mg / L, the turbidity ranges from 10 to 50 NTU, and the conductivity ranges from 200 to 1000 μS / cm. Such data streams provide high-resolution basic information for subsequent analysis, which helps to capture subtle changes in water quality.
[0028] S2, using short-term and long-term windows to extract water quality parameters, calculating the change rate distribution of water quality parameters in the short-term and long-term windows, and obtaining a short-term change rate set and a long-term change rate set.
[0029] For time series extraction of short-term and long-term windows, it can be understood that the data is divided by different time scales in order to capture changes at different rhythms. The short-term window can be set to 5 minutes to focus on instantaneous fluctuations, and the long-term window can be set to 2 hours to observe overall trends.
[0030] For example, in the monitoring of a city river, the change rate of pH value in the short-term window may be 0.1 units per minute, while the change rate in the long-term window may be only 0.02 units per hour. This difference provides a data basis for subsequent classification.
[0031] For example, when calculating the change rate distribution in the window, the generation of the short-term change rate set and the long-term change rate set is crucial. The short-term change rate set can reflect rapid disturbances, such as a sudden increase in turbidity from 10 units to 15 units in 5 minutes, with a high change rate. The long-term change rate set reflects slow trends, such as a decrease in dissolved oxygen from 8 mg / L to 7.8 mg / L in 2 hours, with a relatively gentle change rate. When comparing with a pre-set threshold, assuming that the short-term threshold of pH value is 0.15 units per minute, if the change rate of a certain short-term window reaches 0.18 units, it is judged as a sharp fluctuation mode. If the change rate of the long-term window is always below 0.03 units per hour and there is no obvious trend, it is classified as a stable mode. This classification method helps to quickly identify abnormal or stable characteristics of water quality status.
[0032] S3, determining the water quality change mode of the target water area according to the short-term change rate set and the long-term change rate set.
[0033] The water quality change mode includes a stable mode, a slow change mode, or a sharp fluctuation mode.
[0034] As a possible implementation, if the value in the short-term change rate set is greater than or equal to the change rate threshold, the water quality monitoring device determines that the water quality change mode is a sharp fluctuation mode.
[0035] If the value in the short-term change rate set is less than the change rate threshold, and the value in the long-term change rate set is less than the change rate threshold, the water quality monitoring device determines that the water quality change mode is a stable mode.
[0036] If the value in the short-term change rate set is less than the change rate threshold, and the value in the long-term change rate set is greater than or equal to the change rate threshold, the water quality monitoring device determines that the water quality change mode is a slow change mode.
[0037] For example, when calculating the short-term change rate and the long-term change rate, the change speed can be quantified by comparing the data difference between adjacent time points. The short-term change rate set may show that a certain parameter changes at a rate of 10 units per minute within 3 minutes, while the long-term change rate set may show only 2 units per hour. Assuming that the preset short-term threshold is 8 units per minute and the long-term threshold is 3 units per hour, if multiple values in the short-term change rate set exceed 8, it is determined to be a sharp fluctuation mode; if the values in the long-term change rate set are all lower than 3, it is classified as a stable mode. Taking pH as an example, if the change rate within the short-term window reaches 0.2 units per minute, which exceeds the threshold of 0.15 units, a classification identifier of sharp fluctuation mode is generated.
[0038] S4, in the case where the water quality change mode of the target water area is a sharp fluctuation mode, determining the target sampling frequency of the water quality parameter according to the number of abnormalities, the change rate, and the amplitude ratio of the abnormalities of the water quality parameter.
[0039] The size of the target sampling frequency is positively correlated with the number of abnormalities, the change rate, and the amplitude ratio of the abnormalities of the water quality parameter.
[0040] As a possible implementation, the water quality monitoring device can determine the target sampling frequency according to a frequency adjustment algorithm.
[0041] The frequency adjustment algorithm satisfies the following relationship:
[0042] f new = f base *(1+αx+βy+γz)
[0043] Wherein, f new represents the target sampling frequency, fbase represents the sampling frequency before adjustment, a represents the abnormality frequency weight, x represents the first frequency adjustment coefficient corresponding to the abnormality frequency of the water quality parameter, β represents the change rate weight, y represents the second frequency adjustment coefficient corresponding to the parameter change rate, γ represents the amplitude weight, and z represents the third frequency adjustment coefficient corresponding to the abnormality amplitude ratio.
[0044] It should be noted that the system pre-stores a mapping relationship between a plurality of different abnormality frequencies and different first frequency adjustment coefficients, a mapping relationship between a plurality of different parameter change rates and different second frequency adjustment coefficients, and a mapping relationship between a plurality of different abnormality amplitude ratios and different third frequency adjustment coefficients.
[0045] It can be understood that based on the abnormality frequency, the change rate, and the amplitude ratio of the abnormality of the water quality parameter, the existing change of the water quality can be fully considered. The greater the change degree, the higher the adjusted sampling frequency will be, and the change data of the water quality can be recorded at a high frequency in the case of pollution outbreak.
[0046] In some embodiments, in the case that the water quality change mode of the target water area is a stable mode, the water quality monitoring device can reduce the sampling frequency based on a preset step size.
[0047] In some embodiments, in the case that the water quality change mode of the target water area is a slow change mode, the water quality monitoring device can maintain the existing sampling frequency.
[0048] The data stream obtained after adjusting the sampling frequency can better meet the actual needs. Taking turbidity monitoring as an example, if high-frequency sampling is adjusted, the device can quickly record the change data per second in the case of pollution outbreak; if low-frequency sampling is adjusted, the data redundancy can be reduced when the water quality is stable. The optimized frequency configuration ensures the pertinence of monitoring, balances the device load, and provides more reliable support for subsequent water quality management.
[0049] S5, based on the target sampling frequency, the target water area is monitored, and in the case that the abnormality frequency of the water quality parameter of the target water area based on the target sampling frequency is greater than the abnormality frequency threshold, an abnormality report of the target water area is generated.
[0050] The abnormality frequency threshold can be set as needed. For example, it can be 3.
[0051] As a possible implementation manner, the water quality monitoring device can obtain an abnormal data subset in the case that the abnormality frequency of the water quality parameter of the target water area is greater than the abnormality frequency threshold; compare the abnormal data subset with the historical data stream processing record to determine the abnormal reason corresponding to the abnormal data subset; and generate an abnormality report of the target water area according to the abnormal reason.
[0052] It should be noted that the abnormal data subset includes an abnormal water quality parameter type, an abnormal water quality parameter value, and a timestamp corresponding to the abnormal water quality parameter value; and the historical data stream processing record includes the sample abnormal data subset and a corresponding abnormal reason.
[0053] For example, in the monitoring of a river near an industrial park, if the abnormal data subset shows that the conductivity increases from 200 microsiemens per centimeter to 300 microsiemens per centimeter within 10 minutes, and the historical record shows that a similar pattern is often related to a pollution event, the system can determine that the abnormal reason is the pollution of the industrial park.
[0054] For another example, when monitoring a river as a source of drinking water, if the dissolved oxygen value decreases from 8.0 mg / L to 5.5 mg / L within 15 minutes, and pattern analysis shows that it is related to an algae outbreak, the system can determine that the abnormal reason is an algae outbreak.
[0055] In practical applications, the system will immediately generate an alarm signal. The alarm signal will be associated with the sampling point data set to form the basis for event judgment.
[0056] Specifically, the system can record the alarm triggering time as 2025-06-05 11:25:00, and the associated data includes the dissolved oxygen value of 5.5 mg / L, the conductivity of 210 microsiemens per centimeter, and the like.
[0057] By way of example, the alarm signal can be sent to the management department through a short message or an application notification, so as to facilitate timely response measures. In another embodiment, if the pH value deviates from the normal range, for example, it suddenly drops from 7.0 to 6.0, the system will bind the event with the sampling point data set to generate a detailed abnormal report for subsequent analysis.
[0058] In some embodiments, the water quality monitoring device can be further optimized by introducing more historical data or external environmental information. For example, during the monitoring process, the system can combine weather data such as rainfall to determine whether the turbidity anomaly is caused by natural factors.
[0059] As shown in FIG. 5, in step S5, an abnormal report of the target water area is generated according to the abnormal reason, including: Figure 1
[0060] S51, determining whether the water quality parameter is valid data.
[0061] As a possible implementation, the water quality monitoring device can process the water quality parameter through a Kalman filtering algorithm to obtain a filtered water quality parameter; based on the filtered water quality parameter, an evaluation index is determined, and in a case where the evaluation index is greater than an index threshold, the water quality parameter is determined as valid data.
[0062] The evaluation index includes a filtering consistency index.
[0063] The filter consistency index is determined by determining whether the data points at different time points are trusted data points, and determining the ratio of the number of trusted data points to the total number of data points as the filter consistency index.
[0064] The trusted data points at time t satisfy the following relationship: the difference between the state estimation value of the Kalman filter at time t and the actual observation value at time t is within the preset confidence interval.
[0065] For example, the system uses the Kalman filter algorithm to remove abnormal values caused by water flow disturbance. In one monitoring, the turbidity data has an abnormal peak value of 50 NTU due to floating object interference. By filtering the data points of the previous and subsequent 5 seconds, the abnormal value is corrected to 20 NTU close to the normal range, generating an intermediate data set.
[0066] It should be noted that the point-by-point correction will refer to the changes in environmental temperature and flow rate to ensure that the corrected data reflects the true water quality state.
[0067] For example, an increase in temperature may cause dissolved oxygen fluctuations, and the system will adjust the correction weight according to the temperature curve. If the intermediate data set fluctuates beyond the threshold, such as a decrease in dissolved oxygen from 8 mg / L to 5 mg / L within 5 minutes, which exceeds the preset threshold of 20%, a second adjustment is required.
[0068] In one embodiment, the water quality monitoring device can perform smoothing processing on the water quality parameters, and combine the time series continuity to smooth the data points into a more stable sequence.
[0069] For example, in one monitoring, the conductivity data fluctuates between 300 and 350 microsiemens per centimeter, and after smoothing, a more continuous sequence data set is generated, with a fluctuation amplitude of less than 10%. This smoothing processing can effectively reduce short-term interference and highlight the water quality change trend. In the data storage stage, the smoothed data set is arranged in chronological order to generate structured time series data.
[0070] For example, in one city river monitoring, the system arranges the dissolved oxygen and turbidity data according to the time stamp to generate a record in the format of "2025-06-05 11:30:00, dissolved oxygen 6.5 mg / L, turbidity 18 NTU".
[0071] Preferably, the system will verify whether the data meets the analysis format requirements, such as time interval consistency and parameter integrity.
[0072] For example, a data set is missing some time stamps due to sensor failure, and the system automatically fills in the missing points and marks them to ensure the reliability of subsequent analysis. This structured storage facilitates quick retrieval and abnormality tracing.
[0073] Understandably, the above processing forms a complete chain from data collection to storage. Precise setting of the collection cycle and range ensures data comprehensiveness, filtering and smoothing improve data quality, and structured storage provides a reliable foundation for subsequent analysis.
[0074] For example, in one monitoring session, the system successfully identified turbidity anomalies and generated high-precision time-series data by optimizing the acquisition and processing workflow, providing support for pollution source location. This multi-stage collaborative optimization significantly improved the monitoring system's responsiveness and data reliability.
[0075] Understandably, by using the filter consistency index, we can ensure that the accuracy of water quality parameters is within the expected range, guarantee that the water quality parameters are valid data, that is, verify the rationality of the adjustment effect and ensure the reliability of the monitoring results.
[0076] S52, when the water quality parameters are valid data, generates an anomaly report for the target water area based on the cause of the anomaly.
[0077] As one possible approach, water quality monitoring devices can use general classification tools to classify water quality status. Based on the classified water quality status information, a general document generation tool combined with a pre-established report template can be used for structured processing to generate the final anomaly report.
[0078] For example, in the field of water quality monitoring, when preprocessing data after the validity of monitoring results has been verified using general data cleaning tools, it is crucial to focus on data consistency verification. Data consistency verification aims to ensure that all collected parameters, such as pH, dissolved oxygen, and turbidity, are consistent in both time series and format.
[0079] For example, if a monitoring session reveals missing pH data for a certain period, it might be due to a temporary equipment malfunction. Pre-established completion rules can interpolate based on trends between preceding and following time points. For instance, if the pH value was 7.2 at one time and 7.4 at another, the system calculates a missing value of 7.3 and marks it as completed data. This approach ensures the continuity of the time series, providing a reliable foundation for subsequent analysis.
[0080] In one possible implementation, when using a general data integration tool to integrate multi-parameter information for the water quality status dataset in the anomaly report, the parameters are standardized according to a preset weight allocation rule.
[0081] For example, the weights of pH, dissolved oxygen and turbidity can be 0.4, 0.3 and 0.3 respectively, reflecting their different importance to the comprehensive evaluation of water quality. Assuming that the pH value is 7.5, the dissolved oxygen is 6.0 mg / L, and the turbidity is 25 NTU in a certain period, after standardization processing, the standardized values are obtained as 0.75, 0.60 and 0.50 respectively, and then the comprehensive evaluation data is generated by weighted summation. This method effectively integrates multi-parameter features to ensure that the evaluation results comprehensively reflect the water quality state.
[0082] For example, for the fused comprehensive evaluation data, when the water quality state classification is performed using a general classification tool, the preset threshold range needs to be referred to.
[0083] For example, the comprehensive evaluation data above 0.8 is first-class water quality, 0.6-0.8 is second-class, and below 0.6 is third-class. Assuming that the comprehensive evaluation data of a certain period is 0.65, the system determines that it is second-class water quality, and labels it as “mild pollution, need attention” through the pre-established mapping table. This classification method directly reflects the water quality state and is convenient for management departments to quickly understand and take measures.
[0084] In one possible implementation, for the classified water quality state information, an analysis report data is generated by using a general document generation tool combined with a report template.
[0085] For example, the system integrates the classification results, parameter trend charts, abnormal event records, etc. in chronological order to generate a structured report containing timestamps, specific parameter values and state descriptions. Assuming that the report shows that the turbidity of a river was continuously higher than 30 NTU from 14:00 to 16:00 on a certain day, and is labeled as “abnormal increase, suggest checking upstream pollution”, and the trend chart is attached. This structured processing is convenient for archiving and retrieval, and provides a clear basis for water quality management.
[0086] It can be understood that the above-mentioned steps form a complete water quality state evaluation process through a consistent logical chain from data cleaning to report generation.
[0087] For example, data cleaning ensures the reliability of the input, integration and standardization processing balances the influence of multiple parameters, classification and labeling provide intuitive results, and report generation is convenient for practical application. This layer-by-layer progressive approach ensures the credibility and practicality of the monitoring data, and provides solid support for water quality management decisions.
[0088] It should be noted that the self-flowing water detection system provided by the embodiment of the present application is used to execute all process steps of the real-time water quality monitoring method for the modular water treatment control system of the above-mentioned embodiment, and the working principles and beneficial effects of the two are one-to-one correspondence, so they will not be repeated here.
[0089] In summary, the present application provides a real-time water quality monitoring method for a modular water treatment control system, comprising: obtaining water quality parameters of a target water area; the water quality parameters comprising at least one of pH value, dissolved oxygen, turbidity, and conductivity; extracting the water quality parameters using a short-term window and a long-term window, calculating the change rate distribution of the water quality parameters in the short-term window and the long-term window, and obtaining a short-term change rate set and a long-term change rate set; determining a water quality change mode of the target water area according to the short-term change rate set and the long-term change rate set; the water quality change mode comprising a stable mode, a slow change mode, or a sharp fluctuation mode; in the case that the water quality change mode of the target water area is the sharp fluctuation mode, determining a target sampling frequency of the water quality parameters according to the number of abnormalities, the change rate, and the amplitude ratio of the abnormalities of the water quality parameters; monitoring the target water area based on the target sampling frequency, and generating an abnormality report of the target water area in the case that the number of abnormalities of the water quality parameters monitored based on the target sampling frequency is greater than an abnormality number threshold.
[0090] The present application also provides a terminal device. The terminal device comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a tap water detection program. The processor implements the steps of each of the above-mentioned real-time water quality monitoring methods for a modular water treatment control system when executing the computer program, such as the steps shown in the above-mentioned embodiments. Figure 1 Alternatively, the processor implements the functions of each module / unit in the above-mentioned system embodiments when executing the computer program.
[0091] For example, the computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present application. One or more modules / units can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the terminal device.
[0092] The terminal device can be a desktop computer, a notebook, a palm computer, and a smart tablet, etc. The terminal device can include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the above-mentioned components are only examples of the terminal device and do not constitute a limitation on the terminal device, and can include more or fewer components than the above-mentioned components, or combine certain components, or different components, for example, the terminal device can also include an input / output device, a network access device, a bus, etc.
[0093] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The processor is a control center of the terminal device, and connects all parts of the terminal device through various interfaces and lines.
[0094] The memory can be used to store the computer programs and / or modules, and the processor realizes various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc. The data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a nonvolatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state memory device.
[0095] The modules / units integrated in the terminal device, if realized in the form of software function units and sold or used as independent products, can be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. The computer program can implement the steps of each method embodiment when executed by a processor. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate forms, etc. The computer readable medium can include any entity or system, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. that can carry the computer program code. It should be noted that the computer readable medium can include or exclude contents according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
[0096] It should be noted that the above-described system embodiments are only schematic, and the units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment scheme according to actual needs. In addition, the connection relationship between the modules in the system embodiments provided by the present application indicates that there is a communication connection between them, which can be realized as one or more communication buses or signal lines. Those skilled in the art can understand and implement it without creative labor.
[0097] The above-described specific embodiments further illustrate the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above-described specific embodiments are only examples of the present application and are not intended to limit the protection scope of the present application. It is particularly pointed out that any modification, equivalent replacement, improvement, etc. made by those skilled in the art within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A real-time water quality monitoring method for a modular water treatment control system, characterized in that, include: Obtain water quality parameters of the target water area; the water quality parameters include at least one of the following: pH value, dissolved oxygen, turbidity, and conductivity; The water quality parameters are extracted using short-term and long-term windows, and the rate of change distribution of the water quality parameters within the short-term and long-term windows is calculated to obtain the short-term rate of change set and the long-term rate of change set. Based on the short-term rate of change set and the long-term rate of change set, determine the water quality change pattern of the target water area; The water quality change patterns include: stable mode, slow change mode, or rapid fluctuation mode. When the water quality change pattern of the target water area is the rapid fluctuation pattern, the target sampling frequency of the water quality parameter is determined based on the number of anomalies, the rate of change, and the proportion of the magnitude of the anomalies; the magnitude of the target sampling frequency is positively correlated with the number of anomalies, the rate of change, and the proportion of the magnitude of the anomalies of the water quality parameter. The target water area is monitored based on the target sampling frequency, and an anomaly report for the target water area is generated when the number of abnormal water quality parameters monitored based on the target sampling frequency exceeds the anomaly number threshold.
2. The real-time water quality monitoring method for a modular water treatment control system according to claim 1, characterized in that, The step of determining the water quality change pattern of the target water area based on the short-term rate of change set and the long-term rate of change set includes: If the value in the set of short-term change rates is greater than or equal to the change rate threshold, then the water quality change pattern is determined to be the rapid fluctuation pattern. If the value in the short-term rate of change set is less than the rate of change threshold, and the value in the long-term rate of change set is less than the rate of change threshold, then the water quality change pattern is determined to be the stable pattern. If the value in the short-term rate of change set is less than the rate of change threshold, and the value in the long-term rate of change set is greater than or equal to the rate of change threshold, then the water quality change pattern is determined to be the slow change pattern.
3. The real-time water quality monitoring method for a modular water treatment control system according to claim 1, characterized in that, Determining the target sampling frequency of the water quality parameters based on the number of anomalies, the rate of change, and the proportion of anomalies includes: The target sampling frequency is determined according to a frequency adjustment algorithm; The frequency adjustment algorithm satisfies the following relationship: in, Indicates the target sampling frequency. This indicates the sampling frequency before adjustment. Indicates the weight of the number of anomalies. The first frequency adjustment coefficient corresponds to the number of abnormal water quality parameters. Indicates the weight of the rate of change. This represents the second frequency adjustment coefficient corresponding to the rate of change of the parameter. Indicates magnitude weighting. This represents the third frequency adjustment coefficient corresponding to the proportion of abnormal amplitude.
4. The real-time water quality monitoring method for a modular water treatment control system according to claim 1, characterized in that, The generation of the anomaly report for the target water area includes: When the number of abnormal water quality parameters in the target water area exceeds the abnormality threshold, an abnormal data subset is obtained; the abnormal data subset includes the abnormal water quality parameter type, the abnormal water quality parameter value, and the timestamp corresponding to the abnormal water quality parameter value. The abnormal data subset is compared with historical data stream processing records to determine the cause of the abnormality corresponding to the abnormal data subset; the historical data stream processing records include the sample abnormal data subset and the corresponding cause of the abnormality. An anomaly report for the target water area is generated based on the stated cause of the anomaly.
5. The real-time water quality monitoring method for a modular water treatment control system according to any one of claims 1-4, characterized in that, The step of generating an anomaly report for the target water area based on the cause of the anomaly includes: Determine whether the water quality parameters are valid data; If the water quality parameters are valid data, an anomaly report for the target water area is generated based on the cause of the anomaly. Determining whether the water quality parameters are valid data includes: The water quality parameters are processed using the Kalman filter algorithm to obtain the filtered water quality parameters; Based on the filtered water quality parameters, evaluation indicators are determined, and if the evaluation indicators are greater than the indicator threshold, the water quality parameters are determined to be valid data; the evaluation indicators include the filtering consistency index.
6. The real-time water quality monitoring method for a modular water treatment control system according to claim 5, characterized in that, Determining the filter consistency index includes: Determine whether data points at different times are reliable data points; reliable data points at time t satisfy the following relationship: the difference between the state estimate at time t and the actual observation at time t by the Kalman filter is within a preset confidence interval; The ratio of the number of trusted data points to the total number of data points is determined as the filter consistency index.
7. A real-time water quality monitoring device for a modular water treatment control system, characterized in that, include: Acquisition unit, processing unit; The acquisition unit is used to acquire water quality parameters of the target water area; the water quality parameters include at least one of the following: pH value, dissolved oxygen, turbidity, and conductivity; The processing unit is used to extract the water quality parameters using short-term and long-term windows, calculate the rate of change distribution of the water quality parameters within the short-term and long-term windows, and obtain a set of short-term and long-term rates of change. The processing unit is further configured to determine the water quality change pattern of the target water area based on the short-term change rate set and the long-term change rate set; the water quality change pattern includes: a stable pattern, a slow change pattern, or a rapid fluctuation pattern; The processing unit is further configured to determine the target sampling frequency of the water quality parameters based on the number of abnormalities, the rate of change, and the magnitude of the abnormalities when the water quality change pattern of the target water area is the rapid fluctuation pattern. The processing unit is further configured to monitor the target water area based on the target sampling frequency, and generate an anomaly report for the target water area when the number of abnormal water quality parameters monitored based on the target sampling frequency is greater than the anomaly number threshold.
8. The real-time water quality monitoring device for a modular water treatment control system according to claim 7, characterized in that, The processing unit is specifically used for: If the value in the set of short-term change rates is greater than or equal to the change rate threshold, then the water quality change pattern is determined to be the rapid fluctuation pattern. If the value in the short-term rate of change set is less than the rate of change threshold, and the value in the long-term rate of change set is less than the rate of change threshold, then the water quality change pattern is determined to be the stable pattern. If the value in the short-term rate of change set is less than the rate of change threshold, and the value in the long-term rate of change set is greater than or equal to the rate of change threshold, then the water quality change pattern is determined to be the slow change pattern.
9. An electronic device, characterized in that, include: Processor and memory; The memory stores instructions that the processor can execute; When the processor is configured to execute the instructions, the electronic device performs the method as described in any one of claims 1-6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the real-time water quality monitoring method for a modular water treatment control system as described in any one of claims 1-6.
Citation Information
Patent Citations
Data type differentiation acquisition frequency determination method and system
CN116150664A
Sampling frequency adjusting method and device, equipment and storage medium
CN117348594A
Water quality change monitoring system for sewage treatment
CN118409064A
Method and system for monitoring water quality of coastal wetland
CN118688415A
Water quality detection method and system based on artificial intelligence
CN119249287A