Accurate dosing method for sewage plant based on automatic machine learning
By applying automatic machine learning technology in sewage plants, the ‘water inlet-dose-effluent’ prediction model is built, and the real-time and accuracy of dosage adjustment in sewage plants is solved, efficient and accurate dosing control is achieved, and the performance of sewage treatment system is improved.
Patent Information
- Application Number
- CN202411556490.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-03-25
AI Technical Summary
It is difficult for sewage plants to adjust the dosage amount in real time and accurately during the dosing process, and cannot quickly respond to fluctuations in the incoming water quality, resulting in inefficient dosing. In addition, traditional machine learning models rely on complex feature engineering and manual parameter adjustment, making it difficult to adapt to the specific conditions of different sewage treatment plants.
Using an automatic machine learning method, by obtaining the historical data of the sewage plant, a ‘water inlet-dose-effluent’ prediction model is constructed, and the optimal model and hyperparameters are automatically selected to achieve accurate adjustment of dosage, and through the iterative optimization process, we ensure that the effluent water quality meets the requirements for meeting the standards.
It improves the real-time and accuracy of drug dosing decisions, reduces drug waste, reduces operating costs, and improves the efficiency and reliability of the sewage treatment system.
Smart Images

Figure CN119692494A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a precise dosing method for a sewage treatment plant based on automatic machine learning, belonging to the technical field of precise dosing in a sewage treatment process of a sewage treatment plant. Background Art
[0002] With increasingly stringent environmental regulations and the increasing problem of water pollution, sewage treatment plants are facing increasing pressure to meet water quality standards. In the sewage treatment process, the addition of chemicals (such as coagulants, flocculants, etc.) is one of the key links to ensure the treatment effect. The rationality of the dosage not only directly affects the effluent water quality, but is also closely related to operating costs and environmental friendliness. Excessive dosage of chemicals may lead to waste of chemicals, increased treatment costs, and secondary pollution; while insufficient chemicals may lead to poor treatment effects and effluent water quality failing to meet standards. Therefore, how to accurately adjust the dosage according to changes in water quality parameters has become an urgent problem that sewage treatment plants need to solve.
[0003] At present, the dosing method of sewage treatment plants mainly relies on empirical rules and on-site judgment of operators. This traditional method has multiple problems: first, it is difficult to adjust the dosage of dosing in real time and accurately with artificial empirical methods, and it is impossible to quickly respond to the fluctuation of influent water quality, resulting in low dosing efficiency; second, the influent composition of different sewage treatment plants is complex and changeable, and the influent water quality characteristics are significantly affected by external environmental factors (such as rainfall, temperature, etc.), and empirical rules are difficult to maintain consistent dosing effects under different conditions; third, the reasonable setting of dosing amount often requires long-term on-site data accumulation, and the dosing system of existing sewage treatment plants lacks data-driven intelligent means, making it difficult to effectively use existing historical data for model optimization.
[0004] With the rapid development of data analysis technology and artificial intelligence, machine learning has provided a new solution for precise dosing in sewage treatment. However, traditional machine learning models often require complex feature engineering and manual parameter adjustment, relying on experienced technical experts to build and optimize the model. This approach is often difficult to find a universal dosing model when faced with complex process systems in different sewage treatment plants, and the specific conditions of different plant sites limit the generalization ability of the model. For this reason, sewage plants often need to spend a lot of time and human resources to build and maintain machine learning models, which makes traditional methods face great limitations in practical applications.
[0005] In addition, traditional precision dosing schemes are highly dependent on feedback data after on-site implementation to adjust the scheme. The adjustment of dosing amount often requires feedback based on the test results of effluent water quality, and effluent water quality data is usually only available after the entire treatment process is completed. Due to the long treatment time involved in the water treatment process, there is a significant time delay between dosing and result feedback, which makes it impossible for the dosing adjustment scheme to respond to changes in influent conditions in a timely manner, which may lead to poor treatment results. Summary of the invention
[0006] In order to improve the accuracy of dosing control in sewage treatment plants, the present invention provides a precise dosing method for sewage treatment plants based on automatic machine learning. The technical solution is as follows:
[0007] Step 1: Obtain the historical influent data, historical dosing data, and historical effluent data of the sewage treatment plant, perform quality control and data standardization on the data, and divide the data into training data set and test data set;
[0008] Step 2: Using the training data set and the test data set, train and test the automatic machine learning model to obtain a water outlet prediction model, wherein the water outlet prediction model predicts the water outlet data based on the water inlet data and the dosing data;
[0009] Step 3: Obtain the current dosing rules of the sewage treatment plant, count the dosing amounts corresponding to each influent data, and obtain the current dosing sample data set of the sewage treatment plant;
[0010] Step 4: extract each sample data in the dosing sample data set, input it into the effluent prediction model, and obtain the effluent water quality data corresponding to each sample;
[0011] Step 5: Compare the effluent water quality data with the sewage treatment plant water quality compliance threshold: if the effluent water quality data is greater than the preset threshold, the dosage corresponding to the sample is increased; if the effluent water quality data is less than the preset threshold, the dosage corresponding to the sample is reduced;
[0012] Step 6: Repeat steps 4 and 5 to continuously update the dosing sample data set of the sewage treatment plant until the effluent water quality data interval corresponding to each sample is within the preset water quality standard range of the sewage treatment plant.
[0013] Optionally, the historical data acquired in step 1 includes: the inlet flow rate and the inlet water quality before the dosing process, the dosing flow rate per hour, and the outlet flow rate and the outlet water quality after the dosing process.
[0014] Optionally, step 3 includes:
[0015] Obtain the current dosing rules of the sewage treatment plant, quantify the dosing rules, and count the dosing amounts corresponding to each influent water quality and quantity data;
[0016] Each quantified influent water quality data, water volume data and corresponding dosage are constructed into a sample data, and all sample data are sorted according to the "influent-dosage" standard to form the dosing sample data set of the sewage treatment plant.
[0017] Optionally, in step 5, if the predicted effluent water quality exceeds the standard threshold of the sewage treatment plant, the dosage of the sample is increased by 10%; if the predicted effluent water quality is less than 90% of the standard threshold, the dosage of the sample is reduced by 10%.
[0018] The present invention provides a precise dosing system for a sewage treatment plant, comprising:
[0019] A data set construction module is configured to obtain historical influent data, historical dosing data, and historical effluent data of the sewage treatment plant, perform quality control and data standardization on the data, and divide the data into a training data set and a test data set;
[0020] A prediction model training module is configured to train and test the automatic machine learning model using the training data set and the test data set to obtain a water outlet prediction model, wherein the water outlet prediction model predicts the water outlet data based on the water inlet data and the dosing data;
[0021] The dosing sample data set construction module is configured to obtain the current dosing rules of the sewage treatment plant, count the dosing amounts corresponding to each influent data, and obtain the current dosing sample data set of the sewage treatment plant;
[0022] A water quality prediction module is configured to extract each sample data in the dosing sample data set, input it into the effluent prediction model, and obtain effluent water quality data corresponding to each sample;
[0023] The adjustment module is configured to compare the effluent water quality data with the water quality standard threshold of the sewage treatment plant: if the effluent water quality data is greater than the preset threshold, the dosage corresponding to the sample is increased; if the effluent water quality data is less than the preset threshold, the dosage corresponding to the sample is reduced, and the adjustment is repeated until the effluent water quality data interval corresponding to each sample is within the preset water quality standard range of the sewage treatment plant.
[0024] Optionally, the historical data acquired in the data set construction module includes: the inlet flow rate and the inlet water quality before the dosing process, the hourly dosing flow rate, and the outlet flow rate and the outlet water quality after the dosing process.
[0025] Optionally, the dosing sample data set construction module obtains the current dosing rules of the sewage treatment plant, quantifies the dosing rules, and counts the dosing amounts corresponding to each influent water quality and water quantity data; constructs each quantized influent water quality data, water quantity data and corresponding dosing amount into a sample data, and sorts all the sample data according to the "influent-dosing" standard to form a dosing sample data set for the sewage treatment plant.
[0026] Optionally, in the adjustment module, if the predicted effluent water quality exceeds the standard threshold of the sewage treatment plant, the dosage of the sample is increased by 10%; if the predicted effluent water quality is less than 90% of the standard threshold, the dosage of the sample is reduced by 10%.
[0027] The present invention provides a precise dosing device for a sewage treatment plant, characterized in that it comprises a memory and a processor;
[0028] The memory is used to store computer programs;
[0029] The processor is used to implement the precise dosing method for a sewage treatment plant as described in any of the above items when executing the computer program.
[0030] The present invention provides a computer-readable storage medium, characterized in that a computer program is stored on the storage medium, and when the computer program is executed by a processor, the precise dosing method for a sewage treatment plant as described in any one of the above items is implemented.
[0031] The beneficial effects of the present invention are:
[0032] (1) The present invention uses automatic machine learning (AutoML) technology to train the "influent-dosing-effluent" prediction model of the sewage treatment plant, thereby solving the complex parameter adjustment and feature engineering problems in traditional machine learning methods. AutoML automatically selects the optimal model and hyperparameters, gets rid of the high dependence on professional and technical knowledge, and enables the sewage treatment plant to build an efficient and accurate dosing model under limited manpower and resource conditions. Compared with traditional machine learning methods, AutoML can more flexibly adapt to different sewage treatment environments, quickly respond to changes in influent water quality, and improve the real-time and accuracy of dosing decisions. This innovative solution provides an intelligent and automated solution to the problem of accurate dosing in sewage treatment, greatly improving the efficiency and reliability of sewage treatment systems.
[0033] (2) The present invention constructs a "water inlet-drug addition-effluent" prediction model for a sewage treatment plant, designs an iterative optimization process based on the model, and solves the problem that the traditional dosing scheme is highly dependent on field feedback data. In the traditional scheme, dosing adjustments often need to wait for the effluent water quality test results. This lag limits the timeliness of dosing decisions. The present invention calculates the effluent water quality under different dosing amounts in advance through a prediction model, and can directly optimize the dosing scheme without relying on field feedback data. Through multiple rounds of iterative optimization, the present invention can gradually adjust the dosage to ensure that the effluent water quality meets the standard requirements while reducing the waste of reagents. This iterative adjustment based on the prediction model not only improves the accuracy of dosing, but also shortens the adjustment cycle, so that the dosing scheme can quickly adapt to changes in inlet conditions, further improving the efficiency and effectiveness of sewage treatment. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0035] Figure 1 This is a schematic diagram of the overall process of a precise dosing method for a sewage treatment plant based on automatic machine learning of the present invention.
[0036] Figure 2 It is a scatter plot of the prediction effect of the prediction model of the "intake-drug addition-effluent" process of the urban sewage plant of the present invention on the total phosphorus in the effluent.
[0037] Figure 3 It is a scatter plot of the prediction effect of the prediction model of the "water inlet-drug addition-water outlet" process of the urban sewage plant of the present invention on the water outlet flow rate. DETAILED DESCRIPTION
[0038] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0039] Embodiment 1:
[0040] This embodiment provides a method for accurate dosing of sewage treatment plants based on automatic machine learning, which specifically includes the following steps:
[0041] Step S1: Obtain historical water quality and quantity data and dosing data of the sewage treatment plant, perform quality control and data standardization on the data, and divide the data into training data set and test data set.
[0042] Step S1.1: Obtain historical water quality and quantity data of the sewage treatment plant for at least one year, as well as the corresponding dosage data. Taking the common dosing phosphorus removal process in urban sewage treatment plants as an example, the historical data that need to be obtained include at least: the instantaneous influent flow rate (Inflow) and instantaneous influent total phosphorus (TPin) before the dosing process, the hourly dosing flow rate of polyaluminum (PAC) and polyferric (PAFC) agents, and the effluent flow rate (Outflow) and effluent total phosphorus (TPout) after the dosing process.
[0043] Large amounts of high-quality data are critical to building machine learning models. Machine learning models learn patterns and regularities from historical data. If the amount of training data is sufficient and of high quality, the model can more accurately capture complex feature relationships and generate models with stronger predictive capabilities. Large amounts of data enable the model to handle a wider range of input situations and cover more boundary conditions, thereby improving its generalization ability, that is, its performance on unknown data. This is critical to avoiding model overfitting. Overfitting means that the model performs well on the training data but performs poorly on new data, and sufficient data can help reduce this phenomenon.
[0044] In the dosing model of sewage treatment, there are many factors that affect the dosage and water quality, such as influent flow, water quality characteristics, etc. Only a large amount of data can provide enough samples to reflect these complex influencing factors and help the model identify the potential relationship between these variables. In the case of a small data set, a small amount of noise or abnormal data may have a significant negative impact on the model, causing the model to mislearn these noises, thereby reducing the prediction performance. A large amount of data can effectively "dilute" these noises, allowing the model to better identify the dominant trend and ignore the interference of individual abnormal points.
[0045] In this embodiment, in order to construct a numerical model of the dosing and phosphorus removal process of a municipal sewage treatment plant, it is necessary to extract at least one year of water quality and quantity data and corresponding dosing data from the historical data records of the sewage treatment plant. The key historical data that need to be collected include: Instantaneous inflow flow (Inflow): refers to the sewage inflow flow before the dosing process begins, usually an instantaneous value, recorded at hourly or smaller time intervals; Instantaneous total phosphorus in the inflow (TPin): the total phosphorus content in the sewage inflow, indicating the pollutant concentration of the sewage before entering the dosing system, usually in milligrams per liter (mg / L); Dosage: including the hourly dosing flow of common phosphorus removal chemicals, such as polyaluminum (PAC) and polyferric (PAFC). The dosage determines the strength of the phosphorus removal effect in sewage treatment, usually expressed in hourly dosage (L / h or kg / h); Instantaneous outflow flow (Outflow): the sewage outflow flow after the dosing process, recording the instantaneous flow change after the outflow, usually also recorded hourly; Instantaneous total phosphorus in the outflow (TPout): the total phosphorus content of the outflow after the sewage is dosed and treated, expressed in milligrams per liter (mg / L), used to measure the water quality improvement effect after the dosing treatment. These data will be used to analyze the relationship between inlet conditions, dosage and effluent quality, and provide support for subsequent dosing model training.
[0046] Step S1.2: Perform quality control and data standardization on the acquired data, including outlier removal and missing value processing, to ensure data quality, organize the data into a sample data set with a standard format, and then divide the data set into a training data set and a test data set: the training set is used for model construction, and the test set is used to verify the generalization ability of the model, usually divided in a ratio of 8:2 or 7:3.
[0047] In practice, due to various reasons such as sensor failure or data recording errors, actual data often has many outliers and missing values. These noises or abnormal data may have a significant negative impact on the model, causing the model to mislearn these noises, thereby reducing the prediction performance. Therefore, it is necessary to perform quality control and standardization on these data to ensure the validity and consistency of the data, ensure the high quality of the data input into the automatic machine learning model, and reduce the impact of abnormal data or noise.
[0048] In this embodiment, the acquired historical data is firstly subjected to outlier elimination, and abnormal data points are excluded by setting reasonable thresholds or adopting statistical methods (such as box plot analysis, Z value standardization, etc.) to prevent them from affecting the accuracy of model training. Subsequently, appropriate interpolation algorithms (such as linear interpolation, nearest neighbor interpolation, etc.) are used to fill in missing values, or samples with too many missing values are eliminated to ensure the continuity of the data. Next, the data that has passed quality control is formatted and organized into a sample data set with a standard format.
[0049] After the data is processed, the sample data set needs to be divided into a training data set and a test data set. The training set is used for the model training process, and the test set is used to evaluate the generalization ability of the model. Usually, a division ratio of 8:2 or 7:3 is used, that is, 80% (or 70%) of the data is used for training, and the remaining 20% (or 30%) is used for testing. Through such a division, it is ensured that the model can not only perform well on the training data, but also obtain a high prediction accuracy on the unseen test data.
[0050] Step S2: Call a suitable automatic machine learning framework, use the training data set of the sewage treatment plant as input data, adjust the model parameters for training, obtain the "influent-drug addition-effluent" prediction model suitable for the sewage treatment plant, and use the test data set to verify the model.
[0051] Step S2.1: Select a suitable automatic machine learning (AutoML) framework, such as Autogluon, Auto-sklearn, etc., and use the training data set in step S1 as the model input data. The AutoML framework will automatically select and train multiple machine learning models, such as decision trees, random forests, XGBoost, neural networks, etc., to find the optimal model. At the same time, according to the characteristics of the data, it will automatically adjust the model parameters and perform hyperparameter optimization to improve the prediction accuracy of the model.
[0052] Automatic machine learning (AutoML) aims to simplify the process of building machine learning models. By automating multiple steps of machine learning, non-expert users can easily build high-performance models. Its core principle is to automate complex tasks in traditional machine learning processes, including data preprocessing, feature engineering, model selection, hyperparameter tuning, and model evaluation. The AutoML framework has built-in multiple machine learning models (such as decision trees, random forests, gradient boosting machines, neural networks, etc.), which will automatically select the data model suitable for the current task, avoiding the complexity of manual model selection. At the same time, AutoML will automatically perform hyperparameter optimization and find the optimal parameter combination through methods such as cross-validation, grid search, or Bayesian optimization. After training multiple models, AutoML will automatically evaluate the model performance according to the set performance indicators (such as accuracy, mean square error, AUC, etc.), and finally select the optimal model.
[0053] Compared with traditional machine learning, AutoML has higher efficiency, stronger model tuning capabilities, and a wider range of application scenarios. Traditional machine learning requires professional algorithm knowledge and rich experience, and users need to manually select the appropriate model, feature engineering, hyperparameter tuning and other complex operations. AutoML automates the machine learning process so that people without a machine learning background can also use it, greatly reducing the complexity and threshold of model development. At the same time, through parallelization and multi-threaded processing, AutoML can quickly perform multiple model training and hyperparameter optimization tasks, significantly saving development time. Moreover, AutoML can use automated hyperparameter tuning technology, and through multiple attempts and automatic adjustments, it can often find model parameters that are better than manual parameter tuning, thereby improving the performance of the model.
[0054] Nowadays, various free or open source and commercially available AutoML platforms have been released, such as Amazon AutoGluon, Auto-Weka, TPOT, AutoKeras, Auto-Sklearn, H2O-Automl, Google Cloud Automl and Microsoft AzureML. Among them, the AutoGluon Tabular framework developed by the Amazon team has performed well in the training of tabular data: unlike other frameworks that focus on hyperparameter search optimization, AutoGluon prefers to use multi-model ensemble training, using multi-layer stacking + k-fold bagging to achieve better and more stable model effects. At the same time, in the selection of basic models, AutoGluon includes the gradient boosting tree model that has performed well in various tabular data competitions, and has also made targeted optimizations to the neural network model, such as adding embeddings for categorical variables and using skip-connection to further improve the model training effect.
[0055] In this embodiment, the AutoGluon Tabular framework is used for model training. The training data set divided in step S1 is used as the model input data, and the AutoGluon framework is called for model training. The data set contains the sewage plant's influent parameters (such as instantaneous influent flow rate Inflow, instantaneous influent total phosphorus concentration TPiin), dosing data (such as PAC and PAFC dosing flow rates) and effluent parameters (such as instantaneous effluent flow rate Outflow and effluent total phosphorus concentration TPout). These data will be used to train the model to establish the "influent-dosing-effluent" relationship.
[0056] The AutoGluon framework automatically selects and trains multiple machine learning models, and automatically adjusts the hyperparameters of each model to find the best configuration, and improves the generalization ability and prediction accuracy of the model through cross-validation or grid search. Finally, AutoGluon automatically selects the optimal model based on the model's performance indicators (such as accuracy, mean square error, etc.) and writes it to the model file.
[0057] Step S2.2: Use the test data set divided in step S1 to verify the model, calculate the model's accuracy, mean square error (MSE) and other performance indicators to ensure the robustness and accuracy of the model. Finally, obtain the "influent-drug addition-effluent" prediction model suitable for the sewage treatment plant, which is used to simulate the effluent water quality after drug addition under specific influent conditions.
[0058] After completing the model training, you need to use the divided test data set to verify the performance of the model to ensure that the model has strong generalization ability and can accurately predict future sewage treatment conditions. By testing the performance of the data set, you can verify whether the model has good robustness and stability, ensuring that the model not only performs well on the training set, but also can make accurate predictions on unseen data.
[0059] In this embodiment, the test data set that did not participate in the training in step S1 is input into the trained model. The test data set should be similar to the training data set, including parameters such as influent flow, influent total phosphorus concentration, dosage, and effluent total phosphorus concentration. For regression type tasks, the mean square error (MSE) is usually used to evaluate the predictive ability of the model to measure the difference between the model predicted value and the actual value. The smaller the MSE, the higher the prediction accuracy of the model. Based on the performance of the test set, the model with the best performance is finally selected as the prediction model for the "influent-dosing-effluent" process of the sewage treatment plant. This model will be able to predict the effluent water quality after dosing based on real-time influent data in future operations, providing support for the dosing decision of the sewage treatment plant.
[0060] Attached Figure 2 The scatter plot shows the prediction effect of the prediction model of the "influent-drug addition-effluent" process of the urban sewage plant finally obtained in this embodiment on the total phosphorus (TPout) in the effluent. Figure 3 The scatter plot shows the prediction effect of the model on the outflow. The horizontal axis is the actual data, the vertical axis is the predicted data, the color of each scatter point represents the density of scatter points around the point, the red solid line is the prediction trend line of all scatter points, and the black dotted line is the 1:1 line. The closer the two lines are, the better the prediction effect. Figure 2 and attached Figure 3It shows that the prediction model of "influent-dosing-effluent" of urban sewage treatment plants finally obtained in this embodiment has excellent prediction effect on effluent total phosphorus (TPout) and effluent flow (Outflow), with an average accuracy rate of over 90%. This shows that in this embodiment, based on the historical data of the sewage treatment plant, the AutoGluon Tabular framework is called for model training, and the prediction model finally obtained can accurately simulate the "influent-dosing-effluent" process of the sewage treatment plant, laying the foundation for the subsequent optimization process of sewage treatment plant dosing rules.
[0061] Step S3: Obtain the current dosing rules of the sewage treatment plant, count the dosing amounts corresponding to each influent water quality and quantity data, and obtain the current dosing sample data set of the sewage treatment plant.
[0062] Step S3.1: Obtain the current dosing rules of the sewage treatment plant, that is, the dosing decision rules under different conditions, such as: the dosing pump frequency or dosing pipe flow required within different water quality and water quantity data intervals, quantify the dosing rules, and count the dosing amounts corresponding to each influent water quality and water quantity data.
[0063] Usually, the dosing rules of sewage treatment plants are summarized and compiled based on historical data and manual experience. These rules are usually the dosing decisions made by operators based on experience or process standards under different water quality conditions and water volume parameters. For example, for data in different intervals such as the total phosphorus concentration of the influent and the flow rate of the influent, the corresponding dosing amount is set. The dosing rules may include the operating frequency of the dosing pump (such as the number of times the pump runs per minute) or the flow rate of the dosing pipeline (such as how many liters of reagent flow in per hour), which can be used as a quantitative basis for the dosing amount.
[0064] In this embodiment, these dosing decision rules are quantified and converted into a standard numerical format that can be calculated and analyzed. For example, the correspondence between different influent conditions (such as the influent total phosphorus concentration range, influent flow interval) and the dosage is sorted out in the form of a table or database. For each water quality parameter interval and flow interval, the corresponding dosing frequency or dosing flow is clarified to ensure that each input condition has a corresponding dosing strategy to match it. At the same time, it is necessary to conduct a preliminary calibration of the correlation between the existing dosage and the influent conditions to ensure that these quantitative rules can more accurately reflect the actual current operation of the sewage treatment plant.
[0065] Step S3.2: Construct each quantified influent water quality parameter, water volume data and corresponding dosage into a sample data, sort all sample data according to the "influent-dosage" standard to form the dosing sample data set of the sewage treatment plant. The purpose of these sample data is to establish a reference standard under the current dosing strategy to facilitate subsequent optimization.
[0066] After the quantification is completed, the water quality parameters and water volume data of each influent are associated with the corresponding dosage to construct each sample data. Each sample represents the dosage decision of the sewage treatment plant under a specific influent condition. All sample data are classified and sorted according to the "influent-dosing" standard to form a complete dosing sample data set. These data sets reflect the dosing operation of the sewage treatment plant under different water quality and water volume conditions, and can be used as a reference standard for the current dosing strategy. The sorted dosing sample data sets are stored in a standardized format for subsequent call and analysis. These sample data can not only be used for the subsequent generation of precise dosing optimization solutions, but also for verifying the effectiveness of the model.
[0067] In this embodiment, for the dosing and phosphorus removal process of a municipal sewage treatment plant, a sample data includes at least the following fields: instantaneous inflow flow rate Inflow, instantaneous inflow total phosphorus concentration TPiin and dosing amount data (PAC and PAFC instantaneous dosing flow rate). The above data are sorted and formatted in a standardized manner, and finally a dosing sample data set based on the current dosing rules of the sewage treatment plant is established. This data set provides a benchmark and reference for the subsequent optimization process of the automatic machine learning model, thereby providing a basis for formulating a more accurate dosing strategy.
[0068] Step S4: extract each sample data in the dosing sample data set, input it into the prediction model in step S2, and obtain the effluent water quality corresponding to each sample.
[0069] Step S4.1: Extract each sample data in the dosing sample data set obtained in step S3, including the inlet water quality and water volume data, as well as the dosing volume data, and input it into the "inlet water-dosing-outlet water" prediction model trained in step S2 to perform prediction and obtain the outlet water quality corresponding to each sample data.
[0070] From the dosing sample data set obtained in step S3, each sample data is extracted one by one. Each sample data should include the influent water quality parameters, influent flow rate, and corresponding dosing amount of the sewage treatment plant at a certain moment. The corresponding feature data in each sample data (i.e., influent water quality and water quantity data and dosing amount data) is input into the "influent-dosing-effluent" prediction model trained in step S2. The model has been trained with historical data and can predict the effluent water quality and quantity based on the input influent and dosing amount data. After receiving the input data, the prediction model will calculate and output the corresponding effluent water quality based on its internal learning rules.
[0071] In this embodiment, for the phosphorus removal process of urban sewage treatment plants, the instantaneous influent flow rate Inflow, instantaneous influent total phosphorus concentration TPiin and dosage data (PAC and PAFC instantaneous dosage flow rate) of the sewage treatment plant are input into the model, and the model will output the predicted effluent total phosphorus concentration (TPout) and effluent flow rate (Outflow). These parameters reflect the water quality effect after sewage treatment under the current dosage conditions.
[0072] Step S4.2: Record the predicted effluent quality data of each sample, one-to-one correspondence with each dosing sample data, for subsequent comparison and dosing amount adjustment.
[0073] The predicted effluent quality results of each sample are associated with the corresponding dosage and influent water quality data. Each sample data now contains not only the input influent and dosage data, but also the effluent water quality results predicted by the model. These predicted data will be recorded to form an extended dosing sample data set, including: influent flow and water quality data, corresponding dosage, and effluent water quality predicted by the model. In the subsequent iterative optimization process, these recorded effluent water quality prediction data will be compared with the water quality compliance standards of the sewage treatment plant to determine whether the dosage needs to be adjusted. The "influent-dosing-effluent" prediction model was used to simulate the effluent water quality in the sewage treatment process, providing a basis for dosing optimization. This process effectively reduces the reliance on actual on-site feedback data and simplifies the optimization process of dosing strategies.
[0074] In this embodiment, for the dosing phosphorus removal process of a municipal sewage treatment plant, the extended dosing sample data set specifically includes: the instantaneous inflow flow rate Inflow, the instantaneous inflow total phosphorus concentration TPiin, the dosing amount data (PAC and PAFC instantaneous dosing flow rate), the effluent total phosphorus concentration (TPout), and the effluent flow rate (Outflow). These data will be used for comparison and dosing amount optimization in subsequent steps.
[0075] Step S5: Compare the effluent water quality data with the sewage treatment plant water quality threshold: if the effluent water quality is greater than the threshold, the dosage corresponding to the sample is increased by 10%; if the effluent water quality is less than 90% of the threshold, the dosage corresponding to the sample is reduced by 10%.
[0076] Step S5.1: Obtain the effluent water quality threshold of the sewage treatment plant. For example, the effluent total phosphorus is required to be within 0.5 mg / L (TPout<0.5), and compare the effluent water quality data obtained in step S4 with the effluent water quality threshold of the sewage treatment plant.
[0077] Sewage treatment plants usually have effluent water quality compliance requirements as emission control standards. These thresholds usually include concentration limits for pollutants (such as total phosphorus, ammonia nitrogen, chemical oxygen demand, etc.) in the effluent outlet. According to the "Pollutant Discharge Standard for Municipal Wastewater Treatment Plants" (GB 18918-2002), the total phosphorus emission limit standard for the effluent outlet of urban sewage treatment plants is below 0.5 mg / L. Therefore, for the phosphorus removal process of urban sewage treatment plants, the water quality compliance threshold of the sewage treatment plant requires that the effluent total phosphorus concentration (TPout) must be less than 0.5 mg / L, which means that the predicted effluent total phosphorus concentration of each sample needs to meet this requirement.
[0078] In this embodiment, for each dosing sample data, the effluent water quality data predicted in step S4 is compared with the standard threshold of the sewage treatment plant. If the predicted effluent total phosphorus concentration (TPout) of a sample is higher than or equal to 0.5 mg / L, it means that the dosage is insufficient and the water quality cannot meet the standard; if the effluent total phosphorus concentration is lower than 90% of the standard value (i.e. TPout<0.45 mg / L), it is possible that too much medicine has been added, wasting medicine.
[0079] Step S5.2: If the predicted effluent water quality does not meet the standard or exceeds the standard, the dosage is adjusted accordingly. The specific adjustment rules are as follows: If the predicted effluent water quality exceeds the standard threshold of the sewage treatment plant (TPout≥0.5), it means that the dosage is insufficient. At this time, the dosage of the sample needs to be increased by 10%. If the predicted effluent water quality is less than 90% of the standard threshold (TPout<0.45), it means that the dosage is too much. At this time, the dosage of the sample needs to be reduced by 10%.
[0080] By comparing the predicted effluent water quality data with the water quality threshold of the sewage treatment plant, it is determined whether the dosage needs to be adjusted, thereby gradually optimizing the dosing plan.
[0081] In this embodiment, if the predicted effluent quality of the sample exceeds the standard, that is, TPout ≥ 0.5 mg / L, this indicates that the current dosage is insufficient and cannot meet the effluent quality requirements of the sewage treatment plant. At this time, the system will increase the dosage of the sample. The specific adjustment rule is: increase the dosage of the sample by 10%. For example, assuming that the current dosage of the sample is 100 L / h, the dosage will be increased to 110 L / h after adjustment.
[0082] If the predicted effluent quality of a sample is lower than 90% of the standard value, that is, TPout < 0.45mg / L, it means that the current dosage is too much, resulting in unnecessary waste of medicine. In this case, the system will reduce the dosage of the sample. The specific adjustment rule is: reduce the dosage of the sample by 10%. For example, assuming that the current dosage of the sample is 100L / h, the dosage will be reduced to 90L / h after adjustment.
[0083] By comparing the predicted effluent quality of each dosing sample with the standard threshold and adjusting the dosing amount according to the exceeding or overdosing situation, the system gradually optimizes the dosing strategy for sewage treatment. This can effectively improve the efficiency of the use of chemicals, ensure that the effluent quality meets the standard, reduce the waste of chemicals, and thus achieve the goal of accurate dosing.
[0084] Step S6: Repeat steps S4 and S5 to continuously update the dosing sample data set of the sewage treatment plant until the effluent water quality data interval corresponding to each sample is above 90% of the sewage treatment plant's water quality threshold, and output the final dosing sample data set, which contains the optimized dosing amount as the future precise dosing plan for the sewage treatment plant.
[0085] Step S6.1: Repeat the process of step S4 and step S5, and continuously update the dosing data of each sample. The model updates the predicted effluent water quality according to the continuously adjusted dosing amount until the effluent water quality data interval corresponding to each sample is above 90% of the sewage treatment plant water quality compliance threshold (0.45≤TPout<0.5).
[0086] By cyclically executing the previous steps S4 and S5, the dosing data of each sample is continuously optimized until the effluent water quality corresponding to all samples meets the standards of the sewage treatment plant. This process aims to achieve accurate optimization of the dosing plan, so that the sewage treatment process can not only ensure that the effluent water quality meets the standards, but also reduce the waste of chemicals.
[0087] In this embodiment, each sample data in the updated dosing sample data set, including the inlet water quality, water volume data and the current dosing amount data, is input again into the "inlet-dosing-outlet" prediction model that has been trained in step S2. Through the model, the effluent water quality corresponding to each sample is re-predicted to obtain new prediction data. Subsequently, the predicted effluent water quality is compared with the water quality compliance threshold of the sewage treatment plant again. If the effluent water quality exceeds the standard (TPout ≥ 0.5 mg / L) or is excessive (TPout < 0.45 mg / L), the dosing amount is adjusted by 10% increase or decrease according to the above rules. After adjusting the dosing amount, the sample data will be updated accordingly to generate a new round of dosing sample data set.
[0088] This process will be repeated continuously, and the system will iteratively optimize based on the prediction results and adjusted dosage in each cycle. In each iteration, the model will make predictions based on the latest dosage until the effluent quality of each sample meets more than 90% of the requirements for sewage treatment plant water quality, that is, total phosphorus TPout ≥ 0.45 mg / L and TPout < 0.5 mg / L.
[0089] Step S6.2: When the effluent water quality of all samples meets the standard, the final dosing sample data set is output. This data set contains the optimized dosing amount as an accurate solution for future dosing of the sewage treatment plant.
[0090] Through repeated iterations of this step, the system continuously adjusts the dosage and optimizes the effluent quality. The final output of the dosing sample data set can provide a precise dosing plan for the sewage treatment plant, ensuring that the dosing control in the sewage treatment process is more scientific and accurate, and greatly reducing the waste of chemicals, thereby improving the cost-effectiveness of sewage treatment.
[0091] In this embodiment, when the effluent water quality of each dosing sample data is within the reasonable range of the standard threshold (the effluent total phosphorus TPout is between 0.45mg / L and 0.5mg / L), it means that the system has found the optimal dosing amount. At this time, the dosing amount corresponding to each record in the dosing sample data set has been fully optimized to meet the effluent water quality requirements of the sewage treatment plant.
[0092] All optimized sample data are collated into the final dosing sample data set. This data set contains the final dosing amount for each sample, that is, the precise dosing plan after repeated iterative optimization. This dosing plan can be used as a reference for future operation of the sewage plant to accurately control the dosing amount to ensure that the effluent quality continues to meet the standards and achieve economic and efficient use of the reagents.
[0093] Some steps in the embodiments of the present invention may be implemented using software, and the corresponding software program may be stored in a readable storage medium, such as a CD or a hard disk.
[0094] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A precise dosing method for sewage treatment plants based on automatic machine learning, characterized in that: The method comprises: Step 1: Obtain the historical influent data, historical dosing data, and historical effluent data of the sewage treatment plant, perform quality control and data standardization on the data, and divide the data into training data set and test data set; Step 2: Using the training data set and the test data set, train and test the automatic machine learning model to obtain a water outlet prediction model, wherein the water outlet prediction model predicts the water outlet data based on the water inlet data and the dosing data; Step 3: Obtain the current dosing rules of the sewage treatment plant, count the dosing amounts corresponding to each influent data, and obtain the current dosing sample data set of the sewage treatment plant; Step 4: extract each sample data in the dosing sample data set, input it into the effluent prediction model, and obtain the effluent water quality data corresponding to each sample; Step 5: Compare the effluent water quality data with the sewage treatment plant water quality compliance threshold: if the effluent water quality data is greater than the preset threshold, the dosage corresponding to the sample is increased; if the effluent water quality data is less than the preset threshold, the dosage corresponding to the sample is reduced; Step 6: Repeat steps 4 and 5 to continuously update the dosing sample data set of the sewage treatment plant until the effluent water quality data interval corresponding to each sample is within the preset water quality standard range of the sewage treatment plant.
2. The precise dosing method for sewage treatment plants according to claim 1, characterized in that: The historical data obtained in step 1 include: the inlet flow rate and water quality before the dosing process, the hourly dosing flow rate, and the outlet flow rate and water quality after the dosing process.
3. The precise dosing method for sewage treatment plants according to claim 1, characterized in that: The step 3 comprises: Obtain the current dosing rules of the sewage treatment plant, quantify the dosing rules, and count the dosing amounts corresponding to each influent water quality and quantity data; Each quantified influent water quality data, water volume data and corresponding dosage are constructed into a sample data, and all sample data are sorted according to the "influent-dosage" standard to form the dosing sample data set of the sewage treatment plant.
4. The precise dosing method for sewage treatment plants according to claim 1, characterized in that: In step 5, if the predicted effluent quality exceeds the standard threshold of the sewage treatment plant, the dosage of the sample is increased by 10%. If the predicted effluent quality is less than 90% of the standard threshold, the dosage of the sample is reduced by 10%.
5. A precise dosing system for sewage treatment plants, characterized in that: The system comprises: A data set construction module is configured to obtain historical influent data, historical dosing data, and historical effluent data of the sewage treatment plant, perform quality control and data standardization on the data, and divide the data into a training data set and a test data set; A prediction model training module is configured to train and test the automatic machine learning model using the training data set and the test data set to obtain a water outlet prediction model, wherein the water outlet prediction model predicts the water outlet data based on the water inlet data and the dosing data; The dosing sample data set construction module is configured to obtain the current dosing rules of the sewage treatment plant, count the dosing amounts corresponding to each influent data, and obtain the current dosing sample data set of the sewage treatment plant; A water quality prediction module is configured to extract each sample data in the dosing sample data set, input it into the effluent prediction model, and obtain effluent water quality data corresponding to each sample; The adjustment module is configured to compare the effluent water quality data with the water quality standard threshold of the sewage treatment plant: if the effluent water quality data is greater than the preset threshold, the dosage corresponding to the sample is increased; if the effluent water quality data is less than the preset threshold, the dosage corresponding to the sample is reduced, and the adjustment is repeated until the effluent water quality data interval corresponding to each sample is within the preset water quality standard range of the sewage treatment plant.
6. The precise dosing system for sewage treatment plants according to claim 5 is characterized in that: The historical data acquired in the data set construction module include: the inlet flow rate and the inlet water quality before the dosing process, the hourly dosing flow rate, and the outlet flow rate and the outlet water quality after the dosing process.
7. The precise dosing system for sewage treatment plants according to claim 5 is characterized in that: The dosing sample data set construction module obtains the current dosing rules of the sewage treatment plant, quantifies the dosing rules, and counts the dosing amounts corresponding to each influent water quality and water quantity data; each quantified influent water quality data, water quantity data and corresponding dosing amount are constructed into a sample data, and all sample data are sorted according to the "influent-dosing" standard to form the dosing sample data set of the sewage treatment plant.
8. The precise dosing system for sewage treatment plants according to claim 5 is characterized in that: In the adjustment module, if the predicted effluent quality exceeds the standard threshold of the sewage treatment plant, the dosage of the sample is increased by 10%, and if the predicted effluent quality is less than 90% of the standard threshold, the dosage of the sample is reduced by 10%.
9. A precise dosing device for a sewage treatment plant, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is used to implement the precise dosing method for a sewage treatment plant as described in any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the precise dosing method for a sewage treatment plant as described in any one of claims 1 to 4 is implemented.
Citation Information
Cited By
Accurate dosing method for sewage plant based on multi-mode automatic machine learning
CN120655932A
Intelligent decision-making method, system and equipment for sewage medicament addition and medium
CN120746224A
Automated machine learning-based accurate dosing method for sewage treatment plant
WO2026091440A1