Methods, apparatus, equipment, storage media and products for analyzing the properties of activated sludge.

By using a multi-task deep learning framework and edge computing, the problem of high cost in activated sludge property analysis is solved, achieving low-cost, high-precision sludge property analysis, which is suitable for intelligent analysis of edge devices.

CN123066071APending Publication Date: 2026-11-10SICHUAN YOUAI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611258274.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-19
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing technologies for analyzing activated sludge properties are costly and make it difficult to comprehensively and quantitatively analyze properties such as sludge compaction, aging, denitrification, and filamentous bulking. Furthermore, they lack data processing methods that combine edge computing with cloud-based collaborative deployment.

Method used

By constructing an activated sludge property analysis model, a multi-task deep learning framework is used to extract features, perform semantic segmentation and quantitative regression on sludge-water mixture image sequences. Combined with edge device deployment and incremental learning, intelligent analysis of sludge properties is achieved.

Benefits of technology

It achieves low-cost, high-precision sludge property analysis, and can simultaneously perform quantitative index prediction and qualitative analysis. It has a wide range of applications, is easy to deploy in engineering, and reduces the dependence on high-cost testing instruments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123066071A_ABST
    Figure CN123066071A_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, equipment, storage medium, and product for analyzing the properties of activated sludge. The method includes: acquiring an image sequence of a sludge-water mixture to be tested; stitching the image sequence of the sludge-water mixture to be tested and inputting it into an activated sludge property analysis model to obtain the activated sludge property analysis results. The activated sludge property analysis model includes a time-domain feature vector extraction module, a shared backbone network, a semantic segmentation head, a qualitative trait classification head, and a quantitative index regression head. The shared backbone network is connected to the semantic segmentation head, the qualitative trait classification head, and the quantitative index regression head, respectively. The semantic segmentation head is also connected to the qualitative trait classification head and the quantitative index regression head, respectively. The qualitative trait classification head is also connected to the quantitative index regression head. The time-domain feature vector extraction module is connected to the quantitative index regression head. This application achieves qualitative and quantitative analysis of activated sludge.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of activated sludge property analysis technology, and in particular to an activated sludge property analysis method, apparatus, equipment, storage medium and product. Background Technology

[0002] In the activated sludge process, the sludge-like flocs formed by the proliferation of aerobic microorganisms are called activated sludge. It has a strong ability to adsorb and oxidize organic matter, and can decompose and remove organic pollutants in wastewater. The properties of activated sludge can be judged by both quantitative indicators and qualitative descriptions.

[0003] In related technologies, mechanical / photoelectric methods or sensor fusion + soft measurement methods can only detect a limited number of quantitative indicators such as sludge settling ratio, mixed liquor suspended solids, or sludge volume index. Furthermore, some solutions rely on online instruments or multi-sensor configurations, resulting in high equipment costs and limitations in detection accuracy and applicability. Existing visual recognition methods struggle to fully utilize detailed information from the supernatant, sludge-water interface, and settled sludge in images throughout the entire settling process, making it impossible to comprehensively qualitatively analyze sludge properties such as sludge density, aging degree, denitrification, filamentous bulking, and sludge activity. In addition, data preprocessing methods for SV30 settling image sequences remain inadequate, lacking data construction methods directly applicable to target detection, classification model training, model inference, and reinforcement learning, making it difficult to meet the application requirements of intelligent activated sludge analysis in edge computing and cloud-based collaborative deployment scenarios. Summary of the Invention

[0004] The main objective of this application is to provide a method, apparatus, equipment, storage medium, and product for analyzing the properties of activated sludge, aiming to solve the technical problem of high cost in activated sludge property analysis in related technologies.

[0005] Firstly, to achieve the above objectives, this application provides a method for analyzing the properties of activated sludge, the method comprising: Acquire an image sequence of the mud-water mixture to be detected; the image sequence of the mud-water mixture consists of multiple images continuously acquired based on a preset time interval, used to characterize the sedimentation process of the mud-water mixture; The image sequence of the sludge-water mixture to be detected is stitched together to form a time-series stitched image of the sludge-water mixture. This time-series stitched image is then input into an activated sludge morphology analysis model to obtain the activated sludge morphology analysis results. The activated sludge morphology analysis model is used for: Feature extraction processing is performed on the time-series mosaic image of the mud-water mixture to obtain a multi-scale semantic feature map, a time-domain feature vector, and a global feature vector. The global feature vector is obtained by performing global average pooling on the semantic feature map of a specified level in the multi-scale semantic feature map. The time-domain feature vector is used to characterize the sedimentation trend of the mixture. Semantic segmentation is performed based on the multi-scale semantic feature map to obtain the semantic region segmentation mask of the temporal splicing map of the mud-water mixture; Qualitative trait classification is performed based on intermediate semantic features and global feature vectors during semantic segmentation to obtain the qualitative trait types of mud-water mixtures. Based on the semantic region segmentation mask and the multi-scale semantic feature map, the region-level feature representation of each semantic region is obtained. Based on the region-level feature representation, the intermediate semantic representation in the qualitative trait classification process, and the time-domain feature vector, quantitative index regression analysis is performed to obtain the quantitative index of the mud-water mixture.

[0006] In one embodiment, the activated sludge trait analysis model includes a time-domain feature vector extraction module, a shared backbone network, a semantic segmentation head, a qualitative trait classification head, and a quantitative index regression head. The shared backbone network is connected to the semantic segmentation head, the qualitative trait classification head, and the quantitative index regression head, respectively. The semantic segmentation head is also connected to the qualitative trait classification head and the quantitative index regression head, respectively. The qualitative trait classification head is also connected to the quantitative index regression head, and the time-domain feature vector extraction module is connected to the quantitative index regression head.

