Reclaimed water reuse energy-saving regulation and control method and system based on edge calculation
By constructing hysteresis features, rolling statistical features, and weighted cross features in the wastewater reuse system, and combining the GRU model and particle swarm optimization algorithm, dynamic optimization of energy consumption of the wastewater reuse system under strict water quality constraints was achieved, thereby improving the system's energy efficiency and economy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TIANJIN ZEXI NEW MATERIAL CO LTD
- Filing Date
- 2026-01-13
- Publication Date
- 2026-04-21
AI Technical Summary
Existing methods for regulating and controlling wastewater reuse lack in-depth analysis of historical time-series information and multi-source data, resulting in limited ability of models to capture dynamic characteristics. Furthermore, traditional prediction models have insufficient accuracy in predicting the synergistic effects of energy consumption and water quality, making it difficult to achieve dynamic optimization of energy consumption under strict water quality constraints.
Based on edge computing, we construct hysteresis features, rolling statistical features, and weighted cross features, combine them with the GRU model for energy consumption and water quality prediction, and use the particle swarm optimization algorithm to solve the objective function to generate the optimal control vector for energy-saving regulation.
This technology enables a refined and adaptive reduction in energy consumption of the wastewater reuse system while ensuring strict water quality standards are met. It improves overall energy efficiency and operational economy, and solves the problems of slow response, high energy consumption, and insufficient water quality stability in traditional methods.
Smart Images

