A real-time river pollution monitoring method based on the Internet of Things

CN122820022APending Publication Date: 2026-09-25江苏省南京环境监测中心
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611290402.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-25
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0007]本发明提供了一种基于物联网的实时河流污染监测方法,用于克服传统方法对环境突变适应性差、易误报漏报的固有缺陷

Benefits of technology

[0018]本发明的机理如下:能够自适应于河流水文的季节性变化和日周期规律,在有效滤除传感器基线漂移和偶发噪声的同时,显著提升对突发异常污染的早期捕捉能力与预警准确性;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122820022A_ABST
    Figure CN122820022A_ABST
Patent Text Reader

Abstract

The application relates to the field of environmental monitoring and discloses a real-time river pollution monitoring method based on Internet of Things, which is used for solving the problems of large data noise, weight solidification, lagging early warning and poor fault tolerance in existing water quality monitoring. The method comprises the following steps: obtaining target water quality parameter monitoring data according to continuous sampling time points, converting the target water quality parameter monitoring data into standardized parameter values through temperature compensation and linear mapping; obtaining corrected parameter values; calculating dynamic weights according to the average absolute change rates of parameters in a continuous sampling window, and generating an adaptive pollution index through weighted normalization; adopting a first-order exponential smoothing model with a smoothing factor dynamically adjusted according to the absolute value of a prediction deviation to output a pollution index prediction value of a future step; and generating a dynamic early warning threshold based on the median and absolute deviation of historical data, and triggering early warning when a real-time index or a prediction value exceeds the threshold. The application effectively overcomes the interference of sensor drift and background difference, and realizes adaptive and forward-looking early warning of water quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of environmental monitoring, and more particularly to a real-time river pollution monitoring method based on the Internet of Things. Background Technology

[0002] Traditional river water quality monitoring mainly relies on manual sampling combined with laboratory physicochemical analysis. Although this method can obtain accurate data, it has inherent defects such as low monitoring frequency, poor timeliness, insufficient spatial coverage, and high labor costs, making it difficult to capture sudden pollution events or instantaneous changes in pollutant concentrations.

[0003] In recent years, the rapid development of Internet of Things (IoT) technology has brought innovation to the field of environmental monitoring. Automatic monitoring stations based on multi-parameter water quality sensors can achieve continuous data acquisition and remote transmission, and have become the mainstream solution for real-time river pollution monitoring. However, existing real-time monitoring systems still face many technical bottlenecks in practical applications: Water quality sensors are immersed in complex water bodies for a long time, making them susceptible to factors such as biological adhesion and electrode passivation, which can cause baseline drift. Instantaneous disturbances in the water environment can lead to non-physical spike noise in the measurement values, which seriously affects the reliability of the data.

[0004] Existing comprehensive water quality assessment models mostly use static weights to sum the parameters. However, in actual rivers, the diffusion and migration of pollutants are highly dynamic, and fixed weights cannot reflect the changing characteristics of the dominant pollutants within a specific time period, leading to distorted assessment results.

[0005] When a sensor fails due to contamination or damage, the existing system often cannot automatically identify and remove abnormal data, leading to the paralysis of the entire monitoring system or the output of incorrect analysis results.

[0006] Therefore, we propose an IoT-based real-time river pollution monitoring method to address the aforementioned issues. Summary of the Invention

[0007] This invention provides a real-time river pollution monitoring method based on the Internet of Things, which overcomes the inherent defects of traditional methods such as poor adaptability to sudden environmental changes and susceptibility to false alarms and missed alarms.

[0008] The first aspect of this invention provides a real-time river pollution monitoring method based on the Internet of Things (IoT). The method includes: acquiring real-time monitoring data of various target water quality parameters measured by monitoring nodes at continuous sampling times; converting the real-time monitoring data of each target water quality parameter into standardized parameter values ​​according to a preset standard range; preprocessing the standardized parameter values, including anomaly suppression, drift compensation, and missing value completion, to obtain corrected parameter values ​​for each target water quality parameter at the current sampling time; calculating dynamic weights based on the rate of change of the corrected parameter values ​​of each target water quality parameter within a preset time window; and applying these weights to the data. The dynamic weights of the target water quality parameters are used to weight and normalize the corresponding correction parameter values ​​to obtain the adaptive pollution index value at the current sampling time. A prediction model is used with the adaptive pollution index value as input to predict the pollution index value for future sampling steps. The smoothing parameter of the prediction model is dynamically adjusted according to the absolute value of the deviation between the actual value of the adaptive pollution index value at the current sampling time and the historical predicted value. A dynamic early warning threshold is calculated based on the historical data of the adaptive pollution index value. When the adaptive pollution index value or the predicted pollution index value at the current sampling time reaches the dynamic early warning threshold, a pollution warning is triggered.

[0009] Optionally, in a first implementation of the first aspect of the present invention, the target water quality parameters include at least pH, dissolved oxygen, turbidity, and conductivity; while acquiring real-time monitoring data of each target water quality parameter measured by the monitoring node, the method further includes simultaneously acquiring water temperature monitoring data of the monitoring node; the method of converting the real-time monitoring data of each target water quality parameter into standardized parameter values ​​according to a preset standard range includes: The water temperature monitoring data is used to perform online temperature compensation on the real-time monitoring data of dissolved oxygen and conductivity. The compensated dissolved oxygen and conductivity data, along with real-time monitoring data of other target water quality parameters, are linearly mapped according to their respective preset upper and lower standard values ​​to obtain standardized parameter values ​​between a first preset dimensionless value and a second preset dimensionless value. Specifically, when the real-time monitoring data is equal to the preset lower standard value, it is mapped to the first preset dimensionless value, and when it is equal to the preset upper standard value, it is mapped to the second preset dimensionless value.

[0010] Optionally, in a second implementation of the first aspect of the present invention, the preprocessing of the standardized parameter values ​​includes: When the absolute value of the difference between the standardized parameter values ​​at adjacent sampling times exceeds a preset peak threshold, the anomaly suppression is performed, and the value at the current sampling time is replaced by the value at the previous sampling time. Extract the standardized parameter values ​​within the preset stable background period to calculate the daily baseline value, perform the drift compensation, subtract the daily baseline value from the standardized parameter value at the current sampling time, and add the preset long-term background value; When the standardized parameter value is consecutively missing and the number of consecutively missing sampling times does not exceed a preset threshold, the missing data is filled using linear interpolation. When the number of consecutively missing sampling times exceeds the preset threshold, all values ​​in the corresponding time period are marked as invalid data.

[0011] Optionally, in the third implementation of the first aspect of the present invention, the preset background stable period is a fixed period in the early morning of each day; the method for determining the daily baseline value is as follows: extracting all standardized parameter values ​​that are not marked as invalid data within the preset background stable period of the day, removing the maximum and minimum values, and then calculating the median value of the remaining data; the preset long-term background value is taken from the arithmetic mean of the median of all standardized parameter values ​​that are not marked as invalid data within the preset historical period of each day of the preset background stable period of the monitoring node.

