Method for regulating aeration volume by combining spatio-temporal graph neural network and reinforcement learning to achieve efficient and low-consumption micro-aerobic hydrolysis acidification of petrochemical wastewater

By combining the spatio-temporal 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 efficient and low-consumption treatment of petrochemical wastewater is achieved, which improves treatment efficiency and stability, and reduces energy consumption.

CN119430460BActive Publication Date: 2025-06-20NANJING TONGFANG WATER CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411723733.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-06-20
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 CN119430460B_ABST
    Figure CN119430460B_ABST
Patent Text Reader

Abstract

Method for regulating aeration volume by combining spatio-temporal graph neural network and reinforcement learning to achieve efficient and low-consumption micro-aerobic hydrolysis acidification of petrochemical wastewater. It relates to a method for regulating aeration volume to achieve efficient and low-consumption micro-aerobic hydrolysis acidification of petrochemical wastewater. It aims to solve the problems of poor accuracy in regulating oxygen concentration and flow rate and unstable treatment efficiency in existing micro-aerobic hydrolysis acidification. This method includes: 1. Data collection and cleaning; 2. Constructing a graph data set; 3. Training the ST-GNN model; 4. Constructing a deep Q reinforcement learning model; 5. Embedding the trained ST-GNN model into the automatic control system of the sewage treatment plant. 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; adjust the operating parameters of the aeration equipment according to the output of the model for hydrolysis acidification treatment. The present invention has high regulation efficiency and low operation error, and can be used in 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 present invention relates to a method for regulating aeration volume to achieve efficient and low-consumption micro-aerobic hydrolysis acidification of petrochemical wastewater, belonging to the technical field of wastewater treatment processes. Background Art

[0002] Among 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, pretreatment technologies such as hydrolysis acidification usually need to be adopted before biological treatment to improve the biodegradability of the wastewater. The role of hydrolysis acidification is to convert difficult-to-degrade complex macromolecules, such as aromatic hydrocarbons or heterocyclic substances, into easily biodegradable organic substances such as small-molecule organic acids and alcohols. However, due to the very complex composition of petrochemical wastewater, the treatment effect of traditional hydrolysis acidification processes on petrochemical wastewater is limited, and the effective improvement of the biodegradability of the wastewater cannot be achieved, thus restricting the subsequent further treatment of petrochemical wastewater.

[0003] Micro-aerobic hydrolysis acidification refers to introducing trace amounts of oxygen during the hydrolysis acidification process to improve the metabolic activity of related functional microorganisms, thereby promoting the hydrolysis acidification efficiency of organic substances. 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, oxygen overdose must be avoided to prevent the inhibition of anaerobic microbial functions. In addition, the uniform distribution of dissolved oxygen in the reactor directly affects the maintenance of the micro-aerobic state, increasing the complexity of the process. Traditional regulation methods mainly rely on empirical settings or fixed operating parameters, lacking the flexible response ability to process parameter and real-time data changes, and are difficult to adapt to the dynamic changes of 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, thereby resulting in unstable treatment efficiency and affecting the final effect of hydrolysis acidification. Summary of the Invention

[0004] The present invention aims to solve the technical problems of poor accuracy in regulating the oxygen concentration and flow rate and unstable treatment efficiency in existing micro-aerobic hydrolysis acidification, and provides a method for realizing highly efficient and low-consumption micro-aerobic hydrolysis acidification of petrochemical wastewater by combining spatio-temporal graph neural network and reinforcement learning to regulate the aeration volume. By combining the ST-GNN and reinforcement learning, the regulation of physical and chemical parameters in the micro-aerobic hydrolysis acidification process is optimized. The ST-GNN is used to dynamically model and predict the key parameters (dissolved oxygen, pH, VFA concentration, etc.) in the reactor, providing accurate environmental state information for reinforcement learning, and then realizing the real-time optimization of operations such as aeration volume and stirring rate. The ultimate goal is to improve the micro-aerobic hydrolysis acidification efficiency, stabilize the process products, reduce energy consumption on the premise of ensuring the treatment effect, and realize the intelligent and efficient management of the micro-aerobic hydrolysis acidification process.

[0005] The method for realizing highly efficient and low-consumption micro-aerobic hydrolysis acidification of petrochemical wastewater by combining spatio-temporal graph neural network and reinforcement learning to regulate the aeration volume of the present invention, 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, realizing an intelligent and automated sewage treatment aeration control system. This system can not only improve the sewage treatment efficiency, reduce energy consumption, but also be flexibly adjusted according to the actual situation, with high practical value and promotion prospects. In addition, the design of this system also considers ease of use and maintainability to ensure stable operation under various working conditions, providing an efficient and economical technical solution for modern sewage treatment plants.

