Method, control system, evaluation system and storage medium for online adaptive updating of precise aeration control for short-cut nitrification
By employing an online adaptive update method and utilizing concept drift detection and incremental learning modules to adjust the deep learning time series prediction model in real time, the problem of accuracy decay of the deep learning time series prediction model when operating conditions change is solved, and efficient and safe aeration volume prediction and system stability are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG SHUANGYI ENVIRONMENTAL PROTECTION TECH DEV
- Filing Date
- 2026-04-30
- Publication Date
- 2026-07-14
AI Technical Summary
Deep learning time series prediction models cannot be adjusted in real time in wastewater treatment to adapt to the decline in model accuracy caused by changes in operating conditions, resulting in suboptimal control states and production continuity issues in aeration systems during long-term operation.
An online adaptive update method is introduced, which adjusts the deep learning time series prediction model in real time through a concept drift detection module and an incremental learning module. Combined with a dual-parameter control method for dissolved oxygen and effluent ammonia nitrogen, the model achieves automatic correction and a safe rollback mechanism.
This improves the adaptability and stability of the aeration system during long-term operation, ensures efficient aeration volume prediction and system safety, and avoids long-term suboptimal control conditions.
Smart Images

Figure CN122144901B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wastewater biological treatment technology, specifically to a method, control system, evaluation system, and storage medium for online adaptive updating of short-range nitrification precise aeration control. Background Technology
[0002] In the biological nitrogen removal process of wastewater treatment, short-cut nitrification is the process of removing ammonia nitrogen (NH4) from the nitrogen content of nitrogen-containing materials. + -N) is oxidized to nitrite nitrogen (NO2). - -N) and accumulate, while preventing further oxidation to nitrate nitrogen (NO3). - This technology (using the N-type carbon dioxide) can save approximately 25% of aeration energy consumption and 40% of carbon source consumption, demonstrating significant energy-saving and consumption-reducing advantages.
[0003] In recent years, deep learning-based temporal prediction models, represented by Long Short-Term Memory (LSTM) networks, have been introduced into the field of short-range nitrification aeration control. These methods predict the optimal aeration pump frequency for the next moment by performing time-series modeling of multi-dimensional operating parameters such as influent ammonia nitrogen concentration, dissolved oxygen concentration, pH value, and sludge concentration. This type of technology has achieved significant results in overcoming the response lag of biochemical reactions.
[0004] The aforementioned deep learning-based aeration control methods share a common drawback: the models typically employ an "offline training, online inference" deployment model. Once trained and deployed, the model parameters remain fixed. However, in the long-term operation of actual wastewater treatment plants, system conditions undergo continuous changes, primarily manifested in the following aspects:
[0005] (1) Seasonal temperature changes: In winter, the water temperature drops from above 25℃ to below 15℃, which directly affects the activity of nitrifying bacteria. Under low temperature conditions, the activity of ammonia-oxidizing bacteria decreases, and the system's demand for aeration changes, resulting in a significant increase in the prediction bias of the model trained under high temperature conditions.
[0006] (2) Sudden changes in influent water quality: A sudden increase in the proportion of industrial wastewater discharge, the dilution effect of the rainy season, and changes in drainage patterns during holidays can lead to a significant shift in the statistical distribution of parameters such as influent ammonia nitrogen concentration and organic matter concentration.
[0007] (3) Microbial community succession: As the operating time goes on, the structure of the microbial community in the reactor will undergo slow but continuous changes, resulting in changes in the system response characteristics under the same operating conditions.
[0008] The aforementioned changes in operating conditions are known as "concept drift" in the field of machine learning. After concept drift occurs, the prediction accuracy of the original model will gradually decrease. Actual operating data shows that, without updates, the model prediction bias can rapidly increase from less than 5% before drift to 15%~20%, and in severe cases, it can even lead to instability of the control system.
[0009] To address the issue of decreased model prediction accuracy due to changes in operating conditions, the current solution involves manually collecting new data, retraining the model offline, and redeploying it after the accuracy declines. This approach has the following problems: (1) it takes a long time for the accuracy degradation to be detected, during which time the aeration system is in a suboptimal control state; (2) retraining and deployment require shutdown or switching to manual mode, affecting production continuity; (3) retraining lacks memory protection of historical operating conditions, which may lead to the model performing well under new operating conditions but degrading under historical conditions. Based on the above, it is currently impossible to simultaneously predict accuracy degradation, allowing the model to quickly adjust to adapt to changes in operating conditions. Summary of the Invention
[0010] The present invention aims to overcome the shortcomings of existing deep learning time-series prediction models, which cannot be adjusted in real time to adapt to changes in operating conditions and thus cause the model accuracy to decay. It provides a method, control system, evaluation system, and storage medium for online adaptive updating of short-range nitrification precise aeration control to overcome the above-mentioned shortcomings.
[0011] To achieve the above objectives, the present invention provides the following technical solution:
[0012] This invention provides a method for online adaptive updating of precise aeration control for short-range nitrification, comprising:
[0013] S1. Obtain 9-dimensional feature data within a continuous time period of period t as the final period, and obtain a 9-dimensional feature vector after normalization; input the 9-dimensional feature vector into a deep learning time series prediction model to output the predicted aeration pump frequency of period (t+1); use a dual-parameter control method based on dissolved oxygen and effluent ammonia nitrogen to correct the predicted aeration pump frequency to obtain the final aeration pump frequency of period (t+1).
[0014] S2. Substitute the predicted aeration pump frequency of period (t+1) and the final aeration pump frequency of period (t+1) into equation (1) to calculate the residual;
[0015] (1);
[0016] In equation (1), The residual for the (t+1)th period; The predicted aeration pump frequency for a period of (t+1); The final aeration pump frequency for the (t+1) period;
[0017] Input the residual into the concept drift detection module to determine whether there is concept drift in the deep learning time series prediction model;
[0018] When there is concept drift, use the incremental learning module to fine-tune the deep learning time series prediction model; and evaluate the fine-tuned deep learning time series prediction model: if the evaluation passes, deploy the fine-tuned deep learning time series prediction model, and re-execute according to S1 to obtain the final aeration pump frequency in the (t + 1) cycle to complete the aeration control in the (t + 1) cycle; if the evaluation fails, trigger the multi-level safety fallback mechanism;
[0019] When there is no concept drift, complete the aeration control in the (t + 1) cycle according to the final aeration pump frequency obtained by executing S1.
[0020] Preferably, in S1, the 9-dimensional feature data includes influent ammonia nitrogen concentration, reactor pH value, dissolved oxygen concentration, sludge concentration, aeration pump frequency, effluent ammonia nitrogen concentration, effluent nitrate nitrogen concentration, effluent nitrite nitrogen concentration, and water temperature;
[0021] And / or, the deep learning time series prediction model is at least one of the LSTM model, GRU model, and Transformer model;
[0022] And / or, the interval time between adjacent cycles is 40 - 150 min;
[0023] And / or, the continuous time period includes at least 5 cycles;
[0024] And / or, the dual-parameter control method based on dissolved oxygen and effluent ammonia nitrogen includes:
[0025] (t + 1) The starting point of the cycle is the (t + 1) moment, and the starting point of the t cycle is the t moment;
[0026] S1.1 Determine that the critical dissolved oxygen concentration in the water sample to be treated is A and the critical effluent ammonia nitrogen concentration is B; and continuously detect the water sample to be treated to obtain the dissolved oxygen concentration at the (t + 1) moment as a, the effluent ammonia nitrogen concentration at the (t + 1) moment as b, and the effluent ammonia nitrogen concentration at the t moment as b';
[0027] S1.2 Compare the critical effluent ammonia nitrogen concentration with the effluent ammonia nitrogen concentration, and the critical dissolved oxygen concentration and the dissolved oxygen concentration; perform corresponding processing according to the comparison results:
[0028] (1) When b ≥ B and a ≥ A, adjust the aeration pump frequency to the maximum and give an alarm;
[0029] (2) When b ≥ B and a < A, increase the aeration pump frequency and fully aerate until b < B;
[0030] (3) When b < B and a ≥ A, reduce the frequency of the aeration pump and slow down the aeration until a < A;
[0031] (4) When b < B and a < A, determine the weighted change amount of the ammonia nitrogen concentration in the effluent at the (t + 1)th moment, Δb, according to Equation (2) avg , and compare the ammonia nitrogen concentration in the effluent at the (t + 1)th moment with the ammonia nitrogen concentration in the effluent at the tth moment, and continue to process according to the comparison result, where b1 = 0.5 mg / L:
[0032] (4.1) Δb avg > b1, and b - b’ > 0 for two consecutive cycles, increase the aeration pump frequency by one level and aerate until Δb avg ≤ b1;
[0033] (4.2) Δb avg ≤ b1, maintain or reduce the aeration pump frequency;
[0034] Δb avg = α(b - b’) + (1 - α)Δb’ avg (2);
[0035] In Equation (2), α is the sensitivity coefficient, ∈[0.3, 0.7]; b is the ammonia nitrogen concentration in the effluent at the (t + 1)th moment, mg / L; b’ is the ammonia nitrogen concentration in the effluent at the tth moment, mg / L; Δb avg is the weighted change amount of the ammonia nitrogen concentration in the effluent at the (t + 1)th moment; Δb’ avg is the weighted change amount of the ammonia nitrogen concentration in the effluent at the tth moment.
[0036] When the above logic is controlled and operated, the calculation methods of b’ and Δbavg at t = 0 are as follows:
[0037] Assume that the water quality is stable and equal to the current reading at the moment before startup.
[0038] Let the virtual b’ = b1; the instantaneous change (b1 b’) = 0; the initial smoothing trend Δbavg’ = 0, Δbavg(t = 1) = 0.
[0039] Preferably, in S1.2, determine the lower limit concentration of the ammonia nitrogen in the effluent to be 10 mg / L, denoted as c; in case (4.2) of S1.2, when Δb avg ≤ b1 and b ≥ c, maintain the aeration pump frequency, and when Δb avg ≤ b1 and b < c, adjust the aeration pump frequency to the lowest;
[0040] And / or, in S1.2, the critical concentration of dissolved oxygen is 0.5 mg / L, and the critical concentration of ammonia nitrogen in the effluent is calculated according to the following Equation (3):
[0041] (3);
[0042] In formula (3), FA is the critical concentration of free ammonia of 10 mg / L; , where is the critical concentration of ammonia nitrogen in the effluent, mg / L; T is the real-time temperature of the water sample to be treated, ℃; pH is the real-time acidity or alkalinity of the water sample to be treated.
[0043] Preferably, in S2, the concept drift detection module includes an ADWIN detection submodule, used to monitor the residual changes in S1 to determine whether the performance of the deep learning time series prediction model has degraded; and a KL divergence detection submodule, used to monitor the input distribution changes of the 9-dimensional feature vector in S1 to determine whether the current working condition has changed;
[0044] And / or, the incremental learning module includes an elastic weight consolidation constraint submodule and a core sample library replay submodule;
[0045] And / or, the fine-tuning frequency of the incremental learning module is 0.01~0.1 of the initial training learning rate, and the number of fine-tuning iterations is 5~50 rounds;
[0046] And / or, the evaluation criteria are as follows: the MAE of the fine-tuned deep learning time series prediction model on the validation set is ≤10%; and the MAE on the validation set subset of each working condition category does not exceed 1.5 times the historical best MAE of that category.
[0047] And / or, the multi-level security fallback mechanism includes:
[0048] First-level rollback: Roll back to the deep learning time series prediction model before the fine-tuning and continue running, mark this update as a failure, and retain the log of the update failure for analysis;
[0049] Secondary rollback: When more than two consecutive updates fail, it is determined that the current operating condition has exceeded the learning capacity of the deep learning time series prediction model. The feedforward prediction circuit of the deep learning time series prediction model is automatically shut down, and closed-loop control is carried out entirely independently based on the dual-parameter control method based on dissolved oxygen and effluent ammonia nitrogen.
[0050] The three-level backoff mechanism issues a manual intervention signal and alarm when abnormal fluctuations occur in the 9-dimensional feature data. At the same time, it adjusts the aeration pump frequency to 40% of the rated frequency.
[0051] Preferably, the judgment method of the concept drift detection module is as follows: when the ADWIN detection submodule determines that the performance of the deep learning time series prediction model has degraded and the KL divergence detection submodule determines that the current working condition has changed, then the deep learning time series prediction model is judged to have concept drift; otherwise, there is no concept drift.
[0052] And / or, the core sample library used in the core sample library playback submodule is a multi-condition dataset including summer high temperature conditions, winter low temperature conditions, spring and autumn transition conditions, high load conditions, low load conditions and industrial wastewater impact conditions.
[0053] And / or, the incremental learning module fine-tunes the deep learning time series prediction model, and predicts MAE on the validation subset after each round of fine-tuning. If the MAE on all validation subsets does not decrease for three consecutive rounds, the fine-tuning is terminated early.
[0054] And / or, the validation set is 9-dimensional feature data from the most recent 10 to 30 periods and the core sample library;
[0055] And / or, the subset of the verification set is a single working condition dataset corresponding to each working condition category in the verification set.
[0056] Preferably, the absence of concept drift can be categorized as follows: when only the ADWIN detection submodule determines that the performance of the deep learning time series prediction model has degraded, the deep learning time series prediction model iterates for 5 to 10 rounds at an initial training learning rate of 0.01 to 0.1; when only the KL divergence detection submodule determines that the current operating condition has changed, it is marked as an early warning state and the monitoring frequency of the KL divergence detection submodule is increased, but the deep learning time series prediction model is not fine-tuned.
[0057] This invention also provides a short-range nitrification precision aeration control system to achieve precise aeration in conjunction with an online adaptive update method for short-range nitrification precision aeration control. The short-range nitrification precision aeration control system includes a reactor, which contains a separate membrane module and sensors for monitoring pH, water temperature, liquid level, and dissolved oxygen concentration. The sensors are connected to an information integration unit. The separate membrane module includes a first membrane module and a second membrane module. One side of the reactor is connected to an inlet tank. This side is also connected to an acid dosing unit for adding acid and an alkali dosing unit for adding alkali, a variable frequency aeration pump for supplying air to the reactor, and an ammonia nitrogen detector. The other side of the reactor is connected to a water storage tank. A peristaltic pump for controlling the effluent is located between the water storage tank and the reactor. A circulating water tank is located on the inner wall of the reactor near the first membrane module. The circulating water tank and the ammonia nitrogen detector are located on the inner and outer sides of the reactor.
[0058] This invention also provides an online adaptive updating short-range nitrification precision aeration control system, comprising:
[0059] The acquisition and prediction module is used to acquire 9-dimensional feature data and confirm the residuals.
[0060] The concept drift detection module is used to determine whether the deep learning time series prediction model has concept drift by using residuals.
[0061] The incremental learning module is used to fine-tune the current deep learning time series prediction model to make it conform to the current working conditions;
[0062] The evaluation module is used to confirm whether the fine-tuned deep learning time series prediction model meets the requirements of the current working conditions.
[0063] The safety module is used to switch to safety mode after a failure to fine-tune a deep learning time series prediction model.
[0064] The present invention also provides an evaluation system, comprising: a memory for storing a computer program; and a processor for executing the computer program to realize an online adaptive update method for precise aeration control of short-range nitrification.
[0065] The present invention also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, a method for online adaptive updating of short-range nitrification precise aeration control is implemented.
[0066] Therefore, the present invention has the following beneficial effects:
[0067] (1) The present invention introduces a concept drift detection module and incremental learning fine-tuning, which enables the deep learning time series prediction model to learn complex and nonlinear process dynamics to achieve automatic correction of the model. It provides aeration volume prediction that is more efficient and has a higher prediction accuracy than traditional PID or redeployed deep learning time series prediction models, greatly enhancing the adaptability and stability of the aeration system in long-term operation.
[0068] (2) The concept drift detection module of the present invention uses the ADWIN algorithm to determine that the model performance has deteriorated and uses KL divergence to determine that the operating conditions of the aeration system have changed. Through these dual criteria, it is confirmed that the operating conditions have changed and the model can no longer meet the operating conditions of that year. This realizes the rapid confirmation and accurate attribution of the model accuracy deterioration, and avoids the aeration system from being in a suboptimal control state for a long time.
[0069] (3) The incremental learning fine-tuning of this invention combines elastic weight consolidation with core sample library replay, constructing a dual anti-forgetting system from two dimensions: parameter space and data space. The elastic weight consolidation mechanism protects the physical carrier of historical steady-state knowledge from being destroyed in the parameter space, while the core sample library replay ensures the diversity of global working conditions represented by the incremental training set in the data space; the two work together to ensure that the model can efficiently absorb the features of new working conditions while perfectly preserving its generalization and adaptation capabilities to all historical working conditions.
[0070] (4) After the deep learning time-series prediction model is fine-tuned by reinforcement learning, the present invention adds an evaluation mechanism. By introducing a comprehensive validation set that includes recent new data and historical multi-class working condition data, it can accurately identify and effectively intercept defective models that have local performance degradation due to overfitting, underfitting or catastrophic forgetting caused by incremental learning.
[0071] (5) This invention sets up a multi-level safety backoff mechanism, providing a very high fault tolerance rate and an industrial-grade safety baseline for the long-term automated operation of the aeration system. The dual-parameter control method based on dissolved oxygen and effluent ammonia nitrogen serves as a safety defense line when the AI model fails, making the aeration system less prone to collapse and ensuring the absolute safety of the aeration treatment.
[0072] (6) The aeration control method provided by the present invention cleverly solves the technical bottleneck of the lack of "supervisory labels" in the online learning of deep learning time series prediction models. Without manual labeling, the aeration system can automatically and continuously obtain the real feedback signal of each control cycle, thereby supporting the fully closed-loop automatic operation of "online inference-feedback correction-residual monitoring-fine-tuning evaluation". Attached Figure Description
[0073] Figure 1 The graph shows the effect of free ammonia concentration on the activity of AOB / NOB.
[0074] Figure 2 A schematic diagram of the process for online adaptive updating of precise aeration control for short-range nitrification.
[0075] Figure 3 A logical diagram illustrating the concept drift determined by the dual criteria.
[0076] Figure 4 This is a logical diagram of a multi-level safety rollback mechanism.
[0077] Figure 5 This is a comparison chart of the time series signals of the dual criteria in Example 1.
[0078] Figure 6 This is a comparison chart of the application of the triggering mechanism in Example 1 and the changes in the predicted residuals.
[0079] Figure 7 A bar chart comparing the four strategies for preventing forgetting in Example 2.
[0080] Figure 8 This is a graph showing the MAE variation under seasonal temperature changes.
[0081] Figure 9 This is a graph showing the MAE change curve under the scenario of a sudden change in the proportion of industrial wastewater.
[0082] Figure 10 This is a schematic diagram of a short-range nitrification precision aeration control device.
[0083] Figure 11 A schematic diagram of an online adaptive update system for short-range nitrification precision aeration control.
[0084] The codes in the diagram are as follows: Reactor 100; Circulating water tank 110; Separate membrane module 120; First membrane module 121; Second membrane module 122; Sensor 130; Inlet tank 200; Storage tank 300; Peristaltic pump 310; Acid dosing unit 400; Alkali dosing unit 500; Variable frequency aeration pump 600; Ammonia nitrogen detector 700; Information integration unit 800. Detailed Implementation
[0085] The present invention will be further described below with reference to specific embodiments. Those skilled in the art will be able to implement the present invention based on these descriptions. Furthermore, the embodiments of the present invention described below are generally only some, not all, of the embodiments of the present invention. Therefore, all other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort should fall within the scope of protection of the present invention.
[0086] The preferred embodiments of the present invention will now be described in detail.
[0087] This invention provides a method for online adaptive updating of precise aeration control for short-range nitrification, comprising:
[0088] S1. Obtain 9-dimensional feature data within a continuous time period of period t as the final period, and obtain a 9-dimensional feature vector after normalization; input the 9-dimensional feature vector into a deep learning time series prediction model to output the predicted aeration pump frequency of period (t+1); use a dual-parameter control method based on dissolved oxygen and effluent ammonia nitrogen to correct the predicted aeration pump frequency to obtain the final aeration pump frequency of period (t+1).
[0089] S2 substitutes the predicted aeration pump frequency of period (t+1) and the final aeration pump frequency of period (t+1) into equation (1) to calculate the residual;
[0090] (1);
[0091] In equation (1), The residual for the (t+1)th period; The predicted aeration pump frequency for a period of (t+1); The final aeration pump frequency for the (t+1) period;
[0092] The residual is input into the concept drift detection module to determine whether the deep learning time series prediction model has concept drift.
[0093] When concept drift exists, the deep learning time series prediction model is fine-tuned using the incremental learning module; and the fine-tuned deep learning time series prediction model is evaluated: if the evaluation passes, the fine-tuned deep learning time series prediction model is deployed, and S1 is re-executed to obtain the final aeration pump frequency for (t+1) cycle to complete the aeration control for (t+1) cycle; if the evaluation fails, a multi-level safety rollback mechanism is triggered.
[0094] When there is no concept drift, the aeration control for the (t+1)th cycle is completed by executing the final aeration pump frequency obtained in the (t+1)th cycle according to S1.
[0095] Preferably, in S1, the 9-dimensional feature data includes influent ammonia nitrogen concentration, reactor pH value, dissolved oxygen concentration, sludge concentration, aeration pump frequency, effluent ammonia nitrogen concentration, effluent nitrate nitrogen concentration, effluent nitrite nitrogen concentration, and water temperature.
[0096] The aforementioned nine features can be categorized into three types: influent load indicators (influent ammonia nitrogen concentration); process status indicators (reactor pH, dissolved oxygen concentration, sludge concentration, aeration pump frequency, and water temperature); and effluent feedback indicators (effluent ammonia nitrogen concentration, effluent nitrate nitrogen concentration, and effluent nitrite nitrogen concentration). These three types of indicators correspond to the "input-process-output" stages of short-cut nitrification, comprehensively capturing the system's overall status information from influent to reaction to effluent. The absence of information from any one stage will lead to a decrease in the model's prediction accuracy: influent indicators alone cannot reflect the internal state of the reactor; process indicators alone cannot predict load changes; and effluent indicators alone result in significant response lag. The combined input of these three types of indicators allows the model to understand the dynamic changes of short-cut nitrification from multiple perspectives and levels, thereby outputting more accurate aeration pump frequency predictions.
[0097] Preferably, the deep learning time series prediction model is at least one of the LSTM model, GRU model, and Transformer model.
[0098] More preferably, the deep learning time series prediction model is an LSTM model.
[0099] Long Short-Term Memory (LSTM) networks are a type of recurrent neural network specifically designed for processing time-series data. Compared to traditional RNNs, LSTMs effectively mitigate the vanishing gradient problem through gating mechanisms (input gate, forget gate, output gate), enabling them to capture long-term dependencies in time-series data. In short-range nitrification precision aeration control systems, the current state of the system is not only related to the immediate input but also closely correlated with the operating history of the past few cycles—for example, a continuous upward trend in effluent ammonia nitrogen for three consecutive cycles indicates that the system is about to enter a high-load state. LSTMs are well-suited to capturing such time-series patterns and are therefore the preferred model in this invention.
[0100] This invention is also applicable to other deep learning time series prediction models such as GRU (Gated Recurrent Unit) and Transformer. However, considering the training efficiency and deployment convenience of LSTM on medium-scale time series data, as well as its reliability which has been fully verified in industrial control scenarios, LSTM is preferred.
[0101] More preferably, the LSTM model is a two-layer LSTM structure and includes a Dropout layer; the first layer of the two-layer LSTM has 64 neurons, and the second layer of the two-layer LSTM has 32 neurons; the dropout rate of the Dropout layer is 0.2.
[0102] The two-layer structure is used instead of a single layer because the first LSTM layer is responsible for extracting low-order features (such as the changing trend of individual parameters) from the original time-series data, while the second LSTM layer extracts high-order features (such as the coupling relationship between multiple parameters) based on the output of the first layer. The number of neurons is reduced from 64 in the first layer to 32 in the second layer, forming a "wide→narrow" funnel structure, which retains sufficient feature representation capability while avoiding the risk of overfitting due to too many parameters. The Dropout layer is placed between the two LSTM layers, and a dropout rate of 0.2 means randomly shutting down 20% of the neuron connections during training, forcing the network to learn more robust feature representations. When the dropout rate is below 0.1, the regularization effect is not significant; when the dropout rate is above 0.3, it may lead to excessive information loss and training non-convergence. The dropout rate of 0.2 has been experimentally verified to effectively balance the model's fitting ability and generalization ability in this application scenario.
[0103] More preferably, the LSTM model is trained as follows: Multi-dimensional parameters are obtained from 500 to 10,000 consecutive time points, normalized to obtain multi-dimensional feature vectors, and input into the pre-trained LSTM model; the aeration pump frequency at which the optimal short-range nitrification effect is achieved at each time point is used as the label for that time point, and the pre-trained LSTM model is trained and validated to obtain the LSTM model. More preferably, the criterion for judging the optimal short-range nitrification effect is: NO2 - -N accumulation rate >85% and DO <0.5 mg / L.
[0104] Preferably, the interval between adjacent cycles is 40 to 150 minutes.
[0105] Preferably, the continuous time period includes at least 5 cycles.
[0106] More preferably, the continuous time period includes 5 to 8 cycles.
[0107] The selection of the time series length needs to balance information sufficiency and computational efficiency. When it is less than 5 cycles, the amount of historical data is insufficient, and it is difficult for LSTM to effectively learn the temporal dependence relationships in the data, resulting in poor prediction accuracy. When it is between 5 and 8 cycles, the sequence contains sufficient historical information for the model to capture the changing trend, and at the same time, it will not introduce too much noise due to the overly long sequence. When it is greater than 10 cycles, the overly long sequence will significantly increase the computational burden and inference latency. At the same time, the timeliness of the early data decreases, which may lead the model to wrongly focus on outdated pattern signals and even cause overfitting.
[0108] Therefore, preferably 5 - 8 cycles are selected in the present invention. Under the setting where each cycle time is 45 min, 5 - 8 cycles correspond to a historical data window of 3.75 - 6 h, which can cover the characteristic cycles of most short-term working condition changes in the precise aeration control system for short-cut nitrification.
[0109] Preferably, the dual-parameter control method based on dissolved oxygen and effluent ammonia nitrogen includes:
[0110] The starting point of the (t + 1) cycle is the (t + 1) moment, and the starting point of the t cycle is the t moment;
[0111] S1.1 Determine the critical dissolved oxygen concentration in the water sample to be treated as A and the critical effluent ammonia nitrogen concentration as B; and continuously detect the water sample to be treated to obtain the dissolved oxygen concentration at the (t + 1) moment as a, the effluent ammonia nitrogen concentration at the (t + 1) moment as b, and the effluent ammonia nitrogen concentration at the t moment as b';
[0112] S1.2 Compare the critical effluent ammonia nitrogen concentration with the effluent ammonia nitrogen concentration, and the critical dissolved oxygen concentration and the dissolved oxygen concentration; perform corresponding processing according to the comparison results:
[0113] (1) When b ≥ B and a ≥ A, adjust the frequency of the aeration pump to the maximum and give an alarm;
[0114] (2) When b ≥ B and a < A, increase the frequency of the aeration pump and fully aerate until b < B;
[0115] (3) When b < B and a ≥ A, reduce the frequency of the aeration pump and slow down the aeration until a < A;
[0116] (4) When b < B and a < A, determine the weighted change amount of the effluent ammonia nitrogen concentration △b at the (t + 1) moment according to formula (1) avg , and compare the effluent ammonia nitrogen concentration at the (t + 1) moment with the effluent ammonia nitrogen concentration at the t moment, and continue the processing according to the comparison results, where b1 = 0.5 mg / L:
[0117] (4. I) △b avg > b1, and b - b' > 0 shows continuously in two cycles, increase the aeration pump frequency by one level and aerate until △b avg≤b1;
[0118] (4.2)△b avg ≤b1, the aeration pump frequency remains unchanged or decreases;
[0119] △b avg =α(b - b’) + (1 - α)△b’ avg (2);
[0120] In formula (2), α is the sensitivity coefficient, ∈[0.3, 0.7]; b is the ammonia nitrogen concentration of the effluent at time (t + 1), mg / L; b’ is the ammonia nitrogen concentration of the effluent at time t, mg / L; △b avg is the weighted change amount of the ammonia nitrogen concentration of the effluent at time (t + 1); △b’ avg is the weighted change amount of the ammonia nitrogen concentration of the effluent at time t.
[0121] Preferably, in S1.2, the lower limit concentration of the ammonia nitrogen in the effluent is determined to be 10 mg / L, denoted as c; in case (4.2) of S1.2, △b avg ≤b1 and b≥c, then keep the aeration pump frequency, △b avg ≤b1 and b<c, adjust the aeration pump frequency to the lowest.
[0122] Preferably, in S1.2, the critical concentration of dissolved oxygen is 0.5 mg / L, and the critical concentration of ammonia nitrogen in the effluent is calculated according to the following formula (3):
[0123] (3);
[0124] In formula (3), FA is the critical concentration of free ammonia, which is 10 mg / L; is the critical concentration of ammonia nitrogen in the effluent, mg / L; T is the real-time temperature of the water sample to be treated, °C; pH is the real-time pH value of the water sample to be treated.
[0125] The inventor of the present invention explored the effects of the free ammonia concentration on ammonia-oxidizing bacteria (AOB) and nitrite-oxidizing bacteria (NOB), and the results are as Figure 1 shown. Observe Figure 1It can be seen that when the free ammonia concentration is 10 mg / L, the activity of NOB is significantly inhibited, while the relative activity of AOB decreases significantly. This corresponds to the initial inhibition state of nitrifying bacteria in the system in case (2). When the free ammonia concentration is between 1 and 10 mg / L, there is a large difference in activity between AOB and NOB. In this state, the activity of NOB is inhibited, and nitrite accumulates; AOB maintains high activity. Furthermore, when the free ammonia concentration is greater than 10 mg / L, the activities of both AOB and NOB are significantly inhibited. This corresponds to case (1), where alkalinity is not consumed, i.e., nitrification does not occur due to the lack of AOB. Therefore, in order to avoid the system entering a high ammonia nitrogen inhibition state or nitrification state, controlling the free ammonia concentration at around 10 mg / L is the best choice, which can ensure that short-cut nitrification proceeds normally and obtain the maximum nitrite accumulation rate. The inventors used 10 mg / L as the critical concentration of free ammonia, detected pH and temperature, and derived the dynamic critical concentration of effluent ammonia nitrogen.
[0126] Preferably, in S2, the concept drift detection module includes an ADWIN detection submodule, used to monitor residual changes in S1 to determine whether the performance of the deep learning time series prediction model has degraded; and a KL divergence detection submodule, used to monitor changes in the input distribution of the 9-dimensional feature vector in S1 to determine whether the current operating condition has changed.
[0127] Preferably, the judgment method of the concept drift detection module is as follows: when the ADWIN detection submodule determines that the performance of the deep learning time series prediction model has degraded and the KL divergence detection submodule determines that the current working condition has changed, then the deep learning time series prediction model is judged to have concept drift; otherwise, there is no concept drift.
[0128] A single criterion has significant limitations. Using only model performance degradation detection (such as monitoring predicted MAE) can identify model inaccuracies, but it cannot determine whether the cause is a change in input vector distribution or model parameter degradation. Furthermore, performance degradation signals often have a lag, requiring a sufficient accumulation of abnormal residuals before becoming statistically significant; by then, the system may have already been running in a suboptimal state for a considerable period. Using only input distribution drift detection (such as KL divergence) can detect input changes early, but changes in input distribution do not necessarily lead to model inaccuracies. For example, normal fluctuations in influent ammonia nitrogen within the model's training coverage range can also cause changes in KL divergence, making updates unnecessary. Combining dual criteria enables the system to perform both "cause detection" and "symptom detection": KL divergence detects input vector distribution shifts (identifying the cause), while ADWIN detects the actual degradation of model prediction accuracy (confirming the symptom). The two criteria corroborate each other, significantly reducing the false positive rate.
[0129] Preferably, the absence of concept drift can be categorized as follows: when only the ADWIN detection submodule determines that the performance of the deep learning time series prediction model has degraded, the deep learning time series prediction model iterates for 5 to 10 rounds at an initial training learning rate of 0.01 to 0.1; when only the KL divergence detection submodule determines that the current operating condition has changed, it is marked as an early warning state and the monitoring frequency of the KL divergence detection submodule is increased, but the deep learning time series prediction model is not fine-tuned.
[0130] Preferably, the method for monitoring residual changes is as follows: the residual is input into the ADWIN detection submodule, and the ADWIN algorithm automatically finds the cut point to divide the sliding window into two adjacent sub-windows. W 0 and W 1. The residual mean drift threshold ε is calculated using equations (4) to (5). cut The mean difference of the residuals is calculated using equation (6). ;
[0131] when ≥ε cut When the residual changes significantly, the performance degradation of the deep learning time series prediction model is determined.
[0132] (4);
[0133] (5);
[0134] (6);
[0135] In equations (4) to (6), m is the harmonic average length of the two sub-windows; W 0 represents a sub-window containing older residual data that is cut out within the sliding window; W 1 represents an adjacent sub-window containing more recent residual data; ε cut This is the residual mean drift threshold; δ adwin The confidence level parameter is 0.01. This represents the difference in the mean of the residuals. for W The mean of 0; for W The mean of 1.
[0136] Preferably, the method for monitoring the input distribution change of the 9-dimensional feature vector is as follows: the 9-dimensional feature vector is input into the KL divergence detection submodule, and the comprehensive KL divergence is calculated using equations (7) to (10). ,when When the value is ≥0.1, it is determined that the input distribution of the 9-dimensional feature vector has changed significantly, indicating that the current working condition has changed.
[0137] (7);
[0138] (8);
[0139] (9);
[0140] (10);
[0141] In equations (7) to (10), j For the first j The following feature vectors are used: 1. Influent ammonia nitrogen concentration; 2. Reactor pH value; 3. Dissolved oxygen concentration; 4. Sludge concentration; 5. Aeration pump frequency; 6. Effluent ammonia nitrogen concentration; 7. Effluent nitrate nitrogen concentration; 8. Effluent nitrite nitrogen concentration; 9. Water temperature. For the first j The total number of buckets for each feature vector; The first one in the current sliding window j The eigenvector falls into the th eigenvector. k The number of samples per bucket; This represents the total number of samples within the current sliding window. This represents the probability distribution of the current sliding window; For the first in the historical benchmark dataset j The eigenvector falls into the th eigenvector. k The number of samples per bucket; This represents the total number of samples in the historical benchmark dataset. For the first j KL divergence of each eigenvector; The summation is the KL divergence; Y is the total number of eigenvectors, 9; For the first j The weights of the eigenvectors are as follows: influent ammonia nitrogen concentration 1 has a weight of 0.20, water temperature 9 has a weight of 0.15, dissolved oxygen concentration 3 has a weight of 0.15, reactor pH value 2 has a weight of 0.10, sludge concentration 4 has a weight of 0.10, aeration pump frequency 5 has a weight of 0.05, effluent ammonia nitrogen concentration 6 has a weight of 0.10, effluent nitrate nitrogen concentration 7 has a weight of 0.05, and effluent nitrite nitrogen concentration 8 has a weight of 0.10.
[0142] More preferably, after incremental learning completes the fine-tuning, the SHAP algorithm is then introduced to calculate the comprehensive KL divergence. .
[0143] The SHAP algorithm can dynamically adjust the weights of the 9-dimensional feature vector, thereby improving the overall KL divergence. The results are more consistent with the current operating conditions. The optimization here mainly aims to enable the system to adaptively identify and focus on the dominant variables under different operating conditions. For example, under low-temperature conditions in winter, the SHAP contribution of water temperature parameters increases significantly; while under industrial wastewater impact conditions, the SHAP contribution of influent ammonia nitrogen concentration dominates. By converting SHAP values into a dynamic mapping mechanism of KL divergence weights, the monitoring sensitivity of the KL divergence detection submodule is improved.
[0144] Preferably, the incremental learning module includes an elastic weight consolidation constraint submodule and a core sample library replay submodule.
[0145] The core challenge of incremental learning is catastrophic forgetting. When a model is trained on new operating conditions, significant adjustments to the model parameters can disrupt the model's memory of old operating conditions, rendering the model unsuitable for all conditions. To address this issue, this invention employs a combination of elastic weight consolidation and core sample library replay. The model is trained using both new and old data samples as training sets simultaneously. This ensures that the model does not need to be trained from scratch, but rather achieves smooth evolution through a dual protection mechanism of parameter space and data space.
[0146] Specifically, the core sample library replay mechanism ensures the diversity of training data from a data space perspective by mixing new and old typical data, continuously strengthening the model's prior memory of historical operating conditions. The elastic weight consolidation mechanism, on the other hand, identifies model parameters crucial to old tasks and imposes penalty constraints on the magnitude of changes in these key parameters during fine-tuning, protecting the physical carriers of learned historical knowledge from significant modifications and overwriting from a parameter space perspective. The synergistic combination of these two mechanisms forms a complementary double forgetting protection, enabling the model to efficiently learn and accurately fit the characteristics of current new operating conditions while robustly retaining its generalization and adaptability to all historical operating conditions, thus achieving true offline, continuous online evolution.
[0147] Preferably, the fine-tuning frequency of the incremental learning module is 0.01 to 0.1 of the initial training learning rate, and the number of fine-tuning iterations is 5 to 50 rounds.
[0148] The fine-tuning learning rate for incremental learning needs to be much lower than the initial training learning rate. This is because during initial training, the model starts from random initialization and requires a large learning rate to converge quickly. However, during incremental learning, the model is already in a well-trained parameter space; only fine-tuning is needed to adapt to new conditions. An excessively large learning rate can cause parameters to jump out of their current advantageous region during optimization, destroying the learned useful features. For example, with an initial learning rate of 0.001, setting the fine-tuning learning rate to 0.0001 (1 / 10) ensures that new features are effectively learned while maximizing the preservation of old knowledge.
[0149] Preferably, when the incremental learning module fine-tunes the deep learning time series prediction model, it predicts MAE on the validation subset after each round of fine-tuning. If the MAE on all validation subsets does not decrease for three consecutive rounds, the fine-tuning is terminated early.
[0150] Preferably, the incremental learning method is as follows:
[0151] Obtain the 9-dimensional feature data of the most recent 30 to 60 periods as a new database representing the current working conditions, add it to the old database to obtain the updated database, and normalize the data in the updated database according to (11) to (12);
[0152] (11);
[0153] (12);
[0154] In equations (11) to (12), This represents the mean of the updated database. The standard deviation of the updated database; This is the mean of the old database; The standard deviation of the old database; This represents the mean of the new database. The standard deviation of the new database; The smoothing coefficient for the exponential moving average is 0.9 to 0.99. A higher value indicates a greater degree of retention of the old database;
[0155] After the core sample library is normalized, it is mixed with the normalized and updated database to form a training dataset, wherein the ratio of the core sample library to the updated database in the training dataset is 0.3 to 0.5.
[0156] The training dataset uses elastic weights to consolidate constraints to fine-tune the parameters of the deep learning time series prediction model. The fine-tuned parameters are then input into the deep learning time series prediction model to complete the model fine-tuning.
[0157] The formula for calculating the elastic weight consolidation constraint is as follows:
[0158] (13);
[0159] (14);
[0160] (15);
[0161] (16);
[0162] In equations (13) to (16), For the model number i The importance of each parameter; For the model's current fixed number of... i One parameter; h For the first in the core sample library h One core sample; For the first h The prediction loss for each core sample; M is the total number of core samples selected from the core sample library; The task loss is N; N is the total number of samples in the training dataset. The predicted aeration pump frequency for a period of (t+1); The final aeration pump frequency for the (t+1) period; For joint losses; The EWC regularization coefficient is 1000; For the fine-tuned model i One parameter.
[0163] Preferably, the core sample library used in the core sample library playback submodule includes a multi-condition dataset covering summer high-temperature conditions, winter low-temperature conditions, spring and autumn transition conditions, high-load conditions, low-load conditions, and industrial wastewater impact conditions.
[0164] Operating condition categories are identified based on the corresponding changes in water temperature and influent ammonia nitrogen concentration in the input feature data. The judgment criteria for each operating condition are as follows: water temperature ≥ 25℃, high-temperature summer operating condition; water temperature < 15℃, low-temperature winter operating condition; 15℃ ≤ water temperature < 25℃, spring / autumn transitional operating condition; influent ammonia nitrogen concentration > 200 mg / L, high-load operating condition; influent ammonia nitrogen concentration < 50 mg / L, low-load operating condition; ratio of influent ammonia nitrogen concentration to its historical average > 1.5, industrial wastewater impact operating condition.
[0165] In addition, the core sample library is sampled uniformly according to the operating condition category.
[0166] More preferably, the maximum sample capacity of the core sample library is 2000 samples.
[0167] More preferably, the core sample library is updated by adding new samples to the core sample library and using a k-center greedy algorithm.
[0168] Specifically, the distance distribution of the new sample to the existing samples of the same class in the feature space is calculated. If the new sample can expand the coverage of the class in the feature space, the old sample with the lowest coverage contribution is replaced.
[0169] Preferably, the evaluation criteria are as follows: the MAE of the fine-tuned deep learning time series prediction model on the validation set is ≤10%; and the MAE on the validation set subset of each working condition category does not exceed 1.5 times the historical best MAE of that category.
[0170] More preferably, the predicted MAE is ≤8%.
[0171] More preferably, the predicted MAE is ≤5%.
[0172] Preferably, the validation set consists of 9-dimensional feature data from the most recent 10 to 30 periods and the core sample library.
[0173] Preferably, the validation set subset is a single working condition dataset corresponding to each working condition category in the validation set.
[0174] Preferably, the multi-level safety fallback mechanism includes:
[0175] First-level rollback: Roll back to the deep learning time series prediction model before the fine-tuning and continue running, mark this update as a failure, and retain the log of the update failure for analysis;
[0176] Secondary rollback: When more than two consecutive updates fail, it is determined that the current operating condition has exceeded the learning capacity of the deep learning time series prediction model. The feedforward prediction circuit of the deep learning time series prediction model is automatically shut down, and closed-loop control is carried out entirely independently based on the dual-parameter control method based on dissolved oxygen and effluent ammonia nitrogen.
[0177] The three-level backoff mechanism issues a manual intervention signal and alarm when abnormal fluctuations occur in the 9-dimensional feature data. At the same time, it adjusts the aeration pump frequency to 40% of the rated frequency.
[0178] The three-level rollback design follows the principle of "gradual degradation while ensuring a safety net." Level 1 rollback (model version rollback) is the lightest approach, simply abandoning the current update while the system continues to operate under model control; suitable for occasional update failures. Level 2 rollback (switching to dual-parameter feedback control mode) is a stronger measure, completely abandoning model prediction and taking over from rule-based control based on dissolved oxygen and effluent ammonia nitrogen. While dual-parameter feedback control is less precise than model prediction, it offers advantages such as strong determinism and independence from data-driven approaches, maintaining basic system stability even when the model fails. Level 3 rollback (manual intervention alarm) is the last line of defense. When rule-based control also fails to address system anomalies, operational control is returned to maintenance personnel, and the aeration pump frequency is adjusted to 40% of its rated frequency to ensure a minimum oxygen supply under any circumstances, preventing system collapse due to complete anoxic conditions.
[0179] This invention also provides a short-range nitrification precision aeration control system to achieve precise aeration in conjunction with an online adaptive update method for short-range nitrification precision aeration control. The short-range nitrification precision aeration control system includes a reactor, which contains a separate membrane module and sensors for monitoring pH, water temperature, liquid level, and dissolved oxygen concentration. The sensors are connected to an information integration unit. The separate membrane module includes a first membrane module and a second membrane module. One side of the reactor is connected to an inlet tank. This side is also connected to an acid dosing unit for adding acid and an alkali dosing unit for adding alkali, a variable frequency aeration pump for supplying air to the reactor, and an ammonia nitrogen detector. The other side of the reactor is connected to a water storage tank. A peristaltic pump for controlling the effluent is located between the water storage tank and the reactor. A circulating water tank is located on the inner wall of the reactor near the first membrane module. The circulating water tank and the ammonia nitrogen detector are located on the inner and outer sides of the reactor.
[0180] This invention also provides an online adaptive updating short-range nitrification precision aeration control system, comprising:
[0181] The acquisition and prediction module is used to acquire 9-dimensional feature data and confirm the residuals.
[0182] The concept drift detection module is used to determine whether the deep learning time series prediction model has concept drift by using residuals.
[0183] The incremental learning module is used to fine-tune the current deep learning time series prediction model to make it conform to the current working conditions;
[0184] The evaluation module is used to confirm whether the fine-tuned deep learning time series prediction model meets the requirements of the current working conditions.
[0185] The safety module is used to switch to safety mode after a failure to fine-tune a deep learning time series prediction model.
[0186] The present invention also provides an evaluation system, comprising: a memory for storing a computer program; and a processor for executing the computer program to realize an online adaptive update method for precise aeration control of short-range nitrification.
[0187] The present invention also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, a method for online adaptive updating of short-range nitrification precise aeration control is implemented.
[0188] The preferred embodiments of the present invention have been described above, but the present invention is not limited thereto.
[0189] Example 1: A method for online adaptive updating of precise aeration control for short-range nitrification
[0190] In this section, the initial sludge activity load of the water samples to be treated was greater than 0.05 kg / kg NH3d, the initial pH was 7-8, and the initial temperature was 20-30℃. The LSTM model has completed initial offline training and been deployed online.
[0191] Reference Figure 2 Complete the following steps:
[0192] S1. Online Inference Phase – Acquisition of Basic Parameters and Model Prediction:
[0193] The (t+1) period begins at time (t+1), and the t period begins at time t; each period lasts 45 minutes.
[0194] ① The control system provided in Example 2 was used to collect 9-dimensional feature data for 5 periods in real time, including periods (t-4), (t-3), (t-2), and from time (t-1) to period t. The collected feature data was normalized (mapped to the [0,1] interval) to obtain 9-dimensional feature vectors for the 5 periods. The 9-dimensional feature data are as follows: influent load index: influent ammonia nitrogen concentration; process state index: reactor pH value, dissolved oxygen concentration, sludge concentration, aeration frequency, and water temperature; effluent feedback index: effluent ammonia nitrogen concentration, effluent nitrate nitrogen concentration, and effluent nitrite nitrogen concentration.
[0195] ② Input the normalized 5×9 feature matrix into the deployed LSTM model to predict the aeration pump frequency in the (t+1)th cycle. .
[0196] The LSTM model used in the above deployment was trained as follows: Real-time data was collected using the control system provided in Example 2. The system ran continuously for 30 days in 'data acquisition mode,' covering high and low load fluctuations, temperature changes, and rainy / dry season scenarios. A total of 10,000 consecutive moments of 9-dimensional feature data were collected. The collected feature data was normalized (mapped to the [0,1] interval) to obtain 9-dimensional feature vectors, which served as the dataset. The dataset was then used to construct a time series input into the pre-trained LSTM model using a sliding window technique. The dataset was divided into a training set (80%) and a test set (20%). The aeration pump frequency at which the optimal short-range nitrification effect was achieved in each cycle was used as the label for that cycle. Iterative training was performed using the Adam optimizer until the loss function (MSE) converged below 0.01, resulting in the trained LSTM model. The pre-trained LSTM model was then trained and validated to obtain the final LSTM model. The criterion for determining the optimal short-range nitrification effect was: NO2... - -N accumulation rate >85% and DO <0.5 mg / L.
[0197] LSTM model usage: The 9-dimensional feature vector obtained in S1 is input into the trained LSTM model to predict the oxygen demand for cycle (t+1) and thus obtain the basic aeration pump frequency. The control system provided in Example 2 reads this basic aeration pump frequency and instructs the variable frequency aeration pump to execute this frequency, completing the "coarse adjustment".
[0198] During training and use, the parameters of the LSTM model are set as follows: the LSTM model is a two-layer LSTM structure, which includes a Dropout layer; the first layer of the two-layer LSTM has 64 neurons, and the second layer of the two-layer LSTM has 32 neurons; the dropout rate of the Dropout layer is 0.2.
[0199] S2. Residual Calculation and Monitoring Stage:
[0200] The predicted aeration pump frequency was corrected using a two-parameter control method based on dissolved oxygen and effluent ammonia nitrogen. The final aeration pump frequency for period (t+1) is obtained. .
[0201] Substitute the predicted aeration pump frequency for period (t+1) and the final aeration pump frequency for period (t+1) into equation (3) to calculate the residual.
[0202] (3);
[0203] In equation (3), The residual for the (t+1)th period; The predicted aeration pump frequency for a period of (t+1); The final aeration pump frequency for a (t+1) cycle.
[0204] The specific steps of the dual-parameter control method based on dissolved oxygen and effluent ammonia nitrogen are as follows:
[0205] 1. Obtaining and determining basic parameters:
[0206] The critical concentration of dissolved oxygen in the water sample to be treated was determined to be 0.5 mg / L; the lower limit concentration of ammonia nitrogen in the effluent was determined to be 10 mg / L, denoted as c.
[0207] The control system provided in Example 2 was used to monitor the water sample in real time to obtain the dissolved oxygen concentration at time (t+1) as a, the effluent ammonia nitrogen concentration at time (t+1) as b, and the effluent ammonia nitrogen concentration at time t as b'. The interval between time (t+1) and time t is 45 min.
[0208] The critical concentration of ammonia nitrogen in the effluent is obtained as follows: after real-time monitoring of pH and temperature, it is substituted into equation (1) to calculate:
[0209] (1);
[0210] In formula (1), FA is the critical concentration of free ammonia at 10 mg / L; is the critical concentration of ammonia nitrogen in the effluent, mg / L; T is the real-time temperature of the water sample to be treated, °C; pH is the real-time pH value of the water sample to be treated.
[0211] 2. Identification and aeration control of the short-cut nitrification stage:
[0212] Compare the critical concentration of ammonia nitrogen in the effluent with the concentration of ammonia nitrogen in the effluent, and the critical concentration of dissolved oxygen and the concentration of dissolved oxygen; perform corresponding treatments according to the comparison results. During the treatment process, detect the real-time pH value pH of the water sample to be treated. When pH exceeds 7.5 - 8.0, add acid / alkali to adjust to make pH return to 7.5 - 8.0.
[0213] (1) When b ≥ B and a ≥ A, adjust the frequency of the aeration pump to the maximum and give an alarm;
[0214] (2) When b ≥ B and a < A, increase the frequency of the aeration pump and aerate fully until b < B;
[0215] (3) When b < B and a ≥ A, reduce the frequency of the aeration pump and slow down the aeration until a < A;
[0216] (4) When b < B and a < A, determine the weighted change amount of the ammonia nitrogen concentration in the effluent at the (t + 1) moment according to formula (2), and compare the ammonia nitrogen concentration in the effluent at the (t + 1) moment with the ammonia nitrogen concentration in the effluent at the t moment, and continue the treatment according to the comparison results, where b1 = 0.5 mg / L:
[0217] (4.1.1) △b avg > b1, and b - b’ > 0 shows continuously in two cycles, increase the frequency of the aeration pump by one level and aerate until △b avg ≤ b1;
[0218] (4.1.2) △b avg ≤ b1 and b ≥ c, keep the frequency of the aeration pump;
[0219] (4.1.3) △b avg ≤ b1 and b < c, adjust the frequency of the aeration pump to the lowest;
[0220] △b avg = α(b - b’) + (1 - α)△b’ avg (2);
[0221] In formula (2), α is the sensitivity coefficient, 0.5; b is the ammonia nitrogen concentration in the effluent at the (t + 1) moment, mg / L; b’ is the ammonia nitrogen concentration in the effluent at the t moment, mg / L; △b avg is the weighted change amount of the ammonia nitrogen concentration in the effluent at the (t + 1) moment; △b’ avgThis represents the weighted change in the concentration of ammonia nitrogen in the effluent at time t.
[0222] S3. Concept Drift Detection Stage – Dual Criterion Joint Detection:
[0223] See the diagram of the core logic. Figure 3 .
[0224] First criterion – ADWIN's detection of model performance degradation:
[0225] The residuals obtained from the above calculations are monitored using ADWIN. The ADWIN algorithm automatically finds the cut-off point to divide the sliding window into two adjacent sub-windows. W 0 and W 1. The residual mean drift threshold ε is calculated using equations (4) to (5). cut The mean difference of the residuals is calculated using equation (6). ;when ≥ε cut When the residual changes significantly, it indicates a performance degradation of the deep learning time series prediction model, triggering the first drift signal.
[0226] (4);
[0227] (5);
[0228] (6);
[0229] In equations (4) to (6), m is the harmonic average length of the two sub-windows; W 0 represents a sub-window containing older residual data that is cut out within the sliding window; W 1 represents an adjacent sub-window containing more recent residual data; ε cut This is the residual mean drift threshold; δ adwin The confidence level parameter is 0.01. This represents the difference in the mean of the residuals. for W The mean of 0; for W The mean of 1.
[0230] Second criterion – KL divergence for detecting changes in current operating conditions:
[0231] Using a 5×9 characteristic matrix, the comprehensive KL divergence is calculated using equations (7) to (10). ,when When the value is ≥0.1, it is determined that the input distribution of the 9-dimensional feature vector has changed significantly, indicating that the current operating condition has changed and triggering the second drift signal.
[0232] (7);
[0233] (8);
[0234] (9);
[0235] (10);
[0236] In equations (7) to (10), j For the first j The following feature vectors are used: 1. Influent ammonia nitrogen concentration; 2. Reactor pH value; 3. Dissolved oxygen concentration; 4. Sludge concentration; 5. Aeration pump frequency; 6. Effluent ammonia nitrogen concentration; 7. Effluent nitrate nitrogen concentration; 8. Effluent nitrite nitrogen concentration; 9. Water temperature. For the first j The total number of buckets for each feature vector; The first one in the current sliding window j The eigenvector falls into the th eigenvector. k The number of samples per bucket; This represents the total number of samples within the current sliding window. This represents the probability distribution of the current sliding window; For the first in the historical benchmark dataset j The eigenvector falls into the th eigenvector. k The number of samples per bucket; This represents the total number of samples in the historical benchmark dataset. For the first j KL divergence of each eigenvector; The summation is the KL divergence; Y is the total number of eigenvectors, 9; For the first j The weights of the eigenvectors are as follows: influent ammonia nitrogen concentration 1 has a weight of 0.20, water temperature 9 has a weight of 0.15, dissolved oxygen concentration 3 has a weight of 0.15, reactor pH value 2 has a weight of 0.10, sludge concentration 4 has a weight of 0.10, aeration pump frequency 5 has a weight of 0.05, effluent ammonia nitrogen concentration 6 has a weight of 0.10, effluent nitrate nitrogen concentration 7 has a weight of 0.05, and effluent nitrite nitrogen concentration 8 has a weight of 0.10.
[0237] If it is determined that the performance of the LSTM has degraded and the current operating conditions have changed, then LSTM is considered to have conceptual drift; otherwise, conceptual drift is not present. When no conceptual drift exists: if only the ADWIN detection submodule determines that the performance of the deep learning time-series prediction model has degraded, the deep learning time-series prediction model iterates for 10 rounds with an initial training learning rate of 0.01; if only the KL divergence detection submodule determines that the current operating conditions have changed, it is marked as an early warning state and the monitoring frequency of the KL divergence detection submodule is increased, but the deep learning time-series prediction model is not fine-tuned. When no conceptual drift exists, the aeration control for the (t+1)th cycle is completed using the final aeration pump frequency obtained in S1.
[0238] S4. Incremental Learning and Update Phase – Joint Fine-tuning of EWC and Core Sample Library:
[0239] ① Obtain the 9-dimensional feature data of the last 50 cycles as a new database representing the current working conditions, add it to the old database to obtain the updated database, and normalize the data in the updated database according to (11)~(12);
[0240] (11);
[0241] (12);
[0242] In equations (11) to (12), This represents the mean of the updated database. The standard deviation of the updated database; This is the mean of the old database; The standard deviation of the old database; This represents the mean of the new database. σ represents the standard deviation of the new database; β is the smoothing coefficient of the exponential moving average, 0.95.
[0243] ② After normalization, the core sample library is mixed with the updated normalized database to form the training dataset. In the training dataset, 20 historical typical working condition samples are extracted from the core sample library, and 50 new samples are extracted from the updated database. The training dataset uses elastic weight consolidation constraints to fine-tune the parameters of the LSTM, and the fine-tuned parameters are input into the LSTM to complete the model fine-tuning.
[0244] The formula for calculating the elastic weight consolidation constraint is as follows:
[0245] (13);
[0246] (14);
[0247] (15);
[0248] (16);
[0249] In equations (13) to (16), For the model number i The importance of each parameter; For the model's current fixed number of... i One parameter; h For the first in the core sample library h One core sample; For the first h The prediction loss for each core sample; M is the total number of core samples selected from the core sample library, 500; The task loss is represented by N, which is the total number of samples in the training dataset, 70. The predicted aeration pump frequency for a period of (t+1); The final aeration pump frequency for the (t+1) period; For joint losses; The EWC regularization coefficient is 1000; For the fine-tuned model i One parameter.
[0250] The LSTM fine-tuning frequency is 0.01 of the initial training learning rate, with 25 fine-tuning iterations. If, after each fine-tuning iteration, the MAE (Moment of Effect) predicts on the validation subset, and the MAE on all validation subsets no longer decreases for three consecutive iterations, then the fine-tuning is terminated early. The validation subset consists of a single-condition dataset corresponding to each condition category within the validation set. The validation set comprises 9-dimensional feature data from the most recent 20 periods and a core sample library.
[0251] S5. Update Verification and Deployment / Rollback Phase:
[0252] The fine-tuned LSTM is evaluated using a validation set. The predicted MAE on the validation set is 8%, and the MAE on any subset of the validation set does not exceed 1.5 times the historical best MAE for that class. An LSTM meeting these conditions is considered to have passed the evaluation. The fine-tuned deep learning time-series prediction model is then deployed, and the final aeration pump frequency for cycle (t+1) is obtained to complete aeration control for cycle (t+1).
[0253] LSTMs that do not meet the conditions are considered to have failed the evaluation, and a multi-level safety fallback mechanism is triggered (see [reference]). Figure 4The multi-level safety rollback mechanism is as follows: Level 1 rollback: rolls back to the deep learning time series prediction model before the fine-tuning and continues to run, marking this update as a failure and retaining the update failure log for analysis; Level 2 rollback: when more than two consecutive update failures occur, it is determined that the current operating condition has exceeded the learning capacity range of the deep learning time series prediction model, automatically shutting down the feedforward prediction circuit of the deep learning time series prediction model, and relying entirely on the dual-parameter control method based on dissolved oxygen and effluent ammonia nitrogen for closed-loop control; Level 3 rollback: when abnormal fluctuations occur in the 9-dimensional feature data, a manual intervention signal is issued to trigger an alarm, and the aeration pump frequency is adjusted to 40% of the rated frequency.
[0254] Application Example 1: Performance Verification of Concept Drift Detection
[0255] This application example was completed according to the conceptual drift detection performance verification method provided in Example 1, and the verification was carried out under two typical operating conditions.
[0256] The seasonal temperature variation scenario with a gradual shift in attribution was validated, and the results are as follows: Figures 5-6 As shown in the diagram. Analysis reveals that the system operates stably during the summer (water temperature 25-30℃), and the water temperature gradually drops below 15℃ after November. Using ADWIN alone, a drift signal was detected in the 45th cycle; using KL divergence alone, a drift signal was detected in the 26th cycle, with the water temperature dimension (KL=0.42) contributing the most. However, using the dual-criteria joint detection method of this invention, an early warning was issued in the 26th cycle (KL divergence triggered first), and drift was confirmed in the 32nd cycle (dual triggering). This resulted in an early warning issued 19 cycles (approximately 14 hours) earlier than using ADWIN alone, while maintaining zero false alarms.
[0257] The study validated the application of an industrial wastewater shock scenario characterized by abrupt drift, where the influent ammonia nitrogen concentration jumped from 100 mg / L to 280 mg / L. Analysis showed that ADWIN detection alone detected a drift signal in the 5th cycle; KL divergence detection alone detected a drift signal in the 2nd cycle (influent ammonia nitrogen dimension KL=0.85, far exceeding the threshold). Using a dual-criteria joint detection method, an early warning was issued in the 2nd cycle (KL divergence triggered), and drift was confirmed in the 5th cycle (dual triggering).
[0258] Application Example 2: Verification of the Forgetting Prevention Effect of Incremental Learning
[0259] This application example was completed using the incremental learning anti-forgetting verification method provided in Example 1. The anti-forgetting effects of the four update strategies were compared, and the comparison results are as follows: Figure 7 As shown.
[0260] Strategy A: Fine-tuning only with new data, without forgetting protection; fine-tuning is done directly using only 50 new winter samples.
[0261] Strategy B: Fine-tune only EWC constraints, using EWC constraints (λ) EWC =1000) fine-tuned on 50 new winter samples.
[0262] Strategy C: Only replay the core sample library, using 50 new samples + 20 historical samples from the core sample library for mixed training, without EWC constraints.
[0263] Strategy D: EWC + Core Sample Library Joint (Method provided in Example 1): Use 50 new samples + 20 core sample library samples for mixed training, while applying EWC constraints.
[0264] Figure 7 The horizontal dashed line represents the target historical best MAE limit (5%), which is the best prediction accuracy that the system can achieve after training under summer conditions. This serves as a reference benchmark for the anti-forgetting effect of each strategy.
[0265] Strategy A (minor adjustments only for new data): The MAE drops to 7% in winter; the MAE deteriorates from 4% to 18% in summer, resulting in catastrophic amnesia.
[0266] Strategy B (only minor adjustments to EWC constraints): Winter MAE drops to 8%; Summer MAE rises slightly to 6%.
[0267] Strategy C (Core sample library replay only): MAE drops to 7.5% in winter; MAE rises slightly to 7% in summer.
[0268] Strategy D (EWC + core sample library combined, the method provided in Example 1): The MAE drops to 7.2% in winter; the MAE only rises slightly to 5% in summer, achieving the best dual protection effect; it just reaches the target historical best MAE limit, which other strategies have not achieved.
[0269] Application Example 3: Full-process verification of seasonal temperature change scenarios
[0270] This application example follows the method in Example 1 to verify the overall operational performance under seasonal temperature changes (summer → winter). The results are as follows: Figure 8 As shown.
[0271] (I) Stable operation phase in summer (June to October): The system operates stably at a water temperature of 25-30℃, and the MAE predicted by the LSTM model remains stable at 3-5%. Concept drift detection is performed every 20 cycles, and neither ADWIN nor KL divergence is triggered. The nitrite accumulation rate remains at 86-90%.
[0272] (II) Stage of Operating Condition Drift (November to December): Water temperature gradually decreases from 25℃ to below 15℃. In early November, MAE rises from 5% to 8%; in mid-November, MAE climbs to 12%, and ADWIN detects a jump in the residual mean difference (μ=7.3%>ε). cut =5.2%), triggering the first drift signal. Simultaneously =0.18>0.1 (mainly due to water temperature dimension KL=0.42 and DO dimension KL=0.21), triggering the second drift signal.
[0273] (III) Incremental Learning and Update Phase: With both criteria triggered simultaneously, the system initiates a complete incremental learning and update. Fifty cycles of low-temperature operating condition data are extracted from the data buffer, and 20 historical samples (including summer and spring / autumn data) are obtained from the core sample library. 25 rounds of EWC constraint fine-tuning are performed. Validation results: Overall MAE = 7.2% < 8%, and MAE for each operating condition category satisfies the constraints. The updated model is deployed, and the baseline distribution and Fisher information matrix are updated synchronously.
[0274] (iv) Stable operation phase after update (December to February of the following year): The MAE fluctuated steadily in the range of 7-8% in January, and remained at 7-8% in February. The NAR remained at 80-87%. The system automatically performed one incremental learning update throughout the winter without any manual intervention. The number of samples in the "Winter Low Temperature Conditions" category in the core sample library increased from the initial 30 to 75.
[0275] Application Example 4: Full-process verification of a scenario involving sudden changes in the proportion of industrial wastewater
[0276] This application example follows the method in Example 1 to verify the system's full-process response capability when the proportion of industrial wastewater discharge suddenly increases. The results are as follows: Figure 9 As shown.
[0277] (a) Normal operation phase: Industrial wastewater accounts for about 20% of the wastewater treated by the system. The LSTM model predicts that the MAE is about 4% and the NAR is maintained at 85-90%.
[0278] (ii) Sudden change in operating conditions: On a certain day, the discharge from the upstream industrial park increased sharply, the proportion of industrial wastewater jumped from 20% to 50%, the concentration of ammonia nitrogen in the influent jumped from 100 mg / L to 280 mg / L, and the COD in the influent increased significantly.
[0279] (III) Rapid Response: In the second cycle, the KL divergence detected that the influent ammonia nitrogen level KL=0.85 far exceeded the threshold, triggering an early warning (KL divergence only), and the monitoring frequency increased to once every 5 cycles. In the fifth cycle, ADWIN detected that MAE jumped from 4% to 18%, triggering the first drift signal. With both criteria triggered simultaneously, the system initiated a complete incremental learning update. During the transition period when the LSTM prediction bias was large, the dual-parameter feedback control automatically played a corrective role, ensuring system safety.
[0280] (iv) Recovery to Stability: After 35 cycles (approximately 26 hours) of incremental learning and fine-tuning, the MAE converged from 18% to 7.5%. The NAR recovered from a low of 72% during the shock to 83%. After industrial wastewater discharge returned to normal, the core sample library retained typical samples of this shock condition (12 valid new samples were included in the "Industrial Wastewater Shock Condition" category), providing knowledge reserves for similar scenarios in the future.
[0281] Example 2: Short-range nitrification precision aeration control system
[0282] like Figure 10 As shown, the short-range nitrification precision aeration control system includes a reactor 100, which contains a separate membrane module 120 and sensors 130 for monitoring pH, temperature, liquid level, and dissolved oxygen concentration. Sensors 130 are connected to an information integration unit 800. The separate membrane module 120 includes a first membrane module 121 and a second membrane module 122. An inlet tank 200 is connected to one side of the reactor 100, and the side of the reactor 100 with the inlet tank 200 is also connected to a system for adding substances into the reactor 100. The reactor 100 includes an acid dosing unit 400, an alkali dosing unit 500, a variable frequency aeration pump 600 that supplies air to the reactor 100, and an ammonia nitrogen detector 700. A water storage tank 300 is connected to the other side of the reactor 100. A peristaltic pump 310 that controls the water output is provided between the water storage tank 300 and the reactor 100. A circulating water pool 110 is provided on the inner wall of the reactor 100 near the first membrane module 121. The circulating water pool 110 and the ammonia nitrogen detector 700 are located on the inner and outer sides of the reactor 100.
[0283] Example 3: Online Adaptive Update Short-Range Nitrification Precision Aeration Control System
[0284] A 300-level online adaptive updating short-range nitrification precision aeration control system, such as... Figure 11 As shown, it includes:
[0285] The acquisition and prediction module 302 is used to acquire 9-dimensional feature data and confirm the residuals;
[0286] The concept drift detection module 304 is used to determine whether the deep learning time series prediction model has concept drift by using residuals.
[0287] Incremental learning module 306 is used to fine-tune the current deep learning time series prediction model to make it conform to the current working conditions;
[0288] Evaluation module 308 is used to confirm whether the fine-tuned deep learning time series prediction model meets the requirements of the current working conditions.
[0289] Security module 310 is used to switch to security mode after the fine-tuning of the deep learning time series prediction model fails.
[0290] Example 4 Evaluation System
[0291] An evaluation system includes: a memory for storing a computer program; and a processor for executing the computer program to implement the online adaptive updating method for precise aeration control of short-range nitrification as described in Example 1.
[0292] Example 5 Storage Medium
[0293] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method of online adaptive updating of short-range nitrification precise aeration control as described in Example 1.
Claims
1. A method for online adaptive updating of short-range nitrification precise aeration control, characterized in that, Including: S1. Obtain 9-dimensional feature data within a continuous time period with the t-th period as the last period, and obtain a 9-dimensional feature vector after normalization; Input the 9-dimensional feature vector into the deep learning time series prediction model to output the predicted aeration pump frequency for the (t + 1)-th period; correct the predicted aeration pump frequency with a dual-parameter control method based on dissolved oxygen and effluent ammonia nitrogen to obtain the final aeration pump frequency for the (t + 1)-th period; The 9-dimensional feature data includes influent ammonia nitrogen concentration, reactor pH value, dissolved oxygen concentration, sludge concentration, aeration pump frequency, effluent ammonia nitrogen concentration, effluent nitrate nitrogen concentration, effluent nitrite nitrogen concentration, and water temperature; The dual-parameter control method based on dissolved oxygen and effluent ammonia nitrogen includes: The starting point of the (t + 1)-th period is the (t + 1)-th moment, and the starting point of the t-th period is the t-th moment; S1.1 Determine the critical dissolved oxygen concentration of the water sample to be treated as A and the critical effluent ammonia nitrogen concentration as B; and continuously detect the water sample to be treated to obtain the dissolved oxygen concentration at the (t + 1)-th moment as a, the effluent ammonia nitrogen concentration at the (t + 1)-th moment as b, and the effluent ammonia nitrogen concentration at the t-th moment as b'; S1.2 Compare the critical effluent ammonia nitrogen concentration with the effluent ammonia nitrogen concentration, and the critical dissolved oxygen concentration and the dissolved oxygen concentration; perform corresponding processing according to the comparison results: (1) When b ≥ B and a ≥ A, adjust the aeration pump frequency to the maximum and give an alarm; (2) When b ≥ B and a < A, increase the aeration pump frequency and fully aerate until b < B; (3) When b < B and a ≥ A, reduce the aeration pump frequency and slow down the aeration until a < A; (4) When b < B and a < A, determine the weighted change amount of the ammonia nitrogen concentration in the effluent at the (t + 1)th moment, Δb, according to Equation (2), and compare the ammonia nitrogen concentration in the effluent at the (t + 1)th moment with that at the tth moment, and continue the treatment according to the comparison result, b1 = 0.5 mg / L: avg , and compare the ammonia nitrogen concentration in the effluent at the (t + 1)th moment with that at the tth moment, and continue the treatment according to the comparison result, b1 = 0.5 mg / L: (4.1) △b avg If b > b1, and b-b' > 0 for two consecutive cycles, the aeration pump frequency increases by one level, and aeration continues until Δb. avg ≤b1; (4.2) △b avg ≤b1, the aeration pump frequency remains unchanged or decreases; △b avg =α(b-b')+(1-α)△b' avg (2); In equation (2), α is the sensitivity coefficient, ∈ [0.3, 0.7]; b is the effluent ammonia nitrogen concentration at time (t+1), mg / L; b' is the effluent ammonia nitrogen concentration at time t, mg / L; Δb avg Δb' is the weighted change in effluent ammonia nitrogen concentration at time (t+1); avg This represents the weighted change in effluent ammonia nitrogen concentration at time t. S2. Substitute the predicted aeration pump frequency for the (t + 1)-th period and the final aeration pump frequency for the (t + 1)-th period into Equation (1) to calculate the residual; (1); In equation (1), The residual for the (t+1)th period; The predicted aeration pump frequency for a period of (t+1); The final aeration pump frequency for the (t+1) period; Input the residual into the concept drift detection module to determine whether there is a concept drift in the deep learning time series prediction model; When there is a concept drift, use the incremental learning module to fine-tune the deep learning time series prediction model; and evaluate the fine-tuned deep learning time series prediction model: if the evaluation passes, deploy the fine-tuned deep learning time series prediction model, and re-execute according to S1 to obtain the final aeration pump frequency for the (t + 1)-th period to complete the aeration control for the (t + 1)-th period; if the evaluation fails, trigger the multi-level safety fallback mechanism; When there is no concept drift, complete the aeration control for the (t + 1)-th period according to the final aeration pump frequency obtained by executing according to S1.
2. The method as described in claim 1, characterized in that, The deep learning time series prediction model is at least one of the LSTM model, GRU model, and Transformer model; And / or, the time interval between adjacent periods is 40 - 150 min; And / or, the continuous time period includes at least 5 periods.
3. The method as described in claim 1, characterized in that, In S1.2, the lower limit concentration of the effluent ammonia nitrogen is determined to be 10 mg / L, denoted as c; in case (4.2) of S1.2, △b avg ≤b1 and b≥c, then keep the frequency of the aeration pump, △b avg ≤b1 and b<c, adjust the frequency of the aeration pump to the lowest; And / or, in S1.2, the critical dissolved oxygen concentration is 0.5 mg / L, and the critical effluent ammonia nitrogen concentration is calculated according to the following formula (3): (3); In formula (3), FA is the critical concentration of free ammonia of 10 mg / L; is the critical concentration of ammonia nitrogen in the effluent, mg / L; T is the real-time temperature of the water sample to be treated, °C; pH is the real-time acidity of the water sample to be treated.
4. The method according to any one of claims 1 to 3, characterized in that, In S2, the concept drift detection module includes an ADWIN detection submodule, used to monitor the residual changes in S1 to determine whether the performance of the deep learning time series prediction model has degraded; and a KL divergence detection submodule, used to monitor the input distribution changes of the 9-dimensional feature vector in S1 to determine whether the current working condition has changed. And / or, the incremental learning module includes an elastic weight consolidation constraint submodule and a core sample library replay submodule; And / or, the fine-tuning frequency of the incremental learning module is 0.01~0.1 of the initial training learning rate, and the number of fine-tuning iterations is 5~50 rounds; And / or, the evaluation criteria are as follows: the MAE of the fine-tuned deep learning time series prediction model on the validation set is ≤10%; and the MAE on the validation set subset of each working condition category does not exceed 1.5 times the historical best MAE of that category. And / or, the multi-level security fallback mechanism includes: First-level rollback: Roll back to the deep learning time series prediction model before the fine-tuning and continue running, mark this update as a failure, and retain the log of the update failure for analysis; Secondary rollback: When more than two consecutive updates fail, it is determined that the current operating condition has exceeded the learning capacity of the deep learning time series prediction model. The feedforward prediction circuit of the deep learning time series prediction model is automatically shut down, and closed-loop control is carried out entirely independently based on the dual-parameter control method based on dissolved oxygen and effluent ammonia nitrogen. The three-level backoff mechanism issues a manual intervention signal and alarm when abnormal fluctuations occur in the 9-dimensional feature data. At the same time, it adjusts the aeration pump frequency to 40% of the rated frequency.
5. The method as described in claim 4, characterized in that, The judgment method of the concept drift detection module is as follows: when the ADWIN detection submodule determines that the performance of the deep learning time series prediction model has degraded and the KL divergence detection submodule determines that the current working condition has changed, it is determined that the deep learning time series prediction model has concept drift. Conversely, there is no concept drift; And / or, the core sample library used in the core sample library playback submodule is a multi-condition dataset including summer high temperature conditions, winter low temperature conditions, spring and autumn transition conditions, high load conditions, low load conditions and industrial wastewater impact conditions. And / or, when the incremental learning module fine-tunes the deep learning time series prediction model, it predicts MAE on the validation set subset after each round of fine-tuning. If the MAE on all validation set subsets does not decrease for three consecutive rounds, the fine-tuning is terminated early. And / or, the validation set is 9-dimensional feature data from the most recent 10 to 30 periods and the core sample library; And / or, the subset of the verification set is a single working condition dataset corresponding to each working condition category in the verification set.
6. The method as described in claim 5, characterized in that, The absence of concept drift can be categorized as follows: when only the ADWIN detection submodule determines that the performance of the deep learning temporal prediction model has degraded, the deep learning temporal prediction model iterates for 5 to 10 rounds at an initial training learning rate of 0.01 to 0.
1. Only when the KL divergence detection submodule determines that the current operating condition has changed, it is marked as an early warning state and the monitoring frequency of the KL divergence detection submodule is increased, but the deep learning time series prediction model is not fine-tuned.
7. A short-range nitrification precision aeration control system, characterized in that, This system is designed to facilitate precise aeration as described in any one of claims 1 to 6. The short-range nitrification precise aeration control system includes a reactor. The reactor contains a separate membrane module and sensors for monitoring pH, water temperature, liquid level, and dissolved oxygen concentration. The sensors are connected to an information integration unit. The separate membrane module includes a first membrane module and a second membrane module. One side of the reactor is connected to an inlet tank. The side of the reactor with the inlet tank is also connected to an acid dosing unit for adding acid and an alkali dosing unit for adding alkali, a variable frequency aeration pump for supplying air to the reactor, and an ammonia nitrogen detector. The other side of the reactor is connected to a water storage tank. A peristaltic pump for controlling the outflow is provided between the water storage tank and the reactor. A circulating water tank is provided on the inner wall of the reactor near the first membrane module. The circulating water tank and the ammonia nitrogen detector are located on the inner and outer sides of the reactor.
8. An online adaptive updating short-range nitrification precision aeration control system based on the method described in any one of claims 1 to 6, characterized in that, include: The acquisition and prediction module is used to acquire 9-dimensional feature data and confirm the residuals. The concept drift detection module is used to determine whether the deep learning time series prediction model has concept drift by using residuals. The incremental learning module is used to fine-tune the current deep learning time series prediction model to make it conform to the current working conditions; The evaluation module is used to confirm whether the fine-tuned deep learning time series prediction model meets the requirements of the current working conditions. The safety module is used to switch to safety mode after the fine-tuning of the deep learning time series prediction model fails.
9. An evaluation system, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the method as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 6.