Water quality detection system for hydraulic engineering and monitoring method
By adopting distributed sensor arrays, edge computing and LoRa wireless communication technologies in the water quality monitoring system of water conservancy projects, the problems of insufficient data reliability, model prediction lag and system coordination in the water quality monitoring system are solved, and high-precision data acquisition, real-time pollution diffusion simulation and precise regulation are achieved, which improves the real-time and efficiency of water quality monitoring.
Patent Information
- Application Number
- CN202510497897.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-06-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing water quality monitoring system for water conservancy projects has problems such as insufficient data reliability, model prediction lag and system coordination inefficiency, resulting in insufficient real-time handling of water quality abnormalities.
It adopts distributed sensor array, edge computing data acquisition module, LoRa wireless communication module, cloud analysis platform and early warning execution terminal. Through a composite anti-interference structure, adaptive calibration algorithm, improved AD equation and multi-parameter threshold hierarchical warning mechanism, high-precision data acquisition, real-time pollution diffusion simulation and precise regulation are achieved.
It significantly improves the reliability and real-time nature of water quality monitoring data, shortens emergency response time, reduces governance costs, and realizes closed-loop management of water quality "perception-prediction-regulation".
Smart Images

Figure CN120214252A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water quality monitoring, and in particular to a water quality detection system and a monitoring method for water conservancy projects. Background Art
[0002] The water quality monitoring system and method for water conservancy projects are the core technical fields for ensuring water resource safety and preventing pollution spread. Traditional water quality monitoring mainly relies on single-parameter sensors at fixed sites, combined with manual sampling and laboratory analysis, which has problems such as lagging data update and insufficient spatial coverage. In the prior art, although the water quality monitoring system based on wireless sensor networks can achieve multi-point deployment, it is vulnerable to interference in complex water flow environments and lacks real-time coordination with dynamic pollution prediction models, resulting in low efficiency of emergency regulation response.
[0003] Chinese Patent discloses a "water quality on-line monitoring device based on multi-sensor fusion", which integrates sensors such as PH and dissolved oxygen and uses ZigBee network to realize data transmission. Although this scheme improves the multi-parameter acquisition ability, it has significant defects: (1) The calibration of sensor data depends on fixed compensation coefficients, and the influence of long-term drift and temperature non-linearity is not solved; (2) Using 4G cellular network to transmit data back, there are problems of insufficient signal coverage and high power consumption in remote areas of water conservancy projects; (3) The monitoring data is decoupled from the pollutant diffusion model, and only threshold alarm is realized, and the spatio-temporal evolution trend of pollution cannot be predicted.
[0004] Based on the above prior art, the current water quality monitoring system for water conservancy projects still faces the following common technical problems:
[0005] Insufficient data reliability: Long-term drift of sensors (such as conductivity error > 15%) and sudden interference (such as sudden change in turbidity during flood season) lead to an increase in false alarm rate;
[0006] Model prediction lag: Traditional LSTM / ARIMA models rely on offline training of historical data, and the response delay of sudden pollution events exceeds 20 minutes;
[0007] Inefficient system coordination: High-power consumption communication schemes (such as 4G) limit the node deployment density, and a monitoring-prediction-regulation closed loop has not been established, resulting in an increase in treatment cost by more than 30%.
[0008] In view of the above defects seriously restricting the real-time disposal ability of water quality abnormal events, it is urgent to construct a water quality monitoring system integrating high-precision adaptive sensing, edge intelligent computing, multi-physical field coupling modeling and real-time regulation to achieve:
[0009] 1. Online calibration of sensor data and enhancement of anti-interference;
[0010] 2. Real-time simulation of pollutant diffusion based on hydrodynamics;
[0011] 3. Low-latency hierarchical early warning and precise dose regulation. Summary of the Invention
[0012] In view of the above existing problems, the present invention is proposed.
[0013] Therefore, the present invention provides a water quality detection system and monitoring method for water conservancy projects, which solves the problems of insufficient reliability of data collection, disconnection between model prediction and real-time monitoring, and low efficiency of multi-source data collaboration.
[0014] To solve the above technical problems, the present invention provides the following technical solutions:
[0015] In a first aspect, the present invention provides a water quality detection system for water conservancy projects, comprising:
[0016] A distributed sensor array, an edge computing data acquisition module, a LoRa wireless communication module, a cloud analysis platform, and an early warning execution terminal;
[0017] The distributed sensor array includes a pH sensor, a dissolved oxygen sensor, a conductivity sensor, a turbidity sensor, and a heavy metal ion detection unit. Each sensor adopts a composite anti-interference structure and meets the IP68 protection level; the outer physical protection of the composite anti-interference structure uses a gradient density silica gel and stainless steel composite shell, with a honeycomb buffer structure embedded inside; the intermediate electromagnetic shielding uses a double-layer nanocrystalline magnetic shielding layer (thickness 0.5 mm) and a common-mode filtering circuit; the composite shell of the outer physical protection uses a dynamic sealing structure, and a shape memory alloy (Ni-Ti alloy) ring is set at the probe contact, and the sealing gap is adaptively adjusted with the change of water temperature:
[0018] Low temperature (<10°C): The alloy shrinks, and the gap is reduced to 0.1 mm to prevent silt from infiltrating;
[0019] High temperature (>30°C): The alloy expands, and the gap is enlarged to 0.3 mm to avoid thermal expansion damage;
[0020] Low temperature refers to a temperature below 10°C, and high temperature refers to a temperature above 30°C;
[0021] The double-layer nanocrystalline magnetic shielding layer adopts an electromagnetic-fluid coupling suppression mechanism, integrates a micro eddy current ring on the sensor PCB board, and cancels the parasitic potential generated by the water flow cutting the magnetic induction line through a reverse current :
[0022]
[0023] Where k = 0.95 is the compensation coefficient, B is the magnetic field strength, v is the flow velocity, and d is the electrode spacing.
[0024] As a preferred solution of the water quality detection system for water conservancy projects described in the present invention, wherein: the distributed sensor array is deployed in a star topology, and the node spacing satisfies:
[0025]
[0026] In the formula, v is the water body flow velocity, and Δt max = 30 s is the maximum allowable data acquisition time difference to ensure that the spatial synchronization error < 5%.
[0027] As a preferred solution of the water quality detection system for water conservancy projects described in the present invention, wherein: the edge computing data acquisition module is built-in with an adaptive calibration algorithm to perform temperature compensation and baseline drift correction on the sensor data, and the calibration formula is:
[0028]
[0029] Where α is the temperature compensation coefficient, β is the time drift correction factor, T is the corrected temperature, t is the time, and T ref = 25 °C is the reference temperature, and C raw is the original sensor data, and C calibrated is the corrected sensor data.
[0030] When the edge computing data acquisition module performs abnormal data detection, it uses the sliding window Z-score algorithm:
[0031] When |Z i | > 3, it is determined as an abnormal value. The window size w = 120 sampling points, and μ w , σ w are the mean and standard deviation within the window respectively, and x i is the water quality detection value.
[0032] As a preferred solution of the water quality detection system for water conservancy projects described in the present invention, wherein: the working frequency band of the LoRa wireless communication module is 470 510 MHz, and the transmission power adaptive adjustment formula:
[0033]
[0034] Where P min = 14 dBm is the minimum transmission power, k = 0.8 is the adjustment coefficient, and RSSI th = 110 dBm is the critical signal strength, and RSSI curr is the current signal strength.
[0035] As a preferred solution of the water quality detection system for water conservancy projects described in the present invention, wherein: the cloud analysis platform constructs a water quality prediction model, using an improved LSTM neural network, and the loss function is:
[0036]
[0037] In the formula, λ1 = 0.6, λ2 = 0.3, λ3 = 0.1 are weight coefficients, is the pollutant concentration gradient, MSE is the mean square error, and MAE is the mean absolute error.
[0038] As a preferred solution of the water quality monitoring method for water conservancy projects described in the present invention, wherein:
[0039] It includes the following steps:
[0040] S1. The distributed sensor array collects water quality parameters every 60s and transmits them to the edge node through the LoRa network;
[0041] S2. The edge node performs data cleaning and spatio-temporal alignment to generate a standardized data packet;
[0042] S3. The cloud analysis platform fuses multi-source data to construct a three-dimensional water quality field model:
[0043]
[0044] where ω i is the weight of each parameter, ε is the residual correction term, and q i (x, y, t) is the three-dimensional water quality;
[0045] S4. Through real-time monitoring of water quality parameters and combined with dynamic model prediction, an automated response of hierarchical early warning and precise control is realized; when any parameter exceeds the threshold, a hierarchical early warning is triggered and a control scheme is generated.
[0046] As a preferred solution of the water quality monitoring method for water conservancy projects described in the present invention, wherein: the system executes a self-check process every 24 hours, and the sensor health assessment formula in step S1:
[0047]
[0048] When H < 0.6, a maintenance alarm is triggered, where δ is the calibration deviation, δ max is the maximum deviation, N err is the amount of error data, and N total is the total amount of data.
[0049] As a preferred solution of the water quality monitoring method for water conservancy projects described in the present invention, wherein: in step S3, the improved AD equation is used for pollutant diffusion prediction:
[0050]
[0051] Among them, the diffusion coefficient D = 0.25v²·t, where v is the water flow velocity vector and t is the time variable. The source term S(x, y, t) is dynamically updated by real-time monitoring data, C is the pollutant concentration;
[0052] As a preferred solution of the water quality monitoring method for water conservancy projects described in the present invention, wherein: the regulation plan generated in step S4 includes: starting the emergency aeration device when the dissolved oxygen DO < 2mg / L, adjusting the gate opening , and dosing the treatment agent , where V is the volume of the water body, ΔC is the exceeded concentration, C max is the maximum pollutant concentration, and k = 0.8 is the correction coefficient.
[0053] As a preferred solution of the water quality monitoring method for water conservancy projects described in the present invention, wherein: the classification warning standard in step S4 is:
[0054] First-level warning: a single parameter exceeds the standard and the duration t > 10 min
[0055] Second-level warning: two parameters exceed the standard or the diffusion speed V > 0.5 m / s
[0056] Third-level warning: three parameters exceed the standard or the predicted concentration
[0057] where C0 is the national standard limit.
[0058] In a second aspect, the present invention provides a computer device, including a memory and a processor, where: when the computer program is executed by the processor, it implements any step of the water quality monitoring method for water conservancy projects described in the first aspect of the present invention.
[0059] In a third aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, where: when the computer program is executed by the processor, it implements any step of the water quality monitoring method for water conservancy projects described in the first aspect of the present invention.
[0060] The beneficial effects of the present invention are:
[0061] 1. High-precision data acquisition and anti-interference ability
[0062] Composite anti-interference structure (IP68 protection) through a distributed sensor array and an adaptive calibration algorithm for an edge computing data acquisition module reduce the long-term drift rate of conductivity sensors from the traditional 15% - 20% to within 3%, and reduce the non-linear error of temperature compensation by 60%, significantly improving data reliability under complex working conditions of water conservancy projects.
[0063] 2. Real-time dynamic simulation of pollution diffusion
[0064] The improved AD equation combines a dynamic diffusion coefficient and real-time source term update, improving the prediction accuracy of the diffusion trajectory of sudden pollution events by 42% (taking the simulation of a chemical leakage event as an example, the root mean square error of the traditional model is 12.7 mg / L, and this invention reduces it to 7.4 mg / L).
[0065] 3. Collaborative optimization of hierarchical early warning and precise regulation
[0066] Based on a hierarchical early warning mechanism of multi-parameter thresholds and diffusion speed, combined with the start-stop strategy of aeration devices and the chemical dosing model, the emergency response time is shortened to within 5 minutes, and the treatment cost is reduced by 25% - 35%.
[0067] 4. Edge-cloud collaborative computing efficiency
[0068] LoRa wireless networking and edge data cleaning reduce the data transmission volume by 70%, and the delay of the cloud analysis platform for reconstructing the water quality field model is compressed from the traditional 10 minutes to within 90 seconds, meeting the minute-level decision-making requirements of water conservancy projects.
[0069] 5. System self-maintenance and long-term stability
[0070] The sensor health assessment model realizes fault prediction, extending the maintenance cycle from 3 months of manual inspection to 9 months driven by intelligent early warning, and reducing the operation and maintenance cost by 40%.
[0071] Quantitative comparison of technical indicators: Index Traditional technology The present invention Improvement range Data acquisition error 15%~20% ≤3% 80%↓ Pollution prediction response delay 20 - 30 minutes 4 - 5 minutes 75%↓ Model prediction RMSE 12.7mg / L 7.4mg / L 42%↓ Network transmission packet loss rate 25% (ZigBee) 3% (LoRa adaptive) 88%↓ Treatment cost 100% benchmark 65%~75% 25%~35%↓
[0072] The comprehensive benefits of this invention:
[0073] 1. Technical benefits: Break through the bottleneck of multi-source heterogeneous data fusion and achieve closed-loop management of water quality "perception - prediction - regulation";
[0074] 2. Economic benefits: Reduce the operation and maintenance cost by more than 20% and reduce the loss of pollution events by about 30% - 50%;
[0075] 3. Ecological benefits: Through precise dosage control, avoid secondary pollution caused by excessive chemical dosing. Description of the drawings
[0076] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0077] Figure 1 It is a schematic diagram of a water quality detection system for a water conservancy project in Embodiment 1;
[0078] Figure 2 It is a flowchart of a water quality monitoring method for a water conservancy project in Embodiment 2. Detailed implementation manners
[0079] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following will make a detailed description of the specific implementation manners of the present invention with reference to the accompanying drawings of the specification.
[0080] In the following description, many specific details are set forth to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described herein. Those skilled in the art can make similar generalizations without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0081] Secondly, the so-called "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that can be included in at least one implementation manner of the present invention. The "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it an individual or selectively mutually exclusive embodiment with other embodiments.
[0082] Embodiment 1, referring to Figure 1 , is the first embodiment of the present invention. This embodiment provides a water quality detection system for a water conservancy project, including:
[0083] Distributed sensor array 1, edge computing data acquisition module 2, LoRa wireless communication module 3, cloud analysis platform 4, and warning execution terminal 5;
[0084] The distributed sensor array 1 includes a PH sensor, a dissolved oxygen sensor, a conductivity sensor, a turbidity sensor, and a heavy metal ion detection unit. Each sensor adopts a composite anti-interference structure and meets the IP68 protection level. The composite anti-interference structure works synergistically through a multi-dimensional protection mechanism. The outer physical protection uses a composite shell of gradient density silica gel and stainless steel, with a honeycomb buffer structure embedded inside. The intermediate electromagnetic shielding uses a double-layer nanocrystalline magnetic shielding layer (with a thickness of 0.5 mm) and a common-mode filtering circuit. The composite shell of the outer physical protection adopts a dynamic sealing structure, and a shape memory alloy (Ni-Ti alloy) ring is set at the probe contact, which adaptively adjusts the sealing gap with the change of water temperature:
[0085] Low temperature (<10°C): The alloy shrinks, and the gap is reduced to 0.1 mm to prevent silt from infiltrating;
[0086] High temperature (>30°C): The alloy expands, and the gap is enlarged to 0.3 mm to avoid damage caused by thermal expansion;
[0087] The double-layer nanocrystalline magnetic shielding layer adopts an electromagnetic-fluid coupling suppression mechanism. A micro eddy current ring is integrated on the sensor PCB board, and the parasitic potential generated by the water flow cutting the magnetic induction line is offset by the reverse current :
[0088]
[0089] where k = 0.95 is the compensation coefficient, B is the magnetic field strength, v is the flow velocity, and d is the electrode spacing;
[0090] The distributed sensor array 1 adopts a star topology deployment, and the node spacing meets:
[0091]
[0092] where v is the water body flow velocity, Δt max = 30 s is the maximum allowable data acquisition time difference, ensuring that the spatial synchronization error <5%;
[0093] The edge computing data acquisition module 2 is built-in with an adaptive calibration algorithm to perform temperature compensation and baseline drift correction on the sensor data. The calibration formula is:
[0094]
[0095] where α is the temperature compensation coefficient, β is the time drift correction factor, T is the corrected temperature, t is the time, T ref = 25°C is the reference temperature, C raw is the original sensor data, C calibrated is the corrected sensor data.
[0096] When the edge computing data acquisition module 2 performs abnormal data detection, it uses the sliding window Z-score algorithm:
[0097] When |Z i | > 3, it is determined as an outlier. The window size w = 120 sampling points, and μ w , σ w are the mean and standard deviation within the window respectively, and x i is the water quality detection value.
[0098] The working frequency band of the LoRa wireless communication module 3 is 470 510 MHz, and the transmission power adaptive adjustment formula:
[0099]
[0100] Among them, P min = 14 dBm is the minimum transmission power, k = 0.8 is the adjustment coefficient, RSSI th = 110 dBm is the critical signal strength, and RSSI curr is the current signal strength.
[0101] The cloud analysis platform 4 constructs a water quality prediction model, using an improved LSTM neural network, and the loss function is:
[0102]
[0103] In the formula, λ1 = 0.6, λ2 = 0.3, λ3 = 0.1 are the weight coefficients, is the pollutant concentration gradient, MSE is the mean square error, and MAE is the mean absolute error.
[0104] Example 2, referring to Figure 2 , is the second example of the present invention. This example provides a water quality monitoring method for water conservancy projects, including the following steps:
[0105] S1. The distributed sensor array 1 collects water quality parameters every 60 s and transmits them to the edge node through the LoRa network;
[0106] The system performs a self-check process every 24 hours. The sensor health assessment formula in step S1:
[0107]
[0108] When H < 0.6, a maintenance alarm is triggered, where δ is the calibration deviation, δ max is the maximum deviation, N total is the total data volume, and N err is the error data volume.
[0109] 1. Hardware Architecture of Distributed Sensor Array
[0110] Multi-parameter Integrated Probe:
[0111] Each sensor node integrates PH, dissolved oxygen, conductivity, turbidity, and heavy metal detection units, and adopts a modular design:
[0112] PH Sensor: Glass Electrode + Temperature Compensation PT1000, measurement range 0 14, accuracy ±0.1;
[0113] Dissolved Oxygen Sensor: Fluorescence Probe, measuring range 0 20mg / L, anti-biofouling coating;
[0114] Data Fusion Interface: STM32L4 Microcontroller, built-in 16-bit ADC, sampling rate 1kHz;
[0115] Power Management:
[0116] Dual power supply of solar panel (10W) + super capacitor (100F), supports Working environment of 30℃~70℃;
[0117] Low-power mode switching: power consumption ≤50mA during acquisition, ≤5μA during sleep.
[0118] 2. 60-second Synchronous Acquisition Mechanism
[0119] High-precision Clock Synchronization:
[0120] Adopt the time synchronization mode of LoRaWAN Class B protocol, and broadcast time beacons through edge nodes:
[0121] Synchronization error ≤10ms;
[0122] GPS time synchronization backup module (optional), used for areas without network coverage.
[0123] 3. LoRa Network Transmission Optimization
[0124] Packet Structure Design:
[0125] Each packet transmitted by each node contains: Field Length (bytes) Content Header identifier 2 0xAA55 Node ID 4 Unique code Timestamp 4 Unix time (second level) PH value 2 Accuracy 0.01 Dissolved oxygen 2 Accuracy 0.1mg / L ... ... Other parameters CRC16 2 Checksum Total length: 28 bytes (meeting the maximum single - packet length limit of LoRa)
[0126] Adaptive power control adopts a dynamic adjustment of transmission power algorithm.
[0127] Anti-collision Strategy:
[0128] TDMA Time Division Multiplexing: Divide a 60-second cycle into 20 3-second time slots, and nodes are assigned time slots according to the ID hash value;
[0129] Random backoff and retransmission: If the channel is detected to be occupied, retry after a random delay (0 - 300 ms), with a maximum of 3 retransmissions.
[0130] 4. Edge Node Data Reception and Processing
[0131] Multi-channel Receiver:
[0132] Edge nodes are equipped with dual LoRa modules (SX1276 chips):
[0133] Main module: Receives sensor data, with a working frequency band of 470 - 510 MHz;
[0134] Spare module: Monitors other frequency bands (such as 868 MHz) to cope with sudden interference;
[0135] Data Integrity Verification:
[0136] When the CRC check fails, record the error count;
[0137] Mark lost data packets as NaN and trigger the edge node to actively poll (through the ACK mechanism).
[0138] 5. Measured Data for Performance Optimization Parameter Traditional solution (ZigBee) The solution of the present invention Transmission success rate 82% 97% Average delay 8.2s 1.5s Node power consumption 120mAh / day 35mAh / day 100 - node network capacity 15 minutes / round 60 seconds / round
[0139] It should be noted that through LoRaWAN Class B beacon synchronization and local RTC compensation, the time deviation of hundreds of nodes across the network is ensured to be < 1 second; with the triple mechanisms of TDMA, random backoff + ACK confirmation, the packet loss rate is reduced from 18% to < 3%; the deep sleep accounts for more than 99% of the time, extending the node battery life from 3 months to 2 years (permanent battery life with solar assistance).
[0140] S2. Edge nodes perform data cleaning and spatio-temporal alignment to generate standardized data packets;
[0141] 1. Data Cleaning Process
[0142] Input: Raw data packets from S1 (may contain noise and missing values) Output: Cleaned structured data set Core Steps:
[0143] Outlier removal: Use the sliding window Z-score algorithm to dynamically calculate the mean μ within the window w and standard deviation σ w ;
[0144] Missing Value Filling:
[0145] Temporal dimension filling: Linear interpolation (applicable to short-term missing data, ≤ 3 cycles)
[0146] Spatial dimension filling: Based on node spacing constraints, inverse distance weighting (IDW) interpolation is used:
[0147]
[0148] where k = 2, D is the node spacing, satisfying .
[0149] : The point to be interpolated The estimated value (such as the missing pH value, dissolved oxygen concentration, etc.)
[0150] : The adjacent known point The measured value
[0151] : The Euclidean distance between and (unit: meter)
[0152] k: Power parameter (controlling the rate of weight decay with distance, usually k ≥ 1)
[0153] n: The number of adjacent known points participating in interpolation.
[0154] Quadratic calibration compensation: Dynamically correct sensor drift on the edge side.
[0155] 2. Spatiotemporal alignment strategy
[0156] Objective: Eliminate spatiotemporal inconsistencies caused by the dispersion of node deployment and transmission delays. Implementation method:
[0157] Time synchronization:
[0158] Based on LoRaWAN Class B beacon synchronization of S1, the edge node broadcasts GPS time (PPS pulse accuracy ±1μs);
[0159] Packets with a delay exceeding Δt max = 30s are marked as expired and only used for historical analysis;
[0160] Spatial alignment:
[0161] Coordinate mapping: Each node pre-stores geographical coordinates (x, y) and maps them to the water conservancy project grid (resolution 1m × 1m) in combination with the GIS database;
[0162] Dynamic interpolation: Adjust the interpolation weight in real time according to the water flow velocity v.
[0163] 3. Standardized data packet generation
[0164] Data structure (binary format, compatible with MQTT / Modbus protocols): Field name Number of bytes Coding rule Data version 1 0x01 represents V1.0 protocol Timestamp 8 Unix time (millisecond level) Grid coordinates (x, y) 8 Floating - point number (IEEE754, accuracy 0.1m) PH value 2 Integer (actual value × 100, e.g., 7.25 → 725) Dissolved oxygen 2 Integer (actual value × 10, e.g., 5.6 → 56) ... ... Other parameters are encoded according to similar rules Data quality flag 1 Bit mask (bit0: calibration flag, bit1: interpolation flag)
[0165] 4. Edge computing resource optimization
[0166] Memory management:
[0167] Use a circular buffer to store the data of the most recent 10 minutes (window size = 10×60 / 60 = 10 packets), and dynamically release the historical data.
[0168] Computing acceleration:
[0169] Utilize the FPU unit of the Cortex-M7 processor to hardware-accelerate floating-point operations, increasing the Z-score calculation speed by 5 times (compared with software simulation).
[0170] Priority scheduling:
[0171] Data in high pollution risk areas (such as upstream of sewage outlets) is processed first to ensure that its cleaning delay < 200ms.
[0172] 5. Performance verification data Scenario Original data error rate Available rate of cleaned data Spatio - temporal alignment error Normal working condition 8.2% 99.7% Time: ±0.5s, Space: 0.3m High turbidity during flood season 23.5% 98.1% Time: ±1.2s, Space: 0.8m Sensor failure (single point) 41.0% 95.3% (IDW interpolation) Time: N / A, Space: 1.5m
[0173] S3. The cloud analysis platform fuses multi-source data to build a three-dimensional water quality field model:
[0174]
[0175] where ω i is the weight of each parameter, ε is the residual correction term, q i (x,y,t) is the three-dimensional water quality;
[0176] In step S3, the improved AD equation is used for pollutant diffusion prediction:
[0177]
[0178] where the diffusion coefficient D = 0.25v²·t, v is the water flow velocity vector, t is the time variable, the source term S(x,y,t) is dynamically updated by real-time monitoring data, and C is the pollutant concentration;
[0179] 1. Multi-source data access and preprocessing
[0180] Data source type:
[0181] Real-time data from distributed sensor arrays
[0182] Topological data of water conservancy projects (gate positions, pipe network distributions, water depth elevation models)
[0183] External environmental data (rainfall, wind speed and direction obtained from meteorological APIs)
[0184] Historical pollution event library (spatiotemporal distribution, pollutant decay curve)
[0185] Preprocessing process:
[0186] Unification of spatiotemporal reference:
[0187] Coordinate system conversion: Project sensor data (WGS84 longitude and latitude) to the local grid coordinate system of the water conservancy project (EPSG:32650)
[0188] Time axis alignment: Based on UTC time, correct the timestamps of each data source (error < 1 second)
[0189] Data normalization:
[0190] Use Min-Max normalization to eliminate dimensional differences:
[0191]
[0192] Where X max , X min Set according to the SL219-2013 standard (such as the dissolved oxygen range of 0-20 mg / L).
[0193] 2. Multi-physical field coupling modeling
[0194] Construction of a three-dimensional water quality field model: Based on the improved convection-diffusion equation (AD equation), combine with the hydrodynamic model to construct a coupling system:
[0195]
[0196] Among them, D is the pollutant diffusion coefficient, C is the pollutant concentration field, is the source term function, is the water flow velocity vector, is the gravitational acceleration vector, is the fluid pressure, is the hydrodynamic force.
[0197] Numerical solution method:
[0198] Spatial discretization: Use the finite volume method (FVM) to divide the water conservancy project area into unstructured tetrahedral meshes (side length ≤ 5 m);
[0199] Time advancement: Crank-Nicolson implicit format (time step Δt = 10 s);
[0200] Coupled iteration: Implement two-way coupling of hydrodynamic-pollutant transport through the SIMPLE algorithm (≤5 iterations per step);
[0201] 3. Implementation of data fusion algorithm
[0202] Core algorithm: Ensemble Kalman filter steps:
[0203] (1) Ensemble generation: Generate N = 100 initial ensemble members and perturb the following parameters:
[0204] Sensor measurement error (Gaussian noise, σ = calibration residual of claim 1)
[0205] Boundary condition uncertainty (flow velocity v ± 10%, diffusion coefficient D ± 15%)
[0206] (2) Prediction step: Each ensemble member predicts the pollutant distribution at time t+Δt forward through the AD equation 。
[0207] (3) Assimilation step: Incorporate real-time monitoring data into the prediction result:
[0208]
[0209] Where:
[0210] K: Kalman gain matrix, calculated through ensemble covariance;
[0211] H: Observation operator (mapping the model grid to the sensor location).
[0212] State update: Take the ensemble mean as the optimal estimate and update the three-dimensional water quality field Q(x,y,t).
[0213] 4. Visualization and output of dynamic model
[0214] Output interface:
[0215] WebGL three-dimensional visualization engine: Render pollutant concentration isosurfaces (threshold adjustable);
[0216] API data service: Provide gridded concentration data (JSON format, resolution 1m×1m×0.5m);
[0217] Early warning trigger signal: When C(x,y,t) ≥ 0.8C0 (C0 is the national standard limit), push it to the hierarchical early warning module;
[0218] Performance optimization:
[0219] GPU-Accelerated Computing: CUDA parallelization is adopted to solve the AD equation, and the single-step calculation time is reduced from 120 s on the CPU to 8 s (NVIDIA T4 graphics card);
[0220] Incremental Update Strategy: Full coupling calculation is only performed on areas with a concentration change > 5%, and linear interpolation is used in the remaining areas.
[0221]
[0222] 5. Model Validation and Calibration
[0223] Validation Method:
[0224] Tracer Experiment: Rhodamine WT dye is released upstream of the water conservancy project, and the predicted and measured diffusion trajectories are compared.
[0225] Error Metrics:
[0226] Root Mean Square Error (RMSE): ≤ 0.1C0
[0227] Peak Arrival Time Deviation: ≤ 3 minutes (compared with the Δt = 30 s constraint in Claim 7) max
[0228] Dynamic Calibration Mechanism:
[0229] Feedback Loop: Automatically adjust the AD equation parameters every 6 hours (such as the coefficient 0.25 in D = 0.25vt) 2
[0230] Residual Analysis: If the prediction residuals are > 15% for three consecutive times, trigger the model reconstruction process (retrain the LSTM network).
[0231] Implementation Case
[0232] Emergency Simulation of Pollution in a Reservoir:
[0233] Input:
[0234] Real-time sensor data (20 nodes, once every 60 s)
[0235] Meteorological data: Wind speed 3 m / s (southeast wind), rainfall 5 mm / h
[0236] Output:
[0237] Prediction of the peak arrival time of pollutants: Arrive at the water intake after 22 minutes (actual value: 24 minutes)
[0238] Regulation Suggestion: Close Gate No. 3 (reduce the pollution diffusion area by 15%)
[0239] Effect: The actual pollution impact range is 8% smaller than the prediction, verifying the reliability of the model.
[0240] It should be noted that the present invention realizes high-resolution dynamic modeling of the water quality field in water conservancy projects and the ability to update at the minute level, providing core decision-making support for the rapid response to water quality anomaly events.
[0241] S4. Through real-time monitoring of water quality parameters and combined with dynamic model prediction, an automated response for hierarchical early warning and precise regulation is achieved; when any parameter exceeds the threshold, hierarchical early warning is triggered and a regulation plan is generated.
[0242] The regulation plan generated in step S4 includes: starting the emergency aeration device when the dissolved oxygen DO < 2 mg / L, adjusting the gate opening , and dosing the treatment agent , where V is the volume of the water body, ΔC is the exceeded concentration, C max is the maximum pollutant concentration, and k = 0.8 is the correction coefficient.
[0243] The hierarchical early warning criteria are:
[0244] Level 1 early warning: Single parameter exceeds the standard and the duration t > 10 min
[0245] Level 2 early warning: Two parameters exceed the standard or the diffusion speed V > 0.5 m / s
[0246] Level 3 early warning: Three parameters exceed the standard or the predicted concentration
[0247] where C0 is the national standard limit.
[0248] 1. Threshold setting and dynamic adjustment
[0249] Basic threshold library:
[0250] National standard threshold (SL219 - 2013): Parameter <![CDATA[Class I water quality standard (C0)]]> Class II water standard PH value 6.5~8.5 6~9 Dissolved oxygen (DO) ≥7.5mg / L ≥6mg / L Turbidity ≤10NTU ≤20NTU Total lead (Pb) ≤0.01mg / L ≤0.05mg / L
[0251] Dynamic threshold correction:
[0252] Adjust the threshold according to the water flow velocity v and seasonal factors (such as high dissolved oxygen demand in summer):
[0253]
[0254] where α = 0.02 is the flow velocity compensation coefficient; is the seasonal factor, = 1.1 in summer = 0.9 in winter; is the water flow velocity, is the reference water flow velocity.
[0255] 2. Hierarchical early warning trigger mechanism
[0256] Grading Standard: Early warning level Trigger condition Response time requirement Level - one early warning Single - parameter exceeding the standard and lasting t > 10min ≤5 minutes Level - two early warning <![CDATA[Two parameters exceed the standard or the diffusion speed V diff > 0.5 m / s]]> ≤3 minutes Level - three early warning <![CDATA[Three parameters exceed the standard or the predicted concentration C pred ≥ 3C0]]> ≤1 minute
[0257] Diffusion rate calculation:
[0258]
[0259] where (x0, y0, t0) and (x1, y1, t1) are the time and location when the pollutant front is first detected and propagates to adjacent nodes.
[0260] 3. Real-time monitoring and triggering
[0261] 4. Generation and implementation of control plans
[0262] Control strategy library:
[0263] Drug delivery model:
[0264] Calculation logic:
[0265]
[0266] V: Volume of the contamination mass (calculated by the 3D model)
[0267]
[0268] τ: pollutant half-life (matching historical data)
[0269] k=0.8: Safety factor (to prevent overdosage)
[0270] Execution interface:
[0271] Industrial protocol: Send control instructions to PLC via Modbus TCP (such as aerator start and stop, gate opening setting value)
[0272] Feedback loop: Retest water quality parameters within 5 minutes after adjustment and upgrade the warning level if they do not meet the standards.
[0273] 5. Emergency linkage and multi-system collaboration
[0274] Synergy Mechanism:
[0275] (1) GIS visualization platform:
[0276] Real-time marking of pollution scope, warning level and implementation status of control measures
[0277] Provide emergency plan library access (such as historical similar incident handling solutions)
[0278] (2) Inter-departmental notification:
[0279] The third-level early warning automatically triggers SMS / email notifications to the person in charge of the environmental protection and water affairs departments
[0280] Integrate the emergency command system and start drone inspections (pollution source tracking)
[0281] (3). Public information release:
[0282] Push water quality safety announcements (such as intake closure notices) through the official website / APP of the water conservancy project
[0283] 6. Verification and optimization cases
[0284] Case: Blue-green algae outbreak in a certain lake (third-level early warning)
[0285] Trigger condition: Chlorophyll a concentration C = 4C0, predicted diffusion speed V diff = 0.7m / s
[0286] Regulation plan:
[0287] Close 3 surrounding water intakes;
[0288] Add copper sulfate according to M = 0.8×105m³×15μg / L = 12kg;
[0289] Start 4 aerators (total power P = 15kW).
[0290] Effect:
[0291] Six hours later, the chlorophyll a concentration dropped to 1.2C0, and no interruption of drinking water supply occurred.
[0292] It should be noted that through multi-dimensional judgments of parameter exceedance, duration, and diffusion speed, false alarms and missed reports are reduced; regulation parameters (such as chemical dosage M) are combined with real-time model predictions to avoid empirical errors; support for mainstream industrial protocols (Modbus, OPCUA) is provided to adapt to existing water conservancy facilities.
[0293] This embodiment also provides a computer device, applicable to a situation of a water quality monitoring method for a water conservancy project, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement a water quality monitoring method for a water conservancy project as proposed in the above embodiment.
[0294] The computer device may be a terminal, which includes a processor, a memory, a communication interface, a display screen, and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, carrier network, NFC (Near Field Communication), or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0295] This embodiment also provides a storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the method for monitoring water quality in a water conservancy project proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, abbreviated as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, abbreviated as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, abbreviated as EPROM), programmable read-only memory (Programmable Red-Only Memory, abbreviated as PROM), read-only memory (Read-Only Memory, abbreviated as ROM), magnetic memory, flash memory, magnetic disk, or optical disc.
[0296] In summary, through the composite anti-interference structure (IP68 protection) of the distributed sensor array and the adaptive calibration algorithm of the edge computing data acquisition module in the present invention, the long-term drift rate of the conductivity sensor is reduced from the traditional 15% - 20% to within 3%, and the non-linear error of temperature compensation is reduced by 60%, significantly improving the data reliability under complex working conditions of water conservancy projects. The improved AD equation combines the dynamic diffusion coefficient and real-time source term update, improving the prediction accuracy of the diffusion trajectory of sudden pollution events by 42% (taking the simulation of a chemical leakage event as an example, the root mean square error of the traditional model is 12.7 mg / L, and that of the present invention is reduced to 7.4 mg / L). Based on the hierarchical early warning mechanism of multi-parameter thresholds and diffusion speed, combined with the start-stop strategy of the aeration device and the chemical dosing model, the emergency response time is shortened to within 5 minutes, and the treatment cost is reduced by 25% - 35%. LoRa wireless networking and edge data cleaning reduce the data transmission volume by 70%, and the delay of reconstructing the water quality field model by the cloud analysis platform is compressed from the traditional 10 minutes to within 90 seconds, meeting the minute-level decision-making requirements of water conservancy projects. The sensor health assessment model realizes fault prediction, extending the maintenance cycle from 3 months of manual inspection to 9 months driven by intelligent early warning, and reducing the operation and maintenance cost by 40%. It breaks through the bottleneck of multi-source heterogeneous data fusion, realizes the closed-loop management of water quality "perception - prediction - regulation"; reduces the operation and maintenance cost by more than 20%, and reduces the loss of pollution events by about 30% - 50%; through precise dosage control, it avoids secondary pollution caused by excessive chemical dosing.
[0297] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered by the scope of the claims of the present invention.
Claims
1. A water quality detection system for water conservancy projects, characterized in that: include: Distributed sensor array (1), edge computing data acquisition module (2), LoRa wireless communication module (3), cloud analysis platform (4) and early warning execution terminal (5); The distributed sensor array (1) comprises a pH sensor, a dissolved oxygen sensor, a conductivity sensor, a turbidity sensor and a heavy metal ion detection unit, each sensor adopts a composite anti-interference structure to meet the IP68 protection level; the outer physical protection of the composite anti-interference structure adopts a gradient density silica gel and stainless steel composite shell, with a honeycomb buffer structure embedded inside; the middle electromagnetic shielding adopts a double-layer nanocrystalline magnetic shielding layer and a common mode filter circuit; the composite shell of the outer physical protection adopts a dynamic sealing structure, and a shape memory alloy ring is arranged at the probe contact point to adaptively adjust the sealing gap as the water temperature changes: Low temperature <10℃: The alloy shrinks and the gap is reduced to 0.1mm, preventing silt from penetrating; High temperature>30℃: The alloy expands and the gap expands to 0.3mm to avoid thermal expansion damage; The double-layer nanocrystalline magnetic shielding layer adopts the electromagnetic-fluid coupling suppression mechanism, integrates a micro eddy current ring on the sensor PCB board, and offsets the parasitic potential generated by the water flow cutting the magnetic flux lines through the reverse current. : ; Where k=0.95 is the compensation coefficient, B is the magnetic field strength, v is the flow velocity, and d is the electrode spacing.
2. A water quality detection system for water conservancy projects as claimed in claim 1, characterized in that: The distributed sensor array (1) is deployed in a star topology, and the node spacing satisfies: .5v ; Where v is the water velocity, Δt max =30s is the maximum permissible data acquisition time difference, ensuring that the spatial synchronization error is less than 5%.
3. A water quality detection system for water conservancy projects as claimed in claim 1, characterized in that: The edge computing data acquisition module (2) has a built-in adaptive calibration algorithm to perform temperature compensation and baseline drift correction on the sensor data. The calibration formula is: ; Where α is the temperature compensation coefficient, β is the time drift correction factor, T is the corrected temperature, t is the time, T ref =25℃ is the reference temperature, C raw is the original sensor data, C calibrated is the corrected sensor data; When the edge computing data collection module (2) performs abnormal data detection, a sliding window Z-score algorithm is used: ; When | Z i |>3 is considered an outlier, the window size is w=120 sampling points, μ w , σ w are the mean and standard deviation within the window, respectively, i It is the water quality test value.
4. A water quality detection system for water conservancy projects as claimed in claim 1, characterized in that: The operating frequency band of the LoRa wireless communication module (3) is 470 510MHz, transmission power adaptive adjustment formula: ; Where P min =14dBm is the minimum transmission power, k=0.8 is the adjustment coefficient, RSSI th = 110dBm is the critical signal strength, RSSI curr is the current signal strength.
5. A water quality detection system for water conservancy projects as claimed in claim 1, characterized in that: The cloud analysis platform (4) constructs a water quality prediction model using an improved LSTM neural network, and the loss function is: ; Where λ1=0.6,λ2=0.3,λ3=0.1 are weight coefficients. is the pollutant concentration gradient, MSE is the mean square error, and MAE is the mean absolute error.
6. A method for monitoring water quality for water conservancy projects, which is implemented based on a water quality detection system for water conservancy projects as claimed in any one of claims 1 to 5, characterized in that: The following steps are involved: S1. Distributed sensor array (1) collects water quality parameters every 60 seconds and transmits them to edge nodes via the LoRa network; S2. The edge node performs data cleaning and spatiotemporal alignment to generate standardized data packets; S3. Cloud analysis platform (4) integrates multi-source data to build a three-dimensional water quality field model: ; where ω i is the weight of each parameter, ε is the residual correction term, q i (x, y, t) is the three-dimensional water quality; S4. Realize graded warning and precise control through real-time monitoring of water quality parameters and combined with dynamic model prediction Automatic response; when any parameter exceeds the threshold, a graded warning is triggered and a control plan is generated.
7. A method for monitoring water quality in a water conservancy project as claimed in claim 6, characterized in that: The system performs a self-check process every 24 hours. The sensor health evaluation formula in step S1 is: ; When H < 0.6, a maintenance alarm is triggered, where δ is the calibration deviation, δ max is the maximum deviation, N err is the amount of error data, N total is the total data volume.
8. A method for monitoring water quality in a water conservancy project as claimed in claim 6, characterized in that: The pollutant diffusion prediction in step S3 adopts the improved AD equation: ; The diffusion coefficient D = 0.25v²·t, v is the water flow velocity vector, t is the time variable, the source term S(x, y, t) is dynamically updated by real-time monitoring data, and C is the pollutant concentration.
9. A method for monitoring water quality in a water conservancy project as claimed in claim 6, characterized in that: The control scheme generated in step S4 includes: starting the emergency aeration device when the dissolved oxygen DO is less than 2 mg / L, adjusting the gate opening , dosage of treatment agent , where V is the volume of water, ΔC is the excess concentration, C max is the maximum pollutant concentration, and k=0.8 is the correction factor.
10. A method for monitoring water quality in a water conservancy project as claimed in claim 6, characterized in that: The graded warning standards in step S4 are: Level 1 warning: a single parameter exceeds the standard and the duration is t>10min Level 2 warning: Two parameters exceed the standard or diffusion speed V>0.5m / s Level 3 warning: three parameters exceed the standard or the predicted concentration ; Among them, C0 is the national standard limit.
Citation Information
Patent Citations
Intelligent water quality monitoring system based on edge calculation
CN115118722A
Capacitance-inductance integrated magnetic coupling mechanism based on iron-based nanocrystalline magnetic core
CN117936236A
Magnetic induction flow meter
CN118511058A
Water quality pollution source reverse tracking method based on LSTM model and pollution scene database
CN119167034A
Water quality monitoring system model construction method and device based on edge calculation and computer equipment
CN119313220A
Cited By
Water quality profile observation system for preventing biological adhesion
CN120468389A
Sewage monitoring and early warning method and system
CN120472644A
Water quality detection instrument drift compensation method and system
CN120632491A
Intelligent conductivity pollution diagnosis method based on multi-modal feature fusion and adaptive density clustering
CN120763767A
Environment supervision method and system based on edge cloud architecture
CN121078074A