Direct drinking water equipment water quality data analysis and accurate control method based on intelligent algorithm

Through multi-sensor data acquisition and dynamic standardization processing, combined with the evaluation of water quality deviation index and response efficiency coefficient, a multi-objective control strategy is generated, which solves the instability problem of direct drinking water equipment when the water quality fluctuates dynamically, and realizes real-time response and stable operation of the equipment.

CN120686620APending Publication Date: 2025-09-23SHANGHAI SHANGYUAN WATER TECHNOLOGY GROUP CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510841834.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

When the water quality parameters of existing direct drinking water equipment fluctuate dynamically, the fixed threshold judgment method leads to a high false alarm rate and delayed response, lacks multi-parameter collaborative analysis, the control strategy lacks foresight and the feedback mechanism has poor real-time performance, and anomaly detection has difficulty in identifying complex patterns, resulting in unstable equipment operation.

Method used

A multi-sensor module is used to collect water quality data in real time. Multi-dimensional feature vectors are generated through dynamic standardization preprocessing. The data are evaluated by combining the water quality dynamic deviation index and the system response efficiency coefficient. A hybrid optimization algorithm is used to generate a multi-objective control strategy. A closed-loop feedback mechanism and anomaly detection module are introduced to achieve precise control.

Benefits of technology

It improves the dynamic adaptability of water quality, ensures the global optimality of the control strategy, reduces the risk of missed detection, and achieves real-time response to water quality fluctuations and stable operation of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120686620A_ABST
    Figure CN120686620A_ABST
Patent Text Reader

Abstract

The invention provides a direct drinking water equipment water quality data analysis and accurate control method based on an intelligent algorithm, and relates to the technical field of intelligent control of direct drinking water equipment.The method comprises the steps that water quality data including the total dissolved solid content, the pH value, the oxidation-reduction potential, the residual chlorine concentration and the temperature are collected in real time through a multi-sensor module; performing dynamic standardization preprocessing on the data to generate a multidimensional feature vector containing a timestamp; the water quality state is evaluated based on a water quality dynamic deviation index WDDI and a system response efficiency coefficient SRE, the WDDI quantifies the parameter dynamic deviation degree through a piecewise function, and the SRE represents the equipment response efficiency through a polynomial regression model; an NSGA-II algorithm and LSTM prediction are fused to generate a dynamic control strategy set; an optimal strategy is screened according to the real-time SRE value, and filter element mode switching, backwashing adjustment and sterilization power adjustment are driven; algorithm parameters are optimized through closed-loop feedback, and abnormal detection and safety mode switching are achieved in combination with an isolated forest algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent control of direct drinking water equipment, and in particular to a method for analyzing and precisely controlling water quality data of direct drinking water equipment based on an intelligent algorithm. Background Art

[0002] In the field of intelligent control of direct drinking water equipment, existing technologies generally adopt a water quality parameter judgment mechanism based on fixed thresholds. This type of method performs a binary judgment on water quality by setting a single critical value. For example, when the total dissolved solids content (TDS) exceeds the preset upper limit, the filter element replacement is triggered. However, actual water quality parameters often show dynamic fluctuation characteristics, such as changes in water consumption during the day and night, sudden changes in the concentration of pollutants in the water source, and other scenarios. The fixed threshold method cannot effectively distinguish between instantaneous anomalies and continuous deterioration trends, resulting in an increased false alarm rate or delayed response. In addition, the correlation between water quality parameters has not been fully explored. For example, the coordinated changes in pH value and residual chlorine concentration may indicate a specific type of pollution, but the existing technology lacks a multi-parameter joint analysis model, making it difficult to achieve accurate anomaly attribution.

[0003] The data preprocessing link of the current system mostly uses mean filtering or linear normalization methods. Although mean filtering can eliminate some noise, it has limited effect on suppressing high-frequency interference in the sensor signal (such as electromagnetic interference and transient bubble disturbances), resulting in the introduction of noise interference during feature extraction. The static normalization method relies on global statistics and cannot adapt to the distribution changes of water quality parameters over time, such as the TDS baseline drift caused by seasonal changes, which directly leads to inconsistent distribution of input data for subsequent algorithms and affects the stability of the model. At the same time, the existing technology lacks a dynamic segmentation mechanism for time series data, making it difficult to capture the short-term fluctuation patterns of water quality parameters, such as the gradual trend of parameters caused by the attenuation of filter performance.

[0004] At the control strategy generation level, most systems employ a single-objective optimization framework, for example, adjusting the filter operating mode solely to reduce TDS. However, in real-world scenarios, multiple factors must be considered, including equipment energy consumption, filter lifespan, and sterilization efficiency. Single-objective optimization can easily lead to local optimal solutions. For example, excessively increasing sterilization power can accelerate UV module aging. Furthermore, control strategy generation lacks the ability to predict future water quality trends. For example, the backwash frequency cannot be adjusted in advance based on peak water usage forecasts, leading to the risk of instantaneous water quality deterioration.

