A wastewater treatment model dynamic optimization method based on time series rolling prediction and related equipment

By using a dynamic optimization method for wastewater treatment models based on time-series rolling prediction, the problems of response lag and control instability of wastewater treatment plants under disturbances in water quantity and quality are solved, achieving high-precision and highly adaptable water quality prediction and reducing energy consumption.

CN121094244BActive Publication Date: 2026-03-27SUN YAT SEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Wastewater treatment plants rely on fixed parameter settings and manual experience for adjustment, which leads to response lag and control instability. In particular, they have poor prediction reliability and weak extrapolation ability when there are disturbances in water quantity and quality.

Method used

The dynamic optimization method for wastewater treatment models based on time-series rolling prediction collects historical operational data, establishes a wastewater biochemical treatment mechanism model, integrates simulation results and measured data, performs feature analysis and standardized preprocessing, constructs a rolling prediction model, and achieves high-precision prediction through dynamic optimization.

Benefits of technology

It improves the accuracy and adaptability of water quality prediction for wastewater treatment plants in dynamic environments, reduces operating energy consumption, and provides a high-precision, highly adaptable, and interpretable prediction model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121094244B_ABST
    Figure CN121094244B_ABST
Patent Text Reader

Abstract

The application provides a sewage treatment model dynamic optimization method based on timing rolling prediction and related equipment, and belongs to the technical field of environmental protection sewage data processing. The application comprises the following steps: collecting historical operation data of a sewage treatment plant; establishing and calibrating a model according to the historical operation data to obtain a sewage biochemical treatment mechanism model; fusing simulation results of the sewage biochemical treatment mechanism model and measured operation data to obtain an enhanced data set; performing feature analysis and standardization preprocessing on the enhanced data set to obtain a preprocessed enhanced data set; constructing a rolling prediction model; dynamically optimizing the rolling prediction model according to the preprocessed enhanced data set to obtain a timing rolling prediction model; and performing prediction according to the timing rolling prediction model to obtain a sewage quality prediction result. The application can construct a prediction model with high precision, strong adaptability and interpretability, and realizes intelligent operation of the sewage treatment plant.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of environmental protection sewage data processing, and particularly relates to a sewage treatment model dynamic optimization method based on time series rolling prediction and related equipment. BACKGROUND

[0002] In the related art, sewage plants generally rely on fixed parameter setting and manual experience adjustment, and are prone to response lag and control instability in the face of water quantity and water quality disturbance. The prediction reliability is poor and the extrapolation ability is weak in the case of data scarcity or sudden change of working conditions.

[0003] To sum up, the technical problems in the related art need to be improved. SUMMARY

[0004] The main purpose of the embodiments of the present application is to provide a sewage treatment model dynamic optimization method based on time series rolling prediction and related equipment, which can improve the sewage water quality prediction accuracy and adaptability in a dynamic operating environment, optimize process parameters, and reduce operating energy consumption.

[0005] To achieve the above purpose, one aspect of the embodiments of the present application provides a sewage treatment model dynamic optimization method based on time series rolling prediction, which comprises the following steps:

[0006] Collecting historical operation data of a sewage treatment plant;

[0007] Establishing and calibrating a model according to the historical operation data to obtain a sewage biochemical treatment mechanism model;

[0008] Fusing simulation results of the sewage biochemical treatment mechanism model and measured operation data to obtain an enhanced data set;

[0009] Performing feature analysis and standardization preprocessing on the enhanced data set to obtain a preprocessed enhanced data set;

[0010] Constructing a rolling prediction model;

[0011] Dynamically optimizing the rolling prediction model according to the preprocessed enhanced data set to obtain a time series rolling prediction model;

[0012] Performing prediction according to the time series rolling prediction model to obtain a sewage water quality prediction result.

[0013] In some embodiments, the collecting of the historical operation data of the sewage treatment plant comprises:

[0014] Collecting water quality data of inlet and outlet water; the water quality data of the inlet and outlet water includes chemical oxygen demand, biochemical oxygen demand, ammonia nitrogen, total nitrogen, total phosphorus and suspended matter information; the inlet and outlet water includes inlet water and outlet water;

[0015] collecting process operation parameters; the process operation parameters include dissolved oxygen, pH value, temperature, influent and effluent flow, sludge load, aeration quantity, dosage and sludge retention time;

[0016] collecting process design parameters; the process design parameters include volume, area and water depth parameters of treatment units of treatment tanks of the wastewater treatment plant; the treatment tanks include pre-anoxic tank, anoxic tank, anaerobic tank, aerobic tank and secondary sedimentation tank;

[0017] taking the water quality data of the influent and effluent, the process operation parameters and the process design parameters as historical operation data of the wastewater treatment plant.

[0018] In some embodiments, the model establishment and calibration according to the historical operation data obtain a wastewater biochemical treatment mechanism model, including:

[0019] establishing an initial mechanism model in a simulation platform based on design drawings of the wastewater treatment plant and the historical operation data;

[0020] identifying key parameters of the initial mechanism model by using a sensitivity analysis method, and optimizing the key parameters by using a Hyperopt optimization algorithm to obtain an optimal parameter combination;

[0021] calibrating the initial mechanism model according to the optimal parameter combination to obtain the wastewater biochemical treatment mechanism model.

[0022] In some embodiments, the model establishment and calibration according to the historical operation data obtain a wastewater biochemical treatment mechanism model, including:

[0023] perturbing each parameter of the initial mechanism model in a preset range and collecting water quality data of the effluent under the corresponding perturbation condition;

[0024] calculating response changes of each parameter to each water quality index under the perturbation condition according to the water quality data of the effluent to obtain local sensitivity index data of each parameter;

[0025] performing parameter screening according to a preset sensitivity threshold value according to the local sensitivity index data of each parameter to obtain key parameters;

[0026] taking average absolute percentage error of simulation results and measured values of water quality indexes of the effluent as an optimization target, and optimizing the key parameters by using a Hyperopt optimization algorithm to obtain an optimal parameter combination.

