Accurate dosing method for sewage plant based on multi-mode automatic machine learning

By combining multimodal automatic machine learning with sensor and visual data, a precise dosing model for sewage treatment plants was constructed, which solved the problem of real-time adjustment of chemical addition in sewage treatment plants and achieved precise control of effluent water quality and efficient utilization of resources.

CN120655932APending Publication Date: 2025-09-16JIANGSU LANCHAUNG INFORMATION TECH SERVICESCO LTD

Patent Information

Application Number
CN202510481667.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

When faced with complex influent water quality and flow fluctuations, sewage treatment plants find it difficult to achieve real-time and precise adjustments to chemical dosage, resulting in substandard effluent quality or waste of resources. Existing machine learning models lack generalization capabilities and rely on manual experience.

Method used

A multimodal automatic machine learning method is used to combine sensor data and visual data. Visual features are extracted through the YOLO model to build a multimodal dataset. The AutoGluon Tabular framework is used to train the prediction model, automatically perform feature engineering and hyperparameter tuning, and optimize the dosage.

Benefits of technology

It realizes real-time monitoring and dynamic adjustment of the sewage treatment process and precise control of the dosage of chemicals, improves the stability of effluent water quality and resource utilization efficiency, and reduces the overfitting risk and system construction cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120655932A_ABST
    Figure CN120655932A_ABST
Patent Text Reader

Abstract

The invention discloses a sewage plant accurate dosing method based on multi-mode automatic machine learning, and belongs to the technical field of sewage treatment. The method comprises the following steps: acquiring historical sensing data and image data of a sewage plant; extracting key features in the image by using a YOLO visual model, fusing the key features with sensor data, and constructing a multi-modal sample data set; carrying out modeling training on the fused data by adopting an automatic machine learning framework, and constructing a'water inlet-dosing-water outlet 'prediction model; generating a reference sample data set according to an existing dosing rule; inputting the sample data into the trained prediction model to obtain predicted effluent quality data, and adjusting the dosage until the predicted effluent quality of all samples meets a water quality standard condition; and finally outputting an optimized dosing sample data set. According to the invention, precision and real-time dosing of the sewage plant can be realized, chemical waste can be effectively reduced, the treatment efficiency is improved, the cost is saved, and the water quality is ensured to stably reach the standard.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a precise dosing method for a sewage treatment plant based on multimodal automatic machine learning, and belongs to the technical field of sewage treatment. Background Art

[0002] With increasingly stringent environmental regulations and the growing problem of water pollution, sewage treatment plants face unprecedented challenges in ensuring effluent quality meets discharge standards. In the sewage treatment process, the addition of chemicals (such as coagulants and flocculants) is a critical step in ensuring water purification effectiveness. However, the proper dosage of chemicals not only directly affects treatment effectiveness but also has a direct impact on operating costs and environmental protection. Excessive chemical addition can lead to wasteful resources and secondary pollution, while insufficient dosage can result in substandard effluent quality.

[0003] Currently, many sewage treatment plants still rely on manual experience and the intuitive judgment of on-site operators to adjust the dosage of chemicals. However, this traditional rule of thumb is difficult to respond to fluctuations in influent water quality and flow in real time and accurately. Especially under the influence of external environment (such as rainfall and temperature changes), the influent composition often presents complex and changeable characteristics, making it difficult for empirical methods to quickly adapt to current operating conditions.

[0004] With the rapid development of data analysis and artificial intelligence, machine learning offers new solutions for precise dosing in wastewater treatment. Traditional machine learning methods require extensive feature engineering and manual parameter tuning, relying on experienced technical experts to conduct in-depth data analysis and model building. This often makes it difficult to develop universal dosing models for the complex process systems of diverse wastewater treatment plants, increasing system construction and maintenance costs.

[0005] Currently, wastewater treatment plants have accumulated a vast amount of historical data over their long-term operations. However, due to the limited and fragmented nature of the data, it cannot fully reflect the various influencing factors in the process. Consequently, existing models often lack generalizability when applied to different plant sites and operating conditions. Furthermore, adjustments to dosing levels are highly dependent on feedback from effluent water quality after on-site implementation. This effluent data often exhibits significant time lags, hindering the efficiency and effectiveness of real-time adjustments. Summary of the Invention

[0006] In order to make full use of historical data and improve the accuracy and efficiency of dosing, the present invention provides a precise dosing method for sewage treatment plants based on multimodal automatic machine learning. The technical solution is as follows:

[0007] Step 1: Obtain historical water quality data, water volume data, and dosing data from the sewage treatment plant, as well as image data, preprocess the data, and divide it into training and test sets;

[0008] Step 2: Using the YOLO architecture to train a visual model, automatically extract visual features of the image data, and fuse them with the water quality data, water quantity data, and dosing data to construct a multimodal sample dataset;