Figure CN121903301A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of greywater reuse regulation technology, and in particular to a greywater reuse energy-saving regulation method and system based on edge computing. Background Technology
[0002] In recent years, with the increasingly severe water shortage problem, the large-scale and intelligent operation and control of reclaimed water reuse as an important water-saving approach has become a research hotspot. Traditional reclaimed water reuse control methods mostly rely on fixed rules, human experience, or simple single-variable control models, which are difficult to cope with the multiple dynamic coupling effects of influent load fluctuations, equipment status changes, and environmental factors. These methods generally suffer from problems such as response lag, high energy consumption, and insufficient water quality stability, and cannot achieve refined energy-saving optimization while ensuring that the reclaimed water quality meets the standards, thus restricting the further improvement of the overall energy efficiency and economy of the reclaimed water reuse system.
[0003] The shortcomings of existing technologies mainly include the following: at the data utilization level, most methods only use a single or a few variables at the current moment, lacking effective mining and feature construction of historical time series information and multi-source data, such as the deep correlation between water quality, equipment, hydraulics and environment, resulting in limited ability of models to capture dynamic characteristics. Secondly, at the prediction and optimization level, traditional prediction models often have insufficient accuracy in predicting the synergistic effects of energy consumption and water quality, which are two strongly coupled objectives. Furthermore, subsequent optimization control often adopts single-objective or simplified models, making it difficult to achieve dynamic optimization of energy consumption while meeting strict water quality constraints. Summary of the Invention
[0004] The technical problem solved by this invention is that the shortcomings of existing technologies mainly include: at the data utilization level, most methods only use a single or a few variables at the current moment, lacking effective mining and feature construction of historical time series information and multi-source data, such as the deep correlation between water quality, equipment, hydraulics and environment, resulting in limited ability of models to capture dynamic characteristics. Secondly, at the prediction and optimization level, traditional prediction models often have insufficient accuracy in predicting the coordinated effects of energy consumption and water quality, which are two strongly coupled objectives, and subsequent optimization control often uses single-objective or simplified models, making it difficult to achieve dynamic optimization of energy consumption while meeting strict water quality constraints.
[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: an energy-saving control method for greywater reuse based on edge computing, comprising the following steps: Step S1: Based on water quality data, equipment data, environmental and load data, and hydraulic state data, construct lag characteristics, rolling statistical characteristics, and weighted cross characteristics; Step S2: Combine the lag features, rolling statistical features and weighted cross features into a multi-dimensional feature vector, input the multi-dimensional feature vector into the GRU model for processing, and output the total energy consumption prediction value and the key water quality index prediction value of the effluent for the next 48 hours. Step S3: Construct an objective function based on the predicted total energy consumption for the next 48 hours and the predicted key water quality indicators for the effluent for the next 48 hours. Step S4: The objective function is solved using the particle swarm optimization algorithm to obtain the optimal control vector. The optimal control vector is then used to regulate the reuse of recycled water for energy conservation.
[0006] As a preferred embodiment of the edge computing-based energy-saving control method for reclaimed water reuse described in this invention, water quality data, equipment data, environmental and load data, and hydraulic state data are collected. Water quality data include influent COD, effluent COD, influent NH3-N, effluent NH3-N, pH value, and turbidity; Equipment data includes booster pump power, aeration fan frequency, membrane module start / stop status, dosing pump frequency, and dosing pump start / stop status; Environmental and load data include temperature and humidity data; Hydraulic status data includes the level of the equalization tank, the level of the clear water tank, and the influent flow rate; A unified time-series alignment mechanism is adopted to integrate water quality data, equipment data, environmental and load data, and hydraulic state data to generate a structured dataset with a 1-minute step size.
[0007] As a preferred embodiment of the edge computing-based energy-saving control method for reclaimed water reuse described in this invention, step S1 involves constructing hysteresis features, rolling statistical features, and weighted cross features based on water quality data, equipment data, environmental and load data, and hydraulic state data. Step S1 includes steps S101, S102 and S103; Step S101, the construction logic of the hysteresis feature is to select key variables F from water quality data, equipment data, environmental and load data and hydraulic state data. The key variables are one or more of the following: influent COD, effluent COD, influent NH3-N, effluent NH3-N, pH value, turbidity, booster pump power, aeration blower frequency, membrane module start-stop status, dosing pump frequency, equalization tank water level, and clear water tank water level. For each key variable F, construct a historical value sequence of the key variable over the past h hours, expressed as follows: ; in, This represents the h-hour lag value of the key variable F. This represents the value of the key variable at the current time t. This represents the historical value of the key variable h hours ago, where h represents an integer from 1 to 12.
[0008] As a preferred embodiment of the edge computing-based energy-saving control method for greywater reuse described in this invention, step S102, the logic for constructing the rolling statistical features is as follows: ; in, Indicates that variable F in the past Hourly rolling average This represents the corresponding rolling standard deviation.
[0009] As a preferred embodiment of the edge computing-based energy-saving control method for greywater reuse described in this invention, step S103, the logic for constructing the weighted cross features, is as follows: Two features are selected from the structured dataset, lag features, and rolling statistical features, and denoted as feature A and feature B; The weights of features A and B are determined based on the historical Pearson correlation coefficients between selected features A and B and the target variable energy consumption E, and a weighted cross feature is generated, expressed as follows: ; ; in, Represent each feature The absolute value of the Pearson correlation coefficient with the target variable energy consumption E. express The weights obtained after normalization; The weights of feature A are represented. The weights of feature B are represented. Indicates cross features .
[0010] As a preferred embodiment of the edge computing-based energy-saving control method for reclaimed water reuse described in this invention, in step S2, the hysteresis features, rolling statistical features and weighted cross features are combined into a multi-dimensional feature vector, which is then input into the GRU model for feature extraction, and the total energy consumption prediction value and the key water quality index prediction value of the effluent for the next 48 hours are output. The multi-dimensional feature vectors are processed through a GRU layer to obtain the hidden state sequence; The hidden state sequence is processed through an energy consumption branch to obtain the total energy consumption prediction for the next 48 hours; The hidden state sequence is processed through a water quality branch to obtain predicted values of key water quality indicators for the effluent over the next 48 hours.
[0011] As a preferred embodiment of the edge computing-based energy-saving control method for greywater reuse described in this invention, step S3 involves constructing an objective function and setting constraints. Step S3 includes steps S301 and S302; Step S301, construct the objective function. The construction logic is as follows: ; in, The control vector at time t represents the setpoints for the booster pump power, aeration fan frequency, membrane module start / stop status, dosing pump frequency, and dosing pump start / stop status. Represents control vector Perform minimization optimization. Indicates in Below is the total energy consumption forecast value for the next 48 hours from the GRU energy consumption prediction model. Indicates in Below are the predicted values of key water quality indicators for the effluent from the GRU water quality prediction model for the next 48 hours. Indicates the target value for effluent water quality. , Let be the weight coefficient, and satisfy... + =1.
[0012] As a preferred embodiment of the edge computing-based energy-saving control method for reclaimed water reuse described in this invention, step S302, setting constraints specifically includes equipment physical constraints, water quality compliance hard constraints, and hydraulic balance reliability constraints. Step S302 includes steps S3021, S3022 and S3023; Step S3021, the physical constraint expression for the equipment is: ; in, , Representing control variables respectively Physical lower bound vector and physical upper bound vector of the same dimension; Step S3022, the expression for the hard constraint of water quality compliance is, ; in, Reuse standards that represent the predicted values of key effluent indicators; Step S3023, the expression for the hydraulic balance reliability constraint is, ; ; in, Indicates the water level in the regulating tank. Indicates in The total volume of water entering the water within the time period. Indicated in the control vector The total amount of effluent processed within the same time period. This indicates the upper limit of the safe water level allowed in the regulating tank.
[0013] As a preferred embodiment of the edge computing-based energy-saving control method for reclaimed water reuse described in this invention, step S4 involves using a particle swarm optimization algorithm to solve the objective function and obtain the optimal control vector. Step S4 includes steps S401, S402, and S403; Step S401: Randomly generate a set of particles representing the control vector as the initial population, and denot it as the current population; Step S402: Perform iterative optimization on the current population until the termination condition is met, wherein each iteration includes: The fitness value is calculated for each particle in the current population. The calculation logic is as follows: decode the position of each particle into a control vector, substitute the control vector into the objective function, and calculate the fitness value. Based on the fitness values of all particles, update the individual historical best position of each particle and the global best position of the entire population. Based on the updated best positions, generate the next generation of population. Step S403: Set the next generation population as the new current population; When the iteration meets the termination condition, the iteration stops, and the final global optimal position of the population is decoded into the optimal control vector and output. The termination condition is that the change in the objective function value corresponding to the global optimal position of the population in G consecutive iterations is less than a preset threshold.
[0014] An energy-saving control system for greywater reuse based on edge computing includes a feature module, a processing module, a construction module, and a control module. The feature module, based on water quality data, equipment data, environmental and load data, and hydraulic state data, constructs lag features, rolling statistical features, and weighted cross features; The processing module combines lag features, rolling statistical features, and weighted cross features into a multi-dimensional feature vector. The multi-dimensional feature vector is then input into the GRU model for processing, and the total energy consumption prediction value and the key water quality index prediction value of the effluent for the next 48 hours are output. The module constructs an objective function based on the predicted total energy consumption and the predicted key water quality indicators of the effluent for the next 48 hours. The control module uses a particle swarm optimization algorithm to solve the objective function and obtain the optimal control vector. The optimal control vector is then used to regulate the reuse of recycled water in an energy-saving manner.
[0015] The beneficial effects of this invention are as follows: By integrating multi-dimensional temporal feature construction, GRU collaborative prediction, and multi-constraint particle swarm optimization, a fundamental breakthrough is achieved from experience-based single-objective static control to data-driven multi-objective dynamic optimization. Physically meaningful deep features are extracted from multi-source heterogeneous data, and the GRU model is used to synchronously and accurately predict future energy consumption and water quality trends. Based on this, a multi-objective optimization function with energy saving as the core and water quality as a hard constraint is constructed, and the particle swarm algorithm is used for real-time solution, dynamically generating optimal equipment control commands. Thus, under the premise of absolutely ensuring effluent water quality meets standards and safe operation, refined and adaptive reduction of energy consumption in reclaimed water reuse is achieved, effectively improving overall energy efficiency, intelligence level, and operational economy. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the steps of an energy-saving control method for greywater reuse based on edge computing, provided as an embodiment of the present invention.
[0017] Figure 2 This is a basic flowchart of a greywater reuse energy-saving control system based on edge computing, provided as an embodiment of the present invention. Detailed Implementation
[0018] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0019] Example 1, referring to Figure 1 As an embodiment of the present invention, a method and system for energy-saving regulation of greywater reuse based on edge computing is provided, comprising the following steps: Step S1: Based on water quality data, equipment data, environmental and load data, and hydraulic state data, construct lag characteristics, rolling statistical characteristics, and weighted cross characteristics; Step S2: Combine the lag features, rolling statistical features and weighted cross features into a multi-dimensional feature vector, input the multi-dimensional feature vector into the GRU model for processing, and output the total energy consumption prediction value and the key water quality index prediction value of the effluent for the next 48 hours. Step S3: Construct an objective function based on the predicted total energy consumption for the next 48 hours and the predicted key water quality indicators for the effluent for the next 48 hours. Step S4: The objective function is solved using the particle swarm optimization algorithm to obtain the optimal control vector. The optimal control vector is then used to regulate the reuse of recycled water for energy conservation.
[0020] In one embodiment, addressing the problems of traditional greywater reuse control methods relying on manual experience, resulting in extensive control and difficulty in achieving the dual goals of energy saving and water quality stability under dynamic operating conditions, this invention proposes a greywater reuse energy-saving control method based on edge computing. This method constructs a closed-loop intelligent architecture of perception-prediction-optimization, with the core process as follows: First, multi-source data, including water quality data, equipment data, environmental and load data, and hydraulic state data, are collected in real time. Then, lag features, rolling statistical features, and weighted cross features reflecting process dynamics and coupling relationships are constructed to form a high-dimensional feature vector. The lag features characterize the historical time-series dependencies of key variables, capturing process lag effects, such as the impact of water quality and equipment status from the past 1-12 hours on the present and future. The rolling statistical features characterize the changing trends and fluctuations of key variables over the past 2 hours, specifically by aggregating and calculating rolling averages based on 1-minute step data. The mean (reflecting trends) and rolling standard deviation (reflecting fluctuations) are used to smooth data noise and extract patterns. Weighted cross features characterize the strong coupling relationship between lag features and rolling statistical features and energy consumption, quantifying the interaction effects of variables that significantly affect energy-saving targets. Then, this feature vector is input into a multi-task GRU prediction model. This model efficiently and synchronously outputs the predicted total energy consumption and the predicted key water quality indicators for the next 48 hours by sharing underlying time-series features. Based on these prediction results, an optimization objective function is constructed with minimizing predicted energy consumption as the core, while driving the predicted water quality to approach the target value. The objective function strictly incorporates the realistic constraints of equipment physical limits, water quality compliance, and hydraulic balance. The particle swarm optimization algorithm is used to quickly solve this complex constraint optimization problem online, thereby obtaining the optimal equipment control instruction set for the next 48 hours for energy-saving regulation of reclaimed water reuse.
[0021] This technical architecture, through multi-level feature fusion and GRU time-series modeling, significantly improves the model's accuracy and generalization ability in depicting nonlinear and large-lag behaviors. Its integrated design of prediction and optimization achieves a fundamental shift from passive response to proactive look-ahead control, effectively solving three core challenges faced by wastewater reuse: first, addressing the challenge of traditional methods struggling to cope with random fluctuations in influent load and environmental conditions, achieving dynamic adaptive optimization; second, under the strict constraint of ensuring stable effluent quality, deeply exploring the system's energy-saving potential and avoiding conflicts between energy-saving and environmental protection goals; and third, by deploying the entire computationally intensive task at the edge, overcoming the high latency and reliability risks brought by cloud control, and meeting the engineering requirements of real-time, reliable closed-loop control at the plant level.
[0022] Collect water quality data, equipment data, environmental and load data, and hydraulic status data; Water quality data include influent COD, effluent COD, influent NH3-N, effluent NH3-N, pH value, and turbidity; Equipment data includes booster pump power, aeration fan frequency, membrane module start / stop status, dosing pump frequency, and dosing pump start / stop status; Environmental and load data include temperature and humidity data; Hydraulic status data includes the level of the equalization tank, the level of the clear water tank, and the influent flow rate; A unified time-series alignment mechanism is adopted to integrate water quality data, equipment data, environmental and load data, and hydraulic state data to generate a structured dataset with a 1-minute step size.
[0023] In one embodiment, since the acquisition frequencies and communication delays of water quality data, equipment data, environmental and load data, and hydraulic status data vary—for example, water quality meters that collect water quality data output a set of data every hour, while water level gauges, flow meters, and power meters that collect hydraulic status data output data every second—directly using these data would lead to time sequence errors. Therefore, a unified time sequence alignment and fusion mechanism is adopted. This method sets a basic step size of 1 minute to synchronize the timestamps of water quality data, equipment data, environmental and load data, and hydraulic status data. Based on the data frequency characteristics, corresponding data processing strategies are adopted. Specifically, for high-frequency hydraulic status data and equipment data, their average values within 1 minute are calculated and aggregated; for low-frequency hourly water quality data, data points per minute are generated using linear interpolation; and for minute-level environmental data, forward padding is used to align it to the corresponding minute timestamps. Finally, a structured dataset with strictly aligned timestamps and a 1-minute resolution is generated.
[0024] This data integration step solves the inherent challenge of multi-source heterogeneous data fusion, unifying information from different time scales under the same analytical framework. This provides a high-quality and consistent input foundation for subsequent high-precision feature engineering. The set 1-minute step size is a balance point determined based on the dynamic response time scale of the wastewater reuse process and the processing capacity of edge computing devices. It can capture most key process variables, such as the minute-level dynamic changes of water level and flow rate, while avoiding redundant data and computational load caused by excessively high frequency, thus ensuring the feasibility of subsequent real-time prediction and optimization.
[0025] Step S1: Based on water quality data, equipment data, environmental and load data, and hydraulic state data, construct lag characteristics, rolling statistical characteristics, and weighted cross characteristics; Step S1 includes steps S101, S102 and S103; Step S101, the construction logic of the hysteresis feature is to select key variables F from water quality data, equipment data, environmental and load data and hydraulic state data. The key variables are one or more of the following: influent COD, effluent COD, influent NH3-N, effluent NH3-N, pH value, turbidity, booster pump power, aeration blower frequency, membrane module start-stop status, dosing pump frequency, equalization tank water level, and clear water tank water level. For each key variable F, construct a historical value sequence of the key variable over the past h hours, expressed as follows: ; in, This represents the h-hour lag value of the key variable F. This represents the value of the key variable at the current time t. This represents the historical value of the key variable h hours ago, where h represents an integer from 1 to 12.
[0026] Step S102, the logic for constructing rolling statistical features is as follows: ; in, Indicates that variable F in the past Hourly rolling average This represents the corresponding rolling standard deviation.
[0027] Step S103, the logic for constructing the weighted cross features is as follows: Select two features from the structured dataset, lag features, and rolling statistical features, and denote them as feature A and feature B; The weights of features A and B are determined based on the historical Pearson correlation coefficients between selected features A and B and the target variable energy consumption E, and a weighted cross feature is generated, expressed as follows: ; ; in, Represent each feature The absolute value of the Pearson correlation coefficient with the target variable energy consumption E. express The weights obtained after normalization; The weights of feature A are represented. The weights of feature B are represented. Indicates cross features .
[0028] In one embodiment, step S101 involves constructing lag features by selecting key variables F from the variables of water quality data, equipment data, environmental and load data, and hydraulic state data in the structured dataset. Examples of key variables include influent COD, aeration fan frequency, or equalization tank water level. For each key variable, a historical value sequence over the past h hours is constructed as a lag feature, calculated using the following formula: ,in This is the value at the current time. The value is the historical value from h hours ago. The parameter h is set to an integer from 1 to 12. The basis for this setting is that the biological, physicochemical reactions and hydraulic retention time of the reclaimed water reuse process usually have a significant impact within this time scale. For example, the impact of changes in influent load on effluent water quality may become apparent after several hours. The purpose of constructing such features is to enable the model to recall and utilize historical state information. Step S102: Construct rolling statistical features. To further smooth noise and extract trend information, calculate the statistics of the key variable F over a past time window, specifically by calculating the rolling average. and rolling standard deviation The time window length ω is set according to the dynamic change cycle of the process. In this embodiment, ω is set to 2 hours, which is 120 data points. This value reflects the short-term fluctuation trend of most water quality data, equipment data, environmental and load data and hydraulic state data. At the same time, it avoids the characteristic response being too slow due to the window being too long. The rolling average represents the recent average level, and the rolling standard deviation quantifies the intensity of the process fluctuation. Step S103: Construct weighted cross features. To capture the impact of interactions between variables on energy consumption and the core optimization objective, two features, denoted as A and B, are selected from water quality data, equipment data, environmental and load data, hydraulic state data, lag features, and rolling statistical features. Their weighted cross features are then constructed. First, based on data from a historical period, such as the past 30 days, each candidate feature is calculated. The absolute value of the Pearson correlation coefficient with the target variable, total energy consumption E. Then, calculate its weights, for example, when calculating the weights of feature A. When calculating the weight of feature B, Finally, weighted cross features are generated. ,in The element-wise multiplication, or Hadamard product, is used to quantify the synergistic or antagonistic effect between two weighted features. This method assigns different importance weights to features based on their correlation with energy consumption, so that the constructed cross features can more effectively point to the interaction effects related to energy consumption optimization. The historical data time period, such as 30 days, is set to ensure that the correlation coefficient estimation has statistical robustness and can reflect the recent process operation characteristics. Among them, by constructing lag features, rolling statistical features, and weighted cross features, the 1-minute step-size structured dataset as input is transformed into a multi-dimensional feature vector with highly dense information and both temporal dynamics and correlation expressions. This enhances the learning ability of the subsequent GRU model to process nonlinearity, lag, and coupling, and lays a solid foundation for high-precision energy consumption and water quality co-prediction. It is a key preprocessing step that enables the entire prediction and optimization closed loop to be realized.
[0029] Step S2: Combine the lag features, rolling statistical features and weighted cross features into a multi-dimensional feature vector, input it into the GRU model for feature extraction, and output the total energy consumption prediction value and the key water quality index prediction value of the effluent for the next 48 hours. The multi-dimensional feature vectors are processed through a GRU layer to obtain the hidden state sequence; The hidden state sequence is processed through an energy consumption branch to obtain the total energy consumption prediction for the next 48 hours; The hidden state sequence is processed through a water quality branch to obtain predicted values of key water quality indicators for the effluent over the next 48 hours.
[0030] Step S3: Construct the objective function and set constraints; Step S3 includes steps S301 and S302; Step S301, construct the objective function. The construction logic is as follows: ; in, The control vector at time t represents the setpoints for the booster pump power, aeration fan frequency, membrane module start / stop status, dosing pump frequency, and dosing pump start / stop status. Represents control vector Perform minimization optimization. Indicates in Below is the total energy consumption forecast value for the next 48 hours from the GRU energy consumption prediction model. Indicates in Below are the predicted values of key water quality indicators for the effluent from the GRU water quality prediction model for the next 48 hours. Indicates the target value for effluent water quality. , Let be the weight coefficient, and satisfy... + =1.
[0031] Step S302, setting constraints specifically includes equipment physical constraints, water quality compliance hard constraints, and hydraulic balance reliability constraints; Step S302 includes steps S3021, S3022 and S3023; Step S3021, the physical constraint expression for the equipment is: ; in, , Representing control variables respectively Physical lower bound vector and physical upper bound vector of the same dimension; Step S3022, the expression for the hard constraint of water quality compliance is, ; in, Reuse standards that represent the predicted values of key effluent indicators; Step S3023, the expression for the hydraulic balance reliability constraint is, ; ; in, Indicates the water level in the regulating tank. Indicates in The total volume of water entering the water within the time period. Indicated in the control vector The total amount of effluent processed within the same time period. This indicates the upper limit of the safe water level allowed in the regulating tank.
[0032] In one embodiment, the optimization objective function is constructed by seeking an optimal set of control command sequences for the next 48 hours, i.e., the control vector. To minimize the cumulative sum of predicted energy consumption over the entire next 48 hours, while ensuring the predicted effluent water quality sequence remains as stable as possible within the preset target value, the control vector... It is a time-series sequence that includes the equipment's settings at each time step over the next 48 hours, such as hourly setpoints. Specifically, it covers booster pump power, aeration fan frequency, membrane module start / stop status, and dosing pump frequency and start / stop status. To balance the goals of energy consumption and water quality, a weighting factor is introduced. + =1, in a specific embodiment, set =0, =0.3, this setting reflects the control principle of prioritizing energy conservation as the primary optimization guideline under the premise of absolutely ensuring water quality.
[0033] The objective function is constructed to aggregate and optimize all predicted values for the next 48 hours. This represents the control vector sequence to be optimized at the current time t over the next 48 hours. This represents an aggregate representation symbol, specifically referring to the control vector. The sum of the total energy consumption predictions for the next 48 hours output by the GRU energy consumption prediction model in step S2 is mathematically equivalent to: ,in, This represents the predicted energy consumption for the k-th hour. This represents an aggregate representation symbol, specifically referring to the control vector. In step S2, the key effluent water quality indicators, such as the predicted COD value sequence, output by the GRU water quality prediction model for the next 48 hours are mathematically represented as follows: , The target values for effluent water quality must be set based on reuse standards. And retain a safety margin, usually a ratio Strict numerical values, for example, set to To optimize the internal control objectives of computation, This represents the calculation of the relationship between each element in the water quality prediction sequence and the target value. The sum of squares of the deviations, i.e. This is used to quantify the overall water quality deviation over the next 48 hours; To ensure the feasibility and safety of the optimization results in the actual system, physical constraints on equipment, hard constraints on water quality compliance, and reliability constraints on hydraulic balance are imposed; the adjustment range of all control variables must be within the allowable physical limits of their respective equipment, i.e. ,vector Each component is determined by the physical characteristics of the specific equipment. For example, the frequency adjustment of a booster pump needs to be carried out within its rated operating range, such as 30Hz to 50Hz. These specific limits constitute the upper and lower limits of the corresponding dimension.
[0034] Water quality compliance is a hard constraint, forming the cornerstone and red line of this optimization model. It mandates that, within the optimal control vector... Below is the water quality prediction sequence for the next 48 hours output by the GRU water quality model. Each predicted value must meet the reuse standards stipulated by the state or local government. For example, regarding the reuse of COD metrics Set at 30 mg / L, the mathematical expression of this hard constraint is: The value of k is a positive integer from 1 to 48, which fundamentally eliminates any energy-saving solutions that sacrifice the quality of the effluent. Hydraulic balance reliability constraints require that the dynamic balance of water volume in the equalization tank be maintained to ensure the continuous and stable treatment process. This constraint must be met in every time period of the next 48 hours. By recursively applying this relationship over time, we can obtain the water level prediction expression for any future time period k: The constraint requires that all predicted water levels must always be within a safe range. ,in, To ensure the safe water level limit is determined based on the physical design of the equalization tank, thereby effectively preventing the risk of tank overflow or pump cavitation; Through the construction in step S3, this invention transforms the complex challenge of real-time operation and control into a well-defined and computable mathematical optimization problem. First, it achieves overall optimization based on a high-precision prediction sequence over a long period of 48 hours, making decisions through simulation and evaluation of the entire future process, surpassing traditional single-step feedback or short-sighted control. Second, by setting water quality compliance as an inviolable hard constraint that runs through the entire prediction time domain, a rigid safety boundary is established for energy-saving control, ensuring that optimization always takes place within a safe zone. Third, the introduction of multiple physical and safety constraints ensures that the optimal solution is not only economical but also completely executable and reliable in engineering. This provides a precise and complete mathematical model framework for subsequently using efficient optimization algorithms, such as particle swarm optimization, to solve this high-dimensional, nonlinear, constrained optimization problem online in real time and ultimately generate a safe and energy-saving optimal control command sequence.
[0035] Step S4: Solve the objective function using the particle swarm optimization algorithm to obtain the optimal control vector; Step S4 includes steps S401, S402, and S403; Step S401: Randomly generate a set of particles representing the control vector as the initial population, and denot it as the current population; Step S402: Perform iterative optimization on the current population until the termination condition is met, wherein each iteration includes: The fitness value is calculated for each particle in the current population. The calculation logic is as follows: decode the position of each particle into a control vector, substitute the control vector into the objective function, and calculate the fitness value. Based on the fitness values of all particles, update the individual historical best position of each particle and the global best position of the entire population. Based on the updated best positions, generate the next generation of population. Step S403: Set the next generation population as the new current population; When the iteration meets the termination condition, stop the iteration, decode the final global optimal position of the population into the optimal control vector and output it; The termination condition is that the change in the objective function value corresponding to the global optimal position of the population is less than a preset threshold in G consecutive iterations.
[0036] In one embodiment, the algorithm initialization corresponds to step S401. First, in the control vector... A swarm of particles, i.e., an initial population, is randomly initialized within the solution space, and the position of each particle represents a candidate control vector. A multidimensional vector encodes the set sequence of all devices for the next 48 hours, with its speed randomly generated. The population size N is a key parameter, set between 20 and 50 depending on the problem dimension and real-time computation requirements. For example, in this embodiment, N=30 is set. The initial upper and lower bounds strictly follow the device physical constraints defined in step S3021. To ensure the feasibility of the initial solution, the iterative optimization process corresponds to steps S402 and S403. The algorithm then enters an iterative loop, and the specific operations of each iteration include decoding the position vector of each particle in the population into a specific control vector. The objective function defined in step S301 is substituted into the equation for calculation. Here, the objective function value itself is directly used as the fitness value. The algorithm aims to find the particle position that minimizes this value. During the calculation process, the GRU prediction model from step S2 is called to obtain the fitness value. and Furthermore, the hard constraints on water quality compliance and hydraulic balance in step S302 are strictly verified, and penalties are imposed on solutions that violate the constraints. For example, a positive number greater than the objective function value of the feasible solution is assigned, thereby transforming the constrained optimization problem into a form that can be handled by the PSO algorithm. Each particle records its own historical best position, and the entire population records the global best positions experienced by all particles. After each iteration, this historical best information is updated according to the new fitness value. Based on its own historical best position and global best position, as well as the particle's current velocity and position, the state of the next generation particle is calculated according to the standard PSO velocity and position update formula. The PSO core parameters of inertia weight, individual learning factor and social learning factor are preset, and in one embodiment they are set to 0.8, 1.5 and 1.5 respectively. The above iterative process continues until a preset termination condition is met. The termination condition used in this method is that the absolute value of the change in the objective function value corresponding to the global optimal position of the population, i.e., the currently found optimal fitness, over G consecutive iterations is less than a preset threshold. Parameters G and To balance solution accuracy and computation time, G is typically set to 10. This condition indicates that the optimization has converged to a stable solution. Once the termination condition is met, the iteration stops, and the final global optimum position is decoded into the optimal control vector. Output; The particle swarm optimization algorithm is used to solve the problem, which fully utilizes its advantages of not requiring gradient information of the objective function, easy parallelization, and strong global search capability. It is very suitable for solving the complex optimization problem described in step S3. Under the premise of satisfying multiple engineering constraints, and given the limited computing power and real-time requirements of edge computing devices, the solution is usually required to be completed within a few seconds to a minute. It efficiently searches for a high-quality optimal solution. Step S4 is closely connected with the aforementioned prediction model and optimization problem construction, and together they form a complete perception-prediction-optimization intelligent control closed loop. Finally, the optimal control vector is generated, which not only significantly reduces the energy consumption of system operation, but also strictly ensures that the effluent water quality meets the standards and hydraulic safety, so as to carry out energy-saving control of reclaimed water reuse.
[0037] Example 2, refer to Figure 2 In another embodiment of the present invention, which differs from the first embodiment, an energy-saving control method and system for greywater reuse based on edge computing is provided, including a feature module, a processing module, a construction module and a control module; The feature module, based on water quality data, equipment data, environmental and load data, and hydraulic state data, constructs lag features, rolling statistical features, and weighted cross features; The processing module combines lag features, rolling statistical features, and weighted cross features into a multi-dimensional feature vector. The multi-dimensional feature vector is then input into the GRU model for processing, and the total energy consumption prediction value and the key water quality index prediction value of the effluent for the next 48 hours are output. The module constructs an objective function based on the predicted total energy consumption and the predicted key water quality indicators of the effluent for the next 48 hours. The control module uses a particle swarm optimization algorithm to solve the objective function and obtain the optimal control vector. The optimal control vector is then used to regulate the reuse of recycled water for energy conservation.
[0038] In one embodiment, addressing the problems of traditional greywater reuse control methods relying on manual experience, resulting in extensive control and difficulty in achieving both energy conservation and water quality stability under dynamic operating conditions, this invention proposes an edge computing-based energy-saving control method for greywater reuse. This method constructs a closed-loop intelligent architecture of perception-prediction-optimization, with the core process as follows: First, multi-source data, including water quality data, equipment data, environmental and load data, and hydraulic state data, are collected in real time. Then, hysteresis features, rolling statistical features, and weighted cross features reflecting process dynamics and coupling relationships are constructed to form a high-dimensional feature vector. Next, this feature vector is input... A multi-task GRU prediction model is proposed. This model efficiently and synchronously outputs the total energy consumption prediction and the key water quality index prediction for the next 48 hours by sharing underlying time-series features. Based on these prediction results, an optimization objective function is constructed with minimizing predicted energy consumption as the core and driving the predicted water quality to approach the target value. The objective function strictly incorporates the realistic constraints of equipment physical limits, water quality compliance, and hydraulic balance. The particle swarm optimization algorithm is used to quickly solve this complex constraint optimization problem online, thereby obtaining the optimal equipment control instruction set for the next 48 hours and enabling energy-saving regulation of reclaimed water reuse.
[0039] This technical solution fundamentally solves the long-standing problems of dynamic adaptation, multi-objective conflict, and real-time control in wastewater reuse by constructing an integrated intelligent control closed loop of prediction and optimization. First, it has achieved a leap from experience-driven to model prediction-driven precise decision-making. Through the GRU deep network that integrates multi-source time series data, it has for the first time the ability to accurately simulate energy consumption and water quality evolution up to 48 hours in advance. This digital twin-like predictive capability enables the control strategy to be based on the accurate prediction of the future process state, completely bidding farewell to the era of blind adjustment that relies on lagging indicators and human experience, and providing key decision-making basis for dealing with random fluctuations in influent load and large process lag characteristics. Secondly, it achieves global optimal energy saving under strict hard constraints. Based on a highly reliable prediction sequence, this scheme transforms the complex operation and control problem into a mathematical optimization model with multiple constraints, and uses an efficient particle swarm optimization algorithm for online solution. This mechanism can accurately locate the optimal operating trajectory with the lowest total energy consumption in millions of strategy combinations, under the premise of ensuring absolute water quality and hydraulic safety throughout the process. It not only resolves the inherent conflict between energy saving and environmental protection goals at the operational level, but also taps into the deep energy saving potential that traditional methods cannot reach through collaborative optimization, realizing a fundamental shift from extensive safety assurance to refined optimization. In summary, a safe, precise, and adaptive real-time intelligent control method at the plant level has been developed. This method empowers reclaimed water facilities with the ability to autonomously seek optimal solutions in dynamic environments. While steadily improving the effluent quality assurance rate, it can also bring about a significant reduction in energy consumption, resulting in direct economic benefits and environmental value. This represents a key step forward for the water treatment industry towards intelligent and refined operation.
[0040] This invention achieves a fundamental breakthrough from experience-based single-objective static control to data-driven multi-objective dynamic optimization by integrating multi-dimensional temporal feature construction, GRU collaborative prediction, and multi-constraint particle swarm optimization. It extracts physically meaningful deep features from multi-source heterogeneous data and uses the GRU model to synchronously and accurately predict future energy consumption and water quality change trends. Based on this, it constructs a multi-objective optimization function with energy saving as the core and water quality as the hard constraint, and uses the particle swarm algorithm for real-time solution to dynamically generate optimal equipment control commands. Thus, under the premise of absolutely ensuring that the effluent water quality meets the standards and safe operation, it achieves refined and adaptive reduction of energy consumption for reclaimed water reuse, effectively improving overall energy efficiency, intelligence level, and operational economy.
[0041] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1The function specified in one or more boxes.
[0042] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the protection scope of the present invention.
Claims
1. A method for energy-saving regulation of greywater reuse based on edge computing, characterized in that, Includes the following steps, Step S1: Based on water quality data, equipment data, environmental and load data, and hydraulic state data, construct lag characteristics, rolling statistical characteristics, and weighted cross characteristics; Step S2: Combine the lag features, rolling statistical features and weighted cross features into a multi-dimensional feature vector, input the multi-dimensional feature vector into the GRU model for processing, and output the total energy consumption prediction value and the key water quality index prediction value of the effluent for the next 48 hours. Step S3: Construct an objective function based on the predicted total energy consumption for the next 48 hours and the predicted key water quality indicators for the effluent for the next 48 hours. Step S4: The objective function is solved using the particle swarm optimization algorithm to obtain the optimal control vector. The optimal control vector is then used to regulate the reuse of recycled water for energy conservation.
2. The energy-saving control method for greywater reuse based on edge computing as described in claim 1, characterized in that, Collect water quality data, equipment data, environmental and load data, and hydraulic status data; Water quality data include influent COD, effluent COD, influent NH3-N, effluent NH3-N, pH value, and turbidity; Equipment data includes booster pump power, aeration fan frequency, membrane module start / stop status, dosing pump frequency, and dosing pump start / stop status; Environmental and load data include temperature and humidity data; Hydraulic status data includes the level of the equalization tank, the level of the clear water tank, and the influent flow rate; A unified time-series alignment mechanism is adopted to integrate water quality data, equipment data, environmental and load data, and hydraulic state data to generate a structured dataset with a 1-minute step size.
3. The edge computing-based energy-saving control method for greywater reuse as described in claim 2, characterized in that, Step S1: Based on water quality data, equipment data, environmental and load data, and hydraulic state data, construct lag characteristics, rolling statistical characteristics, and weighted cross characteristics; Step S1 includes steps S101, S102 and S103; Step S101, the construction logic of the hysteresis feature is to select key variables F from water quality data, equipment data, environmental and load data and hydraulic state data. The key variables are one or more of the following: influent COD, effluent COD, influent NH3-N, effluent NH3-N, pH value, turbidity, booster pump power, aeration blower frequency, membrane module start-stop status, dosing pump frequency, equalization tank water level, and clear water tank water level. For each key variable F, construct a historical value sequence of the key variable over the past h hours, expressed as follows: ; in, This represents the h-hour lag value of the key variable F. This represents the value of the key variable at the current time t. This represents the historical value of the key variable h hours ago, where h represents an integer from 1 to 12.
4. The edge computing-based energy-saving control method for greywater reuse as described in claim 3, characterized in that, Step S102, the logic for constructing rolling statistical features is as follows: ; in, Indicates that variable F in the past Hourly rolling average This represents the corresponding rolling standard deviation.
5. The edge computing-based energy-saving control method for greywater reuse as described in claim 4, characterized in that, Step S103, the logic for constructing the weighted cross features is as follows: Two features are selected from the structured dataset, lag features, and rolling statistical features, and denoted as feature A and feature B; The weights of features A and B are determined based on the historical Pearson correlation coefficients between selected features A and B and the target variable energy consumption E, and a weighted cross feature is generated, expressed as follows: ; ; in, Represent each feature The absolute value of the Pearson correlation coefficient with the target variable energy consumption E. express The weights obtained after normalization; The weights of feature A are represented. The weights of feature B are represented. Indicates cross features .
6. The energy-saving control method for greywater reuse based on edge computing as described in claim 5, characterized in that, Step S2: Combine the lag features, rolling statistical features and weighted cross features into a multi-dimensional feature vector, input it into the GRU model for feature extraction, and output the total energy consumption prediction value and the key water quality index prediction value of the effluent for the next 48 hours. The multi-dimensional feature vectors are processed through a GRU layer to obtain the hidden state sequence; The hidden state sequence is processed through an energy consumption branch to obtain the total energy consumption prediction for the next 48 hours; The hidden state sequence is processed through a water quality branch to obtain predicted values of key water quality indicators for the effluent over the next 48 hours.
7. The edge computing-based energy-saving control method for greywater reuse as described in claim 6, characterized in that, Step S3: Construct the objective function and set constraints; Step S3 includes steps S301 and S302; Step S301, construct the objective function. The construction logic is as follows: ; in, The control vector at time t represents the setpoints for the booster pump power, aeration fan frequency, membrane module start / stop status, dosing pump frequency, and dosing pump start / stop status. Represents control vector Perform minimization optimization. Indicates in Below is the total energy consumption forecast value for the next 48 hours from the GRU energy consumption prediction model. Indicates in Below are the predicted values of key water quality indicators for the effluent from the GRU water quality prediction model for the next 48 hours. Indicates the target value for effluent water quality. , Let be the weight coefficient, and satisfy... + =1.
8. The energy-saving control method for greywater reuse based on edge computing as described in claim 7, characterized in that, Step S302, setting constraints specifically includes equipment physical constraints, water quality compliance hard constraints, and hydraulic balance reliability constraints; Step S302 includes steps S3021, S3022 and S3023; Step S3021, the physical constraint expression for the equipment is: ; in, , Representing control variables respectively Physical lower bound vector and physical upper bound vector of the same dimension; Step S3022, the expression for the hard constraint of water quality compliance is, ; in, Reuse standards that represent the predicted values of key effluent indicators; Step S3023, the expression for the hydraulic balance reliability constraint is, ; ; in, Indicates the water level in the regulating tank. Indicates in The total volume of water entering the water within the time period. Indicated in the control vector The total amount of effluent processed within the same time period. This indicates the upper limit of the safe water level allowed in the regulating tank.
9. The energy-saving control method for greywater reuse based on edge computing as described in claim 8, characterized in that, Step S4: Solve the objective function using the particle swarm optimization algorithm to obtain the optimal control vector; Step S4 includes steps S401, S402, and S403; Step S401: Randomly generate a set of particles representing the control vector as the initial population, and denot it as the current population; Step S402: Perform iterative optimization on the current population until the termination condition is met, wherein each iteration includes: The fitness value is calculated for each particle in the current population. The calculation logic is as follows: decode the position of each particle into a control vector, substitute the control vector into the objective function, and calculate the fitness value. Based on the fitness values of all particles, update the individual historical best position of each particle and the global best position of the entire population. Based on the updated best positions, generate the next generation of population. Step S403: Set the next generation population as the new current population; When the iteration meets the termination condition, the iteration stops, and the final global optimal position of the population is decoded into the optimal control vector and output. The termination condition is that the change in the objective function value corresponding to the global optimal position of the population in G consecutive iterations is less than a preset threshold.
10. An edge computing-based energy-saving control system for greywater reuse, applied to the edge computing-based energy-saving control method for greywater reuse as described in any one of claims 1-9, characterized in that, It includes a feature module, a processing module, a construction module, and a control module; The feature module, based on water quality data, equipment data, environmental and load data, and hydraulic state data, constructs lag features, rolling statistical features, and weighted cross features; The processing module combines lag features, rolling statistical features, and weighted cross features into a multi-dimensional feature vector. The multi-dimensional feature vector is then input into the GRU model for processing, and the total energy consumption prediction value and the key water quality index prediction value of the effluent for the next 48 hours are output. The module constructs an objective function based on the predicted total energy consumption and the predicted key water quality indicators of the effluent for the next 48 hours. The control module uses a particle swarm optimization algorithm to solve the objective function and obtain the optimal control vector. The optimal control vector is then used to regulate the reuse of recycled water in an energy-saving manner.
Citation Information
Patent Citations
Data center computing power load demand combined prediction method and system considering PUE
CN115186803A
Sewage and wastewater treatment control system and method based on intelligent optimization algorithm
CN120561484A
Multi-objective optimization method and device for sewage treatment and storage medium
CN120725052A
Sewage recycling intelligent regulation and control method and system based on deep learning
CN120806537A
Reclaimed water reuse regulation and control method and system based on artificial intelligence and digital twinning
CN121073704A