[0027] In some embodiments, fusing the simulation results of the wastewater biochemical treatment mechanism model with measured operational data to obtain an enhanced dataset includes:

[0028] The simulation results and measured operational data of the wastewater biochemical treatment mechanism model are aligned and merged in chronological order. The simulation results are used as input features, and the measured water quality data of the effluent are used as target variables to obtain an enhanced dataset.

[0029] In some embodiments, performing feature analysis and standardization preprocessing on the augmented dataset to obtain a preprocessed augmented dataset includes:

[0030] Based on the enhanced dataset, the correlation between simulated variables and actual effluent and influent water quality parameters is analyzed, the intrinsic correlation between simulated variables and their relationship with preset core operating parameters are analyzed, and feature analysis data is obtained.

[0031] Based on the feature analysis data, the enhanced dataset is preprocessed using the Z-score standardization method to reduce the differences between different indicators due to physical dimensions and numerical ranges to a preset range, thus obtaining the preprocessed enhanced dataset.

[0032] In some embodiments, constructing the rolling prediction model includes:

[0033] Grid search was used to optimize the hyperparameters of several machine learning models to obtain the optimal combination of model parameters for predicting effluent water quality indicators; the types of machine learning models included linear regression, support vector machine, K-nearest neighbor algorithm, random forest and artificial neural network.

[0034] Based on the optimal model parameter combination, a corresponding machine learning algorithm prediction model is constructed. The model is trained and evaluated for different effluent water quality indicators. By comparing the prediction results on the test set, the generalization ability and prediction performance of each model are evaluated, and the model with the best performance is selected as the rolling prediction model.

[0035] In some embodiments, the step of dynamically optimizing the rolling prediction model based on the preprocessed augmented dataset to obtain a time-series rolling prediction model includes:

[0036] Based on the preprocessed augmented dataset, the time ranges of the training and test sets are updated progressively. The updated training and test sets are then used to dynamically optimize the rolling prediction model, thereby training a time-series rolling prediction model.

[0037] In some embodiments, the dynamic optimization method for the wastewater treatment model based on time-series rolling prediction further includes:

[0038] The prediction performance of the time series rolling prediction model is evaluated by using a mean absolute percentage error to obtain performance evaluation information.

[0039] The time series rolling prediction model is improved based on the performance evaluation information.

[0040] To achieve the above object, another aspect of the embodiment of the present application provides a sewage treatment model dynamic optimization system based on time series rolling prediction, which is used to implement the method as described above. The system comprises:

[0041] A first module is configured to collect historical operation data of a sewage treatment plant.

[0042] A second module is configured to establish and calibrate a model based on the historical operation data to obtain a sewage biochemical treatment mechanism model.

[0043] A third module is configured to fuse simulation results of the sewage biochemical treatment mechanism model and measured operation data to obtain an enhanced data set.

[0044] A fourth module is configured to perform feature analysis and standardization preprocessing on the enhanced data set to obtain a preprocessed enhanced data set.

[0045] A fifth module is configured to construct a rolling prediction model.

[0046] A sixth module is configured to dynamically optimize the rolling prediction model based on the preprocessed enhanced data set to obtain a time series rolling prediction model.

[0047] A seventh module is configured to perform prediction based on the time series rolling prediction model to obtain a sewage water quality prediction result.

[0048] To achieve the above object, another aspect of the embodiment of the present application provides an electronic device, which comprises a memory and a processor. The memory stores a computer program. The processor implements the method as described above when executing the computer program.

[0049] To achieve the above object, another aspect of the embodiment of the present application provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the method as described above.

[0050] To achieve the above object, another aspect of the embodiment of the present application provides a computer program product, which comprises a computer program. The computer program is executed by a processor to implement the method as described above.

[0051] The embodiments of this application include at least the following beneficial effects: This application provides a method, system, electronic device, storage medium, and program product for dynamic optimization of a wastewater treatment model based on time-series rolling prediction. The solution includes: collecting historical operating data of a wastewater treatment plant; establishing and calibrating a model based on the historical operating data to obtain a wastewater biochemical treatment mechanism model; fusing the simulation results of the wastewater biochemical treatment mechanism model with measured operating data to obtain an enhanced dataset; performing feature analysis and standardization preprocessing on the enhanced dataset to obtain a preprocessed enhanced dataset; constructing a rolling prediction model; dynamically optimizing the rolling prediction model based on the preprocessed enhanced dataset to obtain a time-series rolling prediction model; and making predictions based on the time-series rolling prediction model to obtain wastewater quality prediction results. This application can construct a prediction model with high accuracy, strong adaptability, and interpretability, realizing intelligent operation of wastewater treatment plants. Attached Figure Description

[0052] Figure 1 This is a flowchart of the dynamic optimization method for a wastewater treatment model based on time-series rolling prediction provided in the embodiments of this application;

[0053] Figure 2 This is a schematic diagram of the steps of the dynamic optimization scheme for the wastewater treatment model based on time-series rolling prediction provided in the embodiments of this application;

[0054] Figure 3 This is a process flow diagram determined by the design data of a wastewater treatment plant provided in the embodiments of this application.

[0055] Attached diagram labels: 1-coarse screen, 2-lift pump station, 3-fine screen, 4-vortex grit chamber, 5-pre-anoxic tank, 6-anaerobic tank, 7-anoxic tank, 8-aerobic tank, 9-dosing room, 10-secondary sedimentation tank, 11-filtration tank, 12-ultraviolet disinfection tank. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.

[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description herein is for describing particular embodiments only and is not intended to be limiting of the application.

[0058] Before the embodiments of the present application are explained in detail, the description first addresses a description of several terms and phrases used in the embodiments of the present application, which are applicable to the following explanations.

[0059] 1) Hyperopt, a Python library for automating the tuning of model parameters, an efficient calibration tool;

[0060] 2) Z-score, standard deviation normalization, a data preprocessing method;

[0061] 3) MAPE, mean absolute percentage error, an index for measuring the accuracy of a prediction model;

[0062] 4) SUMO, a sewage treatment simulation software platform, used to establish and run mechanism models of sewage biochemical treatment processes;