[0005] Existing equipment typically uses an open-loop feedback mechanism, meaning that after executing a control strategy, corrections are made solely based on the next water quality test results. This mechanism cannot evaluate control effectiveness in real time. For example, the delayed effect of water quality improvement after a filter cartridge switch is not quantified, resulting in excessively long strategy optimization cycles. Over long-term operation, the fixed algorithm parameters can lead to a decrease in adaptability. For example, changes in the distribution of water quality characteristics can significantly slow the convergence of the optimization algorithm.

[0006] In terms of anomaly detection, traditional methods mainly rely on threshold trigger mechanisms. For example, when a parameter exceeds the limit three times in a row, it is judged to be an anomaly. However, complex anomaly patterns (such as multi-parameter coordinated deviation and gradual pollution) are difficult to identify with a single threshold, which can easily lead to missed detections. In addition, existing systems often use simple alarms or fixed plans after detecting anomalies, and lack a dynamic safety control mode switching mechanism. For example, when the conductivity suddenly soars, only shutting down the equipment without starting the emergency filtration process may increase the risk of water use for users. Summary of the Invention

[0007] In order to solve the technical problems in the existing technology, such as the rigidity of dynamic water quality criteria, insufficient noise resistance of data preprocessing, lack of multi-parameter collaborative analysis, single optimization target, lack of foresight of control strategy, poor real-time performance of feedback mechanism and limited abnormal pattern detection, the present invention provides a water quality data analysis and precise control method for direct drinking water equipment based on intelligent algorithm.

[0008] The technical solutions provided by the present invention are as follows:

[0009] The present invention provides a method for analyzing and precisely controlling water quality data of direct drinking water equipment based on an intelligent algorithm, including:

[0010] S1. Use the multi-sensor module to collect real-time water quality data from direct drinking water equipment, including total dissolved solids content, pH value, redox potential, residual chlorine concentration and temperature;

[0011] S2. Performing dynamic standardization preprocessing on the water quality data to generate a multidimensional water quality feature vector including a timestamp;

[0012] S3. Based on the multidimensional water quality characteristic vector, water quality status is assessed using the water quality dynamic deviation index (WDDI) and the system response efficiency coefficient (SRE), where the WDDI represents the degree of dynamic deviation of water quality parameters relative to a preset threshold, and the SRE represents the response efficiency of the device control unit to water quality changes;

[0013] S4. Perform multi-objective optimization analysis on the WDDI and SRE using a hybrid optimization algorithm to generate a set of dynamic control strategies, wherein the hybrid optimization algorithm integrates heuristic search and gradient descent method;

[0014] S5. Based on the SRE value calculated in real time, the optimal control strategy is selected from the dynamic control strategy set to drive the filter element working mode switching, backwash frequency adjustment, and power regulation of the ultraviolet disinfection module of the direct drinking water equipment;

[0015] S6. Update the multidimensional water quality feature vector through a closed-loop feedback mechanism, and periodically optimize the parameter configuration of the hybrid optimization algorithm.

[0016] The beneficial effects brought about by the technical solution provided by the present invention include at least:

[0017] (1) In the present invention, by constructing a two-dimensional evaluation system of water quality dynamic deviation index (WDDI) and system response efficiency coefficient (SRE), combined with a hybrid optimization algorithm to dynamically assign weights to multi-dimensional water quality parameters and perform multi-objective collaborative optimization, the problems of rigid dynamic water quality criteria and single optimization targets in traditional methods are effectively solved. Based on piecewise functions and nonlinear regression models, the degree of water quality deviation and equipment response efficiency are quantified, and a set of control strategies adapted to different scenarios is generated in real time, which significantly improves the dynamic adaptability to water quality fluctuations. The algorithm parameters are continuously optimized through a closed-loop feedback mechanism to ensure the global optimality of the control strategy in long-term operation and avoid performance degradation caused by drift of water quality characteristics.

[0018] (2) To address the issue of insufficient data preprocessing accuracy, the present invention adopts a dynamic normalization method combining wavelet transform and sliding window algorithm. This method filters out high-frequency noise in sensor signals through multi-scale decomposition and extracts local time series features based on time series segmentation. This solves the problem of residual noise and inconsistent data distribution caused by traditional mean filtering and static normalization. The adaptive adjustment mechanism of dynamic window length and step size can accurately capture short-term fluctuations and long-term trend changes in water quality parameters, providing high signal-to-noise ratio input data for subsequent feature analysis, significantly improving the stability and reliability of the water quality status assessment model.

