Method for realizing high-efficiency low-consumption micro-aerobic hydrolytic acidification of petrochemical wastewater by regulating and controlling aeration rate in combination with space-time diagram neural network and reinforced learning

By combining the space-time graph neural network and reinforcement learning to regulate aeration volume, the problem of poor oxygen concentration and flow regulation accuracy in microoxygen hydrolysis and acidification is solved, and the efficient and low-consumption treatment of petrochemical wastewater is achieved, and the treatment efficiency and stability are improved. At the same time, energy consumption is reduced.

CN119430460AActive Publication Date: 2025-02-14NANJING TONGFANG WATER CO LTD

Patent Information

Application Number
CN202411723733.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-02-14
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

The accuracy of oxygen concentration and flow rate regulation in the existing micro-oxygen hydrolysis and acidification technology leads to unstable processing efficiency and increases operating costs.

Method used

The aeration volume is regulated by combining spatiotemporal graph neural network (ST-GNN) and reinforcement learning (RL), and real-time optimization of aeration volume and stirring rate is achieved through dynamic modeling and prediction of key parameters in the reactor.

Benefits of technology

It improves the efficiency of micro-oxygen hydrolysis and acidification, stabilizes the process products, and reduces energy consumption while ensuring the treatment effect, and realizes intelligent and efficient management of the process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119430460A_ABST
    Figure CN119430460A_ABST
Patent Text Reader

Abstract

The invention discloses a method for realizing high-efficiency low-consumption micro-aerobic hydrolytic acidification of petrochemical wastewater by regulating and controlling the aeration rate in combination with a space-time diagram neural network and reinforced learning, and relates to a method for realizing high-efficiency low-consumption micro-aerobic hydrolytic acidification of petrochemical wastewater by regulating and controlling the aeration rate. The method comprises the following steps of: 1, collecting and cleaning data; 2, constructing a graph data set; 3, training the ST-GNN model; 4, constructing a deep Q reinforcement learning model; 5, the trained ST-GNN model is embedded into an automatic control system of a sewage treatment plant, and the model outputs the optimal aeration rate of the current time step and predicts the micro-aerobic hydrolytic acidification effect through interaction of the current working condition and historical data; and adjusting operation parameters of aeration equipment according to the output of the model, and carrying out hydrolytic acidification treatment. The method is high in regulation and control efficiency and low in operation error, and can be applied to the field of digital and intelligent management of sewage treatment plants.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for controlling aeration volume to realize high-efficiency, low-consumption micro-oxygen hydrolysis and acidification of petrochemical wastewater, belonging to the technical field of wastewater treatment processes. Background Art

[0002] Among the numerous petrochemical wastewater treatment technologies, biological wastewater treatment technology has the characteristics of low treatment cost and high treatment efficiency, and is the most promising treatment process for petrochemical wastewater treatment. However, due to the high toxicity and low biodegradability of petrochemical wastewater, it is usually necessary to pre-treat it with hydrolysis acidification and other technologies before biological treatment to improve the biodegradability of the wastewater. The role of hydrolysis acidification is to convert complex macromolecules that are difficult to degrade, such as aromatic hydrocarbons or heterocyclic substances, into biodegradable organic matter such as small molecular organic acids and alcohols. However, due to the very complex composition of petrochemical wastewater, the traditional hydrolysis acidification process has limited treatment effect on petrochemical wastewater, and cannot effectively improve the biodegradability of wastewater, which in turn limits the subsequent further treatment of petrochemical wastewater.

[0003] Microaerobic hydrolysis and acidification refers to the introduction of trace oxygen in the hydrolysis and acidification process to increase the metabolic activity of relevant functional microorganisms, thereby promoting the hydrolysis and acidification efficiency of organic matter. However, the regulation of this process is extremely complex, and precise control of oxygen concentration and flow rate is crucial. On the one hand, sufficient oxygen needs to be provided to promote microbial activity, and on the other hand, excessive oxygen must be avoided to inhibit the function of anaerobic microorganisms. In addition, the uniform distribution of dissolved oxygen in the reactor also directly affects the maintenance of the microaerobic state, increasing the complexity of the process. Traditional control methods mainly rely on empirical settings or fixed operating parameters, lack the ability to flexibly respond to changes in process parameters and real-time data, and are difficult to adapt to the dynamic changes in wastewater composition and environmental conditions. This rigid control strategy may not only lead to uneven distribution of dissolved oxygen and imbalance of microbial communities, but also increase operating costs, which in turn leads to unstable treatment efficiency and affects the final effect of hydrolysis and acidification. Summary of the invention

[0004] The present invention aims to solve the technical problems of poor accuracy of oxygen concentration and flow control and unstable treatment efficiency in the existing micro-oxygen hydrolysis and acidification, and provides a method for realizing high-efficiency and low-consumption micro-oxygen hydrolysis and acidification of petrochemical wastewater by combining spatiotemporal graph neural network and reinforcement learning to control aeration volume. By combining the method of combining ST-GNN and reinforcement learning, the physical and chemical parameter control in the micro-oxygen hydrolysis and acidification process is optimized. Through the dynamic modeling and prediction of key parameters (dissolved oxygen, pH, VFA concentration, etc.) in the reactor by ST-GNN, accurate environmental state information is provided for reinforcement learning, and then the real-time optimization of operations such as aeration volume and stirring rate is realized. The ultimate goal is to improve the efficiency of micro-oxygen hydrolysis and acidification, stabilize the process products, and reduce energy consumption under the premise of ensuring the treatment effect, so as to realize the intelligent and efficient management of the micro-oxygen hydrolysis and acidification process.

[0005] The present invention combines spatiotemporal graph neural network and reinforcement learning to control aeration volume to achieve efficient and low-consumption micro-oxygen hydrolysis and acidification of petrochemical wastewater, wherein the treatment system includes a data collection module, a machine learning module and an aeration control module. By integrating the above modules, machine learning technology is used to dynamically adjust the aeration volume in the sewage treatment process to optimize the treatment efficiency and energy consumption, thereby realizing an intelligent and automated sewage treatment aeration control system. The system can not only improve sewage treatment efficiency and reduce energy consumption, but also can be flexibly adjusted according to actual conditions, and has high practical value and promotion prospects. In addition, the design of the system also takes into account ease of use and maintainability, ensuring stable operation under various working conditions, and providing a modern sewage treatment plant with an efficient and economical technical solution.

[0006] The method of the present invention, which combines the spatiotemporal graph neural network and reinforcement learning to control the aeration amount to achieve high-efficiency and low-consumption micro-oxygen hydrolysis and acidification of petrochemical wastewater, is carried out in the following steps:

[0007] 1. Data Collection and Cleaning

[0008] (1) Monitoring points and sensors for monitoring and collecting data are set in the hydrolysis acidification tank to monitor and collect process parameters of the water inlet, water outlet, and intermediate reaction zone in the hydrolysis acidification tank, wherein the process parameters are dissolved oxygen concentration, sewage flow rate and flow, inlet BOD5 concentration, effluent BOD5 concentration, inlet COD concentration, effluent COD concentration, ammonia nitrogen concentration, temperature, pH value, VFA concentration, aeration volume, and stirring rate; the time nodes for data monitoring and collection are: data are collected every 10 to 15 minutes under normal working conditions, and every 1 to 2 minutes when the aeration and stirring equipment is turned on or off; data are collected every 1 to 2 minutes when there is a significant fluctuation in temperature, pH or dissolved oxygen parameters; wherein a significant fluctuation refers to a parameter value change of more than 20%; to ensure that the dynamic characteristics of the system are captured in detail;

[0009] (2) After data collection, the data of each process parameter are cleaned through regression analysis. The cleaned data are scaled by Z-score standardization or minimum-maximum standardization to ensure that data of different dimensions are operated on the same scale; for data with normal distribution characteristics, Z-score standardization is used to standardize the data to a distribution with a mean of 0 and a standard deviation of 1; for data with skewed distribution, minimum-maximum standardization is used to scale the data to the range of [0,1]; such standardized data not only improves the efficiency of model training, but also enhances the accuracy of prediction;

[0010] (3) Introduce the LSTM-Autoencoder model based on time series to identify outliers in multidimensional data. The standard of abnormality is that the value of each parameter deviates from the normal fluctuation range by more than 2 standard deviations. This step combines multi-sensor data fusion to enhance the identification and elimination of outliers.

[0011] (4) Combined with density-based spatial clustering, a noise algorithm was used to perform cluster analysis on dissolved oxygen concentration, sewage flow rate and flow, inlet BOD5 concentration, effluent BOD5 concentration, inlet COD concentration, effluent COD concentration, ammonia nitrogen concentration, temperature, pH value, VFA concentration, aeration volume, and stirring rate. The abnormal standard was 3 times the standard deviation of the group density. Outliers were identified and eliminated, and the process parameter data most directly related to the aeration volume were screened out.

