Intelligent monitoring and adjusting method and device for rural secondary water supply quality
By installing multi-parameter water quality monitors and flow sensors in the rural water supply system, combining the generation of adversarial networks and LSTM models, real-time monitoring and prediction of water quality data, and dynamic adjustment is used to use the Langer Saturation Index strategy to solve the problems of rapid decay of residual chlorine and microbial growth in rural water supply systems, and intelligent management and safety guarantee of water quality are achieved.
Patent Information
- Application Number
- CN202510307045.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-15
- Publication Date
- 2025-08-01
AI Technical Summary
In rural water supply systems, residual chlorine decays rapidly and microbial growth leads to unstable water quality, which cannot be monitored and dynamically regulated in real time, affecting water quality safety and pipeline life.
By installing a multi-parameter water quality monitor and flow sensor at the set points of the pipeline network, combining the generation of adversarial network and LSTM prediction model, a virtual water quality data generation model is built, real-time monitoring and prediction of water quality data, dynamic adjustment is used using the Langer saturation index strategy, and feedback adjustment measures are constructed for ArcGIS digital twin model.
It has realized intelligent control of rural water supply systems, effectively ensured water quality safety, reduced microbial growth and pipeline corrosion, improved residual chlorine concentration stability, and extended pipeline life.
Smart Images