[0006] The method for realizing highly efficient and low-consumption micro-aerobic hydrolysis acidification of petrochemical wastewater by combining spatio-temporal graph neural network and reinforcement learning to regulate the aeration volume of the present invention is carried out according to the following steps:

[0007] I. Data collection and cleaning

[0008] (1) Sensors for monitoring points and collecting data are set in the hydrolysis acidification tank to monitor and collect the process parameters at the inlet, outlet and intermediate reaction zone of the hydrolysis acidification tank. The process parameters are dissolved oxygen concentration, sewage flow velocity and flow rate, inlet BOD5 concentration, outlet BOD5 concentration, inlet COD concentration, outlet COD concentration, ammonia nitrogen concentration, temperature, pH value, VFA concentration, aeration volume, stirring rate. The time nodes for data monitoring and collection are: once every 10 - 15 minutes under normal working conditions, once every 1 - 2 minutes when the aeration and stirring equipment is turned on or off, and once every 1 - 2 minutes when significant fluctuations occur in temperature, pH or dissolved oxygen parameters. Wherein, significant fluctuations refer to parameter value changes exceeding 20%, so as to ensure fine capture of the dynamic characteristics of the system;

[0009] (2) After data collection, the data of each process parameter is cleaned through regression analysis. The cleaned data is normalized in scale by Z-score normalization or min-max normalization to ensure that data with different dimensions can be operated on the same scale. For data with normal distribution characteristics, Z-score normalization is used to normalize the data into a distribution with a mean of 0 and a standard deviation of 1. For data with skewed distribution, min-max normalization is used to scale the data into the range of [0,1]. The data after such normalization not only improves the efficiency of model training but also enhances the accuracy of prediction.

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

[0011] (4) Combine the density-based spatial clustering application with noise algorithm to perform clustering analysis on dissolved oxygen concentration, sewage flow rate and flow, influent BOD5 concentration, effluent BOD5 concentration, influent COD concentration, effluent COD concentration, ammonia nitrogen concentration, temperature, pH value, VFA concentration, aeration rate, stirring rate. The criterion for outliers is to identify and eliminate outliers with a deviation of 3 standard deviations from the population density as the outlier criterion, and filter out the process parameter data most directly related to the aeration rate.

[0012] (5) Construct the nodes of the spatio-temporal graph with the processed multi-dimensional process parameter data. Each node represents a parameter value at a specific location and time, and edges are used to represent the interaction relationships between these process parameters. The weights of the edges are calculated based on the correlation and causal relationships between the process parameters to quantitatively reflect the influence intensity between the process parameters.

[0013] II. Construct the graph dataset

[0014] (1) Input the cleaned process parameters as nodes into the graph model. Each node represents a specific process parameter, and these nodes have time series characteristics. Calculate the Pearson correlation coefficient between each pair of nodes through correlation analysis to identify the basic linear relationship between the parameters. For node pairs with a correlation coefficient greater than 0.7, it is initially judged that there is a direct association. Apply kernel principal component analysis (kernel PCA) to extract the non-linear characteristics between the parameters, reduce the dimension of the multi-dimensional data and retain the main features, so as to identify the potential non-linear interaction relationships of the process parameters, which helps to simplify the model structure and highlight the key features at the same time. Use kernel ridge regression to construct the edge eigenvalue of node pairs with more complex non-linear relationships, and further quantify the non-linear 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 intensity of the interaction between the node pairs.

[0015] (2) By combining historical operation data, arrange the data snapshots of each time step in chronological order to generate the graph structure of each time step, forming a dynamic graph dataset constructed according to the time series, so as to capture the dynamic change characteristics of the system;

[0016] (3) The finally obtained dynamic graph dataset is input into the ST-GNN model for training. The graph convolutional layer of ST-GNN aggregates the features of each node with the features of its neighbor nodes, so as to extract the global spatial information of the nodes, and captures the complex interactions and long-range dependencies between nodes through multiple layers of convolution; Then, the temporal convolutional layer performs time series processing on the aggregated node features to capture the dynamic change trends of each process parameter over time; After being processed by graph convolution and temporal convolution, the ST-GNN model outputs the comprehensive representation of each node, fusing the spatio-temporal information of the nodes together to reflect the dynamic state of the nodes under different working conditions;

[0017] III. Training of the ST-GNN Model

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