[0019] (3) In the present invention, by integrating LSTM neural network prediction and multi-objective optimization algorithm, future water quality trend constraints are introduced into the control strategy generation, breaking through the limitation of traditional methods that lack forward-looking regulation. Combining the fuzzy rule base with the dynamic PID parameter adjustment mechanism, real-time and refined matching of control strategies is achieved, effectively balancing multiple objectives such as equipment energy consumption, filter life and sterilization efficiency. In addition, the anomaly detection module based on the isolation forest algorithm can identify complex collaborative deviation patterns, and link the preset safety control mode and self-test process, quickly switching to the emergency strategy when the anomaly score exceeds the limit, greatly reducing the risk of missed detection and safety hazards, and forming a closed-loop management system from anomaly identification to active protection. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 A flow chart of a method for analyzing and precisely controlling water quality data for direct drinking water equipment based on an intelligent algorithm provided in an embodiment of the present invention;

[0022] Figure 2 A schematic diagram of a dynamic standardization preprocessing process for a method for analyzing and precisely controlling water quality data for direct drinking water equipment based on an intelligent algorithm according to an embodiment of the present invention;

[0023] Figure 3 A schematic diagram of the main process of the method for analyzing and precisely controlling water quality data of direct drinking water equipment based on an intelligent algorithm provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0024] The technical solution of the present invention is described below in conjunction with the accompanying drawings.

[0025] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as an "exemplary" in the present invention should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of the word "exemplary" is intended to present concepts in a concrete manner. Furthermore, in the embodiments of the present invention, "and / or" can mean both or either of the two.

[0026] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0027] Reference Manual Figure 1 , which shows a flow chart of the water quality data analysis and precise control method of direct drinking water equipment based on intelligent algorithm provided by an embodiment of the present invention.

[0028] The embodiment of the present invention provides a method for analyzing and accurately controlling water quality data of direct drinking water equipment based on an intelligent algorithm. The processing flow may include the following steps:

[0029] S1. Use the multi-sensor module to collect real-time water quality data of direct drinking water equipment, including total dissolved solids content, pH value, redox potential, residual chlorine concentration and temperature.

[0030] It should be noted that the water quality data of the direct drinking water equipment is collected in real time through the multi-sensor module, including the total dissolved solids (TDS), pH value, oxidation-reduction potential (ORP), residual chlorine concentration and temperature parameters. The multi-sensor module consists of a high-precision TDS sensor, a pH electrode, an ORP probe, a residual chlorine detection unit and a temperature sensor, and the data acquisition frequency is set to 1 time per second. The sensor signal is transmitted to the main control unit through the analog-to-digital conversion module, and the main control unit uses an embedded system to store and process the data in real time. During the data acquisition process, the sensor needs to be calibrated regularly, and the calibration cycle is once every 24 hours. The calibration method uses the standard solution comparison method to ensure the accuracy of the measured value.

[0031] S2. Perform dynamic standardization preprocessing on water quality data to generate a multi-dimensional water quality feature vector containing a timestamp.

[0032] In one possible implementation, Figure 2 As shown, S2 further includes:

[0033] S201, performing wavelet transform denoising processing on the original water quality data to eliminate high-frequency noise in the sensor acquisition signal;

[0034] Specifically, the Daubechies 4 (db4) wavelet basis function is selected for 5-layer decomposition. This wavelet basis has the optimal time-frequency localization characteristics for the transient characteristics of water quality signals (such as sudden changes in residual chlorine concentration). Experimental verification shows that it can improve the signal-to-noise ratio by more than 23dB.

[0035] S202, using a sliding window algorithm to perform time series segmentation on the denoised data, with a window length of 5 to 10 minutes;

[0036] S203: Perform normalization on the data in each window, and calculate the normalization formula as follows:

[0037]

[0038] Among them, X norm is the normalized data, μ is the mean of the data in the window, and σ is the standard deviation.

[0039] It should be noted that the specific process of dynamic standardization preprocessing of water quality data includes: first, wavelet transform denoising is performed on the raw data, and the Daubechies wavelet basis function is used to decompose the signal into a five-layer structure. The high-frequency noise components are filtered out using the threshold method, while the low-frequency valid signal is retained. The denoised data is then segmented into time series using a sliding window algorithm. The window length is set to 8 minutes, the window sliding step is 1 minute, and each window contains 480 groups of data points. The data within the window is then normalized. The normalized data is combined with the timestamp to generate a multidimensional water quality feature vector. The vector dimension is 5, corresponding to the TDS, pH, ORP, residual chlorine, and temperature parameters.

[0040] S3. Based on the multidimensional water quality characteristic vector, the water quality status is evaluated through the water quality dynamic deviation index WDDI and the system response efficiency coefficient SRE, where WDDI represents the dynamic deviation degree of water quality parameters relative to the preset threshold, and SRE represents the response efficiency of the equipment control unit to water quality changes.

[0041] In one possible implementation, the calculation method of the water quality dynamic deviation index WDDI in S3 is as follows:

