Sewage biochemical treatment process abnormity intelligent early warning method based on image recognition
By combining image acquisition and water quality sensor data during the wastewater biochemical treatment process, a multi-source fusion feature matrix is constructed and digital twin assessment is performed, which solves the blind spot problem of traditional monitoring methods, realizes accurate perception and graded early warning of changes in the micro-morphology of sludge, and improves the system's operational resilience and energy consumption control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- QINGYANG XIFENG DISTRICT EAST DISTRICT SEWAGE TREATMENT PLANT CO LTD
- Filing Date
- 2026-01-22
- Publication Date
- 2026-05-01
AI Technical Summary
In the existing biological treatment process of sewage, traditional monitoring methods are difficult to achieve continuous, objective and high-precision perception of changes in the micro-morphology of sludge, resulting in blind spots in the identification of abnormal operating conditions. Furthermore, existing image recognition methods do not fully consider the temporal coupling relationship between fluctuations in water quality parameters and visual representation, resulting in weak model generalization ability, high false alarm rate, and difficulty in supporting graded intervention strategies.
By deploying online image acquisition units to acquire sludge mixed liquor image data, and combining it with water quality sensor data, preprocessing and feature extraction are performed to construct a multi-source fusion feature matrix. A digital twin assessment model is then used for spatiotemporal alignment and fusion to identify abnormal patterns and generate graded early warning signals.
It enables continuous and accurate anomaly detection in the wastewater biochemical treatment process, improves the accuracy and adaptability of early warning, can identify anomalies early and generate graded early warnings, supports the proactive control of the system, and avoids excessive effluent or surges in energy consumption.
Smart Images