[0063] 5) Sumo4N, an activated sludge mathematical model built into the SUMO software;

[0064] 6) AAO, anaerobic-anoxic-oxic process, a biological nitrogen and phosphorus removal wastewater treatment process;

[0065] 7) PAC, polyaluminum chloride, an inorganic polymer coagulant;

[0066] 8) PyAutoGUI, a Python graphical user interface automation library.

[0067] In the related art, sewage plants generally rely on fixed parameter setting and manual experience adjustment, and are prone to response lag and control instability in the face of water quantity and water quality disturbance. The prediction reliability is poor and the extrapolation ability is weak when data is scarce or working conditions change suddenly.

[0068] In view of this, this application provides a method and related equipment for dynamic optimization of a wastewater treatment model based on time-series rolling prediction. This method acquires and constructs a mechanistic model of the wastewater treatment plant based on its original data. The simulation results of the mechanistic model are aligned and merged with measured operational data according to time relationships to construct an augmented dataset containing input features and target variables. Feature correlation analysis and standardization preprocessing are performed on the augmented dataset to construct a prediction model with time-series rolling capabilities. By gradually updating the time ranges of the training and test sets, the model achieves dynamic adaptation and optimization. This method not only overcomes the shortcomings of traditional mechanistic models in terms of accuracy and dynamic response but also exhibits strong generalization ability and robustness, providing a more reliable theoretical foundation and technical support for the long-term accurate simulation and intelligent control of key pollutant concentrations in wastewater treatment processes.

[0069] The dynamic optimization method for wastewater treatment models based on time-series rolling prediction provided in this application relates to the field of environmental wastewater data processing technology. This method can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, or desktop computer, but is not limited thereto. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application implementing the dynamic optimization method for wastewater treatment models based on time-series rolling prediction, but is not limited to the above forms.

[0070] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0071] Figure 1 is an optional flowchart of a sewage treatment model dynamic optimization method based on time series rolling prediction provided by the embodiment of the application, Figure 1 The method in the embodiment of the application can include, but is not limited to, steps S101 to S107.

[0072] In step S101, historical operation data of a sewage treatment plant is collected.

[0073] In step S102, a sewage biochemical treatment mechanism model is established and calibrated according to the historical operation data.

[0074] In step S103, simulation results of the sewage biochemical treatment mechanism model and measured operation data are fused to obtain an enhanced data set.

[0075] In step S104, feature analysis and standardization preprocessing are performed on the enhanced data set to obtain a preprocessed enhanced data set.

[0076] In step S105, a rolling prediction model is constructed.

[0077] In step S106, the rolling prediction model is dynamically optimized according to the preprocessed enhanced data set to obtain a time series rolling prediction model.

[0078] In step S107, prediction is performed according to the time series rolling prediction model to obtain a sewage water quality prediction result.

[0079] The steps S101 to S107 shown in the embodiment of the application can solve the problem of lack of physical common sense and poor extrapolation ability of a pure data model by collecting historical operation data and establishing and calibrating a sewage biochemical treatment mechanism model according to the historical operation data. The simulation results of the mechanism model and the measured data are fused into an enhanced data set, which realizes deep fusion of mechanism knowledge and data-driven, provides training materials with higher information density and richness for subsequent high-precision prediction. Feature analysis and standardization preprocessing are performed on the enhanced data set to mine the internal correlation between variables to guide feature selection and unify the data scale, which can improve the subsequent training efficiency, convergence speed and prediction stability. The rolling prediction model is constructed and dynamically optimized using the enhanced data set to obtain a time series rolling prediction model, which has the beneficial effect of giving the model the ability of continuous learning and self-evolution, and can track and adapt to the dynamic changes of the sewage treatment process (such as seasonal replacement and fluctuation of influent water quality), effectively overcoming the defect of performance decay of traditional static model prediction with time. The final prediction result output according to the time series rolling prediction model can provide high-precision, high-reliability and forward-looking effluent water quality prediction for the sewage treatment plant.

[0080] In some embodiments, step S101 can include but is not limited to steps S111-S114:

[0081] Step S111, collecting water quality data of influent and effluent; the water quality data of influent and effluent includes chemical oxygen demand, biochemical oxygen demand, ammonia nitrogen, total nitrogen, total phosphorus and suspended solids information; the influent and effluent include influent and effluent;

[0082] Step S112, collecting process operation parameters; the process operation parameters include dissolved oxygen, pH value, temperature, influent and effluent flow, sludge load, aeration quantity, dosing quantity and sludge retention time;

[0083] Step S113, collecting process design parameters; the process design parameters include volume, area and water depth parameters of treatment units of treatment tanks of the sewage treatment plant; the treatment tanks include pre-anoxic tank, anoxic tank, anaerobic tank, aerobic tank and secondary sedimentation tank;

[0084] Step S114, taking the water quality data of influent and effluent, process operation parameters and process design parameters as historical operation data of the sewage treatment plant.

[0085] In steps S111-S114 of some embodiments, the water quality data of influent and effluent are used to define the starting point (influent condition) and the end point (effluent target) of the modeling. By covering key pollution indicators such as chemical oxygen demand, biochemical oxygen demand, ammonia nitrogen, total nitrogen, total phosphorus and suspended solids information, a comprehensive evaluation benchmark and prediction target are provided for the model. The process operation parameters reveal the process variables connecting the influent and the effluent, and collecting them enables the model to establish a quantitative relationship between control behavior and treatment effect, providing a basis for subsequent process optimization and intelligent control. The process design parameters provide a physical basis for modeling, making the digital model consistent with the structure of the physical plant, thereby improving the reliability and engineering application value of the simulation results of the subsequent mechanism model.

[0086] In some embodiments, step S102 can include but is not limited to steps S201-S203:

[0087] Step S201, establishing an initial mechanism model in a simulation platform based on design drawings and historical operation data of the sewage treatment plant;

[0088] Step S202, identifying key parameters of the initial mechanism model using a sensitivity analysis method, and optimizing the key parameters using a Hyperopt optimization algorithm to obtain an optimal parameter combination;