[0009] Step 3: Call the automatic machine learning framework to perform model training on the multimodal data fused in step 2, build a "water inlet-drug addition-water outlet" prediction model, and use the test set to verify the model performance;

[0010] Step 4: Convert the dosing rules of the current sewage treatment plant into sample data to form a reference dosing sample data set;

[0011] Step 5: Input each sample data in the reference dosing sample data set into the prediction model constructed in step 3 to obtain the predicted effluent water quality data, and compare it with the preset effluent water quality threshold, and adjust the dosing amount in the sample data according to the comparison result;

[0012] Step 6: Repeat steps 4 and 5 until the effluent water quality predicted by all sample data meets the sewage treatment plant water quality standards, and output the final optimized dosing sample data set as a precise dosing plan.

[0013] Optionally, step 1 includes:

[0014] Step 11: Obtain at least one year of historical sensor data and corresponding dosing data from the sewage treatment plant. At the same time, use cameras to collect real-time image data of the sewage treatment process.

[0015] Step 12: Preprocess the sensor data and image data. The preprocessing process of the sensor data includes outlier removal, missing value filling, and data normalization. The preprocessing of the image data includes size normalization and image enhancement.

[0016] Optionally, the process of adjusting the dosage in the sample data in step 5 includes: if the water quality of a certain sample is predicted to exceed the standard, it means that the dosage is insufficient, and the dosage of the sample is increased by 10%; if the water quality of a certain sample is predicted to be lower than 90% of the standard threshold, it means that the dosage is too much, and the dosage of the sample needs to be reduced by 10%.

[0017] Optionally, the visual features detected by the YOLO architecture include: equipment operating status, foam status, bubble distribution, and liquid level fluctuation.

[0018] Optionally, the multimodal sample data includes: inlet flow rate, inlet total phosphorus concentration, inlet chemical oxygen demand, dosing flow rate, outlet flow rate, outlet total phosphorus, outlet chemical oxygen demand, foam area ratio, bubble number, liquid level fluctuation frequency and equipment operating status.

[0019] Optionally, the hyperparameter settings for the YOLO architecture training include: the number of training rounds is 100; the batch size is 16; the learning rate is 0.001; and the optimizer is Adam or SGD.

[0020] Optionally, the automatic machine learning framework adopted in step 3 is the AutoGluon Tabular framework.

[0021] Optionally, in step 1, the data is divided into a training set and a test set in a ratio of 80:20 or 70:30.

[0022] The present invention provides a sewage treatment plant precision dosing device based on multimodal automatic machine learning, comprising a memory and a processor;

[0023] The memory is used to store computer programs;

[0024] The processor is configured to implement any of the above methods when executing the computer program.

[0025] The present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method described in any one of the above items is implemented.

[0026] The beneficial effects of the present invention are:

[0027] This invention builds a multimodal dataset to train the prediction model. Multimodal data can comprehensively reflect the operational status of the sewage treatment process from different perspectives and levels, overcoming the limitations of a single data source. For example, by combining traditional water quality data with environmental and meteorological data, it can more accurately capture the changing patterns of influent pollution loads, thereby achieving more refined predictions of effluent water quality.

[0028] This paper utilizes an automated machine learning (AutoML) framework to automatically perform feature engineering, model selection, and hyperparameter tuning when processing multimodal data, generating dosing models with greater predictive accuracy and robustness. The rich information provided by multimodal data enables the model to identify more potential associations, effectively reducing the risk of overfitting and improving the model's generalization capabilities.

[0029] By collecting and integrating various types of multimodal data in real time, the present invention allows the system to capture changes in process status and external environment more quickly, thereby achieving timely and dynamic adjustment of dosage, shortening the time delay between data collection and program execution, and ensuring that the effluent water quality is always within the standard range. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] 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.

[0031] Figure 1 This is a schematic diagram of the overall process of a sewage treatment plant precision dosing method based on multimodal automatic machine learning of the present invention.

[0032] Figure 2 This is a scatter plot of the prediction effect of the multimodal prediction model of the sewage plant's "intake-dosage-effluent" process on the effluent total phosphorus (TPout).

[0033] Figure 3 This is a scatter plot of the prediction effect of the multimodal prediction model of the sewage plant's "intake-drug addition-outlet" process on the outflow. DETAILED DESCRIPTION

[0034] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

[0035] This embodiment provides a method for accurate dosing of sewage treatment plants based on multimodal automatic machine learning. Figure 1 , the method comprising:

[0036] Step 1: Obtain historical water quality, water volume, and drug dosing data from the sewage treatment plant, and collect on-site camera image data. Perform quality control, preprocessing, and standardization on the data, and divide it into training and test sets.