[0019] (2) At the same time, adopt pruning and quantization model compression techniques to lightweight the ST-GCN model. The steps of lightweight processing are as follows: 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, so as to reduce the number of redundant parameters; At the same time, combine the structured pruning method to evaluate the entire convolutional layer, remove the channels or nodes with low contribution, and set the pruning ratio to 20% - 40%; Remove the redundant or less important parameters in the convolutional layer through the pruning strategy to reduce the computational volume and storage requirements of the model and ensure that the model accuracy is not affected as much as possible; Then, adopt quantization technology to convert 32-bit floating-point numbers into 8-bit integer representation, thus greatly reducing the storage requirements of the model and accelerating the inference process; Finally, introduce an attention mechanism in the graph convolutional layer, enabling the model to dynamically identify and focus on the nodes and edges with the strongest correlation with the target parameters, and preferentially calculate the relationships that have the greatest impact on the target output, further improving the computational efficiency; Through the above model compression techniques, the ST-GCN model can be optimized to reduce the computational complexity and improve the computational efficiency;

[0020] (3) The five-fold cross-validation method is adopted to evaluate the generalization performance of the model. The specific operation is as follows: The graph dataset is divided into five subsets. Each time, one subset is selected as the validation set, 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 that the mean absolute error (MAE) is controlled within 5%, the mean square error (MSE) is controlled within 10%, and the root mean square error (RMSE) is controlled within 6%. This operation avoids overfitting and enhances the adaptability of the model to unknown working conditions. At the same time, during the model training process, the attention mechanism is combined or the important features are visualized to identify the process parameters and their interaction relationships that have the most influence 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 the COD removal rate and VFA production as the main objectives is used to optimize the prediction accuracy of the ST-GNN model. The loss function includes the prediction accuracy of the micro-aerobic hydrolysis acidification effect (COD removal rate, VFA production) and the accuracy of aeration volume regulation. The mean square error (MSE) is used to measure the prediction accuracy of the model for the micro-aerobic hydrolysis acidification effect, and the MSE is controlled within 5%. The difference between the predicted aeration volume of the model and the actual optimal aeration volume is evaluated, and the difference should be controlled within ±3% to ensure the accuracy of aeration volume regulation. 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-aerobic hydrolysis acidification effect are achieved;

[0022] (5) Then, an adaptive weight adjustment mechanism is introduced. By setting two initial weight parameters in the loss function, which correspond to the VFA production and aeration energy consumption respectively, and dynamically adjusting these two weights according to the real-time state of the system, the optimization goal is achieved 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 term, so that the model gives priority to reducing the energy consumption. When the VFA production is insufficient, the system will increase the weight of the VFA production term to ensure that the production meets the demand. Through this mechanism, the model can dynamically balance the VFA production and energy consumption under different working conditions, achieve the optimization effect, and ensure the stability and efficiency of the system operation;

[0023] IV. Construct 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 dissolved oxygen concentration, pH value, temperature, VFA concentration, influent flow rate of each physical and chemical parameter predicted by the ST-GNN model, as well as the current operation parameters of aeration volume and stirring rate are used as state inputs and imported into the deep Q learning model;

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

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

[0027] (4) The deep Q-learning model explores and optimizes its strategy under different working conditions through multiple iterations to meet the optimization objectives. The criterion for completing the optimization is that when the reward value converges in consecutive several rounds of iterations and the VFA production and energy consumption indicators are stable within the preset thresholds, it indicates that the strategy has been optimized. Through this training, ultimately achieve improving the acid production efficiency while reducing the energy consumption during the aeration process and realizing a more economical operation;

[0028] V. Real-time regulation of aeration volume

[0029] (1) Embed the trained ST-GNN model into the automatic control system of the wastewater treatment plant, obtain process parameter data in real time through the sensor network, and input it into the ST-GNN model. The model uses the interaction between the current working condition 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, adjust the operating parameters of the aeration equipment, namely the blower power and aeration time, to achieve real-time control;

[0031] (3) The system simultaneously records the hydrolysis acidification effect indicators, namely the COD removal rate and VFA production, 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, integrate an emergency control strategy. When an abnormal situation is detected, automatically enable the preset emergency control strategy to stabilize the process until the reinforcement learning model converges again, realizing efficient and low-consumption micro-aerobic hydrolysis acidification of petrochemical wastewater.

[0032] Furthermore, in step one (1), calibrate and maintain the sensors regularly, and set redundant monitoring points, that is, deploy 3 - 5 sensors at key positions for data cross-validation and anomaly detection to improve the accuracy of the data and reduce the impact of sensor failures.