[0007] In one embodiment, the time-domain feature vector extraction module is used for: From the time-series mosaic image of the mud-water mixture, the pixel grayscale values ​​of each spatial location are extracted column by column along the sedimentation direction, and combined with the time information represented by the column index, a mapping relationship between pixel grayscale and time is established. Based on the mapping relationship between pixel grayscale and time, a bi-exponential settling model is fitted to characterize the sludge interface descent curve. Based on the aforementioned biexponential sedimentation model, a time-domain feature vector is determined to characterize the sedimentation trend of the mixture; wherein, the biexponential sedimentation model is expressed as: h(t) = h0·exp( k1·t)+h1·exp( k2·t) Where h(t) is the sludge interface height at settling time t, h0 and h1 are settling amplitude coefficients, and k1 and k2 are settling rate constants.

[0008] In one embodiment, the qualitative trait classification based on intermediate semantic features and the global feature vector during semantic segmentation to obtain the qualitative trait type of the mud-water mixture includes: Obtain the intermediate semantic features generated by the semantic segmentation head during the semantic segmentation process, as well as the global feature vector output by the shared backbone network; The intermediate semantic features are concatenated and fused with the global feature vector to obtain the first fused feature vector. After the fused feature vector is mapped through a fully connected network, the multi-label prediction result is output through a Sigmoid activation layer to obtain the qualitative trait type of the mud-water mixture.

[0009] In one embodiment, the step of obtaining region-level feature representations of each semantic region based on the semantic region segmentation mask and the multi-scale semantic feature map, and performing quantitative index regression analysis based on the region-level feature representations, intermediate semantic representations in the qualitative trait classification process, and the time-domain feature vectors to obtain quantitative indicators of the mud-water mixture includes: Obtain the semantic region segmentation mask of each semantic region output by the semantic segmentation head and the multi-scale semantic feature map output by the shared backbone network; Based on the semantic region segmentation mask of each semantic region, the multi-scale semantic feature map is subjected to mask weighted pooling to obtain the region-level feature representation of each semantic region; The region-level feature representation, the intermediate semantic representation output by the classification head, and the time-domain feature vector are concatenated to obtain the second fused feature vector. The second fused feature vector is input into a fully connected network for regression analysis, and quantitative indicators of the mud-water mixture are output.

[0010] In one embodiment, the activated sludge morphology analysis model is deployed in an edge device, and the method further includes: A training sample set is constructed, which includes multiple batches of labeled training image sequences of mud-water mixtures. The labeling content includes semantic region segmentation masks for semantic segmentation head training, multi-label qualitative trait labels for qualitative trait classification head training, and measured quantitative index values ​​for quantitative index regression head training. The activated sludge morphology analysis model is jointly trained using a weighted multi-task loss function to obtain the activated sludge morphology analysis model; the weighted multi-task loss function is composed of the weighted sum of segmentation loss, classification loss and regression loss. The trained activated sludge morphology analysis model is deployed to an edge device, and the inference results of the edge device are used as incremental training samples. When the cumulative incremental training samples reach a preset batch threshold, the activated sludge morphology analysis model is incrementally fine-tuned, and the updated model is sent to the edge device.

[0011] Secondly, to achieve the above objectives, this application further provides an activated sludge property analysis device, the device comprising: The acquisition module is used to acquire an image sequence of the mud-water mixture to be detected; the image sequence of the mud-water mixture consists of multiple images continuously acquired based on a preset time interval, used to characterize the sedimentation process of the mud-water mixture; The analysis module is used to stitch the image sequence of the sludge-water mixture to be detected into a time-series mosaic image of the sludge-water mixture, and input the time-series mosaic image of the sludge-water mixture into the activated sludge morphology analysis model to obtain the activated sludge morphology analysis results; wherein, the activated sludge morphology analysis model is used for: Feature extraction processing is performed on the time-series mosaic image of the mud-water mixture to obtain a multi-scale semantic feature map, a time-domain feature vector, and a global feature vector. The global feature vector is obtained by performing global average pooling on the semantic feature map of a specified level in the multi-scale semantic feature map. The time-domain feature vector is used to characterize the sedimentation trend of the mixture. Semantic segmentation is performed based on the multi-scale semantic feature map to obtain the semantic region segmentation mask of the temporal splicing map of the mud-water mixture; Qualitative trait classification is performed based on intermediate semantic features and global feature vectors during semantic segmentation to obtain the qualitative trait types of mud-water mixtures. Based on the semantic region segmentation mask and the multi-scale semantic feature map, the region-level feature representation of each semantic region is obtained. Based on the region-level feature representation, the intermediate semantic representation in the qualitative trait classification process, and the time-domain feature vector, quantitative index regression analysis is performed to obtain the quantitative index of the mud-water mixture.

[0012] Thirdly, to achieve the above objectives, this application further provides an activated sludge property analysis device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the activated sludge property analysis method as described in any one of claims 1 to 6.

[0013] Fourthly, to achieve the above objectives, this application further provides a storage medium, characterized in that the storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium, wherein the computer program, when executed by a processor, implements the steps of the above-described activated sludge property analysis method.