[0037] This example combines sensor data and visual data to improve the accuracy and applicability of the precise dosing model for sewage treatment plants. Traditional sensor data provides numerical indicators such as flow rate and chemical concentration, while visual data can capture real-time operating conditions on site, such as foam state, bubble size, and equipment operation. The process for acquiring and processing sensor and visual data is as follows:

[0038] Step 1.1: Obtain at least one year of historical sensor data and corresponding dosing data from the sewage treatment plant. At the same time, use cameras installed at key locations to collect real-time image data of the sewage treatment process and obtain on-site visual information (such as foam distribution in the dosing tank, bubble morphology, equipment operating status, etc.).

[0039] For sensor data collection, sewage treatment plants are typically equipped with online monitoring systems (SCADA) that extract at least a full year of historical data from the plant's data management system. This data includes: instantaneous inflow (Inflow), instantaneous inflow total phosphorus (TPin), inflow chemical oxygen demand (CODin), etc. before the dosing process; hourly dosing rates of polyaluminum (PAC) and polyferric (PAFC) chemicals; and effluent flow (Outflow), effluent total phosphorus (TPout), and effluent chemical oxygen demand (CODout) after the dosing process. Data collection is typically recorded every 15 minutes or every hour, though some sewage treatment plants may support higher sampling frequencies (e.g., once per minute).

[0040] To improve the accuracy of the dosing strategy, this embodiment installs cameras at key locations in the wastewater treatment system to collect visual data and analyze foam status, bubble distribution, and equipment operating status during the treatment process. Cameras should be installed in key areas of the wastewater treatment system, including: the dosing tank (dosing point) to observe changes in water quality after dosing, such as foam formation, color change, and bubble density; the aeration tank to monitor aeration status, bubble size, and dissolved oxygen changes; and the sedimentation tank to observe flocculation and sedimentation, and detect the presence of abnormal floating objects. The acquisition equipment includes an industrial high-definition camera (1080p or 4K resolution, supporting low-light environments) and an infrared camera (for nighttime or low-light monitoring). The camera is mounted on the side of the tank or on a bracket, angled to provide a clear view of the water surface, and properly protected to prevent moisture and corrosion that may affect the camera's lifespan. The camera captures a frame every 30 seconds to 5 minutes (adjusted based on system storage capacity), and periodically extracts key frames for analysis.

[0041] Step 1.2: Perform quality control on the sensor data (eliminating outliers, filling in missing values, and standardizing data), preprocess the collected image data (image enhancement, size normalization, etc.), and divide the preprocessed data into training and test sets in a certain ratio (such as 80:20 or 70:30) to provide basic data for subsequent model training and verification.

[0042] In this step, the collected sensor data and visual data need to be preprocessed to ensure data quality and provide clear and standardized data for subsequent machine learning modeling.

[0043] Quality control of sensor data includes: first, removing outliers by setting reasonable thresholds or using statistical methods (such as box plot analysis, Z-score normalization, etc.) to exclude abnormal data points to prevent them from affecting the accuracy of model training; then, using appropriate interpolation algorithms (such as linear interpolation, nearest neighbor interpolation, etc.) to fill missing values, or eliminating samples with too many missing values ​​to ensure data continuity; finally, data standardization, including Min-Max normalization or Z-score normalization, organizes the data into a sample data set with a standard format, so that data of different dimensions can be learned within the same range.

[0044] After image data is collected, a series of preprocessing is also required to facilitate the subsequent training of the YOLO-based object detection model. The visual data preprocessing process includes: first, data cleaning, removing low-quality images (such as blur, overexposure, and black screens), and removing duplicate frames (to avoid data redundancy and improve computational efficiency); then, image enhancement is performed. Due to the large changes in lighting and bubble states in sewage treatment plants, image data enhancement is required to improve the generalization ability of the model. Specifically, this includes brightness adjustment (to enhance adaptability to different lighting conditions), contrast adjustment (to improve the visibility of water quality boundaries), noise addition (to simulate sensor interference and improve robustness), and random cropping and rotation (to increase data diversity); finally, image size normalization is performed. To adapt to the input of the YOLO model, all images need to be normalized to 640×640 pixels and converted to standard RGB format.

[0045] After data preprocessing, the training and test sets are divided into two sets according to a certain ratio. Sensor data: 80% training data (for model training); 20% test data (for evaluating model generalization ability). Visual data: 70% training data (for YOLO object detection training); 20% validation data (for tuning hyperparameters); and 10% test data (for final evaluation).