[0033] Furthermore, the specific method of data cleaning described in Step 1(2) is as follows: First, apply a regression model to detect outliers in the collected data to identify and remove invalid or incorrect data points outside the normal fluctuation range; the cleaning criterion is to use 3 times the standard deviation as the threshold to eliminate data points deviating from the mean by more than this range, thereby reducing noise and anomalies in the data; for missing data points, interpolation or filling with the mean of the previous and subsequent data is used for completion to avoid the discontinuous impact of data on the stability and continuity of the model.

[0034] Furthermore, the method of screening the parameters most directly related to the aeration rate in Step 1(4) is as follows: First, evaluate the correlation between each process parameter and the aeration rate through the Pearson correlation coefficient and mutual information method, and retain the parameters with a correlation coefficient greater than 0.7 with the aeration rate to ensure that their prediction of the aeration rate has a strong influence; then, combine the Granger causality analysis model to judge the causal impact of the parameters on the aeration rate and exclude noise data. The criteria for noise data are: the p-value of the Granger causality test is greater than 0.05, and the causal relationship is not significant at this time; 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 impact on the aeration rate; then, by analyzing the fluctuation range of different parameters, the coefficient of variation CV (Coefficient of Variation) is used to quantitatively represent the volatility, and its calculation formula is: CV = μ / σ, where σ is the standard deviation of the parameter and μ is the mean of the parameter; select the parameters with a coefficient of variation greater than 0.15, 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, select the parameters with an energy ratio exceeding 30% in the high-frequency band > 0.1 Hz to ensure that the model has a strong response ability during dynamic regulation; finally, give priority to retaining the parameters that can be monitored in real time by sensors to ensure the operability and feedback speed of the model during real-time control; this step finds the parameters most directly related to the aeration rate based on the screening principles of correlation analysis, causal relationship analysis, parameter volatility, and real-time monitorability.

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

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

[0037] ② Causality analysis: Use Granger causality test to analyze the causality of parameter pairs, and identify which parameter changes have a direct causal impact on other parameters over time; for the causal relationship pairs with significant test results, increase their edge weights to ensure that the spatio-temporal graph can capture the causal connection between key control variables and outcome variables during modeling; this method is applicable to determining the process variables that have a direct impact on the two key parameters of aeration rate and dissolved oxygen concentration;