[0014] Fifthly, to achieve the above objectives, this application further provides a computer program product, characterized in that the computer program product includes a computer program, which, when executed by a processor, implements the steps of the above-described activated sludge property analysis method.

[0015] One or more technical solutions proposed in this application have at least the following technical effects: This application constructs a time-series mosaic image of the entire activated sludge settling process and combines it with a multi-task joint analysis framework of shared backbone network, semantic segmentation, qualitative classification, and quantitative regression. This enables collaborative modeling of key regional information and settling time variation characteristics, including sludge supernatant, sludge-water interface, and settled sludge. It can simultaneously predict quantitative indicators such as sludge settling ratio and sludge volume index, and also achieve intelligent qualitative analysis of various sludge properties such as sludge density, aging degree, denitrification, filamentous bulking, and sludge activity, improving the accuracy and comprehensiveness of activated sludge property analysis. Furthermore, by introducing a bi-exponential settling model to extract time-domain features and fusing regional features with global semantic features for regression analysis, the application further enhances the characterization ability of the dynamic sludge settling process and improves the accuracy of quantitative indicator prediction. In addition, by combining edge device deployment and incremental learning mechanisms, the application can continuously utilize on-site inference data to optimize model performance, reducing reliance on high-cost online monitoring instruments and multi-sensor systems. This approach offers advantages such as low equipment cost, wide applicability, high analysis efficiency, and ease of engineering deployment. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a schematic flowchart of the activated sludge property analysis method in the embodiments of this application.

[0019] Figure 2 This is a schematic diagram of the hardware acquisition section.

[0020] Figure 3 This is a schematic diagram of image sequence stitching.

[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0023] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0024] The main solution of this application embodiment is as follows: by acquiring image sequences of the activated sludge settling process and constructing a time-series mosaic map, a multi-task deep learning model integrating time-domain feature extraction, semantic segmentation, qualitative classification, and quantitative regression is used to jointly analyze the entire sludge settling process. Specifically, by extracting dynamic settling features, multi-scale semantic features, and regional features, accurate identification of key areas such as sludge supernatant, sludge-water interface, and settled sludge is achieved. Simultaneously, quantitative indicators such as sludge settling ratio and sludge volume index are predicted, as well as qualitative traits such as sludge density, aging degree, denitrification, filamentous bulking, and sludge activity are identified. Furthermore, by combining edge deployment and incremental learning mechanisms, the model performance is continuously optimized, achieving low-cost, high-precision, and intelligent analysis of activated sludge properties.

[0025] Specifically, this application provides a method for analyzing the properties of activated sludge, referring to... Figure 1 , Figure 1 This is a schematic flowchart of the first embodiment of the activated sludge property analysis method of this application.

[0026] In this embodiment, the activated sludge property analysis method includes steps S10 to S20: Step S10: Obtain the image sequence of the mud-water mixture to be detected; the image sequence of the mud-water mixture consists of multiple images continuously acquired based on a preset time interval to characterize the sedimentation process of the mud-water mixture.

[0027] Step S20: The image sequence of the sludge-water mixture to be detected is stitched together into a time-series stitched image of the sludge-water mixture. The time-series stitched image of the sludge-water mixture is then input into the activated sludge morphology analysis model to obtain the activated sludge morphology analysis results. The activated sludge morphology analysis model is used for: Feature extraction processing is performed on the time-series mosaic image of the mud-water mixture to obtain multi-scale semantic feature maps, time-domain feature vectors, and global feature vectors. The global feature vectors are obtained by global average pooling of the semantic feature maps at specified levels in the multi-scale semantic feature maps. The time-domain feature vectors are used to characterize the sedimentation trend of the mixture.

[0028] Semantic segmentation is performed based on multi-scale semantic feature maps to obtain the semantic region segmentation mask of the temporal splicing image of mud-water mixture.

[0029] Qualitative trait classification is performed based on intermediate semantic features and global feature vectors during semantic segmentation to obtain the qualitative trait types of mud-water mixtures.

[0030] Based on semantic region segmentation masks and multi-scale semantic feature maps, regional feature representations of each semantic region are obtained. Based on regional feature representations, intermediate semantic representations in the qualitative trait classification process, and time-domain feature vectors, quantitative index regression analysis is performed to obtain quantitative indicators of mud-water mixtures.

[0031] In one feasible implementation, step S10 includes steps A10 to A30: Step A10: Perform image brightness detection on each mud-water mixture image and perform brightness correction processing on images with abnormal brightness.

[0032] Step A20: After cropping each mud-water mixture image according to a preset standard, stitch them together in the order of acquisition time to form a mud-water mixture time-series mosaic image.

[0033] Step A30: Input the time-series mosaic diagram of the sludge-water mixture into the activated sludge morphology analysis model.

[0034] The activated sludge trait analysis model includes a time-domain feature vector extraction module, a shared backbone network, a semantic segmentation head, a qualitative trait classification head, and a quantitative index regression head. The shared backbone network is connected to the semantic segmentation head, the qualitative trait classification head, and the quantitative index regression head, respectively. The semantic segmentation head is also connected to the qualitative trait classification head and the quantitative index regression head, respectively. The qualitative trait classification head is also connected to the quantitative index regression head. The time-domain feature vector extraction module is connected to the quantitative index regression head.