[0046] Through the above steps, multimodal data collection and preprocessing for precise dosing at the sewage treatment plant were completed: sensor data provided precise numerical features to describe water quality, water quantity, and dosing status; visual data was analyzed through the YOLO model to analyze foam, bubbles, and equipment operating status, providing additional information; data quality control included outlier removal, missing value filling, and standardization; image preprocessing ensured that the data was suitable for deep learning models and was divided into training and test sets. This laid the foundation for subsequent multimodal machine learning modeling, allowing dosing optimization solutions to rely not only on numerical data but also incorporate visual information, achieving more intelligent sewage treatment plant dosing control.

[0047] Step S2: Use the YOLO architecture to train the visual model, automatically extract the key visual features of the scene image, and fuse them with the sensor data to build a multimodal sample dataset.

[0048] The goal of this example is to train a deep learning model based on the YOLO (You Only Look Once) object detection model to detect key visual features of the sewage treatment plant (such as foam state, bubble distribution, and liquid level fluctuations). This model then fuses this visual information with sensor data to form a complete multimodal sample dataset, providing input data for subsequent machine learning modeling. The specific processing flow is as follows:

[0049] Step 2.1: Using the preprocessed image data, a visual model is constructed based on the YOLO architecture to automatically detect and extract key visual features on site, such as equipment operating status, bubble morphology, and liquid level fluctuations. The YOLO model is trained using a deep learning framework to accurately output visual indicators related to sewage treatment effectiveness (for example, reflecting aeration effectiveness or chemical reaction conditions by detecting the number, size, and distribution of bubbles in the image).

[0050] In this step, the preprocessed sewage plant image data is used to train the YOLO model to automatically detect and extract key visual features. The specific implementation process includes data labeling, model training, optimization and deployment.

[0051] First, target definition and data annotation are performed. In order to enable the YOLO model to detect key visual features in the sewage treatment process, this embodiment first defines the detection target and manually or automatically annotates the data. The detection targets include: foam state (Foam), detecting the area, thickness, and distribution of the foam to determine whether the dosing is excessive or insufficient; bubble morphology (Bubbles), analyzing the size, density, and distribution of bubbles in the aeration tank, indirectly reflecting the aeration state and chemical reaction effect; liquid surface fluctuation (Water Surface), detecting liquid surface changes and identifying abnormal conditions (such as excessive stirring, excessive flow rate, etc.); equipment status (Equipment), monitoring whether equipment such as dosing pumps and aerators are operating normally. This embodiment then performs data annotation, using LabelImg or Roboflow tools to select the target area in the image (Bounding Box) and label the category. At the same time, a pre-trained YOLO model can also be used for weakly supervised learning to automatically generate preliminary annotation results, which are then manually corrected.

[0052] Then, this embodiment performs YOLO model training. YOLOv5 or YOLOv8 is selected (compared to YOLOv3 and YOLOv4, YOLOv5 / 8 is better in speed and accuracy), and pre-trained weights (such as yolov5s.pt) are used to speed up the convergence speed. PyTorch+Ultralytics YOLOv5 is used for training, and the specific hyperparameter settings include: the number of training rounds (epochs) is 100; the batch size (batch size) is 16; the learning rate (learning rate) is 0.001; the optimizer selects Adam or SGD. At the same time, mAP (Mean Average Precision) is used to measure the detection accuracy, and the loss function value ensures that the model gradually converges. During the training process, this embodiment uses the ReduceLROnPlateau strategy to adjust the learning rate to avoid gradient explosion or disappearance. At the same time, data augmentation is used to prevent overfitting and improve the generalization ability of the model. Transfer learning can also be performed. The model can be pre-trained based on the COCO dataset and then fine-tuned on the sewage plant dataset. After training is completed, the detection effect is measured by calculating mAP and the model is verified.

[0053] Finally, this example deploys the trained YOLO model and uses it to perform real-time detection on the image stream of the sewage treatment plant camera, returning the detection box coordinates, category, and confidence level for subsequent steps.

[0054] Step 2.2: Fuse the visual features extracted by YOLO with the water quality, water quantity, and dosing data collected by sensors to construct a multimodal sample dataset. This multimodal dataset contains both quantitative water quality indicators and image features reflecting the actual operating status on site, which can more comprehensively describe the sewage treatment process.

[0055] In this step, after the YOLO model successfully extracts visual features, it needs to be fused with sensor data to form a multimodal sample dataset.

[0056] First, visual features are converted into structured data. Visual information detected by YOLO is converted into numerical features, including foam coverage percentage (%), bubble count (Bubble Count), water surface variation (Water Surface Variance), and device operating status (Binary: 0 = Normal, 1 = Abnormal). Sensor and visual data are then fused, using timestamp alignment to merge sensor and visual data at the same time.

[0057] Through the above steps, this example completes YOLO model training, enabling automatic detection of visual features such as foam and bubbles, improving the real-time adaptability of dosing optimization strategies. Visual data structuring converts visual images into numerical features that can be used for machine learning. Multimodal data fusion integrates sensor data and visual features to improve the accuracy of the prediction model. The resulting sample dataset can efficiently and accurately guide dosing optimization at sewage treatment plants.