[0012] (5) The processed multi-dimensional process parameter data is used to construct nodes of a spatiotemporal graph, where each node represents a parameter value at a specific location and time, and edges are used to represent the interaction relationship between these process parameters. The edge weight calculation is based on the correlation and causal relationship between the process parameters to quantitatively reflect the influence intensity between the process parameters;

[0013] 2. Building a Graph Dataset

[0014] (1) The cleaned process parameters are used as nodes to input into the graph model. Each node represents a specific process parameter. These nodes have time series characteristics. The Pearson correlation coefficient between each node is calculated through correlation analysis to identify the basic linear relationship between the parameters. For the node pairs with a correlation coefficient greater than 0.7, it is preliminarily determined that they have a direct association. Kernel principal component analysis (kernel PCA) is used to extract the nonlinear characteristics between the parameters, reduce the dimension of the multidimensional data and retain the main features, so as to identify the potential nonlinear interaction relationship between the process parameters, which helps to simplify the model structure and highlight the key features. Kernel ridge regression is used to construct the edge eigenvalues ​​of node pairs with more complex nonlinear relationships, and further quantify the nonlinear interaction relationship of these node pairs. Through these steps, a static graph structure with edge eigenvalues ​​is formed, in which the eigenvalue of each edge reflects the strength of the interaction between the node pairs.

[0015] (2) By combining historical operation data, the data snapshots of each time step are arranged in chronological order, and the graph structure of each time step is generated to form a dynamic graph dataset constructed according to the time series, thereby capturing the dynamic change characteristics of the system;

[0016] (3) The final dynamic graph dataset is input into the ST-GNN model in time series for training. The graph convolution layer of ST-GNN aggregates the features of each node with the features of its neighboring nodes to extract the global spatial information of the node and capture the complex interactions and long-distance dependencies between nodes through multi-layer convolution. After that, the temporal convolution layer performs time series processing on the aggregated node features to capture the dynamic change trend of each process parameter over time. After graph convolution and time convolution processing, the ST-GNN model outputs a comprehensive representation of each node, integrating the spatiotemporal information of the node to reflect the dynamic state of the node under different working conditions.

[0017] 3. Training of ST-GNN Model

[0018] (1) The constructed graph dataset is input into the ST-GNN model for training; the ST-GNN model contains a 3-5 layer graph convolutional network structure. Through each layer of convolution operation, the spatial relationship and global information between process parameters are extracted; through multi-layer graph convolution, the model can capture the long-distance dependency between different process parameters.

[0019] (2) The ST-GCN model is lightweighted by using pruning and quantization model compression techniques. The steps of lightweight processing are: first, set the weight threshold to 0.01, retain the weight connections with weights higher than 0.01, and remove the connections with weights less than 0.01, thereby reducing the number of redundant parameters; at the same time, the entire convolutional layer is evaluated in combination with the structured pruning method, and the channels or nodes with low contribution are removed, and the pruning ratio is set to 20%-40%; the redundant or low-importance parameters in the convolutional layer are removed by the pruning strategy to reduce the model calculation amount and storage requirements and ensure that the model accuracy is not affected as much as possible; then, the quantization technology is used to convert the 32-bit floating point number into an 8-bit integer representation, thereby greatly reducing the storage requirements of the model and accelerating the reasoning process; finally, the attention mechanism is introduced in the graph convolution layer, so that the model can dynamically identify and focus on the nodes and edges with the strongest correlation with the target parameters, and give priority to calculating the relationship with the greatest impact on the target output, further improving the computational efficiency; the ST-GCN model can be optimized by the above model compression techniques to reduce computational complexity and improve computational efficiency;

[0020] (3) The five-fold cross-validation method is used to evaluate the generalization performance of the model. The specific operation is: the graph dataset is divided into five subsets, one subset is selected as the validation set each time, and the remaining subsets are used as the training set. The model is trained iteratively to ensure the prediction accuracy of the model under different working conditions. The prediction accuracy is the mean absolute error (MAE) controlled within 5%, the mean square error (MSE) controlled within 10%, and the root mean square error (RMSE) controlled within 6%. This operation avoids overfitting and enhances the adaptability of the model to unknown working conditions. At the same time, in the process of model training, the attention mechanism or the visualization of important features is combined to identify the process parameters and their interactions that have the greatest impact on the prediction results, so as to enhance the interpretability of the model.

[0021] (4) During the training process, a multi-objective loss function with COD removal rate and VFA production as the main targets is used to optimize the prediction accuracy of the ST-GNN model, where the loss function includes the prediction accuracy of the micro-oxygen hydrolysis acidification effect (COD removal rate, VFA production) and the accuracy of aeration volume control; the prediction accuracy of the model for the micro-oxygen hydrolysis acidification effect is measured by the mean square error (MSE), and the MSE is controlled within 5%; and the difference between the aeration volume predicted by the model and the actual optimal aeration volume is evaluated. The difference should be controlled within ±3% to ensure the accuracy of aeration volume control; during the training process, if the error indicators are all within the set range, the subsequent steps are continued to complete the training; if the error exceeds the range, the model parameters are adjusted or the number of training iterations is increased until the error returns to the appropriate range; by optimizing these errors, precise control of the aeration system and stable micro-oxygen hydrolysis acidification effect are achieved;

[0022] (5) An adaptive weight adjustment mechanism is introduced. Two initial weight parameters are set in the loss function, corresponding to VFA production and aeration energy consumption respectively, and the two weights are dynamically adjusted according to the real-time status of the system, so as to achieve the optimization goal under different working conditions. When it is detected that the system energy consumption is high, the adaptive mechanism will automatically increase the weight of the aeration energy consumption item, so that the model will give priority to reducing energy consumption. When the VFA production is insufficient, the system will increase the weight of the VFA production item to ensure that the production meets the demand. Through this mechanism, the model can dynamically balance VFA production and energy consumption under different working conditions, achieve optimization effects, and ensure the stability and efficiency of system operation.

[0023] 4. Build a deep Q reinforcement learning model:

[0024] (1) Based on the output of the ST-GNN model, a deep Q learning model is constructed. That is, the physical and chemical parameters predicted by the ST-GNN model, such as dissolved oxygen concentration, pH value, temperature, VFA concentration, and influent flow rate, as well as the current operating parameters, such as aeration volume and stirring rate, are imported into the deep Q learning model as state inputs;

[0025] (2) Use principal component analysis (PCA), t-SNE or autoencoder to reduce the dimensionality of the high-dimensional state space and extract the most representative process parameter features to reduce the complexity of the state space and accelerate the training convergence of the model;

[0026] (3) According to the optimization objectives, multiple groups of reward functions are set and trained for different objectives of maximizing VFA production and minimizing aeration energy consumption;

[0027] (4) The deep Q learning model tests and optimizes its strategy under different working conditions through multiple iterations to meet the optimization goal. The standard for achieving optimization completion is that when the reward value remains convergent in several consecutive iterations, and the VFA production and energy consumption indicators are stable within the preset threshold, it means that the strategy has been optimized. Through this training, the energy consumption of the aeration process is reduced while the acid production efficiency is improved, achieving more economical operation.

[0028] 5. Real-time control of aeration volume

[0029] (1) The trained ST-GNN model is embedded in the automatic control system of the sewage treatment plant. The process parameter data is obtained in real time through the sensor network and input into the ST-GNN model. The model uses the interaction between the current working conditions and historical data to output the optimal aeration volume at the current time step and the prediction of the micro-aerobic hydrolysis acidification effect;

[0030] (2) According to the output of the ST-GNN model, the operating parameters of the aeration equipment, blower power and aeration time, are adjusted to achieve real-time control;

[0031] (3) The system simultaneously records the COD removal rate and VFA production of the hydrolysis and acidification effect indicators after each adjustment, and inputs these new process parameter data into the model again to achieve closed-loop control and dynamically optimize the aeration volume. At the same time, the system integrates emergency control strategies. When an abnormal condition is detected, the preset emergency control strategy is automatically activated to stabilize the process until the reinforcement learning model converges again, thereby achieving efficient and low-consumption micro-oxygen hydrolysis and acidification of petrochemical wastewater.

[0032] Furthermore, in step 1 (1), the sensors are calibrated and maintained regularly, and redundant monitoring points are set up, that is, 3 to 5 sensors are deployed at key locations for data cross-validation and anomaly detection to improve data accuracy and reduce the impact of sensor failures.