[0042] S301, extracting the real-time measurement value V of each parameter in the multidimensional water quality feature vector i And the corresponding preset threshold range [L i ,H i ];

[0043] S302. Calculate the dynamic deviation component of each parameter using a piecewise function:

[0044]

[0045] Among them, k1=2.5 and k2=1.8 are empirical coefficients;

[0046] S303. Perform weighted summation on the dynamic deviation components of all parameters to generate WDDI:

[0047]

[0048] Among them, α i is the parameter importance weight, which is determined by the statistical results of historical water quality abnormal events.

[0049] The specific calculation formula of weight is:

[0050]

[0051] where N i is the number of abnormal triggering of parameter i on that day, The weight of the previous day, initial value The sliding window mechanism ensures that the weights are dynamically adjusted according to water quality risks.

[0052] It should be noted that the calculation method of the Water Dynamic Deviation Index (WDDI) is as follows: the real-time measurement value V of each parameter is extracted from the multidimensional water quality feature vector i and with the preset threshold range [L i ,H i For each parameter, the dynamic deviation component D is calculated using a piecewise function. i The empirical coefficients k1=2.5 and k2=1.8 are determined by analyzing historical abnormal data. The dynamic deviation components of all parameters are calculated according to the weight α. i The weighted sum is used to generate WDDI. The weight α i Based on the frequency distribution of abnormal water quality events triggered by each parameter in the past 30 days, the parameter with higher frequency has a greater weight.

[0053] In one possible implementation, the calculation method of the system response efficiency coefficient SRE in S3 is as follows:

[0054] S304, collect historical response data of the device control unit, including the filter element switching delay time T d , Sterilization power adjustment error E p and backwash cycle deviation ΔC;

[0055] S305. Use a polynomial regression model to fit the response efficiency evaluation function:

[0056]

[0057] Among them, β1=0.15, β2=0.6, and β3=0.25 are fitting coefficients.

[0058] It should be noted that the calculation of the system response efficiency coefficient (SRE) requires the collection of historical response data of the equipment control unit, including the filter element switching delay time T d , UV sterilization power adjustment error E p The SRE values ​​were fitted using a polynomial regression model. The fitting coefficients β1 = 0.15, β2 = 0.6, and β3 = 0.25 were determined by least squares optimization.

[0059] S4. A hybrid optimization algorithm is used to perform multi-objective optimization analysis on WDDI and SRE to generate a set of dynamic control strategies. The hybrid optimization algorithm integrates heuristic search and gradient descent method.

[0060] The heuristic search is embodied in the simulated binary crossover (SBX) operation of the NSGA-II framework, which achieves global exploration by randomly pairing parent individuals and exchanging decision variables. The crossover probability is set to 0.8.

[0061] The gradient descent method is applied to the top 20% elite individuals screened by non-dominated sorting, and its three-dimensional decision variables (filter mode code M, backwash interval T, and sterilization power η) are iteratively optimized with a fixed step size α = 0.05. The objective function is to minimize F = λ1·WDDI + λ2·SRE -1 ;

[0062] The collaborative mechanism between the two is: in each round of iteration, SBX crossover is first performed to generate the offspring population, and then gradient descent local optimization is performed on the elite individuals, and finally the Pareto optimal solution set that integrates global exploration and local fine search is output.

[0063] In one possible implementation, the hybrid optimization algorithm in S4 adopts the NSGA-II framework, and its fitness function is defined as:

[0064] F=λ1·WDDI+λ2·SRE -1

[0065] Among them, λ1 and λ2 are dynamic adjustment coefficients, which are automatically updated according to the current water quality category.

[0066] In one possible implementation, the generation process of the dynamic control strategy set in S4 includes water quality trend prediction based on an LSTM neural network, and the prediction results are used as constraints of the optimization algorithm.

[0067] It should be noted that the hybrid optimization algorithm utilizes the Non-dominated Sorting Genetic Algorithm II (NSGA-II) framework. The dynamic adjustment coefficients λ1 and λ2 are automatically updated based on the current water quality category. When the WDDI exceeds the warning threshold, the weight of λ1 is increased to 0.7, and λ2 is reduced to 0.3. A long short-term memory (LSTM) neural network is introduced during the optimization process to predict water quality trends over the next 15 minutes. These predictions serve as optimization constraints, limiting the search space for control strategies.

[0068] Specifically, the dynamic control strategy set consists of decision variables in three dimensions:

[0069] The filter element working mode is encoded as a discrete integer variable with a value range of {1, 2, 3}, corresponding to the three physical configurations of activated carbon single-stage filtration, activated carbon and reverse osmosis membrane parallel filtration, and double reverse osmosis membrane series filtration;

[0070] The backwash interval is a continuous integer variable with a domain of [5,30] minutes;

[0071] The sterilization power percentage is a continuous floating-point variable with a value range of [30%, 100%].

[0072] The hybrid optimization algorithm adopts the framework of non-dominated sorting genetic algorithm and implements heuristic global search by simulating binary crossover operator, with the crossover probability set to 0.8. At the same time, gradient descent local optimization is performed on the top 20% elite individuals screened by non-dominated sorting, with the objective function min F = λ1·WDDI + λ2·SRE -1 The gradient calculation step size is fixed at 0.05. The water quality predictions for the next 15 minutes, output by the long short-term memory neural network, are converted into linear inequality constraints. Specifically, these constraints include the predicted residual chlorine concentration ≥ 0.1 ppm and the predicted total dissolved solids content ≤ 50 ppm. The set of dynamic control strategies output by the optimization process is a Pareto-optimal solution that meets the constraints.

[0073] S5. Based on the SRE value calculated in real time, the optimal control strategy is selected from the dynamic control strategy set to drive the filter element working mode switching, backwash frequency adjustment, and power regulation of the ultraviolet disinfection module of the direct drinking water equipment.

[0074] In a possible implementation, the control strategy screening in S5 adopts a fuzzy control rule base, the membership function of the rule base adopts a Gaussian distribution, the input variables are WDDI and SRE, and the output variable is the control intensity level.

[0075] Furthermore, the power regulation of the ultraviolet sterilization module in S5 adopts a PID control algorithm, and its integral term coefficient is dynamically adjusted according to the SRE value.

[0076] It should be noted that the control strategy screening adopts the fuzzy control rule base, the input variables are WDDI and SRE, and the output variable is the control intensity level. The membership function adopts Gaussian distribution, the fuzzy set of WDDI is divided into "low deviation", "medium deviation" and "high deviation", and the fuzzy set of SRE is divided into "high efficiency", "medium efficiency" and "low efficiency". The rule base contains 9 control rules. The power regulation of the ultraviolet sterilization module adopts the proportional-integral-derivative (PID) control algorithm, and the integral term coefficient K i Dynamically adjust according to SRE value. When SRE is lower than 0.5, K i Increase linearly by 20%.

[0077] In one possible implementation, the input variables of the fuzzy control rule base are the water quality dynamic deviation index (WDDI) and the system response efficiency coefficient (SRE), and the output variable is the control intensity level K (continuous value [0,1]). The fuzzy set of WDDI is divided into low deviation, medium deviation, and high deviation, and the fuzzy set of SRE is divided into high efficiency, medium efficiency, and low efficiency. The nine control rules are as follows:

[0078]

[0079]

[0080] The rule execution logic uses the Mamdani fuzzy inference method, and the defuzzification process uses the centroid method to calculate the precise output value. The control intensity level K is converted into the device execution parameter through linear mapping:

[0081] Filter mode switch:

[0082]

[0083] Where M is the filter element working mode code, which determines the combination of physical filter elements. 1 indicates single-stage activated carbon filtration (low-load mode); 2 indicates activated carbon and RO membrane in parallel (standard mode); and 3 indicates dual RO membranes in series (high-load mode). K is the control strength level, which is the decision strength value output by the fuzzy rule base. Its value range is a continuous real number [0, 1] and is the output of the nine fuzzy rules defuzzified by the centroid method.

[0084] Backwash interval adjustment (unit: minutes):

[0085] T=30×(1.5×0.8K)

[0086] Where T is the backwash interval, which is the time interval between two consecutive backwash operations, and has a value range of [9, 45] minutes (when K∈[0, 1]). This is achieved by writing the time setting value of the PLC timer. 30 is the base cycle (minutes), corresponding to the rated operating condition of the equipment; 1.5 is the maximum interval coefficient (T = 45 minutes when K = 0), and 0.8 is the intensity attenuation factor (for every 0.1 increase in K, the decrease is 2.4 minutes).

[0087] Sterilization power increment (unit: %):

[0088] ΔP=30K

[0089] Among them, ΔP is the UV sterilization power increment, which is the percentage of the increase based on the current power. The value range is a real number [0%, 30%] (when K∈[0,1]), which is achieved by adjusting the PWM duty cycle. The execution rules are:

[0090]

[0091] Among them, P current is the current power value, P max Rated maximum power for the UV module.

[0092] Specifically, the screening of the optimal control strategy follows the mathematical optimization criterion: select the strategy that satisfies SRE≥0.6 and has the smallest WDDI value from the dynamic control strategy set. This strategy drives the device through the following physical mapping mechanism: when the filter element working mode is coded as 1, the solenoid valve is controlled to turn on the activated carbon filter element pipeline and close the reverse osmosis membrane pipeline; when coded as 2, the parallel pipeline of the activated carbon filter element and the reverse osmosis membrane is opened synchronously; when coded as 3, the two-stage reverse osmosis membrane filtration channel is activated in series. The backwash interval parameter is directly converted into a time relay control instruction. The set value is T minutes, which means that the backwash solenoid valve is triggered to open for 10 seconds every T minutes. The ultraviolet sterilization power is realized by pulse width modulation technology, and the actual output power P actual Satisfy P actual =P max ×η, where P max is the rated maximum power of the module, and η is the sterilization power percentage parameter in the strategy.

[0093] S6. Update the multidimensional water quality feature vector through a closed-loop feedback mechanism and periodically optimize the parameter configuration of the hybrid optimization algorithm.

[0094] In one possible implementation, the closed-loop feedback mechanism in S6 specifically includes:

[0095] S601. After each control strategy is executed, the steady-state offset δ of the water quality parameter is collected;

[0096] S602: If δ>threshold θ, trigger the parameter reset operation of the hybrid optimization algorithm;

[0097] S603. Update the crossover probability and mutation probability of NSGA-II. The update formula is:

[0098]

[0099] P m =P m0 exp(-δ)

[0100] Among them, P c0 =0.8, P m0 =0.1 is the initial probability value.

[0101] It should be noted that the specific implementation of the closed-loop feedback mechanism involves collecting the steady-state offset δ of the water quality parameter after each control strategy execution. This offset is calculated as the root mean square error between the current measured value and the target value. If δ > 0.1 (threshold θ = 0.1), a parameter reset operation is triggered for the hybrid optimization algorithm, including the population size and crossover probability of the NSGA-II. After the parameter update, the optimization algorithm is reinitialized to ensure the adaptability of subsequent control strategies.

[0102] Specifically, in the implementation of the closed-loop feedback mechanism, the multidimensional water quality feature vector adopts a first-in-first-out queue storage structure, and the queue capacity is fixed to the total amount of data collected in 24 hours, that is, 86,400 groups. The update management of the queue follows the principle of periodic refresh and capacity control: the latest collected water quality data is added to the end of the queue every 15 minutes, and the earliest stored historical data point is automatically removed when the storage data volume reaches the upper limit. For new data that are determined to be outliers (score>0.75) by the anomaly detection module, an isolation and temporary storage mechanism is implemented to transfer them to an independent verification area for manual confirmation to avoid abnormal data contamination of the main data set. The steady-state offset δ is calculated by the standardized root mean square error formula:

[0103]

[0104] in is the measured value of water quality parameters, is the target value of water quality parameters, is the normalized range coefficient. The subscript k in the formula corresponds to five water quality parameters (1: total dissolved solids content, 2: pH value, 3: redox potential, 4: residual chlorine concentration, 5: temperature). The normalized coefficients of each parameter range are: total dissolved solids content is 2000ppm, pH value is 4, redox potential is 1000mV, residual chlorine concentration is 5ppm, and temperature is 50℃. When the calculated δ value exceeds the threshold of 0.1, the optimization algorithm parameter reset operation is triggered. When δ>0.1, the parameter reset operation is triggered: the crossover probability of the non-dominated sorting genetic algorithm is updated to P c =0.8×(1-SRE / 10), the mutation probability is updated to P m =0.1×e -δ +0.05; the long short-term memory neural network retrains the prediction model using the updated feature vector queue. The anomaly detection module continuously outputs the anomaly score Score_ano. When Score_ano > 0.75, the system is forced to switch to safety control mode and initiate three self-test processes: sensor calibration, actuator response test, and power supply stability test.

[0105] like Figure 3As shown in the figure, the entire process begins with the input of multidimensional water quality data (such as TDS and pH) collected in real time. First, an LSTM neural network is used to predict water quality trends (such as rising pollutant concentrations or decreasing residual chlorine) over the next 15 minutes. The prediction results are converted into constraints to limit the search range of the subsequent optimization algorithm, for example, prohibiting the reduction of sterilization power when insufficient residual chlorine is predicted.

[0106] The NSGA-II multi-objective optimization algorithm, based on the Water Quality Dynamic Deviation Index (WDDI) and the System Response Effectiveness (SRE), generates a set of control strategies that balance water quality safety and equipment efficiency. The algorithm iterates through multiple generations to identify non-inferior strategies. After initializing a population of random strategies, the algorithm calculates the fitness of each strategy (balancing WDDI deviation with SRE response efficiency). High-performing strategies are retained through non-dominated sorting, and new strategies are generated through crossover and mutation until convergence.

[0107] The optimal strategy is screened in real time based on the current SRE value, prioritizing the strategy with the highest response efficiency to drive filter switching, backwash frequency adjustment, and sterilization power regulation. After execution, the system collects steady-state water quality offsets. If the offset exceeds the limit, the optimization parameters are dynamically reset (for example, reducing crossover probability and increasing mutation probability) and the updated parameters are fed back to NSGA-II, forming a closed-loop optimization process. This entire process achieves precise and long-term stability in water quality control through a closed-loop architecture of predictive constraints, multi-objective optimization, and dynamic feedback.

[0108] In a possible implementation, the step of detecting anomalies is further included:

[0109] S701, performing anomaly scoring on the multidimensional water quality feature vector using the isolation forest algorithm;

[0110] S702: When the abnormality score exceeds the threshold, the system is forced to switch to the preset safety control mode and trigger the device self-check process.

[0111] It should be noted that the specific implementation of the anomaly detection step is to use the Isolation Forest algorithm to perform anomaly scoring on the multidimensional water quality feature vector. The algorithm sets 100 isolation trees and a subsampling number of 256. When the anomaly score exceeds 0.75, the system immediately switches to the preset safety control mode. In this mode, the filter switching frequency is increased to once per minute, the UV sterilization power is set to the maximum, and the device self-test process is initiated. The self-test items include sensor communication status, actuator response speed, and power supply stability. The self-test execution standards are: sensor communication delay ≤ 50ms (RS485 protocol); actuator (solenoid valve / relay) response time ≤ 200ms; power supply fluctuation tolerance ±5%; any exceeding of any metric is considered a self-test failure, and three consecutive failures trigger a shutdown protection mechanism. The self-test results are fed back to the main control unit via a status code. If three consecutive self-test failures are abnormal, the device shutdown protection mechanism is triggered.

[0112] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0113] (1) In the present invention, by constructing a two-dimensional evaluation system of water quality dynamic deviation index (WDDI) and system response efficiency coefficient (SRE), combined with a hybrid optimization algorithm to dynamically assign weights to multi-dimensional water quality parameters and perform multi-objective collaborative optimization, the problems of rigid dynamic water quality criteria and single optimization targets in traditional methods are effectively solved. Based on piecewise functions and nonlinear regression models, the degree of water quality deviation and equipment response efficiency are quantified, and a set of control strategies adapted to different scenarios is generated in real time, which significantly improves the dynamic adaptability to water quality fluctuations. The algorithm parameters are continuously optimized through a closed-loop feedback mechanism to ensure the global optimality of the control strategy in long-term operation and avoid performance degradation caused by drift of water quality characteristics.