[0058] Step 3: Call the automatic machine learning (AutoML) framework to perform model training on the multimodal data fused in step 2, build a "water inlet-drug addition-water outlet" prediction model, and use the test set to verify the model performance.

[0059] In this embodiment, a suitable automatic machine learning (AutoML) framework is selected to perform model training on the multimodal data fused in step 2 to build a high-precision model that can predict the effect of dosing in sewage treatment. This model can simulate the impact of dosing on effluent water quality under different influent conditions, thereby optimizing the precise dosing strategy of the sewage treatment plant.

[0060] Step 3.1: Select an appropriate automated machine learning (AutoML) framework, such as Autogluon or Auto-sklearn, and use the multimodal data fused in Step 2 as input. The AutoML framework will automatically select and train multiple machine learning models, such as decision trees, random forests, XGBoost, and neural networks, to find the optimal model. Based on the data characteristics, it will automatically adjust model parameters and perform hyperparameter optimization to improve the model's prediction accuracy.

[0061] Automated machine learning (AutoML) significantly lowers the barrier to entry for machine learning applications by automating complex processes such as data preprocessing, feature engineering, model selection, hyperparameter tuning, and evaluation, enabling even non-expert users to efficiently build high-performance models. Its core advantage lies in its built-in diverse models (such as gradient boosting trees and neural networks) and automatic optimization of parameter combinations. It combines cross-validation, Bayesian optimization, and other techniques to improve performance. It also leverages parallelization to accelerate the training process, surpassing traditional manual parameter tuning methods that rely on human experience in terms of efficiency and model performance. Current mainstream platforms, such as AutoGluon and Auto-Sklearn, each have their own unique features. Amazon's AutoGluon Tabular innovatively employs a multi-model ensemble strategy for tabular data. By fusing gradient boosting trees with optimized neural networks (such as categorical variable embedding and skip-connection), combined with multi-layer stacking and K-fold bagging techniques, it achieves more stable and superior prediction results, making it a benchmark framework for tabular tasks.

[0062] In this embodiment, the AutoGluon Tabular framework is used for model training. The multimodal dataset obtained in step 2 is used as the model input data, and the AutoGluon framework is called for model training. The dataset includes: sensor data (numerical features), such as water inflow (Inflow, m 3 / h), influent total phosphorus concentration (TPin, mg / L), influent chemical oxygen demand (CODin, mg / L), dosing flow rate (PAC, PAFC, L / h), outlet flow rate (Outflow, m 3 / h), effluent total phosphorus (TPout, mg / L), and effluent chemical oxygen demand (CODout, mg / L); visual features (numerical image features extracted by YOLO), such as foam area ratio (Foam Coverage%), bubble count (Bubble Count), liquid surface fluctuation frequency (Water Surface Variance), and equipment operating status (Binary: 0 = Normal, 1 = Abnormal). This data will be used to train the model to establish the "inlet-dosage-effluent" relationship.

[0063] The AutoGluon framework automatically selects the appropriate model (such as XGBoost, LightGBM, random forest, neural network, etc.) and automatically searches for hyperparameters during training (such as decision tree depth (to control overfitting), learning rate (to optimize convergence speed), neural network hidden layer size (affecting model complexity), and the number of XGBoost leaf nodes (affecting nonlinear fitting capabilities)) to achieve the best prediction results. Ultimately, AutoGluon automatically selects the optimal model based on the model's performance indicators (such as accuracy, mean squared error, etc.) and writes it to the model file.

[0064] Step 3.2: After the model training is completed, the generalization ability of the model is evaluated using the test set divided in step S1. Specific evaluation indicators include: MAE (Mean Absolute Error), which is the mean absolute error, measuring the average deviation between the model prediction value and the true value; MSE (Mean Squared Error), which is the mean square error, penalizing large errors to ensure stable predictions. The objective function of the model evaluation is set to: MAE≤0.02mg / L (to ensure that the prediction error of the effluent phosphorus concentration is less than 0.02mg / L); MSE≤0.001mg2 / L2 (to ensure that the dosing optimization does not fluctuate violently). At the same time, this embodiment can visualize the model prediction results, draw a comparison chart of the predicted values ​​and the true values, to intuitively evaluate the model performance. The prediction results should be as close to the true value as possible, and the error fluctuation should be small.

[0065] Figure 2A scatter plot shows the prediction effect of the multimodal prediction model of the sewage plant's "influent-dosing-effluent" process finally trained in this embodiment on the total phosphorus in the effluent (TPout). Figure 3 This scatter plot shows the model's prediction performance for outflow. The horizontal axis represents actual data, and the vertical axis represents predicted data. The color of each dot represents the density of points surrounding it. The solid red line represents the predicted trend line for all points, and the dashed black line represents the 1:1 line. The closer the two lines are, the better the prediction performance.