[0012] Optionally, in a fourth implementation of the first aspect of the present invention, the preset time window is the most recent consecutive preset number of sampling times, and the rate of change is the average absolute rate of change; the calculation of dynamic weights based on the rate of change of the correction parameter values ​​of each target water quality parameter within the preset time window includes: Calculate the average absolute value of the difference between the correction parameter values ​​of each target water quality parameter in adjacent sampling times within the most recent consecutive preset number of sampling times, and use it as the average absolute rate of change of the target water quality parameter; The average absolute rate of change of each of the target water quality parameters is divided by the sum of the average absolute rates of change of all the target water quality parameters, and the calculated ratio is used as the dynamic weight of the target water quality parameter at the current sampling time.

[0013] Optionally, in a fifth implementation of the first aspect of the present invention, the step of weighting and normalizing the corresponding correction parameter values ​​based on the dynamic weights of each of the target water quality parameters to obtain the adaptive pollution index value at the current sampling time includes: The base index value is obtained by multiplying the correction parameter value of each target water quality parameter at the current sampling time with the corresponding dynamic weight and then summing the results. The basic index value is normalized by a monotonically increasing bounded mapping function. The bounded mapping function outputs zero when the independent variable is zero, and the output increases monotonically as the independent variable increases and infinitely approaches but never exceeds a fixed upper limit of one, thus obtaining the adaptive pollution index value.

[0014] Optionally, in the sixth implementation of the first aspect of the present invention, the prediction model is a first-order exponential smoothing model, the smoothing parameter is a smoothing factor, and the historical prediction value is the prediction value output at the previous sampling time for the current sampling time; the dynamic adjustment rule of the smoothing factor is: When the absolute value of the deviation between the actual value of the adaptive pollution index and the historical predicted value increases, the smoothing factor increases toward the first limit value so that the predicted pollution index value quickly follows the change of the actual value. When the absolute value of the deviation decreases, the smoothing factor decreases toward the second limit value, wherein the first limit value is one, the second limit value is a preset smoothing lower limit value that is greater than zero and less than one, and the smoothing factor is kept not less than the preset smoothing lower limit value at any time.

[0015] Optionally, in a seventh implementation of the first aspect of the present invention, the calculation of the dynamic early warning threshold based on historical data of the adaptive pollution index value includes: According to a preset update cycle, extract all adaptive pollution index values ​​that were not marked as invalid data within a preset number of days in the past as the historical data; Calculate the median of all the historical data, and the median of the absolute value of the difference between each historical data point and the median. Multiply the latter by a preset multiple and add it to the former to obtain the effective dynamic warning threshold for the day.

[0016] Optionally, in an eighth implementation of the first aspect of the present invention, it further includes: At each sampling time, the sensing device that acquires the real-time monitoring data is subjected to online self-test. When the self-test result indicates that the sensing device is abnormal, a failure mark of the sensing device is obtained. During the preprocessing process, the standardized parameter values ​​corresponding to the target water quality parameters collected by the sensing devices with the failure markers are directly marked as invalid data, and the target water quality parameters are not involved in the subsequent drift compensation, missing data completion, dynamic weight calculation, index calculation, prediction and early warning triggering judgment.

[0017] Optionally, in a ninth implementation of the first aspect of the present invention, the online self-test is determined by comparing the reference signal inside the sensing device with the corresponding allowable standard deviation range, and when the reference signal exceeds the allowable standard deviation range, the failure mark is obtained; During the period when the failure marker is in effect, the calculation of the dynamic weight is based only on the average absolute rate of change of all valid target water quality parameters that have not received the failure marker, and is normalized proportionally to keep the sum of the dynamic weights of all valid target water quality parameters equal to one. When the self-test result indicates that the number of consecutive preset sampling times of the sensing device has returned to normal, the failure mark is cleared and the normal calculation process of the target water quality parameter is restored.

[0018] The mechanism of this invention is as follows: it can adapt to the seasonal changes and daily cycle patterns of river hydrology, and while effectively filtering out sensor baseline drift and occasional noise, it significantly improves the early detection capability and warning accuracy of sudden abnormal pollution. Beneficial effects: The concept of a stable background period in the early morning is introduced. Taking advantage of the relatively stable water body from 2:00 to 4:00 every day, the median is extracted as the daily benchmark for subtraction compensation. No manual on-site calibration is required. It can automatically offset the zero-point drift caused by biological attachment and electrode aging, extend the effective maintenance cycle of the sensor, and ensure the comparability and accuracy of long-term monitoring data. The weight of the parameter that changes drastically is automatically increased, enabling the system to automatically focus on the current source of the anomaly. This avoids evaluation sluggishness or distortion caused by fixed weights and significantly improves the sensitivity to sudden pollution events. When the actual value deviates significantly from the predicted value, the smoothing factor automatically approaches 1, enabling the predicted value to quickly track changes. When the deviation is small, the smoothing factor maintains a large value to ensure smoothness. While ensuring data smoothness, it shortens the system's response delay to sudden pollution, achieving true near real-time early warning. A dynamic threshold based on the median and multiples of the mean absolute deviation (MAD) was constructed. Compared to the mean, the median and MAD are less sensitive to extreme values ​​and better represent the typical state of water quality. This threshold is automatically updated every 24 hours, automatically adapting to seasonal background fluctuations in water temperature and flow, making the early warning rules more scientific, effectively eliminating false alarms caused by natural environmental fluctuations, while retaining sensitivity to small but continuous pollution leaks. When a sensor malfunctions during self-test, the system automatically isolates it and normalizes the weight calculation based only on the effective sensors. This ensures that even with partial hardware failure, the system can still provide the most accurate monitoring results possible by relying on the remaining sensors, rather than failing completely, thus improving the system's reliability in harsh field environments. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of one embodiment of the real-time river pollution monitoring method based on the Internet of Things in this invention. Figure 2 This is a schematic diagram of another embodiment of the real-time river pollution monitoring method based on the Internet of Things in this invention; Figure 3This is a schematic diagram illustrating how a multi-parameter water quality sensor performs real-time data acquisition in a river, measuring raw values ​​and then converting them into standardized parameter values ​​between 0 and 1 through a linear mapping after temperature compensation. Figure 4 This is a schematic diagram of one embodiment of the Internet of Things-based real-time river pollution monitoring device in this invention. Detailed Implementation

[0020] This invention provides a real-time river pollution monitoring method based on the Internet of Things (IoT), overcoming the inherent defects of traditional methods such as poor adaptability to environmental changes and susceptibility to false alarms and missed alarms. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0021] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the real-time river pollution monitoring method based on the Internet of Things in this invention includes: 101. Obtain the real-time values ​​of various water quality parameters measured by multi-parameter water quality sensors at river monitoring sections, and convert these values ​​into dimensionless standardized parameter values ​​according to the preset environmental standard range of each parameter.

[0022] It is understood that the executing entity of this invention can be a real-time river pollution monitoring device based on the Internet of Things, or it can be a terminal or a server; no specific limitation is made here. This embodiment of the invention will be described using a server as an example.

[0023] It should be noted that the target river for monitoring is a scenic waterway in the main urban area of ​​a certain city, and the assessment target is Class III water quality. The sensor sampling frequency is once every 15 minutes.

[0024] The system pre-enters Class III water quality standards: upper limit of chemical oxygen demand is 20 mg / L, ideal background value is 0; lower limit of dissolved oxygen is 5 mg / L, local ideal saturation value is 9 mg / L; pH safety range is 6~9, central ideal value is 7.5.

