A method and system for predicting and optimizing water quality energy consumption in sewage treatment process

By using the water cycle algorithm in the sewage treatment plant to optimize the Reformer and STGCN models, the effluent quality and energy consumption prediction model is constructed, which solves the problem of increased energy consumption in the sewage treatment plant and achieves more efficient energy consumption management and water quality control.

CN118192233BActive Publication Date: 2024-09-24HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410313805.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-18
Publication Date
2024-09-24
Estimated Expiration
2044-03-18

AI Technical Summary

Technical Problem

The energy consumption of sewage treatment plants is increasing and the level of intelligence is low, resulting in energy waste and high costs, especially in water circulation return systems and aeration systems.

Method used

The water cycle algorithm is used to optimize the Reformer and STGCN models, and the effluent quality and energy consumption prediction model is constructed. Variational mode decomposition and multi-objective water cycle algorithms are used for data processing and optimal control to improve the efficiency of the control process.

Benefits of technology

It effectively reduces the energy consumption of the sewage treatment plant, improves the accuracy of water quality monitoring and control, reduces energy waste, and reduces operating costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118192233B
    Figure CN118192233B
Patent Text Reader

Abstract

The present invention discloses a method and system for predicting and optimizing water quality and energy consumption in a sewage treatment process, which mainly include the following contents: collecting sewage data, using VMD filtering to select specific intrinsic mode functions for filtering processing, and removing interference signals within a specific frequency range; establishing Reformer and STGCN models for respectively predicting effluent water quality and energy consumption in the sewage treatment process, and using a water cycle algorithm to obtain optimal parameters to improve the prediction ability of the model. Establishing a multi-objective water cycle algorithm to optimize and control with effluent water quality and energy consumption as the targets. Compared with the prior art, the present invention uses Reformer and STGCN models for prediction, combines the advantages of the two prediction models, and uses a water cycle algorithm for optimization, so that the prediction results are more accurate. At the same time, with effluent water quality and energy consumption as the targets, the use of a multi-objective water cycle algorithm can effectively find a preferred solution and better optimize and control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the research field of sewage treatment process optimization control, and specifically relates to a method and system for predicting and optimizing water quality energy consumption in a sewage treatment process. Technical Background

[0002] Water shortage and serious water pollution are the key issues that plague water use in the world today. At present, although my country has a large total amount of water resources, it is limited by the total population of my country, resulting in a slightly insufficient per capita water resource allocation. To change this problem, we can save water on the one hand, and on the other hand, we must also make use of wastewater and sewage. In my country, sewage treatment is a very important link in the utilization of freshwater resources. There are many sewage treatment plants in my country, which greatly alleviates the water shortage in my country. However, there are also some problems with sewage treatment plants. With the continuous expansion of the scale of sewage treatment, the energy consumption of sewage treatment plants continues to increase. The low level of intelligence of sewage treatment plants leads to a large amount of energy waste and high costs. Among them, the energy consumed by the water circulation return system and the aeration system is the most critical, and sewage treatment plants are usually designed according to full load operation, which causes a lot of energy waste. In order to solve this problem, it is necessary to improve the intelligence level of sewage treatment plants, optimize the operation strategy of sewage treatment equipment, and reduce energy consumption.

[0003] The goal of sewage treatment is to make the treated water meet the quality standards while minimizing the energy consumed in the treatment process. Therefore, real-time monitoring of water quality during sewage treatment is crucial. Therefore, establishing a prediction model has become a feasible solution to the problem of effluent water quality monitoring. Many intelligent algorithms do not rely on mechanism models, can actively learn from existing data, and have strong nonlinear approximation capabilities. Therefore, they are widely used in sewage treatment system modeling and prediction research. Summary of the invention

[0004] Purpose of the invention: In view of the problems pointed out in the background technology, the present invention discloses a method and system for predicting and optimizing the water quality and energy consumption of sewage treatment process. The Reformer and STGCN models are optimized by water cycle algorithm, and the effluent water quality and energy consumption prediction model is constructed to enhance the utilization effect of control information and effectively improve the efficiency of the control process.

[0005] Technical solution: The present invention provides a method for predicting and optimizing water quality energy consumption in a sewage treatment process, and the steps are as follows:

[0006] Step 1: Obtain the effluent quality and energy consumption of the sewage treatment plant at different times and locations, as well as the influencing factors: dissolved oxygen and nitrate nitrogen;

