Water quality monitoring method and system based on dynamic correction and multi-source calibration, and medium
By introducing self-generated calibration reference water samples and multi-source calibration methods into the water quality monitoring system, the problem of unstable sensor readings in dynamic water flow was solved, realizing online self-calibration and intelligent diagnosis of the sensor, and improving the accuracy and reliability of water quality monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING YIMU INTELLIGENT TECHNOLOGY CO LTD
- Filing Date
- 2026-02-27
- Publication Date
- 2026-06-05
Smart Images

Figure CN121721239B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water quality monitoring technology, and in particular to water quality monitoring methods, systems and media based on dynamic correction and multi-source calibration. Background Technology
[0002] In fields such as water treatment, environmental monitoring, and industrial process control, real-time and accurate online monitoring of key water pollution indicators (such as TOC, COD, and NTU) is crucial. Currently, the industry commonly uses online water quality sensors based on optical (such as ultraviolet spectroscopy) or electrochemical principles, which are directly connected to the water path to be measured to achieve continuous measurement.
[0003] To maintain the accuracy of sensors during long-term operation, conventional technical solutions follow a periodic offline calibration mode. The general process involves periodically disconnecting the sensor from the monitoring line, or switching valves to introduce a pre-prepared standard solution of known concentration into its measurement cell. The sensor corrects its measurement model (such as a calibration curve) based on the response signal of the standard solution, and then switches back to the water sample to be measured. To improve automation, some improved solutions introduce automatic valve assemblies and standard solution storage tanks, enabling periodic automatic standard solution injection and calibration.
[0004] However, in-depth research and engineering practice have revealed the following fundamental flaws in the existing technical solutions that have remained unresolved for a long time:
[0005] The measurement process is severely affected by the water sample condition, making it difficult to stabilize readings. Because online monitoring deals with dynamic water flow, issues such as air bubbles, transient impurities, and uneven distribution of pollutants in the water can cause continuous fluctuations or a slow attenuation of the sensor's real-time signal. To obtain a stable reading, operators often need to observe and wait for a long time, or manually record multiple times and average the results. This severely impacts data real-time performance and acquisition efficiency, and the judgment criteria are subjective with poor repeatability.
[0006] Calibration is a complex, costly, and uncertain process. Long-term sensor drift is an inevitable physical and chemical phenomenon. Frequent calibration not only consumes expensive chemical standard solutions, increasing operating costs, but also involves complex fluid control processes, leading to monitoring interruptions. Crucially, the calibration process itself is highly susceptible to failure due to fluid issues, such as residual air bubbles in the tubing during standard solution injection (bubble jamming), uneven mixing of the standard solution with residual liquid in the measuring cell, or deterioration of the standard solution due to improper storage. These hidden failures cannot be effectively identified by the system itself, resulting in the calibrated sensor actually being inaccurate and continuously outputting erroneous data, causing consequences more severe than not calibrating at all.
[0007] Therefore, there is an urgent need for a new water quality monitoring solution that can break free from strong dependence on external standard solutions and has embedded dynamic self-calibration capabilities, so as to achieve truly long-term maintenance-free and highly reliable operation. Summary of the Invention
[0008] To achieve the above-mentioned objectives and other advantages of the present invention, a first objective of the present invention is to provide a water quality monitoring method based on dynamic correction and multi-source calibration, comprising the following steps:
[0009] Sequentially acquire water quality parameter measurements of at least two different types of water samples, wherein the water sample types include the water sample to be tested and a calibration reference water sample generated by the monitoring system.
[0010] Stability determination is performed on the measured values of each water sample type to obtain stable measured values for each water sample type;
[0011] Based on the stable measurement values of the calibration reference water sample and the preset reference values, the system calibration quantity is determined;
[0012] Using the system calibration values, the stable measurement values of other water sample types are corrected to obtain the final monitoring values for each water sample type.
[0013] Furthermore, the calibration reference water sample is a pure water sample produced by the monitoring system through reverse osmosis treatment.
[0014] Furthermore, the water sample to be tested includes raw water sample and purified water sample after being processed by the monitoring system.
[0015] Furthermore, the step of determining the stability of the measured values for each type of water sample includes:
[0016] For continuous measurement processes of the same water sample type, a single measurement stability assessment is performed to screen out valid measurement values;
[0017] Based on the valid measurement values of the same type of water samples obtained from multiple historical rounds, a consistency determination is performed on multiple measurements to confirm and output the stable measurement value.
[0018] Furthermore, the step of performing a single measurement stability determination includes:
[0019] Continuously read water quality parameters to obtain measurement sequences;
[0020] Calculate the absolute value of the difference between adjacent measurements in the measurement sequence;
[0021] If the absolute values of M consecutive measurements are all less than the first preset threshold, it is determined that the single measurement has reached stability, and the last reading or the statistical value of the M consecutive measurements is taken as the valid measurement value; where M is a positive integer.
[0022] Furthermore, the step of performing multiple measurement consistency determination includes:
[0023] Maintain a buffer that stores the valid measurement values of the most recent K water samples of the same type, where K is a preset positive integer;
[0024] When a new valid measurement is obtained, the deviation of the new valid measurement from the statistical center value of all existing valid measurements in the buffer is calculated; wherein the statistical center value is the median, arithmetic mean, or mode.
[0025] If the deviation is less than the second preset threshold, it is determined that multiple measurements are consistent, and the new valid measurement value or the statistical center value is output as the stable measurement value.
[0026] If the deviation is not less than the second preset threshold, the new valid measurement value is stored in the buffer and a new round of measurement process for this type of water sample is triggered.
[0027] Furthermore, the determination of the system calibration quantity based on the stable measurement value of the calibration reference water sample and the preset reference value specifically involves:
[0028] Calculate the deviation between the stable measurement value of the calibration reference water sample and the preset reference value, and use the deviation as the system calibration quantity, or calculate the system calibration quantity based on the deviation using a predefined function.
[0029] Furthermore, the formula for calculating the system calibration quantity is as follows:
[0030]
[0031] in, The stable measurement value of the calibration reference water sample, The preset benchmark reference value, This is the preset calibration coefficient.
[0032] Furthermore, the step of using the system calibration value to correct stable measurement values for other water sample types specifically includes:
[0033] The system calibration value is superimposed or proportionally calculated with the stable measurement values of other water sample types to obtain the corresponding final monitoring value.
[0034] Furthermore, after obtaining the final monitored value, an anomaly detection step is included, wherein the anomaly detection is based on at least one of the following types of information:
[0035] Whether the stable measurement value of the calibration reference water sample is within the preset valid range;
[0036] Whether the final monitoring values of each water sample obtained after calibration conform to the preset logical relationship;
[0037] Are the physical parameters related to the operating status of the water system normal?
[0038] Furthermore, the anomaly detection is configured to perform at least one of the following diagnostic operations:
[0039] If the stable measurement value of the calibration reference water sample exceeds the preset effective range, a calibration function failure alarm will be triggered.
[0040] If the difference between the final monitored value of the water sample to be tested and the stable measured value of the calibration reference water sample is less than the third preset threshold, a water mixing abnormality alarm will be triggered.
[0041] If the monitored water flow rate is lower than the fourth preset threshold, an alarm for water blockage or pump / valve failure will be triggered.
[0042] If the monitored water temperature is lower than the fifth preset threshold, a temperature anomaly alarm will be triggered.
[0043] Furthermore, the first preset threshold and / or the second preset threshold are adaptive thresholds, the values of which are dynamically determined based on the statistical characteristics of the corresponding historical measurement data;
[0044] The adaptive determination method for the first preset threshold is as follows:
[0045] Based on the standard deviation or mean absolute difference of the data in the current measurement sequence before the stability condition is met, multiply by a preset coefficient to obtain the first preset threshold for the current round.
[0046] The adaptive determination method for the second preset threshold is as follows:
[0047] Based on the standard deviation or range of historical valid measurements in the buffer, multiply by a preset coefficient to obtain the current second preset threshold.
[0048] Furthermore, the preset calibration coefficient in the system calibration calculation formula is an adaptive coefficient; the preset calibration coefficient is updated based on multiple historical calibration data, and the update method is as follows:
[0049] Record the system calibration values and corresponding deviation values calculated at different system state points, and fit and update the preset calibration coefficients.
[0050] Furthermore, it also includes a sensor condition assessment step:
[0051] Record the system calibration quantities determined during each dynamic calibration process to form a historical sequence of calibration quantities;
[0052] Analyze the long-term trend of the historical sequence of the calibration values;
[0053] Based on the aforementioned trend, assessment information on the degree of performance degradation of the water quality sensor or prediction information on its remaining service life are generated.
[0054] Furthermore, the step of analyzing the long-term trend of the historical sequence of the calibration quantity includes:
[0055] Calculate the slope of the average value change of the calibration quantity history sequence over a period of time. If the slope exceeds the first state threshold, it is determined that the sensor performance is degrading at an accelerated rate.
[0056] And / or, calculate the variance of the historical sequence of the calibration quantity, and if the variance exceeds the second state threshold, determine that the sensor measurement stability has decreased.
[0057] A second objective of this invention is to provide a water quality monitoring system based on dynamic correction and multi-source calibration, comprising:
[0058] The data acquisition module is used to sequentially collect raw measurement values of water quality parameters from various types of water samples;
[0059] An integrated water treatment module is provided to provide a calibration reference water sample for the data acquisition module;
[0060] The data processing and control module is configured to execute the steps of the above method.
[0061] A third object of the present invention is to provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described method.
[0062] Compared with the prior art, the beneficial effects of the present invention are:
[0063] This invention provides a water quality monitoring method, system, and medium based on dynamic correction and multi-source calibration, achieving online, dynamic, and self-driven calibration. By introducing a calibration reference water sample generated by the system itself and embedding its measurement, comparison, and correction processes into standard measurement steps, this invention completely eliminates reliance on external standard solutions and manual intervention. The system can automatically complete self-calibration in each measurement cycle, transforming traditional, periodic maintenance events into a continuous measurement routine. This fundamentally eliminates the problem of data reliability decay over time due to sensor drift caused by long-term use, ensuring the long-term accuracy and stability of monitoring data.
[0064] This invention constructs a closed-loop traceability system for measurement values based on itself: The invention utilizes a stable, internally produced reference substance (pure water) and its theoretical value as a reference standard. By comparing the measured value with the theoretical value in real time, the system calibration value is dynamically calculated and applied. This is equivalent to establishing a micro-standard transfer chain for the monitoring system, enabling the measurement results of all tested water samples to be traced back to a stable internal reference in real time, greatly improving the reliability and consistency of the measurement results.
[0065] This invention improves the robustness and efficiency of measurements under complex operating conditions: by independently determining the stability of measurements for each type of water sample, it effectively filters out random interference and noise caused by air bubbles, transient impurities, or unstable water flow. This design ensures that the data input into subsequent calibration and calculation processes is reliable and representative, not only improving the accuracy of the final monitoring values but also optimizing the necessary settling and waiting process by intelligently determining the stable moment through algorithms, thereby improving overall monitoring efficiency.
[0066] This invention lays the foundation for intelligent diagnosis and system management: the stable measurement value of the calibration reference water sample is itself a key system indicator. The validity and rationality of its value provide the core data foundation for subsequent implementation of advanced diagnostic functions such as sensor failure early warning and calibration function self-verification. The methodological architecture of this invention provides core technical support for the evolution of monitoring systems from passive measurement tools to proactive management entities.
[0067] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it according to the contents of the specification, the preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings. Specific embodiments of the present invention are given in detail below with reference to the accompanying drawings. Attached Figure Description
[0068] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0069] Figure 1 This is a flowchart of a water quality monitoring method based on dynamic correction and multi-source calibration.
[0070] Figure 2 Flowchart for collecting water quality parameters for different types of water samples;
[0071] Figure 3 Flowchart for determining the stability of measurements for each water sample type;
[0072] Figure 4 Flowchart for performing single-measurement stability determination;
[0073] Figure 5 Flowchart for performing consistency determination of multiple measurements;
[0074] Figure 6 Flowchart for the calibration of stable measurement values for various water sample types;
[0075] Figure 7 This is a flowchart of the anomaly detection process;
[0076] Figure 8 The results are shown before and after using the method provided by this invention;
[0077] Figure 9 Flowchart for sensor health status assessment;
[0078] Figure 10 Flowchart for analyzing the long-term trend of historical calibration data;
[0079] Figure 11 A schematic diagram of computer equipment;
[0080] Figure 12 This is a schematic diagram of a computer-readable storage medium. Detailed Implementation
[0081] The present invention will now be further described with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. It should be noted that, without conflict, the various embodiments or technical features described below can be arbitrarily combined to form new embodiments.
[0082] Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this invention.
[0083] The drawing numbers in this application are only used to distinguish the steps in the scheme and are not used to limit the execution order of the steps. The specific execution order is as described in the specification.
[0084] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0085] Existing water quality monitoring solutions suffer from the following drawbacks: Separation of calibration and measurement, creating a reliability blind spot: Calibration is an independent, periodic maintenance process. Over long time intervals after calibration, sensors inevitably drift (upward or downward), causing measurement data to gradually become inaccurate without the system's detection. This leaves the monitoring system in an unverified state for most of the time, raising questions about its reliability. Poor anti-interference capability and cumbersome procedures: During dynamic water measurement, readings fluctuate greatly due to factors such as bubbles and transient impurities, requiring long periods of settling, resulting in low efficiency. Furthermore, verification is necessary after calibration to ensure successful single-calibration, further increasing operational complexity. Therefore, a water quality monitoring method capable of long-term stability and automatic calibration is urgently needed.
[0086] This method can be executed by the controller of the monitoring system, which can be implemented in software and / or hardware and is generally integrated into any electronic device with network communication capabilities, such as a mobile terminal, PC, or server.
[0087] Example 1
[0088] A water quality monitoring method based on dynamic correction and multi-source calibration, such as Figure 1 As shown, it includes the following steps:
[0089] S100: Sequentially acquire water quality parameter measurement values of at least two different types of water samples, wherein the water sample types include the water sample to be tested and the calibration reference water sample generated by the monitoring system.
[0090] In this embodiment, as Figure 2 As shown, the water quality parameters of different types of water samples are measured in sequence. For any type of water sample, the next type of water sample is introduced and the settling and measurement process is started only after the stability determination is passed. If the stability determination is not passed, the water introduction, settling and measurement process for that type of water sample is repeated.
[0091] In this embodiment, the calibration reference water sample is preferably a pure water sample produced by the monitoring system through reverse osmosis treatment. It should be noted that the calibration reference water sample can also be a stable liquid with other known theoretical parameters (such as specific conductivity or known TOC value). That is, the water quality monitoring method based on dynamic correction and multi-source calibration provided by this invention is not limited to the application of water quality sensors in pure water, but can also cover all schemes using standard solutions, reference solutions, and other reference liquids.
[0092] The water samples to be tested include raw water samples and purified water samples processed by the monitoring system.
[0093] This embodiment uses the monitoring of total organic carbon (TOC) in water as an example to describe in detail the execution flow of the method of the present invention, and should not be construed as a specific limitation on the parameters monitored for water quality. The method operates on a hardware system that includes a raw water inlet, a pure water preparation unit, a purified water outlet, a drain outlet, a water pump, a TOC sensor, a multi-way valve, a flow meter, a temperature sensor, and a controller.
[0094] S200. Determine the stability of the measured values for each type of water sample to obtain stable measured values for each type of water sample.
[0095] Because existing technologies struggle to intelligently distinguish between single-measurement noise, genuine abrupt changes in water quality, and baseline drift caused by long-term sensor use, simple filtering algorithms may smooth out real water quality changes while misinterpreting drift as a change, or vice versa. This creates an irreconcilable conflict between ensuring data stability and responding to real changes. To address this issue, in some embodiments, such as... Figure 3 As shown, the step of determining the stability of the measured values for each type of water sample includes:
[0096] S210. For continuous measurement processes of the same water sample type, perform single measurement stability judgment to screen out valid measurement values;
[0097] Specifically, such as Figure 4 As shown, the step of performing a single measurement stability determination includes:
[0098] S211. Continuously read water quality parameters to obtain measurement sequences;
[0099] S212. Calculate the absolute value of the difference between adjacent measurement values in the measurement sequence;
[0100] Because the values change slowly during the water settling process, it is necessary to wait for the values to stabilize before taking a new reading. This embodiment uses the adjacent difference threshold method for judgment, calculating the value by continuously reading the values. .
[0101] S213. Determine whether all M consecutive absolute values are less than a first preset threshold.
[0102] S214. If the absolute values of M consecutive measurements are all less than the first preset threshold, it is determined that the single measurement has reached stability, and the last reading value or the statistical value of the M consecutive measurement values is taken as the valid measurement value; where M is a positive integer.
[0103] Specifically, if M consecutive times If the result is positive, it is determined to be stable in a single measurement. Optionally, M is set to 10 and ε is set to 0.01.
[0104] In actual measurements, it usually takes 20-30 tests for the values to meet the stability requirements, effectively filter high-frequency noise, and ensure the reliability of a single reading.
[0105] S220. Based on the valid measurement values of the same type of water samples obtained from multiple historical rounds, perform a consistency determination of multiple measurements to confirm and output the stable measurement value.
[0106] Because a single water flow may encounter issues such as bubble accumulation and transient impurity mixing, a stable reading from a single measurement does not necessarily indicate stable values. It is necessary to compare readings from several subsequent measurements using similar water sources. Specifically, for example... Figure 5 As shown, the step of performing multiple measurement consistency determination includes:
[0107] S221. Maintain a buffer that stores the valid measurement values of the most recent K water samples of the same type, where K is a preset positive integer;
[0108] This embodiment implements a circular buffer to store historical data and add new data. For multiple rounds of raw water measurements, new data is continuously added while old data is excluded.
[0109] S222. When a new valid measurement value is obtained, the deviation between the new valid measurement value and the statistical center value of all existing valid measurements in the buffer is calculated; wherein the statistical center value is the median, arithmetic mean, or mode.
[0110] Specifically, the buffer size is variable. Optionally, the default value K is 5, used to store the most recent K valid measurements that are stable through a single measurement. A tolerance threshold (i.e., a second preset threshold) δ (e.g., 0.1) is set. After obtaining a new valid measurement value... Calculate the absolute deviation of this value from the median of all current values in the buffer, i.e.: .
[0111] S223. Determine whether the deviation is less than a second preset threshold;
[0112] S224. If the deviation is less than the second preset threshold, it is determined that multiple measurements are consistent, and the new valid measurement value or the statistical center value is output as the stable measurement value.
[0113] S225. If the deviation is not less than the second preset threshold, the new valid measurement value is stored in the buffer area, and a new round of measurement process for this type of water sample is triggered.
[0114] Data stability is determined by comparing the error between the median of the buffer and the latest data to a value exceeding 0.1. If the absolute deviation is less than δ, the entire system measurement is considered stable, and the output is... Alternatively, the median can be used as a stable value; if the absolute deviation is not less than δ, then... Continue adding data to the buffer, replacing the oldest data, and triggering a new round of measurements until the conditions are met.
[0115] When a numerical change occurs due to issues such as card-bubble errors, the abnormal data enters the buffer and is tested again in the next round. After the next round is normal, the new round of data is valid because there is only one set of abnormal data in the buffer.
[0116] When water quality changes abruptly, up to three rounds of measurements will be performed. The data from the buffer zone after the water quality change will be the majority, and the new round of data will be valid. This enhances the water quality detection sensor's ability to resist interference from sudden situations and ensures the representativeness and consistency of the output values.
[0117] like Figure 2 As shown, the water quality parameter measurement process of the monitoring system for pure water samples, raw water samples, and purified water samples produced by reverse osmosis treatment is as follows: The controller controls the switching of the multi-way valve. First, raw water is introduced into the TOC sensor measurement chamber, and then raw water measurement and stability determination are performed: The TOC values of the raw water are continuously read and recorded as the sequence O1, O2, O3, ..., and the absolute value of the difference between adjacent readings is calculated. Determine if it occurs 10 times consecutively (M=10). If all values are less than 0.01 (ε=0.01), continue reading; if so, take the last reading. This new value is used as the valid measurement value for the raw water. It is then added to a circular buffer (size K=5) specifically for storing historical valid raw water values. The absolute deviation of this new value from the median of all current values in the buffer is calculated. If the deviation is less than 0.1 (δ=0.1), the raw water measurement is considered stable, and this median is output as the stable measurement value for the raw water. Otherwise, overwrite the oldest value in the buffer with the new value and return to the step of continuously reading the raw water TOC value to trigger a new round of raw water flow, settling, and measurement process.
[0118] After the raw water stabilizes, the controller switches valves to start the pure water preparation unit to produce pure water, which is then introduced into the sensor. The TOC value of the pure water undergoes a two-layer stability assessment process identical to the raw water measurement and stability assessment process described above, ultimately yielding a stable measurement value for the pure water. .
[0119] Once the pure water has stabilized, the controller shuts off the pure water path and switches to the purified water output detection path, allowing purified water to flow into the sensor. After stability assessment, the original stable measurement value of the purified water is obtained. .
[0120] S300. Based on the stable measurement value of the calibration reference water sample and the preset reference value, determine the system calibration quantity;
[0121] The entire unit integrates purification devices such as carbon rods, RO filters, and filter membrane assemblies, enabling it to autonomously produce pure water and achieve rapid online calibration. This solves the problem of long-term sensor drift and eliminates the need for frequent and cumbersome chemical calibrations. Based on this, the purified water value is calculated by measuring the value of the autonomously produced pure water as an anchor point. In some embodiments, the system calibration value is determined based on the stable measured value of the calibration reference water sample and a preset reference value. Figure 6 As shown, specifically:
[0122] Calculate the deviation between the stable measurement value of the calibration reference water sample and the preset reference value, and use the deviation as the system calibration quantity, or calculate the system calibration quantity based on the deviation using a predefined function.
[0123] Since the numerical indicators exhibit a linear relationship across the entire measurement range in the microspectral measurement principle, this embodiment employs a linear offset calculation method. Because the above steps have already ensured the stability of the values, it is assumed here that the read values for raw water, pure water, and purified water are... , , .
[0124] Specifically, the formula for calculating the system calibration quantity is as follows:
[0125]
[0126] in, The stable measurement value of the calibration reference water sample, The preset benchmark reference value, This is a preset calibration coefficient. In this embodiment, N is the factory stable value measured by the RO membrane, which is an empirical value obtained through long-term measurement, ranging from 0.1 to 0.3.
[0127] For example, assuming the system's preset theoretical TOC value for pure water is N = 0.2 mg / L, and the preset calibration coefficient k is 1.0, the measured value... ,but This indicates that the sensor currently has an offset of +0.05 mg / L.
[0128] S400. Using the system calibration value, correct the stable measurement values of other water sample types to obtain the final monitoring value of each water sample type.
[0129] Specifically, the step of correcting stable measurement values of other water sample types using the system calibration value includes:
[0130] The system calibration value is superimposed or proportionally calculated with the stable measurement values of other water sample types to obtain the corresponding final monitoring value.
[0131] Based on the calculation formula for the system calibration amount, this offset is used to... and Processing:
[0132]
[0133]
[0134] Assuming the initial stable measurement value of purified water is obtained after stability determination. Using system calibration values The water was calibrated to obtain the final monitoring value of the purified water. Similarly, the raw water monitoring values are corrected.
[0135] Similarly, chemical oxygen demand (COD) and turbidity (NTU) are treated in a similar manner, which will not be elaborated here.
[0136] The method provided in this embodiment achieves true online dynamic self-calibration: the system's built-in water treatment module generates calibration reference water samples in real time, and the measurement, comparison, and correction process is deeply embedded into each regular measurement cycle, so that sensor drift is continuously and automatically compensated, completely eliminating the dependence on manual operation and external chemical standard solutions, and ensuring the long-term accuracy and stability of the data.
[0137] Existing technologies primarily focus on two isolated actions: measurement and calibration. They lack a closed-loop verification mechanism for the entire measurement system (including sensors, water circuits, valves, pumps, reverse osmosis membranes, and other components) and their operational status. When issues such as reverse osmosis membrane damage, water circuit crossflow, pump / valve malfunction, or severe sensor fouling occur, the system fails to automatically diagnose and alarm, still outputting seemingly reasonable but actually invalid data. This renders the monitoring system ineffective and poses a significant operational risk. To address this problem, after obtaining the final monitored value, an S500 and anomaly detection step are also included, such as... Figure 7 As shown, the anomaly detection is based on at least one of the following types of information:
[0138] S510. Whether the stable measurement value of the calibration reference water sample is within the preset valid range;
[0139] S520. Whether the final monitoring values of each water sample obtained after calibration conform to the preset logical relationship;
[0140] S530. Are the physical parameters related to the operating status of the water system normal?
[0141] Specifically, the anomaly detection is configured to perform at least one of the following diagnostic operations:
[0142] Calibration verification: If the stable measurement value of the calibration reference water sample exceeds the preset effective range, a calibration function failure alarm will be triggered;
[0143] For example, judgment Is it within the preset valid range [0.1, 0.3]? Yes, therefore the calibration function is valid.
[0144] For the above method to function correctly, a major prerequisite is that the pure water value is stable within the effective range of N. Therefore, for abnormal ranges, other indicators are needed for auxiliary judgment. The main abnormalities and judgment criteria are as follows:
[0145] Water circuit status: If the difference between the final monitoring value of the water sample to be tested and the stable measurement value of the calibration reference water sample is less than the third preset threshold, a water circuit mixing abnormality alarm will be triggered.
[0146] For example: calculation If this difference is less than 0.3 mg / L (i.e., the third preset threshold), a preliminary alarm for abnormal water mixing is triggered. The system further reads the pure water conductivity (TDS) value at this time. If TDS > 100 mg / L, an RO membrane rupture alarm is confirmed; if TDS < 100 mg / L, a water circuit cross-contamination alarm is confirmed.
[0147] This embodiment determines the range between pure water and raw water. Furthermore, if the TDS of the pure water is >100mg / L, it is determined that the RO membrane rupture caused the pure water to be contaminated by the raw water, resulting in a decrease in purity, and the TDS is high at this time.
[0148] By determining the range between pure water and raw water Furthermore, if the TDS of pure water is less than 100 mg / L, it is determined that the raw water and pure water are abnormally close, indicating that there may be cross-contamination in the water system, and the TDS is low in this case.
[0149] Pump and valve status: If the monitored water flow rate is lower than the fourth preset threshold, a water circuit blockage or pump and valve failure alarm will be triggered.
[0150] For example, if the flow rate of raw water or pure water is consistently below 100 mL / min (i.e., the fourth preset threshold), a water circuit blockage or pump / valve malfunction alarm will be triggered by reading the flow meter data.
[0151] RO membrane blockage leads to decreased water production efficiency: This was determined by judging that the pure water flow rate was less than 100 mL / min.
[0152] Valve pump malfunction, water inlet system failure, insufficient water pressure or flow: This situation is determined by judging that the raw water flow rate is less than 100ml / min.
[0153] Temperature check: If the detected water temperature is lower than the fifth preset threshold, a temperature abnormality alarm will be triggered.
[0154] For example, if the water temperature is below 3°C (i.e., the fifth preset threshold) when reading temperature sensor data, a temperature anomaly alarm will be triggered.
[0155] This embodiment, by comprehensively utilizing multi-source data comparison (raw water, pure water, and purified water) and monitoring physical state parameters (flow rate and temperature), can accurately diagnose various anomalies such as reverse osmosis membrane damage, water circuit crossflow, pump and valve failure, and sensor failure, and provide clear alarms. It solves the core risk of existing systems silently failing and greatly improves operational reliability.
[0156] To maintain the stability of the data appearance, existing schemes generally rely on high-frequency automatic calibration. In one ratio system, the system is set to perform up to 48 calibrations per day, triggered by a mechanism whereby the system interrupts the normal measurement process and performs a calibration based on an external standard solution when the detected pure water TOC value reaches a preset threshold of 0.7 mg / L. This scheme introduces periodic data fluctuations into the calibration operation. Figure 8 As shown, each calibration acts like a reset operation, forcibly pulling the pure water TOC measurement value from the trigger point (approximately 0.7 mg / L) back to a lower point close to the theoretical value of the standard solution (approximately 0.1 mg / L). This behavior, driven by system maintenance rather than actual water quality changes, leads to periodic, large-amplitude step jumps, severely disrupting the continuity and accuracy of the monitoring data. The resulting data curves are filled with interference and cannot be used to analyze continuous trends in water quality. This scheme also couples sensor parameter drift with the calibration action, causing systemic distortion. The core of calibration is correcting the calculated parameters within the sensor, while... Figure 8 The fluctuations in the TOC curve of the raw water exhibit a complex distortion, stemming from the natural aging and drift of the sensor during measurement, as well as the alteration of the sensor's global parameters by each calibration operation for pure water, causing synchronous jumps in the raw water measurement values. Therefore, the monitoring data inextricably mixes the true water quality signal, the sensor's state drift signal, and the pulse interference signal introduced by calibration operations. This high degree of uncertainty results in low long-term data reliability and unreliable trend analysis conclusions.
[0157] After applying the method provided by this invention, the system's operating state and data quality have undergone a fundamental transformation. For example... Figure 8As shown, after processing by the algorithm of this invention, the TOC value of pure water exhibits extremely high stability, with almost no fluctuations in the short term and a long-term stable maintenance at an ideal level of approximately 0.2 mg / L. This fully demonstrates that the embedded dynamic calibration mechanism of this invention can continuously and effectively offset the systematic drift of the sensor, so that the monitoring results of the purified water quality are no longer affected by the instrument status, and truly reflect the stability and compliance of the effluent water quality. Figure 8 The TOC curve of the Zhongyuan water source exhibits a gentle, continuous, and slow upward trend. Crucially, this trend is not caused by sensor drift. The algorithm of this invention has compensated for sensor drift in real time; therefore, the curve clearly reveals the true, slow rise of the TOC index of the monitored water source itself. This proves that the method of this invention successfully eliminates instrument noise and significantly improves the sensitivity and accuracy of detecting real water quality changes. Compared with the data curve before using the method provided by this invention, the data curve after using the method of this invention completely lacks abrupt changes caused by periodic calibration actions. The monitoring process is smooth and continuous, providing a high-quality and highly reliable data foundation for water quality early warning, trend analysis, and process optimization.
[0158] To enable the system to adapt to different water quality background noise (such as secondary water supply, rural water supply, pipe networks, etc.) and improve the universality and accuracy of stability determination, in some embodiments, the first preset threshold and / or the second preset threshold are adaptive thresholds, whose values are dynamically determined based on the statistical characteristics of the corresponding historical measurement data;
[0159] The adaptive determination method for the first preset threshold is as follows:
[0160] Based on the standard deviation or mean absolute difference of the data in the current measurement sequence before the stability condition is met, multiply by a preset coefficient to obtain the first preset threshold for the current round.
[0161] For example, for the first preset threshold ε, the system can analyze the noise of the measurement sequence before historical stabilization. If it is found that the recent noise is generally small, it can automatically adjust ε from 0.01 to 0.008 to speed up the stabilization determination.
[0162] The adaptive determination method for the second preset threshold is as follows:
[0163] Based on the standard deviation or range of historical valid measurements in the buffer, multiply by a preset coefficient to obtain the current second preset threshold.
[0164] To enable the calibration model to self-optimize and approximate the true drift model of the sensor, calibration is upgraded from a fixed formula to an adaptive model calibration. In some embodiments, the preset calibration coefficients in the system calibration calculation formula are adaptive coefficients; these preset calibration coefficients are updated based on multiple historical calibration data, and the update method is as follows:
[0165] Record the system calibration values and corresponding deviation values calculated at different system state points, and fit and update the preset calibration coefficients using linear regression or recursive least squares method.
[0166] For the calibration coefficient k, the system collects multiple sets of data obtained at different ambient temperatures. Data. Linear regression revealed that the best-fit line did not have a slope of 1.0. Based on this, the system updated the k-value from 1.0 to 0.95, making the calibration model more closely reflect the sensor's actual temperature-drift characteristics.
[0167] This embodiment effectively filters out measurement interference through a dual-layer stability determination mechanism; through adaptive adjustment of parameters (threshold, calibration coefficient), the system can better adapt to different water quality environments and individual sensor differences, further ensuring the representativeness and consistency of the output results.
[0168] To transform calibration quantities generated during the calibration process into key data for predictive maintenance, shifting from passive calibration to proactive early warning, the system's intelligence level is improved. In some embodiments, such as Figure 9 As shown, it also includes S600 and sensor condition assessment steps:
[0169] S610. Record the system calibration quantities determined during each dynamic calibration process to form a historical sequence of calibration quantities;
[0170] S620. Analyze the long-term trend of the historical sequence of the calibration quantity;
[0171] Specifically, such as Figure 10 As shown, the step of analyzing the long-term trend of the historical sequence of the calibration quantity includes:
[0172] S621. Calculate the slope of the average value change of the calibration quantity history sequence over a period of time. If the slope exceeds the first state threshold, it is determined that the sensor performance is deteriorating at an accelerated rate.
[0173] And / or, S622, calculate the fluctuation variance of the calibration quantity history sequence, and if the variance exceeds the second state threshold, determine that the sensor measurement stability has decreased.
[0174] S630. Based on the aforementioned trend, generate assessment information about the degree of performance degradation of the water quality sensor or prediction information about its remaining service life.
[0175] For example, the system will use this calibration amount Store in the historical database. Analyze the past 30 days. If the average value of the sequence slowly changes from -0.02 to -0.05 and the slope exceeds the threshold, then the sensor exhibits slow positive drift, and this is an evaluation information that should be monitored.
[0176] In the above raw water measurement and stability determination steps, if the raw water buffer data cannot converge (e.g., due to severe fluctuations in TOC caused by upstream sewage discharge), and the above-mentioned water circuit status, pump and valve status, and temperature checks do not trigger alarms, the system determines it as a water quality mutation event and automatically saves detailed data in the buffer before and after the event.
[0177] This embodiment enables predictive maintenance of sensor performance by analyzing historical trends in calibration values; by identifying and capturing sudden water quality events, it provides crucial data support for pollution source tracing and emergency response, upgrading the system from a passive data logger to a proactive intelligent water condition monitor.
[0178] This embodiment provides a water quality monitoring method based on dynamic correction and multi-source calibration, achieving online, dynamic, and self-driven calibration. By introducing a calibration reference water sample generated by the system itself and embedding its measurement, comparison, and correction processes into standard measurement steps, this embodiment completely eliminates the reliance on external standard solutions and manual intervention. The system can automatically complete self-calibration in each measurement cycle, transforming traditional, periodic maintenance events into a continuous measurement routine. This fundamentally eliminates the problem of data reliability decay over time due to sensor drift caused by long-term use, ensuring the long-term accuracy and stability of monitoring data.
[0179] This embodiment constructs a closed-loop traceability system based on itself: the method uses a stable, internally produced reference substance (pure water) and its theoretical value as a reference standard. By comparing the measured value with the theoretical value in real time, the system calibration value is dynamically calculated and applied. This is equivalent to establishing a self-consistent, closed-loop micro-standard transfer chain for the monitoring system, enabling the measurement results of all water samples to be tested to be traced back to a stable internal reference in real time, greatly improving the reliability and consistency of the measurement results.
[0180] This embodiment improves the robustness and efficiency of measurements under complex operating conditions: by independently determining the stability of measurements for each water sample type, random interference and noise caused by air bubbles, transient impurities, or unstable water flow are effectively filtered out. This design ensures that the data input into subsequent calibration and calculation processes is reliable and representative, not only improving the accuracy of the final monitoring values but also optimizing the necessary settling and waiting process by intelligently determining the stabilization time through algorithms, thereby improving overall monitoring efficiency.
[0181] This embodiment lays the foundation for intelligent diagnosis and system management: the stable measurement value of the calibration reference water sample is itself a key system indicator. The validity and rationality of its value provide the core data foundation for subsequent implementation of advanced diagnostic functions such as sensor failure early warning and calibration function self-verification. The methodological architecture of this embodiment provides core technical support for the evolution of monitoring systems from passive measurement tools to proactive management entities.
[0182] Example 2
[0183] Based on the same concept, this embodiment also provides a water quality monitoring system based on dynamic correction and multi-source calibration, which applies the water quality monitoring method provided in Embodiment 1. For a detailed description of the water quality monitoring method provided in Embodiment 1, please refer to the corresponding description in the above method embodiments, which will not be repeated here.
[0184] It is understood that the water quality monitoring system provided in this embodiment includes hardware structures and / or software modules corresponding to each function in order to achieve the above-mentioned functions. Combining the units and algorithm steps of the examples disclosed in this embodiment, this embodiment can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the technical solution of this embodiment.
[0185] A water quality monitoring system based on dynamic correction and multi-source calibration includes:
[0186] The data acquisition module is used to sequentially collect raw measurement values of water quality parameters from various types of water samples;
[0187] An integrated water treatment module is provided to provide a calibration reference water sample for the data acquisition module;
[0188] The data processing and control module is configured to execute the steps of the above method. For a detailed description of the method, please refer to the corresponding description in the above method embodiments; it will not be repeated here.
[0189] The data processing and control module in this embodiment may include the following processes:
[0190] A water quality parameter measurement value acquisition unit is used to sequentially acquire water quality parameter measurement values of at least two different types of water samples, wherein the water sample types include the water sample to be tested and the calibration reference water sample generated by the monitoring system.
[0191] The stability determination unit is used to determine the stability of the measured values of each water sample type to obtain stable measured values for each water sample type.
[0192] The system calibration quantity determination unit is used to determine the system calibration quantity based on the stable measurement value of the calibration reference water sample and the preset reference value.
[0193] The stable measurement value correction unit is used to correct the stable measurement values of other water sample types using the system calibration value, so as to obtain the final monitoring value of each water sample type.
[0194] Based on the technical solution of the above embodiments, optionally, the calibration reference water sample is a pure water sample generated by the monitoring system through reverse osmosis treatment.
[0195] Based on the technical solutions of the above embodiments, optionally, the water sample to be tested includes raw water sample and purified water sample after being processed by the monitoring system.
[0196] Based on the technical solution of the above embodiments, optionally, the step of determining the stability of the measured values of each water sample type includes:
[0197] For continuous measurement processes of the same water sample type, a single measurement stability assessment is performed to screen out valid measurement values;
[0198] Based on the valid measurement values of the same type of water samples obtained from multiple historical rounds, a consistency determination is performed on multiple measurements to confirm and output the stable measurement value.
[0199] Based on the technical solutions of the above embodiments, optionally, the step of performing a single measurement stability determination includes:
[0200] Continuously read water quality parameters to obtain measurement sequences;
[0201] Calculate the absolute value of the difference between adjacent measurements in the measurement sequence;
[0202] If the absolute values of M consecutive measurements are all less than the first preset threshold, it is determined that the single measurement has reached stability, and the last reading or the statistical value of the M consecutive measurements is taken as the valid measurement value; where M is a positive integer.
[0203] Based on the technical solutions of the above embodiments, optionally, the step of performing multiple measurement consistency determination includes:
[0204] Maintain a buffer that stores the valid measurement values of the most recent K water samples of the same type, where K is a preset positive integer;
[0205] When a new valid measurement is obtained, the deviation between the new valid measurement and the statistical center value of all existing valid measurements in the buffer is calculated.
[0206] If the deviation is less than the second preset threshold, it is determined that multiple measurements are consistent, and the new valid measurement value or the statistical center value is output as the stable measurement value.
[0207] If the deviation is not less than the second preset threshold, the new valid measurement value is stored in the buffer and a new round of measurement process for this type of water sample is triggered.
[0208] Based on the technical solutions of the above embodiments, optionally, the statistical center value is the median, arithmetic mean, or mode.
[0209] Based on the technical solution of the above embodiments, optionally, determining the system calibration quantity based on the stable measurement value of the calibration reference water sample and the preset reference value specifically involves:
[0210] Calculate the deviation between the stable measurement value of the calibration reference water sample and the preset reference value, and use the deviation as the system calibration quantity, or calculate the system calibration quantity based on the deviation using a predefined function.
[0211] Based on the technical solutions of the above embodiments, optionally, the calculation formula for the system calibration quantity is:
[0212]
[0213] in, The stable measurement value of the calibration reference water sample, The preset benchmark reference value, This is the preset calibration coefficient.
[0214] Based on the technical solution of the above embodiments, optionally, the step of using the system calibration value to correct the stable measurement values of other water sample types specifically includes:
[0215] The system calibration value is superimposed or proportionally calculated with the stable measurement values of other water sample types to obtain the corresponding final monitoring value.
[0216] Based on the technical solution of the above embodiments, optionally, after obtaining the final monitoring value, an anomaly detection step is further included, wherein the anomaly detection is based on at least one of the following types of information:
[0217] Whether the stable measurement value of the calibration reference water sample is within the preset valid range;
[0218] Whether the final monitoring values of each water sample obtained after calibration conform to the preset logical relationship;
[0219] Are the physical parameters related to the operating status of the water system normal?
[0220] Based on the technical solutions of the above embodiments, optionally, the anomaly detection is configured to perform at least one of the following diagnostic operations:
[0221] If the stable measurement value of the calibration reference water sample exceeds the preset effective range, a calibration function failure alarm will be triggered.
[0222] If the difference between the final monitored value of the water sample to be tested and the stable measured value of the calibration reference water sample is less than the third preset threshold, a water mixing abnormality alarm will be triggered.
[0223] If the monitored water flow rate is lower than the fourth preset threshold, an alarm for water blockage or pump / valve failure will be triggered.
[0224] If the monitored water temperature is lower than the fifth preset threshold, a temperature anomaly alarm will be triggered.
[0225] Based on the technical solutions of the above embodiments, optionally, the first preset threshold and / or the second preset threshold are adaptive thresholds, whose values are dynamically determined based on the statistical characteristics of the corresponding historical measurement data;
[0226] The adaptive determination method for the first preset threshold is as follows:
[0227] Based on the standard deviation or mean absolute difference of the data in the current measurement sequence before the stability condition is met, multiply by a preset coefficient to obtain the first preset threshold for the current round.
[0228] The adaptive determination method for the second preset threshold is as follows:
[0229] Based on the standard deviation or range of historical valid measurements in the buffer, multiply by a preset coefficient to obtain the current second preset threshold.
[0230] Based on the technical solution of the above embodiments, optionally, the preset calibration coefficient in the system calibration quantity calculation formula is an adaptive coefficient; the preset calibration coefficient is updated based on multiple calibration historical data, and the update method is as follows:
[0231] Record the system calibration values and corresponding deviation values calculated at different system state points, and fit and update the preset calibration coefficients.
[0232] Optionally, based on the technical solution of the above embodiments, a sensor state assessment step is also included:
[0233] Record the system calibration quantities determined during each dynamic calibration process to form a historical sequence of calibration quantities;
[0234] Analyze the long-term trend of the historical sequence of the calibration values;
[0235] Based on the aforementioned trend, assessment information on the degree of performance degradation of the water quality sensor or prediction information on its remaining service life are generated.
[0236] Based on the technical solution of the above embodiments, optionally, the step of analyzing the long-term trend of the historical sequence of the calibration quantity includes:
[0237] Calculate the slope of the average value change of the calibration quantity history sequence over a period of time. If the slope exceeds the first state threshold, it is determined that the sensor performance is degrading at an accelerated rate.
[0238] And / or, calculate the variance of the historical sequence of the calibration quantity, and if the variance exceeds the second state threshold, determine that the sensor measurement stability has decreased.
[0239] This embodiment provides a water quality monitoring system based on dynamic correction and multi-source calibration, achieving online, dynamic, and self-driven calibration. By introducing a calibration reference water sample generated by the system itself and embedding its measurement, comparison, and correction processes as standard measurement steps, this embodiment completely eliminates reliance on external standard solutions and manual intervention. The system can automatically complete self-calibration in each measurement cycle, transforming traditional, periodic maintenance events into a continuous measurement routine. This fundamentally eliminates the problem of data reliability decay over time due to sensor drift caused by long-term use, ensuring the long-term accuracy and stability of monitoring data.
[0240] This embodiment constructs a closed-loop traceability system based on itself: the method uses a stable, internally produced reference substance (pure water) and its theoretical value as a reference standard. By comparing the measured value with the theoretical value in real time, the system calibration value is dynamically calculated and applied. This is equivalent to establishing a self-consistent, closed-loop micro-standard transfer chain for the monitoring system, enabling the measurement results of all water samples to be tested to be traced back to a stable internal reference in real time, greatly improving the reliability and consistency of the measurement results.
[0241] This embodiment improves the robustness and efficiency of measurements under complex operating conditions: by independently determining the stability of measurements for each water sample type, random interference and noise caused by air bubbles, transient impurities, or unstable water flow are effectively filtered out. This design ensures that the data input into subsequent calibration and calculation processes is reliable and representative, not only improving the accuracy of the final monitoring values but also optimizing the necessary settling and waiting process by intelligently determining the stabilization time through algorithms, thereby improving overall monitoring efficiency.
[0242] This embodiment lays the foundation for intelligent diagnosis and system management: the stable measurement value of the calibration reference water sample is itself a key system indicator. The validity and rationality of its value provide the core data foundation for subsequent implementation of advanced diagnostic functions such as sensor failure early warning and calibration function self-verification. The methodological architecture of this embodiment provides core technical support for the evolution of monitoring systems from passive measurement tools to proactive management entities.
[0243] Example 3
[0244] A computer device 700, such as Figure 11 As shown, the system includes a memory 710, a processor 720, and a computer program 730 stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of a water quality monitoring method based on dynamic correction and multi-source calibration. For a detailed description of the method, please refer to the corresponding description in the above method embodiments; it will not be repeated here.
[0245] Example 4
[0246] A computer-readable storage medium, such as Figure 12 As shown, a computer program is stored thereon. When executed by a processor, the computer program implements the steps of a water quality monitoring method based on dynamic correction and multi-source calibration. For a detailed description of the method, please refer to the corresponding description in the above method embodiments, which will not be repeated here.
[0247] The number of devices and processing scale described herein are for the purpose of simplifying the description of the invention. Applications, modifications, and variations of the invention will be readily apparent to those skilled in the art.
[0248] Although embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the specification and embodiments. They can be applied to various fields suitable for the present invention. For those skilled in the art, other modifications can be easily made. Therefore, without departing from the general concept defined by the claims and their equivalents, the present invention is not limited to the specific details and illustrations shown and described herein.
[0249] The apparatus, computer device, and non-volatile computer storage medium and method provided in the embodiments of this specification are corresponding. Therefore, the apparatus, computer device, and non-volatile computer storage medium also have similar beneficial technical effects as the corresponding method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the corresponding apparatus, computer device, and non-volatile computer storage medium will not be repeated here.
[0250] Those skilled in the art will also know that, besides implementing the controller in the form of purely computer-readable program code, the same functions can be achieved by logically programming the method steps, making the controller take the form of logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers (PLCs), and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the devices included within it for implementing various functions can also be considered structures within that hardware component. Alternatively, the devices for implementing various functions can be considered as both software units implementing the method and structures within a hardware component.
[0251] The systems, apparatuses, or units described in the above embodiments can be implemented by computer chips or physical entities, or by products with certain functions. For ease of description, the above apparatuses are described separately as various units based on their functions. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in one or more software and / or hardware.
[0252] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the embodiments of this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0253] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, 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, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0254] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0255] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0256] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0257] This specification may be described in the general context of computer-executable instructions, such as program units, that are executed by a computer. Generally, program units include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification may also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program units may reside in local and remote computer storage media, including storage devices.
[0258] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0259] The above description is merely an embodiment of this specification and is not intended to limit the scope of one or more embodiments of this specification. Various modifications and variations can be made to one or more embodiments of this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of one or more embodiments of this specification should be included within the scope of the claims of one or more embodiments of this specification.
Claims
1. A water quality monitoring method based on dynamic correction and multi-source calibration, characterized in that, Includes the following steps: Sequentially acquire water quality parameter measurements of at least two different types of water samples, wherein the water sample types include the water sample to be tested and a calibration reference water sample generated by the monitoring system. Stability determination is performed on the measured values of each water sample type to obtain stable measured values for each water sample type; Based on the stable measurement values of the calibration reference water sample and the preset reference values, the system calibration quantity is determined; Using the system calibration values, the stable measurement values of other water sample types are corrected to obtain the final monitoring values for each water sample type; The step of determining the stability of the measured values for each type of water sample includes: For continuous measurement processes of the same water sample type, a single measurement stability assessment is performed to screen out valid measurement values; Based on the valid measurement values of the same type of water samples obtained from multiple historical rounds, a consistency determination of multiple measurements is performed to confirm and output the stable measurement value; The step of performing a single measurement stability determination includes: Continuously read water quality parameters to obtain measurement sequences; Calculate the absolute value of the difference between adjacent measurements in the measurement sequence; If the absolute values of M consecutive measurements are all less than the first preset threshold, it is determined that the single measurement has reached stability, and the last reading or the statistical value of the M consecutive measurements is taken as the valid measurement value; where M is a positive integer. The step of performing consistency determination for multiple measurements includes: Maintain a buffer that stores the valid measurement values of the most recent K water samples of the same type, where K is a preset positive integer; When a new valid measurement is obtained, the deviation of the new valid measurement from the statistical center value of all existing valid measurements in the buffer is calculated; wherein the statistical center value is the median, arithmetic mean, or mode. If the deviation is less than the second preset threshold, it is determined that multiple measurements are consistent, and the new valid measurement value or the statistical center value is output as the stable measurement value. If the deviation is not less than the second preset threshold, the new valid measurement value is stored in the buffer area, and a new round of measurement process for this type of water sample is triggered. The system calibration quantity is determined based on the stable measurement value of the calibration reference water sample and the preset reference value, specifically as follows: Calculate the deviation between the stable measurement value of the calibration reference water sample and the preset reference value, and use the deviation as the system calibration quantity, or calculate the system calibration quantity based on the deviation using a predefined function; The formula for calculating the system calibration quantity is: in, The stable measurement value of the calibration reference water sample, The preset benchmark reference value, This is the preset calibration coefficient.
2. The water quality monitoring method based on dynamic correction and multi-source calibration as described in claim 1, characterized in that, The calibration reference water sample is a pure water sample produced by the monitoring system through reverse osmosis treatment.
3. The water quality monitoring method based on dynamic correction and multi-source calibration as described in claim 1, characterized in that, The water samples to be tested include raw water samples and purified water samples processed by the monitoring system.
4. The water quality monitoring method based on dynamic correction and multi-source calibration as described in claim 1, characterized in that, The step of correcting stable measurement values for other water sample types using the system calibration parameters is as follows: The system calibration value is superimposed or proportionally calculated with the stable measurement values of other water sample types to obtain the corresponding final monitoring value.
5. A water quality monitoring method based on dynamic correction and multi-source calibration as described in claim 4, characterized in that, After obtaining the final monitoring value, an anomaly detection step is also included, which is based on at least one of the following types of information: Whether the stable measurement value of the calibration reference water sample is within the preset valid range; Whether the final monitoring values of each water sample obtained after calibration conform to the preset logical relationship; Are the physical parameters related to the operating status of the water system normal? 6. The water quality monitoring method based on dynamic correction and multi-source calibration as described in claim 5, characterized in that, The anomaly detection is configured to perform at least one of the following diagnostic operations: If the stable measurement value of the calibration reference water sample exceeds the preset effective range, a calibration function failure alarm will be triggered. If the difference between the final monitored value of the water sample to be tested and the stable measured value of the calibration reference water sample is less than the third preset threshold, a water mixing abnormality alarm will be triggered. If the monitored water flow rate is lower than the fourth preset threshold, an alarm for water blockage or pump / valve failure will be triggered. If the monitored water temperature is lower than the fifth preset threshold, a temperature anomaly alarm will be triggered.
7. The water quality monitoring method based on dynamic correction and multi-source calibration as described in claim 1, characterized in that, The first preset threshold and / or the second preset threshold are adaptive thresholds, whose values are dynamically determined based on the statistical characteristics of the corresponding historical measurement data; The adaptive determination method for the first preset threshold is as follows: Based on the standard deviation or mean absolute difference of the data in the current measurement sequence before the stability condition is met, multiply by a preset coefficient to obtain the first preset threshold for the current round. The adaptive determination method for the second preset threshold is as follows: Based on the standard deviation or range of historical valid measurements in the buffer, multiply by a preset coefficient to obtain the current second preset threshold.
8. The water quality monitoring method based on dynamic correction and multi-source calibration as described in claim 1, characterized in that, The calibration coefficient preset in the system calibration calculation formula is an adaptive coefficient; the preset calibration coefficient is updated based on multiple calibration historical data, and the update method is as follows: Record the system calibration values and corresponding deviation values calculated at different system state points, and fit and update the preset calibration coefficients.
9. A water quality monitoring method based on dynamic correction and multi-source calibration as described in any one of claims 1 to 8, characterized in that, It also includes a sensor condition assessment step: Record the system calibration quantities determined during each dynamic calibration process to form a historical sequence of calibration quantities; Analyze the long-term trend of the historical sequence of the calibration values; Based on the aforementioned trend, assessment information on the degree of performance degradation of the water quality sensor or prediction information on its remaining service life are generated.
10. A water quality monitoring method based on dynamic correction and multi-source calibration as described in claim 9, characterized in that, The steps for analyzing the long-term trend of the historical sequence of the calibration amount include: Calculate the slope of the average value change of the calibration quantity history sequence over a period of time. If the slope exceeds the first state threshold, it is determined that the sensor performance is degrading at an accelerated rate. And / or, calculate the variance of the historical sequence of the calibration quantity, and if the variance exceeds the second state threshold, determine that the sensor measurement stability has decreased.
11. A water quality monitoring system based on dynamic correction and multi-source calibration, characterized in that, include: The data acquisition module is used to sequentially collect raw measurement values of water quality parameters from various types of water samples; An integrated water treatment module is provided to provide a calibration reference water sample for the data acquisition module; A data processing and control module is configured to perform the steps of the method as described in any one of claims 1 to 10.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 10.