[0114] (2) To address the issue of insufficient data preprocessing accuracy, the present invention adopts a dynamic normalization method combining wavelet transform and sliding window algorithm. This method filters out high-frequency noise in sensor signals through multi-scale decomposition and extracts local time series features based on time series segmentation. This solves the problem of residual noise and inconsistent data distribution caused by traditional mean filtering and static normalization. The adaptive adjustment mechanism of dynamic window length and step size can accurately capture short-term fluctuations and long-term trend changes in water quality parameters, providing high signal-to-noise ratio input data for subsequent feature analysis, significantly improving the stability and reliability of the water quality status assessment model.

[0115] (3) In the present invention, by integrating LSTM neural network prediction and multi-objective optimization algorithm, future water quality trend constraints are introduced into the control strategy generation, breaking through the limitation of traditional methods that lack forward-looking regulation. Combining the fuzzy rule base with the dynamic PID parameter adjustment mechanism, real-time and refined matching of control strategies is achieved, effectively balancing multiple objectives such as equipment energy consumption, filter life and sterilization efficiency. In addition, the anomaly detection module based on the isolation forest algorithm can identify complex collaborative deviation patterns, and link the preset safety control mode and self-test process, quickly switching to the emergency strategy when the anomaly score exceeds the limit, greatly reducing the risk of missed detection and safety hazards, and forming a closed-loop management system from anomaly identification to active protection.