[0007] Step 2: Process the acquired data, decompose the data using variational mode decomposition (VMD), and select a specific intrinsic mode function for filtering;

[0008] Step 3: Establish a water quality energy consumption prediction model for sewage treatment process based on Reformer and STGCN;

[0009] Step 4: Use the water cycle algorithm WCA to optimize the hyperparameters of Reformer and STGCN respectively to obtain the optimized water quality energy consumption prediction models of Reformer and STGCN;

[0010] Step 5: Send the processed test data to Reformer and STGCN for prediction, and obtain the prediction results of effluent water quality and energy consumption;

[0011] Step 6: Establish a multi-objective water cycle algorithm, and combine it with step 4 to obtain the water quality and energy consumption prediction model of Reformer and STGCN for optimization control.

[0012] Furthermore, step 2 uses VMD filtering to process the data, and the process is as follows:

[0013] Step 2.1: Use VMD to decompose the acquired data: effluent water quality, energy consumption, dissolved oxygen and nitrate nitrogen, and decompose the complex time series signals into multiple local frequency modes:

[0014] (1) Using Hilbert transform to calculate the analytical signals one by one;

[0015] (2) For each sub-component, adjust the spectrum to the corresponding baseband according to its center frequency;

[0016] (3) The signal is demodulated according to Gaussian smoothness, the frequency range of the decomposed mode is estimated, and a variational problem is constructed with the goal of minimizing the sum of the modal estimation bandwidth and the constraint that the sum of all modes is equal to the original signal. Its mathematical expression is as follows:

[0017]

[0018] u k and ω k represents the kth modal component and center frequency, δ(t) represents the unit impulse function, and f represents the input signal;

[0019] Step 2.2: Use filtering to remove the highest frequency waveform and the highest frequency decomposition mode.

[0020] Furthermore, the water quality energy consumption prediction model of the sewage treatment process based on Reformer and STGCN in step 3 is as follows:

[0021] Reformer uses local sensitive hashing (LSH) to reduce the processing complexity of long sequences and reversible residual layers. During backpropagation in Reformer, the input of each layer is recalculated on demand. This is achieved using reversible layers, where the activations from the last layer of the network are used to restore the activations from any intermediate layer, which is equivalent to running the network in reverse.

[0022] STGCN combines GRU and GCN to provide synchronous adhesion in space and time. First, the node feature table is convolved, and then the result is sent to GRU to extract the temporal features. The calculation formula of the reset gate, update gate, memory information and hidden state of the GRU part in STGCN is:

[0023]

[0024] Among them, f(A,X) represents the graph convolution operation on the input X. X∈R N×F Represents the feature matrix of the node, F represents the dimension of the node feature, W0∈R F×F Represents the weight matrix between the input layer and the hidden layer, where H represents the number of hidden units in the hidden layer, W1∈R H×T Represents the weight matrix between the hidden layer and the output layer, where T represents the size of the output layer and ReLU represents the activation function. To simplify the operation, f(A,X) is first concatenated with the hidden state and then multiplied by the weight, and a bias term is added.

[0025] Furthermore, the step 4 uses the water cycle algorithm to optimize the hyperparameters of Reformer and STGCN, and the hyperparameters include the learning rate of Reformer and the size and number of convolution kernels of STGCN.

[0026] Furthermore, the water cycle algorithm is used to optimize the learning rate of Reformer and the size and number of convolution kernels of STGCN, which specifically includes the following steps:

[0027] Step 4.1: Set the objective function of the water cycle algorithm as the error between the predicted value and the actual value of sewage quality and energy consumption and initialize the relevant parameters of the algorithm;

[0028] Step 4.2: During the initialization of the water cycle algorithm, an initial population is initialized. The population is a set of parameters, including the learning rate of Reformer and the size and number of convolution kernels of STGCN, called the rainfall layer. The rainfall layer consists of a large number of raindrop layers. Each layer of raindrops represents a set of separate solutions. Assuming that there are N layers of raindrops in the rainfall layer, an N×N matrix X can be generated. X can be generated using the following formula:

[0029] X=LB+rand(UB-LB)

[0030] In the above formula, UB represents the upper limit, LB represents the lower limit, and rand can generate random numbers between 0 and 1. The generated matrix X is as follows:

[0031]

[0032] Each raindrop in the rainfall layer has a corresponding fitness value, which is calculated by the objective function and can be expressed as follows:

[0033]