[0033] Furthermore, the specific method of data cleaning described in step 1 (2) is as follows: first, the regression model is used to detect outliers on the collected data to identify and remove invalid or erroneous data points that exceed the normal fluctuation range; the cleaning standard is to use 3 times the standard deviation as the threshold to eliminate data points that deviate from the mean beyond this range, thereby reducing noise and anomalies in the data; for missing data points, interpolation or filling the mean of the previous and next data is used to fill them in, so as to avoid the discontinuity of the data affecting the stability and continuity of the model.

[0034] Furthermore, the method for screening the parameters most directly related to the aeration volume described in step 1 (4) is: first, the correlation between each process parameter and the aeration volume is evaluated by the Pearson correlation coefficient and the mutual information method, and the parameters with a correlation coefficient greater than 0.7 with the aeration volume are retained to ensure that they have a strong influence on the prediction of the aeration volume; then, the Granger causal analysis model is used to determine the causal effect of the parameters on the aeration volume, and noise data is excluded. The standard for noise data is: the p value of the Granger causal test is greater than 0.05, at which time the causal relationship is not significant; or the residual distribution of the parameter deviates from the normal distribution, and the residual variance is higher than twice the average variance of the data set; finally, the parameters with a direct causal effect on the aeration volume are retained; then, by analyzing the fluctuation range of different parameters, the coefficient of variation CV (Coefficient The coefficient of variation (CV) is used to quantitatively express the volatility, and its calculation formula is: CV = μ / σ, where σ is the standard deviation of the parameter and μ is the mean of the parameter; parameters with a coefficient of variation greater than 0.15 are selected, indicating that they are more sensitive to the dynamic changes of the system; at the same time, by analyzing the power spectral density (PSD) of the parameters, parameters with an energy share of more than 30% in the high-frequency band of >0.1 Hz are selected to ensure that the model has a strong response ability during dynamic regulation; finally, parameters that can be monitored in real time by sensors are retained first to ensure the operability and feedback speed of the model in the real-time control process; this step is based on the screening principles of correlation analysis, causal relationship analysis, parameter volatility and real-time monitorability to find the parameters most directly related to the aeration volume.

[0035] Furthermore, the specific calculation method of the edge weight described in step 1 (5) is as follows:

[0036] ① Correlation analysis: First, the Pearson correlation coefficient of each process parameter pair is calculated to identify the strength of the linear relationship between the parameters; for parameter pairs with a correlation coefficient greater than 0.7, a higher edge weight is assigned to reflect their direct correlation under normal operating conditions; this method helps to preliminarily screen out parameters that may have a greater impact on aeration volume control;

[0037] ②Causal relationship analysis: Use Granger causality test to perform causal relationship analysis on parameter pairs to identify which parameter changes have direct causal effects on other parameters in time; For causal relationship pairs with significant test results, increase their edge weights to ensure that the space-time graph can capture the causal relationship between key control variables and outcome variables when modeling; This method is suitable for determining process variables that have a direct impact on the two key parameters of aeration volume and dissolved oxygen concentration;

[0038] ③ Dynamic Time Warping (DTW) distance: The DTW method is used to measure the pattern similarity between parameters in time series, which is particularly suitable for capturing the synchronization of parameters in complex and dynamic reaction environments; parameter pairs with smaller DTW distances (i.e., parameter pairs with high time series pattern similarity) will obtain higher edge weights to reflect their importance in the dynamic regulation of the system;

[0039] ④Finally, the edge weight will be calculated by weighted fusion of the results of the above three methods. The weight calculation formula is: edge weight = α·correlation weight + β·causal weight + γ·DTW distance weight; where α, β, and γ are the weight coefficients of each method respectively; the edge weight obtained in this way can not only reflect the linear relationship and causal effect between the parameters, but also capture their synchronization in time, so as to achieve accurate dynamic control of the aeration volume;

[0040] Furthermore, the adaptive adjustment described in step three (5) is achieved through gradient change or specific threshold control, that is, the gradient change of the loss function in each round of training is monitored, and if the gradient of the VFA output is lower than the preset threshold, its weight is automatically increased; if the gradient change of the energy consumption item exceeds the threshold, the weight of the energy consumption item is increased.

[0041] Furthermore, in step 4, principal component analysis (PCA) is used for linear dimensionality reduction to retain the main characteristic components; t-SNE is used for visualization and dimensionality reduction of nonlinear data to map high-dimensional data to low-dimensional space; the autoencoder automatically learns compact low-dimensional representations through neural networks to retain key features; after dimensionality reduction, the complexity of the state space is reduced, thereby accelerating the training convergence of the deep Q learning model;

[0042] Furthermore, the abnormal condition described in step 4 is a sudden change in influent water quality, equipment failure or sludge poisoning.

[0043] The method of the present invention for combining spatiotemporal graph neural network and reinforcement learning to control aeration volume to achieve high-efficiency and low-consumption micro-oxygen hydrolysis and acidification of petrochemical wastewater can also evaluate the accuracy and stability of the model. The specific method is: by comparing the process parameter data before and after ST-GNN regulation, including aeration volume, energy consumption, and hydrolysis and acidification effect, the use efficiency of aeration volume under different regulation strategies is monitored, the power consumption of the aeration system before and after regulation is evaluated, and the optimization range of energy consumption is determined; the influence of the ST-GNN regulation strategy on the sewage treatment effect is evaluated by indicators such as COD removal rate and VFA production; scenario simulation and emergency event testing of operating conditions with different influent COD, temperature changes, and flow changes are added to ensure the adaptability and robustness of the model in a variety of actual scenarios; the traditional aeration volume control strategy is introduced as a control group, and a cross-validation method is used to regularly compare and test it with the ST-GNN+RL model to clarify the advantages and disadvantages of the model under different working conditions, and quantify the improvement range of energy saving efficiency and acid production effect.

[0044] The method of the present invention for combining spatiotemporal graph neural network and reinforcement learning to control aeration amount to achieve high-efficiency and low-consumption micro-oxygen hydrolysis and acidification of petrochemical wastewater can also update the model and adjust parameters. The specific method is: during the operation, new process parameter data is continuously collected and incorporated into the graph data set, and the ST-GNN model is regularly retrained to improve its prediction and control performance under different working conditions; the model update cycle is set according to the frequency of working condition changes and water quality requirements, and is updated once a month or quarterly; during the model update process, grid search and Bayesian optimization methods are used to automatically find the optimal parameter combination of the loss function by adjusting the weight parameters in the loss function, thereby achieving the best balance point between the micro-oxygen hydrolysis and acidification effect and the aeration energy consumption; at the same time, the feedback information in the operation results is used to analyze the deviation between the model output and the actual effect, and then optimize the structure and training strategy of the ST-GNN model to further improve the accuracy and stability of the control.

[0045] The technical method proposed in the present invention can make full use of the modeling ability of graph neural networks, capture the complex relationships between process parameters, and realize real-time adaptive control of the aeration volume of sewage treatment plants. Through multi-objective optimization, this method can reduce aeration energy consumption while maintaining the micro-aerobic hydrolysis and acidification effect, thereby achieving more economical and environmentally friendly sewage treatment. In addition, the scheme is flexible and scalable, and can realize adaptive control under a variety of sewage treatment conditions, providing sewage treatment plants with an intelligent and automated control method. The flow chart of the method of the present invention is as follows Figure 1 As shown, the beneficial effects are mainly:

[0046] (1) Dynamically construct graph datasets to capture complex relationships

[0047] Different from traditional feature extraction methods, this method uses nonlinear feature extraction methods such as kernel PCA and kernel ridge regression to establish more accurate parameter association relationships. At the same time, the dynamic graph structure is introduced so that the model can dynamically adjust the structure and weight of the graph according to new data to reflect real-time working conditions. In addition, the dynamic graph structure can better adapt to the complexity and variability of the micro-aerobic hydrolysis acidification process, capture the nonlinear interaction between parameters, provide richer spatiotemporal feature information for the ST-GNN model, improve the model's prediction performance and adaptability to process changes, and achieve more accurate aeration volume control to optimize the micro-aerobic hydrolysis acidification effect.

[0048] (2) Model lightweighting and real-time enhancement

[0049] ST-GNN is lightweighted through model compression technology (knowledge distillation, pruning, quantization, etc.) to reduce the computational burden of the model, so that the system can quickly make control decisions when the working conditions change, ensuring that key parameters such as aeration volume can be adjusted in time, avoiding control lags, and improving the efficiency and stability of sewage treatment.

[0050] (3) Real-time online learning to dynamically control aeration volume

[0051] Through state space dimension reduction, adaptive reward function and online learning strategy, the learning ability of ST-GNN model is enhanced, so that it can flexibly respond to multi-objective optimization (increasing VFA production and reducing energy consumption) and operating condition changes, and accelerate convergence in high-dimensional state space. It can be updated in real time according to the changes in actual operating conditions, and the control strategy can be dynamically adjusted, so that the micro-aerobic hydrolysis acidification process can achieve higher acid production efficiency and lower energy consumption while meeting the target requirements. The adaptive optimization of the model makes the system more intelligent and improves the operating efficiency of the overall process.

[0052] (4) Integrated emergency control strategy to improve system stability

[0053] This method introduces an emergency control strategy. When an abnormal condition is detected (sudden change in inlet water quality, equipment failure), the machine learning system can automatically enable the preset emergency strategy, so that it can still maintain a stable process effect in the event of an emergency, reducing the negative impact on water quality and system performance, and ensuring the stable operation of the process.

[0054] (5) Multi-dimensional evaluation to improve system performance

[0055] Through scenario simulation, benchmark comparison test and automated hyperparameter optimization technology (Bayesian optimization, genetic algorithm), the performance of the model is evaluated and optimized in multiple dimensions, so that ST-GNN and reinforcement learning models can continuously learn and adapt to different working conditions, so that the model can be continuously fine-tuned during the update cycle to ensure that efficient prediction and control performance is maintained under the background of changing working conditions. Automated optimization improves the operating efficiency and reliability of the system, and provides a strong guarantee for the intelligent and refined management of sewage treatment.

[0056] (6) Closed-loop control to achieve dynamic optimization

[0057] Closed-loop control obtains process parameters in real time through sensors, inputs them into the ST-GNN model for prediction, and adjusts the operating parameters of the aeration equipment in real time according to the prediction results. The adjusted process parameters are input into the model again each time, ensuring the dynamic adaptability of the system and making the aeration volume more accurately controlled. This dynamic optimization can not only improve the acid production efficiency of hydrolysis acidification, but also effectively reduce energy consumption, achieving a win-win situation for economic and environmental benefits.

[0058] (7) Multi-sensor dynamic monitoring integration improves data quality

[0059] By strengthening the maintenance and redundant arrangement of sensors, combined with regular calibration and cross-validation of multi-sensor data, the accuracy and stability of data are ensured. At the same time, the data sampling frequency is dynamically adjusted to adapt to changes in system status, which can effectively reduce the impact of sensor errors and data drift, improve the model's real-time monitoring capabilities for the sewage treatment process, and ensure the timeliness and accuracy of the control strategy.

[0060] (8) Multi-level data cleaning improves model accuracy

[0061] By introducing a multi-level data cleaning method based on regression analysis, density-based spatial clustering, and noise and time series anomaly detection models, the ability to identify and eliminate outliers in complex multidimensional data is improved, the integrity and accuracy of the data are ensured, a high-quality data foundation is provided for subsequent modeling, and the noise in the model input is reduced, thereby improving the model training efficiency and prediction accuracy.

[0062] (9) Intelligent prediction and control to reduce errors caused by human intervention

[0063] Through the intelligent prediction and control of ST-GNN, the aeration control of sewage treatment plants can be automated, reducing the reliance on manual experience and intervention. This not only improves the control efficiency, but also reduces the risk of human operation errors, which helps to realize the digital and intelligent management of sewage treatment plants. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1is a flow chart of the steps of the method of the present invention;

[0065] Figure 2 This is a graph of the test results of the water quality prediction model in Example 1. DETAILED DESCRIPTION

[0066] The following experiments were performed to verify the beneficial effects of the present invention.

[0067] Example 1: This example takes a specific hydrolysis acidification tank as an example, and combines the spatiotemporal graph neural network and reinforcement learning to control the aeration volume to achieve a method for high-efficiency and low-consumption micro-oxygen hydrolysis acidification of petrochemical wastewater, and is carried out in the following steps:

[0068] 1. Data Collection and Cleaning

[0069] (1) Monitoring points and sensors for monitoring and collecting data are set up in the hydrolysis acidification tank to monitor and collect process parameters of the water inlet, water outlet and intermediate reaction zone in the hydrolysis acidification tank, where the process parameters are dissolved oxygen concentration, sewage flow rate and flow, inlet BOD5 concentration, outlet BOD5 concentration, inlet COD concentration, outlet COD concentration, ammonia nitrogen concentration, temperature, pH value, VFA concentration, aeration volume and stirring rate; three sensors are deployed at key positions of the water inlet, water outlet and intermediate reaction zone in the hydrolysis acidification tank for data cross-validation and anomaly detection to improve data accuracy and reduce the impact of sensor failure; the time nodes for data monitoring and collection are: data is collected every 10 minutes under normal working conditions, and every 1 minute when the aeration and stirring equipment is turned on or off; data is collected every 2 minutes when there is a significant fluctuation in temperature, pH or dissolved oxygen parameters; where a significant fluctuation refers to a parameter value change of more than 20%; to ensure that the dynamic characteristics of the system are captured in detail;

[0070] (2) After data collection, the data of each process parameter are cleaned by regression analysis. The specific cleaning methods are as follows: First, the regression model is used to detect outliers on the collected data to identify and remove invalid or erroneous data points that exceed the normal fluctuation range; the cleaning standard is to use 3 times the standard deviation as the threshold to eliminate data points that deviate from the mean beyond this range, thereby reducing noise and anomalies in the data; for missing data points, interpolation or filling the mean of the previous and next data is used to fill them in to avoid the discontinuity of the data affecting the stability and continuity of the model; the cleaned data are scaled by Z-score standardization or minimum-maximum standardization to ensure that data of different dimensions are operated on the same scale; for data with normal distribution characteristics, Z-score standardization is used to normalize the data to a distribution with a mean of 0 and a standard deviation of 1; for data with skewed distribution, minimum-maximum standardization is used to scale the data to the range of [0,1]; the standardized data not only improves the efficiency of model training, but also enhances the accuracy of prediction;

[0071] (3) Introduce the LSTM-Autoencoder model based on time series to identify outliers in multidimensional data. The standard of abnormality is that the value of each parameter deviates from the normal fluctuation range by more than 2 standard deviations. This step combines multi-sensor data fusion to enhance the identification and elimination of outliers.

[0072] (4) Combined with density-based spatial clustering, a noise algorithm was used to perform cluster analysis on dissolved oxygen concentration, sewage flow rate and flow, organic matter concentration, inlet COD concentration, effluent COD concentration, ammonia nitrogen concentration, temperature, pH value, VFA concentration, aeration volume, and stirring rate. The abnormal standard was 3 times the standard deviation of the group density. Outliers were identified and eliminated, and the process parameter data most directly related to the aeration volume were screened out. The method for screening the parameters most directly related to the aeration volume was as follows: First, the correlation between each process parameter and the aeration volume was evaluated by the Pearson correlation coefficient and mutual information method. The parameters with correlation coefficients greater than 0.7 with aeration volume are retained to ensure that they have a strong influence on the prediction of aeration volume. Then, the Granger causality test analysis model is combined to determine the causal effect of the parameters on the aeration volume, and the noise data is excluded. The standard of the noise data is to exclude it by setting a range of more than 3 standard deviations from the mean or an outlier threshold, and retain the parameters with direct causal effects. Then, by analyzing the fluctuation range of different parameters, the parameters that are sensitive to the dynamic changes of the system are selected. The sensitivity is quantified by calculating the standard deviation or coefficient of variation (CV) of the parameters. The parameters with a coefficient of variation (CV) greater than 0.3 (i.e., the degree of fluctuation is 20% or more of the mean) are preferred to ensure the responsiveness of the model during dynamic regulation. Finally, the parameters that can be monitored in real time by sensors are retained to ensure the operability and feedback speed of the model in the real-time control process. This step is based on the screening principles of correlation analysis, causal relationship analysis, parameter volatility and real-time monitorability to find the parameters most directly related to the aeration volume.

[0073] (5) The processed multidimensional process parameter data are used to construct nodes of a spatiotemporal graph, where the process parameter data are dissolved oxygen level, sewage flow, influent BOD5 concentration, effluent BOD5 concentration, influent COD concentration, effluent COD concentration, ammonia nitrogen concentration, temperature, pH value, and VFA concentration. Each node represents a parameter value at a specific location and time, and edges are used to represent the interaction relationship between these process parameters. The edge weight calculation is based on the correlation and causal relationship between the process parameters to quantitatively reflect the impact intensity between the process parameters. The specific calculation method of the edge weight is as follows:

[0074] ① Correlation analysis: First, the Pearson correlation coefficient of each process parameter pair is calculated to identify the strength of the linear relationship between the parameters; for parameter pairs with a correlation coefficient greater than 0.7, a higher edge weight is assigned to reflect their direct correlation under normal operating conditions; this method helps to preliminarily screen out parameters that may have a greater impact on aeration volume control;

[0075] ②Causal relationship analysis: Use Granger causality test to perform causal relationship analysis on parameter pairs to identify parameters whose changes have direct causal effects on other parameters in time; For causal relationship pairs with significant test results, increase their edge weights to ensure that the space-time graph can capture the causal relationship between key control variables and outcome variables when modeling; This method is suitable for determining process variables that have a direct impact on the two key parameters of aeration volume and dissolved oxygen concentration;

[0076] ③ Dynamic Time Warping (DTW) distance: The DTW method is used to measure the pattern similarity between parameters in time series, which is particularly suitable for capturing the synchronization of parameters in complex and dynamic reaction environments; parameter pairs with smaller DTW distances (i.e., parameter pairs with high time series pattern similarity) will obtain higher edge weights to reflect their importance in the dynamic regulation of the system;

[0077] ④Finally, the edge weight will be calculated by weighted fusion of the results of the above three methods. The weight calculation formula is: edge weight = α·correlation weight + β·causal weight + γ·DTW distance weight; where α, β, and γ are the weight coefficients of each method respectively; the edge weight obtained in this way can not only reflect the linear relationship and causal effect between the parameters, but also capture their synchronization in time, so as to achieve accurate dynamic control of the aeration volume;

[0078] 2. Building a Graph Dataset

[0079] The cleaned process parameters are used as nodes to input the graph model. Each node represents a specific process parameter, such as dissolved oxygen, sewage flow rate, and COD concentration. These nodes have time series characteristics. The specific steps are:

[0080] (1) The Pearson correlation coefficient between each node is calculated through correlation analysis to identify the basic linear relationship between parameters. For node pairs with a correlation coefficient greater than 0.7, it is preliminarily determined that there is a direct correlation;

[0081] (2) Kernel principal component analysis (kernel PCA) is applied to extract nonlinear features between parameters, reduce the dimensionality of multidimensional data and retain the main features, thereby identifying the potential nonlinear interactions of process parameters, which helps to simplify the model structure and highlight the key features;

[0082] (3) Kernel ridge regression is used to construct edge eigenvalues ​​of node pairs with more complex nonlinear relationships, and further quantify the nonlinear interaction relationships of these node pairs. Through these steps, a static graph structure with edge eigenvalues ​​is formed, where the eigenvalue of each edge reflects the strength of the interaction between node pairs.

[0083] (4) By combining historical operation data, a dynamic graph dataset is constructed according to the time series, and the data snapshots of each time step are arranged in chronological order to generate a graph structure for each time step, thereby capturing the dynamic change characteristics of the system;

[0084] (5) The final dynamic graph dataset is input into the ST-GNN model in time series for training. The graph convolution layer of ST-GNN aggregates the features of each node with the features of its neighboring nodes to extract the global spatial information of the node and capture the complex interactions and long-distance dependencies between nodes through multi-layer convolution. After that, the temporal convolution layer performs time series processing on the aggregated node features to capture the dynamic change trend of each process parameter over time. After graph convolution and time convolution processing, the ST-GNN model outputs a comprehensive representation of each node, integrating the spatiotemporal information of the node to reflect the dynamic state of the node under different working conditions.

[0085] 3. Training of ST-GNN Model

[0086] (1) The constructed graph dataset is input into the ST-GNN model for training; the ST-GNN model contains a 5-layer graph convolutional network structure. Through each layer of convolution operation, the complex spatial relationship and global information between process parameters are extracted; through multi-layer graph convolution, the model can capture the long-distance dependency between different process parameters.

[0087] (2) Simultaneously, model compression techniques such as pruning and quantization are used to lightweight the ST-GCN model. The specific lightweight processing steps are as follows: using pruning strategies to remove redundant or low-importance parameters in the convolutional layer, reducing the model's computational complexity and storage requirements based on weight size or structured pruning methods, and ensuring that the model accuracy is not affected as much as possible; using quantization technology to convert 32-bit floating-point numbers into 8-bit integer representations, thereby greatly reducing the model's storage requirements and accelerating the inference process; finally, introducing an attention mechanism in the graph convolutional layer, so that the model can dynamically identify and focus on the nodes and edges that are most closely associated with the target parameters, and prioritize the calculation of the relationships that have the greatest impact on the target output, further improving the computational efficiency; the above model compression techniques can be used to optimize the ST-GCN model to reduce computational complexity and improve computational efficiency.

[0088] (3) In order to evaluate the generalization performance of the model, a five-fold cross-validation method was used to divide the graph dataset into five subsets. One subset was selected as the validation set each time, and the remaining subsets were used as the training set. The model was trained iteratively to ensure the prediction accuracy of the model under different working conditions. The prediction accuracy was controlled within 5% for the mean absolute error (MAE), 10% for the mean square error (MSE), and 6% for the root mean square error (RMSE) to avoid overfitting and enhance the adaptability of the model to unknown working conditions. At the same time, during the model training process, the attention mechanism or the visualization of important features was combined to identify the process parameters and their interactions that have the greatest impact on the prediction results, so as to enhance the interpretability of the model.

[0089] (4) During the training process, a multi-objective loss function with COD removal rate and VFA production as the main objective loss function is used to optimize the prediction accuracy of the ST-GNN model, where the loss function includes the prediction accuracy of COD removal rate and VFA production of micro-aerobic hydrolysis and acidification effect, as well as the accuracy of aeration volume control; the prediction accuracy of the model for micro-aerobic hydrolysis and acidification effect is measured by the mean square error (MSE), and the MSE is controlled within 5%; and the difference between the aeration volume predicted by the model and the actual optimal aeration volume is evaluated. The difference should be controlled within ±3% to ensure the accuracy of aeration volume control; if the error indicators are all within the set range, the subsequent steps are continued to complete the training; if they are out of the range, the model parameters need to be adjusted or the number of training iterations needs to be increased until the error returns to the appropriate range; by optimizing these errors, precise control of the aeration system and stable micro-aerobic hydrolysis and acidification effect can be achieved;

[0090] (5) An adaptive weight adjustment mechanism is introduced. Two initial weight parameters are set in the loss function, corresponding to VFA production and aeration energy consumption respectively, and the two weights are dynamically adjusted according to the real-time status of the system, so as to achieve the optimization goal under different working conditions. When it is detected that the system energy consumption is high, the adaptive mechanism will automatically increase the weight of the aeration energy consumption item, so that the model will give priority to reducing energy consumption. When the VFA production is insufficient, the system will increase the weight of the VFA production item to ensure that the production meets the demand. The adaptive adjustment is achieved through gradient changes or specific threshold control: the gradient change of the loss function in each round of training is monitored. If the gradient of the VFA production is lower than the preset threshold, its weight is automatically increased. If the gradient change of the energy consumption item exceeds the threshold, the weight of the energy consumption item is increased. Through this mechanism, the model can dynamically balance the VFA production and energy consumption under different working conditions, achieve optimization effects, and ensure the stability and efficiency of the system operation.

[0091] 4. Building a Deep Q Reinforcement Learning Model

[0092] (1) Based on the output of the ST-GNN model, a deep Q learning model was constructed. The physical and chemical parameters predicted by the ST-GNN model (dissolved oxygen concentration, pH value, temperature, VFA concentration, influent flow rate) and the current operating parameters (aeration volume, stirring rate) were used as state inputs and imported into the deep Q learning model.

[0093] (2) To reduce the complexity of the state space, principal component analysis (PCA), t-SNE or autoencoder is used to reduce the dimensionality of the high-dimensional state space and extract the most representative process parameter features, thereby accelerating the training convergence of the model; principal component analysis (PCA) is used for linear dimensionality reduction to retain the main characteristic components; t-SNE is suitable for the visualization and dimensionality reduction of nonlinear data, mapping high-dimensional data to low-dimensional space; autoencoders automatically learn compact low-dimensional representations through neural networks to retain key features; after dimensionality reduction, the complexity of the state space is reduced, thereby accelerating the training convergence of the deep Q learning model;

[0094] (3) According to the optimization objectives, multiple groups of reward functions are set and trained for different objectives of maximizing VFA production and minimizing aeration energy consumption;

[0095] (4) The deep Q learning model tests and optimizes its strategy under different working conditions through multiple iterations to meet the optimization goal. The standard for achieving optimization completion is that when the reward value remains convergent in several consecutive iterations, and the VFA production and energy consumption indicators are stable within the preset threshold, it means that the strategy has been optimized; through this training, it is ultimately possible to improve the acid production efficiency while reducing the energy consumption in the aeration process, achieving more economical operation;

[0096] 5. Real-time control of aeration volume

[0097] (1) The trained ST-GNN model is embedded in the automatic control system of the sewage treatment plant. The process parameter data (dissolved oxygen, COD, temperature, flow rate, pH value, VFA concentration and stirring rate) are obtained in real time through the sensor network and input into the ST-GNN model. The model uses the interaction between the current working conditions and historical data to output the optimal aeration volume at the current time step and the prediction of the micro-aerobic hydrolysis acidification effect;

[0098] (2) According to the output of the ST-GNN model, the operating parameters of the aeration equipment, namely the blower power and aeration time, are adjusted to achieve real-time control;

[0099] (3) The system simultaneously records the COD removal rate and VFA production of the hydrolysis and acidification effect indicators after each adjustment, and inputs these new process parameter data into the model again to achieve closed-loop control and dynamically optimize the aeration volume; at the same time, the system integrates emergency control strategies. When abnormal conditions are detected, such as sudden changes in influent water quality, equipment failure, and sludge poisoning, the preset emergency control strategy is automatically activated to stabilize the process until the reinforcement learning model converges again, thereby achieving efficient and low-consumption micro-oxygen hydrolysis and acidification of petrochemical wastewater.

[0100] The comparison of the BOD prediction curve of the ST-GNN model in step 5 of this embodiment 1 and the measured BOD curve of the hydrolysis acidification tank is shown in the figure below: Figure 2 As shown by Figure 2 It can be seen that the prediction curve (red dotted line) of the ST-GNN model is highly consistent with the measured curve (black solid line), especially in the fluctuation trend of BOD5 concentration, which can better follow the changes in the measured data, indicating that the ST-GNN model has high accuracy in capturing the dynamic changes of BOD5 concentration in the hydrolysis acidification tank. Even in the large fluctuation range of BOD5 concentration (such as the serial number representing the moment is between 50 and 150), the prediction curve can still effectively track the ups and downs of the measured curve, indicating that the model has good generalization ability and stability.

[0101] In the method of "combining spatiotemporal graph neural network and reinforcement learning to control aeration volume to achieve high-efficiency and low-consumption micro-oxygen hydrolysis and acidification of petrochemical wastewater" of this embodiment, "high efficiency and low consumption" is specifically reflected in the following indicators: the target of COD removal rate is maintained at more than 90%, and the degradation effect of organic pollutants is reflected by improving the COD removal rate to achieve "high efficiency" treatment; VFA production, by increasing the volatile fatty acid (VFA) production to measure the acid production efficiency, further improve the treatment effect; aeration energy consumption, by controlling the aeration volume and aeration time, the energy consumption per unit COD removal or VFA production is minimized, and the goal is to reduce the aeration energy consumption to less than 80% of the traditional method, so as to achieve the "low consumption" requirement; operating cost, comprehensively considering the energy consumption of equipment and the use of reagents, so as to reduce the operating cost by 20% to 30%. These indicators jointly ensure that the system maintains the "low consumption" goal of low energy consumption and low cost while achieving the "high efficiency" of high COD removal rate and high VFA production, so as to achieve high efficiency and low consumption micro-oxygen hydrolysis and acidification treatment of petrochemical wastewater.

[0102] The model accuracy and stability evaluation method of this embodiment is: by comparing the process parameter data before and after ST-GNN regulation, including aeration volume, energy consumption, hydrolysis acidification effect, etc., monitoring the efficiency of aeration volume under different regulation strategies, evaluating the power consumption of the aeration system before and after regulation, and determining the optimization range of energy consumption, in addition, evaluating the impact of ST-GNN regulation strategy on sewage treatment effect through indicators such as COD removal rate and VFA production. Add more simulations of working condition changes (different influent COD, temperature changes, flow changes) and emergency tests to ensure the adaptability and robustness of the model in a variety of actual scenarios. Introduce the traditional aeration volume control strategy as the control group, use the cross-validation method, and regularly compare and test it with the ST-GNN+RL model to clarify the advantages and disadvantages of the model under different working conditions, and quantify the improvement of energy saving efficiency and acid production effect.

[0103] The specific method of updating the model and adjusting the parameters of the present embodiment is: during the operation, continuously collect new process parameter data and incorporate it into the graph data set, and regularly retrain the ST-GNN model to improve its prediction and control performance under different working conditions. The model update cycle can be set according to the frequency of working condition changes and water quality requirements, such as updating once a month or every quarter. During the model update process, grid search, Bayesian optimization and other methods are used to automatically find the optimal parameter combination of the loss function by adjusting the weight parameters in the loss function, so as to achieve the best balance between the micro-oxygen hydrolysis acidification effect and the aeration energy consumption. At the same time, the feedback information in the operation results is used to analyze the deviation between the model output and the actual effect, and then optimize the structure and training strategy of the ST-GNN model to further improve the accuracy and stability of the regulation.

[0104] The spatiotemporal graph neural network (ST-GNN) has powerful spatiotemporal data modeling capabilities and can learn and predict the complex spatiotemporal relationships between various parameters in the wastewater treatment process. By analyzing historical operation data and real-time monitoring data, ST-GNN can build a dynamic interaction model of the physical and chemical parameters inside the reactor, capturing the changing trends of key parameters such as oxygen concentration, flow, temperature, pH value, COD concentration, etc. Using this model, the optimal oxygen supply and flow rate under different operating conditions can be accurately predicted, so that the system can adjust the operating parameters (oxygen supply and flow rate) in real time to ensure that the reactor always operates under the best conditions.

[0105] The combination of reinforcement learning and ST-GNN can further realize the intelligent regulation of the micro-aerobic hydrolysis acidification process. By introducing reinforcement learning, the system can gradually learn the optimal regulation strategy under different environmental conditions based on the prediction of ST-GNN, and realize the dynamic optimization of oxygen supply. RL can continuously adjust the aeration volume and flow rate according to real-time monitoring data and target optimization requirements (maximizing organic acid production, reducing COD, etc.) to adapt to changes in wastewater composition and environmental conditions, ensuring high efficiency of the treatment process and optimal effluent quality. This intelligent regulation strategy based on ST-GNN and reinforcement learning can not only significantly reduce operating costs, but also improve the stability of treatment efficiency.

[0106] This embodiment realizes the automation, intelligent and refined control of the micro-oxygen hydrolysis acidification process by introducing ST-GNN and RL. Compared with the traditional rigid control method, the control system based on ST-GNN can quickly respond to real-time data changes, dynamically adjust process parameters, and reduce energy consumption. At the same time, the machine learning model can adapt to petrochemical wastewater of different components and concentrations through continuous learning and updating, and realize efficient treatment of complex wastewater. Therefore, the development of a micro-oxygen hydrolysis acidification control system integrating spatiotemporal graph neural network can not only significantly improve the efficiency and stability of wastewater treatment, but also effectively reduce energy and operating costs, providing an innovation for petrochemical wastewater treatment.

Claims

1. A method for achieving high-efficiency and low-consumption micro-oxygen hydrolysis and acidification of petrochemical wastewater by combining spatiotemporal graph neural network and reinforcement learning to control aeration volume, characterized in that The method proceeds as follows:

1. Data Collection and Cleaning (1) Monitoring points and sensors for monitoring and collecting data are set in the hydrolysis acidification tank to monitor and collect process parameters of the water inlet, water outlet, and intermediate reaction zone in the hydrolysis acidification tank, wherein the process parameters are dissolved oxygen concentration, sewage flow rate and flow, inlet BOD5 concentration, outlet BOD5 concentration, inlet COD concentration, outlet COD concentration, ammonia nitrogen concentration, temperature, pH value, VFA concentration, aeration volume, and stirring rate; the time nodes for data monitoring and collection are: data are collected every 10 to 15 minutes under normal working conditions, and every 1 to 2 minutes when the aeration and stirring equipment is turned on or off; data are collected every 1 to 2 minutes when the temperature, pH or dissolved oxygen parameters fluctuate significantly; wherein significant fluctuation refers to a parameter value change of more than 20%; To ensure that the dynamic characteristics of the system are captured in detail; (2) After data collection, the data of each process parameter are cleaned through regression analysis. The cleaned data are scaled by Z-score standardization or minimum-maximum standardization to ensure that data of different dimensions are operated on the same scale; for data with normal distribution characteristics, Z-score standardization is used to standardize the data to a distribution with a mean of 0 and a standard deviation of 1; for data with skewed distribution, minimum-maximum standardization is used to scale the data to the range of [0,1]; such standardized data not only improves the efficiency of model training, but also enhances the accuracy of prediction; (3) Introduce the LSTM-Autoencoder model based on time series to identify outliers in multidimensional data. The standard of abnormality is that the value of each parameter deviates from the normal fluctuation range by more than 2 standard deviations. This step combines multi-sensor data fusion to enhance the identification and elimination of outliers. (4) Combined with density-based spatial clustering, a noise algorithm was used to perform cluster analysis on dissolved oxygen concentration, sewage flow rate and flow, inlet BOD5 concentration, effluent BOD5 concentration, inlet COD concentration, effluent COD concentration, ammonia nitrogen concentration, temperature, pH value, VFA concentration, aeration volume, and stirring rate. The abnormal standard was 3 times the standard deviation of the group density. Outliers were identified and eliminated, and the process parameter data most directly related to the aeration volume were screened out. (5) The processed multi-dimensional process parameter data is used to construct nodes of a spatiotemporal graph, where each node represents a parameter value at a specific location and time, and edges are used to represent the interaction relationship between these process parameters. The edge weight calculation is based on the correlation and causal relationship between the process parameters to quantitatively reflect the influence intensity between the process parameters; 2. Building a Graph Dataset (1) The cleaned process parameters are used as nodes to input into the graph model. Each node represents a specific process parameter. These nodes have time series characteristics. The Pearson correlation coefficient between each node is calculated through correlation analysis to identify the basic linear relationship between the parameters. For the node pairs with a correlation coefficient greater than 0.7, it is preliminarily determined that there is a direct association. Kernel principal component analysis is used to extract the nonlinear characteristics between the parameters, reduce the dimension of the multidimensional data and retain the main features, so as to identify the potential nonlinear interaction relationship between the process parameters, which helps to simplify the model structure and highlight the key features. Kernel ridge regression is used to construct the edge eigenvalues ​​of node pairs with more complex nonlinear relationships, and further quantify the nonlinear interaction relationship of these node pairs. Through these steps, a static graph structure with edge eigenvalues ​​is formed, in which the eigenvalue of each edge reflects the strength of the interaction between the node pairs. (2) By combining historical operation data, the data snapshots of each time step are arranged in chronological order, and the graph structure of each time step is generated to form a dynamic graph dataset constructed according to the time series, thereby capturing the dynamic change characteristics of the system; (3) The final dynamic graph dataset is input into the ST-GNN model in time series for training. The graph convolution layer of ST-GNN aggregates the features of each node with the features of its neighboring nodes to extract the global spatial information of the node and capture the complex interactions and long-distance dependencies between nodes through multi-layer convolution. After that, the temporal convolution layer performs time series processing on the aggregated node features to capture the dynamic change trend of each process parameter over time. After graph convolution and time convolution processing, the ST-GNN model outputs a comprehensive representation of each node, integrating the spatiotemporal information of the node to reflect the dynamic state of the node under different working conditions.

3. Training of ST-GNN Model (1) The constructed graph dataset is input into the ST-GNN model for training; the ST-GNN model contains a 3-5 layer graph convolutional network structure. Through each layer of convolution operation, the spatial relationship and global information between process parameters are extracted; through multi-layer graph convolution, the model can capture the long-distance dependency between different process parameters. (2) The ST-GCN model is lightweighted by using pruning and quantization model compression techniques. The lightweight processing steps are as follows: first, the weight threshold is set to 0.01, the weight connections with weights higher than 0.01 are retained, and the connections with weights less than 0.01 are removed, thereby reducing the number of redundant parameters; at the same time, the entire convolutional layer is evaluated in combination with the structured pruning method, and the channels or nodes with low contribution are removed, and the pruning ratio is set to 20% to 40%; the redundant or low-importance parameters in the convolutional layer are removed by the pruning strategy to reduce the model calculation amount and storage requirements and ensure that the model accuracy is not affected as much as possible; then, the quantization technology is used to convert the 32-bit floating point number into an 8-bit integer representation, thereby greatly reducing the storage requirements of the model and accelerating the reasoning process; finally, the attention mechanism is introduced in the graph convolution layer, so that the model can dynamically identify and focus on the nodes and edges with the strongest correlation with the target parameters, and give priority to calculating the relationship with the greatest impact on the target output, further improving the computational efficiency; the ST-GCN model can be optimized by the above model compression techniques to reduce computational complexity and improve computational efficiency; (3) The five-fold cross-validation method is used to evaluate the generalization performance of the model. The specific operation is: the graph data set is divided into five subsets, one subset is selected as the validation set each time, and the remaining subsets are used as the training set. The model is trained iteratively to ensure the prediction accuracy of the model under different working conditions. The prediction accuracy is controlled within 5% for the mean absolute error, 10% for the mean square error, and 6% for the root mean square error. This operation avoids overfitting and enhances the adaptability of the model to unknown working conditions. At the same time, in the process of model training, the attention mechanism or the visualization of important features is combined to identify the process parameters and their interactions that have the greatest impact on the prediction results, so as to enhance the interpretability of the model. (4) During the training process, a multi-objective loss function with COD removal rate and VFA production as the main objectives is used to optimize the prediction accuracy of the ST-GNN model, where the loss function includes the prediction accuracy of the micro-oxygen hydrolysis acidification effect and the accuracy of aeration volume control; the prediction accuracy of the model for the micro-oxygen hydrolysis acidification effect is measured by the mean square error, and the MSE is controlled within 5%; and the difference between the aeration volume predicted by the model and the actual optimal aeration volume is evaluated. The difference should be controlled within ±3% to ensure the accuracy of aeration volume control; during the training process, if the error indicators are all within the set range, the subsequent steps are continued to complete the training; if the error exceeds the range, the model parameters are adjusted or the number of training iterations is increased until the error returns to the appropriate range; by optimizing these errors, precise control of the aeration system and stable micro-oxygen hydrolysis acidification effect are achieved; (5) An adaptive weight adjustment mechanism is introduced. Two initial weight parameters are set in the loss function, corresponding to VFA production and aeration energy consumption respectively, and the two weights are dynamically adjusted according to the real-time status of the system, so as to achieve the optimization goal under different working conditions. When it is detected that the system energy consumption is high, the adaptive mechanism will automatically increase the weight of the aeration energy consumption item, so that the model will give priority to reducing energy consumption. When the VFA production is insufficient, the system will increase the weight of the VFA production item to ensure that the production meets the demand. Through this mechanism, the model can dynamically balance VFA production and energy consumption under different working conditions, achieve optimization effects, and ensure the stability and efficiency of system operation.

4. Building a Deep Q Reinforcement Learning Model: (1) Based on the output of the ST-GNN model, a deep Q learning model is constructed. That is, the physical and chemical parameters predicted by the ST-GNN model, such as dissolved oxygen concentration, pH value, temperature, VFA concentration, and influent flow rate, as well as the current operating parameters, such as aeration volume and stirring rate, are imported into the deep Q learning model as state inputs; (2) Use principal component analysis, t-SNE or autoencoder to reduce the dimensionality of the high-dimensional state space and extract the most representative process parameter features to reduce the complexity of the state space and accelerate the training convergence of the model; (3) According to the optimization objectives, multiple groups of reward functions are set and trained for different objectives of maximizing VFA production and minimizing aeration energy consumption; (4) The deep Q learning model tests and optimizes its strategy under different working conditions through multiple iterations to meet the optimization goal. The standard for achieving optimization completion is that when the reward value remains convergent in several consecutive iterations, and the VFA production and energy consumption indicators are stable within the preset threshold, it means that the strategy has been optimized. Through this training, it is ultimately possible to improve the acid production efficiency while reducing the energy consumption in the aeration process, achieving more economical operation.

5. Real-time control of aeration volume (1) The trained ST-GNN model is embedded in the automatic control system of the sewage treatment plant. The process parameter data is obtained in real time through the sensor network and input into the ST-GNN model. The model uses the interaction between the current working conditions and historical data to output the optimal aeration volume at the current time step and the prediction of the micro-aerobic hydrolysis acidification effect; (2) According to the output of the ST-GNN model, the operating parameters of the aeration equipment, blower power and aeration time, are adjusted to achieve real-time control; (3) The system simultaneously records the COD removal rate and VFA production of the hydrolysis and acidification effect indicators after each adjustment, and inputs these new process parameter data into the model again to achieve closed-loop control and dynamically optimize the aeration volume. At the same time, the system integrates emergency control strategies. When an abnormal condition is detected, the preset emergency control strategy is automatically activated to stabilize the process until the reinforcement learning model converges again, thereby achieving efficient and low-consumption micro-oxygen hydrolysis and acidification of petrochemical wastewater.

2. The method for controlling aeration volume by combining spatiotemporal graph neural network and reinforcement learning to realize efficient and low-consumption micro-oxygen hydrolysis and acidification of petrochemical wastewater according to claim 1 is characterized in that: In step 1 (1), sensors are calibrated and maintained regularly, and redundant monitoring points are set up, that is, 3 to 5 sensors are deployed at key locations for data cross-validation and anomaly detection to improve data accuracy and reduce the impact of sensor failures.

3. The method for realizing high-efficiency and low-consumption micro-oxygen hydrolysis and acidification of petrochemical wastewater by combining spatiotemporal graph neural network and reinforcement learning to control aeration volume according to claim 1 or 2, characterized in that: The specific method of data cleaning described in step 1 (2) is as follows: first, the regression model is used to perform outlier detection on the collected data to identify and remove invalid or erroneous data points that exceed the normal fluctuation range; the cleaning standard is to use 3 times the standard deviation as the threshold, and remove data points that deviate from the mean beyond this range, thereby reducing noise and anomalies in the data; For missing data points, interpolation or the mean filling method of the previous and next data is used to fill them in to avoid the discontinuity of the data affecting the stability and continuity of the model.

4. The method for realizing high-efficiency and low-consumption micro-oxygen hydrolysis and acidification of petrochemical wastewater by combining spatiotemporal graph neural network and reinforcement learning to control aeration volume according to claim 1 or 2, characterized in that: The method for screening the parameters most directly related to the aeration volume described in step 1 (4) is: first, evaluate the correlation between each process parameter and the aeration volume by using the Pearson correlation coefficient and mutual information method, and retain the parameters with a correlation coefficient greater than 0.7 with the aeration volume to ensure that they have a strong influence on the prediction of the aeration volume; then, combine the Granger causal analysis model to determine the causal effect of the parameters on the aeration volume, and exclude noise data. The standard for noise data is: the p value of the Granger causality test is greater than 0.05, at which time the causal relationship is not significant; or the residual distribution of the parameter deviates from the normal distribution, and the residual variance is higher than twice the average variance of the data set; finally, retain the parameters that have a direct causal effect on the aeration volume; then, by analyzing the fluctuation range of different parameters, the coefficient of variation CV (Coefficient The coefficient of variation (CV) is used to quantitatively express the volatility, and its calculation formula is: CV = μ / σ, where σ is the standard deviation of the parameter and μ is the mean of the parameter; parameters with a coefficient of variation greater than 0.15 are selected, indicating that they are more sensitive to the dynamic changes of the system; at the same time, by analyzing the power spectral density (PSD) of the parameters, parameters with an energy share of more than 30% in the high-frequency band of >0.1 Hz are selected to ensure that the model has a strong response ability during dynamic regulation; finally, parameters that can be monitored in real time by sensors are retained first to ensure the operability and feedback speed of the model in the real-time control process; this step is based on the screening principles of correlation analysis, causal relationship analysis, parameter volatility and real-time monitorability to find the parameters most directly related to the aeration volume.

5. The method for realizing high-efficiency and low-consumption micro-oxygen hydrolysis and acidification of petrochemical wastewater by combining spatiotemporal graph neural network and reinforcement learning to control aeration volume according to claim 1 or 2, characterized in that: The specific calculation method of the edge weight described in step 1 (5) is as follows: ① Correlation analysis: First, the Pearson correlation coefficient of each process parameter pair is calculated to identify the strength of the linear relationship between the parameters; for parameter pairs with a correlation coefficient greater than 0.7, a higher edge weight is assigned to reflect their direct correlation under normal operating conditions; this method helps to preliminarily screen out parameters that may have a greater impact on aeration volume control; ②Causal relationship analysis: Use Granger causality test to perform causal relationship analysis on parameter pairs, and identify parameters whose changes have direct causal effects on other parameters in time; for causal relationship pairs with significant test results, increase their edge weights to ensure that the space-time graph can capture the causal relationship between key control variables and outcome variables when modeling; This method is suitable for determining process variables that have a direct impact on two key parameters: aeration rate and dissolved oxygen concentration; ③ Dynamic Time Warping (DTW) distance: The DTW method is used to measure the pattern similarity between parameters in time series, which is particularly suitable for capturing the synchronization of parameters in complex and dynamic reaction environments; parameter pairs with smaller DTW distances (i.e., parameter pairs with high time series pattern similarity) will obtain higher edge weights to reflect their importance in the dynamic regulation of the system; ④Finally, the edge weight will be calculated by weighted fusion of the results of the above three methods. The weight calculation formula is: edge weight = α·correlation weight + β·causality weight + γ·DTW distance weight; where α, β, and γ are the weight coefficients of each method respectively; the edge weight obtained in this way can not only reflect the linear relationship and causal effect between the parameters, but also capture their synchronization in time, thereby realizing accurate dynamic control of the aeration volume.

6. The method for realizing high-efficiency and low-consumption micro-oxygen hydrolysis and acidification of petrochemical wastewater by combining spatiotemporal graph neural network and reinforcement learning to control aeration volume according to claim 1 or 2, characterized in that: The adaptive adjustment described in step three (5) is achieved through gradient change or specific threshold control, that is, the gradient change of the loss function in each round of training is monitored. If the gradient of VFA output is lower than the preset threshold, its weight is automatically increased; if the gradient change of the energy consumption item exceeds the threshold, the weight of the energy consumption item is increased.

7. The method for realizing high-efficiency and low-consumption micro-oxygen hydrolysis and acidification of petrochemical wastewater by combining spatiotemporal graph neural network and reinforcement learning to control aeration volume according to claim 1 or 2, characterized in that: In step 4, principal component analysis is used for linear dimensionality reduction to retain the main characteristic components; t-SNE is used for visualization and dimensionality reduction of nonlinear data to map high-dimensional data to low-dimensional space; the autoencoder automatically learns compact low-dimensional representations through neural networks to retain key features; after dimensionality reduction, the complexity of the state space is reduced, thereby accelerating the training convergence of the deep Q learning model.

8. The method for realizing high-efficiency and low-consumption micro-oxygen hydrolysis and acidification of petrochemical wastewater by combining spatiotemporal graph neural network and reinforcement learning to control aeration volume according to claim 1 or 2, characterized in that: The accuracy and stability of the model can also be evaluated. The specific methods are: by comparing the process parameter data before and after ST-GNN regulation, including aeration volume, energy consumption, and hydrolysis acidification effect, monitoring the efficiency of aeration volume under different regulation strategies, evaluating the power consumption of the aeration system before and after regulation, and determining the optimization range of energy consumption; evaluating the impact of ST-GNN regulation strategy on sewage treatment effect through indicators such as COD removal rate and VFA production; adding scenario simulation and emergency event testing of operating conditions with different influent COD, temperature changes, and flow changes to ensure the adaptability and robustness of the model in a variety of actual scenarios; introducing the traditional aeration volume control strategy as the control group, using the cross-validation method, and regularly comparing and testing with the ST-GNN+RL model to clarify the advantages and disadvantages of the model under different working conditions, and quantify the improvement in energy saving efficiency and acid production effect.

9. The method for realizing high-efficiency and low-consumption micro-oxygen hydrolysis and acidification of petrochemical wastewater by combining spatiotemporal graph neural network and reinforcement learning to control aeration volume according to claim 1 or 2, characterized in that: The model can also be updated and parameters adjusted. The specific method is: during the operation, new process parameter data is continuously collected and included in the graph data set, and the ST-GNN model is retrained regularly to improve its prediction and control performance under different working conditions; the model update cycle is set according to the frequency of working condition changes and water quality requirements, and is updated once a month or quarterly; during the model update process, grid search and Bayesian optimization methods are used to automatically find the optimal parameter combination of the loss function by adjusting the weight parameters in the loss function, so as to achieve the best balance between the micro-aerobic hydrolysis acidification effect and the aeration energy consumption; at the same time, the feedback information in the operation results is used to analyze the deviation between the model output and the actual effect, and then optimize the structure and training strategy of the ST-GNN model to further improve the accuracy and stability of the control.

Citation Information

Patent Citations

  • Aerobic zone oxygen early warning method, system and equipment based on graph neural network

    CN113830896A

  • Sewage treatment nitrate nitrogen concentration control method based on Q learning

    CN116822346A

  • Regulation and control method for micro-aerobic hydrolytic acidification in wastewater treatment

    CN118894593A

  • Weighted fusion model-based intelligent aeration control method for sewage treatment

    CN118954809A

  • Reinforcement learning (RL) and graph neural network (GNN)-based resource management for wireless access networks

    US20230093673A1

Cited By

  • Sewage dephosphorization control system

    CN119668125A

  • A sewage phosphorus removal control system

    CN119668125B

  • Composite membrane performance parameter optimization method based on neural network

    CN119851810A

  • A method for optimizing the performance parameters of a composite membrane based on a neural network

    CN119851810B

  • Intelligent aeration optimization control method and system for sewage plant

    CN119912076A