[0116] The above content is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

[0117] There are a few points to note:

[0118] (1) The drawings of the embodiments of the present invention only relate to the structures related to the embodiments of the present invention. Other structures may refer to conventional designs.

[0119] (2) For the sake of clarity, the thickness of layers or regions in the drawings used to describe the embodiments of the present invention are exaggerated or reduced, that is, these drawings are not drawn to scale. It is understood that when an element such as a layer, film, region, or substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element or intervening elements may be present.

[0120] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to form new embodiments.

[0121] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. The water quality data analysis and precise control method of direct drinking water equipment based on intelligent algorithm is characterized by: include: S1. Use the multi-sensor module to collect real-time water quality data from direct drinking water equipment, including total dissolved solids content, pH value, redox potential, residual chlorine concentration and temperature; S2. Performing dynamic standardization preprocessing on the water quality data to generate a multidimensional water quality feature vector including a timestamp; S3. Based on the multidimensional water quality characteristic vector, water quality status is assessed using the water quality dynamic deviation index (WDDI) and the system response efficiency coefficient (SRE), where the WDDI represents the degree of dynamic deviation of water quality parameters relative to a preset threshold, and the SRE represents the response efficiency of the device control unit to water quality changes; S4. Perform multi-objective optimization analysis on the WDDI and SRE using a hybrid optimization algorithm to generate a set of dynamic control strategies, wherein the hybrid optimization algorithm integrates heuristic search and gradient descent method; S5. Based on the SRE value calculated in real time, the optimal control strategy is selected from the dynamic control strategy set to drive the filter element working mode switching, backwash frequency adjustment, and power regulation of the ultraviolet disinfection module of the direct drinking water equipment; S6. Update the multidimensional water quality feature vector through a closed-loop feedback mechanism, and periodically optimize the parameter configuration of the hybrid optimization algorithm.