[0034] Among them, x represents the raindrops in each layer;

[0035] Step 4.3: Classify the raindrops in the rainfall layer according to the fitness value, where the best fitness value is set as the ocean, the second is set as the river, and the worst is set as the stream; the stream flows to the river or the ocean, and the number of streams flowing to the nth river or ocean is calculated by the following formula:

[0036]

[0037] Step 4.4: Calculate the flow distance of the stream and its new position. When the stream approaches the river, calculate and compare the fitness values ​​of the two. If the fitness value of the stream is better, then swap the positions of the stream and the river. Similarly, if the fitness value of the river is better than the ocean, then swap the positions of the two. The optimal solution is to have the river next to the ocean. The position update formula is as follows:

[0038]

[0039] Among them, X St , X Ri , X Sea They represent streams, rivers, and oceans respectively;

[0040] Step 4.5: When the river is very close to the ocean, the absolute value of the difference is less than a minimum value, indicating that the river has flowed into the ocean, d max The calculation formula is as follows:

[0041]

[0042] Among them, I max Represents the maximum number of iterations of the algorithm;

[0043] When the evaporation conditions are met, the rainfall stage begins, and the formula is as follows:

[0044]

[0045] When a newly formed stream flows directly into the ocean, it is expressed as follows:

[0046]

[0047] Where μ is a constant and randn is a random number that follows a normal distribution. After rainfall, water will re-enter the confluence process, and the algorithm will continue to cycle until the maximum number of iterations I is reached. max Stop calculation and get the optimal solution;

[0048] Step 4.6: Select a suitable ocean from the initial population as the output, that is, the optimal hyperparameters of the final model, and set the optimal solution obtained by the algorithm, that is, the optimal parameters of Reformer and STGCN, as the parameters of the model.

[0049] Furthermore, in step 5, the processed data is sent to Reformer and STGCN for prediction respectively, and the specific operations are as follows:

[0050] Step 5.1: Set the model parameters according to the parameters optimized in step 4.

[0051] Step 5.2: Send the test data filtered by VMD in step 2 to Reformer and STGCN for prediction respectively;

[0052] Step 5.3: Compare the prediction results of Reformer and STGCN with the true values ​​respectively to evaluate the prediction accuracy of the model.

[0053] Furthermore, the optimization control steps in step 6 are as follows:

[0054] Step 6.1: Use the Reformer and STGCN effluent quality and operation energy consumption prediction models established above as the optimization objective function;

[0055] Step 6.2: Based on the water cycle optimization algorithm, the crowding distance mechanism is introduced to construct a multi-objective water cycle algorithm; first, the fitness values ​​are sorted according to the calculated values ​​of a single objective function, and then the crowding distance between adjacent fitness values ​​is calculated. The clustered individuals are deleted according to the distance, so that the solutions are evenly distributed in the optimal solution set;

[0056] Step 6.3: Optimize the objective function using a multi-objective water cycle algorithm to find a set of optimal solutions, i.e., a set of multiple sets of dissolved oxygen and nitrate nitrogen concentrations;

[0057] Step 6.4: Select a suitable preferred solution from the obtained optimal solution set, that is, a set of suitable dissolved oxygen and nitrate nitrogen values, that is, select the solution with the lowest energy consumption when the water quality meets the standard as the preferred solution;

[0058] Step 6.5: Use the selected preferred solution as the set value of dissolved oxygen and nitrate nitrogen concentration of the bottom controller;

[0059] Step 6.6: By adjusting the dissolved oxygen coefficient and the internal recirculation volume, the dissolved oxygen concentration in the aerobic tank and the nitrate nitrogen concentration in the anaerobic tank can be adjusted to reduce energy consumption while the water quality meets the standards.

[0060] The present invention also discloses a device for predicting and optimizing the water quality and energy consumption in a sewage treatment process, comprising a data acquisition module, a data preprocessing module, a model prediction module and an optimization control design module;

[0061] Data collection module, to obtain the effluent quality and energy consumption of sewage treatment plants at different times and locations, as well as influencing factors: dissolved oxygen and nitrate nitrogen;

[0062] The data preprocessing module uses variational mode decomposition (VMD) to decompose data and improve the prediction accuracy of the model;

[0063] Model prediction module: Establish a wastewater treatment process prediction model based on Reformer and STGCN, obtain the optimal hyperparameters through the water cycle algorithm, and finally predict the wastewater data after data processing to obtain the final prediction results;