Figure CN120406085A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of rural water supply management, and particularly relates to an intelligent monitoring and adjustment method and device for the quality of rural secondary water supply. Background Art
[0002] The safety of rural water supply is related to the daily production and living guarantee of the masses. The current situation of rural water supply in southern China shows characteristics such as branched pipeline layout, long pipeline network extension distance, scattered residence of villagers, scattered water use time nodes, and a sharp increase in water consumption during holidays. There are certain differences in the water quality of different water supply areas and pipe sections. The main manifestations are: the concentration difference between the near and far ends caused by the attenuation of residual chlorine, the growth of microorganisms caused by pipeline corrosion, deposition, and improper pipeline network maintenance. The resulting water quality safety problems of water supply need to be given special attention.
[0003] At present, according to relevant investigation and statistics, some rural water supplies still adopt traditional manual management methods and cannot dynamically and real-time monitor the water quality of water supply pipeline networks. Factors such as temperature, flow rate changes, and pipeline materials during the water supply process will all affect the stability of residual chlorine concentration, resulting in the inability to timely regulate and guarantee the residual chlorine concentration. The growth of pipeline microorganisms not only affects the taste of tap water but also poses a potential threat to human health. At the same time, the bacterial film generated by the spread of harmful microorganisms will also have an adverse impact on the flow rate of the pipeline and will cause pipeline corrosion, shortening its service life.
[0004] Therefore, it is necessary to develop an intelligent monitoring and adjustment method for rural secondary water supply quality based on intelligent perception and dynamic regulation to timely master the changing trend of water supply pipeline network water quality (residual chlorine concentration, LSI index, pH value, etc.) and effectively guarantee water use safety. Summary of the Invention
[0005] To achieve the above object, the present invention provides the following technical solution: An intelligent monitoring and adjustment method for rural secondary water supply quality, including:
[0006] Setting multi-parameter water quality monitors and flow sensors at set points of the pipeline network; collecting water quality data in real-time through the multi-parameter water quality monitors and the flow sensors, and transmitting the water quality data to a central server through a data network for storage;
[0007]
[0008] Build a relational database management system based on MySQL; preprocess the water quality data through the relational database management system to obtain preprocessed water quality data;
[0009] Based on the generative adversarial network, construct a virtual water quality data generation model by introducing set physical constraints;
[0010] Process the preprocessed water quality data through the virtual water quality data generation model to obtain virtual water quality data;
[0011] Build an LSTM prediction model; train the LSTM prediction model with the virtual water quality data and the preprocessed water quality data to obtain a trained LSTM prediction model;
[0012] Predict the virtual water quality data through the trained LSTM prediction model to obtain predicted water quality data;
[0013] According to the predicted water quality data, dynamically evaluate the pipeline corrosion and scaling risks through the Langelier saturation index strategy to obtain the Langelier saturation index value;
[0014] Adjust the water quality through set adjustment measures according to the Langelier saturation index value;
[0015] Build an ArcGIS pipe network digital twin model; real-time feedback the execution situation of the set adjustment measures through the ArcGIS pipe network digital twin model.
[0016] As an optimal solution of an intelligent monitoring and adjustment method for rural secondary water supply quality, during the process of real-time collecting the water quality data by the multi-parameter water quality monitor and the flow sensor, the water quality data includes: residual chlorine, pH, turbidity and flow data.
[0017] As an optimal solution of an intelligent monitoring and adjustment method for rural secondary water supply quality, during the process of constructing the virtual water quality data generation model based on the generative adversarial network by introducing the set physical constraints, the set physical constraints include: continuity equation, convection-diffusion equation, residual chlorine decay equation, Bernoulli equation and alkalinity-pH balance equation;
[0018] The expression of the continuity equation is:
[0019] ∑ j Q ij =0
[0020] In the formula, both i and j are nodes; Q ij is the flow from node i to j, m 3 / s;
[0021] The expression of the convection-diffusion equation is as follows:
[0022]
[0023] In the formula, and are the concentrations of node i and node j at time step m, in mg / L; Δt represents the time step; A ij is the cross-sectional area of the pipeline, in m 2 ; L ij is the length of the pipeline from node i to j, in m; D is the diffusion coefficient, in m 2 / s; k is the first-order reaction rate constant, in s -1 ;
[0024] The expression of the residual chlorine decay equation is as follows:
[0025] C(t) = C0·e -kt
[0026] k = 0.02D -1.2 v 0.8 T 0.1
[0027] In the formula, C(t) is the residual chlorine concentration at time t; C0 is the initial residual chlorine concentration; k is the decay rate constant, in s -1 ; D is the pipe diameter, in mm; v is the flow velocity, in m / s; T is the water temperature, in °C.
[0028] As a preferred solution of an intelligent monitoring and regulation method for rural secondary water supply quality, during the training of the LSTM prediction model by using the virtual water quality data and the preprocessed water quality data, the loss function of the LSTM prediction model is:
[0029] Loss = θ1×Loss1 + θ2×Loss2
[0030]
[0031] In the formula, θ1, θ2 are the bias weights; is the absolute error between the predicted value and the measured value; δ is the tolerance threshold, default 0.1 mg / L; N is the number of node i.
[0032] As a preferred solution of an intelligent monitoring and regulation method for rural secondary water supply quality, during the water quality regulation by using the set regulation measures according to the Langelier saturation index value, when the predicted residual chlorine concentration is lower than the national standard lower limit, the chlorine addition pump PID regulation is triggered;
[0033]
[0034] e(t) = Ctarget -C predicted
[0035] Wherein, u(t) is the frequency of the chlorine adding pump; K pe (t) is the first-order response term; is the integral control term; is the differential control term; e(t) is the real-time concentration deviation; C target is the target residual chlorine concentration (the lower limit allowed by the national standard for residual chlorine); C predicted is the predicted residual chlorine concentration;
[0036] When the Langelier saturation index value LSI > 0.5, start the addition of the corrosion inhibitor; when the Langelier saturation index value LSI < -0.5, trigger the pH adjustment;
[0037] The calculation formula of the Langelier saturation index value is as follows:
[0038] LSI = pH - pHs
[0039] pHs = (9.3 + A + B) - (C + D)
[0040]
[0041] Wherein, LSI is the Langelier saturation index value; pHs is the modified saturation pH; A is the total dissolved solids correction term; B is the temperature correction term; C is the calcium hardness correction term; D is the alkalinity correction term; TDS is the total dissolved solids; Ca 2+ is the calcium hardness; Alk is the total alkalinity.
[0042] The present invention also provides an intelligent monitoring and regulating device for the water quality of rural secondary water supply, based on the above intelligent monitoring and regulating method for the water quality of rural secondary water supply, including:
[0043] A water quality data acquisition module, configured to set a multi-parameter water quality monitor and a flow sensor at a set point of the pipe network; collect water quality data in real time through the multi-parameter water quality monitor and the flow sensor, and transmit the water quality data to a central server through a data network for storage;
[0044] A water quality data preprocessing module, configured to build a relational database management system based on MySQL; preprocess the water quality data through the relational database management system to obtain preprocessed water quality data;
[0045] A virtual water quality data generation model construction module, configured to build a virtual water quality data generation model based on a generative adversarial network by introducing set physical constraints;
[0046] A virtual water quality data acquisition module, which is used to process the preprocessed water quality data through the virtual water quality data generation model to obtain virtual water quality data;
[0047] An LSTM prediction model construction and training module, which is used to construct an LSTM prediction model; the LSTM prediction model is trained through the virtual water quality data and the preprocessed water quality data to obtain a trained LSTM prediction model;
[0048] A predicted water quality data acquisition module, which is used to predict the virtual water quality data through the trained LSTM prediction model to obtain predicted water quality data;
[0049] A Rangel saturation index value acquisition module, which is used to dynamically evaluate the pipeline corrosion and scaling risks through the Rangel saturation index strategy based on the predicted water quality data to obtain the Rangel saturation index value;
[0050] A water quality regulation module, which is used to adjust the water quality by setting adjustment measures according to the Rangel saturation index value;
[0051] An ArcGIS pipe network digital twin model construction module, which is used to construct an ArcGIS pipe network digital twin model; the execution situation of the set adjustment measures is fed back in real time through the ArcGIS pipe network digital twin model.
[0052] As a preferred scheme of an intelligent monitoring and regulation device for rural secondary water supply quality, in the water quality data acquisition module, during the process of real-time collecting the water quality data through the multi-parameter water quality monitor and the flow sensor, the water quality data includes: residual chlorine, pH, turbidity and flow data.
[0053] As a preferred scheme of an intelligent monitoring and regulation device for rural secondary water supply quality, in the virtual water quality data generation model construction module, during the process of constructing the virtual water quality data generation model based on the generative adversarial network by introducing the set physical constraints, the set physical constraints include: continuity equation, convection-diffusion equation, residual chlorine decay equation, Bernoulli equation and alkalinity-pH balance equation;
[0054] The expression of the continuity equation is:
[0055] Σ[[ID= / / ]] j Q[[ID= / / ]] ij =0[[ID= / / ]]
[0056] In the formula, both i and j are nodes; Q[[ID= / / ]] ij is the flow rate from node i to j, m[[ID= / / ]] 3 / s; [[ID= / / ]]
[0057] The expression of the convection-diffusion equation is:
[0058]
[0059] Wherein, and are the concentrations of node i and node j at time step m, respectively, in mg / L; Δt represents the time step; A ij is the cross-sectional area of the pipe, in m 2 ; L ij is the length of the pipe from node i to j, in m; D is the diffusion coefficient, in m 2 / s; k is the first-order reaction rate constant, in s -1 ;
[0060] The expression of the residual chlorine decay equation is:
[0061] C(t) = C0·e -kt
[0062] k = 0.02D -1.2 v 0.8 T 0.1
[0063] Wherein, C(t) is the residual chlorine concentration at time t; C0 is the initial residual chlorine concentration; k is the decay rate constant, in s -1 ; D is the pipe diameter, in mm; v is the flow velocity, in m / s; T is the water temperature, in °C.
[0064] As a preferred solution of an intelligent monitoring and regulating device for rural secondary water supply quality, in the LSTM prediction model construction and training module, during the process of training the LSTM prediction model with the virtual water quality data and the preprocessed water quality data, the loss function of the LSTM prediction model is:
[0065] Loss = θ1×Loss1 + θ2×Loss2
[0066]
[0067] Wherein, θ1, θ2 are the bias term weights; is the absolute error between the predicted value and the measured value; δ is the tolerance threshold, default 0.1 mg / L; N is the number of node i.
[0068] As a preferred solution of an intelligent monitoring and regulating device for rural secondary water supply quality, in the water quality regulation module, during the process of regulating the water quality according to the Langelier saturation index value by the set regulation measures, when the predicted residual chlorine concentration is lower than the national standard lower limit, the chlorine addition pump PID regulation is triggered;
[0069]
[0070] e(t) = Ctarget -C predicted
[0071] where u(t) is the frequency of the chlorine dosing pump; K pe (t) is the first-order response term; is the integral control term; is the derivative control term; e(t) is the real-time concentration deviation; C target is the target residual chlorine concentration (the lower limit allowed by the national standard for residual chlorine); C predicted is the predicted residual chlorine concentration;
[0072] When the Langelier saturation index value LSI > 0.5, start the addition of the corrosion inhibitor; when the Langelier saturation index value LSI < -0.5, trigger the pH adjustment;
[0073] The calculation formula for the Langelier saturation index value is:
[0074] LSI = pH - pHs
[0075] pHs = (9.3 + A + B) - (C + D)
[0076]
[0077] where LSI is the Langelier saturation index value; pHs is the modified saturation pH; A is the total dissolved solids correction term; B is the temperature correction term; C is the calcium hardness correction term; D is the alkalinity correction term; TDS is the total dissolved solids; Ca 2+ is the calcium hardness; Alk is the total alkalinity.
[0078] The present invention has the following advantages: The present invention sets multi-parameter water quality monitors and flow sensors at set points of the pipe network; the multi-parameter water quality monitors and the flow sensors are used to collect water quality data in real time, and the water quality data is transmitted to a central server through a data network for storage; a relational database management system is constructed based on MySQL; the water quality data is preprocessed through the relational database management system to obtain preprocessed water quality data; based on a generative adversarial network, a virtual water quality data generation model is constructed by introducing set physical constraints; the preprocessed water quality data is processed through the virtual water quality data generation model to obtain virtual water quality data; an LSTM prediction model is constructed; the virtual water quality data and the preprocessed water quality data are used to train the LSTM prediction model to obtain a trained LSTM prediction model; the trained LSTM prediction model is used to predict the virtual water quality data to obtain predicted water quality data; according to the predicted water quality data, the risk of pipeline corrosion and scaling is dynamically evaluated through the Langelier saturation index strategy to obtain a Langelier saturation index value; according to the Langelier saturation index value, water quality regulation is carried out through set adjustment measures; an ArcGIS pipe network digital twin model is constructed; the implementation situation of the set adjustment measures is fed back in real time through the ArcGIS pipe network digital twin model. The present invention fully considers the characteristics of rural water supply and the characteristics of residents' water use, and solves problems such as rapid decay of residual chlorine and microbial growth in rural pipe networks through physical constraint data enhancement, dynamic model update and multi-index joint regulation, realizes the intelligent control of rural water supply systems, and effectively guarantees the safety of rural water supply quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only exemplary, and for those of ordinary skill in the art, other implementation drawings can be obtained by extension according to the provided drawings without creative efforts.
[0080] The structures, ratios, sizes, etc. shown in this specification are only used to cooperate with the content disclosed in the specification for those familiar with this technology to understand and read, and are not used to limit the limiting conditions under which the present invention can be implemented. Therefore, they do not have technical substance. Any modification of the structure, change of the proportional relationship or adjustment of the size should still fall within the scope covered by the technical content disclosed in the present invention without affecting the effects that the present invention can produce and the purposes that can be achieved.
[0081] Figure 1 It is a schematic flow chart of an intelligent monitoring and adjustment method for rural secondary water supply quality provided in Embodiment 1 of the present invention;
[0082] Figure 2 Schematic diagram of the specific implementation process of an intelligent monitoring and adjustment method for rural secondary water supply quality provided in Embodiment 1 of the present invention;
[0083] Figure 3 Schematic diagram of the process of a virtual water quality data generation model in an intelligent monitoring and adjustment method for rural secondary water supply quality provided in Embodiment 1 of the present invention;
[0084] Figure 4 Schematic diagram for comparing the control effects of residual chlorine concentration in a possible embodiment provided in Embodiment 1 of the present invention;
[0085] Figure 5 Schematic diagram of pH monitoring and dynamic regulation of LSI in a possible embodiment provided in Embodiment 1 of the present invention;
[0086] Figure 6 Schematic diagram of the architecture of an intelligent monitoring and adjustment device for rural secondary water supply quality provided in Embodiment 2 of the present invention. Detailed implementation manners
[0087] The following specific embodiments illustrate the implementation manners of the present invention. Those skilled in the art can easily understand the other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0088] Embodiment 1
[0089] Refer to Figure 1 and<000.jpg"> Figure 2 , Embodiment 1 of the present invention provides an intelligent monitoring and adjustment method for rural secondary water supply quality, including the following steps:
[0090] S1. Set multi-parameter water quality monitors and flow sensors at set points in the pipe network; collect water quality data in real time through the multi-parameter water quality monitors and the flow sensors, and transmit the water quality data to a central server for storage through a data network;
[0091] S2. Build a relational database management system based on MySQL; preprocess the water quality data through the relational database management system to obtain preprocessed water quality data;
[0092] S3. Based on a generative adversarial network, construct a virtual water quality data generation model by introducing set physical constraints;
[0093] S4. Process the preprocessed water quality data through the virtual water quality data generation model to obtain virtual water quality data;
[0094] S5. Construct an LSTM prediction model; train the LSTM prediction model with the virtual water quality data and the preprocessed water quality data to obtain a trained LSTM prediction model;
[0095] S6. Predict the virtual water quality data through the trained LSTM prediction model to obtain predicted water quality data;
[0096] S7. According to the predicted water quality data, dynamically evaluate the pipeline corrosion and scaling risks through the Langelier saturation index strategy to obtain the Langelier saturation index value;
[0097] S8. According to the Langelier saturation index value, adjust the water quality through setting adjustment measures;
[0098] S9. Construct an ArcGIS pipe network digital twin model; use the ArcGIS pipe network digital twin model to real-time feedback the implementation of the set adjustment measures.
[0099] In this embodiment, in step S1, multi-parameter water quality monitors and flow sensors are set at the set points of the pipe network; the water quality data is collected in real time through the multi-parameter water quality monitors and the flow sensors, and the water quality data is transmitted to the central server through the data network for storage;
[0100] Specifically, water quality on-line monitors and flow sensors are arranged in front of the elevated water tank and other specific sampling points in the water supply area, with the point spacing ≤ 500m, to obtain the real-time water quality and flow data of the current pipe network. Data collection frequency: 5 minutes / time, and the data protocol supports MQTT and HTTP / HTTPS. The collected water quality and flow data are transmitted to the central server through the data network for storage.
[0101] Among them, the water quality data includes: residual chlorine, pH, turbidity and flow data.
[0102] In this embodiment, in step S2, a relational database management system is constructed based on MySQL; the water quality data is preprocessed through the relational database management system to obtain preprocessed water quality data;
[0103] Specifically, a relational database management system is constructed based on MySQL; through the relational database management system, the water quality data is preprocessed using Hadoop and Spark tools to obtain preprocessed water quality data.
[0104] In this embodiment, in step S3, based on the generative adversarial network, a virtual water quality data generation model is constructed by introducing a set of physical constraints.
[0105] Specifically, based on the idea of the generative adversarial network (GAN) and pipe network gridification, the continuity equation, the convection-diffusion equation, the chlorine decay equation, the Bernoulli equation, and the alkalinity-pH balance equation are introduced into the loss function as physical constraints to construct a virtual water quality data generation model, so that the virtual water quality data generation model can generate water quality data that conforms to actual physical laws on the premise of satisfying the CFL condition (Courant-Friedrichs-Lewy condition, ensuring numerical stability).
[0106] Among them, the expression of the continuity equation is:
[0107] Σ j Q ij =0
[0108] In the formula, both i and j are nodes; Q ij is the flow rate from node i to j, m 3 / s;
[0109] The expression of the convection-diffusion equation is:
[0110]
[0111] In the formula, and are the concentrations of node i and node j at time step m, respectively, mg / L; Δt represents the time step; A ij is the cross-sectional area of the pipe, m 2 ; L ij is the length of the pipe from node i to j, m; D is the diffusion coefficient, m 2 / s; k is the first-order reaction rate constant, s -1 ;
[0112] The expression of the chlorine decay equation is:
[0113] C(t)=C0·e -kt
[0114] k=0.02D -1.2 v 0.8 T 0.1
[0115] In the formula, C(t) is the chlorine concentration at time t; C0 is the initial chlorine concentration; k is the decay rate constant, s -1 ; D is the pipe diameter, mm; v is the flow velocity, m / s; T is the water temperature, °C.
[0116] In this embodiment, in step S4, the preprocessed water quality data is processed by the virtual water quality data generation model to obtain virtual water quality data;
[0117] Specifically, as Figure 3 shown, the preprocessed water quality data is input into the virtual water quality data generation model. The generator captures spatial features through convolutional layers to generate data on residual chlorine, alkalinity, pH, dissolved oxygen, and disinfection by-product concentration. The discriminator evaluates the authenticity of the data through a deep network structure. The virtual water quality data generation model adopts a dynamic learning rate and a pre-training strategy to ensure the accuracy and timeliness of the generated data.
[0118] Among them, the input of the generator includes pipe network topology parameters (pipe diameter, material), hydraulic parameters (flow velocity, pressure), and environmental parameters (temperature).
[0119] In this embodiment, in step S5, an LSTM prediction model is constructed; the LSTM prediction model is trained with the virtual water quality data and the preprocessed water quality data to obtain a trained LSTM prediction model;
[0120] Specifically, the virtual water quality data generated by GAN and the preprocessed water quality data sampled actually are preprocessed, combined with physical characteristics such as temperature, pipe material, and flow velocity, to train the LSTM prediction model. A streaming data interface is used to receive new data. After each batch of new data is received, the predicted value is calculated through forward propagation, the loss is calculated, and the model weights are updated through backpropagation. After a certain time interval, the performance of the model is evaluated using a validation set to prevent overfitting. According to the change of data, it is considered to retrain the model regularly to maintain accuracy.
[0121] During the training of the LSTM prediction model, the input sequence is the water quality data of the previous 6 hours + GAN enhanced data, and the predicted value of the residual chlorine concentration in the next 2 hours is output. It combines the mean square error (MSE) and a robustness penalty term for large errors. The loss function is:
[0122] Loss = θ1 × Loss1 + θ2 × Loss2
[0123]
[0124]
[0125] In the formula, θ1 and θ2 are bias weights; is the absolute error between the predicted value and the measured value; δ is the tolerance threshold, default 0.1 mg / L; N is the number of nodes i.
[0126] In this embodiment, in step S6, the virtual water quality data is predicted by the trained LSTM prediction model to obtain predicted water quality data;
[0127] Specifically, the trained LSTM model is used to predict the virtual water quality data to obtain predicted water quality data.
[0128] In this embodiment, in step S7, according to the predicted water quality data, the Rangel saturation index strategy is used to dynamically evaluate the pipeline corrosion and scaling risks to obtain the Rangel saturation index value;
[0129] Specifically, the calculation formula for the Rangel saturation index value is:
[0130] LSI = pH - pHs
[0131] pHs = (9.3 + A + B) - (C + D)
[0132]
[0133] In the formula, LSI is the Rangel saturation index value; pHs is the corrected saturation pH, and the theoretical saturation pH under standard conditions (25°C, TDS = 200 mg / L, calcium hardness = 100 mg / L, alkalinity = 50 mg / L) is 9.3; A is the total dissolved solids correction term; B is the temperature correction term; C is the calcium hardness correction term; D is the alkalinity correction term; TDS is the total dissolved solids; Ca 2+ is the calcium hardness; Alk is the total alkalinity.
[0134] In this embodiment, in step S8, according to the Rangel saturation index value, water quality adjustment is performed by setting adjustment measures;
[0135] Specifically, when the predicted residual chlorine concentration is lower than the national standard lower limit (0.3 mg / L), the chlorine addition pump PID adjustment is triggered:
[0136]
[0137] e(t) = C target -C predicted
[0138] In the formula, u(t) is the frequency of the chlorine addition pump; K pe (t) is the first-order response term; is the integral control term; is the differential control term; e(t) is the real-time concentration deviation; C target is the target residual chlorine concentration (the lower limit value of the national standard allowable residual chlorine); C predicted is the predicted residual chlorine concentration; the PID parameters are adaptively tuned through historical data;
[0139] In this embodiment, when the Langelier saturation index value LSI > 0.5, the corrosion inhibitor is added (polyphosphate, dosage Q = 0.2 × LSI × flow rate); when the Langelier saturation index value LSI < -0.5, the pH is adjusted (food-grade NaOH solution, adjustment rate 1 pH per hour).
[0140] Based on the Langelier saturation index (LSI), the corrosiveness or scaling property of the water quality is evaluated, and the points with abnormal water quality monitoring data are summarized to obtain the abnormal historical change curve of the water quality.
[0141] In this embodiment, in step S9, an ArcGIS pipe network digital twin model is constructed; the execution status of the set adjustment measures is fed back in real time through the ArcGIS pipe network digital twin model.
[0142] Specifically, an ArcGIS pipe network digital twin model is constructed based on ArcGIS to realize the real-time monitoring of the residual chlorine concentration status of the water supply pipe network and feed back the adjustment of the chlorine dosage in real time.
[0143] In a possible embodiment, examples of water quality anomaly regulation and corrosion risk warning are provided as follows:
[0144] I. Water quality anomaly regulation
[0145] Taking a rural water supply system in the south as an example, the distribution pipe network is a PE pipe with a diameter of De150, the total pipeline length is 18 km, and a total of 36 monitoring points are deployed.
[0146] The steps of anomaly regulation are as follows:
[0147] T1. Data collection: The residual chlorine, flow rate, and temperature data are uploaded to the cloud platform every 5 minutes.
[0148] T2. GAN training: 100,000 pieces of virtual data are generated, including abnormal working conditions such as pipeline corrosion (k value increased by 20%) and pipe burst (flow rate mutation).
[0149] T3. LSTM prediction: The model prediction error MAE ≤ 0.05 mg / L, and the response time < 30 seconds.
[0150] T4. Regulation effect: As Figure 4 shown, the fluctuation range of the residual chlorine concentration is optimized from [0.1, 0.8] mg / L to [0.35, 0.6] mg / L, and the microbial over-standard rate drops by 76%.
[0151] II. Corrosion risk warning
[0152] Taking a rural water supply system in the south as an example, the distribution pipe network is a ductile iron pipe with a diameter of DN200, the total pipeline length is 12 km, and a total of 24 monitoring points are deployed.
[0153] The risk warning steps are as follows:
[0154] M1. Data collection: Upload pH, total dissolved solids (TDS), water temperature, calcium hardness, and alkalinity data to the edge computing point every 5 minutes;
[0155] M2. Model training: Generate 50,000 sets of water quality parameter perturbation data based on Monte Carlo simulation, including composite working conditions with different corrosion rates (0.1 - 2.5 mm / a) and scaling thicknesses (0.5 - 5 mm);
[0156] M3. Dynamic evaluation: As Figure 5 shown, for the LSI index prediction model, MAE ≤ 0.15 and the response time < 20 seconds. When |LSI| > 0.5, the regulation is automatically triggered.
[0157] In summary, the present invention sets multi - parameter water quality monitors and flow sensors at set points in the pipe network; collects water quality data in real - time through the multi - parameter water quality monitors and the flow sensors, and transmits the water quality data to the central server through the data network for storage; constructs a relational database management system based on MySQL; pre - processes the water quality data through the relational database management system to obtain pre - processed water quality data; constructs a virtual water quality data generation model based on the generative adversarial network by introducing set physical constraints; processes the pre - processed water quality data through the virtual water quality data generation model to obtain virtual water quality data; constructs an LSTM prediction model; trains the LSTM prediction model with the virtual water quality data and the pre - processed water quality data to obtain a trained LSTM prediction model; predicts the virtual water quality data through the trained LSTM prediction model to obtain predicted water quality data; dynamically evaluates the risks of pipeline corrosion and scaling according to the predicted water quality data through the Langelier saturation index strategy to obtain the Langelier saturation index value; adjusts the water quality through set adjustment measures according to the Langelier saturation index value; constructs an ArcGIS pipe network digital twin model; and real - time feedbacks the implementation of the set adjustment measures through the ArcGIS pipe network digital twin model. The present invention fully considers the characteristics of rural water supply and the characteristics of residents' water use, and solves problems such as rapid decay of residual chlorine and microbial growth in rural pipe networks through physical constraint data enhancement, dynamic model update, and multi - index joint regulation, realizes the intelligent management and control of rural water supply systems, and effectively guarantees the safety of rural water supply quality.
[0158] It should be noted that the method of the embodiments of the present disclosure can be executed by a single device, such as a computer or a server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In such a distributed scenario, one of the multiple devices can only execute one or more steps of the method of the embodiments of the present disclosure, and these multiple devices will interact with each other to complete the described method.
[0159] It should be noted that some embodiments of the present disclosure have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be executed in a different order than in the above embodiments and still achieve the desired results. Additionally, the processes depicted in the figures do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0160] Embodiment 2
[0161] See Figure 6 , Embodiment 2 of the present invention also provides an intelligent monitoring and adjustment device for the water quality of rural secondary water supply, including:
[0162] A water quality data acquisition module 001, configured to set a multi-parameter water quality monitor and a flow sensor at a set point of the water supply network; collect water quality data in real time through the multi-parameter water quality monitor and the flow sensor, and transmit the water quality data to a central server through a data network for storage;
[0163] A water quality data preprocessing module 002, configured to build a relational database management system based on MySQL; preprocess the water quality data through the relational database management system to obtain preprocessed water quality data;
[0164] A virtual water quality data generation model construction module 003, configured to build a virtual water quality data generation model based on a generative adversarial network by introducing set physical constraints;
[0165] A virtual water quality data acquisition module 004, configured to process the preprocessed water quality data through the virtual water quality data generation model to obtain virtual water quality data;
[0166] An LSTM prediction model construction and training module 005, configured to build an LSTM prediction model; train the LSTM prediction model through the virtual water quality data and the preprocessed water quality data to obtain a trained LSTM prediction model;
[0167] The predicted water quality data acquisition module 006 is used to predict the virtual water quality data through the trained LSTM prediction model to obtain predicted water quality data;
[0168] The Rangel saturation index value acquisition module 007 is used to dynamically evaluate the pipeline corrosion and scaling risks according to the predicted water quality data through the Rangel saturation index strategy to obtain the Rangel saturation index value;
[0169] The water quality regulation module 008 is used to regulate the water quality by setting regulation measures according to the Rangel saturation index value;
[0170] The ArcGIS pipe network digital twin model construction module 009 is used to construct the ArcGIS pipe network digital twin model; and the execution situation of the set regulation measures is fed back in real time through the ArcGIS pipe network digital twin model.
[0171] In this embodiment, in the water quality data acquisition module 001, during the process of collecting the water quality data in real time through the multi-parameter water quality monitor and the flow sensor, the water quality data includes: residual chlorine, pH, turbidity and flow data.
[0172] In this embodiment, in the virtual water quality data generation model construction module 003, during the process of constructing the virtual water quality data generation model based on the generative adversarial network by introducing the set physical constraints, the set physical constraints include: continuity equation, convection-diffusion equation, residual chlorine decay equation, Bernoulli equation and alkalinity-pH balance equation;
[0173] The expression of the continuity equation is:
[0174] ∑ j Q ij =0
[0175] In the formula, both i and j are nodes; Q ij is the flow rate from node i to j, m 3 / s;
[0176] The expression of the convection-diffusion equation is:
[0177]
[0178] In the formula, and are the concentrations of node i and node j at time step m, respectively, mg / L; Δt represents the time step; A ij is the cross-sectional area of the pipeline, m 2 ; L ij is the pipeline length from node i to j, m; D is the diffusion coefficient, m 2 / s; k is the first-order reaction rate constant, s -1 ;
[0179] The expression of the residual chlorine decay equation is:
[0180] C(t) = C0·e -kt
[0181] k = 0.02D -1.2 v 0.8 T 0.1
[0182] In the formula, C(t) is the residual chlorine concentration at time t; C0 is the initial residual chlorine concentration; k is the decay rate constant, s -1 ; D is the pipe diameter, mm; v is the flow velocity, m / s; T is the water temperature, °C.
[0183] In this embodiment, in the LSTM prediction model construction and training module 005, during the training of the LSTM prediction model by using the virtual water quality data and the preprocessed water quality data, the loss function of the LSTM prediction model is:
[0184] Loss = θ1×Loss1 + θ2×Loss2
[0185]
[0186] In the formula, θ1, θ2 are bias weights; is the absolute error between the predicted value and the measured value; δ is the tolerance threshold, default 0.1 mg / L; N is the number of nodes i.
[0187] In this embodiment, in the water quality regulation module 008, during the water quality regulation by using the set regulation measures according to the Langlier saturation index value, when the predicted residual chlorine concentration is lower than the national standard lower limit, the chlorine addition pump PID regulation is triggered;
[0188]
[0189] e(t) = C target -C predicted
[0190] In the formula, u(t) is the frequency of the chlorine addition pump; K pe (t) is the first-order response term; is the integral control term; is the differential control term; e(t) is the real-time concentration deviation; C target is the target residual chlorine concentration (the national standard residual chlorine allowable lower limit value); C predicted is the predicted residual chlorine concentration;
[0191] When the Langelier saturation index value LSI > 0.5, the corrosion inhibitor is added; when the Langelier saturation index value LSI < -0.5, the pH adjustment is triggered.
[0192] The calculation formula for the Langelier saturation index value is as follows:
[0193] LSI = pH - pHs
[0194] pHs = (9.3 + A + B) - (C + D)
[0195]
[0196]
[0197] In the formula, LSI is the Langelier saturation index value; pHs is the corrected saturation pH; A is the total dissolved solids correction term; B is the temperature correction term; C is the calcium hardness correction term; D is the alkalinity correction term; TDS is the total dissolved solids; Ca 2+ is the calcium hardness; Alk is the total alkalinity.
[0198] It should be noted that for the information interaction, execution process, etc. among the above system modules, since they are based on the same concept as the method embodiment in Embodiment 1 of the present application, the technical effects brought by them are the same as those of the method embodiment of the present application. For the specific content, reference can be made to the description in the method embodiment shown above in the present application, and details will not be repeated here.
[0199] Embodiment 3
[0200] Embodiment 3 of the present invention provides a non - transitory computer - readable storage medium, in which a program code of an intelligent monitoring and adjustment method for rural secondary water supply quality is stored. The program code includes instructions for executing an intelligent monitoring and adjustment method for rural secondary water supply quality according to Embodiment 1 or any possible implementation manner thereof.
[0201] The computer - readable storage medium can be any available medium that a computer can access or a data storage device such as a server or a data center that integrates one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid - state disk (SSD)), etc.
[0202] Embodiment 4
[0203] Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor;
[0204] The processor and the memory communicate with each other via a bus; the memory stores program instructions executable by the processor, and the processor can execute an intelligent monitoring and adjustment method for the water quality of rural secondary water supply in Embodiment 1 or any possible implementation thereof by invoking the program instructions.
[0205] Specifically, the processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor, which is implemented by reading software code stored in the memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.
[0206] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a dedicated computer, a computer network, or other programmable systems. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.).
[0207] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented by a general computing system. They can be concentrated on a single computing system or distributed on a network composed of multiple computing systems. Optionally, they can be implemented by program code executable by the computing system, so that they can be stored in a storage system and executed by the computing system. And in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules respectively, or multiple modules or steps among them can be made into a single integrated circuit module to implement. Thus, the present invention is not limited to any specific combination of hardware and software.
[0208] Although the present invention has been described in detail with general descriptions and specific embodiments above, on the basis of the present invention, some modifications or improvements can be made, which are obvious to those skilled in the art. Therefore, these modifications or improvements made without departing from the spirit of the present invention all fall within the scope of protection required by the present invention.
Claims
1. An intelligent monitoring and adjustment method for the water quality of rural secondary water supply, characterized in that, Including: A multi-parameter water quality monitor and a flow sensor are set at the set points of the pipe network; The water quality data is collected in real time by the multi-parameter water quality monitor and the flow sensor, and the water quality data is transmitted to the central server through the data network for storage; Build a relational database management system based on MySQL; The water quality data is preprocessed through the relational database management system to obtain preprocessed water quality data; Based on the generative adversarial network, a virtual water quality data generation model is constructed by introducing set physical constraints; The preprocessed water quality data is processed through the virtual water quality data generation model to obtain virtual water quality data; Build an LSTM prediction model; the LSTM prediction model is trained through the virtual water quality data and the preprocessed water quality data to obtain a trained LSTM prediction model; The virtual water quality data is predicted through the trained LSTM prediction model to obtain predicted water quality data; According to the predicted water quality data, the risk of pipeline corrosion and scaling is dynamically evaluated through the Langelier saturation index strategy to obtain the Langelier saturation index value; According to the Langelier saturation index value, water quality adjustment is carried out through set adjustment measures; Build an ArcGIS pipe network digital twin model; the implementation of the set adjustment measures is feedback in real time through the ArcGIS pipe network digital twin model.
2. The intelligent monitoring and adjustment method for the water quality of rural secondary water supply according to claim 1, characterized in that, In the process of collecting the water quality data in real time by the multi-parameter water quality monitor and the flow sensor, the water quality data includes: residual chlorine, pH, turbidity and flow data.
3. The intelligent monitoring and adjustment method for the water quality of rural secondary water supply according to claim 2, characterized in that, In the process of constructing the virtual water quality data generation model based on the generative adversarial network by introducing the set physical constraints, the set physical constraints include: continuity equation, convection-diffusion equation, residual chlorine decay equation, Bernoulli equation and alkalinity-pH balance equation; The expression of the continuity equation is: where both i and j are nodes; Q ij is the flow from node i to j, m 3 / s; The expression of the convection-diffusion equation is: In the formula, and are the concentrations of node i and node j at time step m, respectively, in mg / L; Δt represents the time step; A ij is the cross-sectional area of the pipe, in m 2 ; L ij is the length of the pipe from node i to j, in m; D is the diffusion coefficient, in m 2 / s; k is the first-order reaction rate constant, in s -1 ; The expression of the residual chlorine decay equation is: C(t) = C0·e -kt k = 0.02D -1.2 v 0.8 T 0.1 Wherein, C(t) is the residual chlorine concentration at time t; C0 is the initial residual chlorine concentration; k is the decay rate constant, s -1 ; D is the pipe diameter, mm; v is the flow velocity, m / s; T is the water temperature, °C.
4. The intelligent monitoring and adjustment method for the water quality of rural secondary water supply according to claim 3, wherein, In the process of training the LSTM prediction model through the virtual water quality data and the preprocessed water quality data, the loss function of the LSTM prediction model is: Loss = θ1×Loss1 + θ2×Loss2 where θ1 and θ2 are the weights of the bias terms; is the absolute error between the predicted value and the measured value; δ is the tolerance threshold, default 0.1mg / L; N is the number of nodes i.
5. The intelligent monitoring and adjustment method for the water quality of rural secondary water supply according to claim 4, characterized in that, In the process of adjusting the water quality through the set adjustment measures according to the Langelier saturation index value, when the predicted residual chlorine concentration is lower than the national standard lower limit, the chlorine addition pump PID adjustment is triggered; e(t) = C target -C predicted Wherein, u(t) is the frequency of the chlorine addition pump; K pe (t) is the first-order response term; is the integral control term; is the differential control term; e(t) is the real-time concentration deviation; C target is the target residual chlorine concentration, the lower limit value of the residual chlorine allowed by the national standard; C predicted is the predicted residual chlorine concentration; When the Langelier saturation index value LSI > 0.5, the addition of corrosion inhibitor is started; when the Langelier saturation index value LSI < -0.5, the pH adjustment is triggered; The calculation formula of the Langelier saturation index value is: LSI = pH - pHs pHs = (9.3 + A + B) - (C + D) In the formula, LSI is the Langelier saturation index value; pHs is the corrected saturation pH; A is the total dissolved solids correction term; B is the temperature correction term; C is the calcium hardness correction term; D is the alkalinity correction term; TDS is the total dissolved solids; Ca 2+ is the calcium hardness, that is, the calcium ion concentration in terms of calcium carbonate; Alk is the total alkalinity.
6. An intelligent monitoring and regulating device for the water quality of rural secondary water supply, adopting an intelligent monitoring and regulating method for the water quality of rural secondary water supply described in any one of claims 1-5, characterized in that, Including: A water quality data acquisition module, used to set a multi-parameter water quality monitor and a flow sensor at the set points of the pipe network; The multi-parameter water quality monitor and the flow sensor are used to collect water quality data in real time, and the water quality data is transmitted to the central server through the data network for storage; A water quality data preprocessing module, which is used to build a relational database management system based on MySQL; The relational database management system is used to preprocess the water quality data to obtain preprocessed water quality data; A virtual water quality data generation model construction module, which is used to build a virtual water quality data generation model based on a generative adversarial network by introducing set physical constraints; A virtual water quality data acquisition module, which is used to process the preprocessed water quality data through the virtual water quality data generation model to obtain virtual water quality data; An LSTM prediction model construction and training module, which is used to build an LSTM prediction model; the virtual water quality data and the preprocessed water quality data are used to train the LSTM prediction model to obtain a trained LSTM prediction model; A predicted water quality data acquisition module, which is used to predict the virtual water quality data through the trained LSTM prediction model to obtain predicted water quality data; A Rangel saturation index value acquisition module, which is used to dynamically evaluate the pipeline corrosion and scaling risks according to the predicted water quality data through the Rangel saturation index strategy to obtain the Rangel saturation index value; A water quality regulation module, which is used to regulate the water quality through set regulation measures according to the Rangel saturation index value; An ArcGIS pipe network digital twin model construction module, which is used to build an ArcGIS pipe network digital twin model; the execution situation of the set regulation measures is fed back in real time through the ArcGIS pipe network digital twin model.
7. The intelligent monitoring and regulating device for the quality of rural secondary water supply according to claim 6, characterized in that, In the water quality data acquisition module, during the process of collecting the water quality data in real time through the multi-parameter water quality monitor and the flow sensor, the water quality data includes: residual chlorine, pH, turbidity and flow data.
8. The intelligent monitoring and regulating device for the quality of rural secondary water supply according to claim 7, characterized in that, In the virtual water quality data generation model construction module, during the process of building the virtual water quality data generation model based on the generative adversarial network by introducing the set physical constraints, the set physical constraints include: continuity equation, convection-diffusion equation, residual chlorine decay equation, Bernoulli equation and alkalinity-pH balance equation; The expression of the continuity equation is: ∑ j Q ij =0 where i and j are both nodes; Q ij is the flow rate from node i to j, m 3 / s; The expression of the convection-diffusion equation is: In the formula, and are the concentrations of node i and node j at time step m, respectively, in mg / L; Δt represents the time step; A ij is the cross-sectional area of the pipe, in m 2 ; L ij is the pipe length from node i to j, in m; D is the diffusion coefficient, in m 2 / s; k is the first-order reaction rate constant, in s -1 ; The expression of the residual chlorine decay equation is: C(t) = C0·e -kt k = 0.02D -1.2 v 0.8 T 0.1 Wherein, C(t) is the residual chlorine concentration at time t; C0 is the initial residual chlorine concentration; k is the decay rate constant, s -1 ; D is the pipe diameter, mm; v is the flow velocity, m / s; T is the water temperature, °C.
9. The intelligent monitoring and regulating device for the quality of rural secondary water supply according to claim 8, characterized in that, In the LSTM prediction model construction and training module, during the process of training the LSTM prediction model through the virtual water quality data and the preprocessed water quality data, the loss function of the LSTM prediction model is: Loss = θ1×Loss1 + θ2×Loss2 where θ1 and θ2 are the weights of the offset terms; is the absolute error between the predicted value and the measured value; δ is the tolerance threshold, with a default value of 0.1mg / L; N is the number of nodes i.
10. The intelligent monitoring and regulating device for the water quality of rural secondary water supply according to claim 9, characterized in that, In the water quality regulation module, during the process of regulating the water quality through the set regulation measures according to the Rangel saturation index value, when the predicted residual chlorine concentration is lower than the national standard lower limit, the chlorine addition pump PID regulation is triggered; e(t) = C target -C predicted where u(t) is the frequency of the chlorine dosing pump; K pe (t) is the first-order response term; is the integral control term; is the derivative control term; e(t) is the real-time concentration deviation; C target is the target residual chlorine concentration, the lower limit value allowed for residual chlorine in the national standard; C predicted is the predicted residual chlorine concentration; When the Langelier saturation index value LSI > 0.5, start adding the corrosion inhibitor; when the Langelier saturation index value LSI < -0.5, trigger pH adjustment; The calculation formula for the Langelier saturation index value is as follows: LSI = pH - pHs pHs = (9.3 + A + B) - (C + D) In the formula, LSI is the Langelier saturation index value; pHs is the modified saturation pH; A is the total dissolved solids correction term; B is the temperature correction term; C is the calcium hardness correction term; D is the alkalinity correction term; TDS is the total dissolved solids; Ca 2+ is the calcium hardness; Alk is the total alkalinity.
Citation Information
Patent Citations
Circulating water electrolysis treatment device and method
CN103864181A
Water quality prediction system, device and method based on LSTM deep learning
CN116400037A
Flying dust early warning method
CN118568412A
Method for enhancing digital twinborn model data of power system in low measurement environment
CN119203792A
Rural water supply pipe network pressure monitoring analysis method and device based on digital twinning
CN119539469A