[0035] The time-domain feature vector extraction module is used for: From the time-series mosaic image of mud-water mixture, the pixel grayscale values ​​of each spatial location are extracted column by column along the sedimentation direction, and the mapping relationship between pixel grayscale and time is established by combining the time information represented by the column index. Based on the mapping relationship between pixel grayscale and time, a bi-exponential settling model is fitted to characterize the sludge interface descent curve. Based on the biexponential sedimentation model, a time-domain feature vector is determined to characterize the sedimentation trend of the mixture; wherein, the biexponential sedimentation model is expressed as: h(t) = h0·exp( k1·t)+h1·exp( k2·t) Where h(t) is the sludge interface height at settling time t, h0 and h1 are settling amplitude coefficients, and k1 and k2 are settling rate constants.

[0036] Qualitative trait classification is performed based on intermediate semantic features and global feature vectors obtained during semantic segmentation. The qualitative trait types of mud-water mixtures include: Obtain the intermediate semantic features generated by the semantic segmentation head during the semantic segmentation process, as well as the global feature vector output by the shared backbone network; The intermediate semantic features are concatenated and fused with the global feature vector to obtain the first fused feature vector; After the fused feature vectors are mapped through a fully connected network, the multi-label prediction results are output through a Sigmoid activation layer to obtain the qualitative trait type of the mud-water mixture.

[0037] Based on semantic region segmentation masks and multi-scale semantic feature maps, region-level feature representations of each semantic region are obtained. Then, based on these region-level feature representations, intermediate semantic representations from the qualitative trait classification process, and time-domain feature vectors, quantitative index regression analysis is performed to obtain the following quantitative indicators for mud-water mixtures: Obtain the semantic region segmentation masks of each semantic region output by the semantic segmentation head and the multi-scale semantic feature maps output by the shared backbone network; Based on the semantic region segmentation mask of each semantic region, mask weighted pooling is performed on the multi-scale semantic feature map to obtain the region-level feature representation of each semantic region; The second fused feature vector is obtained by concatenating the regional feature representation with the intermediate semantic representation output by the classification head and the temporal feature vector. The second fusion feature vector is input into a fully connected network for regression analysis, and quantitative indicators of the mud-water mixture are output.

[0038] The method of deploying activated sludge morphology analysis models in edge devices also includes: A training sample set is constructed, which includes multiple batches of labeled training image sequences of mud-water mixtures. The labeling content includes semantic region segmentation masks for semantic segmentation head training, multi-label qualitative trait labels for qualitative trait classification head training, and measured quantitative index values ​​for quantitative index regression head training. A weighted multi-task loss function was used to jointly train the activated sludge morphology analysis model to obtain the activated sludge morphology analysis model; the weighted multi-task loss function is composed of the weighted sum of segmentation loss, classification loss and regression loss. The trained activated sludge morphology analysis model is deployed to edge devices, and the inference results of the edge devices are used as incremental training samples. When the cumulative incremental training samples reach the preset batch threshold, the activated sludge morphology analysis model is incrementally fine-tuned, and the updated model is sent to the edge devices.

[0039] For example, this embodiment provides an activated sludge property analysis system, which includes a hardware acquisition section and a software analysis section. A schematic diagram of the hardware acquisition section is shown below. Figure 2 As shown, the equipment is installed inside the enclosure, which is divided into two areas, A and B. Area A has a power interface and a network port on the outside of the enclosure, while area B has a flushing fluid inlet, a mud-water mixture inlet, an overflow outlet, and a drain outlet on the outside of the enclosure. Areas A and B are connected by a partition, which serves to separate wet and dry areas and act as a light shield.

[0040] Area B includes SV. 30 Transparent containers, lighting for illumination, valves and corresponding fittings for water inlet, rinsing, drainage and overflow, and the corresponding valves can be electrically controlled to open and close.

[0041] Area A contains industrial cameras, edge computing devices, power supplies, and cooling fans, enabling automatic and repeated data acquisition and processing of image sequences, and connecting to cloud services via network ports.

[0042] The entire system can be divided into three parts according to its functions: sludge circulation acquisition equipment, continuous image acquisition equipment, and edge computing equipment. All equipment is installed and fixed in a box, which provides fixed structural support and power supply.

[0043] Sludge recycling collection equipment includes SV 30 The container and circulating electrical control facilities enable sludge recycling and facility cleaning.

[0044] SV 30 The container, equivalent to a 1000ml graduated cylinder, is vertically fixed to the box. It has a water inlet at the top, connected to a three-way valve. One end of the three-way valve is connected to the mud-water mixture inlet, and the other end to the rinsing fluid inlet. An overflow port and overflow valve are located at the 1000ml mark, and a drain port and drain valve are located at the bottom. The circulating electrical control system receives instructions from the edge computing device to control the water inlet three-way valve, overflow valve, and drain valve.

[0045] The continuous image acquisition equipment includes an industrial camera and lens, lighting facilities, to continuously acquire stable sludge settling sequence images, and transmit them to edge computing devices via Ethernet or USB ports.

[0046] The selection of industrial cameras and lenses should not only consider the measurement of SV. 30 The requirements also necessitate sufficient resolution to distinguish details such as floc size, shape (e.g., regularity, compactness), edge sharpness, and filamentous abundance. Simultaneously, the small box size must be kept to a minimum. Therefore, a 12-megapixel industrial camera was chosen, paired with a working distance of 60cm and a vertical field of view covering SV... 30The container's 12-megapixel short-focal-length wide-angle lens is sufficient to distinguish flocculent properties as small as 0.05mm. The industrial camera connects to edge computing devices via Ethernet or USB interfaces.