[0064] Optimize the control design module, establish a multi-objective water cycle algorithm, and combine the prediction model to perform optimal control with effluent water quality and energy consumption as the optimization targets.

[0065] Beneficial effects:

[0066] 1. The present invention uses variational mode decomposition (VMD) to decompose data and improve the prediction accuracy of the model.

[0067] 2. The present invention uses the water cycle algorithm to optimize the hyperparameters of the Reformer and STGCN models to make the prediction results of the models more accurate. The present invention uses the Reformer and STGCN models for prediction, effectively utilizing the advantages of the two models and improving the prediction accuracy of the models.

[0068] 3. Use multi-objective water circulation algorithm for optimization control, obtain parameter combinations, and improve optimization control capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 This is the sewage prediction and control structure diagram.

[0070] Figure 2 Flowchart of the water cycle algorithm.

[0071] Figure 3 Flowchart of the multi-objective water cycle algorithm. DETAILED DESCRIPTION

[0072] The present invention is further described in detail below with reference to the accompanying drawings.

[0073] The present invention provides a method and system for predicting and optimizing water quality and energy consumption in a sewage treatment process. Figures 1 to 3 As shown, the present invention includes four parts: data acquisition module, data preprocessing module, model prediction module and optimization control design module.

[0074] (1) Data collection, which is used to obtain data on the sewage treatment process, including water quality, energy consumption, dissolved oxygen concentration, and nitrate nitrogen concentration during the treatment process.

[0075] (2) Data preprocessing: use variational mode decomposition to decompose the data and perform filtering to improve the prediction accuracy of the model.

[0076] The VMD filter operates as follows:

[0077] 1) To obtain the one-way spectrum of each sub-component, the Hilbert transform is used to calculate its analytical signal one by one.

[0078] 2) For each sub-component, adjust the spectrum to the corresponding baseband according to its center frequency.

[0079] 3) Demodulate the signal according to Gaussian smoothness, estimate the frequency range of the decomposed mode, and construct a variational problem with the goal of minimizing the sum of the modal estimation bandwidth and the constraint that the sum of all modes is equal to the original signal. The mathematical expression is as follows:

[0080]

[0081] u k and ω k represents the kth modal component and center frequency, δ(t) represents the unit impulse function, and f represents the input signal.

[0082] 4) Remove the decomposition mode with the highest frequency.

[0083] (3) A sewage treatment process prediction model based on Reformer and STGCN is established, and the optimal hyperparameters are obtained through the water circulation algorithm to improve the prediction accuracy of the model. Finally, the sewage data after data processing is predicted to obtain the final prediction results.

[0084] Reformer uses Locality-Sensitive-Hashing (LSH) to reduce the processing complexity of long sequences and reversible residual layers to use available memory more efficiently. To solve the memory allocation problem in Informer, the input of each layer is recalculated on demand during back-propagation in Reformer instead of keeping it in memory. This is achieved using reversible layers, where the activations from the last layer of the network are used to restore the activations from any intermediate layer, which is equivalent to running the network in reverse.

[0085] STGCN combines GRU and GCN to provide synchronous adhesion in space and time. First, the node feature table is convolved, and then the result is sent to GRU to extract the temporal features. The calculation formula of the reset gate, update gate, memory information and hidden state of the GRU part in STGCN is:

[0086]

[0087] Among them, f(A,X) represents the graph convolution operation on the input X. X∈R N×F Represents the feature matrix of the node, F represents the dimension of the node feature, W0∈R F×F Represents the weight matrix between the input layer and the hidden layer, where H represents the number of hidden units in the hidden layer, W1∈R H×T Represents the weight matrix between the hidden layer and the output layer, where T represents the size of the output layer. ReLU represents the activation function. To simplify the operation, f(A,X) is first concatenated with the hidden state and then multiplied with the weight, and a bias term is added.

[0088] The water cycle algorithm is used to optimize the learning rate of Reformer and the size and number of convolution kernels of STGCN. The specific steps include the following:

[0089] Step 3.1: Set the objective function of the water cycle algorithm as the error between the predicted value and the actual value of sewage quality and energy consumption and initialize the relevant parameters of the algorithm.