[0089] Step S203, calibrating the initial mechanism model according to the optimal parameter combination to obtain a sewage biochemical treatment mechanism model.

[0090] In steps S201-S203 of some embodiments, the key parameters that have the greatest impact on the model output are identified through sensitivity analysis, which can reduce the complexity of the optimization problem.

[0091] In some embodiments, step S202 can include, but is not limited to, steps S221-S224:

[0092] Step S221, perturbing each parameter of the initial mechanism model within a preset range and collecting water quality data of the effluent under the corresponding perturbation condition;

[0093] Step S222, calculating the response change of each parameter to each water quality index under the perturbation condition according to the water quality data of the effluent, to obtain local sensitivity index data of each parameter;

[0094] Step S223, performing parameter screening according to the local sensitivity index data of each parameter and a preset sensitivity threshold, to obtain the key parameters;

[0095] Step S224, taking the average absolute percentage error of the simulation results and the measured values of the water quality indexes of the effluent as the optimization objective, and using the Hyperopt optimization algorithm to optimize the key parameters, and iterating to a preset number of times to obtain the optimal parameter combination.

[0096] In step S221 of some embodiments, the initial mechanism model can be run using default parameters or the current best estimated parameters to obtain a set of baseline effluent water quality data, and then each of the model parameters to be analyzed is perturbed one by one X j , and perturbed positively and negatively (for example X j × (1±10%) ). After each perturbation, the mechanism model is run with the other parameters remaining unchanged, and the simulation results of the effluent water quality indexes (such as COD, TN, TP, etc.) are collected. By collecting all the data of the effluent indexes under the perturbation of all parameters, a data basis is provided for subsequent sensitivity quantification.

[0097] In step S222 of some embodiments, for each parameter X j and each effluent index Y i , the baseline value X j0 , Y i0 and the perturbed data X j0 + Δ X j , Y i0 + ΔY i ), the local sensitivity index data is calculated using a numerical approximation formula based on the Jacobian matrix, the sensitivity of all parameters combined with all effluent indicators is calculated to form a sensitivity matrix, and by comparing the absolute values of the local sensitivity index, the dominant parameters that have the greatest impact on a specific effluent indicator can be identified to guide the model calibration.

[0098] In step S223 of some embodiments, the sensitivity matrix is traversed, and the sensitivity of each parameter (local sensitivity index data) is compared with a threshold value. If the sensitivity of a parameter to any effluent indicator exceeds the threshold value, it is marked as a "key parameter", which can enable calibration work to focus on important parameters and improve efficiency.

[0099] In step S224 of some embodiments, a function is written whose input is a combination of key parameters and whose output is the average absolute percentage error (MAPE) between the model simulation effluent and the historical measured effluent under these parameters. The smaller the MAPE, the better the parameter combination, which can achieve full automation of the model calibration process.

[0100] In some embodiments, step S103 can include but is not limited to step S301:

[0101] Step S301, align and merge the simulation results of the wastewater biochemical treatment mechanism model and the measured operation data in chronological order, use the simulation results as input features, and use the measured effluent water quality data as target variables to obtain an enhanced data set.

[0102] In step S301 of some embodiments, the source of the simulation results of the wastewater biochemical treatment mechanism model: input the historical influent data and process operation parameters into the calibrated wastewater biochemical treatment mechanism model, run the simulation, and obtain a set of simulation effluent water quality data corresponding to the historical data in the same period in the form of time series. The measured operation data includes historical influent water quality data, process operation parameters, and real measured effluent water quality data in the same period as the simulation results. The enhanced data set can enable the model to learn effective rules more quickly even with limited historical data.

[0103] In some embodiments, step S104 can include but is not limited to steps S401 to S402:

[0104] Step S401, analyze the correlation between simulation variables and actual effluent and influent water quality parameters based on the enhanced data set, the internal relationship between simulation variables, and their relationship with the pre-set core operation parameters to obtain feature analysis data;

[0105] Step S402: Based on the feature analysis data, the Z-score standardization method is used to preprocess the augmented dataset to reduce the differences between different indicators due to physical dimensions and numerical ranges to a preset range, thus obtaining the preprocessed augmented dataset.

[0106] In step S401 of some embodiments, statistical methods (such as Pearson correlation coefficient) are used to calculate the degree of linear correlation between all pairs of variables in the enhanced dataset, including the correlation between simulated variables and actual effluent water quality parameters, the correlation between simulated variables and influent water quality parameters, the correlation between simulated variables and core operating parameters, and the intrinsic correlation between simulated variables. Based on the correlation analysis results, conclusions are drawn regarding which features are highly correlated with the target variable (measured effluent) and which features have strong correlations, providing data support for feature selection.

[0107] In step S402 of some embodiments, considering that the units of the features in the dataset are different and the numerical ranges vary greatly, standardization transforms all features to the same scale, thus avoiding the model being dominated by features with large numerical ranges (such as traffic).

[0108] In some embodiments, step S105 may include, but is not limited to, steps S501 to S502:

[0109] Step S501: Grid search is used to optimize the hyperparameters of several machine learning models to obtain the optimal combination of model parameters for predicting effluent water quality indicators; the types of machine learning models include linear regression, support vector machine, K-nearest neighbor algorithm, random forest and artificial neural network;

[0110] Step S502: Based on the optimal combination of model parameters, construct the corresponding machine learning algorithm prediction model, train and evaluate it for different effluent water quality indicators, evaluate the generalization ability and prediction performance of each model by comparing the prediction results on the test set, and select the model with the best performance as the rolling prediction model.

[0111] In step S501 of some embodiments, a hyperparameter grid to be optimized is defined for each selected machine learning algorithm (linear regression, SVM, KNN, random forest, ANN), and a metric for evaluating model performance (MAPE can be used) is specified. Cross-validation can be used to traverse all possible combinations in the hyperparameter grid. For each set of hyperparameters, cross-validation training is performed on the training set, and the average performance metric is calculated. After the grid search is completed, the set of hyperparameters with the best average performance in cross-validation is selected as the optimal hyperparameter combination (optimal model parameter combination) for that machine learning algorithm for a specific effluent water quality indicator.