[0047] Lighting installation at SV 30 The top of the container features a ring-shaped light source to illuminate the SV within the enclosed enclosure. 30 The container provides a stable light source, and the lighting control is connected to the edge computing device.

[0048] Edge computing devices possess communication, storage, and computing capabilities. Their interfaces support fieldbus control protocols such as AI / AO / DI / DO and Modbus. Running on these devices are circulation control and data processing components. Functions include: circulating control of sludge collection and cleaning, image sequence acquisition, image sequence preprocessing, inference using local models, feeding the inference results back to the cloud, and downloading updated models from the cloud. The circulation control component controls the valves of the sludge circulation acquisition module, as well as the camera and lighting of the continuous image acquisition module, enabling SV (Search Engine Response) to be executed at fixed intervals. 30 The tasks include container acquisition, cleaning, and image sequence acquisition. The data processing component processes each batch of image sequences, stitches them together into preprocessed data, and inputs it into the image detection and classification model. The model completes inference to obtain quantitative and qualitative results, which are sent to the cloud via the information transmission component. Wastewater treatment technicians remotely confirm the model's inference results, update the model parameters through reinforcement learning, and download the data to edge computing devices.

[0049] The software analysis component consists of two parts: a loop control component and a data processing component. The loop control component is used to control the SV (Synchronous Streaming) module. 30 The container and camera perform loop image sampling, with each sampling loop outputting a series of raw data images, which are then transmitted to the data processing component. The loop control component is specifically used for... Cleaning SV 30 Container, open SV 30 Container overflow valve and drain valve, controlling SV 30 Connect the cleaning fluid to the three-way valve, clean for 10 seconds, then sequentially close the SV valve. 30 Three-way valve, SV 30 Container overflow valve, close SV after 5 seconds 30 Drain valve.

[0050] Collect mud-water mixture and open SV in sequence 30 Relief valve, close SV 30 Drain valve, controlling SV 30 Connect the three-way valve to the mud-water mixture, wait 10 seconds, until SV 30 The container is filled with a mud-water mixture and begins to flow from SV. 30 The overflow valve is overflowing.

[0051] Start image acquisition and control SV 30 When the three-way valve is closed, the lights are turned on, and the industrial camera is controlled to capture one image every minute and transmit it to the data processing component.

[0052] The filename is the timestamp of the current sampling sequence; for example, 05.jpg represents the image data at the 5th minute. After the data acquisition is complete, the next loop will start according to the set time.

[0053] The data processing component adopts a reinforcement learning architecture. The image sequence is first preprocessed and then provided to the model for target recognition and classification. The output results are fed back to the cloud along with the original data. After being corrected by sewage treatment technicians, training data is generated to train the model through reinforcement learning and update the model to edge computing devices.

[0054] Because the images were acquired in a sealed chamber under fixed positions, fields of view, and lighting conditions, images with an average brightness below 50 or above 200 were marked as abnormal, triggering a re-acquisition mechanism. The image sequence was then centered and cropped along the vertical center line of the graduated cylinder container, preserving sufficient details of activated sludge settling. Finally, the images were horizontally laid out in chronological order and stitched together into a single image. The centered cropping and stitching method is as follows: Figure 3 As shown.

[0055] Based on the temporal stitching graph, three types of input features are constructed: Spatial domain features: Extract the location contours (semantic segmentation) of the supernatant region, mud-water interface region, and settled sludge region from the temporal mosaic map. In addition, there are 48 spatial feature vectors for each region, including texture (Gray-Level Co-occurrence Matrix (GLCM) statistics), color (HSV space mean and variance), and geometry (area proportion, outline perimeter and roundness).

[0056] Temporal features: Pixel grayscale-time profiles were extracted column by column along the settling direction from the time-series mosaic image. The sludge interface descent curve was constructed, and a bi-exponential settling model was fitted to extract the settling height, settling rate, settling acceleration, and interface clarity change trends at each time point, resulting in a total of 16-dimensional temporal feature vectors.

[0057] Hybrid spatiotemporal features: The temporal stitched image is input into a lightweight convolutional backbone network for one forward inference. The 128-dimensional embedding vector after global average pooling of the final feature mapping layer is taken as the hybrid spatiotemporal feature representation. This feature is automatically learned through end-to-end training to learn the spatiotemporal expression most relevant to quantitative / qualitative analysis tasks.

[0058] The above three types of features (48-dimensional space + 16-dimensional time + 128-dimensional embedding = 192-dimensional) together constitute the multi-dimensional feature input space of the model, avoiding the complexity of building independent feature processing pipelines for different inputs in traditional schemes.

[0059] This example employs a compact model architecture of "shared backbone + multi-task head," enabling the output of all quantitative and qualitative results in a single inference iteration on an edge computing device. The key advantages of this architecture are: the segmentation head, classification head, and regression head share the same convolutional backbone network, resulting in high feature reuse and a total parameter count kept below 5MB, making it suitable for edge deployment. The overall model structure is as follows: Shared backbone network: MobileNetV3-Small is used as the feature extraction backbone. Its depthwise separable convolutional design takes into account both the computing power constraints and feature representation capabilities of edge devices. After inputting the temporal stitched image, multi-scale features are extracted step by step through multiple bottleneck layers, and the output feature map is obtained by global average pooling to obtain a multi-dimensional global feature vector.

[0060] Semantic segmentation head (lightweight U-Net structure): Following the skip connections of the backbone network, it performs pixel-by-pixel three-class classification (supernatant / mud-water interface / sedimented sludge) segmentation on the input image. The segmentation result is used to accurately locate the boundaries of the three regions and to provide regional morphological basis for subsequent qualitative analysis. For example, microscopic features such as floc size, shape regularity, and edge clarity can be calculated from the segmentation mask.