[0090] Step 3.2: During the initialization of the water cycle algorithm, an initial population is initialized. The population is a set of parameters, including the learning rate of Reformer and the size and number of convolution kernels of STGCN, called the rainfall layer. The rainfall layer consists of a large number of raindrop layers. Each layer of raindrops represents a set of separate solutions. Assuming that there are N layers of raindrops in the rainfall layer, an N×N matrix X can be generated. X can be generated using the following formula:

[0091] X=LB+rand(UB-LB)

[0092] In the above formula, UB represents the upper limit, LB represents the lower limit, and rand can generate random numbers between 0 and 1. The generated matrix X is as follows:

[0093]

[0094] Each raindrop in the rainfall layer has a corresponding fitness value, which is calculated by the objective function and can be expressed as follows:

[0095]

[0096] Among them, x represents the raindrops in each layer.

[0097] Step 3.3: Classify the raindrops in the rainfall layer according to the fitness value, where the best fitness value is set as the ocean, the second is set as the river, and the worst is set as the stream; the stream flows to the river or the ocean, and the number of streams flowing to the nth river or ocean is calculated by the following formula:

[0098]

[0099] Step 3.4: Calculate the flow distance of the stream and its new position. When the stream approaches the river, calculate and compare the fitness values ​​of the two. If the fitness value of the stream is better, then swap the positions of the stream and the river. Similarly, if the fitness value of the river is better than the ocean, then swap the positions of the two. The optimal solution is to have the river next to the ocean. The position update formula is as follows:

[0100]

[0101] Among them, X St , X Ri , X Sea Representing streams, rivers and oceans respectively.

[0102] Step 3.5: When the river is very close to the ocean, the absolute value of the difference is less than a minimum value, indicating that the river has flowed into the ocean, d max The calculation formula is as follows:

[0103]

[0104] Among them, I max Represents the maximum number of iterations of the algorithm.

[0105] When the evaporation conditions are met, the rainfall stage begins, and the formula is as follows:

[0106]

[0107] When a newly formed stream flows directly into the ocean, it is expressed as follows:

[0108]

[0109] Where μ is a constant and randn is a random number that follows a normal distribution. After rainfall, water will re-enter the confluence process, and the algorithm will continue to cycle until the maximum number of iterations I is reached. max Stop the calculation and get the optimal solution.

[0110] Step 3.6: Select a suitable ocean from the initial population as the output, that is, the optimal hyperparameters of the final model, and set the optimal solution obtained by the algorithm, that is, the optimal parameters of Reformer and STGCN, as the parameters of the model.

[0111] The processed data is sent to Reformer and STGCN for prediction respectively. The specific operations are as follows:

[0112] Step 3.7: Set the parameters of the model according to the parameters optimized in step 3.6.

[0113] Step 3.8: Send the test data filtered by VMD to Reformer and STGCN for prediction.

[0114] Step 3.9: Compare the prediction results of Reformer and STGCN with the true values ​​respectively to evaluate the prediction accuracy of the model.

[0115] (4) Optimize the control design, establish a multi-objective water circulation algorithm, and combine the prediction model to optimize the control with effluent water quality and energy consumption as the optimization objectives.

[0116] Step 4.1: Use the effluent water quality and operation energy consumption prediction models of Reformer and STGCN established above as the optimization objective function;

[0117] Step 4.2: Based on the water cycle optimization algorithm, the crowding distance mechanism is introduced to construct a multi-objective water cycle algorithm; first, the fitness values ​​are sorted according to the calculated values ​​of a single objective function, and then the crowding distance between adjacent fitness values ​​is calculated. The clustered individuals are deleted according to the distance, so that the solutions are evenly distributed in the optimal solution set;

[0118] Step 4.3: Optimize the objective function using a multi-objective water cycle algorithm to find a set of optimal solutions, i.e., a set of multiple sets of dissolved oxygen and nitrate nitrogen concentrations;

[0119] Step 4.4: Select a suitable preferred solution from the obtained optimal solution set, that is, a set of suitable dissolved oxygen and nitrate nitrogen values, that is, select the solution with the lowest energy consumption when the water quality meets the standard as the preferred solution;

[0120] Step 4.5: Use the selected preferred solution as the set value of dissolved oxygen and nitrate nitrogen concentration of the bottom controller;

[0121] Step 4.6: By adjusting the dissolved oxygen coefficient and the internal recirculation volume, the dissolved oxygen concentration in the aerobic tank and the nitrate nitrogen concentration in the anaerobic tank can be adjusted to reduce energy consumption while the water quality meets the standards.

