A Machine Learning-Based Method and System for In-situ Dynamic Regulation of Activated Sludge Activity
The predictive model established by machine learning and random forest algorithm can monitor and regulate the dissolved oxygen decay rate of activated sludge in real time, which solves the problems of lag and inaccuracy caused by offline analysis, and realizes real-time, accurate management and stable operation of activated sludge system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING UNIV
- Filing Date
- 2026-01-29
- Publication Date
- 2026-06-02
AI Technical Summary
In existing technologies, the assessment of microbial activity in activated sludge processes relies on offline analysis, which leads to delayed and inaccurate test results, making it impossible to guide process adjustments in a timely manner. The lack of in-situ, real-time quantitative assessment methods results in delayed and blind operation and management.
By employing machine learning methods and online monitoring of dissolved oxygen concentration changes, combined with the random forest algorithm to establish a predictive model, the dissolved oxygen decay rate is calculated and predicted in real time, thereby achieving in-situ dynamic regulation of activated sludge activity and hierarchical regulation based on preset thresholds.
It enables real-time, accurate monitoring and hierarchical control of activated sludge activity, improving the operational stability and intelligent management level of wastewater treatment systems, and reducing detection lag and environmental interference.
Smart Images

Figure CN122126956A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wastewater treatment technology, and in particular to a method and system for in-situ dynamic regulation of activated sludge activity based on machine learning. Background Technology
[0002] The activated sludge process is the most widely used biological treatment technology in modern wastewater treatment, and its treatment efficiency directly depends on the metabolic activity of the microorganisms in the activated sludge. In current technical practice, the assessment of activated sludge microbial activity mainly relies on manual sampling and offline laboratory analysis, among which specific oxygen consumption rate measurement is one of the commonly used assessment methods.
[0003] However, such offline analysis methods have significant technical limitations. First, the complete detection process involves multiple steps, including sampling, pretreatment, and laboratory analysis, which can take several hours or even longer. This results in assessment results that lag significantly behind the actual operating status of the system, failing to provide timely guidance for process adjustments. Second, offline detection conditions differ significantly from the actual environmental parameters within the bioreactor, and the sampling process itself may significantly interfere with the structure and activity of the microbial community, leading to inaccurate results reflecting the system's true operating condition. Furthermore, in daily operation and management, operators typically rely on indirect indicators such as mixed liquor suspended solids concentration, combined with personal experience, to make rough judgments about sludge activity, lacking key parameters that can directly and quantitatively characterize the intensity of microbial metabolism. This current technical situation results in significant lag and uncertainty in the operation and management of activated sludge systems, necessitating the development of an innovative method that enables in-situ, real-time, and accurate assessment of microbial activity.
[0004] Chinese patent document CN112062266A discloses an apparatus and method for online monitoring of sludge activity, which achieves automated monitoring by simulating and measuring the oxygen consumption rate of sludge in an independent reactor. However, this method is essentially still a controlled indirect measurement, relying on a preset threshold, and fails to overcome the bottleneck of in-situ dynamic regulation of activated sludge activity in a real reaction environment. Summary of the Invention
[0005] Purpose of the invention: The purpose of this invention is to provide a method and system for in-situ dynamic regulation of activated sludge activity based on machine learning, so as to realize real-time, accurate, in-situ monitoring and hierarchical regulation of activated sludge activity, thereby improving the operational stability and intelligent management level of aerobic wastewater treatment systems.
[0006] Technical Solution: To achieve the above objectives, the present invention provides a machine learning-based method for in-situ dynamic regulation of activated sludge activity, comprising the following steps:
[0007] S1. Obtain multiple sets of standard activity diagnostic data for the aerobic wastewater treatment system. Each set of data includes the time sequence of dissolved oxygen concentration, influent flow rate, chemical oxygen demand, ammonia nitrogen concentration, temperature, and sludge concentration within a diagnostic window ΔT.
[0008] S2. Preprocess multiple sets of standard active diagnostic data and use them to train the random forest algorithm to obtain a dissolved oxygen concentration prediction model. The training samples include: the input features are the average values of influent flow rate, chemical oxygen demand, ammonia nitrogen concentration, temperature and sludge concentration within the same diagnostic window, and the output target feature is the dissolved oxygen decay rate obtained from the sequence of dissolved oxygen concentration changes over time within the same diagnostic window.
[0009] S3. Re-collect the influent flow rate, chemical oxygen demand (COD), ammonia nitrogen concentration, temperature, and sludge concentration of the aerobic wastewater treatment system within the current diagnostic window ΔT, and calculate the average values for each. Input these values into the dissolved oxygen concentration prediction model to obtain the predicted dissolved oxygen decay rate R0 within the ΔT time period. Simultaneously, collect the time sequence of dissolved oxygen concentration changes within the current diagnostic window ΔT, and calculate the actual dissolved oxygen decay rate R0 within the current diagnostic window ΔT. t ;
[0010] S4. Calculate the predicted value R and the actual value R. t The relative deviation ΔR is used to determine the microbial activity status of the activated sludge based on a preset threshold, indicating whether it is normal, too low, or too high.
[0011] S5. Based on the results of the activity status determination, the deviation value ΔR, and the current operating conditions of the aerobic wastewater treatment system, the process parameters of the aerobic wastewater treatment system are adjusted in stages until the activity status is normal.
[0012] Preferably, the standard active diagnostic data acquisition method is as follows: each time data is collected, the output air volume of the aeration system is gradually reduced from the normal operating value to the set air volume value within a short period of time and kept stable. Then, dissolved oxygen concentration, influent flow rate, chemical oxygen demand, ammonia nitrogen concentration, temperature, and sludge concentration are collected synchronously at a set frequency within the diagnostic window. After the data collection is completed, the output air volume of the aeration system is gradually restored to the normal operating value within a short period of time.
[0013] Preferably, the output air volume of the aeration system gradually decreases from the normal operating value to 15%-25% of the original air volume within 30 seconds, and is restored to the normal operating value within 1 minute.
[0014] Preferably, the preprocessing includes linearly fitting the time series data of dissolved oxygen concentration, and using the absolute value of the slope of the fitted line as the dissolved oxygen decay rate.
[0015] Preferably, the method for determining the microbial activity state of activated sludge is as follows: setting a negative threshold and a positive threshold; when ΔR < negative threshold, it is determined to be in an excessively low state; when ΔR > positive threshold, it is determined to be in an excessively high state; when ΔR ∈ [negative threshold, positive threshold], it is determined to be in a normal state.
[0016] Preferably, the regulation includes: if it is determined to be in an excessively high state, retrieving the fluctuation records of water quality parameters in the recent period, and carrying out sludge settling ratio, sludge volume index and microbial microscopic analysis.
[0017] Preferably, the regulation includes: if it is determined to be too low, it is divided into three levels of regulation according to the degree of deviation of ΔR from the negative threshold: Level 1 regulation, increasing the sludge return ratio; Level 2 regulation, increasing the sludge return ratio while reducing the amount of residual sludge discharge; when the determination of being too low occurs three times in a row, Level 3 regulation is carried out, increasing the sludge return ratio, reducing the amount of residual sludge discharge, and increasing the amount of nutrients.
[0018] Preferably, the diagnostic window ΔT is 8-15 minutes.
[0019] The present invention discloses a machine learning-based in-situ dynamic control system for activated sludge, comprising the following modules:
[0020] Data acquisition module: used to acquire multiple sets of standard activity diagnostic data of the aerobic wastewater treatment system. Each set of data includes the time sequence of dissolved oxygen concentration, influent flow rate, chemical oxygen demand, ammonia nitrogen concentration, temperature, and sludge concentration within a diagnostic window ΔT.
[0021] Prediction model generation module: used to preprocess multiple sets of standard activity diagnostic data and to train the random forest algorithm to obtain a dissolved oxygen concentration prediction model. The training samples include: input features are the average values of influent flow rate, chemical oxygen demand, ammonia nitrogen concentration, temperature and sludge concentration within the same diagnostic window, and output target features are the dissolved oxygen decay rate obtained from the sequence of dissolved oxygen concentration changes over time within the same diagnostic window.
[0022] The real-time calculation and prediction module for dissolved oxygen decay rate is used to re-collect the influent flow rate, chemical oxygen demand (COD), ammonia nitrogen concentration, temperature, and sludge concentration of the aerobic wastewater treatment system within the current diagnostic window ΔT, calculate the average values of these parameters, and input them into the dissolved oxygen concentration prediction model to obtain the predicted value R0 of the dissolved oxygen decay rate within the ΔT period. Simultaneously, it collects the time sequence of dissolved oxygen concentration changes within the current diagnostic window ΔT and calculates the actual value R of the dissolved oxygen decay rate within the current diagnostic window ΔT. t ;
[0023] Microbial activity status determination module: used to calculate the predicted value R and the actual value R. tThe relative deviation ΔR is used to determine the microbial activity status of the activated sludge based on a preset threshold, indicating whether it is normal, too low, or too high.
[0024] The graded control module is used to grade and control the process parameters of the aerobic wastewater treatment system based on the results of the activity status determination, the deviation value ΔR, and the current operating conditions of the aerobic wastewater treatment system, until the activity status is normal.
[0025] Beneficial effects: The present invention has the following advantages: The present invention abandons the traditional offline analysis, and overcomes the detection lag and environmental interference by collecting dissolved oxygen decay rate in situ and combining it with machine learning model, so as to realize the quantification and real-time monitoring of the activity of activated sludge; it establishes a linkage mechanism between activity deviation and process parameters, and triggers graded control strategy according to preset threshold, so as to realize closed-loop management from "passive monitoring" to "active control", ensuring that the activity of activated sludge recovers quickly and stably. Attached Figure Description
[0026] Figure 1 This is a flowchart illustrating the method.
[0027] Figure 2 To determine the changes in dissolved oxygen concentration under standardized perturbations for activity diagnosis;
[0028] Figure 3 The active state periodic diagnostic response curve is shown. Detailed Implementation
[0029] The technical solution of the present invention will be described in detail below with reference to the embodiments and accompanying drawings.
[0030] This embodiment was implemented in the aerobic section of a wastewater treatment plant in an industrial park. The aerobic wastewater treatment system includes an aerobic biological treatment tank, an aeration system, an online monitoring system, and a central control system. This system primarily treats wastewater from the industrial park, characterized by large fluctuations in water quality and high organic matter concentrations. The aerobic biological treatment tank is equipped with dissolved oxygen online monitoring equipment, the aeration system uses variable frequency control, and the online monitoring system monitors the influent water quality and quantity in real time. All data is transmitted to the central control system for processing and analysis.
[0031] Based on the aforementioned aerobic wastewater treatment system, this embodiment provides a machine learning-based method for in-situ dynamic control of activated sludge activity, such as... Figure 1 As shown, it includes the following steps:
[0032] Step 1: During the normal and stable operation phase of the aerobic wastewater treatment system (which has been running stably for more than four months), perform standard activity diagnostic operations to obtain multiple sets of standard activity diagnostic data. Each set of data includes the time sequence of dissolved oxygen concentration, influent flow rate (intFL), chemical oxygen demand (COD), ammonia nitrogen concentration (AN), system temperature (T), and sludge concentration (MLSS) in the aerobic biological treatment tank within a diagnostic window.
[0033] The normal and stable operation stage of the aerobic wastewater treatment system refers to the stable and compliant effluent quality of the activated sludge system, without sludge bulking, abnormal foaming, or other microbial deterioration phenomena.
[0034] During a 30-day calibration period of normal operation of the aerobic wastewater treatment system, standard activity diagnostic operations were performed daily at 9:00, 14:00, and 19:00, resulting in 90 sets of standard activity diagnostic data samples. During each standard activity diagnostic operation, the output airflow of the aeration system was gradually reduced from the normal operating value of 1800±20 m³ / h to 400±20 m³ / h (approximately 22% of the original airflow) within 30 seconds using frequency converter control, and then stabilized. A diagnostic window ΔT was set to 12 minutes, during which the aeration system maintained a low aeration state. Within this diagnostic window ΔT, the dissolved oxygen concentration in the aerobic biological treatment tank steadily decreased from the initial level after aeration adjustment (3.4-3.7 mg / L) to 1.6-1.8 mg / L. This concentration range ensured both the significance and good linearity of the dissolved oxygen decay curve, which was used to calculate the decay rate R. t The system remains within the effective range of aerobic biochemical reactions, preventing anaerobic shocks or sludge activity inhibition. During the diagnostic window, dissolved oxygen (DO) concentration in the aerobic biochemical tank is continuously monitored and recorded at a sampling frequency of once per minute, obtaining a time-varying sequence of DO concentration for calculating the DO decay rate (R). Simultaneously, parameters such as influent flow rate (intFL), chemical oxygen demand (COD), ammonia nitrogen concentration (AN), system temperature (T), and sludge concentration (MLSS) are collected at the same sampling frequency. After data acquisition, the aeration system restores its aeration volume to its original operating level within one minute, ensuring the entire disturbance cycle is controlled within 20 minutes to minimize interference with the biochemical treatment process.
[0035] Step 2: Preprocess multiple sets of standard activity diagnostic data and construct an original dataset to train the random forest algorithm and obtain a dissolved oxygen concentration prediction model.
[0036] The preprocessing includes: for each set of standard activity diagnostic data, the average values of influent flow rate (intFL), chemical oxygen demand (COD), ammonia nitrogen concentration (AN), system temperature (T), and sludge concentration (MLSS) are taken as input features; the time series data of dissolved oxygen concentration are linearly fitted, and the dissolved oxygen decay rate (R) is calculated from the absolute value of its slope as the output target variable, thereby constructing the intrinsic dataset sample.
[0037] Influent flow rate (intFL), chemical oxygen demand (COD), ammonia nitrogen concentration (AN), system temperature (T), and sludge concentration (MLSS) are key process parameters that determine the dissolved oxygen decay rate (R), representing key dimensions such as organic load, nitrogen source, reaction environment, and biomass, respectively.
[0038] The training process includes: randomly dividing the intrinsic dataset into training and test sets in an 8:2 ratio; to avoid the randomness of data partitioning, optimizing the parameters on the training set through 5-fold cross-validation, and finally determining the model parameters: number of decision trees 100, maximum depth 10, and minimum number of sample splits 5.
[0039] After training and validation, the model's performance metrics on the test set are as follows: Root Mean Square Error (RMSE) = 0.032 mg / (L∙min), Mean Absolute Error (MAE) = 0.028 mg / (L∙min), Coefficient of Determination (R²) = 0.89, and Mean Absolute Percentage Error (MAPE) = 8.20%. All of these metrics meet the preset qualification standards, namely, R² > 0.8 and MAPE < 20%. Specifically, an R² of 0.89 indicates that 89% of the variation in dissolved oxygen decay rate can be explained by the five input features, including influent flow rate and chemical oxygen demand (COD). This demonstrates that the five input features have a high explanatory power for the target variable (R), and the model exhibits excellent explanatory power.
[0040] Step 3: During routine system operation, standardized activity diagnostics are automatically initiated at fixed time intervals Δt to monitor the dissolved oxygen concentration within the ΔT period in real time and calculate the dissolved oxygen decay rate R. t Simultaneously, the average data of influent flow rate (intFL), chemical oxygen demand (COD), ammonia nitrogen concentration (AN), system temperature (T), and sludge concentration (MLSS) are acquired and input into the dissolved oxygen concentration prediction model. The model then predicts the baseline dissolved oxygen decay rate R0 that should exist within the ΔT time period when the aerobic wastewater treatment system is in normal operation under the current specific conditions.
[0041] Specifically, a fixed diagnostic interval of 15 days is set, and the system automatically performs standard activity diagnostics. Taking a single standard diagnostic as an example, the change in dissolved oxygen concentration is as follows: Figure 2 As shown, the current decay rate R is measured. t=0.16 mg / (L∙min), and simultaneously obtained current operating parameters including MLSS=2980 mg / L, T=20.8°C, intFL =1420 m³ / h, COD=305 mg / L, and AN=38 mg / L. These parameters are input into the dissolved oxygen concentration prediction model to obtain the baseline dissolved oxygen decay rate R0=0.23 mg / (L∙min).
[0042] Step 4: R t Compared with R0, the relative deviation ΔR of dissolved oxygen decay rate within the ΔT period is calculated, and the microbial activity status of activated sludge (normal / too low / too high) is determined according to the preset threshold.
[0043] The preset threshold is set so that the absolute value of the relative deviation ΔR does not exceed 15% of the reference decay rate R. When |ΔR| ≤ 15%, the microbial activity status is judged as "normal", when ΔR < -15%, it is judged as "insufficient", and when ΔR > +15%, it indicates that the system is in an overload state and process inspection is required.
[0044] If the calculated ΔR = -30.4%, and based on the preset threshold (±15%), since ΔR < -15%, the system determines the microbial activity status as "too low".
[0045] Step 5: Based on the results of the activity status determination, and according to the deviation value ΔR and the current operating conditions, the aerobic wastewater treatment system executes the preset control strategy to adjust one or more key process parameters.
[0046] The preset control strategy refers to a control logic that is triggered in stages based on the severity of the deviation in the active state ΔR: when -30%≤ΔR<-15%, the first-level control is activated, increasing the sludge return ratio by 5%-10%. This directly increases the oxygen consumption per unit time by increasing the total amount of microorganisms in the aerobic wastewater treatment system, thereby reducing the decay rate R. t The system aims to restore the sludge return rate to the baseline value R0. When ΔR < -30%, secondary control is initiated, increasing the sludge return ratio by 10%-15% while reducing the amount of excess sludge discharge by 20%-30%. This aims to further consolidate biomass and extend sludge age, promoting the recovery and stability of the microbial community structure to systematically enhance activity. When ΔR < -15% is detected three times consecutively, tertiary control is triggered. Based on the aforementioned operations, nutrients are dynamically added to address potential nutrient imbalances, providing substrate support for microbial metabolism and fundamentally improving activity. The key process parameters specifically include the sludge return ratio, excess sludge discharge rate, and nutrient dosage. The aerobic wastewater treatment system dynamically adjusts these parameters by monitoring changes in ΔR in real time until the activity recovers to the target range.
[0047] If the system is determined to be in an overload state, it will immediately issue an early warning and automatically retrieve recent fluctuation records of key water quality parameters such as influent flow rate, chemical oxygen demand, and ammonia nitrogen concentration. At the same time, it will prompt operators to take manual samples and conduct supplementary analyses such as sludge settling ratio (SV30), sludge volume index (SVI), and microbial microscopy to comprehensively diagnose the cause of system abnormalities.
[0048] If ΔR = -30.4% < -30%, the aerobic wastewater treatment system, based on the preset graded control strategy, triggers and executes secondary control: increasing the sludge return ratio from the current 62% to 70%, thereby increasing the total amount of active microorganisms in the aerobic tank; simultaneously reducing the excess sludge discharge rate by 25%, to extend the sludge age and retain highly active microorganisms. Relevant control commands are issued to actuators such as the sludge return pump and the excess sludge discharge valve.
[0049] Furthermore, to verify the control effect, the system automatically performs a supplementary diagnosis 24 hours after the control is implemented. The ΔR diagnostic response is as follows: Figure 3 As shown, ΔR has recovered to -8.2%, which is within the normal threshold |ΔR| < 15%. This indicates that through the above adaptive optimization control, the activity of the activated sludge has been effectively restored and it has returned to a stable operating state.
[0050] It should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any equivalent changes, modifications, or substitutions made by those skilled in the art using conventional technical means within the scope of the technical solutions disclosed in the present invention, without departing from the technical spirit of the present invention, should be included within the scope of protection of the present invention.
Claims
1. A method for in-situ dynamic control of activated sludge activity based on machine learning, characterized in that, Includes the following steps: S1. Obtain multiple sets of standard activity diagnostic data for the aerobic wastewater treatment system. Each set of data includes the time sequence of dissolved oxygen concentration, influent flow rate, chemical oxygen demand, ammonia nitrogen concentration, temperature, and sludge concentration within a diagnostic window ΔT. S2. Preprocess multiple sets of standard active diagnostic data and use them to train the random forest algorithm to obtain a dissolved oxygen concentration prediction model. The training samples include: the input features are the average values of influent flow rate, chemical oxygen demand, ammonia nitrogen concentration, temperature and sludge concentration within the same diagnostic window, and the output target feature is the dissolved oxygen decay rate obtained from the sequence of dissolved oxygen concentration changes over time within the same diagnostic window. S3. Re-collect the influent flow rate, chemical oxygen demand (COD), ammonia nitrogen concentration, temperature, and sludge concentration of the aerobic wastewater treatment system within the current diagnostic window ΔT, and calculate the average values for each. Input these values into the dissolved oxygen concentration prediction model to obtain the predicted dissolved oxygen decay rate R0 within the ΔT time period. Simultaneously, collect the time sequence of dissolved oxygen concentration changes within the current diagnostic window ΔT, and calculate the actual dissolved oxygen decay rate R0 within the current diagnostic window ΔT. t ; S4. Calculate the predicted value R and the actual value R. t The relative deviation ΔR is used to determine the microbial activity status of the activated sludge based on a preset threshold, indicating whether it is normal, too low, or too high. S5. Based on the results of the activity status determination, the deviation value ΔR, and the current operating conditions of the aerobic wastewater treatment system, the process parameters of the aerobic wastewater treatment system are adjusted in stages until the activity status is normal.
2. The method for in-situ dynamic regulation of activated sludge activity according to claim 1, characterized in that, The standard active diagnostic data acquisition method is as follows: each time data is collected, the output air volume of the aeration system is gradually reduced from the normal operating value to the set air volume value within a short period of time and kept stable. Then, dissolved oxygen concentration, influent flow rate, chemical oxygen demand, ammonia nitrogen concentration, temperature, and sludge concentration are collected synchronously at a set frequency within the diagnostic window. After the data collection is completed, the output air volume of the aeration system is gradually restored to the normal operating value within a short period of time.
3. The method for in-situ dynamic regulation of activated sludge activity according to claim 2, characterized in that, The output air volume of the aeration system gradually decreases from the normal operating value to 15%-25% of the original air volume within 30 seconds, and returns to the normal operating value within 1 minute.
4. The method for in-situ dynamic regulation of activated sludge activity according to claim 1, characterized in that, The preprocessing includes linearly fitting the time series data of dissolved oxygen concentration, and using the absolute value of the slope of the fitted line as the dissolved oxygen decay rate.
5. The method for in-situ dynamic regulation of activated sludge activity according to claim 1, characterized in that, The method for determining the microbial activity state of activated sludge is as follows: set a negative threshold and a positive threshold. When ΔR < negative threshold, it is determined to be in an excessively low state. When ΔR > positive threshold, it is determined to be in an excessively high state. When ΔR ∈ [negative threshold, positive threshold], it is determined to be in a normal state.
6. The method for in-situ dynamic regulation of activated sludge activity according to claim 1, characterized in that, The regulation includes: if the water quality is determined to be in an excessively high state, then retrieving the fluctuation records of water quality parameters in the recent period and conducting sludge settling ratio, sludge volume index and microbial microscopic analysis.
7. The method for in-situ dynamic regulation of activated sludge activity according to claim 1, characterized in that, The regulation includes: if it is determined to be too low, it is divided into three levels of regulation according to the degree of deviation of ΔR from the negative threshold: Level 1 regulation, increase the sludge return ratio; Level 2 regulation, while increasing the sludge return ratio, reduce the amount of residual sludge discharge; when the determination of being too low occurs three times in a row, Level 3 regulation is carried out, which increases the sludge return ratio, reduces the amount of residual sludge discharge, and increases the amount of nutrients.
8. The method for in-situ dynamic regulation of activated sludge activity according to claim 1, characterized in that, The diagnostic window ΔT is 8-15 minutes.
9. A machine learning-based in-situ dynamic control system for activated sludge activity, characterized in that, Includes the following modules: Data acquisition module: used to acquire multiple sets of standard activity diagnostic data of the aerobic wastewater treatment system. Each set of data includes the time sequence of dissolved oxygen concentration, influent flow rate, chemical oxygen demand, ammonia nitrogen concentration, temperature, and sludge concentration within a diagnostic window ΔT. Prediction model generation module: used to preprocess multiple sets of standard activity diagnostic data and to train the random forest algorithm to obtain a dissolved oxygen concentration prediction model. The training samples include: input features are the average values of influent flow rate, chemical oxygen demand, ammonia nitrogen concentration, temperature and sludge concentration within the same diagnostic window, and output target features are the dissolved oxygen decay rate obtained from the sequence of dissolved oxygen concentration changes over time within the same diagnostic window. The real-time calculation and prediction module for dissolved oxygen decay rate is used to re-collect the influent flow rate, chemical oxygen demand (COD), ammonia nitrogen concentration, temperature, and sludge concentration of the aerobic wastewater treatment system within the current diagnostic window ΔT, calculate the average values of these parameters, and input them into the dissolved oxygen concentration prediction model to obtain the predicted value R0 of the dissolved oxygen decay rate within the ΔT time period. Simultaneously, it collects the time sequence of dissolved oxygen concentration changes within the current diagnostic window ΔT and calculates the actual value R of the dissolved oxygen decay rate within the current diagnostic window ΔT. t ; Microbial activity status determination module: used to calculate the predicted value R and the actual value R. t The relative deviation ΔR is used to determine the microbial activity status of the activated sludge based on a preset threshold, indicating whether it is normal, too low, or too high. The graded control module is used to grade and control the process parameters of the aerobic wastewater treatment system based on the results of the activity status determination, the deviation value ΔR, and the current operating conditions of the aerobic wastewater treatment system, until the activity status is normal.