[0061] Qualitative trait classification head: The intermediate feature map of the segmentation head is concatenated and fused with the multi-dimensional global feature vector of the backbone network after global average pooling. After passing through two fully connected layers, a sigmoid multi-label output layer is used to predict a total of 18 qualitative trait labels, specifically: 5 categories of supernatant characteristics (clear, slightly turbid, turbid, with bubbles / scum, abnormal color), 6 categories of mud-water interface characteristics (clear, blurry, jagged, with interlayers, interface rising, interface falling), 6 categories of settled sludge characteristics (dense, loose, flocculent, granular, brown, black), and 4 categories of abnormal states (sludge bulking, sludge disintegration, sludge floating, excessive foam).

[0062] Quantitative index regression head: The three-region masks output by the segmentation head are respectively masked and weighted pooled with the backbone feature map to obtain independent feature vectors for the three regions. These vectors are concatenated with the hidden layer vectors and temporal feature vectors of the classification head and input into a two-layer fully connected network to directly regress the MLSS value (mg / L) and SV30 value (%). The SVI value (mL / g) is then calculated from SV30 / MLSS. Here, a "segmentation-assisted encoding" strategy is adopted—using the segmentation mask to guide the regression network to focus on the visual distribution characteristics of different sludge layers, so that quantitative regression and semantic segmentation form a positive feedback loop. The more accurate the segmentation, the more focused the quantitative feature extraction is on the correct physical region. The gradient signal of quantitative regression, in turn, strengthens the segmentation head's ability to identify region boundaries. The two tasks mutually benefit each other in joint training.

[0063] Model training was conducted in the cloud. First, at least 500 batches of SV30 image sequences (30 images per batch, totaling 15,000 images) were collected. Experienced wastewater treatment technicians annotated each image sequence, including the following: Pixel-by-pixel mapping of three regions: supernatant, mud-water interface, and settled sludge (used for segmentation head training). Label 18 qualitative traits in batches (for training the classification head); The MLSS values ​​(gravimetric method, GB 11901-89) and SV30 values ​​(measuring cylinder method) measured by the laboratory standard method were recorded batch by batch for regression head training.

[0064] Joint training is performed using a weighted multi-task loss function: L_total = λ 1L_dice + λ 2L_bce + λ 3L_huber in λ 1 = 1.0 λ 2 = 0.8 λ =3=0.5, with Dice Loss (L_dice) as the primary driver to ensure basic segmentation quality, and Huber Loss (L_huber) offering better robustness to occasional outlier labels in regression tasks. The AdamW optimizer is used (initial learning rate 1×10⁻⁶). -3 Cosine annealing adjusted to 1×10 -5 With a batch size of 16, training for 200 rounds leads to convergence of multi-task loss.

[0065] To address the challenges of actual activated sludge operation, such as fluctuations in light intensity, changes in water quality, and a wide range of sludge concentrations (MLSS 1,000–8,000 mg / L), a specialized sludge image enhancement strategy was designed: Luminous enhancement: Random brightness (±20%), contrast (±15%), gamma correction, simulating day and night illumination decay and lamp aging; Geometric enhancements: Random horizontal flipping, random cropping and scaling to a fixed size; Sludge-specific enhancement: Morphological expansion / corrosion transformation (kernel size 3-7 pixels, randomly selected for expansion or corrosion) is performed on the settled sludge region based on segmentation mask to simulate the visual difference in floc density under different MLSS concentrations; Gaussian noise (σ∈[5, 25]) is superimposed on the supernatant region to simulate different turbidity levels.

[0066] In each round of training, 2-3 combinations of enhancement strategies are randomly selected from the pool to ensure the model's generalization ability for different working conditions.

[0067] After the edge computing equipment is put into operation on-site, each batch of newly acquired image sequences is used for quantitative and qualitative inference through a local model, and then uploaded to the cloud along with the original image sequences. Wastewater treatment technicians review and correct the inference results through a cloud-based human feedback interface, generating new labeled training samples. When the cloud accumulates 50 batches of new samples, incremental fine-tuning is performed on the existing model (the learning rate is reduced to 1×10⁻⁶). -4 Only the parameters of the classification and regression heads are updated, the first 10 layers of the backbone network are frozen, and fine-tuning is performed for 10 rounds. After the updated model passes offline validation, it is deployed to edge devices, forming a closed-loop continuous learning mechanism of "collection → inference → feedback → update → re-collection". This mechanism ensures that the model can adapt to the drift of activated sludge characteristics (concept drift) under different wastewater treatment plants, different seasons, and different water quality conditions, without the need for regular manual correction.

[0068] Understandably, during this process: The segmentation-assisted coding strategy allows quantitative regression accuracy to directly benefit from the improvement in semantic segmentation accuracy, while segmentation accuracy in turn benefits from the joint optimization of the weighted multi-task loss function. The two tasks form a positive feedback loop. Experimental results show that the root mean square error (RMSE) of MLSS trained by joint training is reduced by 20% compared with independent training. The multi-label sigmoid classification design enables the model to output multiple coexisting characteristics of the same batch of sludge simultaneously (such as "sludge bulking" and "excessive foam" can be alarmed at the same time), avoiding the mutual exclusion defect of traditional Softmax single-label classification. The temporal stitched image carries all the visual information of the entire 30-minute settling process in a single composite image, avoiding the computational overhead of LSTM / Transformer and other temporal models that process 30 frames one by one, so that the model can perform a single inference in less than 2 seconds on a typical edge computing device (computing power ≤ 1 TFLOPS, such as Jetson Nano). The online reinforcement learning closed-loop mechanism enables the system to continuously adapt without shutdown after it is put into operation, solving the concept drift problem caused by seasonal changes in activated sludge properties, fluctuations in influent water quality, and adjustments in process parameters, thus ensuring the reliability and accuracy of long-term operation.