[0122] The present invention is not limited to the above-mentioned specific implementation cases. Within the knowledge scope of those skilled in the art, any equivalent replacement or change of the technical solution and the inventive concept according to the present invention should be included in the protection scope of the present invention.

Claims

1. A method for predicting and optimizing water quality energy consumption in a sewage treatment process, characterized in that: Here are the steps: Step 1: Obtain the effluent quality and energy consumption of the sewage treatment plant at different times and locations, as well as the influencing factors: dissolved oxygen and nitrate nitrogen; Step 2: Process the acquired data, decompose the data using variational mode decomposition (VMD), and select a specific intrinsic mode function for filtering; Step 3: Establish a water quality energy consumption prediction model for sewage treatment process based on Reformer and STGCN; The water quality energy consumption prediction model of the sewage treatment process based on Reformer and STGCN in step 3 is as follows: Reformer uses local sensitive hashing (LSH) to reduce the processing complexity of long sequences and reversible residual layers. During backpropagation in Reformer, the input of each layer is recalculated on demand. This is achieved using reversible layers, where the activations from the last layer of the network are used to restore the activations from any intermediate layer, which is equivalent to running the network in reverse. STGCN combines GRU and GCN to provide synchronous adhesion in space and time. First, the node feature table is convolved, and then the result is sent to GRU to extract the temporal features. The calculation formula of the reset gate, update gate, memory information and hidden state of the GRU part in STGCN is: Among them, f(A,X) represents the graph convolution operation on the input X. X∈R N×F Represents the feature matrix of the node, F represents the dimension of the node feature, W0∈R F×F Represents the weight matrix between the input layer and the hidden layer, where H represents the number of hidden units in the hidden layer, W1∈R H×T Represents the weight matrix between the hidden layer and the output layer, where T represents the size of the output layer, and ReLU represents the activation function. To simplify the operation, f(A,X) is first concatenated with the hidden state and then multiplied with the weight, and a bias term is added at the same time; Step 4: Use the water cycle algorithm WCA to optimize the hyperparameters of Reformer and STGCN respectively to obtain the optimized water quality energy consumption prediction models of Reformer and STGCN; the hyperparameters include the learning rate of Reformer and the size and number of convolution kernels of STGCN; The water cycle algorithm is used to optimize the learning rate of Reformer and the size and number of convolution kernels of STGCN. The specific steps include the following: Step 4.1: Set the objective function of the water cycle algorithm as the error between the predicted value and the actual value of sewage quality and energy consumption and initialize the relevant parameters of the algorithm; Step 4.2: During the initialization of the water cycle algorithm, an initial population is initialized. The population is a set of parameters, including the learning rate of Reformer and the size and number of convolution kernels of STGCN, called the rainfall layer. The rainfall layer consists of a large number of raindrop layers. Each layer of raindrops represents a set of separate solutions. Assuming that there are N layers of raindrops in the rainfall layer, an N×N matrix X can be generated. X can be generated using the following formula: X=LB+rand(UB-LB) In the above formula, UB represents the upper limit, LB represents the lower limit, and rand can generate random numbers between 0 and 1. The generated matrix X is as follows: Each raindrop in the rainfall layer has a corresponding fitness value, which is calculated by the objective function and can be expressed as follows: Among them, x represents the raindrops in each layer; Step 4.3: Classify the raindrops in the rainfall layer according to the fitness value, where the best fitness value is set as the ocean, the second is set as the river, and the worst is set as the stream; the stream flows to the river or the ocean, and the number of streams flowing to the nth river or ocean is calculated by the following formula: Step 4.4: Calculate the flow distance of the stream and its new position. When the stream approaches the river, calculate and compare the fitness values ​​of the two. If the fitness value of the stream is better, then swap the positions of the stream and the river. Similarly, if the fitness value of the river is better than the ocean, then swap the positions of the two. The optimal solution is to have the river next to the ocean. The position update formula is as follows: Among them, X St , X Ri , X Sea They represent streams, rivers, and oceans respectively; Step 4.5: When the river is very close to the ocean, the absolute value of the difference is less than a minimum value, indicating that the river has flowed into the ocean, d max The calculation formula is as follows: Among them, I max Represents the maximum number of iterations of the algorithm; When the evaporation conditions are met, the rainfall stage begins, and the formula is as follows: When a newly formed stream flows directly into the ocean, it is expressed as follows: Where μ is a constant and randn is a random number that follows a normal distribution. After rainfall, water will re-enter the confluence process, and the algorithm will continue to cycle until the maximum number of iterations I is reached. max Stop calculation and get the optimal solution; Step 4.6: Select a suitable ocean from the initial population as the output, i.e., the optimal hyperparameters of the final model, and set the optimal solution obtained by the algorithm, i.e., the optimal parameters of Reformer and STGCN, as the parameters of the model; Step 5: Send the processed test data to Reformer and STGCN for prediction, and obtain the prediction results of effluent water quality and energy consumption; Step 6: Establish a multi-objective water cycle algorithm, and combine the water quality and energy consumption prediction models of Reformer and STGCN obtained in step 4 for optimization control; Step 6.1: Use the water quality energy consumption prediction model of Reformer and STGCN optimized in step 4 as the optimization objective function; Step 6.2: Based on the water cycle optimization algorithm, the crowding distance mechanism is introduced to construct a multi-objective water cycle algorithm; first, the fitness values ​​are sorted according to the calculated values ​​of a single objective function, and then the crowding distance between adjacent fitness values ​​is calculated. The clustered individuals are deleted according to the distance, so that the solutions are evenly distributed in the optimal solution set; Step 6.3: Optimize the objective function using a multi-objective water cycle algorithm to find a set of optimal solutions, i.e., a set of multiple sets of dissolved oxygen and nitrate nitrogen concentrations; Step 6.4: Select a suitable preferred solution from the obtained optimal solution set, that is, a set of suitable dissolved oxygen and nitrate nitrogen values, that is, select the solution with the lowest energy consumption when the water quality meets the standard as the preferred solution; Step 6.5: Use the selected preferred solution as the set value of dissolved oxygen and nitrate nitrogen concentration of the bottom controller; Step 6.6: By adjusting the dissolved oxygen coefficient and the internal recirculation volume, the dissolved oxygen concentration in the aerobic tank and the nitrate nitrogen concentration in the anaerobic tank can be adjusted to reduce energy consumption while the water quality meets the standards.