2. The method for analyzing and accurately controlling water quality data of direct drinking water equipment based on intelligent algorithm according to claim 1 is characterized in that: Said S2 further comprises: S201, performing wavelet transform denoising processing on the original water quality data to eliminate high-frequency noise in the sensor acquisition signal; S202, using a sliding window algorithm to perform time series segmentation on the denoised data, with a window length of 5 to 10 minutes; S203: Perform normalization on the data in each window, and calculate the normalization formula as follows: Among them, X norm is the normalized data, μ is the mean of the data in the window, and σ is the standard deviation.

3. The method for analyzing and accurately controlling water quality data of direct drinking water equipment based on intelligent algorithm according to claim 1 is characterized in that: Said S3 further comprises: The calculation method of the water quality dynamic deviation index WDDI is as follows: S301, extracting the real-time measurement value V of each parameter in the multidimensional water quality feature vector i And the corresponding preset threshold range [L i ,H i ]; S302. Calculate the dynamic deviation component of each parameter using a piecewise function: Among them, k1=2.5 and k2=1.8 are empirical coefficients; S303. Perform weighted summation on the dynamic deviation components of all parameters to generate WDDI: Among them, α i is the parameter importance weight, which is determined by the statistical results of historical water quality abnormal events.

4. The method for analyzing and accurately controlling water quality data of direct drinking water equipment based on intelligent algorithms according to claim 3 is characterized in that: Said S3 further comprises: The calculation method of system response efficiency coefficient SRE is as follows: S304, collect historical response data of the device control unit, including the filter element switching delay time T d , Sterilization power adjustment error E p and backwash cycle deviation ΔC; S305. Use a polynomial regression model to fit the response efficiency evaluation function: Among them, β1=0.15, β2=0.6, and β3=0.25 are fitting coefficients.

