An image-assisted MBR process control method and system
By installing high-definition cameras in the MBR facility and using the improved residual network ResNet+ for image recognition and analysis, intelligently adjusting the operating parameters of MBR, solving the problems of low efficiency and low accuracy in MBR process control, and achieving more efficient and accurate sewage treatment process control.
Patent Information
- Application Number
- CN202410605529.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-05-15
AI Technical Summary
There are problems of low efficiency and low accuracy in MBR process control. Traditional methods rely on sensor data, and there are problems of inaccurate data acquisition and low control accuracy.
Using an image-assisted MBR process control method, by installing a high-definition camera in the MBR facility, images of the film surface state are captured in real time, and image recognition and analysis are used by the improved residual network ResNet+, to intelligently adjust the cleaning cycle, aeration intensity and drug dosage of MBR.
Accurate control of the MBR process is achieved, treatment efficiency is improved, operational costs are reduced, and sewage treatment effect is improved through real-time monitoring and optimization of control strategies.
Smart Images

Figure CN118567311B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sewage treatment, and in particular to an image-assisted MBR (membrane bioreactor) process control method and system. Background Art
[0002] At present, with the acceleration of urbanization and the continuous growth of population, sewage treatment has become an increasingly important environmental issue. Traditional sewage treatment methods have problems such as low treatment efficiency, large footprint, and high operating costs. As a new sewage treatment technology, membrane bioreactor (MBR) has the advantages of high treatment efficiency, small footprint, and low operating costs, so it has received widespread attention.
[0003] However, the control problem in the MBR process has always been a hot topic and difficulty in research. The traditional MBR process control method mainly relies on the data collected by sensors for control, but due to the limitations of sensors and cost constraints, the traditional method has problems such as inaccurate data collection and low control accuracy.
[0004] In response to the above problems, in recent years, some researchers have begun to explore the use of image-assisted methods to improve the control accuracy and efficiency of the MBR process. By collecting image data inside the MBR system, key parameters in the sewage treatment process, such as sludge concentration, membrane pore blockage, etc., can be monitored and analyzed in real time, thereby achieving precise control of the MBR process. However, there are still some problems with the current image-assisted MBR process control method. For example, the selection and arrangement of image acquisition equipment, the optimization of image processing algorithms, and other aspects still need further research and improvement. Therefore, it is necessary to provide a new image-assisted MBR process control method and system to solve the problems existing in the prior art. Summary of the invention
[0005] The purpose of the present invention is to provide an image-assisted MBR process control method, system, device and medium, aiming to solve the problems of low efficiency and low precision in MBR process control.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] An image-assisted MBR process control method, the process control method comprising the following steps:
[0008] 1) Install high-definition cameras in MBR facilities to capture images of membrane surface conditions in real time;
[0009] 2) Process the captured images and use the improved residual network ResNet+ for image recognition. Based on the recognition results, analyze the degree of contamination on the membrane surface and the blockage of the membrane pores;
[0010] 3) Based on the analysis results, intelligently adjust the MBR cleaning cycle, aeration intensity, and dosage of reagents.
[0011] 4) According to the preset control strategy, realize the process control of automated sewage treatment; according to the real-time monitoring data, continuously optimize the control strategy;
[0012] The ResNet+ has 30 layers, including 3 residual blocks, introduces dense connections and branch structures, and designs a multi-task loss function to optimize the performance of the model. The loss function L of the ResNet+ total for:
[0013] L total =w1*L contrastive +w2*L perceptua l+w3*L edge
[0014] L contrastive =max(0,m-(y true *y pred )+(1-y true )*max(0,my pred ))
[0015] L perceptual =||P conv (y true )-P conv (y pred )|| 2
[0016] L edge =||Grad(y true )-Grad(y pred )|| 2
[0017] w1+w2+w3=1
[0018] Among them, L contrastive is the contrast loss, which is used to study the degree of contamination on the membrane surface. m is a boundary value, and y true is the true label, the value is 0 or 1, y pred is the predicted value; L perceptual is the perceptual loss used to learn the prediction of membrane pore blockage, P conv represents a pre-trained convolutional neural network; L edge is the edge loss, which is used to learn the edge information of the contamination degree of the membrane surface and the blockage of the membrane pores. Grad represents the gradient of the image; w1, w2 and w3 are the weights of the loss function.
[0019] Optionally, in step 2), the processing specifically includes:
[0020] 21) defining the size of the membrane image and adjusting the captured membrane image to a uniform size;
[0021] 22) setting a feature vector, converting the adjusted membrane image into a splicing feature vector, wherein the splicing feature includes grayscale features, texture features, ripple features, bubble distribution, color information for considering the degree of contamination of the membrane image, and porosity, flux reduction rate, and effective porosity for considering the blockage of the membrane image;
[0022] 23) Extract correlation and use Pearson correlation coefficient to calculate the correlation of features in the feature vector.
[0023] Optionally, in step 2), the design of ResNet+ is as follows:
[0024] Input layer: input membrane image
[0025] Convolutional layer 1: uses a 3x3 convolution kernel, a stride of 1, 64 output channels, and a ReLU activation function;
[0026] Branch 1: Convolution layer 2-1: uses a 1x1 convolution kernel, a step size of 1, an output channel number of 32, and an activation function of ReLU; Branch 1: Convolution layer 2-2: uses a 3x3 convolution kernel, a step size of 1, an output channel number of 64, and an activation function of ReLU; Branch 1: Convolution layer 2-3: uses a 1x1 convolution kernel, a step size of 1, an output channel number of 64, and an activation function of ReLU;
[0027] Branch 1: residual connection, specifically, concatenating the outputs of convolutional layer 2-1, convolutional layer 2-2, and convolutional layer 2-3; Branch 1: adding the result of channel concatenation to the input layer;
[0028] Branch 2: Convolution layer 3-1: uses a 1x1 convolution kernel, a step size of 1, an output channel number of 32, and an activation function of ReLU; Branch 2: Convolution layer 3-2: uses a 3x3 convolution kernel, a step size of 1, an output channel number of 64, and an activation function of ReLU; Branch 2: Convolution layer 3-3: uses a 1x1 convolution kernel, a step size of 1, an output channel number of 64, and an activation function of ReLU;
[0029] Branch 2: residual connection, specifically, concatenating the outputs of convolutional layer 3-1, convolutional layer 3-2, and convolutional layer 3-3; Branch 2: adding the result of channel concatenation to the input layer;
[0030] Branch 3: Convolution layer 4-1: uses a 1x1 convolution kernel, a step size of 1, an output channel number of 32, and an activation function of ReLU; Branch 3: Convolution layer 4-2: uses a 3x3 convolution kernel, a step size of 1, an output channel number of 64, and an activation function of ReLU; Branch 3: Convolution layer 4-3: uses a 1x1 convolution kernel, a step size of 1, an output channel number of 64, and an activation function of ReLU;
[0031] Branch 3: residual connection, specifically, concatenating the outputs of convolutional layer 4-1, convolutional layer 4-2, and convolutional layer 4-3; Branch 3: adding the result of channel concatenation to the input layer;
[0032] Connect the outputs of branch 1, branch 2 and branch 3;
[0033] Convolutional layer 5-convolutional layer 15: use 3x3 convolution kernel, stride 1, output channel number 64, activation function is ReLU;
[0034] Output layer: Use a 1x1 convolution kernel, a stride of 1, 2 output channels, and a Sigmoid activation function.
[0035] Optionally, the design of ResNet+ further includes:
[0036] The attention weight W is introduced to adaptively adjust the importance of different feature maps. The calculation formula of the attention weight W is:
[0037] W = σ(FC(ReLU(FC(X))))
[0038] Among them, X is the input feature map, FC represents the fully connected layer, ReLU represents the activation function, σ represents the normalization function, and the sigmoid function is used;
[0039] The adaptive adjustment specifically includes:
[0040] First, the input feature map X is extracted and mapped through two fully connected layers FC. Then, the mapped features are nonlinearly transformed through the ReLU activation function. Finally, the attention weight is limited to between 0 and 1 through the normalization function σ. The attention weight W is obtained, and the W is multiplied by the feature map F obtained by the convolution operation to obtain the weighted feature map Y:
[0041] Y=W*F
[0042] Among them, Y represents the weighted feature map;
[0043] According to the attention formula, the weights of the feature maps are adjusted according to the different importance of the input feature maps to meet the needs of membrane image analysis.
[0044] Optionally, the design of ResNet+ further includes:
[0045] For the three convolutional layers in each residual block, the chain rule is used to calculate the gradient; for the parameters of the convolutional layers 2-1, 2-2, and 2-3, the gradient is calculated as follows:
[0046]
[0047]
[0048]
[0049] in, represents the gradient of the loss function with respect to the output of convolutional layer 2-3, represents the gradient of the output of convolutional layer 2-3 to the output of convolutional layer 2-2, represents the gradient of the output of convolutional layer 2-2 to the parameters of convolutional layer 2-1, Represents the gradient of the convolution layer 2-2 output to the convolution layer 2-2 parameters, Represents the gradient of the convolution layer 2-3 output to the convolution layer 2-3 parameters;
[0050] Use the gradient descent method to update the parameters of the ResNet+, the formula is as follows:
[0051]
[0052]
[0053]
[0054] Among them, learning_rate represents the learning rate, which is set to 0.00001.
[0055] Optionally, in step 3), the intelligent adjustment includes:
[0056] According to the pollution degree of the membrane surface in the image analysis results, the adjustment amount of the cleaning cycle is calculated, and the cleaning cycle of the MBR is adjusted according to the adjustment amount of the cleaning cycle, so that the pollutants on the membrane surface can be cleaned timely and effectively; according to the blockage of the membrane pores in the image analysis results, the adjustment amount of the aeration intensity is calculated, and the aeration intensity of the MBR is adjusted according to the adjustment amount of the aeration intensity, so that the permeability of the membrane pores can be maintained and the oxygen transmission efficiency can be improved; according to the pollution degree of the membrane surface and the blockage of the membrane pores in the image analysis results, the adjustment amount of the reagent dosage is calculated; according to the adjustment amount of the reagent dosage, the reagent dosage of the MBR is adjusted so that it can adapt to the pollution of the membrane surface and improve the effect of sewage treatment;
[0057] The calculation formulas for the pollution degree and membrane pore blockage are:
[0058] Pollution degree = number of polluted pixels / total number of pixels
[0059] Membrane pore blockage = number of blocked pores / total number of pores
[0060] The calculation formulas for the adjustment amount of the cleaning cycle, the adjustment amount of the aeration intensity, and the adjustment amount of the reagent dosage are respectively:
[0061] Cleaning cycle adjustment amount = contamination degree * α
[0062] Aeration intensity adjustment = membrane pore blockage * γ
[0063] Adjustment amount of reagent dosage = (pollution degree + membrane pore blockage) * β
[0064] Among them, α, γ, and β are the adjustment coefficients of the cleaning cycle, the aeration intensity, and the agent dosage, respectively, and their values are all between 0.5 and 2.
[0065] The present invention also provides an image-assisted MBR process control system, the process control system comprising:
[0066] A membrane image acquisition module for capturing images of membrane surface conditions taken by a high-definition camera installed in the MBR facility in real time;
[0067] The membrane image analysis module is used to process the captured images and use the improved residual network ResNet+ for image recognition. Based on the recognition results, the contamination degree of the membrane surface and the blockage of the membrane pores are analyzed;
[0068] The operating parameter adjustment module is used to intelligently adjust the MBR cleaning cycle, aeration intensity, and reagent dosage to achieve automated sewage treatment process control.
[0069] Optionally, the control system further includes:
[0070] The early warning module is used to trigger an alarm when the parameters of the membrane exceed the set thresholds, and notify the relevant operators to handle the problem manually in time;
[0071] The data storage module is used to store the operating parameters of the facilities at each time node and store the fault processing logs.
[0072] The present invention also provides a computer device, comprising: at least one processor; and a memory, wherein the memory stores program codes executable by the processor, and when the program codes are executed by the processor, the image-assisted MBR process control method is implemented.
[0073] The present invention also provides a computer-readable storage medium, comprising: a program code executable by a processor, wherein the program code implements the image-assisted MBR process control method when executed by the processor.
[0074] The present invention has the following beneficial technical effects: The present invention provides an image-assisted MBR process control method and system. Through the application of the improved deep residual network ResNet+ and high-definition cameras, real-time monitoring and analysis of the membrane surface state are achieved, and the analysis results are applied to the adjustment of the operating parameters of the MBR, thereby achieving more accurate and automated sewage treatment process control. At the same time, dense connections and branch structures are introduced to redesign the residual network, and a specially designed multi-task loss function is used to optimize the model performance, thereby improving the accuracy of membrane state analysis. This method can be widely used in the field of sewage treatment to improve treatment efficiency, reduce operating costs, and protect the environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0076] Figure 1 A flow chart of an image-assisted MBR process control method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0077] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0078] The following describes the implementation methods of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, in the absence of conflict, the following embodiments and the features in the embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work belong to the scope of protection of the present application.
[0079] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present application, it should be understood by those skilled in the art that an aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number and aspect described herein can be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this device and / or practice this method.
[0080] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. The drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0081] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the examples can be practiced without these specific details.
[0082] The purpose of the present invention is to provide an image-assisted MBR process control method, system, device and medium, aiming to solve the problems of low efficiency and low precision in MBR process control.
[0083] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0084] Refer to Figure 1 , showing an image-assisted MBR process control method according to an embodiment of the present application, the method comprising the following steps:
[0085] 1) Install high-definition cameras in MBR facilities to capture images of membrane surface conditions in real time;
[0086] 2) Process the captured images and use the improved residual network ResNet+ for image recognition. Based on the recognition results, analyze the degree of contamination on the membrane surface and the blockage of the membrane pores;
[0087] 3) Based on the analysis results, intelligently adjust the MBR cleaning cycle, aeration intensity, and dosage of reagents;
[0088] 4) According to the preset control strategy, realize the process control of automated sewage treatment; according to the real-time monitoring data, continuously optimize the control strategy;
[0089] In an embodiment of the present application, in the step 2), the processing specifically includes:
[0090] 21) defining the size of the membrane image and adjusting the captured membrane image to a uniform size;
[0091] 22) setting a feature vector, converting the adjusted membrane image into a splicing feature vector, wherein the splicing feature includes grayscale features, texture features, ripple features, bubble distribution, color information for considering the degree of contamination of the membrane image, and porosity, flux reduction rate, and effective porosity for considering the blockage of the membrane image;
[0092] 23) Extract correlation and use Pearson correlation coefficient to calculate the correlation of features in the feature vector.
[0093] Optionally, step 21) defines the size of the membrane image and adjusts the captured membrane images to a uniform size; the specific operations include: obtaining the original size of the membrane image; setting a uniform target size; scaling or cropping the image according to the proportional relationship between the target size and the original size so that all membrane images have the same size.
[0094] Optionally, step 22) sets a feature vector to convert the adjusted membrane image into a splicing feature vector, wherein the splicing feature includes grayscale features, texture features, corrugation features, bubble distribution, color information for considering the degree of contamination of the membrane image, and porosity, flux reduction rate, and effective porosity for considering the blockage of the membrane image; specific operations include: graying the adjusted membrane image to obtain grayscale features; extracting texture features using texture analysis methods (such as local binary patterns); extracting corrugation features using image processing techniques (such as edge detection); analyzing the distribution of bubbles in the membrane image to obtain bubble distribution features; extracting color information in the membrane image; and calculating the porosity, flux reduction rate, and effective porosity of the membrane image using image processing techniques (such as image segmentation).
[0095] Optionally, step 23) extracts the correlation and calculates the correlation of the features in the feature vector using the Pearson correlation coefficient. The specific operation includes: normalizing each feature in the feature vector so that they have the same scale; calculating the Pearson correlation coefficient between each feature in the feature vector to obtain a correlation matrix.
[0096] Optionally, grayscale feature extraction method: grayscale histogram, grayscale co-occurrence matrix and other methods can be selected; texture feature extraction method: local binary pattern, grayscale co-occurrence matrix and other methods can be selected; ripple feature extraction method: edge detection algorithm can be selected, such as Sobel operator, Canny operator, etc.; bubble distribution feature extraction method: image segmentation-based methods can be selected, such as threshold segmentation-based, regional growth-based and other methods, and specific parameter values can be determined according to the size and distribution of bubbles in the image; porosity, flux reduction rate and effective porosity calculation method: an appropriate calculation method can be selected according to the shape and size of the membrane pores; Pearson correlation coefficient calculation method: the standard Pearson correlation coefficient calculation formula can be used.
[0097] In the embodiment of the present application, the ResNet+ has 30 layers, including 3 residual blocks, introduces dense connections and branch structures, and designs a multi-task loss function to optimize the performance of the model. The hierarchical structure of the ResNet+ is designed as follows:
[0098] Input layer: input membrane image
[0099] Convolutional layer 1: uses a 3x3 convolution kernel, a stride of 1, 64 output channels, and a ReLU activation function;
[0100] Branch 1: Convolution layer 2-1: uses a 1x1 convolution kernel, a step size of 1, an output channel number of 32, and an activation function of ReLU; Branch 1: Convolution layer 2-2: uses a 3x3 convolution kernel, a step size of 1, an output channel number of 64, and an activation function of ReLU; Branch 1: Convolution layer 2-3: uses a 1x1 convolution kernel, a step size of 1, an output channel number of 64, and an activation function of ReLU;
[0101] Branch 1: residual connection, specifically, concatenating the outputs of convolutional layer 2-1, convolutional layer 2-2, and convolutional layer 2-3; Branch 1: adding the result of channel concatenation to the input layer;
[0102] Branch 2: Convolution layer 3-1: uses a 1x1 convolution kernel, a step size of 1, an output channel number of 32, and an activation function of ReLU; Branch 2: Convolution layer 3-2: uses a 3x3 convolution kernel, a step size of 1, an output channel number of 64, and an activation function of ReLU; Branch 2: Convolution layer 3-3: uses a 1x1 convolution kernel, a step size of 1, an output channel number of 64, and an activation function of ReLU;
[0103] Branch 2: residual connection, specifically, concatenating the outputs of convolutional layer 3-1, convolutional layer 3-2, and convolutional layer 3-3; Branch 2: adding the result of channel concatenation to the input layer;
[0104] Branch 3: Convolution layer 4-1: uses a 1x1 convolution kernel, a step size of 1, an output channel number of 32, and an activation function of ReLU; Branch 3: Convolution layer 4-2: uses a 3x3 convolution kernel, a step size of 1, an output channel number of 64, and an activation function of ReLU; Branch 3: Convolution layer 4-3: uses a 1x1 convolution kernel, a step size of 1, an output channel number of 64, and an activation function of ReLU;
[0105] Branch 3: residual connection, specifically, concatenating the outputs of convolutional layer 4-1, convolutional layer 4-2, and convolutional layer 4-3; Branch 3: adding the result of channel concatenation to the input layer;
[0106] Connect the outputs of branch 1, branch 2 and branch 3;
[0107] Convolutional layer 5-convolutional layer 15: use 3x3 convolution kernel, stride 1, output channel number 64, activation function is ReLU;
[0108] Output layer: Use a 1x1 convolution kernel, a stride of 1, 2 output channels, and a Sigmoid activation function.
[0109] Preferably, the loss function L of the ResNet+ total for:
[0110] L total =w1*L contrastive +w2*L perceptua l+w3*L edge
[0111] L contrastive =max(0,m-(y true *y pred )+(1-y true )*max(0,my pred ))
[0112] L perceptual =||P conv (y true )-P conv (y pred )|| 2
[0113] L edge =||Grad(y true )-Grad(y pred )|| 2
[0114] w1+w2+w3=1
[0115] Among them, L contrastiveis the contrast loss, which is used to study the degree of contamination on the membrane surface. m is a boundary value, and y true is the true label, the value is 0 or 1, y pred is the predicted value; L perceptual is the perceptual loss used to learn the prediction of membrane pore blockage, P conv represents a pre-trained convolutional neural network; L edge is the edge loss, which is used to learn the edge information of the contamination degree of the membrane surface and the blockage of the membrane pores. Grad represents the gradient of the image; w1, w2 and w3 are the weights of the loss function.
[0116] Preferably, in the ResNet+ structure, we introduce dense connections and branch structures. Dense connections mean that each layer is directly connected to all previous layers, not just to the previous layer. This can increase the flow of information and improve the feature extraction ability of the network. The branch structure refers to the introduction of multiple branches in the network, each branch is responsible for learning features at different levels. This can capture features of different scales and abstract levels, thereby improving the expressiveness of the network. Specifically, we can apply dense connections and branch structures to each residual block. In each residual block, we connect the output of each sub-block with the output of all previous sub-blocks to form a dense connection. At the same time, we introduce multiple branches in each residual block, each branch is responsible for learning features at a different level. For example, assuming that each residual block contains 3 sub-blocks, we can connect the output of the first sub-block with the output of all previous sub-blocks to form a dense connection. At the same time, we introduce two branches in the first sub-block, one branch is responsible for learning low-level features, and the other branch is responsible for learning high-level features. Similarly, multiple branches are introduced in the second and third sub-blocks. Such dense connections and branching structures can increase the nonlinear ability and feature expression ability of the network, thereby improving the ability to accurately analyze membrane state images.
[0117] Preferably, the design of ResNet+ also includes:
[0118] The attention weight W is introduced to adaptively adjust the importance of different feature maps. The calculation formula of the attention weight W is:
[0119] W = σ(FC(ReLU(FC(X))))
[0120] Among them, X is the input feature map, FC represents the fully connected layer, ReLU represents the activation function, σ represents the normalization function, and the sigmoid function is used;
[0121] The adaptive adjustment specifically includes:
[0122] First, the input feature map X is extracted and mapped through two fully connected layers FC. Then, the mapped features are nonlinearly transformed through the ReLU activation function. Finally, the attention weight is limited to between 0 and 1 through the normalization function σ. The attention weight W is obtained, and the W is multiplied by the feature map F obtained by the convolution operation to obtain the weighted feature map Y:
[0123] Y=W*F
[0124] Among them, Y represents the weighted feature map;
[0125] According to the attention formula, the weights of the feature maps are adjusted according to the different importance of the input feature maps to meet the needs of membrane image analysis.
[0126] Preferably, the design of ResNet+ also includes:
[0127] For the three convolutional layers in each residual block, the chain rule is used to calculate the gradient; for the parameters of the convolutional layers 2-1, 2-2, and 2-3, the gradient is calculated as follows:
[0128]
[0129]
[0130]
[0131] in, represents the gradient of the loss function with respect to the output of convolutional layer 2-3, represents the gradient of the output of convolutional layer 2-3 to the output of convolutional layer 2-2, represents the gradient of the output of convolutional layer 2-2 to the parameters of convolutional layer 2-1, Represents the gradient of the convolution layer 2-2 output to the convolution layer 2-2 parameters, Represents the gradient of the convolution layer 2-3 output to the convolution layer 2-3 parameters;
[0132] Use the gradient descent method to update the parameters of the ResNet+, the formula is as follows:
[0133]
[0134]
[0135]
[0136] Among them, learning_rate represents the learning rate, which is set to 0.00001.
[0137] Optionally, the ResNet+ may also include a global average pooling layer for converting feature maps into a fixed-length vector representation for subsequent classification or regression tasks. The ResNet+ may also use batch normalization technology to accelerate the convergence speed of the network and improve the stability of the model. The ResNet+ may also include an adaptive learning rate adjustment mechanism to dynamically adjust the learning rate according to the change of the loss function during the training process to improve the training effect of the network. The ResNet+ exhibits higher accuracy, faster convergence speed and better generalization ability in image recognition tasks, and is particularly suitable for image analysis of membrane surface states in image-assisted MBR process control methods and systems.
[0138] In an embodiment of the present application, in step 3), the intelligent adjustment includes:
[0139] According to the pollution degree of the membrane surface in the image analysis results, the adjustment amount of the cleaning cycle is calculated, and the cleaning cycle of the MBR is adjusted according to the adjustment amount of the cleaning cycle, so that the pollutants on the membrane surface can be cleaned timely and effectively; according to the blockage of the membrane pores in the image analysis results, the adjustment amount of the aeration intensity is calculated, and the aeration intensity of the MBR is adjusted according to the adjustment amount of the aeration intensity, so that the permeability of the membrane pores can be maintained and the oxygen transmission efficiency can be improved; according to the pollution degree of the membrane surface and the blockage of the membrane pores in the image analysis results, the adjustment amount of the reagent dosage is calculated; according to the adjustment amount of the reagent dosage, the reagent dosage of the MBR is adjusted so that it can adapt to the pollution of the membrane surface and improve the effect of sewage treatment;
[0140] The calculation formulas for the pollution degree and membrane pore blockage are:
[0141] Pollution degree = number of polluted pixels / total number of pixels
[0142] Membrane pore blockage = number of blocked pores / total number of pores
[0143] The calculation formulas for the adjustment amount of the cleaning cycle, the adjustment amount of the aeration intensity, and the adjustment amount of the reagent dosage are respectively:
[0144] Cleaning cycle adjustment amount = contamination degree * α
[0145] Aeration intensity adjustment = membrane pore blockage * γ
[0146] Adjustment amount of reagent dosage = (pollution degree + membrane pore blockage) * β
[0147] Among them, α, γ, and β are the adjustment coefficients of the cleaning cycle, the aeration intensity, and the agent dosage, respectively, and their values are all between 0.5 and 2.
[0148] In the embodiment of the present application, in the step 4), the control strategy may include but is not limited to the following aspects:
[0149] Sewage treatment process parameter control: According to the adjusted operating parameters, the operation of the MBR facility is adjusted by controlling equipment (such as pumps, valves, etc.). For example, the aeration intensity and the dosage of the reagents can be adjusted according to the sewage flow and water quality.
[0150] Feedback control: The data collected by the real-time monitoring equipment is compared with the set target value, and feedback control is performed based on the difference. For example, if the sewage turbidity exceeds the set threshold, the aeration intensity or the dosage of the agent can be automatically adjusted.
[0151] Model predictive control: Based on historical data and machine learning algorithms, a model is established to predict the changing trend of the sewage treatment process and control is performed according to the predicted results. For example, the cleaning cycle or dosage of the reagent can be adjusted in advance according to the predicted sewage flow and water quality changes.
[0152] Adaptive control: Automatically adjust control strategies and parameters based on real-time monitoring data and feedback information to adapt to different operating conditions and changes in sewage load. For example, automatically adjust the cleaning cycle and aeration intensity based on real-time sewage flow and water quality.
[0153] Remote monitoring and control: Through the remote monitoring system, the operating status and data of the facilities can be monitored in real time, the control parameters can be adjusted remotely, and remote intelligent control can be achieved. For example, multiple sewage treatment facilities can be centrally monitored and controlled through a cloud platform or a remote control center.
[0154] Preferably, the preset control strategy may be:
[0155] According to the requirements and objectives of sewage treatment, preset control strategies are set, including MBR cleaning cycle, aeration intensity, agent dosage and other parameters.
[0156] Data collection and monitoring: Install sensors and monitoring equipment to collect key data in the sewage treatment process in real time, such as inlet water quality, effluent water quality, sludge concentration, oxygen concentration, etc.
[0157] Data analysis and model building: Use the collected data to conduct data analysis and build models to understand the characteristics and changing patterns of the sewage treatment process.
[0158] Control strategy optimization: According to the real-time monitoring data and the results of model analysis, the preset control strategy is optimized and adjusted. Methods such as rule-based control algorithms, model predictive control algorithms, and fuzzy control algorithms can be used.
[0159] Control equipment operation: According to the optimized control strategy, the operation of sewage treatment equipment is automatically controlled, and parameters such as MBR cleaning cycle, aeration intensity, and dosage of chemical are adjusted.
[0160] Real-time monitoring and feedback: Continuously monitor key data in the sewage treatment process, compare with the optimized control strategy, and promptly feedback real-time data to the control system.
[0161] Feedback control and optimization: Based on real-time monitoring data and feedback information, the control strategy is dynamically adjusted and optimized to achieve more accurate and efficient sewage treatment process control.
[0162] Through the above steps, automated sewage treatment process control can be achieved, and the control strategy can be continuously optimized based on real-time monitoring data to improve sewage treatment effects and energy utilization efficiency.
[0163] In one embodiment of the present application, an image-assisted MBR process control system is also provided, the control system comprising:
[0164] A membrane image acquisition module for capturing images of membrane surface conditions taken by a high-definition camera installed in the MBR facility in real time;
[0165] The membrane image analysis module is used to process the captured images and use the improved residual network ResNet+ for image recognition. Based on the recognition results, the contamination degree of the membrane surface and the blockage of the membrane pores are analyzed;
[0166] The operating parameter adjustment module is used to intelligently adjust the MBR cleaning cycle, aeration intensity, and reagent dosage to achieve automated sewage treatment process control.
[0167] Preferably, the control system further comprises:
[0168] The early warning module is used to trigger an alarm when the parameters of the membrane exceed the set thresholds, and notify the relevant operators to handle the problem manually in time;
[0169] The data storage module is used to store the operating parameters of the facilities at each time node and store the fault processing logs.
[0170] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer device, comprising: at least one processor; and a memory, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, the steps of any one of the above methods for testing database performance are performed.
[0171] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer program instructions. When the computer program instructions are executed by a processor, the steps of any one of the above management methods are performed.
[0172] Finally, it should be noted that a person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only storage memory (ROM) or a random access memory (RAM), etc. The above-mentioned computer program embodiments can achieve the same or similar effects as the corresponding above-mentioned arbitrary method embodiments.
[0173] In addition, typically, the devices and equipment disclosed in the embodiments of the present invention may be various electronic terminal devices, such as mobile phones, personal digital assistants (PDAs), tablet computers (PADs), smart TVs, etc., or large terminal devices, such as servers, etc. Therefore, the protection scope disclosed in the embodiments of the present invention should not be limited to a certain type of device or equipment. The client disclosed in the embodiments of the present invention may be applied to any of the above electronic terminal devices in the form of electronic hardware, computer software, or a combination of the two.
[0174] In addition, the method disclosed in the embodiment of the present invention can also be implemented as a computer program executed by a CPU, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the CPU, the above functions defined in the method disclosed in the embodiment of the present invention are performed.
[0175] In addition, the above method steps and system units may also be implemented using a controller and a computer-readable storage medium for storing a computer program that enables the controller to implement the above steps or unit functions.
[0176] In addition, it should be understood that the computer-readable storage medium (e.g., memory) herein can be a volatile memory or a non-volatile memory, or can include both a volatile memory and a non-volatile memory. As an example and not by way of limitation, a non-volatile memory can include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. A volatile memory can include a random access memory (RAM), which can act as an external cache memory. As an example and not by way of limitation, RAM can be obtained in a variety of forms, such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to include, but are not limited to, these and other suitable types of memory.
[0177] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.
[0178] The various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure herein may be implemented or executed using the following components designed to perform the functions herein: a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general purpose processor may be a microprocessor, but alternatively, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and / or any other such configuration.
[0179] The step of the method or algorithm described in conjunction with the disclosure here can be directly included in hardware, in a software module executed by a processor, or in a combination of the two. The software module can reside in a storage medium of any other form known in the art, such as a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or a storage medium. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium or write information to the storage medium. In an alternative, the storage medium can be integrated with the processor. The processor and the storage medium can reside in an ASIC. The ASIC can reside in a user terminal. In an alternative, the processor and the storage medium can reside in a user terminal as a discrete component.
[0180] In one or more exemplary designs, the function can be implemented in hardware, software, firmware or any combination thereof. If implemented in software, the function can be stored on a computer-readable medium or transmitted by a computer-readable medium as one or more instructions or codes. Computer-readable media include computer storage media and communication media, and the communication media include any media that helps to transfer a computer program from one location to another. The storage medium can be any available medium that can be accessed by a general or special computer. As an example and not limiting, the computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, disk storage devices or other magnetic storage devices, or any other medium that can be used to carry or store the required program code in the form of an instruction or data structure and can be accessed by a general or special computer or a general or special processor. In addition, any connection can be appropriately referred to as a computer-readable medium. For example, if a coaxial cable, optical fiber cable, twisted pair, digital subscriber line (DSL) or wireless technologies such as infrared, radio and microwaves are used to send software from a website, server or other remote source, the above-mentioned coaxial cable, optical fiber cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwaves are all included in the definition of the medium. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, Blu-ray disc, wherein disks usually reproduce data magnetically, while optical discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0181] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope disclosed in the embodiments of the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.
[0182] It should be understood that, as used herein, the singular forms "a", "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations including one or more of the associated listed items.
[0183] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0184] In this specification, the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments described later, the description is relatively simple, and the relevant parts can be referred to the partial description of the previous embodiments.
[0185] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. An image-assisted MBR process control method, characterized in that: The process control method comprises the following steps: 1) Install high-definition cameras in MBR facilities to capture images of membrane surface conditions in real time; 2) Process the captured images and use the improved residual network ResNet+ for image recognition. Based on the recognition results, analyze the degree of contamination on the membrane surface and the blockage of the membrane pores; The improved residual network ResNet+ has 30 layers, including 3 residual blocks, and introduces dense connections and branch structures. The specific design of ResNet+ is as follows: Input layer: input membrane image; Convolutional layer 1: uses a 3x3 convolution kernel, a stride of 1, 64 output channels, and a ReLU activation function; Branch 1: Convolution layer 2-1: uses a 1x1 convolution kernel, a step size of 1, an output channel number of 32, and an activation function of ReLU; Branch 1: Convolution layer 2-2: uses a 3x3 convolution kernel, a step size of 1, an output channel number of 64, and an activation function of ReLU; Branch 1: Convolution layer 2-3: uses a 1x1 convolution kernel, a step size of 1, an output channel number of 64, and an activation function of ReLU; Branch 1: residual connection, specifically, concatenating the outputs of convolutional layer 2-1, convolutional layer 2-2, and convolutional layer 2-3; Branch 1: adding the result of channel concatenation to the input layer; Branch 2: Convolution layer 3-1: uses a 1x1 convolution kernel, a step size of 1, an output channel number of 32, and an activation function of ReLU; Branch 2: Convolution layer 3-2: uses a 3x3 convolution kernel, a step size of 1, an output channel number of 64, and an activation function of ReLU; Branch 2: Convolution layer 3-3: uses a 1x1 convolution kernel, a step size of 1, an output channel number of 64, and an activation function of ReLU; Branch 2: residual connection, specifically, concatenating the outputs of convolutional layer 3-1, convolutional layer 3-2, and convolutional layer 3-3; Branch 2: adding the result of channel concatenation to the input layer; Branch 3: Convolution layer 4-1: uses a 1x1 convolution kernel, a step size of 1, an output channel number of 32, and an activation function of ReLU; Branch 3: Convolution layer 4-2: uses a 3x3 convolution kernel, a step size of 1, an output channel number of 64, and an activation function of ReLU; Branch 3: Convolution layer 4-3: uses a 1x1 convolution kernel, a step size of 1, an output channel number of 64, and an activation function of ReLU; Branch 3: residual connection, specifically, concatenating the outputs of convolutional layer 4-1, convolutional layer 4-2, and convolutional layer 4-3; Branch 3: adding the result of channel concatenation to the input layer; Connect the outputs of branch 1, branch 2 and branch 3; Convolutional layer 5-convolutional layer 15: use 3x3 convolution kernel, stride 1, output channel number 64, activation function is ReLU; Output layer: Use 1x1 convolution kernel, step size 1, output channel number 2, activation function Sigmoid; Among them, for the three convolutional layers in each residual block, the chain rule is used to calculate the gradient; for the parameters of the convolutional layers 2-1, 2-2, and 2-3, the gradient is calculated as follows: in, represents the gradient of the loss function with respect to the output of convolutional layer 2-3, represents the gradient of the output of convolutional layer 2-3 to the output of convolutional layer 2-2, represents the gradient of the output of convolutional layer 2-2 to the parameters of convolutional layer 2-1, Represents the gradient of the convolution layer 2-2 output to the convolution layer 2-2 parameters, Represents the gradient of the convolution layer 2-3 output to the convolution layer 2-3 parameters; The ResNet+ designs a multi-task loss function to optimize the performance of the model. The loss function L of the ResNet+ total for: L total =w1*L contrastive +w2*L perceptua l+w3*L edge L contrastive =max(0,m-(y true *y pred )+(1-y true )*max(0,my pred )) L perceptual =||P conv (y true )-P conv (y pred )|| 2 L edge =||Grad(and true )-Grad(and pred )|| 2 w1+w2+w3=1 Among them, L contrastive is the contrast loss, which is used to study the degree of contamination on the membrane surface. m is a boundary value, and y true is the true label, the value is 0 or 1, y pred is the predicted value; L perceptual is the perceptual loss used to learn the prediction of membrane pore blockage, P conv represents a pre-trained convolutional neural network; L edge is the edge loss, which is used to learn the edge information of the contamination degree of the membrane surface and the blockage of the membrane pores. Grad represents the gradient of the image. w1, w2 and w3 are the weights of the loss function. 3) Based on the analysis results, intelligently adjust the MBR cleaning cycle, aeration intensity, and dosage of reagents; Among them, the calculation formulas for the adjustment amount of the cleaning cycle, the adjustment amount of the aeration intensity, and the adjustment amount of the reagent dosage are: Cleaning cycle adjustment amount = contamination degree * α Aeration intensity adjustment = membrane pore blockage * γ Adjustment amount of reagent dosage = (pollution degree + membrane pore blockage) * β Among them, α, γ, and β are the adjustment coefficients of the cleaning cycle, aeration intensity, and reagent dosage, respectively, and their values are all between 0.5 and 2; 4) According to the preset control strategy, realize the process control of automated sewage treatment; according to the real-time monitoring data, continuously optimize the control strategy.
2. The image-assisted MBR process control method according to claim 1, characterized in that: In the step 2), the processing specifically includes: 21) defining the size of the membrane image and adjusting the captured membrane image to a uniform size; 22) setting a feature vector to convert the adjusted membrane image into a splicing feature vector, wherein the splicing feature includes grayscale features, texture features, ripple features, bubble distribution, color information for considering the degree of contamination of the membrane image, and porosity, flux reduction rate, and effective porosity for considering the blockage of the membrane image; 23) Extract correlation and use Pearson correlation coefficient to calculate the correlation of features in the feature vector.
3. The image-assisted MBR process control method according to claim 1 is characterized in that: The ResNet+ design also includes: The attention weight W is introduced to adaptively adjust the importance of different feature maps. The calculation formula of the attention weight W is: W = σ(FC(ReLU(FC(X)))) Among them, X is the input feature map, FC represents the fully connected layer, ReLU represents the activation function, σ represents the normalization function, and the sigmoid function is used; The adaptive adjustment specifically includes: First, the input feature map X is extracted and mapped through two fully connected layers FC. Then, the mapped features are nonlinearly transformed through the ReLU activation function. Finally, the attention weight is limited to between 0 and 1 through the normalization function σ. The attention weight W is obtained, and the W is multiplied by the feature map F obtained by the convolution operation to obtain the weighted feature map Y: Y=W*F Among them, Y represents the weighted feature map; According to the calculation formula of the attention weight W, the weight of the feature map is adjusted according to the different importance of the input feature map to meet the needs of membrane image analysis.
4. The image-assisted MBR process control method according to claim 1, characterized in that: Use the gradient descent method to update the parameters of the ResNet+, the formula is as follows: Among them, learning_rate represents the learning rate, which is set to 0.00001.
5. The image-assisted MBR process control method according to claim 1, characterized in that: In the step 3), the intelligent adjustment includes: According to the pollution degree of the membrane surface in the image analysis results, the adjustment amount of the cleaning cycle is calculated, and the cleaning cycle of the MBR is adjusted according to the adjustment amount of the cleaning cycle, so that the pollutants on the membrane surface can be cleaned timely and effectively; according to the blockage of the membrane pores in the image analysis results, the adjustment amount of the aeration intensity is calculated, and the aeration intensity of the MBR is adjusted according to the adjustment amount of the aeration intensity, so that the permeability of the membrane pores can be maintained and the oxygen transmission efficiency can be improved; according to the pollution degree of the membrane surface and the blockage of the membrane pores in the image analysis results, the adjustment amount of the reagent dosage is calculated; according to the adjustment amount of the reagent dosage, the reagent dosage of the MBR is adjusted so that it can adapt to the pollution of the membrane surface and improve the effect of sewage treatment; The calculation formulas for the pollution degree and membrane pore blockage are: Pollution degree = number of polluted pixels / total number of pixels Membrane pore blockage = number of blocked pores / total number of pores.
6. An image-assisted MBR process control system, used to implement an image-assisted MBR process control method according to any one of claims 1 to 5, characterized in that: The control system comprises: A membrane image acquisition module for capturing images of membrane surface conditions taken by a high-definition camera installed in the MBR facility in real time; The membrane image analysis module is used to process the captured images and use the improved residual network ResNet+ for image recognition. Based on the recognition results, the contamination degree of the membrane surface and the blockage of the membrane pores are analyzed; The operating parameter adjustment module is used to intelligently adjust the MBR cleaning cycle, aeration intensity, and reagent dosage to achieve automated sewage treatment process control.
7. According to claim 6, the image-assisted MBR process control system further comprises: The early warning module is used to trigger an alarm when the parameters of the membrane exceed the set thresholds, and notify the relevant operators to handle the problem manually in time; The data storage module is used to store the operating parameters of the facilities at each time node and store the fault processing logs.
8. A computer device, characterized in that: include: at least one processor; and a memory, wherein the memory stores a program code executable by a processor, and when the program code is executed by the processor, the method according to any one of claims 1 to 5 is implemented.
9. A computer-readable storage medium, characterized in that: include: A program code that can be executed by a processor, wherein when the program code is executed by the processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Water pollution judgment method and system based on image recognition
CN114792402A
Digital platform sewage aeration method, device and equipment and storage medium
CN117902745A