[0025] At 10:00 a.m. on a certain day, the sensor transmitted back the original monitoring values ​​of the current section: the measured value of chemical oxygen demand was 10 mg / L, the measured value of dissolved oxygen was 6.6 mg / L, and the measured value of pH was 8.1.

[0026] The system immediately performs standardized transformation: Regarding chemical oxygen demand, the measured value of 10 mg / L accounts for half of the standard upper limit of 20 mg / L, therefore the standardized parameter value is 0.50.

[0027] For dissolved oxygen, the ideal value is 9, the lower limit is 5, and the allowable decrease is 4. The current measured value of 6.6 is 2.4 lower than the ideal value. Dividing the decrease by the allowable decrease yields a standardized parameter value of 0.60.

[0028] For pH, the measured value of 8.1 deviated from the center point by 0.6, accounting for 40% of the maximum allowable deviation (1.5), resulting in a standardized parameter value of 0.40.

[0029] The physical quantities at 10:00 are converted into a scale-uniform standardized parameter set: [0.50, 0.60, 0.40].

[0030] 102. Preprocess the standardized parameter values: Replace the outliers with a change in amplitude exceeding the preset threshold between adjacent sampling points with the value of the previous sampling point. Then, use the median of the standardized parameter values ​​during the stable background period in the early morning of each day to subtract and compensate the value of each sampling point for that day. Perform linear interpolation to complete the sampling points with no more than a preset number of consecutive missing points. Mark the time period with consecutive missing points exceeding the limit as invalid to obtain the corrected parameter values.

[0031] It should be noted that, for this scenic river channel, we will continue to extract standardized data on chemical oxygen demand (COD) from 10:00 AM to 11:00 AM for preprocessing demonstration. Anomaly thresholds are set at 0.3, and the maximum allowed consecutive missing data points is 2.

[0032] Retrieve the original standardized sequence for this time period: 0.50 at 10:00, 0.52 at 10:15, 0.95 at 10:30, signal lost at 10:45, and 0.60 at 11:00.

[0033] Step 1: Filtering the jump: The value of 0.95 at 10:30 jumps by 0.43 compared to the previous moment, exceeding the limit. The system determines this as distortion interference and covers it with the value of 0.52 from the previous moment. The sequence becomes: [0.50, 0.52, 0.52, signal loss, 0.60].

[0034] Step 2: Baseline Compensation. The system extracts the median from 00:00 to 04:00 on the same day (a total of 17 sampling points), resulting in a drift error base of 0.04. The system performs a subtraction operation on all samples in the sequence without triggering non-negative protection. The sequence is updated as follows: 0.46 at 10:00, 0.48 at 10:15, 0.48 at 10:30, and 0.56 at 11:00.

[0035] Step 3: Fill in the missing value: The gap at 10:45 is only 1 point. The system takes the midpoint between the normal values ​​before and after (0.48 and 0.56) to fill the gap, and calculates the missing value to be 0.52.

[0036] The system outputs a sequence of chemical oxygen demand (COD) correction parameter values: [0.46, 0.48, 0.48, 0.52, 0.56].

[0037] 103. Based on the correction parameter values, calculate the average absolute rate of change of each parameter within the most recent preset time period. Use the proportion of the average absolute rate of change of each parameter to the sum of the average absolute rates of change of all parameters as the weight of that parameter. Perform a weighted summation on the correction parameter values, and then map the weighted summation result to the range of 0 and 1 through a monotonically increasing dimensionless function to obtain the adaptive dimensionless pollution index value.

[0038] It should be noted that the system's observation period is set to the past 1 hour (i.e., including 4 sampling intervals). The current time is 11:00.

[0039] System analysis of recent changes: The chemical oxygen demand (COD) was incorporated into the correction sequence obtained in step 102, with four variation amplitudes of 0.02, 0, 0.04, and 0.04, respectively. The average absolute change rate was 0.025. The latest corrected value was 0.56.

[0040] Dissolved oxygen levels have been very stable recently, with an average change rate of only 0.005 and the latest corrected value of 0.60.

[0041] The pH value remained stable, with an average change rate of 0.010 and a latest corrected value of 0.40.

[0042] The system assigns weights based on both absolute values ​​and rates of change: Since chemical oxygen demand (COD) not only has a high baseline but also shows a recent upward trend, the system logic automatically favors it, allocating it a 50% weight. Dissolved oxygen receives a 30% weight, and pH receives a 20% weight.

[0043] Weighted summation: Chemical oxygen demand (0.56 × 50%) contributes 0.28; dissolved oxygen (0.60 × 30%) contributes 0.18; pH (0.40 × 20%) contributes 0.08. The preliminary summation is 0.54.

[0044] The preliminary results were normalized and scaled using a preset positive correlation coefficient for the river environment, resulting in an adaptive dimensionless pollution index of 0.75 at 11:00.

[0045] 104. Using a first-order exponential smoothing model, with the adaptive dimensionless pollution index as input, the value of the next sampling step is predicted. The smoothing factor is automatically adjusted according to the absolute value of the deviation between the current actual index value and the predicted value at the previous moment. The larger the absolute value of the deviation, the closer the smoothing factor is to 1, thus obtaining the predicted value of the pollution index.

[0046] It should be noted that the current time is 11:00, and step 103 has just output the latest actual pollution index of 0.75. The system sets the safe upper limit of the smoothing factor to 0.9.

[0047] The historical forecast file obtained at 10:45 predicted that the pollution index at 11:00 would be 0.65.

[0048] The absolute deviation between the calculated actual value (0.75) and the predicted value (0.65) is 0.10. Under normal water quality conditions, this deviation represents a significant external sudden load disturbance.

[0049] Based on the deviation magnitude, the system triggers an adaptive adjustment mechanism, rapidly increasing the originally low smoothing factor used during the stable period to 0.80 (without touching the constraint upper limit of 0.9).

[0050] Rolling prediction calculation: The system assigns 80% weight to the current mutation status, that is, 0.80 multiplied by the actual index 0.75, to obtain a share of 0.60; and reserves the remaining 20% ​​weight to historical inertia, that is, 0.20 multiplied by the historical prediction value 0.65, to obtain a share of 0.13.

[0051] By adding the two portions together, the system successfully calculated a pollution index prediction value of 0.73 for 11:15.

[0052] 105. Based on historical data of adaptive dimensionless pollution index values ​​within a preset number of days, the average absolute deviation of the median of these historical data plus a preset multiple is used as the dynamic early warning threshold. When the real-time adaptive dimensionless pollution index value or the predicted pollution index value exceeds this threshold, a pollution warning is triggered.

[0053] It should be noted that the current time is 11:00. The measured pollution index is 0.75 (input from step 103), and the predicted index at 11:15 is 0.73 (input from step 104). The system's historical reference window is set to the past 7 days, and the environmental protection department's risk tolerance factor is set to 3 times.

[0054] The system statistically analyzed all historical indices over the past 7 days and calculated the normal median for the river channel to be 0.35. It also calculated the historical normal fluctuation range (mean absolute deviation) to be 0.08.