[0112] In step S502 of some embodiments, using the optimal hyperparameter combination obtained in S501, the corresponding prediction model is reconfigured and fully trained on the entire training set. All trained prediction models (different algorithms, for different water quality indicators) are used to make predictions on the same test set that did not participate in any training, and their performance indicators (MAPE, etc.) on the test set are calculated and compared. For each effluent water quality indicator (such as TN, TP), the performance of all models on the test set is compared, and the model with the best prediction performance for that indicator is selected as the rolling prediction model for that indicator.

[0113] In some embodiments, step S106 can include but is not limited to including step S601:

[0114] Step S601, based on the preprocessed enhanced data set, step by step update the training set and test set time range, use the updated training set and test set to dynamically optimize the rolling prediction model, and train the time series rolling prediction model.

[0115] In step S601 of some embodiments, the preprocessed enhanced data set is divided into an initial training set and test set in chronological order (for example, the first 4 months of data are used as the training set, and the last 2 months of data are used as the test set) to train the first version of the prediction model M1. Over time, new actual operation data and effluent data for a period of time (e.g., 1 month) are collected. After simulation, fusion, and preprocessing with the mechanism model, a new data set D is formed. The new data set D is added to the end of the previous training set, and the test set is rolled over to the next time period (e.g., the initial test set is July-August, and after updating, the test set becomes September-October). The existing prediction model is retrained using the updated training set (or fine-tuned based on it), and a new version of the model M2 is obtained. M2 is verified using the updated test set to evaluate its performance in the new period. The verified new version of the model M2 is deployed as the current time series rolling prediction model, replacing the old M1 model. This mechanism enables the model to track and adapt to changes. Whether it is a slow increase in influent concentration or winter low temperature inhibition of nitrification, the model can adapt to these changes by absorbing the latest data, thereby exhibiting stronger robustness and reliability under various different operating conditions.

[0116] In some embodiments, the time series rolling prediction-based wastewater treatment model dynamic optimization method further comprises:

[0117] Step S108, using the mean absolute percentage error to evaluate the prediction performance of the time series rolling prediction model, and obtaining performance evaluation information;

[0118] Step S109, improving the time series rolling prediction model based on the performance evaluation information.

[0119] In step S108 of some embodiments, after the time series rolling prediction model is put into operation, the predicted values thereof on the test set or newly generated actual data and the corresponding true measured values are continuously collected, and performance evaluation information (overall MAPE value, MAPE value of different water quality indicators, and performance trend over time) is calculated. The present embodiment can enable the staff to understand the current health status and prediction accuracy of the model.

[0120] In step S109 of some embodiments, based on the performance evaluation information, different improvement measures can be triggered, including: when the MAPE value continuously and significantly exceeds the threshold value, the recent data is re-collected, and the sewage biochemical treatment mechanism model is recalibrated, so as to correct and enhance the quality of the data set from the source; when the MAPE of a certain specific water quality indicator (such as TP) is always high, while other indicators are normal, the super parameter optimization is re-performed for the specific indicator or other types of machine learning algorithms are tried to find a more suitable prediction model for it; when the performance of the model suddenly drops, check whether the sensor is malfunctioning, whether the data acquisition system is abnormal, whether the data preprocessing process is wrong, etc.

[0121] Next, the scheme of the embodiments of the present application will be described and explained in detail in combination with specific application examples:

[0122] As an optional implementation, with reference to Figure 2 The present embodiment includes the following steps:

[0123] S1, obtaining raw operation data of a sewage treatment plant:

[0124] S1.1, collecting historical operation data of the sewage treatment plant, covering multiple key indicators such as inflow and outflow water quality data, process operation parameters, and process design parameters;

[0125] Specifically, in the present embodiment, the raw data includes but is not limited to chemical oxygen demand (COD), biochemical oxygen demand (BOD), ammonia nitrogen (NH4 + -N), total nitrogen (TN), total phosphorus (TP), suspended solids (SS), dissolved oxygen (DO), pH value, temperature, inflow and outflow flow rate, sludge load, aeration quantity, dosing quantity, sludge retention time, etc.

[0126] S2, establishing a sewage biochemical treatment mechanism model:

[0127] S2.1, constructing an initial mechanism model based on the SUMO simulation platform and the built-in Sumo4N model;

[0128] Specifically, according to the design drawings of the sewage treatment plant and the on-site investigation, the initial mechanism model of the same process is built in SUMO 22 by referring to the actual process flow of the sewage treatment plant.

[0129] For example, Figure 3 This embodiment provides a process flow diagram determined based on the design data of a wastewater treatment plant.

[0130] This embodiment selects the process flow from the pre-anoxic tank to the effluent from the water treatment plant, including: inlet, pre-anoxic tank, anoxic tank, anaerobic tank, aerobic tank, secondary sedimentation tank, effluent, dewatering device, dosing device, and sludge discharge. After pretreatment by bar filtration and grit chamber, the influent enters the modified AAO treatment unit. Except for the internal recirculation portion, the remaining wastewater from the aerobic tank is mixed with PAC reagents and enters the secondary sedimentation tank. Subsequently, most of the sludge discharged from the secondary sedimentation tank is recirculated to the pre-anoxic tank, while the remainder is discharged as excess sludge. The supernatant from the secondary sedimentation tank is treated by a filter cloth filter before being discharged. Furthermore, the relevant parameters of each treatment unit (such as unit volume, area, water depth, etc.) are determined based on the design drawings and actual site conditions to ensure that the model has sufficient accuracy and reliability in reflecting the actual engineering situation.

[0131] S2.2. Calibrate and optimize the parameters of the initial mechanistic model by combining sensitivity analysis and the Hyperopt optimization algorithm:

[0132] S2.2.1. Use local sensitivity analysis to identify key parameters and optimize them:

[0133] S2.2.1.1. Based on the parameters of the original model (initial mechanism model), each parameter is perturbed by ±10% and the water quality data of the effluent under the corresponding perturbed conditions are collected.