Figure CN121959366A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of wastewater treatment technology, specifically relating to an intelligent early warning method for abnormalities in the biochemical treatment process of wastewater based on image recognition. Background Technology
[0002] With the acceleration of urbanization and increasingly stringent environmental standards, wastewater biological treatment, as a core component of water environment governance, directly impacts the effluent quality compliance rate and system energy consumption control through its operational stability and level of intelligence. This process relies on the metabolic activities of the microbial community in activated sludge, whose state is dynamically influenced by factors such as influent load, temperature, and dissolved oxygen. The physical morphology of the sludge (e.g., floc structure, settling properties) is a key visual indicator reflecting the system's health. Traditional monitoring methods primarily rely on online sensors to monitor physicochemical parameters (e.g., DO, pH, MLSS), supplemented by periodic manual sampling and observation. This approach struggles to achieve continuous, objective, and high-precision perception of changes in the sludge's microstructure, resulting in significant blind spots in the identification of abnormal operating conditions.
[0003] Image recognition-based sludge condition analysis technology has attracted attention in recent years, aiming to capture early abnormal signs such as floc breakage and excessive filamentous bacteria growth through visual information. However, existing methods are mostly limited to single image feature extraction and do not fully consider the temporal coupling relationship between water quality parameter fluctuations and visual representations, resulting in weak model generalization ability and high false alarm rates. Under actual complex operating conditions, sudden changes in influent water quality, seasonal temperature changes, or equipment operation disturbances often cause multi-parameter collaborative shifts. Relying solely on either visual or sensor data sources makes it difficult to accurately distinguish between true anomalies and normal fluctuations, resulting in delayed early warnings or frequent false alarms, which seriously restricts the autonomous control capability and operational resilience of wastewater treatment systems.
[0004] Existing technologies generally suffer from problems such as fragmented data dimensions, static anomaly criteria, and passive response mechanisms. On the one hand, image information and sensor data are not deeply integrated within a unified spatiotemporal framework, making it impossible to construct a digital representation that reflects the dynamic evolution of the system. On the other hand, early warning logic is mostly based on threshold triggering, lacking predictive judgment of abnormal development paths and failing to support tiered intervention strategies. These problems are particularly prominent when dealing with progressive faults such as filamentous bulking and sludge disintegration, often resulting in excessive effluent or a surge in energy consumption by the time the symptoms become apparent. Therefore, there is an urgent need for an intelligent early warning method that integrates multi-source heterogeneous data and possesses early symptom identification and dynamic risk assessment capabilities to achieve a fundamental shift from "post-event handling" to "pre-event prediction." Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide an intelligent early warning method for abnormalities in the wastewater biochemical treatment process based on image recognition, which can effectively solve the problems in the background art.
[0006] This invention proposes an intelligent early warning method for abnormalities in wastewater biochemical treatment processes based on image recognition. The method includes the following steps: Step S110: The online image acquisition unit deployed in the aeration tank periodically acquires raw image data of the sludge mixture and simultaneously acquires time-series sensing data from the water quality sensor array. The time-series sensing data includes at least dissolved oxygen concentration, pH value, mixed liquor suspended solids concentration, influent flow rate and temperature. Step S120: Preprocess and extract features from the original image data to generate a sequence of visual feature vectors containing floc morphological features, bubble distribution features, and color texture features; Step S130: The visual feature vector sequence is spatiotemporally aligned and fused with the time-series sensing data to construct a multi-source fusion feature matrix characterizing the multi-dimensional dynamic state of the wastewater biochemical treatment system. Step S140: Input the multi-source fusion feature matrix into the pre-trained digital twin evaluation model. The digital twin evaluation model is trained and generated based on historical normal operating condition data. It is used to calculate the dynamic deviation between the current state and the normal operating condition benchmark, and to identify specific abnormal mode types. Step S150: Based on the dynamic deviation and the abnormal mode type, generate a warning signal of the corresponding level through the hierarchical warning decision module, and push the warning signal and its associated abnormal diagnosis information to the remote operation and maintenance monitoring platform.
[0007] Preferably, step S120 includes the following sub-steps: Step S121: Perform grayscale conversion, histogram equalization, and Gaussian filtering noise reduction on the original image data to obtain a preprocessed image; Step S122: The preprocessed image is processed using a semantic segmentation network based on the U-Net architecture to segment the sludge floc region and the bubble region in the image. Step S123: For the segmented sludge floc region, calculate its area, perimeter, equivalent diameter, roundness, fractal dimension and standard deviation of contour curvature to form a floc morphological feature sub-vector; Step S124: For the segmented bubble regions, count the number of bubbles, average area, area distribution variance, and spatial distribution uniformity index to form a bubble distribution feature sub-vector. Step S125: In the HSV color space, calculate the mean hue, mean saturation, and luminance variance of the preprocessed image in the sludge main region, and extract the contrast, correlation, and entropy values based on the gray-level co-occurrence matrix to form a color texture feature sub-vector. Step S126: The floc morphology feature vector, bubble distribution feature vector, and color texture feature vector are concatenated to generate the visual feature vector.
[0008] Preferably, in step S123, the fractal dimension The calculation uses the box-counting dimension method, and the formula is: , in The side length of the square box that covers the outline of the flocculent body. The minimum number of boxes required to cover the outline.
[0009] Preferably, in step S130, the spatiotemporal alignment and fusion specifically involves: using a unified timestamp as a reference, interpolating and resampling the visual feature vector sequence and the temporal sensing data to align them at the same time series point; and concatenating the aligned visual feature vector with the sensing data vector at the corresponding time to form the multi-source fusion feature matrix.
[0010] Preferably, in step S140, the digital twin evaluation model consists of a feature encoder, a temporal memory module, and an anomaly scorer; the feature encoder is a deep autoencoder, whose encoder part compresses the multi-source fusion feature matrix into a low-dimensional latent vector. The decoder part attempts to... Reconstructing input features; the temporal memory module is a long short-term memory network, and its input is the latent vector sequence. This is used to learn the normal evolution pattern of the system state; the anomaly scorer is based on the reconstruction error. With prediction error Calculate the dynamic deviation .
[0011] Preferably, the dynamic deviation The calculation formula is: , in , , , These are the mean and standard deviation of the reconstruction error and prediction error calculated by the model on the validation set, respectively. and For adjustable weighting coefficients, satisfying .
[0012] Preferably, in step S140, the abnormal pattern recognition is achieved through a support vector machine classifier. The input of the classifier is the multi-source fusion feature matrix within the time window before and after the triggering of the abnormality, and the output is a predefined abnormal pattern type label. The abnormal pattern types include early filamentous bulking, sludge disintegration, sludge bulking, uneven aeration, and load shock.
[0013] Preferably, in step S150, the hierarchical early warning decision module bases its decision on the dynamic deviation. The numerical value and the type of the abnormal pattern determine the warning level into three levels: Attention, Warning, and Alarm; the Attention level corresponds to... If the anomaly pattern is between threshold 1 and threshold 2 and is of the progressive type, the warning level corresponds to... Exceeding threshold 2 or exhibiting an abnormal pattern indicating rapid deterioration, the alarm level corresponds to... If the threshold is continuously exceeded 3, the system determines that there is an immediate risk of failure.
[0014] This invention also provides an intelligent early warning system for abnormalities in wastewater biochemical treatment processes based on image recognition. This system comprises the following components: Online image acquisition and sensing module: used to periodically acquire raw image data of sludge mixed liquor through an online image acquisition unit deployed in the aeration tank, and simultaneously acquire time-series sensing data from the water quality sensor array. The time-series sensing data includes at least dissolved oxygen concentration, pH value, mixed liquor suspended solids concentration, influent flow rate and temperature. Visual feature extraction module: used to preprocess and extract features from the original image data to generate a sequence of visual feature vectors containing floc morphological features, bubble distribution features and color texture features; Multi-source data fusion module: used to perform spatiotemporal alignment and fusion of the visual feature vector sequence and the time-series sensing data to construct a multi-source fusion feature matrix characterizing the multi-dimensional dynamic state of the wastewater biochemical treatment system; Digital twin evaluation module: used to input the multi-source fusion feature matrix into a pre-trained digital twin evaluation model, which is trained and generated based on historical normal operating condition data, and used to calculate the dynamic deviation between the current state and the normal operating condition benchmark, and identify specific abnormal mode types. The graded early warning decision and push module is used to generate early warning signals of corresponding levels based on the dynamic deviation and the abnormal mode type, and push the early warning signals and their associated abnormal diagnosis information to the remote operation and maintenance monitoring platform.
[0015] Preferably, the visual feature extraction module includes a preprocessing unit, a semantic segmentation unit, a floc morphology analysis unit, a bubble distribution analysis unit, a color and texture analysis unit, and a feature splicing unit; The preprocessing unit is used to perform grayscale conversion, histogram equalization, and Gaussian filtering noise reduction on the original image data; the semantic segmentation unit uses a semantic segmentation network based on the U-Net architecture to process the preprocessed image and segment out the sludge floc region and the bubble region. The floc morphology analysis unit is used to calculate the area, perimeter, equivalent diameter, roundness, fractal dimension, and standard deviation of contour curvature of the sludge floc region. The bubble distribution analysis unit is used to statistically analyze the number of bubbles, average area, area distribution variance, and spatial distribution uniformity index of the bubble region. The color texture analysis unit is used to calculate the mean hue, mean saturation, and luminance variance of the main sludge region in the HSV color space, and to extract the contrast, correlation, and entropy values based on the gray-level co-occurrence matrix. The feature splicing unit is used to splice the floc morphology feature vector, the bubble distribution feature vector, and the color texture feature vector into a visual feature vector.
[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: Through modular design and technological innovation, the accuracy, adaptability, and clinical applicability of tumor segmentation have been significantly improved. First, the dynamic target volume modeling module constructs a spatiotemporal dynamic target volume tensor by extracting morphological and intensity distribution features from multi-temporal images, thereby achieving accurate modeling of tumor evolution during radiotherapy. This method can adaptively capture morphological changes in the tumor, such as volume shrinkage and internal texture heterogeneity, providing rich contextual information for segmentation and solving the problem of insufficient modeling of dynamic information by traditional static models.
[0017] Secondly, the multi-scale context-aware segmentation module utilizes a U-shaped network with dilated convolution and dual attention mechanisms to achieve efficient fusion of local details and global semantics, thereby significantly improving the accuracy and robustness of segmentation boundaries. Through skip connections and attention gating mechanisms, this module effectively suppresses artifact interference caused by radiotherapy, enhances the response of key tumor regions, and ensures that the segmentation results meet the high requirements of lattice radiotherapy in terms of geometric accuracy, while avoiding the shortcomings of traditional methods such as sensitivity to noise and insufficient semantic association.
[0018] Finally, the adaptive parameter tuning module optimizes key parameters based on dose distribution consistency loss using a differential evolution algorithm, ensuring that the segmentation results are highly aligned with the physical targets of lattice radiotherapy, thereby improving the efficiency and reliability of clinical applications. This mechanism not only ensures that the segmented region covers high-dose points to meet the biological effect requirements of the treatment plan, but also controls the processing time for a single case to within 90 seconds. Through GPU acceleration, it achieves end-to-end real-time processing, significantly improving the timeliness and operability of the clinical workflow. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the overall process of the intelligent early warning method for abnormalities in the wastewater biochemical treatment process based on image recognition proposed in this invention. Figure 2 This is a schematic diagram of the overall technical solution architecture of the intelligent early warning method for abnormal sewage biochemical treatment process based on image recognition proposed in this invention; Figure 3 This is a schematic diagram of the core principle framework of multi-source data spatiotemporal fusion and digital twin evaluation in this invention; Figure 4 This is a flowchart illustrating the logical process of image preprocessing and visual feature extraction in this invention. Figure 5 This is a schematic diagram of the internal structure of the digital twin evaluation model and its abnormal scoring mechanism in this invention. Figure 6 This is a schematic diagram of the multi-level interaction and information flow between the hierarchical early warning decision module and the remote operation and maintenance platform in this invention. Detailed Implementation
[0020] To further illustrate the technical means and effects adopted by the present invention to achieve the intended purpose, the specific embodiments according to the present invention will be described in detail below with reference to the accompanying drawings and preferred embodiments.
[0021] Example 1 In the aerobic aeration tank, the core biological treatment unit of urban wastewater treatment plants, the biochemical reactions are complex and dynamic, and the activity and morphology of the sludge microbial community directly determine the pollutant removal efficiency. Traditional monitoring methods relying on manual microscopic examination and offline water quality testing have inherent drawbacks such as strong lag, high subjectivity, and inability to continuously perceive, making it difficult to provide early warnings for process anomalies such as filamentous bulking and sludge disintegration. This invention aims to construct an intelligent early warning system based on image recognition and data fusion to achieve continuous, objective, and accurate perception of the state of the wastewater biochemical treatment process and proactive prediction of abnormal risks.
[0022] The overall technical architecture of this system includes an online image acquisition unit, a water quality sensor array, a data preprocessing and feature extraction module, a multi-source data fusion module, a digital twin assessment model, a tiered early warning and decision-making module, and a remote operation and maintenance monitoring platform. These modules work together to form a complete closed loop from data acquisition, feature analysis, status assessment to decision output.
[0023] The online image acquisition unit is deployed near the observation window or specific sampling points in the aeration tank. Its core components are a waterproof high-definition industrial camera and an auxiliary lighting source. The industrial camera has a resolution of no less than 1920×1080 pixels, and its optical lens is specially coated to prevent interference from water vapor condensation. The sampling frequency is dynamically adjustable according to process requirements, ranging from 1 frame / minute to 1 frame / 5 minutes, ensuring that it can capture continuous changes in sludge floc morphology without excessively increasing the data processing burden. The auxiliary lighting source is an LED array with a specific wavelength range, whose emission spectrum is concentrated in the visible light band of 450 nm to 650 nm. This design can effectively suppress interference caused by changes in natural light and enhance the imaging contrast of sludge flocs and bubbles. The illumination angle and intensity of the light source are precisely calibrated to ensure uniform illumination in the acquisition area and avoid shadows or overexposed areas. The water quality sensor array is distributed and installed in the aeration tank, including a dissolved oxygen sensor, a pH sensor, a mixed liquor suspended solids concentration sensor, an influent flow meter, and a temperature sensor. The sampling frequency of these sensors is synchronized with or an integer multiple of the image acquisition frequency. For example, if the image acquisition frequency is 1 frame / 2 minutes, the water quality sensor sampling frequency can be set to 1 time / 30 seconds. All data generated by the image acquisition unit and the water quality sensor array are tagged with a uniform, millisecond-accurate timestamp at the moment of acquisition, and a spatial location identifier composed of the installation location coordinates is added, forming raw image data and time-series sensor data streams with complete spatiotemporal metadata.
[0024] The raw image data enters the preprocessing and feature extraction module. This module first executes step S121, which performs standardized preprocessing on the raw image data. The preprocessing process includes: converting the color image to a grayscale image to simplify subsequent calculations; performing histogram equalization on the grayscale image to enhance the overall image contrast and make the boundary between the flocs and the background clearer; and finally applying a Gaussian filtering algorithm to reduce noise in the image, smoothing high-frequency noise introduced by small water particles or camera electronic noise, resulting in a high-quality preprocessed image. Subsequently, step S122 is initiated, using a semantic segmentation network based on the U-Net architecture to process the preprocessed image. This network has been trained on a large dataset of images labeled with sludge floc regions and bubble regions, and can accurately classify each pixel in the input image as "flocs," "bubbles," or "background." The segmentation network outputs two independent binary mask images, which accurately delineate the contour regions of the sludge flocs and bubbles, respectively.
[0025] For the segmented sludge floc regions, step S123 performs a series of morphological feature calculations. The system calculates the area and perimeter of the connected region of each independent floc, and derives the equivalent diameter and roundness accordingly to quantify the size and regularity of the flocs. More importantly, the system uses the box-counting dimension method to calculate the fractal dimension of the flocs. Specifically, a series of square grids with decreasing side lengths are used to cover the floc outline, and the minimum number of boxes required to cover the entire outline is calculated. The fractal dimension is calculated using the formula... The described double logarithmic linear relationship was obtained by fitting, where Let's say it's the side length of the box. The required number of boxes is specified. A higher fractal dimension indicates a more complex floc structure with more branches. Simultaneously, the system calculates the curvature of each point on the floc profile and obtains its standard deviation. This standard deviation of profile curvature directly quantifies the roughness and irregularity of the floc edges; an increased value typically indicates a looser or more fragmented floc structure. All these features—area, perimeter, equivalent diameter, roundness, fractal dimension, and standard deviation of profile curvature—together constitute the floc morphological feature subvector.
[0026] For the segmented bubble regions, step S124 performs bubble distribution feature analysis. The system counts the total number of bubbles within the image field of view, calculates the average area and variance of the area distribution of all bubbles to reflect the uniformity of bubble size. Furthermore, the system calculates a spatial distribution uniformity index, which is obtained by dividing the image into several grids, counting the number of bubbles in each grid, and calculating the coefficient of variation of the number of bubbles in all grids. This index is used to quantify the uniformity of bubble distribution across the aeration tank cross-section. The number of bubbles, average area, area distribution variance, and spatial distribution uniformity index together constitute the bubble distribution feature sub-vector.
[0027] Step S125 focuses on extracting color and texture features. The system converts the preprocessed original color image to the HSV color space. Within the segmented sludge body region (i.e., the union of all floc regions), the mean hue, mean saturation, and variance of brightness values for all pixels are calculated. The mean hue reflects the overall color tendency of the sludge and is related to the composition of the microbial community; the mean saturation and variance of brightness are related to sludge concentration and light transmittance. Simultaneously, on the grayscale image, the system calculates texture features based on the gray-level co-occurrence matrix, including contrast, correlation, and entropy. Contrast reflects the image's sharpness and the depth of texture grooves; correlation measures the directionality of the image texture; and entropy indicates the richness of information contained in the image. These color and texture features constitute a color and texture feature sub-vector. Finally, step S126 concatenates the calculated floc morphology feature sub-vector, bubble distribution feature sub-vector, and color and texture feature sub-vector in a predetermined order to generate a comprehensive visual feature vector. This vector is output at a fixed frequency (consistent with the image acquisition frequency), forming a visual feature vector sequence.
[0028] Meanwhile, the time-series sensor data streams (dissolved oxygen, pH, MLSS, influent flow rate, temperature) undergo simple dimensional normalization and outlier removal to form a sensor data vector sequence. Step S130 is responsible for spatiotemporal alignment and fusion of the visual feature vector sequence and the sensor data vector sequence. The alignment process uses a unified timestamp as a reference. Since the sampling times of different data sources may not completely overlap, the system uses linear interpolation to resample the visual feature vector sequence and the sensor data vector sequence, ensuring that both have valid data at the same series of equally spaced time points. After alignment, at each time point, the visual feature vector and the sensor data vector at that time are directly concatenated to form a wider feature vector. These concatenated vectors from multiple consecutive time points are arranged in chronological order to construct a multi-source fusion feature matrix. Each row of this matrix represents a "digital snapshot" that fuses image visual information and water quality sensor information, depicting the multidimensional dynamic state of the system at a specific moment.
[0029] The constructed multi-source fusion feature matrix is fed into a digital twin evaluation model for state assessment and anomaly identification. This model consists of three parts: a feature encoder, a temporal memory module, and an anomaly scorer. The feature encoder is a deep autoencoder, whose encoder part comprises multiple fully connected layers, responsible for compressing the high-dimensional multi-source fusion feature matrix into a low-dimensional latent vector containing core state information. The decoder part then attempts to extract information from this latent vector. The original input features are reconstructed. The temporal memory module is a long short-term memory network that receives a series of latent vectors output by the feature encoder. As input, the LSTM network learns historical state sequences, internally modeling the dynamic evolution and time dependencies of the system under normal operating conditions. The anomaly scorer is the core decision unit of the model. It simultaneously calculates two errors: one is the reconstruction error. The first is the mean square error between the decoded output of the autoencoder and the original input features, reflecting the deviation between the current state features and the normal state feature distribution; the second is the prediction error. That is, the LSTM network predicts the next-time latent vector based on the preceding latent vector. The actual encoding obtained The error between them reflects the deviation of the current state evolution trajectory from the normal evolutionary pattern.
[0030] To quantify the overall degree of deviation, the anomaly scorer calculates the dynamic degree of deviation. The calculation formula is as follows: .
[0031] in, , , , These statistics are not calculated in real time, but are pre-calculated using the mean and standard deviation of the reconstruction error and prediction error after the model training is completed, using an independent validation set containing only normal operating condition data, and are used to standardize the real-time error. and For adjustable weighting coefficients, satisfying This dynamic deviation is used to balance the contributions of reconstruction error and prediction error to the overall score. It is a dimensionless scalar value. The larger the value, the more significant the deviation of the current system state from the normal operating condition.
[0032] When dynamic deviation When the preset primary threshold is exceeded for the first time, the system determines that an abnormal event has been triggered. At this point, the abnormal pattern recognition submodule in the digital twin assessment model is activated. This submodule is essentially a support vector machine classifier. Its input is a multi-source fusion feature matrix fragment (i.e., contextual state information) within a fixed time window before and after the triggering of the abnormality, and its output is a predefined abnormal pattern type label. These abnormal pattern types are defined based on a large number of historical failure cases and process knowledge, and mainly include: early stage of filamentous bulking (characterized by a slow increase in floc fractal dimension and a decrease in roundness), sludge disintegration (characterized by a sudden increase in the standard deviation of floc contour curvature and a decrease in average area), sludge bulking (characterized by an abnormal increase in MLSS and a deterioration in floc settling-related morphological indicators), uneven aeration (characterized by a decrease in the bubble distribution uniformity index and localized abnormal dissolved oxygen), and load shock (characterized by a sudden change in influent flow rate or key water quality parameters accompanied by rapid changes in visual characteristics). Through this classifier, the system not only knows that "there is an abnormality," but can also preliminarily determine "what kind of abnormality it may be."
[0033] Step S150 is executed by the hierarchical early warning decision module. This module receives the dynamic deviation from the digital twin evaluation model. Based on the abnormal mode type, an early warning signal is generated according to the built-in decision logic. The early warning levels are divided into three levels: Attention, Warning, and Alarm. The "Attention" level applies to dynamic deviations. If the threshold is exceeded but not reached, and the abnormal pattern identification result is a gradual, slow-developing type such as early stage of filamentous bacterial swelling, this level of warning aims to alert operations and maintenance personnel to pay attention to the potential changing trend of a certain indicator. The "warning" level is triggered in two situations: one is dynamic deviation. Exceeding the higher threshold 2; secondly, despite The threshold of 2 has not been exceeded, but the identified abnormal pattern belongs to the type that may deteriorate rapidly, such as sludge disintegration. This level requires maintenance personnel to intervene, inspect, and prepare to take control measures. The "Alarm" level is the highest level, when the dynamic deviation is... If the threshold value is continuously exceeded for a certain period of time, or if the system determines that there is an immediate operational risk (such as severe uneven aeration leading to large-scale oxygen deficiency), it will be triggered. In this case, emergency operations need to be taken immediately to prevent the process from collapsing.
[0034] The early warning signal generated by the tiered early warning decision-making module is a structured data packet. Its content must include the occurrence time of the abnormal event, the location number of the aeration tank, the calculated dynamic deviation value, the identified abnormal pattern type, the determined early warning level, and a preliminary diagnostic description and suggested handling measures generated based on a knowledge base (such as "suggest checking the sludge return ratio of the secondary sedimentation tank" and "suggest increasing the aeration rate and observing dissolved oxygen distribution"). This early warning signal is pushed to the remote operation and maintenance monitoring platform in real time through a highly reliable message queue middleware. The central large-screen visualization interface of the monitoring platform will prominently display the early warning information with different colors (such as yellow, orange, and red) and flashing icons, and will also pop up relevant historical data curves and real-time video footage. Simultaneously, the early warning information will also be pushed to the smartphones of relevant operation and maintenance personnel via a mobile application to ensure timely delivery of information. The platform also provides functions such as early warning confirmation, handling feedback entry, and case archiving, forming a closed-loop management system for early warning handling.
[0035] Example 2 In high-concentration organic wastewater treatment plants in industrial parks, the biochemical treatment process faces challenges such as large fluctuations in water quality and frequent load shocks. This embodiment applies the method described in this invention, adapting it to the characteristics of its sequencing batch reactor process, and focuses on demonstrating its early warning capability in dealing with intermittent influent load shocks.
[0036] The installation of the online image acquisition unit and water quality sensor array must be adapted to the cyclical operation characteristics of the SBR process. Sampling by the industrial camera and light source is continuous throughout the reaction, sedimentation, drainage, and idle stages, but the focus of feature extraction differs. During the reaction stage, the focus is on analyzing the active morphology of sludge flocs and bubble distribution; during the sedimentation stage, image analysis can be used to analyze the settling velocity at the sludge interface and the turbidity of the supernatant. In addition to conventional parameters, the water quality sensor array includes an oxidation-reduction potential sensor to more sensitively capture changes in the biochemical reaction state within the reactor. The sampling frequency for all data is automatically increased to 1 frame / 30 seconds during the influent and reaction stages to capture rapidly changing processes.
[0037] The data preprocessing and feature extraction process is basically the same as in Example 1. However, for the SBR process, in the color and texture feature extraction step S125, the transparency and color features of the supernatant area (segmented during the sedimentation stage) are specifically calculated as a preliminary visual indicator of effluent water quality. When fusing multi-source data, in addition to time sequence alignment, "operation stage" is added as an important operating condition label feature, which, together with images and sensor data, constitutes the fusion feature matrix.
[0038] The training data for the digital twin assessment model needs to cover multiple complete operating cycles of the SBR station, including data under normal operating conditions and various known load shock conditions. Through learning, the model can establish normal state benchmarks for different operating stages (such as the influent period, initial reaction stage, and final reaction stage). When high-concentration wastewater enters, the influent flow rate and indirect signals from COD sensors (if any) will change first, but the model of this invention can issue early warnings through changes in visual characteristics. For example, in the early stages of an influent load shock, the model may detect subtle changes in the color and texture of sludge flocs (reflecting changes in the secretion of extracellular polymers by microorganisms), slight fluctuations in the uniformity of bubble distribution, and abnormal trends in dissolved oxygen decline. Before the online instruments for key water quality indicators (such as ammonia nitrogen and COD) significantly exceed the limits, the model can calculate the dynamic deviation. The continuous rise in [data] and the identification of an abnormal pattern of "load shock".
[0039] The tiered early warning decision-making module sets specific thresholds and response strategies for the SBR process. For identified "load shocks," even dynamic deviations... Even if the alert level is only reached, the system will still advise operators to prepare to adjust the aeration strategy for subsequent cycles or add a carbon source. If the alert level is reached, the system may recommend immediately extending the reaction time of this cycle or starting the backup aeration equipment. Alert information is pushed to the central control room of the industrial park and the mobile terminal at the wastewater treatment plant to ensure rapid response. Through the application of this embodiment, the system can effectively improve the stability of the SBR process in responding to influent fluctuations and avoid effluent exceeding standards due to load shocks.
[0040] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A method for intelligent early warning of anomalies in wastewater biochemical treatment processes based on image recognition, characterized in that, The method includes the following steps: Step S110: The online image acquisition unit deployed in the aeration tank periodically acquires raw image data of the sludge mixture and simultaneously acquires time-series sensing data from the water quality sensor array. The time-series sensing data includes at least dissolved oxygen concentration, pH value, mixed liquor suspended solids concentration, influent flow rate and temperature. Step S120: Preprocess and extract features from the original image data to generate a sequence of visual feature vectors containing floc morphological features, bubble distribution features, and color texture features; Step S130: The visual feature vector sequence is spatiotemporally aligned and fused with the time-series sensing data to construct a multi-source fusion feature matrix characterizing the multi-dimensional dynamic state of the wastewater biochemical treatment system. Step S140: Input the multi-source fusion feature matrix into the pre-trained digital twin evaluation model. The digital twin evaluation model is trained and generated based on historical normal operating condition data. It is used to calculate the dynamic deviation between the current state and the normal operating condition benchmark, and to identify specific abnormal mode types. Step S150: Based on the dynamic deviation and the abnormal mode type, generate a warning signal of the corresponding level through the hierarchical warning decision module, and push the warning signal and its associated abnormal diagnosis information to the remote operation and maintenance monitoring platform.
2. The intelligent early warning method for abnormalities in wastewater biochemical treatment processes based on image recognition according to claim 1, characterized in that, Step S120 includes the following sub-steps: Step S121: Perform grayscale conversion, histogram equalization, and Gaussian filtering noise reduction on the original image data to obtain a preprocessed image; Step S122: The preprocessed image is processed using a semantic segmentation network based on the U-Net architecture to segment the sludge floc region and the bubble region in the image. Step S123: For the segmented sludge floc region, calculate its area, perimeter, equivalent diameter, roundness, fractal dimension and standard deviation of contour curvature to form a floc morphological feature sub-vector; Step S124: For the segmented bubble regions, count the number of bubbles, average area, area distribution variance, and spatial distribution uniformity index to form a bubble distribution feature sub-vector. Step S125: In the HSV color space, calculate the mean hue, mean saturation, and luminance variance of the preprocessed image in the sludge main region, and extract the contrast, correlation, and entropy values based on the gray-level co-occurrence matrix to form a color texture feature sub-vector. Step S126: The floc morphology feature vector, bubble distribution feature vector, and color texture feature vector are concatenated to generate the visual feature vector.
3. The intelligent early warning method for abnormalities in wastewater biochemical treatment processes based on image recognition according to claim 2, characterized in that, In step S123, the fractal dimension The calculation uses the box-counting dimension method, and the formula is: , in The side length of the square box that covers the outline of the flocculent body. The minimum number of boxes required to cover the outline.
4. The intelligent early warning method for abnormalities in wastewater biochemical treatment processes based on image recognition according to claim 1, characterized in that, In step S130, the spatiotemporal alignment and fusion specifically involves: using a unified timestamp as a reference, interpolating and resampling the visual feature vector sequence and the temporal sensing data to align them at the same time series point; and concatenating the aligned visual feature vector with the sensing data vector at the corresponding time to form the multi-source fusion feature matrix.
5. The intelligent early warning method for abnormalities in wastewater biochemical treatment processes based on image recognition according to claim 1, characterized in that, In step S140, the digital twin evaluation model consists of a feature encoder, a temporal memory module, and an anomaly scorer; the feature encoder is a deep autoencoder, whose encoder part compresses the multi-source fusion feature matrix into a low-dimensional latent vector. The decoder part attempts to... Reconstructing input features; the temporal memory module is a long short-term memory network, and its input is the latent vector sequence. This is used to learn the normal evolution pattern of the system state; the anomaly scorer is based on the reconstruction error. With prediction error Calculate the dynamic deviation .
6. The intelligent early warning method for abnormalities in wastewater biochemical treatment processes based on image recognition according to claim 5, characterized in that, The dynamic deviation The calculation formula is: , in , , , These are the mean and standard deviation of the reconstruction error and prediction error calculated by the model on the validation set, respectively. and For adjustable weighting coefficients, satisfying .
7. The intelligent early warning method for abnormalities in wastewater biochemical treatment processes based on image recognition according to claim 1, characterized in that, In step S140, the abnormal pattern recognition is achieved through a support vector machine classifier. The input of the classifier is the multi-source fusion feature matrix within the time window before and after the triggering of the abnormal moment, and the output is a predefined abnormal pattern type label. The abnormal pattern types include early filamentous bulking, sludge disintegration, sludge bulking, uneven aeration, and load shock.
8. The intelligent early warning method for abnormalities in wastewater biochemical treatment processes based on image recognition according to claim 1, characterized in that, In step S150, the hierarchical early warning decision module bases its decision on the dynamic deviation. The numerical value and the type of the abnormal pattern determine the warning level into three levels: Attention, Warning, and Alarm; the Attention level corresponds to... If the anomaly pattern is between threshold 1 and threshold 2 and is of the progressive type, the warning level corresponds to... Exceeding threshold 2 or exhibiting an abnormal pattern indicating rapid deterioration, the alarm level corresponds to... If the threshold is continuously exceeded 3, the system determines that there is an immediate risk of failure.
9. An intelligent early warning system for abnormalities in wastewater biochemical treatment processes based on image recognition, characterized in that, The system includes the following components: Online image acquisition and sensing module: used to periodically acquire raw image data of sludge mixed liquor through an online image acquisition unit deployed in the aeration tank, and simultaneously acquire time-series sensing data from the water quality sensor array. The time-series sensing data includes at least dissolved oxygen concentration, pH value, mixed liquor suspended solids concentration, influent flow rate and temperature. Visual feature extraction module: used to preprocess and extract features from the original image data to generate a sequence of visual feature vectors containing floc morphological features, bubble distribution features and color texture features; Multi-source data fusion module: used to perform spatiotemporal alignment and fusion of the visual feature vector sequence and the time-series sensing data to construct a multi-source fusion feature matrix characterizing the multi-dimensional dynamic state of the wastewater biochemical treatment system; Digital twin evaluation module: used to input the multi-source fusion feature matrix into a pre-trained digital twin evaluation model, which is trained and generated based on historical normal operating condition data, and used to calculate the dynamic deviation between the current state and the normal operating condition benchmark, and identify specific abnormal mode types. The graded early warning decision and push module is used to generate early warning signals of corresponding levels based on the dynamic deviation and the abnormal mode type, and push the early warning signals and their associated abnormal diagnosis information to the remote operation and maintenance monitoring platform.
10. The intelligent early warning system for abnormal sewage biochemical treatment processes based on image recognition according to claim 9, characterized in that, The visual feature extraction module includes a preprocessing unit, a semantic segmentation unit, a floc morphology analysis unit, a bubble distribution analysis unit, a color and texture analysis unit, and a feature splicing unit. The preprocessing unit is used to perform grayscale conversion, histogram equalization, and Gaussian filtering noise reduction on the original image data; the semantic segmentation unit uses a semantic segmentation network based on the U-Net architecture to process the preprocessed image and segment out the sludge floc region and the bubble region. The floc morphology analysis unit is used to calculate the area, perimeter, equivalent diameter, roundness, fractal dimension, and standard deviation of contour curvature of the sludge floc region. The bubble distribution analysis unit is used to statistically analyze the number of bubbles, average area, area distribution variance, and spatial distribution uniformity index of the bubble region. The color texture analysis unit is used to calculate the mean hue, mean saturation, and luminance variance of the main sludge region in the HSV color space, and to extract the contrast, correlation, and entropy values based on the gray-level co-occurrence matrix. The feature splicing unit is used to splice the floc morphology feature vector, the bubble distribution feature vector, and the color texture feature vector into a visual feature vector.