[0055] The relevant computational data distribution is shown in Table 1 below: Table 1 Historical median 0.35 The baseline of normal health for the river's water quality over the past 7 days. Mean absolute deviation 0.08 The natural fluctuation range of the river channel within its own environment Preset tolerance factor 3 Flexible buffer space set according to regulatory requirements Dynamic early warning threshold 0.59 The real-time alarm threshold is calculated by adding 3 times the deviation to the median. Current measured index 0.75 The actual water quality at 11:00 AM, just output in step 103. Next step forecast index 0.73 The water quality trend at 11:15 calculated in step 104 The system performs a dual logical comparison: the current measured index of 0.75 has exceeded the dynamically obtained red line threshold of 0.59; and the predicted index of 0.73 after 15 minutes is still above the red line.

[0056] If the criteria are met, the system clearly indicates that the water body has been subjected to abnormal external pollution. The system then automatically triggers a pollution warning command, pushing the coordinates of the relevant cross-sections and the extent of pollution exceedances to the command screen of the environmental protection monitoring platform in real time.

[0057] Please see Figure 2 and Figure 3 Another embodiment of the real-time river pollution monitoring method based on the Internet of Things in this invention includes: 201. Obtain the real-time values ​​of various water quality parameters measured by multi-parameter water quality sensors at river monitoring sections, and convert these values ​​into dimensionless standardized parameter values ​​according to the preset environmental standard range of each parameter.

[0058] Specifically, the multi-parameter water quality sensor includes at least a pH electrode, a dissolved oxygen probe, a turbidity sensor, and a conductivity probe, and integrates a temperature sensor for real-time water temperature measurement. The conversion method is as follows: based on the upper and lower limits of the environmental standards corresponding to each parameter, the real-time measured value of each parameter is converted into a dimensionless value between 0 and 1 through a linear mapping relationship, where the measured value equals the lower limit and is mapped to 0, and the measured value equals the upper limit and is mapped to 1. At the same time, the water temperature measurement value is used to perform online temperature compensation on the measurement results of dissolved oxygen and conductivity. The compensated value is then participated in the above linear mapping to obtain standardized parameter values. The standardized parameter values ​​are used as input for the preprocessing step.

[0059] It should be noted that this set of IoT water quality sensors was deployed at a river section downstream of an industrial zone. The system has the following preset upper and lower limits and polarity rules for the local environment: 1. Dissolved oxygen (DO): This is a positive indicator; the better the water quality, the higher the value. The lower limit of the standard after temperature compensation is 2.0 mg / L, and the upper limit (ideal saturation state) is 10.0 mg / L.

[0060] 2. Turbidity: This is an inverse indicator; the higher the value, the more severe the pollution. The lower limit is 0 NTU, and the upper limit is 50.0 NTU.

[0061] 3. Electrical conductivity: This is an inverse indicator. The standard lower limit after temperature compensation is 100 μS / cm, and the upper limit is 900 μS / cm.

[0062] 4. pH value: This is a range indicator. The ideal value is 7.5, the lower safety limit is 6.0, the upper safety limit is 9.0, and the maximum allowable deviation is 1.5.

[0063] At 14:00 on a certain day, the system synchronously triggered all probes to sample. The original measurement values ​​returned by the sensors were: water temperature 25℃; pH electrode original value 8.1; dissolved oxygen probe original value 5.8mg / L; turbidity sensor original value 15.0NTU; conductivity probe original value 550μS / cm.

[0064] The system incorporates a temperature compensation module: the water temperature of 25℃ is higher than the probe's calibration reference temperature of 20℃. Increased water temperature leads to a physical decrease in oxygen solubility, resulting in a false low reading of 5.8 mg / L due to the simple increase in temperature. The system corrects this using a compensation algorithm, restoring the true dissolved oxygen concentration to a reference value of 6.0 mg / L. Similarly, increased water temperature leads to increased ion activity in the water; the system compensates for the 550 μS / cm concentration by applying a temperature-reduction conversion, resulting in a corrected true conductivity value of 500 μS / cm. pH and turbidity are not compensated for by temperature, retaining values ​​of 8.1 and 15.0 NTU, respectively.

[0065] Perform polarity correction and boundary cutoff mapping calculations: Dissolved oxygen (positive indicator): Current compensation value is 6.0 mg / L. Applying the positive mapping logic, i.e., (upper limit 10.0 - measured 6.0) / (upper limit 10.0 - lower limit 2.0), the calculated value is 4.0 divided by 8.0, resulting in a standardized parameter value of 0.50.

[0066] Turbidity (inverse indicator): Current value is 15.0 NTU. Applying the inverse mapping logic, i.e., (measured 15.0 - lower limit 0) / (upper limit 50.0 - lower limit 0), the standardized parameter value is 0.30.

[0067] Conductivity (inverse index): The current compensation value is 500 μS / cm. Applying the inverse logic, i.e., (measured 500 - lower limit 100) / (upper limit 900 - lower limit 100), the standardized parameter value is 0.50.

[0068] pH (range index): Current value is 8.1. The absolute deviation of 8.1 from the center point of 7.5 is calculated to be 0.6. Dividing 0.6 by the maximum permissible deviation of 1.5 yields a standardized parameter value of 0.40.

[0069] All four calculation results were between 0 and 1, and the boundary truncation mechanism was not triggered. The sampling data at 14:00 was successfully unified into a set of standardized parameter values ​​with consistent polarity (the larger the value, the heavier the pollution): pH 0.40, dissolved oxygen 0.50, turbidity 0.30, and conductivity 0.50.

[0070] 202. Preprocess the standardized parameter values: Replace the outlier values ​​where the abrupt change between adjacent sampling points exceeds the preset threshold with the value of the previous sampling point. Then, use the median of the standardized parameter values ​​during the stable background period in the early morning of each day to subtract and compensate the value of each sampling point for that day. Perform linear interpolation to complete the sampling points with no more than a preset number of consecutive missing points. Mark the time period with consecutive missing points exceeding the limit as invalid to obtain the corrected parameter values.

[0071] Specifically, the preprocessing includes peak suppression, drift compensation, and missing data completion, performed sequentially. Peak suppression involves checking whether the absolute value of the difference between the standardized parameter value of the current sampling point and the standardized parameter value of the previous sampling point exceeds a preset peak threshold. If it does, the value of the current sampling point is replaced with the value of the previous sampling point. Drift compensation involves extracting the median of all valid standardized parameter values ​​during the stable background period from 2:00 AM to 4:00 AM each day as the baseline value for that day. The standardized parameter value of each sampling point for that day is subtracted from the baseline value, and then the median of the long-term historical background stored in the device is added to obtain the compensated value. Missing data completion involves linearly interpolating the values ​​of the two valid sampling points before and after the missing period for periods with no more than five consecutive missing sampling points. For periods with more than five consecutive missing sampling points, all sampling points within that period are marked as invalid and not included in subsequent calculations. After the above three processes are completed, a correction parameter value is obtained, which serves as the input for subsequent weight calculation and weighted summation.

[0072] Furthermore, in the drift compensation process, the long-term historical background median is taken as the arithmetic mean of the median of the standardized parameter values ​​during the background stabilization period at dawn each day for thirty consecutive days after the initial installation of the sensor. This average value is pre-written into the sensor's storage unit; the daily reference value is determined by the median of the remaining data after removing the maximum and minimum values ​​from all valid standardized parameter values ​​during the background stabilization period at dawn on that day.