[0134] S2.2.1.2 Calculate the response changes of each parameter to various water quality indicators under disturbance conditions, and obtain the local sensitivity index data of each parameter;

[0135] Specifically, by inputting parameters as The output is At a specific operation point The local sensitivity of the model can be measured by the Jacobian matrix. To indicate, of which the first i line, number j The elements of a column are defined as follows:

[0136] ;

[0137] Elements of the Jacobian matrix Indicates when the input parameter At the operation point Minor changes occurred nearby Changes in output Then calculate the output. The rate of change of the output. By analyzing the Jacobian matrix, the input parameters that have the greatest impact on the specific output can be identified, thereby providing guidance for model parameter calibration and optimization.

[0138] S2.2.1.3, collect the local sensitivity index data of all parameters, and preliminarily screen the results according to the pre-set sensitivity threshold, to obtain key parameters that have a significant impact on the output of the initial mechanism model;

[0139] S2.2.1.4, determine the parameter calibration scheme based on the sensitivity analysis screening results;

[0140] S2.2.2, obtain the optimal parameter combination based on the Hyperopt optimization algorithm:

[0141] S2.2.2.1, based on the 43 Sumo4N model parameters screened out, Hyperopt is used for automatic calibration, and the optimization target is the average MAPE of the simulation results of the six effluent water quality indicators (COD, BOD, NH4 + -N, TN, TP, SS) and the measured values, a total of 200 iterations;

[0142] S2.2.2.2, combine PyAutoGUI to realize the full-process automation of parameter input, model running and result collection;

[0143] S2.2.3, performance evaluation and verification of the biochemical treatment mechanism model of sewage;

[0144] Specifically, when evaluating the prediction performance of the biochemical treatment mechanism model of sewage, the mean absolute percentage error (MAPE) is used. The smaller the MAPE value, the smaller the relative deviation of the prediction result from the true value, and the better the model performance. The specific calculation method is as follows:

[0145] ;

[0146] In the formula: is the i th predicted value; is the i th actual value; is the i th actual value; is the total number of observations. Exemplarily, the embodiment of the application generates an optimal parameter combination using Hyperopt, inputs it into SUMO for simulation calculation, and automatically collects and analyzes the output data to dynamically adjust the parameters. The calibrated mechanism model shows good stability and prediction accuracy on the calibration set and the test set.

[0147] S3, fuse the simulation results and the measured data to form an enhanced data set:

[0148]

[0149] ​S3.1, obtain the result data of the sewage biochemical treatment mechanism model simulation after parameter calibration as a supplementary variable for model training;

[0150] Specifically, in the simulation process, the influent water quality, water quantity, aeration intensity, internal and external reflux ratio, PAC dosage and other operation data in each time period are input into the sewage biochemical treatment mechanism model which has completed parameter calibration, the sewage treatment system is simulated using the SUMO platform, and the COD, BOD, TN, NH4 + -N, TP, SS and other key water quality simulation results.

[0151] S3.2, align and merge the simulation results of the sewage biochemical treatment mechanism model with the measured operation data in time sequence, use the simulation results as input features, and use the measured effluent water quality data as target variables to form an enhanced data set.

[0152] S4, feature analysis and standardization preprocessing of the enhanced data set:

[0153] S4.1, analyze the correlation between the simulation variables and the actual effluent and influent water quality parameters based on the enhanced data set, the internal correlation between the simulation variables and the relationship between the simulation variables and the core operation parameters; the core operation parameters can be selected;

[0154] Specifically, the Pearson correlation coefficient between variables is calculated to quantitatively evaluate the linear correlation degree between indicators. The calculation formula of the Pearson correlation coefficient is as follows:

[0155] ;

[0156] In the formula: is the value of variable in the first sample; is the value of variable in the first sample; is the mean value of variable ; is the mean value of variable .

[0157] The value range of the Pearson correlation coefficient is , represents positive correlation, represents negative correlation, and the absolute value of is closer to 1, indicating a stronger linear correlation.

[0158] S4.2, the enhanced data set is preprocessed by using the Z-score standardization method to reduce the significant differences between different indicators due to the physical dimension and numerical range.

[0159] The Z-score standardization (mean-standard deviation normalization) method has the following formula:

[0160] ;

[0161] In the formula: is the original water quality value; is the mean of the water quality index; is the standard deviation of the index; is the normalized value.

[0162] S5, build a rolling prediction model:

[0163] S5.1, use grid search to optimize the hyperparameters of five machine learning (linear regression, support vector machine, K nearest neighbor algorithm, random forest and artificial neural network) models to obtain the optimal model parameter combination for predicting effluent water quality indicators;

[0164] S5.2, based on the optimized parameters, build prediction models based on five machine learning algorithms, train and evaluate different effluent water quality indicators, compare the prediction results on the test set, evaluate the generalization ability and prediction performance of each model, and select the optimal model as the rolling prediction model.

[0165] S6, update and dynamically optimize the rolling prediction model to obtain a time series rolling prediction model:

[0166] S6.1, select effluent TN as a representative indicator, gradually update the training set and test set time range, and build a rolling prediction model under different time periods;

[0167] Specifically, based on the enhanced data set, three rolling prediction models under different periods are constructed. First, select the data from April to June as the training set and the data from July to August as the test set to correct the effluent TN of the mechanism model; further use the same method, select the data from April to August as the training set and the data from September to October as the test set to obtain detailed prediction results. In addition, the training set is extended to April to October and the test set is November to December, and the rolling prediction model is further constructed to predict and correct the effluent TN. Based on the training set and test set of different time periods, the rolling prediction model is updated and dynamically optimized to obtain a time series rolling prediction model.

[0168] S7, output the sewage water quality prediction results:

[0169] S7.1, output water quality prediction results based on the time series rolling prediction model, and then use the MAPE evaluation model to evaluate the prediction performance of the model;