[0069] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the activated sludge morphology analysis method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0070] This application also provides an activated sludge property analysis device, which includes: The acquisition module is used to acquire the image sequence of the mud-water mixture to be detected; the mud-water mixture image sequence consists of multiple images continuously acquired based on a preset time interval to characterize the sedimentation process of the mud-water mixture; The analysis module is used to stitch together the image sequence of the sludge-water mixture to be detected into a time-series mosaic image of the sludge-water mixture, and input the time-series mosaic image of the sludge-water mixture into the activated sludge morphology analysis model to obtain the activated sludge morphology analysis results; wherein, the activated sludge morphology analysis model is used for: Feature extraction is performed on the time-series mosaic image of the mud-water mixture to obtain multi-scale semantic feature maps, time-domain feature vectors, and global feature vectors. The global feature vectors are obtained by global average pooling of the semantic feature maps at specified levels in the multi-scale semantic feature maps. The time-domain feature vectors are used to characterize the sedimentation trend of the mixture. Semantic segmentation is performed based on multi-scale semantic feature maps to obtain the semantic region segmentation mask of the temporal splicing image of mud-water mixture; Qualitative trait classification is performed based on intermediate semantic features and global feature vectors during semantic segmentation to obtain the qualitative trait types of mud-water mixtures; Based on semantic region segmentation masks and multi-scale semantic feature maps, regional feature representations of each semantic region are obtained. Based on regional feature representations, intermediate semantic representations in the qualitative trait classification process, and time-domain feature vectors, quantitative index regression analysis is performed to obtain quantitative indicators of mud-water mixtures.

[0071] The activated sludge property analysis device provided in this application, employing the activated sludge property analysis method described in the above embodiments, can solve the technical problem that related technologies cannot be dynamically adjusted according to each student's knowledge mastery. Compared with related technologies, the beneficial effects of the activated sludge property analysis device provided in this application are the same as those of the activated sludge property analysis method provided in the above embodiments, and other technical features in the activated sludge property analysis device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0072] This application provides an activated sludge morphology analysis device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the activated sludge morphology analysis method in the above embodiments.

[0073] The activated sludge morphology analysis device provided in this application, employing the activated sludge morphology analysis method described in the above embodiments, can solve the technical problems existing in related technologies. Compared with related technologies, the beneficial effects of the activated sludge morphology analysis device provided in this application are the same as the beneficial effects of the activated sludge morphology analysis method provided in the above embodiments, and other technical features in this activated sludge morphology analysis device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0074] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

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

[0076] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the activated sludge property analysis method in the above embodiments.

[0077] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described activated sludge morphology analysis method. This solves the technical problem that related technologies cannot dynamically adjust based on each student's knowledge level. Compared with related technologies, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the activated sludge morphology analysis method provided in the above embodiments, and will not be elaborated upon here.

[0078] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the activated sludge property analysis method as described above.

[0079] The computer program product provided in this application can solve the technical problem that related technologies cannot be dynamically adjusted according to each student's knowledge mastery. Compared with related technologies, the beneficial effects of the computer program product provided in this application are the same as those of the activated sludge property analysis method provided in the above embodiments, and will not be repeated here.

[0080] The above are only some embodiments of this application and do not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for analyzing the properties of activated sludge, characterized in that, The method includes: Acquire an image sequence of the mud-water mixture to be detected; the image sequence of the mud-water mixture consists of multiple images continuously acquired based on a preset time interval, used to characterize the sedimentation process of the mud-water mixture; The image sequence of the sludge-water mixture to be detected is stitched together to form a time-series stitched image of the sludge-water mixture. This time-series stitched image is then input into an activated sludge morphology analysis model to obtain the activated sludge morphology analysis results. The activated sludge morphology analysis model is used for: Feature extraction processing is performed on the time-series mosaic image of the mud-water mixture to obtain a multi-scale semantic feature map, a time-domain feature vector, and a global feature vector. The global feature vector is obtained by performing global average pooling on the semantic feature map of a specified level in the multi-scale semantic feature map. The time-domain feature vector is used to characterize the sedimentation trend of the mixture. Semantic segmentation is performed based on the multi-scale semantic feature map to obtain the semantic region segmentation mask of the temporal stitched image of the mud-water mixture; Qualitative trait classification is performed based on intermediate semantic features and global feature vectors during semantic segmentation to obtain the qualitative trait types of mud-water mixtures. Based on the semantic region segmentation mask and the multi-scale semantic feature map, the region-level feature representation of each semantic region is obtained. Based on the region-level feature representation, the intermediate semantic representation in the qualitative trait classification process, and the time-domain feature vector, quantitative index regression analysis is performed to obtain the quantitative index of the mud-water mixture.