[0073] It should be noted that the sampling frequency is set to once every 10 minutes. The internal process of step 202 is demonstrated using a standardized parameter value sequence specifically for the turbidity indicator. The system sets the peak threshold for turbidity to 0.20.

[0074] During the first 30 days of equipment commissioning, the system recorded historical data of the probe in its cleanest state, calculated the long-term historical background turbidity median to be 0.15, and stored it in the memory chip.

[0075] Between 02:00 and 04:00 on the current monitoring day, the system acquired 13 valid turbidity values. After removing the highest and lowest values, the median value was extracted, establishing a baseline of 0.18 for the day. This indicates that the baseline was raised by 0.03 overall due to slight adhesion on the probe surface.

[0076] Within one hour, from 10:00 AM to 10:50 AM that day, the system received six raw turbidity normalization values ​​in sequence: The value was 0.30 at 10:00; 0.31 at 10:10; it suddenly rose to 0.55 at 10:20 (due to fish disturbing the mud and sand in the probe area); packet loss occurred in the communication network at 10:30 and 10:40, resulting in signal loss; and it was 0.34 at 10:50.

[0077] The system initiates its first step: peak suppression. The algorithm compares adjacent data one by one. At 10:20, the current measured value of 0.55 minus the previous value of 0.31 results in an absolute difference of 0.24. This sudden increase exceeds the set peak tolerance limit of 0.20. The system determines that this is distortion caused by local physical interference, directly removes 0.55, and covers it with the stable value of 0.31 at 10:10. The filtered sequence is updated to: [0.30, 0.31, 0.31, signal missing, signal missing, 0.34].

[0078] The system initiates the second process: drift compensation. The algorithm applies the compensation formulas one by one. The formula aims to bring the overall data baseline for the day back to the initial cleanliness level at the factory, where, This represents the value after compensation. This represents the standardized parameter value at the current sampling time. This represents the baseline value for that day. This represents the median over a long historical period.

[0079] For the value at 10:00: 0.30 minus 0.18, plus 0.15, yields 0.27. This value is between [0,1], does not trigger boundary constraints, and is therefore retained.

[0080] For the values ​​of 10:10 and 10:20: 0.31 minus 0.18, plus 0.15, yields 0.28. No constraint was triggered, so it is retained.

[0081] For the value at 10:50: 0.34 minus 0.18, plus 0.15, yields 0.31. No constraint was triggered, so it is retained.

[0082] The compensated sequence is updated to: [0.27, 0.28, 0.28, signal missing, signal missing, 0.31].

[0083] The system then initiates the third step: missing data completion. The algorithm detects two consecutive data gaps at 10:30 and 10:40. Since 2 is less than the preset upper limit of 5 gaps, the system activates the linear interpolator. The interpolator extracts 0.28 before the gap (occurring at 10:20) and 0.31 after the gap (occurring at 10:50). Within the 30-minute span, the total numerical increment is 0.03. Amortized over each 10-minute step, the increment is 0.01.

[0084] The system automatically filled in the value for 10:30 as 0.28 + 0.01 = 0.29.

[0085] The system automatically fills in the value for 10:40 as 0.29 + 0.01 = 0.30. The original glitch data stream is converted into a sequence of correction parameter values: [0.27, 0.28, 0.28, 0.29, 0.30, 0.31]. The value generated at 10:50 is 0.31.

[0086] 203. Based on the correction parameter values, calculate the average absolute rate of change of each parameter within the most recent preset time period. Use the proportion of the average absolute rate of change of each parameter to the sum of the average absolute rates of change of all parameters as the weight of that parameter. Perform a weighted summation on the correction parameter values, and then map the weighted summation result to the range of 0 and 1 through a monotonically increasing dimensionless function to obtain the adaptive dimensionless pollution index value.

[0087] Specifically, the average absolute rate of change is calculated based on the correction parameter values ​​of the most recent ten consecutive sampling points. For each parameter, the sum of the absolute values ​​of the differences between adjacent sampling points of that parameter is divided by ten to obtain the average absolute rate of change of that parameter. The real-time weight is calculated by dividing the average absolute rate of change of each parameter by the sum of the average absolute rates of change of all parameters. The weighted summation is obtained by multiplying the correction parameter value of each parameter by the real-time weight corresponding to that parameter and then summing the results to obtain the base index value. Normalization uses a monotonically increasing mapping function, which converts any non-negative base index value into a value between 0 and 1. As the base index value increases, the output value approaches 1 but is always less than 1, thus obtaining the adaptive dimensionless pollution index value. This adaptive dimensionless pollution index value serves as the input to the prediction step and is part of the historical data in the threshold calculation step.

[0088] Furthermore, the mapping function used for normalization is a bounded function whose output is zero when the independent variable is zero, and whose output monotonically increases as the independent variable increases, and is always less than a fixed upper limit value equal to one. After the basic index value is transformed by this mapping function, the resulting adaptive dimensionless pollution index value is zero when the basic index value is zero, and infinitely approaches one as the basic index value increases, but never exceeds one.

[0089] It should be noted that the current time is set to 11:40. The system extracted data sequences from the past 10 sampling intervals (10:00 to 11:40) for calculation according to the rules. Recently, a hidden leak of high-salinity organic wastewater occurred at an upstream chemical plant, causing an abnormal increase in conductivity and a subsequent decrease in dissolved oxygen, while pH and turbidity remained stable.

[0090] The system calculates the recent average absolute rate of change: Conductivity: fluctuates drastically; the sum of the absolute values ​​of 10 consecutive differences is 0.50, and the average absolute change rate is 0.050. The latest corrected parameter value at 11:40 is 0.80.

[0091] Dissolved oxygen: The situation continues to worsen due to the decomposition of organic matter. The sum of the absolute values ​​of the 10 differences is 0.20, and the average absolute change rate is 0.020. The latest corrected parameter value at 11:40 is 0.60.

[0092] pH: Water quality is stable, the sum of the absolute values ​​of the 10 differences is 0.05, and the average absolute change rate is 0.005. The latest calibration parameter value at 11:40 is 0.40.

[0093] Turbidity: Following the output trajectory of step 202, it remained stable and slightly decreased over the next 50 minutes. The sum of the absolute values ​​of the 10 differences was 0.05, and the average absolute change rate was 0.005. The latest correction parameter value at 11:40 was 0.31.

[0094] The system calculates the overall activity level of each indicator (average absolute rate of change + 10% of the current value): Electrical conductivity: 0.050 + (0.80 × 0.10) = 0.130.

[0095] Dissolved oxygen: 0.020 + (0.60 × 0.10) = 0.080.

[0096] pH: 0.005+(0.40×0.10)=0.045.

[0097] Turbidity: 0.005 + (0.31 × 0.10) = 0.036.

[0098] The total activity of the four parameters is: 0.130 + 0.080 + 0.045 + 0.036 = 0.291.

[0099] The system calculates and assigns real-time weights to each parameter accordingly: Conductivity weighting: 0.130 divided by 0.291, approximately 44.7%.

[0100] Dissolved oxygen weight: 0.080 divided by 0.291, approximately 27.5%.