[0066] Figure 2 and Figure 3 The resulting "influent-dosing-effluent" prediction model for urban sewage treatment plants in this example demonstrates excellent prediction results for effluent total phosphorus (TPout) and effluent flow (Outflow), with an average accuracy exceeding 90%. This demonstrates that the multimodal prediction model developed in this example, using the AutoGluon Tabular framework for model training based on historical sewage treatment plant data, accurately simulates the "influent-dosing-effluent" process of sewage treatment plants, laying the foundation for subsequent optimization of sewage treatment plant dosing rules.

[0067] Ultimately, this step uses AutoML to automatically train an optimal "influent-dosage-effluent" prediction model. This model can be used to predict dosing effects in real time, guiding sewage treatment plants in precise dosing. Subsequently, combined with optimization algorithms, dosing strategies can be iteratively adjusted to improve sewage treatment efficiency, providing sewage treatment plants with a precise, efficient, and intelligent dosing optimization solution.

[0068] Step 4: Convert the dosing rules of the current sewage treatment plant into sample data to form a reference dosing sample data set.

[0069] In this example, it is necessary to systematically collect data on the sewage treatment plant's current dosing strategy to construct a process control benchmark dataset. By analyzing the dosing decision logic preset in the operating procedures, a mapping relationship is formed between water quality and quantity parameters and the dosage of the chemical.

[0070] Step 4.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 calculate the dosing amount corresponding to each influent water quality and water quantity data.

[0071] This step requires analyzing the dosing control logic within the wastewater plant's current process specifications and establishing a quantitative mapping system between multi-dimensional parameters and dosing amounts. Based on the dosing rules established by the wastewater plant based on historical operating experience, key control indicators such as dosing pump operating parameters (frequency / start-stop cycle) or pipeline dosing flow rate (L / h) corresponding to different influent conditions (such as when total phosphorus concentration and instantaneous flow rate are within specific ranges) are extracted.

[0072] Then, through process parameter analysis, the empirical rules in text form were converted into structured data, and the dynamic interval division standards of water quality and quantity parameters were established (such as TP concentration 0.5-1.0 mg / L, flow rate 800-1200 m 3 / h), determine the corresponding dosage numerical benchmarks for each parameter combination, and perform data calibration on the parameter boundary conditions to ensure that the rule digitization process conforms to actual operating characteristics. Ultimately, a process rule matrix containing water inlet index ranges and corresponding dosage parameters is formed, serving as the digital twin of the original strategy.

[0073] Step 4.2: Construct each quantified influent water quality parameter, water volume data, and corresponding dosing amount into a sample data set. Sort all sample data according to the "influent-dosing" 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.