5. The method for analyzing and accurately controlling water quality data of direct drinking water equipment based on intelligent algorithms according to claim 4 is characterized in that: The S4 specifically includes: The hybrid optimization algorithm adopts the NSGA-II framework, and its fitness function is defined as: F=λ1·WDDI+λ2·SRE -1 Among them, λ1 and λ2 are dynamic adjustment coefficients, which are automatically updated according to the current water quality category.

6. The method for analyzing and accurately controlling water quality data of direct drinking water equipment based on intelligent algorithms according to claim 1 is characterized in that: The S5 specifically includes: The control strategy screening adopts a fuzzy control rule base, the membership function of the rule base adopts a Gaussian distribution, the input variables are WDDI and SRE, and the output variable is the control intensity level.

7. The method for analyzing and accurately controlling water quality data of direct drinking water equipment based on intelligent algorithm according to claim 1 is characterized in that: The S5 specifically includes: The power regulation of the ultraviolet sterilization module adopts a PID control algorithm, and its integral term coefficient is dynamically adjusted according to the SRE value.

8. The method for analyzing and accurately controlling water quality data of direct drinking water equipment based on intelligent algorithms according to claim 1 is characterized in that: The closed-loop feedback mechanism in S6 specifically includes: S601. After each control strategy is executed, the steady-state offset δ of the water quality parameter is collected; S602: If δ>threshold θ, trigger the parameter reset operation of the hybrid optimization algorithm; S603. Update the crossover probability and mutation probability of NSGA-II. The update formula is: P m =P m0 ·exp(-δ) Among them, P c0 =0.8, P m0 =0.1 is the initial probability value.

9. The method for analyzing and accurately controlling water quality data of direct drinking water equipment based on intelligent algorithms according to claim 1 is characterized in that: Said S4 further comprises: The generation process of the dynamic control strategy set includes water quality trend prediction based on LSTM neural network, and the prediction results are used as constraints of the optimization algorithm.

10. The method for analyzing and accurately controlling water quality data of direct drinking water equipment based on intelligent algorithms according to claim 1 is characterized in that: It also includes anomaly detection steps: S701, performing anomaly scoring on the multidimensional water quality feature vector using the isolation forest algorithm; S702: When the abnormality score exceeds the threshold, the system is forced to switch to the preset safety control mode and trigger the device self-check process.

Citation Information

Cited By

  • Water dispenser water quality guarantee management control system and method thereof

    CN121187143A