2. The activated sludge property analysis method as described in claim 1, characterized in that, The activated sludge trait analysis model includes a time-domain feature vector extraction module, a shared backbone network, a semantic segmentation head, a qualitative trait classification head, and a quantitative index regression head. The shared backbone network is connected to the semantic segmentation head, the qualitative trait classification head, and the quantitative index regression head, respectively. The semantic segmentation head is also connected to the qualitative trait classification head and the quantitative index regression head, respectively. The qualitative trait classification head is also connected to the quantitative index regression head, and the time-domain feature vector extraction module is connected to the quantitative index regression head.

3. The activated sludge property analysis method as described in claim 2, characterized in that, The time-domain feature vector extraction module is used for: From the time-series mosaic image of the mud-water mixture, the pixel grayscale values ​​of each spatial location are extracted column by column along the sedimentation direction, and combined with the time information represented by the column index, a mapping relationship between pixel grayscale and time is established. Based on the mapping relationship between pixel grayscale and time, a bi-exponential settling model is fitted to characterize the sludge interface descent curve. Based on the aforementioned biexponential sedimentation model, a time-domain feature vector is determined to characterize the sedimentation trend of the mixture; wherein, the biexponential sedimentation model is expressed as: h(t)=h0·exp( k1·t)+h1·exp( k2·t) Where h(t) is the sludge interface height at settling time t, h0 and h1 are settling amplitude coefficients, and k1 and k2 are settling rate constants.

4. The activated sludge property analysis method as described in claim 3, characterized in that, The qualitative trait classification based on intermediate semantic features and global feature vectors during semantic segmentation, to obtain the qualitative trait types of mud-water mixtures, includes: Obtain the intermediate semantic features generated by the semantic segmentation head during the semantic segmentation process, as well as the global feature vector output by the shared backbone network; The intermediate semantic features are concatenated and fused with the global feature vector to obtain the first fused feature vector. After the fused feature vector is mapped through a fully connected network, the multi-label prediction result is output through a Sigmoid activation layer to obtain the qualitative trait type of the mud-water mixture.

5. The activated sludge property analysis method as described in claim 4, characterized in that, The method involves obtaining region-level feature representations of each semantic region based on the semantic region segmentation mask and the multi-scale semantic feature map, and then performing quantitative index regression analysis based on the region-level feature representations, intermediate semantic representations in the qualitative trait classification process, and the time-domain feature vectors to obtain quantitative indicators for the mud-water mixture, including: Obtain the semantic region segmentation mask of each semantic region output by the semantic segmentation head and the multi-scale semantic feature map output by the shared backbone network; Based on the semantic region segmentation mask of each semantic region, the multi-scale semantic feature map is subjected to mask weighted pooling to obtain the region-level feature representation of each semantic region; The region-level feature representation, the intermediate semantic representation output by the classification head, and the time-domain feature vector are concatenated to obtain the second fused feature vector. The second fused feature vector is input into a fully connected network for regression analysis, and quantitative indicators of the mud-water mixture are output.

6. The activated sludge property analysis method as described in claim 5, characterized in that, The activated sludge property analysis model is deployed on an edge device, and the method further includes: A training sample set is constructed, which includes multiple batches of labeled training image sequences of mud-water mixtures. The labeling content includes semantic region segmentation masks for semantic segmentation head training, multi-label qualitative trait labels for qualitative trait classification head training, and measured quantitative index values ​​for quantitative index regression head training. The activated sludge morphology analysis model is jointly trained using a weighted multi-task loss function to obtain the activated sludge morphology analysis model; the weighted multi-task loss function is composed of the weighted sum of segmentation loss, classification loss and regression loss. The trained activated sludge morphology analysis model is deployed to an edge device, and the inference results of the edge device are used as incremental training samples. When the cumulative incremental training samples reach a preset batch threshold, the activated sludge morphology analysis model is incrementally fine-tuned, and the updated model is sent to the edge device.

7. An activated sludge property analysis device, characterized in that, The device includes: The acquisition module is used to acquire an image sequence of the mud-water mixture to be detected; the image sequence of the mud-water mixture consists of multiple images continuously acquired based on a preset time interval, used to characterize the sedimentation process of the mud-water mixture; The analysis module is used to stitch the image sequence of the sludge-water mixture to be detected into a time-series mosaic image of the sludge-water mixture, and input the time-series mosaic image of the sludge-water mixture into the activated sludge morphology analysis model to obtain the activated sludge morphology analysis results; wherein, the activated sludge morphology analysis model is used for: Feature extraction processing is performed on the time-series mosaic image of the mud-water mixture to obtain a multi-scale semantic feature map, a time-domain feature vector, and a global feature vector. The global feature vector is obtained by performing global average pooling on the semantic feature map of a specified level in the multi-scale semantic feature map. The time-domain feature vector is used to characterize the sedimentation trend of the mixture. Semantic segmentation is performed based on the multi-scale semantic feature map to obtain the semantic region segmentation mask of the temporal stitched image of the mud-water mixture; Qualitative trait classification is performed based on intermediate semantic features and global feature vectors during semantic segmentation to obtain the qualitative trait types of mud-water mixtures. Based on the semantic region segmentation mask and the multi-scale semantic feature map, the region-level feature representation of each semantic region is obtained. Based on the region-level feature representation, the intermediate semantic representation in the qualitative trait classification process, and the time-domain feature vector, quantitative index regression analysis is performed to obtain the quantitative index of the mud-water mixture.

8. An activated sludge property analysis device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the activated sludge morphology analysis method as described in any one of claims 1 to 6.

9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the activated sludge property analysis method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the activated sludge property analysis method as described in any one of claims 1 to 6.