2. A method for predicting and optimizing water quality energy consumption in a sewage treatment process according to claim 1, characterized in that: Step 2 uses VMD filtering to process the data. The process is as follows: Step 2.1: Use VMD to decompose the acquired data: effluent water quality, energy consumption, dissolved oxygen and nitrate nitrogen, and decompose the complex time series signals into multiple local frequency modes: (1) Using Hilbert transform to calculate the analytical signals one by one; (2) For each sub-component, adjust the spectrum to the corresponding baseband according to its center frequency; (3) The signal is demodulated according to Gaussian smoothness, the frequency range of the decomposed mode is estimated, and a variational problem is constructed with the goal of minimizing the sum of the modal estimation bandwidth and the constraint that the sum of all modes is equal to the original signal. Its mathematical expression is as follows: u k and ω k represents the kth modal component and center frequency, δ(t) represents the unit impulse function, and f represents the input signal; Step 2.2: Use filtering to remove the highest frequency waveform and the highest frequency decomposition mode.

3. The method for predicting and optimizing water quality and energy consumption in a sewage treatment process according to claim 1 is characterized in that: In step 5, the processed data is sent to Reformer and STGCN for prediction respectively. The specific operations are as follows: Step 5.1: Set the parameters of the model according to the parameters optimized in step 4; Step 5.2: Send the test data filtered by VMD to Reformer and STGCN for prediction respectively; Step 5.3: Compare the prediction results of Reformer and STGCN with the true values ​​respectively to evaluate the prediction accuracy of the model.

4. A system based on the method for predicting and optimizing the water quality and energy consumption of a sewage treatment process according to any one of claims 1 to 3, characterized in that: It includes data acquisition module, data preprocessing module, model prediction module and optimization control design module; Data collection module, to obtain the effluent quality and energy consumption of sewage treatment plants at different times and locations, as well as influencing factors: dissolved oxygen and nitrate nitrogen; The data preprocessing module uses variational mode decomposition (VMD) to decompose data and improve the prediction accuracy of the model; Model prediction module: Establish a wastewater treatment process prediction model based on Reformer and STGCN, obtain the optimal hyperparameters through the water cycle algorithm, and finally predict the wastewater data after data processing to obtain the final prediction results; Optimize the control design module, establish a multi-objective water cycle algorithm, and combine the prediction model to perform optimal control with effluent water quality and energy consumption as the optimization targets.