[0101] pH weight: 0.045 divided by 0.291, approximately 15.5%.

[0102] Turbidity weight: 0.036 divided by 0.291, approximately 12.3%.

[0103] This allocation result shows that the system not only captures the rapidly changing conductivity but also takes into account the dissolved oxygen index with its relatively high absolute pollution value. The weight allocation logic perfectly matches the actual development trend of the pollution event.

[0104] The system performs a weighted summation to derive the composite index: The conductivity contribution is 0.80 multiplied by 44.7%, which gives 0.3576.

[0105] Dissolved oxygen contribution: 0.60 multiplied by 27.5%, the result is 0.1650.

[0106] pH contribution: 0.40 multiplied by 15.5%, the result is 0.0620.

[0107] Turbidity contribution: 0.31 multiplied by 12.3%, the result is 0.0381.

[0108] Adding the four terms together yields 0.6227. The system rounds to two decimal places, resulting in an adaptive dimensionless pollution index of 0.62 for 11:40. This value falls between 0 and 1, reflecting the current high pollution load.

[0109] 204. Using a first-order exponential smoothing model, with the adaptive dimensionless pollution index as input, the value of the next sampling step is predicted. The smoothing factor is automatically adjusted according to the absolute value of the deviation between the current actual index value and the predicted value at the previous moment. The larger the absolute value of the deviation, the closer the smoothing factor is to 1, thus obtaining the predicted value of the pollution index.

[0110] Specifically, the first-order exponential smoothing model takes the adaptive dimensionless pollution index as input and outputs the predicted pollution index value for the next sampling step. The smoothing factor is dynamically adjusted based on the absolute value of the deviation between the current actual adaptive dimensionless pollution index value and the predicted value for that time step from the previous time step. Specifically, when the absolute value of the deviation increases, the smoothing factor increases accordingly and approaches 1, making the predicted value follow the changes in the actual value more quickly; when the absolute value of the deviation decreases, the smoothing factor decreases accordingly and approaches a fixed lower limit value, making the predicted value more inclined to maintain a smooth trend. This predicted pollution index value serves as one of the bases for early warning triggering judgment.

[0111] Furthermore, the smoothing factor has a preset lower limit value of 0.5; when the absolute value of the deviation reaches zero, the smoothing factor takes this lower limit value; when the absolute value of the deviation increases, the smoothing factor increases from this lower limit value until it approaches 1, and the smoothing factor is never less than this lower limit value at any time.

[0112] It should be noted that the current time is 11:40. Step 203 has just transmitted the latest calculation result, namely, the actual adaptive dimensionless contamination index at 11:40 is 0.62. The system's current task is to predict the trend of the contamination index at the next sampling time (11:50).

[0113] The system performs a deviation assessment. The background database receives the instruction and retrieves the historical prediction file stored at the previous moment (11:30). The file shows that at 11:30, since the water quality had not yet deteriorated significantly, the system predicted that the index would remain at 0.52 at 11:40.

[0114] The actual value of 0.62 calculated at 11:40 was compared with the predicted value of 0.52 10 minutes ago, and the absolute deviation was calculated to be 0.10.

[0115] Under normal river hydrological conditions, a jump of 0.10 in the overall composite index within 10 minutes is considered a significant deviation. The system logic immediately detected this anomaly, determining that the original conservative prediction model had failed and that a rapid response to the latest trend was necessary.

[0116] Based on the positive correlation mapping rule that the larger the internal deviation of the system, the closer the factor is to 1, the system urgently raised the smoothing factor calculated in this case from the lower limit of 0.5 under normal conditions to 0.80.

[0117] The system performs rolling calculations of the predicted values: Calculating the contribution of the current mutation state: The system assigns an extremely high weight of 80% to the actual situation that just occurred. Multiplying the actual value of 0.62 by the smoothing factor of 0.80 yields a share of 0.496.

[0118] Calculate the contribution of historical steady state: The system subtracts 0.80 from the total weight of 1, leaving the remaining 20% ​​weight for historical inertia. Multiplying the historical predicted value of 0.52 by 0.20 yields a share of 0.104.

[0119] Combined output: The system adds 0.496 and 0.104 to get 0.60.

[0120] After processing with a dynamic smoothing algorithm, the system obtained a pollution index prediction value of 0.60 for 11:50. Because the system automatically assigned a smoothing factor of up to 0.80 to the latest mutation data, the prediction value was updated to 0.60, tracking the current severe pollution trend and buying time for pollution prevention and emergency response.

[0121] 205. Based on historical data of adaptive dimensionless pollution index values ​​within a preset number of days, the average absolute deviation of the median of these historical data plus a preset multiple is used as the dynamic early warning threshold. When the real-time adaptive dimensionless pollution index value or the predicted pollution index value exceeds this threshold, a pollution warning is triggered.

[0122] Specifically, the preset number of days was previously set to seven. Every day at midnight, all valid adaptive dimensionless pollution index values ​​within these seven days were automatically extracted. The median of these historical data and the median of the absolute values ​​of the differences between each data point and the median were calculated. The latter was multiplied by a preset multiple and then added to the former to obtain the dynamic warning threshold for that day. The preset multiple was fixed at three. In the subsequent real-time monitoring process, the adaptive dimensionless pollution index value at each sampling time was compared with the dynamic warning threshold. At the same time, the predicted pollution index value output by the prediction step was also compared with the threshold. As long as either of them exceeded the threshold, a pollution warning signal was immediately triggered. The dynamic warning threshold was updated once every day at midnight and was used until the next morning when it was recalculated.

[0123] It should be noted that the current time is still 11:40. According to the upstream steps, the current measured index is 0.62, and the predicted index for the next moment is 0.60.

[0124] At 00:00 that day, the system's thresholds were automatically updated by the engine.

[0125] The engine extracted 1008 valid adaptive dimensionless pollution index values ​​obtained over the past 7 days. These 1000+ data points were sorted in ascending order, and the median value was extracted, yielding a median of 0.35. This represents the most typical healthy baseline for this river segment over the past week.

[0126] The engine calculates the absolute value of the difference between each of the 1008 data points and the baseline of 0.35. Then, it sorts these absolute values ​​again and extracts the median, yielding a median absolute deviation of 0.05. This value characterizes the river section's resilience to disturbances under daily water flow fluctuations.

[0127] The engine multiplies the elasticity range of 0.05 by the tolerance factor of 3 set by the management department, resulting in a fluctuation extreme value of 0.15. Adding 0.15 to the baseline of 0.35, the dynamic warning threshold for the day is calculated to be 0.50.

[0128] At the decision node of 11:40, the data comparison is shown in Table 2 below: Table 2 Historical median 0.35 The baseline level of normal health for the river water quality over the past 7 days. absolute deviation median 0.05 The normal elastic fluctuation range of the river channel under the natural background environment Preset multiplier 3 The system's fixed safety multiplier is used to define the risk tolerance boundary. Daily dynamic warning threshold 0.50 Alarm thresholds are automatically generated by the algorithm at midnight and remain in effect throughout the day. Current measured index 0.62 The quantitative assessment of water quality at 11:40, just output in step 203. Next step forecast index 0.60 Step 204: Calculation of the expected water quality trend at 11:50 The decision execution engine simultaneously verifies both the measured and predicted branches.