[0170] Specifically, the performance comparison results of the time series rolling prediction model of different period data sets are shown in Table 1. As can be seen from the table, the overall MAPE of the prediction model based on time series rolling update for the effluent TN in the three periods of July-August, September-October and November-December is 8.51%, 13.00% and 9.72% respectively, maintaining a low simulation error, further verifying that the time series rolling prediction model shows high fitting precision. This result shows that the rolling update strategy can not only significantly improve the prediction accuracy of the mechanism model, but also show stronger practicality and robustness in the context of gradually accumulating data and dynamic evolution of system state.

[0171] Table 1. Performance comparison of time series rolling prediction model for predicting effluent TN under different period data sets

[0172]

[0173] The embodiment of the present application also provides a sewage treatment model dynamic optimization system based on time series rolling prediction, which is used to realize the method as described above. The system comprises:

[0174] A first module is configured to collect historical operation data of a sewage treatment plant;

[0175] A second module is configured to establish and calibrate a model according to the historical operation data, and obtain a sewage biochemical treatment mechanism model;

[0176] A third module is configured to fuse the simulation results of the sewage biochemical treatment mechanism model and the measured operation data, and obtain an enhanced data set;

[0177] A fourth module is configured to perform feature analysis and standardization preprocessing on the enhanced data set, and obtain a preprocessed enhanced data set;

[0178] A fifth module is configured to construct a rolling prediction model;

[0179] A sixth module is configured to dynamically optimize the rolling prediction model according to the preprocessed enhanced data set, and obtain a time series rolling prediction model;

[0180] A seventh module is configured to predict according to the time series rolling prediction model, and obtain a sewage water quality prediction result.

[0181] It can be understood that the contents in the above method embodiment are applicable to the present system embodiment. The functions specifically realized by the present device embodiment are the same as those of the above method embodiment, and the beneficial effects achieved are also the same as those of the above method embodiment.

[0182] The embodiment of the application further provides an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the method described above when executing the computer program.

[0183] It can be understood that the contents in the method embodiments described above are applicable to the electronic device embodiments, the electronic device embodiments specifically implement the functions of the method embodiments described above, and achieve the same beneficial effects as the method embodiments described above.

[0184] The hardware structure of the electronic device of another embodiment comprises:

[0185] The processor can be implemented in the form of a general CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is used to execute related programs to implement the technical solutions provided by the embodiments of the application.

[0186] The memory can be implemented in the form of a ROM (Read Only Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory). The memory can store an operating system and other application programs. When the technical solutions provided by the embodiments of the application are implemented by software or firmware, the related program codes are stored in the memory and are called and executed by the processor to implement the method described above.

[0187] The input / output interface is used to realize information input and output.

[0188] The communication interface is used to realize the communication interaction between the device and other devices. The communication can be realized in a wired manner (for example, a USB, a network cable, etc.) or in a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.).

[0189] The bus is used to transmit information between various components (for example, the processor, the memory, the input / output interface, and the communication interface) of the device.

[0190] The processor, the memory, the input / output interface, and the communication interface are connected to each other through the bus to realize the communication connection between them in the device.

[0191] The embodiment of the application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by the processor to implement the method described above.

[0192] It can be understood that the contents in the above method embodiments are all applicable to the present storage medium embodiments, the present storage medium embodiments specifically implement the same functions as the above method embodiments, and achieve the same beneficial effects as the above method embodiments.

[0193] The present application also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the above method.

[0194] It can be understood that the contents in the above method embodiments are all applicable to the present program product embodiments, the present program product embodiments specifically implement the same functions as the above method embodiments, and achieve the same beneficial effects as the above method embodiments.

[0195] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory can include a high-speed random access memory and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory that is remotely arranged relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0196] The method, system, electronic device, storage medium and program product provided by the present application are based on time sequence rolling prediction of sewage treatment model, which establishes a mechanism model (sewage biochemical treatment mechanism model) simulating the sewage biochemical treatment process based on the original operation data (historical operation data) of the sewage treatment plant; the simulation results of the mechanism model are time-aligned and data-fused with the measured data to form an enhanced data set containing input features and target variables; the enhanced data set is subjected to feature correlation analysis and standardized pretreatment; a prediction model with time sequence rolling capability is constructed, and the model is dynamically adapted and optimized by gradually updating the time range of the training set and the test set. The method can continuously correct the prediction results of the mechanism model in the process of gradually accumulating the operation data of the sewage treatment plant, significantly improve the accuracy, stability and real-time performance of the sewage quality prediction, and provide an effective technical solution for constructing an intelligent, low-cost and generalizable sewage treatment prediction system.

[0197] The embodiments described in the present application are used to more clearly illustrate the technical solutions of the present application, and do not constitute a limitation on the technical solutions provided by the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the present application are also applicable to similar technical problems.

[0198] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation to the embodiments of the present application, and can include more or fewer steps than the figures, or combine certain steps, or different steps.

[0199] The apparatus embodiments described above are merely illustrative, and units described as separate components can or can not be physically separate, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments.

[0200] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the function modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.

[0201] The terms "first", "second", "third", "fourth" and the like used in the description of the present application and the above-described drawings (if any) are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0202] It should be understood that in the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" is used to describe the association between the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases: only A, only B, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can mean a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0203] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiments described above are merely illustrative, for example, the division of the above units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, and can be electrical, mechanical or other forms.

[0204] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they can be located in one place or distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0205] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0206] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art that makes a contribution or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.

[0207] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, but this does not limit the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.

Claims

