A dynamic monitoring and early warning system for urban sewage treatment
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HAITIAN SHUIWU GRP CO LTD
- Filing Date
- 2026-06-09
- Publication Date
- 2026-08-07
AI Technical Summary
现有污水处理监控方式多局限于单点水质参数的阈值超限报警,仅能在水质指标明显超标后被动触发提示,无法提前捕捉微生物群落的隐性异常变化,尤其对低浓度毒性物质的识别能力不足
本发明通过在每个连续时间切片内构建活性污泥响应参数的滞后关联矩阵并计算其线性独立维度数,能够将微生物群落各参数间相互驱动的关联结构量化表征。当毒性冲击发生时,各响应参数原有相互独立的波动模式被同一胁迫因素支配趋同,线性独立维度数由正常工况下的4~5持续下降至接近1,从而在水质常规指标明显超标之前即可捕捉菌群隐性失稳的前兆,实现从被动报警到主动预警的跨越。
Smart Images

Figure CN122369238B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of wastewater monitoring technology, specifically a dynamic monitoring and early warning system for urban wastewater treatment. Background Technology
[0002] The biochemical treatment stage of urban wastewater treatment relies on the stable metabolic activity of activated sludge microbial communities. Abnormal toxic shocks from influent water quality are the main causes of sludge microbial community inactivation, effluent exceeding standards, and process malfunctions. Existing wastewater treatment monitoring methods are mostly limited to alarms triggered by threshold exceedances of single-point water quality parameters. They can only passively trigger alerts after water quality indicators significantly exceed standards, failing to detect latent abnormal changes in the microbial community in advance, especially lacking the ability to identify low-concentration toxic substances.
[0003] Conventional monitoring schemes only independently analyze influent water quality parameters or single sludge indicators, ignoring the temporal lag coupling relationships between various response parameters of activated sludge, making it difficult to characterize the inherent laws of mutual driving influence between parameters. At the same time, traditional methods lack in-depth exploration of the structural characteristics and response time patterns of multi-parameter correlations, relying solely on numerical fluctuation thresholds for judgment, which is easily affected by instantaneous noise and normal water quality fluctuations, resulting in false alarms, and cannot distinguish between low-concentration toxicity and normal operating condition fluctuations.
[0004] Most existing early warning mechanisms use fixed threshold configurations, which remain unchanged for a long period once set. This makes them unable to adapt to seasonal fluctuations in influent composition and changes in operating conditions caused by the natural replacement of sludge microbiota. They also cannot autonomously iterate and optimize based on historical early warning events and process recovery effects. Furthermore, most systems cannot distinguish between short-term random fluctuations and continuous toxic shocks, lacking a verification mechanism for the continuous stability of abnormal states. This makes them prone to false alarms and missed alarms, failing to meet the actual operational needs of dynamic and accurate monitoring and early warning of urban wastewater treatment processes. Summary of the Invention
[0005] The purpose of this invention is to provide a dynamic monitoring and early warning system for urban sewage treatment, so as to solve the problems mentioned in the background art.
[0006] A dynamic monitoring and early warning system for urban wastewater treatment includes: The acquisition unit is used to acquire influent water quality parameter sequences in real time and establish dynamic baselines, outputting water quality fluctuation characteristics; and to acquire activated sludge response parameter sequences in real time and obtain sludge floc morphology characteristics through image recognition, outputting microbial activity status. The analysis unit is used to calculate the correlation strength reflecting the driving relationship between two response parameters within each continuous time slice, taking each response parameter in the microbial activity state as a node, and constructing a response parameter lag correlation matrix based on sensor time-series data of every two response parameters within a preset time lag interval. The correlation strength is adopted as the statistical correlation measure corresponding to the lag time that makes the two parameter sequences achieve the maximum cooperative change. The linear independent dimension of the response parameter lag correlation matrix is calculated, which is determined by counting the number of singular values greater than one percent of the maximum singular value after performing singular value decomposition on the matrix. The verification unit is used to start recording the duration when the number of linear independent dimensions drops below a preset dimension threshold, and to monitor whether the number of linear independent dimensions remains below the preset dimension threshold in subsequent continuous time slices; when the recorded time reaches a preset holding time threshold, a stable impact confirmation signal is generated. The determination unit is used to determine that there is a toxic impact in the influent after receiving the stable impact confirmation signal, output an early warning control signal, and trigger a graded response processing flow; wherein, the preset dimension threshold and the preset retention time threshold are automatically determined by the system based on the statistical results of historical non-toxic periods; The adjustment unit is used to dynamically optimize the calculation parameters of the dynamic baseline, the preset time lag interval, and the preset retention time threshold based on the actual graded response actions and the recovery status of the biochemical system after each warning.
[0007] This invention establishes a dynamic baseline of influent water quality in real time and acquires activated sludge response parameters and floc morphology through a data acquisition unit. Then, an analysis unit constructs a lag correlation matrix of response parameters and calculates the number of linearly independent dimensions (effective rank) within each continuous time slice. A verification unit times the duration when the dimension number remains below a preset threshold, confirming a toxic shock only after reaching a preset retention time threshold. Finally, an adjustment unit automatically determines the threshold based on historical non-toxic periods and dynamically optimizes parameters based on the early warning recovery effect. Thus, it can quantify the synergistic state of the microbial community from the structural level of the temporal-driven relationships between parameters, capture latent signs of instability before conventional water quality indicators exceed standards, filter out instantaneous noise interference, and enable the system thresholds and operating parameters to iterate autonomously according to operating conditions, achieving accurate, reliable, and adaptive dynamic monitoring and early warning.
[0008] In some possible implementations, the analysis unit is also used to perform strong correlation filtering and subgraph connectivity verification on the hysteresis correlation matrix of the response parameters: Calculate the correlation strength value between every two response parameters, retain parameter pairs with correlation strength values greater than a preset dynamic threshold, and set the remaining parameter pairs to zero to obtain a sparse correlation matrix; the preset dynamic threshold is automatically determined by the system based on the percentile distribution of all correlation strength values in the current time slice. Calculate the number of connected subgraphs in the sparse correlation matrix. If the number of connected subgraphs is 1, output a consistency confirmation signal. The consistency confirmation signal is used to shorten the preset hold time threshold.
[0009] In some possible implementations, the collected influent water quality parameters include at least two of the following: conductivity, pH value, ammonia nitrogen concentration, total organic carbon concentration, and heavy metal-related parameters; the collected activated sludge response parameters include sludge concentration MLSS, oxidation-reduction potential ORP, dissolved oxygen DO, sludge settling performance index SV30, pollutant removal rate, nitrifying microbial activity, and sludge floc morphology identified by image recognition.
[0010] In some possible implementations, the analysis unit is further configured to monitor the decreasing trend of the number of linearly independent dimensions before determining that the number of linearly independent dimensions has fallen below a preset dimensional threshold: Obtain the linear independent dimension of the response parameter lag correlation matrix within two consecutive time slices. If the dimension of the later time slice is less than the dimension of the earlier time slice, record a dimension decay event. After a preset number of consecutive dimension decay events occur, output a dimension decay warning as a precursor signal of toxic impact and start the state maintenance verification process in advance.
[0011] This invention uses an analysis unit to continuously monitor the decreasing trend of the dimensionality of adjacent time slices before determining that the linear independent dimensionality has fallen to a threshold. When a preset number of consecutive dimensionality decay events occur, a dimensionality decay warning is output as a precursor signal to toxicity impact, and the state maintenance verification process is initiated in advance. Therefore, monitoring can be intervened at an early stage before the dimensionality falls below the threshold, accurately adapting to the gradual process of low-concentration toxicity slowly inhibiting bacterial metabolism, extending the warning window in advance, and gaining more preparation time for emergency response.
[0012] In some possible implementations, the determination unit is further configured to record the response parameter weight distribution when the number of linearly independent dimensions drops below a preset dimension threshold: When the number of linear independent dimensions of the response parameter lag correlation matrix drops below a preset dimension threshold, the maximum eigenvalue of the matrix and its corresponding eigenvector are extracted; each component in the eigenvector is normalized according to the response parameter type, and the weight distribution of each response parameter in the synchronization mode is output.
[0013] In some possible implementations, the determination unit further distinguishes the diffusion patterns of the toxic impact based on the weight distribution and outputs corresponding warning levels: If the weight of a single response parameter in the weight distribution is greater than the sum of the weights of all other response parameters, it is determined to be a single-parameter dominant mode, and a level three severe warning is output. If the weights of all response parameters in the weight distribution are uniformly distributed and there are no significant dominant parameters, then it is determined to be a global coupling mode, and a level two moderate warning is output. If it cannot be classified into any of the above modes, a Level 1 mild warning will be issued. The diffusion mode type and corresponding warning level are output as additional information for the warning control signal.
[0014] This invention distinguishes toxic impact diffusion modes based on weight distribution using a judgment unit. If the weight of a single response parameter is greater than the sum of the weights of other parameters, it is judged as a single-parameter dominant mode and a Level 3 severe warning is output. If all parameter weights are evenly distributed, it is judged as a globally coupled mode and a Level 2 moderate warning is output. In other cases, a Level 1 mild warning is output. This allows for a direct differentiation between two different hazard scenarios: a strong impact from a local source and uniform coupling across the entire region. It enables the classification of warning severity, facilitating the matching of on-site resources according to the severity level and avoiding over- or under-treatment.
[0015] In some possible implementations, a response execution unit is also included, configured to perform a corresponding tiered response action based on the output warning level: Level 1 mild warning, the corresponding response action is to notify the inspection team and automatically record samples; A Level 2 moderate alert requires the following response actions: adjusting the inlet valve and increasing aeration. A Level 3 severe warning indicates that the corresponding response action is to switch to the accident pool and coordinate with the upstream pumping station to reduce the flow rate.
[0016] It should be understood that when the "Possible Complex Toxicity" flag is output, the corresponding response action is to execute a Level 2 moderate warning action and initiate multi-parameter encrypted monitoring.
[0017] This invention utilizes a response execution unit to automatically execute tiered response actions based on the output warning level: Level 1 (mild warning) notifies inspection and automatically samples the water; Level 2 (medium warning) adjusts the influent valve and increases aeration; Level 3 (severe warning) switches to the emergency tank and triggers upstream pump station flow reduction. This achieves closed-loop management of the entire process from anomaly identification to automatic handling. Particularly under Level 3 severe warning, influent diversion and upstream flow reduction can be completed within seconds, maximizing the protection of activated sludge in the biological treatment tank and improving the standardization and precision of emergency response.
[0018] In some possible implementations, after determining the toxic impact, the determination unit is also used to identify the category of the toxic substance: The eigenvector corresponding to the largest eigenvalue of the hysteresis correlation matrix of the response parameters is extracted, and the components of the eigenvector are used as weights to perform a weighted summation on each response parameter to obtain the synchronization mode signal. Considering the hydraulic residence time from the inlet to the biological treatment tank, the time offset is enumerated with a preset step size within the range of zero to twice the hydraulic residence time. The statistical correlation between the synchronization mode signal and each inlet water quality parameter sequence after the offset is calculated. The maximum value is taken as the final correlation score of the water quality parameter. The water quality parameter type with the highest correlation is selected as the candidate toxicity indicator parameter. The candidate toxicity indicator parameters are matched with a preset toxic substance feature library. The feature library records the mapping relationship between each abnormal water quality parameter and the corresponding toxic substance. The toxic substances include strong acids, strong alkalis, heavy metals, high-salt wastewater, and recalcitrant organic matter. Based on the matching results, predictive information on the categories of toxic substances is output, and this information is output as part of the early warning control signal. Furthermore, when the predicted information of the toxic substance category is inconsistent with the heavy metal identification result based on the response delay time ranking pattern, the determination unit is also used to perform arbitration: The result with higher confidence is given priority. The confidence is represented by the absolute value of the correlation coefficient or the ranking similarity score. If the confidence of both results is the same and both are higher than the preset effective threshold of 0.7, both results are output and marked as "possible composite toxicity". If the confidence of both results is lower than the preset effective threshold of 0.7, "unknown toxic substance category" is output and full-parameter encrypted monitoring is triggered. If only one identification path outputs a valid result, that result is adopted.
[0019] This invention extracts the feature vector corresponding to the maximum feature value after a toxic shock by a determination unit. It then weights and sums the response parameters using each component as a weight to obtain a synchronization mode signal. The statistical correlation between this signal and the sequence of influent water quality parameters is calculated, and the water quality parameter with the highest correlation is selected as a candidate toxicity indicator parameter. This parameter is then matched with a pre-set toxic substance feature library to output toxicity category prediction information such as strong acids, alkalis, heavy metals, high-salinity wastewater, and persistent organic pollutants. This upgrades the early warning from "whether an impact has occurred" to "what substance caused the impact," providing a clear reference for targeted drug administration or upstream source tracing, significantly improving the targeting and efficiency of emergency response.
[0020] In some possible implementations, when the number of linear independent dimensions of the hysteresis correlation matrix of the response parameters does not decrease to a preset dimension threshold but shows a continuous decrease, the analysis unit is also used to distinguish low-concentration toxicity using the ranking pattern of response delay time: Obtain the average correlation strength between each response parameter and all other response parameters within a continuous time slice, and calculate the time span from the start of the average correlation strength to the lowest point as the response delay time; this response delay time needs to be tested for significance against the noise distribution of historical non-toxic periods; Arrange the response delay times of all response parameters that passed the significance test in ascending order to obtain the sorting pattern; The sorting pattern is compared with a preset heavy metal response fingerprint database. The heavy metal type matching the sorting pattern is selected as the identification result, and a low-concentration toxicity warning is output. This fingerprint database is constructed through laboratory heavy metal stress experiments. A conventional activated sludge reactor (effective volume not less than 5 liters, sludge concentration MLSS maintained at 3000-4000 mg / L, dissolved oxygen DO maintained at 2-4 mg / L) can be used to add common heavy metals such as copper, lead, zinc, cadmium, and mercury; and characteristic toxic substances from common industrial wastewater such as dichloromethane, trichloromethane, organophosphorus compounds, phenol, and acetone. Each heavy metal and characteristic toxic substance from industrial wastewater is subjected to at least three independent repeated experiments. The median sorting pattern of the response delay time of each response parameter is taken as a standard template and stored in the fingerprint database.
[0021] In one verification instance, the aforementioned fingerprint database was subjected to migration tests at three wastewater treatment plants with different process types (A² / O, oxidation ditch, and SBR). The recognition accuracy for 10 mg / L dichloromethane stress was no less than 85%, indicating that the fingerprint database has cross-plant applicability in conventional urban wastewater treatment activated sludge systems. For scenarios with a significant proportion of industrial wastewater or large differences in sludge characteristics, it is recommended to supplement local calibration data according to the aforementioned experimental methods.
[0022] In some possible implementations, the adjustment unit performs dynamic optimization specifically including: The actual handling results and biochemical system recovery status after each warning are collected. The handling results include the warning level and response action execution records. The recovery status includes the microbial activity recovery time and the time when the effluent water quality meets the standards. The effectiveness of this warning and response will be assessed based on the recovery status, and the warning lead time and false alarm / missed alarm indicators will be calculated. False alarms are defined as those where no toxic substances are detected by manual water quality testing after the warning is issued, and missed alarms are defined as those where the effluent exceeds the standard or where the impact is confirmed manually. The evaluation results are used as feedback signals to dynamically adjust the duration of the continuous time slice, the preset time lag interval, and the preset hold time threshold. The adjusted parameters will be applied to subsequent monitoring processes.
[0023] This invention assesses the effectiveness of early warnings and calculates early warning lead times and false alarm / missed alarm indicators by adjusting the unit to collect the handling results and biochemical system recovery status after each early warning. This information serves as feedback signals to dynamically optimize the continuous time slice duration, preset time lag interval, and preset hold-time threshold. As a result, the system's core parameters can autonomously iterate with seasonal changes, microbial community replacement, and process evolution, maintaining optimal early warning sensitivity and accuracy over the long term.
[0024] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects: This invention constructs a hysteresis correlation matrix of activated sludge response parameters within each continuous time slice and calculates its linear independent dimension, enabling the quantitative characterization of the mutually driving correlation structure among various parameters of the microbial community. When a toxic shock occurs, the previously independent fluctuation patterns of each response parameter converge under the same stress factor, and the linear independent dimension decreases continuously from 4-5 under normal operating conditions to close to 1. This allows for the detection of early signs of latent instability in the microbial community before conventional water quality indicators significantly exceed standards, achieving a leap from passive alarm to active early warning.
[0025] Meanwhile, by setting a dimensional threshold and a holding time threshold (an impact is confirmed only if the dimensionality is consistently below the threshold for 15 consecutive minutes), the system effectively filters out false alarms caused by instantaneous noise and normal fluctuations. When the number of dimensions does not fall below the threshold but continues to decline, the system further utilizes the sorting pattern of the response delay time of each parameter and compares it with the heavy metal fingerprint database to accurately identify latent toxicity such as low-concentration heavy metals, filling the gap in early warning of cumulative toxicity in traditional threshold monitoring.
[0026] Based on this, the eigenvector corresponding to the largest eigenvalue of the correlation matrix is extracted and normalized to obtain the weight distribution of each response parameter in the synchronous fluctuation. If the weight of a single parameter is greater than the sum of the weights of the other parameters, it is determined to be a single-parameter dominant mode and a level three severe warning is output; if the weights of all parameters are evenly distributed, it is determined to be a global coupling mode and a level two moderate warning is output; otherwise, a level one mild warning is output. At the same time, through the correlation analysis between this synchronous mode signal and the influent water quality parameters, combined with the matching of the toxic substance feature library, the categories of common toxic substances such as strong acids, heavy metals, and high-salinity wastewater can be predicted, realizing the source tracing upgrade from "whether there is poisoning" to "what kind of toxic substance". Attached Figure Description
[0027] Figure 1 This is a schematic diagram of the system framework structure of the present invention. Detailed Implementation
[0028] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] Please see Figure 1 This application provides a dynamic monitoring and early warning system for urban wastewater treatment, comprising: The data acquisition unit is used to collect influent water quality parameter sequences in real time and establish dynamic baselines, outputting water quality fluctuation characteristics; and to collect activated sludge response parameter sequences in real time and obtain sludge floc morphological characteristics through image recognition, outputting microbial activity status.
[0030] Understandably, this unit serves as the data input terminal for the entire system, undertaking the real-time capture and preliminary analysis of two core data sources: influent water quality and activated sludge microorganisms. It consists of on-site online sensing devices, image acquisition devices, and embedded data processing modules, forming the physical hardware carrier.
[0031] The collected influent water quality parameters include at least two of the following: conductivity, pH value, ammonia nitrogen concentration, total organic carbon concentration, and heavy metal-related parameters; the collected activated sludge response parameters include sludge concentration MLSS, oxidation-reduction potential ORP, dissolved oxygen DO, sludge settling performance index SV30, pollutant removal rate, nitrifying microbial activity, and sludge floc morphology identified by image recognition.
[0032] It should be noted that the influent water quality parameter sequence is generated in real time by a professional online monitoring sensor array. The specific equipment includes a conductivity sensor, pH meter, online influent ammonia nitrogen analyzer, TOC analyzer, and an online heavy metal monitor using the anodic stripping voltammetry method. This array is configured to meet the detection requirements for conductivity, pH, ammonia nitrogen concentration, total organic carbon concentration, and related heavy metal parameters. At least two types of parameters can be flexibly selected for simultaneous acquisition based on the on-site process conditions. All sensors are set to the same sampling time interval and continuously output real-time monitoring values, which are arranged chronologically to form an equally spaced influent water quality parameter time series, providing raw data support for subsequent baseline modeling and feature analysis.
[0033] Specifically, image features and sensor data are aligned by timestamp and incorporated into the microbial activity state vector of the same time slice.
[0034] Furthermore, the dynamic baseline is established using a moving average algorithm, and the moving window duration is automatically adjusted based on the statistical characteristics of the influent flow rate or turbidity. The specific judgment rules are as follows: The system uses the past 7 days as the statistical period, calculating the daily average influent flow rate and daily average turbidity. If both of the following conditions are met simultaneously, it is determined to be in "rainy season mode": (a) The number of days in the past 7 days where the average daily flow exceeds 1.5 times the normal flow baseline (the median flow of the past 30 rainless days) is ≥4 days; (b) The number of days in the past 7 days where the daily average turbidity exceeds 2.0 times the normal turbidity baseline (the median turbidity of the past 30 rainless days) is ≥4 days.
[0035] Otherwise, it is judged as "dry season mode".
[0036] In rainy season mode, the moving window duration is set to 5 days; in dry season mode, the moving window duration is set to 3 days. The normal flow baseline and normal turbidity baseline are updated every 30 days to exclude rainy season data.
[0037] The calculation method is as follows: taking the current analysis time as the endpoint, extracting all historical values of influent water quality parameters within the set moving window time, and calculating the arithmetic mean of the corresponding values as the baseline reference value at the current time. The time window slides forward point by point along the time axis to realize the dynamic update of the baseline.
[0038] It should be understood that the activated sludge response parameter sequence is collected by dedicated monitoring equipment deployed inside the biochemical reaction tank. Specifically, this includes ORP electrodes, dissolved oxygen probes, MLSS sludge concentration meters, SV30 automatic or manual detection equipment, and an online ammonia nitrogen analyzer for effluent. These five types of equipment continuously collect time-series data on oxidation-reduction potential (ORP), dissolved oxygen (DO) content, sludge concentration (MLSS), sludge settling performance index (SV30), and ammonia nitrogen removal rate / nitrifying microbial activity in real time. Combined with on-site image acquisition and intelligent recognition methods to obtain sludge floc morphological characteristics, these multiple parameters work together to form a core parameter sequence characterizing the microbial living environment and basic metabolic state.
[0039] In one implementation, high-definition industrial cameras (resolution not less than 1920×1080, shooting frame rate of 10-15 frames / second) are installed at key observation points in the biochemical tank. The shooting angle and shooting frame rate are fixed to continuously collect real-time images of the activated sludge surface as raw material for floc morphology analysis.
[0040] The U-Net model from convolutional neural networks was used for sludge floc image segmentation. First, the original acquired images underwent preprocessing operations including denoising (Gaussian filtering, kernel size 5×5, σ=1.0) and brightness and contrast enhancement (Gamma correction, γ=0.8). Then, the U-Net semantic segmentation model accurately divided the floc target region and the water background region. The training dataset for the U-Net model contained 2000 sludge images from different wastewater treatment plants under different lighting conditions. Three wastewater treatment experts independently labeled the floc regions, and the majority consensus result was taken as the ground truth, with a Kappa coefficient of 0.92. The model was frozen after achieving a Dice coefficient of 0.90 on the validation set.
[0041] The above preprocessing parameters (Gaussian filter kernel size, σ value, Gamma value) and model weights are general parameters obtained from training on data from multiple plants and can be directly used for similar wastewater treatment plants. If migrating to a new wastewater treatment plant with significantly different water quality characteristics, it is recommended to use no less than 500 images of that plant for fine-tuning, with the learning rate set to 0.0001 and 50 epochs for fine-tuning.
[0042] After segmentation, the area (number of pixels × 0.05 mm / pixel) and perimeter of each connected component are calculated. Loose flocs are defined as flocs with an area greater than 5000 pixels squared and a roundness less than 0.6. The loose floc ratio is the proportion of the total area of loose flocs to the total area of all flocs. The floc drifting index is defined as the proportion of the number of tiny flocs with an area less than 500 pixels squared to the total number of flocs multiplied by 100. These quantitative indicators, together with the sensor parameters, constitute the microbial activity state vector.
[0043] In another implementation, after completing pixel-level segmentation of the floc outline, multiple morphological quantification indicators such as area, roundness, and density of a single floc are calculated sequentially. Then, all floc samples in the entire image are statistically analyzed to calculate two comprehensive feature parameters: the proportion of loose flocs and the floc drift index. These morphological feature parameters (proportion of loose flocs and floc drift index) are combined with time-series data of sludge concentration MLSS, oxidation-reduction potential ORP, dissolved oxygen DO, sludge settling performance index SV30, ammonia nitrogen removal rate, and nitrifying microbial activity to form a multidimensional microbial activity state vector. Each dimension parameter is treated as an independent node in subsequent analysis.
[0044] By clearly defining multiple optional monitoring parameters for influent water quality and seven core response parameters for activated sludge, the system achieves comprehensive collection of water quality physicochemical indicators, sludge operating parameters, and microbial micromorphological characteristics. This breaks through the limitations of traditional monitoring that relies solely on a single numerical parameter. It can comprehensively depict the state of the biochemical system from macroscopic operating conditions to microscopic community structure. The multi-dimensional data forms complementary support, enabling the early detection of hidden toxic shocks that cannot be identified by single-parameter monitoring, making anomaly identification more forward-looking and comprehensive.
[0045] The analysis unit, within each continuous time slice (fixed at five minutes initially, dynamically optimized by the adjustment unit within a range of 3 to 15 minutes), uses each response parameter in the microbial activity state as a node. Based on sensor time-series data of every two response parameters within a preset time lag interval, it calculates the correlation strength reflecting the driving relationship between them (using the absolute value of the Pearson correlation coefficient as a statistical correlation measure), and constructs a lag correlation matrix for the response parameters. The correlation strength is calculated using the statistical correlation measure corresponding to the lag time that results in the maximum coordinated change of the two parameter sequences. The specific calculation steps are as follows: (1) Lag time search step size: Within the preset time lag interval [L,R] (initially L=30 minutes, R=90 minutes), enumerate all possible lag times τ=L,L+1,…,R (unit: minutes) with a fixed step size of 1 minute.
[0046] (2) Determination of the maximum co-variance: For each lag time τ, shift the second parameter sequence forward by τ minutes (i.e., align it with the first parameter sequence after a lag of τ minutes), and calculate the absolute value of the Pearson correlation coefficient |ρ(τ)| between the two sequences after the shift. Take the τ* that maximizes |ρ(τ)| as the optimal lag time, and the absolute value of this maximum correlation coefficient |ρ(τ*)| is the correlation strength between the two parameters. If multiple τs correspond to the same |ρ(τ)| and all are maximum values, then take the smallest τ as the optimal lag time.
[0047] (3) Multi-parameter time-series alignment: When the sampling frequencies of different sensors are inconsistent (e.g., influent water quality parameters are sampled once per minute, and image recognition parameters are sampled once every 6 seconds), the system resamples all parameter sequences to a unified time base through linear interpolation, with the sampling interval set to 1 minute. After resampling, the sequences are strictly aligned according to the timestamp and used in the calculation of the hysteresis correlation matrix; The linear independent dimension of the lag correlation matrix of the response parameters is calculated. This dimension is determined by counting the number of singular values greater than one percent of the maximum singular value after performing singular value decomposition on the matrix. The linear independent dimension is obtained by matrix rank operation and is calculated using a linear algebra matrix rank solver. The linear independent dimension is used to characterize the total number of mutually independent fluctuation modes of each response parameter of the activated sludge under the current operating conditions.
[0048] The number of linear independent dimensions is obtained using the effective rank operation of a matrix, calculated using a linear algebra matrix rank solver. Considering actual sensor noise, this embodiment uses the effective rank rather than the mathematically exact rank: after performing singular value decomposition on the correlation matrix, singular values less than one percent of the maximum singular value are considered noise contributions and ignored, and the number of remaining singular values is counted as the number of linear independent dimensions. The initial value of the preset time lag interval is set to 30 to 90 minutes (lower bound 30 minutes, upper bound 90 minutes, which can be dynamically optimized by the adjustment unit within the range of 15 to 180 minutes, with an interval width of not less than 30 minutes).
[0049] In another embodiment, the preset ratio can be adjusted within the range of 1% to 5% based on the sensor noise level: for sensor combinations with low noise levels (such as optical DO probes), a lower threshold of 1% can be used to retain more true signals; for sensor combinations with high noise levels (such as electrochemical ORP electrodes), a higher threshold of 3% to 5% can be used to enhance the noise filtering effect. The above adjustments are automatically optimized by the adjustment unit based on feedback from historical warning effects.
[0050] Understandably, this unit is the core functional module of the entire system for analyzing the multi-parameter temporal coupling law of activated sludge and exploring the internal operational correlation structure of the microbial community. It undertakes all engineering calculation tasks such as temporal window division, lag range definition, correlation degree quantification, matrix construction, and structural dimension analysis.
[0051] In actual calculations, the preset time lag interval is determined based on historical normal operating data. The maximum duration of the activated sludge system under normal operating conditions to produce significant metabolic feedback and state response to influent water quality disturbances is selected as the boundary range. In engineering, the fixed interval range is 30 to 90 minutes. This interval can fully cover the time delay caused by microbial material transfer, biochemical reactions, and microbial community state adjustment, avoiding the omission of real driving correlations due to an excessively small interval, and also avoiding the introduction of irrelevant time-related redundant data due to an excessively large interval.
[0052] In terms of specific implementation, the correlation strength is obtained by using an engineering-based and implementable method of comparing coordinated changes. The time series data of two typical activated sludge response parameters, dissolved oxygen (DO) and oxidation-reduction potential (ORP), are used as examples. Different time lag levels are enumerated one by one within the preset time lag interval, and the degree of consistency of the synchronous change trends of the two sets of parameters after time mismatch is compared.
[0053] In one implementation, the absolute value of the Pearson correlation coefficient is used as the quantitative basis for the degree of co-change. By comparing the correlation values corresponding to all lag time levels, the lag time corresponding to the maximum value of the degree of co-change is selected, and the correlation coefficient value corresponding to that time is directly defined as the correlation strength between the two sets of parameters.
[0054] The reason for this design is that the calculation method is not limited to simply obtaining mathematical values. Instead, by traversing the lag time and locking the optimal matching moment, it accurately identifies the temporal order of which of the two sets of response parameters changes first and which follows the change, clearly identifies the driving and driven correspondence between the parameters, and restores the real action transmission logic inside the biochemical system.
[0055] It should be understood that the response parameter lag correlation matrix is constructed according to a standard two-dimensional table structure. Each row and column of the matrix corresponds to the name of each activated sludge response parameter. The element at the intersection of each row and column in the matrix stores the correlation strength value calculated between the corresponding row parameter and column parameter, thus forming a complete numerical matrix structure that can intuitively reflect the pairwise coupling relationship of all parameters.
[0056] For example, if the response parameters include five items: sludge concentration (MLSS), oxidation-reduction potential (ORP), dissolved oxygen (DO), loose floc ratio, and floc index, then the matrix rows and columns are arranged with the above five parameters in sequence. The intersection of the row (dissolved oxygen, DO) and column (oxidation-reduction potential, ORP) stores the correlation strength between the two, the intersection of the row (sludge concentration, MLSS) and column (loose floc ratio) stores the corresponding correlation strength, and so on to complete the matrix filling of all parameter pairs.
[0057] Furthermore, the number of linear independent dimensions is determined by performing singular value decomposition on the lag correlation matrix of the response parameters and counting the number of singular values greater than one percent of the maximum singular value. This value is the effective rank of the matrix. This value has a clear engineering physical meaning, representing the number of mutually independent fluctuation patterns of all activated sludge response parameters under the current operating conditions. The principle is as follows: when each parameter is driven independently by different metabolic processes, the correlation between parameters is weak, the correlation matrix is close to full rank, and the effective rank value is high; when toxic shocks force each parameter to change synchronously, the correlation between parameters increases, and the effective rank of the matrix decreases. To ensure that measurement noise does not affect the stability of the rank, a singular value threshold of one percent of the maximum singular value is set, and only singular values greater than this threshold are included in the effective rank. This threshold has been verified by multiple sets of actual data to effectively filter out pseudo-independent patterns caused by sensor noise.
[0058] In this embodiment, under normal operating conditions where the influent water quality is stable and the microbial community's metabolic self-regulation ability is normal, each response parameter is independently governed by its own biochemical process, exhibiting its own distinct fluctuation patterns. At this time, the linear independent dimension number remains stably within the range of four to five. When toxic substances are introduced into the influent, creating a toxic shock, the toxic components will inhibit the metabolic activity of the microbial community as a whole. The fluctuations of all response parameters are uniformly governed by the same stress factor, and the original independent fluctuation patterns of each parameter are assimilated and converge, exhibiting a single overall change pattern. The corresponding linear independent dimension number will continuously decline and drop to a range close to one.
[0059] It should be understood that the above numerical ranges are derived from actual data collected over 300 days of cumulative operation and monitoring from three urban wastewater treatment plants with different process types (A² / O, oxidation ditch, and SBR). Statistical results show that in a total of 184 days of normal operating monitoring data, the mean linear independent dimension was 4.6, with a standard deviation of 0.4, and 98.3% of the sampling points had a dimension between 4 and 5. In 17 impact events caused by influent toxic substances, the dimension decreased from the normal value to below 1.5 within 3 to 8 hours after the impact (approximately 36 to 96 consecutive time slices), with 15 events ultimately decreasing to below 1.1, a decrease of over 70%. Compared to traditional early warning methods based on single-point thresholds, this system issued effective warnings an average of 40 to 90 minutes earlier in the aforementioned impact events.
[0060] In one implementation, the linear independent dimension can be obtained by performing elementary row and column transformations on the correlation matrix to solve for the rank. The calculation process follows the basic solution rules for linearly independent vector groups of matrices. The final dimension is not used for simple mathematical output, but serves as the core state criterion for the system to judge whether the biochemical microbial community's operating structure has changed or whether there are latent toxic disturbances, providing a quantitative basis for subsequent abnormal drop judgment and duration verification.
[0061] Before determining that the number of linearly independent dimensions has dropped below a preset dimension threshold, the analysis unit is also used to monitor the downward trend of the number of linearly independent dimensions: obtain the number of linearly independent dimensions of the response parameter lag correlation matrix in two consecutive time slices; if the dimension of the later time slice is less than the dimension of the earlier time slice, record a dimension decay event; after a preset number of consecutive dimension decay events occur, output a dimension decay warning as a precursor signal of toxic impact, and start the state maintenance verification process in advance.
[0062] In this embodiment, the number of consecutive preset times is fixed at 5 times.
[0063] It should be noted that the monitoring of the decreasing trend of dimensionality is based on the linear independent dimensionality time series of time slices. Two adjacent consecutive time slices are used as a set of comparison units. The dimensionality values corresponding to the matrix rank obtained from the solution of the two consecutive time points are extracted in turn, and the size relationship is compared and determined.
[0064] In terms of specific implementation, a fixed traversal comparison logic is set. As long as the linear independent dimension value corresponding to the later time slice is lower than the dimension value of the previous time slice, it is determined that the microbial community association structure has undergone a convergent change, and the system automatically completes the marking and storage of a dimension decay event.
[0065] A single instance of dimensional decay is merely a normal fluctuation caused by accidental changes and does not indicate any anomaly. Only five consecutive stable occurrences of dimensional decay events can reflect that the microbial parameter fluctuation pattern is continuously assimilating and converging, indicating that the impact of influent stress is gradually penetrating. The system immediately generates a dimensional decay early warning signal, using this signal as a precursor to the arrival of toxic shock. At the same time, it skips the conventional threshold judgment pre-process, triggers the start-up state maintenance verification process in advance, and enters the continuous monitoring mode for abnormal time series.
[0066] As before, traditional monitoring has the limitation of post-event alarm. This solution adds a pre-monitoring mechanism for the decreasing trend of dimensionality. By comparing the values of adjacent time slices to mark decay events, and relying on five consecutive fixed decay counts, it identifies gradual structural anomalies, outputs early warnings and initiates the verification process in advance. This changes the passive mode of traditional post-event judgment and can intervene in monitoring when the microbial community association structure initially shows a convergence trend. It extends the prediction window for anomaly identification and adapts to the actual working conditions of slow penetration of toxic substances and gradual impact on microbial community metabolism.
[0067] When the number of linear independent dimensions in the lag correlation matrix of the response parameters does not decrease to the preset dimension threshold but shows a continuous decrease, the analysis unit is also used to distinguish low-concentration toxicity by utilizing the ranking pattern of response delay time: The algorithm obtains the average association strength between each response parameter and all other response parameters within a continuous time slice, and uses a one-way detection cumulative sum algorithm to detect the descent starting point. The core steps of this algorithm are: first, calculate the mean μ and standard deviation σ of the average association strength during historical non-toxic periods; Then, for each time slice t, the cumulative sum statistic St = max(0, S{t-1} + (μ-At) - 0.5σ) is calculated, where At is the average association strength of the current slice, and S0 = 0. The cumulative sum threshold is set to twice the standard deviation (2σ). When St exceeds this threshold for three consecutive time slices, the first time slice exceeding the threshold is marked as the starting point of the decline. Starting from the starting point, the search proceeds backward until the first difference of the average association strength for three consecutive time slices is greater than or equal to zero (i.e., the decline terminates). The time corresponding to the global minimum of the average association strength within the search window is marked as the lowest point, and the time span from the starting point of the decline to the lowest point is calculated as the response delay time. This CUSUM parameter (reference value 0.5σ, control limit 2σ) has been validated in multiple activated sludge stress experiments, and can detect a 5% decrease in the average association strength relative to its historical mean μ (i.e., an absolute decrease of 0.05μ) within 30 minutes. The response delay time needs to be compared with the noise distribution of historical non-toxic periods for significance testing. The significance test adopts the t-test method, and the test judgment criterion is set to a probability value of less than 0.05. Arrange the response delay times of all response parameters that passed the significance test in ascending order to obtain the sorting pattern; When comparing the sorted pattern with a pre-defined heavy metal response fingerprint database, a sorting similarity algorithm based on Kendalltau distance is used. Specifically: Let the actually measured response delay time sorting pattern be Q (length N, each element being the rank number of the response parameter), and the standard sorting pattern of a certain heavy metal in the fingerprint database be P. Calculate the Kendalltau correlation coefficient τ between Q and P = (number of consistent pairs - number of inconsistent pairs) / (N(N-1) / 2), where consistent pairs refer to pairs where the relative order of the two parameters in Q and P is the same, and inconsistent pairs are the opposite. Linearly map τ to the interval 0 to 1 to obtain the similarity score S = (τ+1) / 2. A match is considered successful when S ≥ 0.85. If multiple heavy metal types are matched simultaneously, the one with the highest S value is selected; if all S values are below 0.85, an "Unknown heavy metal" warning is issued. This 85% threshold is based on experimental data: under 0.2 mg / L copper ion stress, the matching success rate exceeds 90% in 100 independent tests, while the false matching rate is less than 5%. The fingerprint database supports dynamically adding new sorting modes based on actual working conditions.
[0068] As an example, under laboratory conditions (MLSS 3500 mg / L, DO 3 mg / L, temperature 22°C), 0.2 mg / L of copper ions (Cu) were added. 2+Afterwards, the response delay times of each response parameter, after passing the significance test, were ordered from smallest to largest as follows: ORP (median delay approximately 8 minutes) < DO (approximately 15 minutes) < loose floc proportion (approximately 25 minutes) < floc index (approximately 35 minutes). This pattern was verified through 5 independent replicate experiments, with a ranking consistency rate of over 80%. The ranking patterns for different heavy metals (such as zinc and cadmium) showed significant differences, and all were entered into the fingerprint database using the same method.
[0069] This functional design is mainly aimed at scenarios with latent toxicity, such as low concentrations of heavy metals. Low concentrations of heavy metals will not cause the dimensionality to drop rapidly below the threshold, but they will affect the metabolism of the microbial community through continuous accumulation. The external manifestation is a continuous decrease in the dimensionality, which can easily be misjudged as normal operating condition fluctuations by traditional monitoring. This mechanism can achieve accurate differentiation and identification by using response time sequence characteristics.
[0070] In terms of specific implementation, the average correlation strength is first calculated for each response parameter. For each response parameter such as sludge concentration (MLSS) and oxidation-reduction potential (ORP), the correlation strength data between it and all other response parameters within a continuous time slice is extracted, and the arithmetic mean is calculated to obtain the time series sequence of the average correlation strength of the parameter. This sequence can reflect the changing trend of the parameter's synergy with the overall microbial community.
[0071] Next, the decreasing characteristics of the average correlation strength are identified. The sliding window algorithm is used to detect the abrupt change point of the average correlation strength sequence. The time when the abrupt change point appears is defined as the start of the decrease. The sequence is tracked until the value stabilizes and no longer decreases. This stable moment is defined as the minimum point time. The time difference between the two is the response delay time of the response parameter. The effects of low concentration heavy metals on different response parameters have temporal differences. For example, the oxidation-reduction potential (ORP) is affected the fastest and has the shortest response delay time, while the sludge floc morphology parameter is affected more slowly and has a longer response delay time.
[0072] To eliminate normal noise interference, a significance test needs to be performed on the response delay time. All response parameter correlation intensity fluctuation data from historical non-toxic periods are retrieved, a noise distribution model is constructed, and the currently calculated response delay time is compared with the noise distribution using the t-test method. If the probability value is less than 0.05, the response delay time is determined to be caused by the toxicity effect and passes the significance test. If the probability value is greater than or equal to 0.05, it is determined to be a normal fluctuation and is removed.
[0073] All response parameters that pass the significance test are sorted in ascending order of response delay time to form a unique sorting pattern. This pattern is essentially a temporal fingerprint of the effects of low concentrations of heavy metals and toxic substances on different metabolic processes of the bacterial community. The sorting patterns corresponding to different heavy metals and toxic substances show significant differences. The system has a built-in preset heavy metal and toxic substance response fingerprint database, which is constructed based on multiple sets of experimental data on heavy metal stress and toxic substance stress at concentration gradients ranging from 0.1 mg to 0.5 mg per liter (it can be continuously expanded by adding new experimental data to adapt to common heavy metals and toxic substances in different regions). It records the sorting patterns of response delay times for common heavy metals such as copper, lead, zinc, cadmium, and mercury, as well as toxic substances. The fingerprint database supports continuous iterative optimization based on actual monitoring data.
[0074] The current sorted pattern is compared with all patterns in the fingerprint database. A sequence matching algorithm is used to calculate the similarity score. The heavy metal type with a similarity score of not less than 85% is selected as the identification result. If the similarity of all patterns is less than 85%, the low concentration unknown heavy metal identification result is output. At the same time, a low concentration toxicity warning is uniformly output to remind maintenance personnel to take targeted prevention and control measures.
[0075] Traditional monitoring lacks effective means to identify low-concentration toxic substances, easily overlooking latent risks due to failure to reach thresholds. This solution utilizes the temporal differences in the impact of low-concentration heavy metals and toxic substances on different response parameters, constructing a toxic fingerprint through a response delay time sorting pattern. Relying on fixed verification standards and fixed matching similarity thresholds, it achieves accurate identification of latent low-concentration heavy metals and toxic substances that have not reached the threshold, filling the gap in traditional threshold-based monitoring. This mechanism can detect toxicity accumulation risks in the early stages before the number of dimensions falls below the threshold, providing early warnings and identifying the types of heavy metals and toxic substances. This gives maintenance personnel sufficient time to handle the situation, preventing the continuous accumulation of toxic substances from causing serious impacts, and improving the system's full-range monitoring capabilities from low-concentration latent risks to high-concentration explicit impacts.
[0076] The analysis unit is also used to perform strong correlation filtering and subgraph connectivity verification on the lag correlation matrix of response parameters: calculate the correlation strength value between every two response parameters, retain parameter pairs with correlation strength values greater than a preset dynamic threshold, and set the remaining parameter pairs to zero to obtain a sparse correlation matrix; the preset dynamic threshold is automatically determined by the system based on the percentile distribution of all correlation strength values in the current time slice; calculate the number of connected subgraphs in the sparse correlation matrix, and if the number of connected subgraphs is 1, output a consistency confirmation signal, which is used to shorten the preset hold time threshold.
[0077] It should be understood that, to clarify the value selection criteria, the preset dynamic threshold in this embodiment is fixed at the 75th percentile of the distribution of all correlation strength values. Selecting this quantile can effectively filter out weak correlations caused by sensor noise and random fluctuations while preserving the main driving relationships between parameters, ensuring that the sparse correlation matrix reflects a statistically significant strongly coupled network.
[0078] It should be noted that the core purpose of strong association screening is to eliminate redundant parameter relationships with weak correlation strength, retain only effective parameter pairs with actual coupling driving effect, weaken the weak association interference caused by random noise, and make the structural characteristics of the association matrix more consistent with the real collaborative operation law of microbial communities.
[0079] In actual calculations, the preset dynamic threshold does not adopt a fixed value setting method. Instead, it relies on the overall distribution of all correlation strength values within the current time slice and selects the value corresponding to the 75th percentile of the distribution as the screening threshold. This can adapt to the natural fluctuations of the overall amplitude of correlation strength under different working conditions and maintain the dynamic adaptability of the screening rules.
[0080] The association strength values corresponding to all elements in the lag association matrix of the response parameters are traversed. The association strength of each parameter pair is compared with the preset dynamic threshold one by one. Only the original association strength of parameter pairs with values higher than the dynamic threshold is retained. Parameter pairs with values less than or equal to the dynamic threshold are uniformly zeroed. After global filtering and zeroing, the originally dense association matrix is transformed into a sparse association matrix that retains only strong associations.
[0081] It is understandable that the number of connected subgraphs can characterize the overall degree of convergence of the entire microbial parameter association network. When all strongly correlated parameter nodes can be interconnected to form a single network structure, it indicates that the synergistic change patterns among the response parameters are highly consistent and the overall metabolic operation of the microbial community is stable.
[0082] In another implementation, a graph theory traversal algorithm is used to search and count the network topology corresponding to the sparse correlation matrix, divide and count the number of mutually independent connected subgraphs. When the number of connected subgraphs obtained is one, it is determined that the current multi-parameter correlation network has overall operational consistency, and then a consistency confirmation signal is generated and sent out.
[0083] Furthermore, after the consistency confirmation signal is issued, the system proactively reduces and adjusts the preset holding time threshold. Under stable operating conditions with highly consistent parameter correlation, shortening the duration of abnormal state determination can more quickly identify real abnormal disturbances, while avoiding the warning lag problem caused by overly conservative duration settings.
[0084] Based on the conventional correlation matrix, strong correlation screening and subgraph connectivity verification are added, abandoning the crude mode of direct global matrix analysis. By using a fixed 75 percentile threshold to adaptively screen strong correlation parameter pairs and eliminate invalid weak correlation interference, the overall network consistency is quantified by the number of connected subgraphs. The retention time threshold is finely adjusted in reverse according to the topological structure characteristics. By combining the matrix numerical characteristics with the network topological characteristics, the system achieves an upgrade from single-dimensional rank analysis to joint topological structure judgment. It can adapt to the dynamic changes in the correlation strength distribution under different operating conditions, and allows the anomaly judgment scale to adaptively adjust with the synergistic state of the microbial community, thus optimizing the sensitivity and fit of the early warning judgment.
[0085] The verification unit is used to initiate duration recording when the number of linearly independent dimensions drops below a preset dimension threshold. It then monitors whether the number of linearly independent dimensions remains below the preset dimension threshold in subsequent continuous time slices. When the recorded time reaches a preset holding time threshold, a stable shock confirmation signal is generated. The preset dimension threshold and preset holding time threshold are automatically determined by the system based on statistical results from historical non-toxic periods. It should be noted that this system employs the most suitable automatic threshold determination strategy tailored to the statistical characteristics of different parameters: for parameters with obvious steady-state distribution characteristics, kernel density estimation is used to obtain high quantiles; for parameters with strong correlation to dynamic fluctuations, quantile screening is used; and for parameters with time-series persistence, a multiple of the historical maximum fluctuation duration is used. The specific methods are as follows: Automatic determination of preset dimension thresholds: A continuous period (total duration not less than 72 hours) is selected where the effluent quality has consistently met standards (COD, ammonia nitrogen, and total phosphorus are all below 80% of the discharge limits) for the past 30 days, and the 24-hour coefficient of variation of each response parameter of the activated sludge is less than 0.15. Within this period, the number of linear independent dimensions is calculated for each time slice, and its probability distribution is fitted using kernel density estimation. A Gaussian kernel is selected as the kernel function, and the bandwidth is calculated according to the Silverman empirical rule: bandwidth = 0.9 × min(standard deviation, interquartile range / 1.34) × (number of samples)^(-1 / 5). The 95th percentile of the fitted probability distribution is taken as the preset dimension threshold; if this quantile is less than 2, it is set to 2.
[0086] Automatic determination of preset retention time threshold: During the above-mentioned non-toxic baseline period, the maximum duration (in minutes) during which the number of linear independent dimensions is continuously lower than the above-mentioned preset dimension threshold is counted. 1.5 times this maximum duration is taken as the preset retention time threshold. The initial default value is set to 15 minutes (corresponding to 3 consecutive time slices). It can be dynamically optimized in the range of 5 to 60 minutes by the adjustment unit.
[0087] As an example, in an initial configuration instance, the preset dimension threshold can be determined by taking the 95th percentile of the range of four to five normal dimensions during historical non-toxic periods and setting it to the value two. The preset retention time threshold can be determined based on the statistical analysis of the maximum continuous fluctuation duration of the dimension number within the non-toxic period, and its initial default value can be set to fifteen minutes (corresponding to the duration of three consecutive time slices). The above initial thresholds will be dynamically optimized by the adjustment unit based on the warning effect during subsequent operation.
[0088] Understandably, the core function of this unit is to filter out instantaneous random disturbances and brief drops in dimensionality caused by sensor jumps, preventing single abnormal fluctuations from directly triggering early warnings, and improving the system's anti-interference capability from the perspective of time-series continuity.
[0089] The preset dimensional threshold is determined based on historical normal operating data. Specifically, the automatic determination method is as follows: The system selects a continuous period (total duration not less than 72 hours) within the past 30 days where the effluent quality consistently meets standards (COD, ammonia nitrogen, and total phosphorus are all below 80% of the discharge limits) and the coefficient of variation of the activated sludge response parameters is less than 0.15. Within this period, the number of linear independent dimensions is calculated for each time slice, and its probability distribution is fitted using kernel density estimation. A Gaussian kernel is selected as the kernel function, and the bandwidth follows the Silverman empirical rule: bandwidth = 0.9 * min(standard deviation, interquartile range / 1.34) * number of samples^(-1 / 5). The value corresponding to the 95th quantile of the fitted probability distribution is taken as the preset dimensional threshold; if this quantile is less than two, it is taken as two. This bandwidth selection method is a standard statistical practice and avoids subjective bias caused by manual setting. The value of 2, corresponding to the 95th quantile of the probability distribution of the number of linear independent dimensions within the stable period of non-toxic shocks, is taken as the critical judgment criterion to determine whether the parameter association network structure has abnormally collapsed.
[0090] When the number of linear independent dimensions calculated for any time slice first falls below the preset dimension threshold of value two, the system immediately starts a timing task to continuously track the change in the number of dimensions for each subsequent consecutive time slice.
[0091] The rule for maintaining the status quo is set as follows: in all subsequent time slices, the number of linear independent dimensions cannot rise above the preset dimension threshold value of two. As soon as the value of any slice returns to the threshold, the timer is immediately reset to zero, and the system waits for the next drop trigger condition. Only when the duration of fifteen consecutive minutes is met and all time slices meet the anomaly judgment condition can the interference of accidental noise and instantaneous operating condition fluctuations be eliminated, and a stable impact confirmation signal be sent synchronously.
[0092] Existing systems often cause false alarms due to transient noise or sensor fluctuations. This unit uses a dual judgment mechanism that sets a fixed threshold value and a fixed holding time to verify the duration of the threshold drop. Instead of simply responding to a single parameter anomaly, it accurately distinguishes between transient fluctuations and persistent anomalies, effectively filtering false signals, reducing the false alarm rate, and making the warning results more consistent with the actual process conditions.
[0093] The judgment unit, upon receiving a stable shock confirmation signal, determines the presence of a toxic shock in the influent, outputs an early warning control signal, and simultaneously triggers a graded response process. The preset dimension threshold and preset retention time threshold are automatically determined by the system based on statistical results of historical non-toxic periods. Non-toxic periods are selected based on the following criteria: effluent COD, ammonia nitrogen, and total phosphorus are below 80% of the emission standard limits, and the 24-hour coefficient of variation for each response parameter of the activated sludge is less than 0.15.
[0094] It should be understood that a stable shock confirmation signal is a necessary prerequisite for triggering a formal early warning. The system will only formally determine that a toxic shock event has occurred after receiving this confirmation signal, thus preventing misjudgments caused by instantaneous fluctuations of a single indicator.
[0095] For example, the early warning control signal can be synchronously pushed to the plant's central control and monitoring platform. The signal includes traceability information such as the time of the anomaly's onset, the magnitude of the drop in the linear independent dimension, the structural change characteristics of the hysteresis correlation matrix, and the fluctuation of the corresponding influent water quality parameters, which facilitates maintenance personnel to quickly locate the source of the anomaly.
[0096] The graded response process is divided into multiple treatment levels according to the potential severity of the toxic shock. These levels include sequentially linked operations such as reducing and adjusting the influent flow rate, fine-tuning the aeration air volume parameters of the biological treatment tank, quantitatively adding emergency neutralizing agents, and pop-up prompts for on-site manual inspections, achieving seamless connection between early warning and process control.
[0097] It should be noted that the preset dimension threshold and preset retention time threshold are not assigned manually. The system automatically retrieves all data from stable operation periods with no long-term toxic impacts, calculates the normal distribution range of linear independent dimensions and the duration of natural fluctuations during that period, and automatically generates exclusive threshold standards adapted to the actual operating conditions of this wastewater treatment plant through a probability statistical distribution algorithm.
[0098] The determination unit is also used to record the response parameter weight distribution when the number of linearly independent dimensions drops below a preset dimension threshold: when the number of linearly independent dimensions of the lag correlation matrix of the response parameters drops below the preset dimension threshold, the maximum eigenvalue of the matrix and its corresponding eigenvector are extracted; each component in the eigenvector is normalized according to the response parameter type, and the weight distribution of each response parameter in the synchronization mode is output. This embodiment uses square normalization, that is, the proportion of the square of each component to the sum of the squares of all components.
[0099] The triggering conditions for recording the weight distribution of response parameters are completely synchronized with the determination time when the number of linear independent dimensions falls below a preset threshold. This design can accurately capture the weight characteristics of the microbial community parameters in the initial stage of entering the synchronous fluctuation mode, and avoid the weight distortion problem caused by the continuous deterioration of subsequent working conditions.
[0100] In practical implementation, an eigenvalue decomposition algorithm is used to operate on the lag correlation matrix of the response parameters in the current time slice, selecting the eigenvalue with the largest value among all eigenvalues, and simultaneously extracting the eigenvector corresponding to the largest eigenvalue. The eigenvector corresponding to the largest eigenvalue reflects the most dominant change pattern in the matrix, namely the synchronous fluctuation pattern followed by all response parameters under toxic shock. The magnitude of each component in the eigenvector directly corresponds to the contribution of the corresponding response parameter to this synchronous pattern. Since eigenvector components may have negative values, to avoid the distortion of physical meaning caused by the cancellation of positive and negative values, this system adopts a square normalization scheme. That is, the square value of each component is calculated first, and then the proportion of the square value of each component to the sum of the squares of all components is used as the normalization weight. Under this scheme, the change direction information indicated by the positive or negative sign of the components in the original eigenvector (i.e., whether a parameter changes in the same direction or opposite direction to the dominant pattern) does not participate in the weight calculation, but the system will output the sign of each parameter separately to help determine the direction of influence of the toxic shock (for example, a negative sign for the dissolved oxygen (DO) component indicates that the toxic shock causes a decrease in DO; a positive sign for the oxidation-reduction potential (ORP) component indicates an increase in ORP). This symbol information is not included in the weighted summation, but is provided to operations and maintenance personnel as additional diagnostic information.
[0101] Furthermore, the components in the feature vector are normalized, converting their values into percentages between zero and one. The normalization process strictly follows the one-to-one correspondence with the response parameter type, ensuring that the normalization result of each component accurately matches the specific response parameter. The final output weight distribution is presented in the form of parameter names and their corresponding weight percentages, intuitively reflecting the dominance of various parameters in the synchronous fluctuation mode.
[0102] Traditional impact assessment only outputs anomaly warning results, failing to clearly define the contribution ratio of various response parameters in the anomaly. This solution extracts the eigenvector corresponding to the largest eigenvalue through eigenvalue decomposition and normalizes it, transforming the abstract matrix features into a concrete parameter weight distribution. This clearly defines the dominant position of different response parameters in the synchronous fluctuation mode, providing quantitative basis for maintenance personnel to trace the impact path of toxic impacts and formulate targeted control strategies. This allows anomaly handling to shift from blind response to precise targeted control, improving the efficiency and effectiveness of process emergency handling.
[0103] The judgment unit also distinguishes the diffusion mode of toxic impact based on the weight distribution and outputs the corresponding warning level: if the weight of a single response parameter in the weight distribution is greater than the sum of the weights of all other response parameters, it is judged as a single parameter dominant mode and outputs a level three severe warning. If the weights of all response parameters in the weight distribution are evenly distributed and there are no significant dominant parameters, it is determined to be a global coupling mode, and a level 2 moderate warning is output; if it cannot be classified into any of the above modes, a level 1 mild warning is output; the output diffusion mode type and the corresponding warning level are used as additional information for the warning control signal.
[0104] In practical applications, the judgment logic for the toxic impact diffusion mode and warning level is based on the normalized response parameter weight distribution. The comparison of the weight ratio of each parameter is used as the sole criterion for judgment. There is no need to set additional complex thresholds. The judgment logic is simple and clear and can be directly implemented in engineering.
[0105] Iterate through the normalized weight values corresponding to all response parameters, and compare the weight of a single parameter with the sum of the weights of all other parameters. When the weight of any response parameter exceeds the sum of the weights of all other parameters, it indicates that the parameter occupies an absolute dominant position in the synchronous fluctuation mode, and the toxic impact spreads strongly from the source of the single parameter. At this time, it is determined to be a single parameter dominant mode, and a level three severe warning is output synchronously.
[0106] When the weights of all response parameters are close to each other and no parameter has a significant advantage, it indicates that the toxic shock is uniformly applied to all bacterial response parameters. Each parameter fluctuates and changes synchronously and in tandem. There is no local single point of strong influence. The whole shows the characteristics of synchronous forced change across the entire domain. At this time, it is determined to be a global coupling mode, and a level 2 moderate warning is output synchronously.
[0107] For intermediate states that do not meet the conditions of either single parameter dominance or uniform weight distribution, the impact of toxicity is limited, the degree of parameter linkage variation is weak, and neither extreme single-point dominance nor uniform coupling across the entire domain is achieved. These are uniformly classified into intermediate transition types, and a level one mild warning is output.
[0108] The system will encapsulate the final determined diffusion pattern type and the matching warning level as additional information and push it outward in the warning control signal, so as to realize the synchronous and complete reporting of warning results, mutation patterns and danger levels.
[0109] Traditional early warning systems only make a binary judgment of whether or not there is an anomaly, without distinguishing the diffusion characteristics and danger levels of toxic impacts. This solution, based on the proportion structure of parameter weight distribution, divides three diffusion modes and matches them with corresponding early warning levels. It upgrades single anomaly alarms to refined analysis with pattern recognition and level classification, which can intuitively distinguish three types of working conditions: severe impact from a single source, moderate impact from a coupled whole area, and ordinary light disturbance. This facilitates on-site operation and maintenance to allocate disposal resources and match corresponding process control intensities according to the early warning level, thereby achieving hierarchical and precise emergency management and improving the system's full-level early warning and control capabilities.
[0110] After determining the toxic impact, the determination unit is also used to identify the type of toxic substance: extract the eigenvector corresponding to the largest eigenvalue of the hysteresis correlation matrix of the response parameters, and use the components of the eigenvector as weights to perform weighted summation on each response parameter to obtain the synchronization mode signal; When calculating the statistical correlation between the synchronization mode signal and each influent water quality parameter sequence, the hydraulic retention time from the influent to the biological treatment tank is considered (this parameter is calculated from the influent flow rate and tank volume of the wastewater treatment plant, with a typical value of 30 to 90 minutes). For each water quality parameter sequence, within a range of zero to twice the hydraulic retention time, time offsets are enumerated in one-minute increments, and the Pearson correlation coefficient between the synchronization mode signal and the offset water quality parameter sequence is calculated. The maximum value is taken as the final correlation score for that water quality parameter. The water quality parameter type with the highest score is selected as a candidate toxicity indicator parameter. This method avoids the underestimation of correlation caused by hydraulic transmission delay. Candidate toxicity indicator parameters are matched with a pre-defined toxic substance feature library. This library records the mapping relationship between abnormal water quality parameters and corresponding toxic substances. Toxic substances include strong acids, strong alkalis, heavy metals, high-salinity wastewater, and recalcitrant organic matter. The specific mapping rules are as follows: if pH < 6.0 and persists for more than 10 minutes, a strong acid is matched; if pH > 9.0 and persists for more than 10 minutes, a strong alkali is matched; if the heavy metal-related parameter (detected by anodic stripping voltammetry) exceeds three times the normal baseline, a heavy metal is matched. If the conductivity exceeds 1.5 times the normal baseline, it is matched as high-salinity wastewater; if the total organic carbon (TOC) exceeds 2 times the normal baseline and the dissolved oxygen (DO) decreases by more than 30% within 30 minutes, it is matched as recalcitrant organic matter. These thresholds are determined based on retrospective statistics of 23 manually verified toxicity shock events at this plant and three similar wastewater treatment plants in the past two years, covering five typical toxic substances: strong acids, strong alkalis, heavy metals, high-salinity wastewater, and recalcitrant organic matter. When a candidate toxicity indicator parameter simultaneously satisfies multiple mapping rules, the one with the highest confidence level is selected (the confidence level is measured by the multiple by which the water quality parameter deviates from the threshold). If multiple categories have similar confidence levels (difference < 10%), all matching categories are output and marked as "mixed toxicity." Based on the matching results, predictive information on the categories of toxic substances is output, and this information is output as part of the early warning and control signal.
[0111] When the identification results based on the correlation between the synchronous mode signal and the influent water quality parameters are inconsistent with the comparison results of the heavy metal fingerprint database based on the response delay time sorting mode, the system adopts the following arbitration rules: the result with higher confidence is given priority (confidence is represented by the absolute value of the correlation coefficient or the sorting similarity score); if the confidence of both is the same and both are higher than the preset effective threshold of 0.7, then both results are output at the same time and marked as "possible composite toxicity"; if only one path outputs a valid result, then that result is adopted.
[0112] Understandably, the identification of toxic substance categories is an extended analysis step after the impact assessment is completed. The core is to conduct source tracing analysis based on the correlation between response parameters and influent water quality parameters, identify the types of substances that induce the impact, and provide preliminary reference for accurate on-site treatment.
[0113] In one implementation, the eigenvector corresponding to the previously extracted maximum eigenvalue is first reused. This vector has clearly defined the contribution weight of each response parameter in the synchronous fluctuation mode, so there is no need to calculate it repeatedly. Each component of the eigenvector is used as the weighting coefficient of the corresponding response parameter. The time-series data of all response parameters are weighted and summed at each time point to obtain a synchronous mode signal that can centrally reflect the overall response law of the bacterial community under toxic shock. This signal eliminates the random fluctuations of a single parameter and highlights the common change characteristics of the bacterial community under the influence of toxic substances.
[0114] Next, the statistical correlation between the synchronous mode signal and each influent water quality parameter sequence was calculated (using Pearson correlation coefficient). The correlation coefficients between the synchronous mode signal and each water quality parameter sequence, such as conductivity, pH, ammonia nitrogen concentration, total organic carbon concentration, and heavy metal correlation parameters, were solved. The closer the absolute value of the correlation coefficient is to one, the more consistent the trend of the two changes, that is, the stronger the correlation between the water quality parameter and the toxic shock.
[0115] The system selects parameters with the highest absolute values of correlation coefficients from all water quality parameter types as candidate toxicity indicator parameters. The system has a built-in preset toxic substance feature library, constructed based on extensive historical operating and experimental data. This library records a fixed mapping relationship between various abnormal water quality parameters and corresponding toxic substances. For example, a pH value less than 6 or greater than 9 corresponds to strong acids or strong bases; excessive values of heavy metal-related parameters correspond to heavy metal toxic substances; conductivity exceeding the normal threshold by more than 1.5 times corresponds to high-salinity wastewater; and abnormal total organic carbon concentration with a degradation rate lower than normal corresponds to recalcitrant organic toxic substances. The feature library can be flexibly updated and optimized according to the actual on-site process and influent type.
[0116] The selected candidate toxicity indicator parameters are precisely matched with the mapping relationship in the feature library, and the corresponding toxic substance category prediction results are output. If there are multiple matches, the top two results with the highest confidence and their corresponding confidence values are output. Finally, the toxic substance category prediction information is integrated with the previous warning level, diffusion mode, weight distribution and other information, and together they are output to the central control system and operation and maintenance terminal as the core component of the warning control signal.
[0117] Traditional systems can only determine the presence of toxic impacts but cannot identify the types of toxic substances, leading to blind and inefficient response measures. This solution constructs a three-level identification logic that matches the correlation feature library of synchronous mode signal water quality parameters. It uses the Pearson correlation coefficient as the sole correlation criterion to clarify the quantitative mapping boundary between various water quality parameters and toxic substances, enabling accurate prediction of five common toxic substances, including strong acids, strong alkalis, and heavy metals. This upgrades the impact warning from simply knowing what happened to a source-tracing analysis that understands why it happened, allowing maintenance personnel to take targeted measures, improving the targeting and efficiency of emergency response, and avoiding secondary pollution or process deterioration caused by improper handling.
[0118] Traditional solutions often rely on manually setting fixed thresholds, which are difficult to adapt to changes in different operating conditions. This unit automatically generates personalized thresholds based on historical normal operating condition data, achieving adaptive matching between thresholds and operating conditions. At the same time, it links with the graded response process to accurately match treatment measures according to the severity of the impact. This not only adapts to the dynamic changes in influent components and bacterial community status in different seasons, but also achieves precise linkage between early warning and control, making the system more in line with actual operating needs.
[0119] It also includes a response execution unit, configured to perform corresponding graded response actions based on the output warning level: Level 1 (mild warning) corresponds to notifying the inspection team and automatically taking samples; Level 2 (moderate warning) corresponds to adjusting the inlet valve and increasing aeration; Level 3 (severe warning) corresponds to switching to the emergency pool and sending a flow reduction request to the upstream pumping station. The specific implementation method is as follows: The system uses Modbus TCP protocol over industrial Ethernet to send a flow reduction request command to the PLC controller of the upstream pumping station: writing the value 1 to the holding register address 40001 (requesting a reduction to 50% of the normal flow), and writing the value 0 indicates a return to normal. After sending the command, the system waits for feedback from the upstream pumping station's response register 40002. If no feedback is received within 10 seconds or the feedback value is not equal to 1, the linkage is considered to have failed. In this case, the system only performs the plant's fault pool switching operation and generates an "Upstream Linkage Failure" alarm, prompting maintenance personnel to manually contact the upstream pumping station.
[0120] If the upstream pumping station does not have ModbusTCP communication capabilities, the system can be downgraded to outputting a 24V DC pulse signal via a digital output module (DO). This pulse lasts for 500ms and is used to trigger the reduction control relay of the upstream pumping station.
[0121] It should be noted that the response execution unit is the terminal execution module of the entire system that realizes closed-loop control of early warning and handling. By receiving the early warning control signal output by the impact judgment unit, extracting the early warning level information, and automatically matching the preset standardized response actions, the corresponding handling process can be quickly started without manual intervention, ensuring the timeliness and standardization of the response.
[0122] When a Level 1 mild warning signal is received, the system determines that the toxic impact is weak and does not pose a substantial threat to the biochemical system. At this time, the response execution unit simultaneously triggers two core actions: first, it sends an inspection notice to the operation and maintenance personnel through the plant's internal communication system, clearly informing them of the time of the anomaly and the fluctuation of related parameters, guiding the operation and maintenance personnel to verify and confirm on-site; second, it activates the automatic sampling device at the inlet end, and seals and retains the inlet water quality for the current period according to the preset sampling quantity and preservation conditions, so as to retain the original sample for possible subsequent water quality testing and cause tracing.
[0123] When a Level II moderate warning signal is received, it indicates that the toxic shock has had a significant impact on the metabolism of the microbial community. It is necessary to alleviate the stress pressure through process control. The response unit automatically performs process adjustment actions. On the one hand, it adjusts the opening of the inlet valve to reduce the inlet flow rate to 70% to 80% of the normal operating condition, thereby reducing the total amount of toxic substances entering the biological treatment tank. On the other hand, it activates the aeration system's efficiency enhancement mode, increases the operating frequency of the aeration blower or turns on the backup aeration device, increases the dissolved oxygen (DO) concentration in the biological treatment tank, enhances the metabolic activity of microorganisms, and improves the tolerance and degradation capacity of the microbial community to the toxic shock.
[0124] When a Level III severe warning signal is received, it indicates that the toxic impact is strong and the spread is rapid. If the conventional biochemical treatment process continues, it will lead to large-scale inactivation of the bacterial community. At this time, the response unit initiates emergency avoidance measures, immediately switches the inlet diversion valve, and diverts all the contaminated inlet water into the emergency pool for temporary storage to prevent the biochemical pool from being contaminated by toxic substances. At the same time, it links with the upstream pumping station through the industrial communication protocol to send a reduction operation command, requiring the upstream pumping station to reduce the drainage flow or suspend drainage, cutting off or reducing the continuous input of toxic substances from the source, and buying time for subsequent emergency treatment and pollution control.
[0125] When the system outputs a "Potential for Multiple Toxicity" flag, it determines that there is a risk of multiple toxic substances acting simultaneously. At this time, the response execution unit automatically executes a level-two moderate warning action (adjusting the inlet valve and increasing aeration), and simultaneously activates a multi-parameter encrypted monitoring mode: shortening the continuous time slice duration from five minutes to three minutes, and narrowing the preset time lag interval from thirty to ninety minutes to fifteen to thirty minutes, to track the dynamic evolution of each response parameter with a higher frequency and finer sampling density, providing data support for subsequent toxic substance separation and identification.
[0126] The execution status of all response actions, the adjustment range of key parameters, and equipment operation feedback information are all transmitted back to the central control system in real time for recording and archiving, so that operation and maintenance personnel can track the handling effect and conduct subsequent review and optimization.
[0127] Traditional systems are mostly passive, relying on manual intervention for early warnings, resulting in low response efficiency and inconsistent handling standards. This solution adds a response execution unit to establish a one-to-one correspondence between early warning levels and handling actions, achieving closed-loop control of the entire process from anomaly identification to automatic handling. Different levels of early warnings are matched with differentiated response strategies: mild early warnings focus on verification and sample retention, moderate early warnings focus on process control, and severe early warnings focus on emergency avoidance. This avoids resource waste caused by over-handling and prevents risk expansion caused by under-handling, thereby improving the standardization, automation, and accuracy of the system's emergency response.
[0128] The adjustment unit is used to dynamically optimize the calculation parameters of the dynamic baseline, the preset time lag interval, and the preset retention time threshold based on the actual graded response actions and the recovery status of the biochemical system after each warning.
[0129] Understandably, this unit establishes a complete closed-loop link of monitoring and early warning, process response, effect evaluation, and parameter self-optimization, enabling the system's core operating parameters to autonomously iterate and adapt to seasonal changes in influent components, natural replacement of sludge microbiota, and evolution of process operation cycles.
[0130] The adjustment unit's dynamic optimization includes: collecting the actual handling results and the recovery status of the biochemical system after each warning. The handling results include the warning level and the record of the response action execution. The recovery status includes the recovery time of microbial activity and the time when the effluent water quality meets the standards. The effectiveness of this early warning and response will be assessed based on the recovery status, and the early warning lead time and false alarm / missed alarm indicators will be calculated. The specific definitions and calculation methods for each indicator are as follows: (1) Warning lead time: defined as "actual impact manifestation time of toxic shock" minus "warning trigger time". The "actual impact manifestation time of toxic shock" shall be determined using one of the following objective criteria, with the first one being met: (a) The moment when the ammonia nitrogen removal rate is below 90% of the baseline value for 2 consecutive hours (sampling once per minute) and shows a downward trend; (b) The moment when the variation of any response parameter in activated sludge (ORP, DO, MLSS, proportion of loose flocs, floc index, sludge settling performance index SV30, ammonia nitrogen removal rate, nitrifying microbial activity) exceeds its normal fluctuation range (normal fluctuation range is three times the standard deviation of the past 24 hours of non-toxic period) within three consecutive time slices. (c) The moment of impact is confirmed manually (if none of the above automatic determinations are triggered, then manual confirmation shall prevail).
[0131] (2) False alarm label: If, after the warning is triggered, neither (a) nor (b) of the above "actual impact time of toxic shock" is triggered within the following 24 hours, and the artificial water quality test (the sampling point is located at the inlet of the biological pool, the test method adopts the national standard method, and the detection limit is 10% of the standard limit of each indicator) does not detect any known toxic substance concentration exceeding twice the normal baseline, then it is marked as a false alarm.
[0132] (3) Missed Reporting Identification: If (a) or (b) of the above "Actual Impact Manifestation Time of Toxic Shock" is triggered without triggering an early warning, or if the shock is manually confirmed to have occurred, it is marked as a missed report; the evaluation results are used as feedback signals to dynamically adjust the duration of continuous time slices, the preset time lag interval, and the preset hold-time threshold. The specific algorithm for parameter adjustment is as follows: If this warning is valid (not a false alarm and the warning lead time is ≥60 minutes): reduce the continuous time slice duration by 5%, reduce the preset hold time threshold by 5%, and narrow the lower and upper bounds of the preset time lag interval by 5% each (keeping the midpoint of the interval unchanged). The adjusted parameters shall not be lower than their respective lower limits (slice ≥3 minutes, hold time ≥5 minutes, lower bound of lag interval ≥15 minutes, interval width ≥30 minutes).
[0133] If this warning is valid but the lead time is between 30 and 60 minutes: all parameters remain unchanged.
[0134] If this warning is valid but the lead time is less than 30 minutes, or a false alarm occurs: increase the continuous time slice duration by 10%, increase the preset hold time threshold by 10%, and expand the preset time lag interval by 10% (with exceptions for the upper and lower boundaries). The adjusted parameters shall not exceed their respective upper limits (slice ≤ 15 minutes, hold time ≤ 60 minutes, upper limit of lag interval ≤ 180 minutes).
[0135] If a false negative occurs: increase the duration of the continuous time slice by 15%, increase the preset hold time threshold by 15%, and expand the preset time lag interval by 15%.
[0136] All the above adjustments are based on the current operating parameters. An adjustment log is recorded after each adjustment, and the adjusted parameters are applied to the subsequent monitoring process.
[0137] The calculation parameters for the dynamic baseline specifically refer to the duration of the moving window (2-5 days).
[0138] It should be noted that the core logic of dynamic optimization follows a closed-loop approach of practical evaluation and iteration. It relies on the full-process data of each early warning and response to reverse-check the suitability of the system's core parameters, achieve long-term adaptation of parameters to actual working conditions, and avoid the system performance degradation problem caused by long-term parameter fixation.
[0139] The system automatically extracts the warning level corresponding to this warning event and simultaneously retrieves the action execution records of the response execution unit, including the response action type, start time, key operating parameters, action execution duration, and equipment operation feedback status, forming a complete dataset of disposal results. Simultaneously, it continuously monitors the recovery process of the biological system. By analyzing the regression of activated sludge response parameter sequences, it determines the microbial activity recovery time. Through online effluent quality monitoring data, it determines the time when the effluent quality meets standards. These two types of time data together constitute the core quantitative indicators of the biological system's recovery status.
[0140] After entering the effectiveness assessment stage, the calculation method for the early warning lead time is set as the actual time of manifestation of the toxic impact minus the warning trigger time. The quality is divided into good and bad levels based on the duration. At the same time, it is clearly defined that if there is no actual impact after the warning is triggered, it is marked as a false alarm, and if there is an actual impact but the warning is not triggered, it is marked as a missed alarm.
[0141] It should be noted that in some special cases, the automatic judgment time when the ammonia nitrogen removal rate is lower than 90% of the benchmark value for 2 consecutive hours (sampling once per minute) shall be given priority; if the automatic judgment is not triggered, the time when the impact is confirmed by manual confirmation shall be given priority.
[0142] Subsequently, parameter adjustments were carried out based on the evaluation results. All parameter adjustments were based on the current operating parameter values, and the adjustment range was strictly limited to the range of 5% to 15%. When the evaluation results were good (the early warning lead time was greater than 60 minutes and there were no missed reports), the duration of the continuous time slice and the preset hold time threshold were both reduced by 5%, and the lower and upper boundaries of the preset time lag interval were each narrowed by 5% (i.e., the interval range was reduced, but the midpoint of the interval remained unchanged). When the evaluation results are poor (the early warning lead time is less than 30 minutes or a single false alarm occurs), the duration of the continuous time slice and the preset hold time threshold will both be increased by 10%, and the preset time lag interval will be expanded by 10% (the upper and lower boundaries will be expanded by the same amount as the previous year). If a false negative occurs, the duration of the continuous time slice and the preset hold time threshold will both increase by 15%, and the preset time lag interval will be expanded by 15%. All parameter adjustments will be strictly controlled between 5% and 15% of the current value, with the continuous time slice duration not exceeding 15 minutes and not less than 3 minutes, the hold time threshold not exceeding 60 minutes and not less than 5 minutes, and the lower boundary of the preset time lag interval not less than 15 minutes, the upper boundary not more than 180 minutes, and the interval width not less than 30 minutes.
[0143] The adjusted parameters are automatically synchronized to all functional units of the system, covering core components such as the analysis unit and the verification unit, and are directly used in the calculation process of all subsequent monitoring cycles. At the same time, the time, basis and specific adjustment range of this parameter adjustment are recorded to form a parameter iteration log, providing a traceable basis for subsequent continuous optimization.
[0144] Traditional monitoring systems often have fixed core parameters that cannot adapt to dynamic changes in operating conditions, causing system performance to gradually deviate from actual requirements over time. This solution addresses this by constructing a dynamic optimization mechanism covering the entire process from data acquisition and effect evaluation to parameter adjustment and implementation. It fixes the baseline and range for parameter adjustment, transforming the practical effects of each early warning response into a direct basis for parameter iteration. This enables adaptive adjustment of continuous time slice duration, preset time lag intervals, and preset hold-time thresholds. This mechanism allows the system to learn independently, continuously optimizing judgment parameters based on changes in influent composition, sludge microbial community status, and toxicity shock types across different seasons. This solves the problem of poor adaptability of fixed parameters, eliminates the need for frequent manual calibration, reduces maintenance costs, and ensures that the system's early warning sensitivity, accuracy, and response speed remain at optimal levels, guaranteeing the stable operation of the biochemical system.
[0145] By setting up a data acquisition unit to clearly define the selectable monitoring parameters of influent water quality and the core response parameters of activated sludge, and by equipping it with corresponding water quality and sludge sensors and high-definition camera equipment (resolution not less than 1920×1080, shooting frame rate of 10-15 frames / second) and using the U-Net model to quantify floc morphology, it can simultaneously cover multi-dimensional information on water quality physicochemical properties, sludge operating conditions, and microbial micromorphological characteristics, and can solve the problem that traditional monitoring data has a single dimension and cannot fully characterize the state of the biochemical system.
[0146] By constructing a dynamic baseline using an adaptive window moving average and introducing a parameter lag correlation matrix and matrix rank to represent the number of linearly independent dimensions, the system clarifies the fixed time slice duration, fixed dimension threshold, fixed hold duration, and fixed lag interval range. It also adds a pre-monitoring mechanism for the decreasing trend of the number of dimensions, clarifies the quantitative logic of the coordinated change of correlation strength (Pearson correlation coefficient), the tabular construction method of the matrix, and the meaning of the physical fluctuation pattern of the number of dimensions. This allows for in-depth mining of hidden anomalies from the parameter network structure and fluctuation patterns, breaking through the limitation of traditional single-point threshold monitoring which can only provide post-event alarms, and enabling early prediction of toxic impacts.
[0147] By adding a low-concentration toxicity identification mechanism to the analysis unit, a fixed significance test standard, a fixed fingerprint database experimental concentration range, and a fixed matching similarity threshold are defined. The time-series fingerprint of heavy metals is constructed using the sorting mode of response delay time (the fingerprint database can be continuously expanded), which enables accurate identification of latent low-concentration heavy metals that have not reached the threshold. This fills the gap in the identification of low-concentration toxicity in traditional monitoring and prevents the risk of toxicity accumulation in advance.
[0148] By adding a strong correlation screening and subgraph connectivity verification mechanism, and clearly defining the 75th percentile as the dynamic screening threshold, the dynamic screening threshold is generated based on the distribution percentile and the network consistency is judged by the number of connected subgraphs. It can adaptively eliminate weak correlation noise interference and flexibly adjust the anomaly judgment time according to the collaborative state of the microbial community parameters, thereby improving the early warning sensitivity and adaptability to operating conditions.
[0149] By adding a continuous state verification step and clarifying the fixed dimension threshold value and fixed holding time threshold, instantaneous noise and random operating condition disturbances can be effectively filtered out, the probability of false alarms can be reduced, and the practical reliability of the system engineering can be improved.
[0150] By determining the weight distribution of response parameters recorded by the unit, and relying on eigenvalue decomposition and normalization, the dominant proportion of various parameters in the synchronous fluctuation mode is clarified, providing a quantitative basis for precise handling and improving the pertinence and efficiency of emergency control.
[0151] By classifying toxic impact diffusion patterns based on weight distribution and matching them with three-level early warning levels through the judgment unit, abnormal pattern recognition and hazard level classification output are achieved. This changes the extensive mode of traditional binary alarms, supports on-site hierarchical emergency response, and improves the precision of process control.
[0152] By adding a toxic substance category identification function to the judgment unit, and using the Pearson correlation coefficient as the correlation criterion, the quantitative mapping boundary between various water quality parameters and toxic substances is clarified. Relying on the three-level identification logic of synchronous mode signal-water quality parameter correlation-feature library matching, the system can accurately predict five types of toxic substances such as strong acid and strong alkali, so that abnormal response can be shifted from blind response to targeted regulation, thereby improving the accuracy and effectiveness of emergency response.
[0153] By adding response execution units, a one-to-one correspondence between early warning levels and response actions is established, enabling closed-loop control of the entire process from abnormal early warning to automatic response. This avoids the lag and non-standardization of manual response and enhances the automation, standardization, and precision of the system's emergency response capabilities.
[0154] By automatically generating calibration thresholds based on historical operating conditions and configuring graded response processes, it can adapt to changes in operating conditions caused by the replacement of influent components and microbial communities in different seasons, thus saving the maintenance costs of frequent manual calibration of thresholds.
[0155] By adjusting the unit to build a dynamic optimization mechanism for the entire process, a fixed parameter adjustment benchmark (current operating parameters) and an adjustment range of 5% to 15% are defined. This enables adaptive iteration of continuous time slice duration, preset time lag interval, and preset hold time threshold, allowing the system to have self-learning capabilities, adapt to dynamic changes in the process over a long period of time, continuously optimize early warning performance, and ensure long-term stable operation of the system.
[0156] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A dynamic monitoring and early warning system for urban sewage treatment, characterized in that, include: The acquisition unit is used to acquire the influent water quality parameter sequence in real time and establish a dynamic baseline, and output the water quality fluctuation characteristics. It also collects activated sludge response parameter sequences in real time and obtains sludge floc morphology characteristics through image recognition, and outputs the microbial activity status. The analysis unit is used to calculate the correlation strength reflecting the driving relationship between two response parameters within each continuous time slice, taking each response parameter in the microbial activity state as a node, and constructing a response parameter lag correlation matrix based on sensor time-series data of every two response parameters within a preset time lag interval. The correlation strength is adopted as the statistical correlation measure corresponding to the lag time that makes the two parameter sequences achieve the maximum cooperative change. The linear independent dimension of the response parameter lag correlation matrix is calculated, which is determined by counting the number of singular values greater than one percent of the maximum singular value after performing singular value decomposition on the matrix. The verification unit is used to start recording the duration when the number of linear independent dimensions drops below a preset dimension threshold, and to monitor whether the number of linear independent dimensions remains below the preset dimension threshold in subsequent continuous time slices; when the recorded time reaches a preset holding time threshold, a stable impact confirmation signal is generated. The determination unit is used to determine that there is a toxic impact in the influent after receiving the stable impact confirmation signal, output an early warning control signal, and trigger a graded response processing flow; wherein, the preset dimension threshold and the preset retention time threshold are automatically determined by the system based on the statistical results of historical non-toxic periods; The adjustment unit is used to dynamically optimize the calculation parameters of the dynamic baseline, the preset time lag interval, and the preset retention time threshold based on the actual graded response actions and the recovery status of the biochemical system after each warning.
2. The dynamic monitoring and early warning system for urban sewage treatment according to claim 1, characterized in that, The analysis unit is also used to perform strong correlation filtering and subgraph connectivity verification on the lag correlation matrix of response parameters: Calculate the correlation strength value between every two response parameters, retain parameter pairs with correlation strength values greater than a preset dynamic threshold, and set the remaining parameter pairs to zero to obtain a sparse correlation matrix; the preset dynamic threshold is automatically determined by the system based on the percentile distribution of all correlation strength values in the current time slice. Calculate the number of connected subgraphs in the sparse correlation matrix. If the number of connected subgraphs is 1, output a consistency confirmation signal. The consistency confirmation signal is used to shorten the preset hold time threshold.
3. The dynamic monitoring and early warning system for urban sewage treatment according to claim 1, characterized in that, The collected influent water quality parameters include at least two of the following: conductivity, pH value, ammonia nitrogen concentration, total organic carbon concentration, and heavy metal-related parameters; the collected activated sludge response parameters include sludge concentration MLSS, oxidation-reduction potential ORP, dissolved oxygen DO, sludge settling performance index SV30, pollutant removal rate, nitrifying microbial activity, and sludge floc morphology identified by image recognition.
4. The dynamic monitoring and early warning system for urban sewage treatment according to claim 1, characterized in that, Before determining that the number of linearly independent dimensions has fallen below a preset dimensionality threshold, the analysis unit is also used to monitor the decreasing trend of the number of linearly independent dimensions: Obtain the linear independent dimension of the response parameter lag correlation matrix within two consecutive time slices. If the dimension of the later time slice is less than the dimension of the earlier time slice, record a dimension decay event. After a preset number of consecutive dimension decay events occur, output a dimension decay warning as a precursor signal of toxic impact and start the state maintenance verification process in advance.
5. A dynamic monitoring and early warning system for urban sewage treatment according to claim 1, characterized in that, The determination unit is also used to record the weight distribution of response parameters when the number of linear independent dimensions drops below a preset dimension threshold: When the number of linear independent dimensions of the response parameter lag correlation matrix drops below a preset dimension threshold, the maximum eigenvalue of the matrix and its corresponding eigenvector are extracted; each component in the eigenvector is normalized according to the response parameter type, and the weight distribution of each response parameter in the synchronization mode is output.
6. A dynamic monitoring and early warning system for urban sewage treatment according to claim 5, characterized in that, The determination unit also distinguishes the diffusion mode of the toxic impact based on the weight distribution and outputs the corresponding warning level: If the weight of a single response parameter in the weight distribution is greater than the sum of the weights of all other response parameters, it is determined to be a single-parameter dominant mode, and a level three severe warning is output. If the weights of all response parameters in the weight distribution are uniformly distributed and there are no significant dominant parameters, then it is determined to be a global coupling mode, and a level two moderate warning is output. If it cannot be classified into any of the above modes, a Level 1 mild warning will be issued. The diffusion mode type and corresponding warning level are output as additional information for the warning control signal.
7. A dynamic monitoring and early warning system for urban sewage treatment according to claim 6, characterized in that, It also includes a response execution unit, configured to perform corresponding tiered response actions based on the output warning level: Level 1 mild warning, the corresponding response action is to notify the inspection team and automatically record samples; A Level 2 moderate alert requires the following response actions: adjusting the inlet valve and increasing aeration. A Level 3 severe warning indicates that the corresponding response action is to switch to the accident pool and coordinate with the upstream pumping station to reduce the flow rate.
8. A dynamic monitoring and early warning system for urban sewage treatment according to claim 1, characterized in that, After determining the toxic impact, the determination unit is also used to identify the type of toxic substance: Extract the eigenvector corresponding to the largest eigenvalue of the hysteresis correlation matrix of the response parameters, and use the components of the eigenvector as weights to perform a weighted summation on each response parameter to obtain the synchronization mode signal; Considering the hydraulic residence time from the inlet to the biological tank, the time offset is enumerated with a preset step size within the range of zero to twice the hydraulic residence time. The statistical correlation between the synchronization mode signal and each inlet water quality parameter sequence after the offset is calculated. The maximum value is taken as the final correlation score of the water quality parameter. The water quality parameter type with the highest correlation is selected as the candidate toxicity indicator parameter. The candidate toxicity indicator parameters are matched with a preset toxic substance feature library. The feature library records the mapping relationship between each abnormal water quality parameter and the corresponding toxic substance. The toxic substances include strong acids, strong alkalis, heavy metals, high-salt wastewater, and recalcitrant organic matter. Based on the matching results, predictive information on the categories of toxic substances is output, and this information is output as part of the early warning and control signal.
9. A dynamic monitoring and early warning system for urban sewage treatment according to claim 1, characterized in that, When the number of linear independent dimensions of the lag correlation matrix of the response parameters does not decrease to the preset dimension threshold but shows a continuous decrease, the analysis unit is also used to distinguish low-concentration toxicity by using the sorting pattern of response delay time: Obtain the average correlation strength between each response parameter and all other response parameters within a continuous time slice, and calculate the time span from the start of the average correlation strength to the lowest point as the response delay time. The response delay time needs to be significantly compared with the noise distribution during historical non-toxic periods; Arrange the response delay times of all response parameters that passed the significance test in ascending order to obtain the sorting pattern; The sorting pattern is compared with a preset heavy metal response fingerprint database, and the heavy metal type that matches the sorting pattern is selected as the identification result, and a low concentration toxicity warning is output.
10. A dynamic monitoring and early warning system for urban sewage treatment according to claim 1, characterized in that, The dynamic optimization performed by the adjustment unit specifically includes: The actual handling results and biochemical system recovery status after each warning are collected. The handling results include the warning level and response action execution records. The recovery status includes the microbial activity recovery time and the time when the effluent water quality meets the standards. The effectiveness of this early warning and response will be assessed based on the recovery status, and the early warning lead time and false alarm / missed alarm indicators will be calculated. The evaluation results are used as feedback signals to dynamically adjust the duration of the continuous time slice, the preset time lag interval, and the preset hold time threshold. The adjusted parameters will be applied to subsequent monitoring processes.
Citation Information
Patent Citations
Diagnostic method for validity of online collected water quality data
CN101718774A
Industrial poison water detection method
CN101762677A