[0129] In the actual test, the current actual index of 0.62 is significantly higher than the threshold red line of 0.50, thus meeting the trigger condition.

[0130] In the forecast branch, the future index is expected to be 0.60, which is also higher than the threshold red line of 0.50, thus meeting the trigger condition.

[0131] Based on the union triggering principle, the decision engine determined that the upstream industrial wastewater leak had caused substantial damage to the water environment. The system immediately triggered an alarm command, sending a high-priority alarm work order to the environmental protection department's monitoring center.

[0132] 206. At each sampling time, perform an online self-test on each water quality sensor to obtain the current working status of the sensor. If the self-test result indicates that the sensor has abnormalities such as electrode contamination, membrane damage, or communication interruption, then obtain the failure mark of the sensor. In the preprocessing step, for the standardized parameter value corresponding to the sensor with the failure mark, directly mark it as invalid and do not participate in subsequent drift compensation, missing data completion, and all weight calculations, exponential calculations, predictions, and threshold comparisons related to the parameter, until the sensor's self-test returns to normal and the failure mark is cleared.

[0133] Furthermore, the online self-test is performed by comparing the deviation between the sensor's built-in reference signal and the standard value. If the deviation exceeds the preset allowable deviation range, a failure mark is obtained for the sensor. The failure mark remains in effect from the time it is obtained until the self-test results of the sensor at three consecutive sampling times are all normal, at which point it is cleared. During the period when the failure mark is in effect, the real-time weight is calculated only based on the average absolute rate of change of all sensors that have not generated failure marks, and the sum of the weights of these effective sensors remains one.

[0134] It should be noted that the system simultaneously activates the underlying hardware self-diagnostic instructions each time physical parameters are collected.

[0135] The internal standard self-test potential signal of the pH electrode is preset to 50mV, and the allowable normal deviation range is set to within 5mV (i.e., 45mV to 55mV is considered healthy).

[0136] At 12:00, during stable operation, the system read a self-test signal of 48mV from the pH electrode. The absolute deviation from the standard value of 50mV was 2mV, which did not exceed the upper limit, and the system determined that the probe was operating healthily.

[0137] At 12:10, a clump of oily industrial suspended matter drifted by and tightly coated the permeation membrane on the surface of the pH electrode. The physical environment of the probe was disrupted. At this moment, the self-test signal read by the system dropped sharply to only 30mV. The absolute deviation of this signal from the standard value was as high as 20mV, completely breaching the 5mV safety limit.

[0138] The system daemon intervened immediately, determined that the pH sensor hardware had failed, and immediately marked it with the highest priority failure flag.

[0139] The labeled raw pH data was directly intercepted and discarded before step 202. However, the structure changed in the weighting matrix of step 203. The system only calculated the combined activity of the remaining three normal sensors: conductivity, dissolved oxygen, and turbidity. Assuming the activities of the three sensors are 0.130, 0.080, and 0.036, respectively, the system added these three values ​​to obtain a new sum of 0.246, and recalculated the weights accordingly, resulting in conductivity accounting for approximately 52.8%, dissolved oxygen approximately 32.5%, and turbidity approximately 14.7%. The sum of the normalized weights remained at 1. While removing the labeled data, the system ensured the operation of the core index calculation logic.

[0140] The probe's mechanical cleaning brush was activated.

[0141] During the 12:20 sampling period, most of the oil on the probe surface was scraped off. The system measured a self-test signal recovery to 49mV, with a deviation of only 1mV. Although the hardware performance returned to normal, according to the safety strategy of passing three consecutive checks, this was the first normal operation, the failure flag remained in effect, and the data remained isolated.

[0142] At the 12:30 cycle, the self-test signal was 51mV (deviation 1mV), which was the second time it was normal. The mark was still not removed.

[0143] Until the 12:40 cycle, the self-test signal stabilized at 50mV (deviation 0mV), achieving the condition of three consecutive normal releases.

[0144] The system confirmed that the probe was completely free of physical contamination. With a release command issued, the failure marker was removed. Starting at 12:40, real-time data from the pH sensor flowed back into step 201 to initiate mapping calculations, marking the resumption of operation of the entire water quality monitoring IoT system.

[0145] Figure 4This is a schematic diagram of a real-time river pollution monitoring device based on the Internet of Things (IoT) according to an embodiment of the present invention. The device 300 can vary considerably depending on its configuration or performance. The device 300 includes a transmitter 301, a receiver 302, and a processor 303. Optionally, the device 300 may further include a modem processor 305, which may include an encoder 306, a modulator 307, a decoder 308, and a demodulator 309.

[0146] In one example, transmitter 301 modulates (e.g., analog-to-analog conversion, filtering, amplification, and up-conversion, etc.) the output sample to obtain an uplink signal, which is transmitted via an antenna to an access network device. On the downlink, the antenna receives the downlink signal transmitted by the access network device. Receiver 302 modulates (e.g., filtering, amplification, down-conversion, and digitization, etc.) the signal received from the antenna and provides an input sample. In modem processor 305, encoder 306 receives service data and signaling messages to be transmitted on the uplink and processes (e.g., formatting, encoding, and interleaving) the service data and signaling messages. Modulator 307 further processes (e.g., symbol mapping and modulation) the encoded service data and signaling messages and provides an output sample. Demodulator 309 processes (e.g., demodulates) the input sample and provides a symbol estimate. Decoder 308 processes (e.g., deinterleaving and decoding) the symbol estimate and provides decoded data and signaling messages to device 300. Encoder 306, modulator 307, demodulator 309, and decoder 308 can be implemented by a combined modem processor 305. These units perform processing according to the radio access technology adopted by the radio access network (e.g., LTE and other evolved systems access technologies). It should be noted that when device 300 does not include modem processor 305, the above-mentioned functions of modem processor 305 can also be performed by processor 303.

[0147] The processor 303 controls and manages the operation of the device 300, and is used to execute the processing procedures performed by the device 300 in the above embodiments of this disclosure. For example, the processor 303 is also used to execute various steps of the transmitting or receiving device in the above method embodiments, and / or other steps of the technical solutions described in the embodiments of this disclosure.

[0148] Furthermore, the device 300 may also include a memory 304 for storing program code and data for the device 300.

[0149] Understandable, Figure 4Only a simplified design of device 300 is shown. In practical applications, device 300 can include any number of transmitters, receivers, processors, modem processors, memory, etc., and all devices that can implement the embodiments of this disclosure are within the protection scope of the embodiments of this disclosure.

[0150] The present invention also provides an Internet of Things (IoT) based real-time river pollution monitoring device, the IoT-based real-time river pollution monitoring device including a memory and a processor, the memory storing computer-readable instructions, when the computer-readable instructions are executed by the processor, causing the processor to perform the steps of the IoT-based real-time river pollution monitoring method in the above embodiments.

[0151] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the Internet of Things-based real-time river pollution monitoring method.