1. A wastewater treatment model dynamic optimization method based on time series rolling prediction, characterized in that, The method comprises the following steps: Collecting historical operation data of a sewage treatment plant; Model establishment and calibration are performed according to the historical operation data, to obtain a sewage biochemical treatment mechanism model; The simulation results of the sewage biochemical treatment mechanism model and the measured operation data are fused to obtain an enhanced data set; Feature analysis and standardization preprocessing are performed on the enhanced data set to obtain a preprocessed enhanced data set; A rolling prediction model is constructed; The rolling prediction model is dynamically optimized according to the preprocessed enhanced data set, to obtain a time-series rolling prediction model, comprising: Based on the preprocessed enhanced data set, the time range of the training set and the test set is updated step by step, and the rolling prediction model is dynamically optimized by using the updated training set and test set, to train a time-series rolling prediction model; The preprocessed enhanced data set is divided into an initial training set and a test set in chronological order, and a first version of the prediction model is trained; Actual operation data and effluent data of a new time period are collected, and after simulation, fusion and preprocessing of the sewage biochemical treatment mechanism model, a new data set is formed; The new data set is added to the end of the initial training set, the test set is rolled to the next time period, the first version of the prediction model is retrained using the updated training set, a new version of the model is obtained, the new version of the model is verified using the updated test set, and its performance in the new period is evaluated, the verified new version of the model is deployed as the current time-series rolling prediction model, replacing the first version of the prediction model; The rolling prediction model is updated and dynamically optimized based on the training set and the test set of different time periods, to obtain a time-series rolling prediction model; The time-series rolling prediction model is used for prediction, to obtain a sewage water quality prediction result; The simulation results of the sewage biochemical treatment mechanism model and the measured operation data are fused to obtain an enhanced data set, comprising: The simulation results of the sewage biochemical treatment mechanism model and the measured operation data are aligned and merged in chronological order, the simulation results are used as input features, and the measured effluent water quality data are used as target variables, to obtain an enhanced data set.

2. The method of claim 1, wherein, The historical operation data of the sewage treatment plant are collected, comprising: Water quality data of influent and effluent are collected; the water quality data of influent and effluent include chemical oxygen demand, biochemical oxygen demand, ammonia nitrogen, total nitrogen, total phosphorus and suspended solids information; the influent and effluent include influent and effluent; Process operation parameters are collected; the process operation parameters include dissolved oxygen, pH value, temperature, influent and effluent flow, sludge load, aeration quantity, dosing quantity and sludge retention time; Process design parameters are collected; the process design parameters include volume, area and water depth parameters of treatment units of treatment tanks of the sewage treatment plant; the treatment tanks include pre-anoxic tanks, anoxic tanks, anaerobic tanks, aerobic tanks and secondary sedimentation tanks; The water quality data of influent and effluent, the process operation parameters and the process design parameters are used as the historical operation data of the sewage treatment plant.

3. The method of claim 1, wherein, The model establishment and calibration are performed according to the historical operation data, to obtain a sewage biochemical treatment mechanism model, comprising: Based on design drawings and historical operation data of a sewage treatment plant, an initial mechanism model is established in a simulation platform; Sensitivity analysis is used to identify key parameters of the initial mechanism model, and Hyperopt optimization algorithm is used to optimize the key parameters to obtain an optimal parameter combination; The initial mechanism model is calibrated according to the optimal parameter combination to obtain a sewage biochemical treatment mechanism model.

4. The method of claim 3, wherein, The sensitivity analysis is used to identify the key parameters of the initial mechanism model, and the Hyperopt optimization algorithm is used to optimize the key parameters to obtain an optimal parameter combination, including: The parameters of the initial mechanism model are disturbed in a preset range, and water quality data of effluent under the corresponding disturbance condition are collected; According to the water quality data of the effluent, the response changes of each parameter under the disturbance condition to each water quality index are calculated to obtain local sensitivity index data of each parameter; According to the local sensitivity index data of each parameter, parameter screening is performed according to a preset sensitivity threshold to obtain key parameters; The average absolute percentage error of the simulation results and the measured values of the water quality indexes of the effluent is taken as the optimization target, and the Hyperopt optimization algorithm is used to optimize the key parameters, and the iteration is performed to a preset number of times to obtain an optimal parameter combination.

5. The method of claim 1, wherein, The feature analysis and standardization preprocessing of the enhanced data set are performed to obtain a preprocessed enhanced data set, including: Based on the enhanced data set, the correlation between the simulation variables and the actual effluent and influent water quality parameters, the internal correlation between the simulation variables, and the relationship with the preset core operation parameters are analyzed to obtain feature analysis data; According to the feature analysis data, the enhanced data set is preprocessed by using a Z-score standardization method to reduce the difference values between different indexes due to the physical dimension and numerical range to a preset range to obtain a preprocessed enhanced data set.

6. The method of claim 1, wherein, The rolling prediction model is constructed, including: Grid search is used to optimize the hyperparameters of a plurality of machine learning models to obtain an optimal model parameter combination for predicting effluent water quality indexes; the types of the machine learning models include linear regression, support vector machine, K-nearest neighbor algorithm, random forest, and artificial neural network; Based on the optimal model parameter combination, a prediction model of the corresponding machine learning algorithm is constructed, which is trained and evaluated for different effluent water quality indexes, the generalization ability and prediction performance of each model are evaluated by comparing the prediction results on the test set, and the model with the optimal performance is selected as the rolling prediction model.

7. The method of claim 1, wherein, The method further includes: The prediction performance of the time series rolling prediction model is evaluated by using the mean absolute error percentage to obtain performance evaluation information; The time series rolling prediction model is improved based on the performance evaluation information.

8. A dynamic optimization system for wastewater treatment models based on time series rolling predictions for implementing the method according to any one of claims 1 to 7, characterized in that, The system includes: A first module is configured to collect historical operation data of a sewage treatment plant; A second module is configured to establish and calibrate a model based on the historical operation data to obtain a sewage biochemical treatment mechanism model; A third module is configured to fuse simulation results and measured operation data of the sewage biochemical treatment mechanism model to obtain an enhanced data set; A fourth module is configured to perform feature analysis and standardization preprocessing on the enhanced data set to obtain a preprocessed enhanced data set; A fifth module is configured to construct a rolling prediction model; A sixth module is configured to dynamically optimize the rolling prediction model according to the preprocessed enhanced data set to obtain a time-series rolling prediction model; A seventh module is configured to perform prediction according to the time-series rolling prediction model to obtain a sewage water quality prediction result.

Citation Information

Patent Citations

  • Method for reducing environmental influence of sewage treatment plant by coupling mechanism-mathematical model

    CN118568457A

  • Sewage plant total nitrogen concentration real-time prediction and process regulation and control method based on optimization integration algorithm

    CN120595735A