[0074] In this step, it is necessary to construct a "condition-response" training data set based on the process rule matrix. Each inlet parameter combination and its corresponding dosing setting are treated as independent data entries and structured and archived according to the "input characteristics (water quality and quantity) - output variables (dosing amount)" paradigm. In actual operation, the collected single data record includes: inlet flow rate (m 3 The dataset is then sorted by time series or parameter dimension to form a traceable process control knowledge base. Data standardization is then performed, including preprocessing such as unit unification, null value removal, and outlier annotation.

[0075] Ultimately, this dataset fully maps the decision-making patterns of current dosing strategies, serving as a benchmark for optimizing algorithm training and validating the predictive accuracy of intelligent models. Specifically for chemical phosphorus removal processes, the dataset's records of the coordinated dosing of PAC and PAFC provide key training samples for the subsequent construction of multi-objective optimization models.

[0076] Step 5: Input each sample data in step 4 into the prediction model described in step 3 to obtain the predicted effluent water quality data, and compare it with the preset effluent water quality threshold. According to the comparison result, adjust the dosage of the sample by 10% (increase by 10% if it exceeds the standard, and reduce by 10% if it is below the 90% threshold).

[0077] In this embodiment, the goal is to predict the effluent water quality for each record in the previously constructed dosing sample dataset using the multimodal "influent-dosing-effluent" prediction model trained in step 3, and then compare the prediction results with the water quality threshold of the sewage treatment plant. Based on the comparison results, the dosing amount of each sample is adjusted to provide feedback to continuously iterate and optimize the dosing plan.

[0078] Step 5.1: Input each sample data constructed in step 3 into the "influent-dosing-effluent" prediction model trained in step 2 to obtain the predicted effluent water quality data corresponding to each sample. Record the predicted effluent water quality data of each sample and correspond them one by one with the original dosing sample data to form an extended sample data set.

[0079] In this step, records are first extracted one by one from the dosing sample dataset constructed in step 3. Each record contains at least the following information: influent data: instantaneous influent flow rate (Inflow), influent total phosphorus concentration (TPin), etc.; dosing data: corresponding PAC and PAFC dosing flow rates. These numerical feature data for each record are input into the "influent-dosing-effluent" prediction model trained in step S2. Based on the relationship between influent and dosing learned in step S3, the prediction model outputs corresponding effluent water quality parameters, typically including: effluent total phosphorus concentration (TPout) and effluent flow rate (Outflow). The resulting prediction results reflect the effect of wastewater treatment under the current dosing conditions. The prediction results of each sample are associated with the original sample data (including influent data and dosing amount) to form an extended dosing sample dataset. In this extended dataset, each record contains both the input information (influent and dosing data) and the effluent water quality results predicted by the model, which are used for subsequent dosing adjustment judgments.

[0080] Step 5.2: Compare the predicted effluent quality data with the effluent compliance threshold of the sewage treatment plant. If the predicted effluent quality of a sample exceeds the standard, it means that the dosage is insufficient and the dosage of the sample needs to be increased by 10%. If the predicted effluent quality of a sample is lower than 90% of the compliance threshold, it means that the dosage is too much and the dosage of the sample needs to be reduced by 10%.

[0081] In this step, the effluent quality threshold is first set based on the wastewater treatment plant's effluent quality standards. For example, the effluent total phosphorus (TPout) should be less than 0.5 mg / L. The predicted effluent quality of each record in the extended dataset is then compared: if the predicted TPout is ≥ 0.5 mg / L, the current dosage is insufficient; if the predicted TPout is < 0.45 mg / L (i.e., less than 90% of the standard threshold), the current dosage is excessive. Then, the dosing sample data set was adjusted according to different situations: for insufficient dosing, for records where the predicted effluent quality exceeded the standard (TPout≥0.5mg / L), the dosing amount of the sample was increased by 10% according to the rules. For example, if the original dosing amount was 100L / h, the adjusted dosing amount was 110L / h; for excessive dosing, for records where the predicted effluent quality was far below the standard threshold (TPout<0.45mg / L), the dosing amount of the sample was reduced by 10% according to the rules. For example, if the original dosing amount was 100L / h, the adjusted dosing amount was 90L / h.

[0082] Finally, the adjusted dosage is updated to the sample data and recorded again with the corresponding predicted effluent quality data to form a new sample dataset. This expanded dataset will serve as the basis for subsequent iterative optimization until the predicted effluent quality of all samples is above 90% of the compliance threshold (i.e., TPout is between 0.45mg / L and 0.5mg / L). This process effectively utilizes multimodal data and automated prediction models, reduces reliance on field feedback, makes dosing strategy optimization more efficient and intelligent, and provides a scientific basis for achieving precise dosing.

[0083] Step 6: Repeat steps 4 and 5 until the effluent water quality predicted by all sample data meets the sewage treatment plant water quality standards, and output the final optimized dosing sample data set as the future precise dosing plan.

[0084] This example continuously updates each dosing sample data entry until the predicted effluent quality for all samples stabilizes above 90% of the sewage treatment plant's water quality threshold, meaning that total phosphorus (TPout) remains between 0.45 mg / L and 0.5 mg / L. Through this iterative process, the system continuously adjusts the dosage, ensuring that the sewage treatment process meets effluent quality standards while minimizing chemical waste and achieving precise dosing.

[0085] Step S6.1: Repeat steps S4 and S5, and continuously predict and adjust the dosing data of each sample until the predicted effluent water quality of all samples is above 90% of the standard threshold.

[0086] In this step, for each piece of dosing sample data constructed in step S4, a record containing the influent water quality, water volume, and current dosing rate is extracted and re-input into the "influent-dosing-effluent" prediction model trained in step S3. The prediction model calculates the corresponding effluent water quality based on the latest input and outputs new predicted data. These new prediction results are then compared with the sewage treatment plant's preset effluent quality standards. If the predicted TPout value is greater than or equal to 0.5 mg / L, it indicates that the dosing rate is still insufficient and the dosing rate should be increased by 10% according to the rules. If the predicted TPout value is less than 0.45 mg / L, it indicates that the dosing rate is too high and the dosing rate should be reduced by 10%. After each adjustment, the updated sample data is recorded to form a new round of dosing sample data sets. This process is repeated until the predicted effluent quality of all sample data stabilizes between 0.45 mg / L and 0.5 mg / L.

[0087] Step S6.2: Output the optimized dosing sample dataset as a reference for future precision dosing at the sewage treatment plant. This dataset also includes the final dosing amount for each dosing pump after optimization based on multimodal data and AutoML.

[0088] Once the predicted effluent quality for all samples meets the preset standard, iterations cease. All fully optimized samples with stable dosing levels are compiled into a final dosing sample dataset. This dataset contains the finalized dosing amount for each record and serves as the basis for future precise dosing decisions at the wastewater treatment plant. The final solution not only ensures that effluent quality consistently meets requirements, but also significantly reduces chemical waste, improving the economics and operational efficiency of wastewater treatment.

[0089] Ultimately, through this iterative process, the dosage is continuously adjusted using the multimodal model's predictions until all samples meet the standard requirements, achieving precise optimization of the dosing plan. This solution transforms discrete empirical rules into a quantifiable process decision matrix. Through machine learning-driven closed-loop optimization, it overcomes the limitations of traditional trial-and-error methods and upgrades the dosage of chemical from "manual empirical thresholds" to "dynamic optimal solutions." In typical scenarios, this can reduce chemical consumption by 12-18% while ensuring 100% effluent compliance.

[0090] 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.

[0091] 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 principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A precise dosing method for sewage treatment plants based on multimodal automatic machine learning, characterized in that: The method comprises: Step 1: Obtain historical water quality data, water volume data, and dosing data from the sewage treatment plant, as well as image data, preprocess the data, and divide it into training and test sets; Step 2: Using the YOLO architecture to train a visual model, automatically extract visual features of the image data, and fuse them with the water quality data, water quantity data, and dosing data to construct a multimodal sample dataset; Step 3: Call the automatic machine learning framework to perform model training on the multimodal data fused in step 2, build a "water inlet-drug addition-water outlet" prediction model, and use the test set to verify the model performance; Step 4: Convert the dosing rules of the current sewage treatment plant into sample data to form a reference dosing sample data set; Step 5: Input each sample data in the reference dosing sample data set into the prediction model constructed in step 3 to obtain the predicted effluent water quality data, and compare it with the preset effluent water quality threshold, and adjust the dosing amount in the sample data according to the comparison result; Step 6: Repeat steps 4 and 5 until the effluent water quality predicted by all sample data meets the sewage treatment plant water quality standards, and output the final optimized dosing sample data set as a precise dosing plan.

2. The method according to claim 1, characterized in that The step 1 comprises: Step 11: Obtain at least one year of historical sensor data and corresponding dosing data from the sewage treatment plant. At the same time, use cameras to collect real-time image data of the sewage treatment process. Step 12: Preprocess the sensor data and image data. The preprocessing process of the sensor data includes outlier removal, missing value filling, and data normalization. The preprocessing of the image data includes size normalization and image enhancement.

3. The method according to claim 1, characterized in that The process of adjusting the dosage in the sample data in step 5 includes: if the water quality of a certain sample is predicted to exceed the standard, it means that the dosage is insufficient, and the dosage of the sample is increased by 10%; if the water quality of a certain sample is predicted to be lower than 90% of the standard threshold, it means that the dosage is too much, and the dosage of the sample needs to be reduced by 10%.

4. The method according to claim 1, wherein The visual features detected by the YOLO architecture include: equipment operating status, foam status, bubble distribution, and liquid level fluctuation.

5. The method according to claim 1, wherein The multimodal sample data includes: inlet flow rate, inlet total phosphorus concentration, inlet chemical oxygen demand, dosing flow rate, outlet flow rate, outlet total phosphorus, outlet chemical oxygen demand, foam area ratio, bubble number, liquid level fluctuation frequency and equipment operating status.

6. The method according to claim 1, characterized in that The hyperparameter settings for YOLO architecture training include: 100 training rounds; 16 batch sizes; a learning rate of 0.001; and Adam or SGD optimizers.

7. The method according to claim 1, characterized in that The automatic machine learning framework used in step 3 is the AutoGluon Tabular framework.

8. The method according to claim 1, characterized in that In step 1, the training set and the test set are divided into 80:20 or 70:

30.

9. A precise dosing device for sewage treatment plants based on multimodal automatic machine learning, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is configured to implement the method according to any one of claims 1 to 8 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 a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Visual algorithm model development and reasoning method and device for urban governance

    CN119476390A

  • Accurate dosing method for sewage plant based on automatic machine learning

    CN119692494A

  • Coagulant addition control method and system in sewage treatment

    CN119806071A

Cited By

  • Sewage treatment method and reactor based on multi-mode intelligent regulation and control

    CN121564662A

  • A sewage treatment method and reactor based on multi-modal intelligent regulation and control

    CN121564662B

  • Sewage treatment dosing method and system based on machine learning, electronic equipment, storage medium and product

    CN121609414A

  • Visual identification-based alumen ustum detection dosing control method, system and equipment

    CN121635499A

  • Efficient dosing multi-agent proportioning method and system for water treatment

    CN121717414A