[0152] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0153] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0154] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A real-time river pollution monitoring method based on the Internet of Things, characterized in that, include: According to continuous sampling time, real-time monitoring data of each target water quality parameter measured by the monitoring node are obtained, and the real-time monitoring data of each target water quality parameter are converted into standardized parameter values ​​according to the preset standard range. The standardized parameter values ​​are preprocessed, including anomaly suppression, drift compensation, and missing data completion, to obtain the corrected parameter values ​​of each target water quality parameter at the current sampling time. The dynamic weight is calculated based on the rate of change of the correction parameter values ​​of each target water quality parameter within a preset time window, and the corresponding correction parameter values ​​are weighted and normalized based on the dynamic weights of each target water quality parameter to obtain the adaptive pollution index value at the current sampling time. Using the adaptive pollution index value as input, a prediction model is used to predict the pollution index value for future sampling steps. The smoothing parameter of the prediction model is dynamically adjusted according to the absolute value of the deviation between the actual value of the adaptive pollution index value at the current sampling time and the historical prediction value. A dynamic early warning threshold is calculated based on historical data of the adaptive pollution index value. When the adaptive pollution index value or the predicted pollution index value at the current sampling time reaches the dynamic early warning threshold, a pollution early warning is triggered.

2. The real-time river pollution monitoring method based on the Internet of Things according to claim 1, characterized in that, The target water quality parameters include at least pH, dissolved oxygen, turbidity, and conductivity; acquiring real-time monitoring data of each target water quality parameter measured by the monitoring nodes also includes simultaneously acquiring water temperature monitoring data of the monitoring nodes; converting the real-time monitoring data of each target water quality parameter into standardized parameter values ​​according to a preset standard range includes: The water temperature monitoring data is used to perform online temperature compensation on the real-time monitoring data of dissolved oxygen and conductivity. The compensated dissolved oxygen and conductivity data, along with real-time monitoring data of other target water quality parameters, are linearly mapped according to their respective preset upper and lower standard values ​​to obtain standardized parameter values ​​between a first preset dimensionless value and a second preset dimensionless value. Specifically, when the real-time monitoring data is equal to the preset lower standard value, it is mapped to the first preset dimensionless value, and when it is equal to the preset upper standard value, it is mapped to the second preset dimensionless value.

3. The real-time river pollution monitoring method based on the Internet of Things according to claim 1, characterized in that, The preprocessing of the standardized parameter values ​​includes: When the absolute value of the difference between the standardized parameter values ​​at adjacent sampling times exceeds a preset peak threshold, the anomaly suppression is performed, and the value at the current sampling time is replaced by the value at the previous sampling time. Extract the standardized parameter values ​​within the preset stable background period to calculate the daily baseline value, perform the drift compensation, subtract the daily baseline value from the standardized parameter value at the current sampling time, and add the preset long-term background value; When the standardized parameter value is consecutively missing and the number of consecutively missing sampling times does not exceed a preset threshold, the missing data is filled using linear interpolation. When the number of consecutively missing sampling times exceeds the preset threshold, all values ​​in the corresponding time period are marked as invalid data.

4. The real-time river pollution monitoring method based on the Internet of Things according to claim 3, characterized in that, The preset background stable period is a fixed period in the early morning of each day; the method for determining the daily baseline value is as follows: extract all standardized parameter values ​​that are not marked as invalid data within the preset background stable period of the day, remove the maximum and minimum values, and then calculate the median value of the remaining data; The preset long-term background value is taken from the arithmetic mean of the median of all standardized parameter values ​​that were not marked as invalid data during the preset background stable period of each day within the preset historical period of the monitoring node.

5. The real-time river pollution monitoring method based on the Internet of Things according to claim 1, characterized in that, The preset time window is the most recent consecutive preset number of sampling moments, and the rate of change is the average absolute rate of change. The calculation of dynamic weights based on the rate of change of the correction parameter values ​​of each target water quality parameter within a preset time window includes: Calculate the average absolute value of the difference between the correction parameter values ​​of each target water quality parameter in adjacent sampling times within the most recent consecutive preset number of sampling times, and use it as the average absolute rate of change of the target water quality parameter; The average absolute rate of change of each of the target water quality parameters is divided by the sum of the average absolute rates of change of all the target water quality parameters, and the calculated ratio is used as the dynamic weight of the target water quality parameter at the current sampling time.

6. The real-time river pollution monitoring method based on the Internet of Things according to claim 1, characterized in that, The process of weighting and normalizing the corresponding correction parameter values ​​based on the dynamic weights of each of the target water quality parameters to obtain the adaptive pollution index value at the current sampling time includes: The base index value is obtained by multiplying the correction parameter value of each target water quality parameter at the current sampling time with the corresponding dynamic weight and then summing the results. The basic index value is normalized by a monotonically increasing bounded mapping function. The bounded mapping function outputs zero when the independent variable is zero, and the output increases monotonically as the independent variable increases and infinitely approaches but never exceeds a fixed upper limit of one, thus obtaining the adaptive pollution index value.

7. The real-time river pollution monitoring method based on the Internet of Things according to claim 1, characterized in that, The prediction model is a first-order exponential smoothing model, the smoothing parameter is a smoothing factor, and the historical prediction value is the predicted value output from the previous sampling time for the current sampling time; the dynamic adjustment rule of the smoothing factor is: When the absolute value of the deviation between the actual value of the adaptive pollution index and the historical predicted value increases, the smoothing factor increases toward the first limit value so that the predicted pollution index value quickly follows the change of the actual value. When the absolute value of the deviation decreases, the smoothing factor decreases toward the second limit value, wherein the first limit value is one, the second limit value is a preset smoothing lower limit value that is greater than zero and less than one, and the smoothing factor is kept not less than the preset smoothing lower limit value at any time.

8. The real-time river pollution monitoring method based on the Internet of Things according to claim 1, characterized in that, The calculation of the dynamic early warning threshold based on historical data of the adaptive pollution index value includes: According to a preset update cycle, extract all adaptive pollution index values ​​that were not marked as invalid data within a preset number of days in the past as the historical data; Calculate the median of all the historical data, and the median of the absolute value of the difference between each historical data point and the median. Multiply the latter by a preset multiple and add it to the former to obtain the effective dynamic warning threshold for the day.

9. The real-time river pollution monitoring method based on the Internet of Things according to claim 1, characterized in that, Also includes: At each sampling time, the sensing device that acquires the real-time monitoring data is subjected to online self-test. When the self-test result indicates that the sensing device is abnormal, a failure mark of the sensing device is obtained. During the preprocessing process, the standardized parameter values ​​corresponding to the target water quality parameters collected by the sensing devices with the failure markers are directly marked as invalid data, and the target water quality parameters are not involved in the subsequent drift compensation, missing data completion, dynamic weight calculation, index calculation, prediction and early warning triggering judgment.

10. The real-time river pollution monitoring method based on the Internet of Things according to claim 9, characterized in that, The online self-test determines the failure by comparing the reference signal inside the sensing device with the corresponding allowable standard deviation range. When the reference signal exceeds the allowable standard deviation range, the failure marker is obtained. During the period when the failure marker is in effect, the calculation of the dynamic weight is based only on the average absolute rate of change of all valid target water quality parameters that have not received the failure marker, and is normalized proportionally to keep the sum of the dynamic weights of all valid target water quality parameters equal to one. When the self-test result indicates that the number of consecutive preset sampling times of the sensing device has returned to normal, the failure mark is cleared and the normal calculation process of the target water quality parameter is restored.