[0038] ③ Dynamic Time Warping (DTW) distance: Use the DTW method on time series to measure the pattern similarity between parameters, especially suitable for capturing the synchronization of parameters in a complex and dynamic reaction environment; parameter pairs with a smaller DTW distance (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 weights will be calculated by weighted fusion of the results of the above three methods, and 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 weights obtained in this way can reflect both the linear relationship and causal effect between parameters, and can also capture their synchronization over time, so as to achieve precise dynamic regulation of the aeration rate;

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

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

[0042] Furthermore, the abnormal conditions described in step four are sudden changes in influent water quality, equipment failures, or sludge poisoning.

[0043] The method for realizing efficient and low - consumption micro - oxygen hydrolysis acidification of petrochemical wastewater by combining spatio - temporal graph neural network and reinforcement learning to regulate the aeration volume can also evaluate the accuracy and stability of the model. The specific method is as follows: By comparing the process parameter data before and after ST - GNN regulation, including aeration volume, energy consumption, and hydrolysis acidification effect, monitor the usage efficiency of aeration volume under different regulation strategies, evaluate the power consumption of the aeration system before and after regulation, and determine the optimization range of energy consumption; Evaluate the impact of the ST - GNN regulation strategy on the sewage treatment effect through indicators such as COD removal rate and VFA production; Increase the scenario simulation of working condition changes such as different influent COD, temperature changes, and flow changes, and emergency events testing to ensure the adaptability and robustness of the model in various actual scenarios; Introduce traditional aeration volume regulation strategies as the control group, and use the cross - validation method to regularly conduct comparative tests 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 for realizing efficient and low - consumption micro - oxygen hydrolysis acidification of petrochemical wastewater by combining spatio - temporal graph neural network and reinforcement learning to regulate the aeration volume can also update the model and adjust parameters. The specific method is as follows: During the operation process, 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 regulation performance under different working conditions; The update period of the model is set according to the frequency of working condition changes and water quality requirements, and the update is carried out once a month or once a quarter; During the model update process, adopt grid search and Bayesian optimization methods, and 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 point between the micro - oxygen hydrolysis acidification effect and the aeration energy consumption; At the same time, use the feedback information in the operation results 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 regulation.

[0045] The technical method proposed by the present invention can make full use of the modeling ability of the graph neural network to capture the complex relationships between process parameters and realize the real - time adaptive regulation of the aeration volume of the sewage treatment plant. Through multi - objective optimization, this method can reduce the aeration energy consumption while maintaining the micro - oxygen hydrolysis acidification effect, and achieve more economical and environmentally friendly sewage treatment. In addition, this scheme has flexibility and scalability, can realize adaptive regulation under various sewage treatment working conditions, and provides an intelligent and automated regulation means for the sewage treatment plant. The flow chart of the method of the present invention is as Figure 1 shown, and the beneficial effects are mainly as follows:

[0046] (1) Dynamically construct a graph data set to capture complex relationships

[0047] Different from traditional feature extraction methods, this method uses non-linear feature extraction methods such as kernel PCA and kernel ridge regression to establish a more accurate parameter correlation relationship. At the same time, a dynamic graph structure is introduced, enabling the model to dynamically adjust the graph structure and weights according to new data, reflecting the real-time working conditions. In addition, the dynamic graph structure can better adapt to the complexity and variability in the micro-aerobic hydrolysis acidification process, capture the non-linear interaction relationships between parameters, provide richer spatio-temporal feature information for the ST-GNN model, improve the prediction performance of the model and its adaptability to process changes, and achieve more accurate aeration volume regulation to optimize the micro-aerobic hydrolysis acidification effect.

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

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

[0050] (3) Real-time online learning for dynamic regulation of aeration volume

[0051] Through state space dimensionality reduction, adaptive reward functions, and online learning strategies, the learning ability of the ST-GNN model is strengthened, enabling it to flexibly handle multi-objective optimization (increasing VFA production and reducing energy consumption) and changes in working conditions, and accelerating convergence in the high-dimensional state space. Thus, it can be updated in real time according to changes in actual working conditions and dynamically adjust the control strategy, enabling the micro-aerobic hydrolysis acidification process to 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 overall process operation efficiency.

[0052] (4) Integrating emergency control strategies to improve system stability

[0053] This method introduces emergency control strategies. When abnormal conditions (sudden changes in influent water quality, equipment failures) are detected, the machine learning system can automatically activate preset emergency strategies, enabling it to maintain stable process effects during emergencies, reducing the negative impacts 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 tests, and automated hyperparameter optimization techniques (Bayesian optimization, genetic algorithms), the performance of the model is evaluated and optimized from multiple dimensions, enabling the ST-GNN and reinforcement learning models to continuously learn and adapt to different working conditions. As a result, the model can be continuously fine-tuned within the update cycle to ensure high-efficiency prediction and regulation performance in the context of changing working conditions. Automated optimization improves the operating efficiency and reliability of the system, providing a strong guarantee for the intelligent and refined management of sewage treatment.

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

[0057] The 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 process parameters after each adjustment are input into the model again, ensuring the dynamic adaptability of the system and making the regulation of the aeration volume more accurate. 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 layout of sensors, combined with regular calibration and cross-validation of multi-sensor data, the accuracy and stability of the data are ensured. At the same time, the data sampling frequency is dynamically adjusted to adapt to changes in the system state, thereby effectively reducing the influence of sensor errors and data drift, improving the model's real-time monitoring ability of the sewage treatment process, and ensuring the timeliness and accuracy of the regulation 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 application with noise, and time series anomaly detection models, the ability to identify and remove outliers in complex multi-dimensional data is improved, ensuring the integrity and accuracy of the data, providing a high-quality data foundation for subsequent modeling, reducing noise in the model input, and thus improving the training efficiency and prediction accuracy of the model.

[0062] (9) Intelligent prediction and regulation reduce manual intervention errors

[0063] Through the intelligent prediction and regulation of ST-GNN, the regulation of the aeration volume in the sewage treatment plant can be automated, reducing the dependence on manual experience and intervention. This not only improves the regulation efficiency but also reduces the risk of human operation errors, contributing to the digital and intelligent management of the sewage treatment plant. 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 multi-dimensional data. The criterion for outliers is that the parameter values deviate more than 2 standard deviations from the normal fluctuation range. This step combines multi-sensor data fusion to enhance the identification and elimination of outliers.

[0072] (4) Combine the density-based spatial clustering application with noise algorithm to perform clustering analysis on dissolved oxygen concentration, sewage flow rate and flow, organic matter concentration, influent COD concentration, effluent COD concentration, ammonia nitrogen concentration, temperature, pH value, VFA concentration, aeration volume, and stirring rate. Identify and eliminate outliers with the criterion of deviating 3 standard deviations from the population density as the outlier criterion, and screen out the process parameter data most directly related to the aeration volume. The method for screening the parameter most directly related to the aeration volume is as follows: First, evaluate the correlation between each process parameter and the aeration volume through 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 its strong influence on the prediction of the aeration volume. Then, combine the Granger causality test analysis model to judge the causal influence of the parameter on the aeration volume and exclude the noise data. The criterion for noise data is excluded by setting a range or outlier threshold that deviates more than 3 standard deviations from the mean, and retain the parameters with direct causal influence. Next, by analyzing the fluctuation range of different parameters, select the parameters sensitive to the dynamic changes of the system. The quantification of sensitivity is expressed by calculating the standard deviation or coefficient of variation (CV) of the parameter. Preferentially select the parameters when the coefficient of variation (CV) of the parameter is greater than 0.3 (i.e., the fluctuation degree is 20% or more of the mean) to ensure the response ability of the model during dynamic regulation. Finally, retain the parameters that can be monitored in real time by sensors to ensure the operability and feedback speed of the model during real-time control. This step finds the parameter most directly related to the aeration volume based on the screening principles of correlation analysis, causal relationship analysis, parameter volatility, and real-time monitorability.

[0073] (5) Construct the nodes of the spatio-temporal graph with the processed multi-dimensional process parameter data, where the process parameter data is dissolved oxygen level, sewage flow rate, influent BOD5 concentration, effluent BOD5 concentration, influent COD concentration, effluent COD concentration, ammonia nitrogen concentration, temperature, pH value, VFA concentration. Each node represents a parameter value at a specific location and time, and use edges to represent the interaction relationships between these process parameters. The weight calculation of the edges is based on the correlation and causal relationship between the process parameters to quantitatively reflect the influence intensity between the process parameters. The specific calculation method of the edge weight is as follows:

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

[0075] ② Causality analysis: Use Granger causality test to conduct causality analysis on parameter pairs, and identify the parameters whose changes have a direct causal impact on other parameters in time. For the causal relationship pairs with significant test results, increase their edge weights to ensure that the spatio-temporal graph can capture the causal connection between key control variables and result variables during modeling. This method is applicable to determining the 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: Use the DTW method on time series to measure the pattern similarity between parameters, especially suitable for capturing the synchrony of parameters in a complex and dynamic reaction environment. Parameter pairs with a smaller DTW distance (i.e., parameter pairs with high time series pattern similarity) will be assigned a higher edge weight to reflect their importance in the dynamic regulation of the system.

[0077] ④ Finally, the edge weights will be calculated through 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 weights obtained in this way can reflect both the linear relationship and causal effect between parameters, and can also capture their synchrony in time, thus achieving precise dynamic regulation of aeration volume.

[0078] II. Construction of graph dataset

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

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

[0081] (2) Apply kernel principal component analysis (kernel PCA) to extract the non-linear features between parameters, reduce the dimensionality of multi-dimensional data and retain the main features, so as to identify the potential non-linear interaction relationships of process parameters. This helps to simplify the model structure and highlight key features at the same time.

[0082] (3) Use kernel ridge regression to construct the edge eigenvalues of node pairs with relatively complex non - linear relationships, and further quantify the non - linear 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 intensity of the interaction between node pairs;

[0083] (4) By combining historical operation data, construct a dynamic graph dataset according to time series, arrange the data snapshots of each time step in chronological order, generate the graph structure of each time step, so as to capture the dynamic change characteristics of the system;

[0084] (5) The finally obtained dynamic graph dataset is input into the ST - GNN model for training. The graph convolutional layer of ST - GNN aggregates the features of each node with the features of its neighbor nodes, so as to extract the global spatial information of the nodes, and captures the complex interactions and long - range dependencies between nodes through multiple layers of convolution; then, the temporal convolutional layer performs temporal series processing on the aggregated node features to capture the dynamic change trends of each process parameter over time; after being processed by graph convolution and temporal convolution, the ST - GNN model outputs the comprehensive representation of each node, fusing the spatio - temporal information of the nodes together to reflect the dynamic state of the nodes under different working conditions;

[0085] III. Training of the ST - GNN Model

[0086] (1) Input the constructed graph dataset 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 relationships and global information between process parameters are extracted; through multiple layers of graph convolution, the model can capture the long - range dependencies between different process parameters.

[0087] (2) At the same time, use model compression techniques such as pruning and quantization to lightweight the ST - GCN model; the specific steps of lightweight processing are as follows: remove redundant or low - importance parameters in the convolutional layer through pruning strategies, reduce the computational amount and storage requirements of the model based on the weight size or structured pruning methods, ensuring that the model accuracy is not affected as much as possible; use quantization techniques to convert 32 - bit floating - point numbers into 8 - bit integer representations, thus significantly reducing the storage requirements of the model and accelerating the inference process; finally, introduce an attention mechanism in the graph convolutional layer, enabling the model to dynamically identify and focus on the nodes and edges with the strongest correlation with the target parameters, and preferentially calculate the relationships that have the greatest impact on the target output, further improving the computational efficiency; through the above model compression techniques, the ST - GCN model can be optimized to reduce the computational complexity and improve the computational efficiency.

[0088] (3) To evaluate the generalization performance of the model, a five-fold cross-validation method is adopted. The graph dataset is divided into five subsets. Each time, one subset is selected as the validation set, and the remaining subsets are used as the training set. The model is trained iteratively to ensure the prediction accuracy under different working conditions. The prediction accuracy is that the mean absolute error (MAE) is controlled within 5%, the mean square error (MSE) is controlled within 10%, and the root mean square error (RMSE) is controlled within 6% 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 is combined or the important features are visualized to identify the process parameters and their interaction relationships that have the most influence on the prediction results, so as to enhance the interpretability of the model;

[0089] (4) At the same time, during the training process, a multi-objective loss function with the COD removal rate and VFA production as the main target loss functions is used to optimize the prediction accuracy of the ST-GNN model. The loss function includes the prediction accuracy of the COD removal rate and VFA production of the micro-aerobic hydrolysis acidification effect, as well as the accuracy of the aeration volume regulation. The mean square error (MSE) is used to measure the prediction accuracy of the model for the micro-aerobic hydrolysis acidification effect, and the MSE is controlled within 5%. The difference between the predicted aeration volume of the model and the actual optimal aeration volume is evaluated, and the difference should be controlled within ±3% to ensure the accuracy of the aeration volume regulation. If the error indicators are all within the set range, the subsequent steps are continued to complete the training. If it exceeds 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 acidification effect are achieved;

[0090] (5) Then, an adaptive weight adjustment mechanism is introduced. By setting two initial weight parameters in the loss function, corresponding to the VFA production and aeration energy consumption respectively, and dynamically adjusting these two weights according to the real-time state of the system, the optimization goal can be achieved 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 term, so that the model gives priority to reducing the energy consumption. When the VFA production is insufficient, the system will increase the weight of the VFA production term to ensure that the production meets the demand. The adaptive adjustment is achieved through gradient changes or specific threshold control: monitor the gradient changes of the loss function in each round of training. If the gradient of the VFA production is lower than the preset threshold, automatically increase its weight. If the gradient change of the energy consumption term exceeds the threshold, increase the weight of the energy consumption term. Through this mechanism, the model can dynamically balance the VFA production and energy consumption under different working conditions, achieve the optimization effect, and ensure the stability and efficiency of the system operation;

[0091] IV. Construct a deep Q reinforcement learning model

[0092] (1) Based on the output of the ST-GNN model, a deep Q-learning model is constructed. The various physical and chemical parameters predicted by the ST-GNN model (dissolved oxygen concentration, pH value, temperature, VFA concentration, influent flow rate), as well as the current operating parameters (aeration rate, stirring rate), are 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 autoencoders are used to perform dimensionality reduction on the high-dimensional state space, extracting the most representative process parameter features, thereby accelerating the training convergence of the model. Among them, principal component analysis (PCA) is used for linear dimensionality reduction to retain the main feature components; t-SNE is suitable for the visualization and dimensionality reduction of non-linear data, mapping high-dimensional data to a low-dimensional space; autoencoders automatically learn a compact low-dimensional representation through neural networks, retaining key features. After dimensionality reduction, the complexity of the state space is reduced, thus 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 training is carried out for different objectives of maximizing VFA production and minimizing aeration energy consumption respectively;

[0095] (4) The deep Q-learning model explores and optimizes its strategy under different working conditions through multiple iterations to meet the optimization objectives. The criterion for completing the optimization is that when the reward value converges in consecutive several rounds of iterations, and the VFA production and energy consumption indicators are stable within the preset thresholds, it indicates that the strategy has been optimized. Through this training, it is ultimately possible to improve the acid production efficiency while reducing the energy consumption during aeration, achieving more economical operation;

[0096] V. Real-time regulation of aeration rate

[0097] (1) The trained ST-GNN model is embedded in the automatic control system of the wastewater treatment plant. Process parameter data is obtained in real time through the sensor network. The process parameter data is dissolved oxygen, COD, temperature, flow rate, pH value, VFA concentration, and stirring rate, and is input into the ST-GNN model. The model uses the interaction between the current working condition and historical data to output the optimal aeration rate 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, which are the hydrolysis 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, an emergency control strategy is integrated. When abnormal conditions are detected, such as sudden changes in influent water quality, equipment failures, and sludge poisoning, the preset emergency control strategy is automatically enabled to stabilize the process until the reinforcement learning model converges again, realizing efficient and low-consumption micro-aerobic hydrolysis acidification of petrochemical wastewater.

[0100] The comparison diagram of the BOD prediction curve of the ST-GNN model in step five of this Example 1 and the measured BOD curve of the hydrolysis acidification tank is as Figure 2 shown. From Figure 2 it can be seen that the prediction curve (red dashed line) of the ST-GNN model is highly consistent with the measured curve (black solid line). Especially in terms of the fluctuation trend of the BOD5 concentration, it can better follow the changes in the measured data, indicating that the ST-GNN model has high accuracy in capturing the dynamic changes of the BOD5 concentration in the hydrolysis acidification tank. Even in the large fluctuation range of the BOD5 concentration (such as the serial number representing the time 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 "realizing efficient and low-consumption micro-aerobic hydrolysis acidification of petrochemical wastewater by combining spatio-temporal graph neural network and reinforcement learning to regulate aeration volume" in this embodiment, "efficient and low-consumption" is specifically reflected in the following indicators: the target of the COD removal rate is maintained above 90%, and the degradation effect of organic pollutants is reflected by improving the COD removal rate to achieve "efficient" treatment; VFA production, which measures the acid production efficiency by increasing the production of volatile fatty acids (VFA) to 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 meet the "low-consumption" requirement; operating cost, considering the equipment energy consumption and chemical agent use comprehensively, the operating cost is reduced by 20% - 30%. These indicators jointly ensure that the system achieves the "efficient" goal of high COD removal rate and high VFA production while maintaining the "low-consumption" goal of low energy consumption and low cost, so as to realize the efficient and low-consumption micro-aerobic hydrolysis acidification treatment of petrochemical wastewater.

[0102] The method for evaluating the model accuracy and stability in this embodiment is as follows: By comparing the process parameter data before and after the regulation of ST-GNN, including aeration volume, energy consumption, hydrolysis acidification effect, etc., monitor the usage efficiency of the aeration volume under different regulation strategies, evaluate the power consumption of the aeration system before and after regulation, determine the optimization range of energy consumption. In addition, evaluate the impact of the ST-GNN regulation strategy on the sewage treatment effect through indicators such as COD removal rate and VFA production. Increase the simulation of more working condition change scenarios (different influent COD, temperature change, flow change) and emergency tests to ensure the adaptability and robustness of the model in various actual scenarios. Introduce the traditional aeration volume regulation strategy as a control group, and use the cross-validation method to regularly conduct comparative tests 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.

[0103] The specific method for updating the model and adjusting parameters in this embodiment is as follows: During the operation process, continuously collect new process parameter data and incorporate it into the graph dataset, and regularly retrain the ST-GNN model to improve its prediction and regulation performance under different working conditions. The update period of the model can be set according to the frequency of working condition changes and water quality requirements. For example, update once a month or once a quarter. During the model update process, use methods such as grid search and Bayesian optimization 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 point between the micro-aerobic hydrolysis acidification effect and the aeration energy consumption. At the same time, utilize the feedback information in the operation results 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 regulation accuracy and stability.

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

[0105] The combination of reinforcement learning and ST-GNN can further achieve 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 the changes in wastewater composition and environmental conditions, ensuring the high efficiency and best effluent quality of the treatment process. This intelligent regulation strategy based on ST-GNN and reinforcement learning can not only significantly reduce the operating cost, but also improve the stability of the treatment efficiency.

[0106] In this embodiment, by introducing ST-GNN and RL, the automatic, intelligent and refined regulation of the micro-aerobic hydrolysis acidification process is realized. Compared with the traditional rigid control method, the regulation system based on ST-GNN can quickly respond to the changes in real-time data, dynamically adjust the process parameters, and reduce energy consumption. At the same time, the machine learning model can adapt to petrochemical wastewater with different compositions and concentrations through continuous learning and updating, and achieve the efficient treatment of complex wastewater. Therefore, developing a micro-aerobic hydrolysis acidification regulation system integrating spatio-temporal 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) Input the constructed graph dataset 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 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% 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 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 according to claim 1, 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 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, 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

  • 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