A membrane clean dynamic monitoring method and system
By employing high-resolution image capture and image processing technologies, combined with brightness, color, and spectral analysis, the subjective nature of MBR membrane fouling monitoring and the challenges of identifying membrane pore blockage were resolved, thereby improving the stability and economy of the MBR system.
Patent Information
- Application Number
- CN202410568730.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-06
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-05-06
AI Technical Summary
In existing MBR technology, membrane fouling monitoring relies on manual judgment, which is highly subjective and cannot effectively identify blockages inside membrane pores, leading to increased operating efficiency and costs.
High-resolution image capture technology, combined with image processing algorithms, is used to analyze membrane surface and pore contamination through brightness and color weight maps, and membrane structure is analyzed using spectral images to generate a cleaning plan.
It enables dynamic and comprehensive monitoring of membrane fouling, improves the stability and economy of MBR systems, reduces system downtime, and extends membrane lifespan.
Smart Images

Figure CN118314519B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a membrane clean dynamic monitoring method and system, which are applied to monitoring and managing the pollution of a membrane bioreactor in a sewage treatment process. Background Art
[0002] In modern sewage treatment processes, membrane bioreactor (MBR) technology is widely used due to its high sewage purification capacity and small space occupation. MBR technology combines traditional activated sludge method and membrane separation technology, using semi-permeable membrane to directly separate clean water and sludge from the treated bioreactor. This technology not only improves the efficiency of sewage treatment, but also effectively controls the effluent quality to meet strict environmental protection standards.
[0003] Despite the obvious advantages of MBR technology, membrane fouling is still one of the main problems that limit its long-term operating efficiency. Membrane fouling is mainly manifested as the accumulation of biological sludge, suspended solids and other particles on the membrane surface, which will lead to a decrease in membrane permeability, increase energy consumption and operating costs. Traditional membrane fouling monitoring mainly relies on the operator's experience to make judgments. This method is highly subjective and can often only be detected when the pollution seriously affects the treatment efficiency.
[0004] In addition, traditional methods usually only focus on the contamination of the membrane surface, while ignoring the blockage inside the membrane pores, because the membrane pores are small and difficult to observe directly. This one-sided monitoring method cannot provide comprehensive membrane status information, thus limiting the implementation of timely and effective maintenance and cleaning measures.
[0005] The present invention proposes a membrane clean dynamic monitoring method and system, which can not only observe the pollution on the membrane surface, but also see the blockage inside the membrane holes through high-resolution image capture technology and image processing algorithm. In this way, dynamic and all-round monitoring of MBR membrane pollution can be achieved, so as to adjust the operating parameters in time or perform necessary cleaning and maintenance, greatly improving the stability and economy of the MBR system. Summary of the invention
[0006] The present invention provides a membrane cleanliness dynamic monitoring method, which specifically comprises the following steps:
[0007] S1: Use image acquisition equipment to obtain the MBR membrane surface image f(x, y) and the MBR membrane transmission image and calculate the brightness weight map ft(x, y);
[0008] S2: performing frequency domain conversion and color domain conversion on the MBR membrane surface image to obtain a spectrum image fr(x, y) and a color weight map M(x, y);
[0009] S3: Input the MBR membrane surface image f(x, y), the brightness weight map ft(x, y) and the color weight map M(x, y) into the attention module to obtain an enhanced MBR membrane surface image fe(x, y);
[0010] S4: inputting the enhanced MBR membrane surface image fe(x, y) and the spectrum image fr(x, y) into the feature fusion model to obtain fusion features and inputting them into the detection head to obtain the contaminated area detection result;
[0011] S5: Generating cleaning plan information based on the contaminated area detection result.
[0012] The present invention provides a membrane cleaning dynamic monitoring system, the system comprising:
[0013] Image acquisition device: The image acquisition device captures the MBR membrane surface image f(x, y) and the MBR membrane transmission image and calculates the brightness weight map ft(x, y);
[0014] Frequency domain conversion module: The frequency domain conversion module performs frequency domain conversion on the MBR membrane surface image to obtain a spectrum image fr(x, y);
[0015] Color domain conversion module: The color domain conversion module performs color domain conversion on the MBR membrane surface image to obtain a color weight map M (x, y);
[0016] Attention module: the MBR membrane surface image f(x, y), the brightness weight map ft(x, y) and the color weight map M(x, y) are input into the attention module to obtain an enhanced MBR membrane surface image fe(x, y);
[0017] Target detection module: The target detection module inputs the enhanced MBR membrane surface image fe(x, y) and the spectrum image fr(x, y) into the feature fusion model to obtain fusion features and inputs them into the detection head to obtain the contaminated area detection result;
[0018] Feedback module: The feedback module generates cleaning plan information based on the contaminated area detection results.
[0019] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned membrane cleanliness dynamic monitoring method when executing the computer program.
[0020] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned membrane cleanliness dynamic monitoring method is implemented.
[0021] Compared with the prior art, the present invention aims to solve the problem that the manual judgment method used in the prior art during the MBR membrane pollution monitoring process is affected by personal subjective factors and has limitations in recognition accuracy and efficiency. The present invention uses image recognition technology to comprehensively identify the pollution on the membrane surface and the pollution on the membrane pores in the membrane bioreactor system. At the same time, the present invention fully considers the characteristics of the pollutants on the membrane surface, and obtains a color weight map according to the color characteristics of different pollutants to guide the identification of pollutants on the membrane surface. In addition, the transmission image is used to evaluate the blockage of the membrane pores, and the brightness weight map is obtained based on the projection image to guide the model to determine the blockage of the membrane pores.
[0022] The membrane cleanliness dynamic monitoring method of the present invention improves the objectivity, accuracy and efficiency of pollution identification. During the operation of the MBR system, timely and accurate pollution identification can not only optimize the cleaning and maintenance cycle and reduce system downtime, but also effectively extend the service life of the membrane, thereby reducing the operating cost of the entire treatment system. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] 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.
[0024] Figure 1 It is the network structure diagram in this application. DETAILED DESCRIPTION
[0025] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0026] 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.
[0027] 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.
[0028] 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.
[0029] The present invention provides a method for dynamic monitoring of membrane cleanliness, which specifically includes the following steps:
[0030] S1: Use image acquisition equipment to obtain the MBR membrane surface image f(x, y) and the MBR membrane transmission image and calculate the brightness weight map ft(x, y);
[0031] S2: performing frequency domain conversion and color domain conversion on the MBR membrane surface image to obtain a spectrum image fr(x, y) and a color weight map M(x, y);
[0032] S3: Input the MBR membrane surface image f(x, y), the brightness weight map ft(x, y) and the color weight map M(x, y) into the attention module to obtain an enhanced MBR membrane surface image fe(x, y);
[0033] S4: inputting the enhanced MBR membrane surface image fe(x, y) and the spectrum image fr(x, y) into the feature fusion model to obtain fusion features and inputting them into the detection head to obtain the contaminated area detection result;
[0034] S5: Generating cleaning plan information based on the contaminated area detection result.
[0035] The method of taking the MBR membrane surface image by using the image acquisition device specifically includes:
[0036] S1-1-1: Assemble the camera and lens and mount them on a tripod, making sure all connections are tight to prevent shaking during movement;
[0037] S1-1-2: The lighting equipment is fixed on the left and right sides of the MBR membrane and placed in parallel to eliminate the strong reflection and shadow caused by direct illumination. The color temperature of the lighting equipment is set to 5600K, which is close to the color temperature of daylight to ensure the natural presentation of colors;
[0038] S1-1-3: Fix the moving track in front of or behind the MBR membrane, and the length of the track covers the entire length of the MBR membrane; the camera equipment is installed on the moving vehicle on the track, and its moving speed and stop time can be accurately controlled by the control system.
[0039] S1-1-4: Start the electric track, and the camera starts to move slowly from one end of the MBR membrane to the other end. Set the camera to continuous shooting mode to obtain multiple images of the MBR membrane surface. Select RAW as the image format to retain the most image information during post-processing; set autofocus to focus on capturing details on the MBR membrane surface.
[0040] Specifically, the camera may be a Sony Alpha a7R IV or other full-frame mirrorless camera with 10 million pixels. The camera should have high resolution and excellent low-light performance to capture extremely detailed images, and is suitable for recording minute details on the surface of the MBR membrane. Industrial cameras that meet the above conditions can be used as acquisition equipment for this application;
[0041] The lens should be a macro lens, such as the Sony FE 90mm f / 2.8 Macro G OSS lens or other lenses with a large aperture and optical image stabilization function suitable for photographing small-sized objects. The lens should be able to obtain clear and stable images even in low-light environments;
[0042] The lighting equipment should be a light source that can provide adjustable color temperature and high color accuracy, and can evenly illuminate the surface of the MBR membrane, such as ARRI SkyPanel S60-C LED Softlight;
[0043] The tripod can be combined with an electric slide system to ensure that the camera equipment can be moved smoothly to cover the entire surface area of the MBR membrane.
[0044] The method of photographing the MBR membrane transmission image with an image acquisition device and calculating the brightness weight map ft(x, y) specifically includes:
[0045] S1-2-1: Set the industrial camera on the other side of the MBR membrane relative to the lighting equipment and keep it perpendicular to the MBR membrane. The industrial camera lens is aimed at the center of the MBR membrane to ensure that every point on the membrane plane can be evenly captured;
[0046] S1-2-2: Turn on the lighting device in step S1-1-2, adjust the color temperature of the lighting device, and use an industrial camera to take n images at different color temperature settings. 1 , I 2 ,……I n};
[0047] S1-2-3: Calculate the pixel brightness weight value in the kth image:
[0048]
[0049] Among them, ft k (x, y) represents the pixel brightness weight value in the kth image, I k (x, y) represents the kth image taken under different color temperature settings, 1≤k≤n,μ k and σ k I k The brightness mean and variance of (x,y);
[0050] S1-2-4: Calculate the brightness weight map:
[0051]
[0052] Since the pore size of the MBR membrane is extremely small, its internal structure cannot usually be directly observed by a traditional visible light camera. Therefore, the traditional method cannot detect the blockage of the membrane holes. The present invention uses a transmitted light method to indirectly detect the blockage of the MBR membrane holes. The transmitted light image indirectly determines the blockage degree of the membrane holes by measuring the intensity of light passing through the MBR membrane. When the membrane holes are blocked, the path for the light to pass is blocked, resulting in a decrease in the light intensity at the corresponding position in the transmitted light image. On the contrary, if the holes are clean and unobstructed, the light can penetrate more freely, making the light intensity of the image relatively strong. By analyzing these light intensity distributions, the brightness weight map can be calculated to provide guidance for visible light detection.
[0053] The transmitted light method is more efficient than traditional physical detection methods and can be used for rapid detection without damaging the membrane structure. This technology can provide real-time feedback, allowing operators to understand the operating status of the membrane in a timely manner and respond quickly. Since the transmitted light technology does not require direct contact with the MBR membrane, it reduces the risk of additional contamination or membrane damage that may be introduced during the detection process.
[0054] The performing frequency domain conversion on the MBR membrane surface image to obtain a spectrum image specifically comprises:
[0055] The MBR membrane surface image is subjected to fast Fourier transform, and the local energy value is calculated based on the transformed image and normalized to obtain the spectrum image fr(x, y).
[0056] The color domain conversion of the MBR membrane surface image to obtain a color weight map specifically includes:
[0057] S2-1-1: Convert the MBR membrane surface image f(x, y) into an image I in the HSV color space HSV (x,y);
[0058] S2-1-2: Set a set of color ranges for various pollutions. The color range of the i-th pollution is represented as: {(H_i low , H_i high ), (S_i low , S_i high ), (V_i low , V_i high )};
[0059] S2-1-3: Constructing color masks for multiple pollutants:
[0060] M i (x, y) = check(H_i low ≤I H (x,y)≤H_i high , S_i low ≤I S (x,y)≤
[0061] S_i high , V_i low ≤I V (x,y)≤V_i high ),in,
[0062] M i represents the color mask of the i-th pollutant, I H (x,y),I S (x,y,I V (x,y) represent I HSV The three components of (x, y), check() represents an indicative function, and the result is 1 when all the conditions in the brackets are met, otherwise it is 0;
[0063] S2-1-4: Generate color weight map based on color masks of multiple pollutants:
[0064]
[0065] Where M(x, y) represents the color weight map, wi represents the weight of the i-th color mask, and n_c is the total number of color masks.
[0066] The color range set for setting multiple pollutions is specifically to set the color range of 5 pollutants, the color range of bacteria 1 pollution is: {(0, 10), (50, 100), (20, 100)}; the color range of bacteria 2 pollution is: {(340, 360), (50, 100), (20, 100)}; the color range of algae pollutants is: {(40, 65), (40, 100), (20, 100)}; the color range of mud pollutants is: {(20, 40), (20, 100), (10, 50)}; the color range of chemical precipitation pollution is: {(190, 240), (40, 100), (20, 100)}.
[0067] The present invention enhances the pollution detection process of MBR membrane by introducing a color weight map, using color analysis to identify and quantify the pollution on the membrane surface. In the normal state of the MBR membrane, the membrane surface usually displays a uniform color, which is an intuitive sign of its cleanliness and normal operation. However, when microbial growth, chemical deposition or other types of pollutants appear on the membrane surface, these pollutants will introduce different colors and destroy the original color uniformity. This color change is a key clue to detect pollution.
[0068] In order to make full use of this phenomenon, the present invention calculates a color weight map by analyzing the color distribution in the visible light image and assigning different weights to different colors. The generation of the color weight map is based on a detailed analysis of the color distribution on the membrane surface, especially those areas with different colors from the conventional clean membrane surface. By analyzing and assigning weights to the colors, those areas with abnormal colors can be highlighted, which are often where pollutants exist.
[0069] The present invention enhances the ability to identify the type and severity of contamination by differentiating the color weights. For example, certain types of biological contamination may cause green or yellow spots on the membrane surface, while inorganic contamination such as rust may cause red or orange color changes. By quantifying and analyzing these color changes, cleaning or replacement work can be more accurately guided, thereby improving the operating efficiency and treatment effect of the MBR system.
[0070] Inputting the MBR membrane surface image f(x, y), the brightness weight map ft(x, y) and the color weight map M(x, y) into the attention module to obtain the enhanced MBR membrane surface image fe(x, y) specifically includes:
[0071] S3-1: splicing the brightness weight map ft(x, y) and the color weight map M(x, y) by channel to obtain a weight feature map with the same size as the MBR membrane surface image f(x, y) and a channel number of 2;
[0072] S3-2: Input the spliced weight feature map into the attention module to calculate the enhanced MBR membrane surface image fe(x, y):
[0073] fe(x,y)=sigmoid(Conv(Fo,kernel=1,s=1,p=0))⊙f(x,y)
[0074] Fo=ReLU(Conv(Fm,kernel=3,s=1,p=1,c=32))
[0075] Fm=Conv(ft(x,y)⊕M(x,y),kernel=3,s=1,p=1,c=3)
[0076] Among them, s represents the stride, p represents padding, c represents the output channel, ⊕ represents channel-by-channel concatenation, Fm and Fo represent the intermediate and final feature maps respectively, and ⊙ represents the Hadamard product.
[0077] The step of inputting the enhanced MBR membrane surface image fe(x, y) and the spectrum image fr(x, y) into the feature fusion model to obtain the fusion feature specifically includes:
[0078]
[0079] where F t-1 Represents the input feature map at the tth feature processing module, Represents the intermediate feature map at the tth feature processing module, represents the output feature map at the tth feature processing module, 1≤t≤4, when t=1 0 To enhance the MBR membrane surface image fe(x, y) or spectrum image fr(x, y);
[0080] The enhanced MBR membrane surface image fe(x, y) and the spectrum image fr(x, y) are respectively processed through t feature processing modules to obtain an output MBR membrane surface output feature map And spectrum output characteristic diagram And perform channel splicing to get the output feature map
[0081] The invention combines the spectrum image analysis method. The clean MBR membrane surface presents a regular periodic circular arrangement structure, which is manifested as a specific frequency distribution pattern in the spectrum image. By applying the frequency domain analysis technology to the membrane detection process, the characteristics of these periodic textures can be effectively extracted, thus providing a quantitative judgment standard for the clean state of the membrane.
[0082] When contamination occurs on the membrane surface, such as microbial attachment, organic matter accumulation or inorganic salt crystallization, these pollutants will disrupt the original periodic arrangement of the membrane surface, resulting in changes in the frequency distribution in the spectrum image. This change is usually manifested as an abnormality in a specific frequency in the spectrum image, or the emergence of new frequency components, which are direct indications of the presence of contamination. By combining spectrum image analysis, the type and degree of contamination can be effectively located and identified, and the detection and classification of contamination can be achieved.
[0083] The present invention also combines spectral images with traditional visible light images. Visible light images provide intuitive visual information of the membrane surface, while spectral images supplement in-depth analysis of structure and texture. This dual-modal image fusion strategy greatly enhances the comprehensiveness of pollution detection and multi-angle evaluation capabilities. Although visible light images can capture certain pollution features intuitively, they may not be as delicate and sensitive in details as spectral images. By combining the two types of image information, the cleanliness status of the membrane can be evaluated more comprehensively, avoiding details that may be missed in single image analysis, thereby improving the overall detection accuracy.
[0084] The detection head may be a network part (Detection Head) conventionally used to perform prediction tasks in the field of target detection, such as YOLO Detection Head, RPN network, RetinaNet Head, etc., which is not limited in the present invention.
[0085] The input of the detection head is the output feature map The output is the detection and location information of pollutant target categories, including: biological accumulation pollution, sludge accumulation pollution, chemical precipitation and cavity blockage.
[0086] Based on the contaminated area detection result, generating cleaning plan information includes:
[0087]
[0088] S total =100 indicates the completely clean score, S indicates the current clean score, N m ,w_m,penalty m are the number of detections, preset weights and impact scores of the mth type of pollutants respectively;
[0089] Feedback the current cleanliness score and test results to MBR supervisors to guide the generation of cleaning plans.
[0090] The present invention provides a membrane cleaning dynamic monitoring system, the system comprising:
[0091] Image acquisition device: The image acquisition device captures the MBR membrane surface image f(x, y) and the MBR membrane transmission image and calculates the brightness weight map ft(x, y);
[0092] Frequency domain conversion module: The frequency domain conversion module performs frequency domain conversion on the MBR membrane surface image to obtain a spectrum image fr(x, y);
[0093] Color domain conversion module: The color domain conversion module performs color domain conversion on the MBR membrane surface image to obtain a color weight map M (x, y);
[0094] Attention module: the MBR membrane surface image f(x, y), the brightness weight map ft(x, y) and the color weight map M(x, y) are input into the attention module to obtain an enhanced MBR membrane surface image fe(x, y);
[0095] Target detection module: The target detection module inputs the enhanced MBR membrane surface image fe(x, y) and the spectrum image fr(x, y) into the feature fusion model to obtain fusion features and inputs them into the detection head to obtain the contaminated area detection result;
[0096] Feedback module: The feedback module generates cleaning plan information based on the contaminated area detection results.
[0097] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned membrane cleanliness dynamic monitoring method when executing the computer program.
[0098] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned membrane cleanliness dynamic monitoring method is implemented.
[0099] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0100] 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.
[0101] 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. A membrane clean dynamic monitoring method, characterized in that: The monitoring method comprises the following steps: S1: Use image acquisition equipment to obtain the MBR membrane surface image f(x, y) and the MBR membrane transmission image and calculate the brightness weight map ft(x, y); The method of taking the MBR membrane surface image by using the image acquisition device specifically includes: S1-1-1: Assemble the camera and lens, mount them on the tripod, and make sure all connections are tight; S1-1-2: The lighting equipment is fixed on the left and right sides of the MBR membrane and placed in parallel, and the color temperature of the lighting equipment is set to 5600K; S1-1-3: Fix the moving track in front of or behind the MBR membrane, the length of the track covers the entire length of the MBR membrane, and the camera equipment is installed on the moving vehicle of the track. The moving speed and stop time can be controlled by the control system; S1-1-4: Start the electric track, and the camera starts to move slowly from one end of the MBR membrane to the other end. The camera is set to continuous shooting mode to obtain multiple images of the MBR membrane surface, and the image format is selected as RAW; The method of photographing the MBR membrane transmission image with an image acquisition device and calculating the brightness weight map ft(x, y) specifically includes: S1-2-1: Set the industrial camera on the other side of the MBR membrane relative to the lighting equipment, and keep it vertical to the MBR membrane, and aim the industrial camera lens at the center of the MBR membrane; S1-2-2: Turn on the lighting device in step S1-1-2, adjust the color temperature of the lighting device, and use an industrial camera to take n images {I1, I2, ... I n }; S1-2-3: Calculate the pixel brightness weight value in the kth image: Among them, ft k (x, y) represents the pixel brightness weight value in the kth image, I k (x, y) represents the kth image taken under different color temperature settings, 1≤k≤n,μ k and σ k I k The brightness mean and variance of (x,y); S1-2-4: Calculate the brightness weight map: S2: performing frequency domain conversion and color domain conversion on the MBR membrane surface image to obtain a spectrum image fr(x, y) and a color weight map M(x, y); The color domain conversion of the MBR membrane surface image to obtain a color weight map specifically includes: S2-1-1: Convert the MBR membrane surface image f(x, y) into an image I in the HSV color space HSV (x,y); S2-1-2: Set a set of color ranges for various pollutions. The color range of the i-th pollution is represented as: {(H_i low , H_i high ), (S_i low , S_i high ), (V_i low , V_i high )}; S2-1-3: Constructing color masks for multiple pollutants: M i (x,y)=check(H_i low ≤I H (x,y)≤H_i high ,S_i low ≤I S (x,y)≤S_i high , V_i low ≤I V (x,y)≤V_i high ) Among them, M i represents the color mask of the i-th pollutant, I H (x,y),I S (x,y,I V (x,y) represent I HSV The three components of (x, y), check() represents the indicative function, and the result is 1 when all the conditions in the brackets are met, otherwise it is 0; S2-1-4: Generate a color weight map based on the color mask of multiple pollutants: Where M(x, y) represents the color weight map, wi represents the weight of the i-th color mask, and n_c is the total number of color masks; S3: Input the MBR membrane surface image f(x, y), the brightness weight map ft(x, y) and the color weight map M(x, y) into the attention module to obtain an enhanced MBR membrane surface image fe(x, y); S4: inputting the enhanced MBR membrane surface image fe(x, y) and the spectrum image fr(x, y) into the feature fusion model to obtain fusion features and inputting them into the detection head to obtain the contaminated area detection result; S5: generating cleaning plan information based on the contaminated area detection result; The step of inputting the enhanced MBR membrane surface image fe(x, y) and the spectrum image fr(x, y) into the feature fusion model to obtain the fusion feature specifically includes: where F t-1 Represents the input feature map at the tth feature processing module, Represents the intermediate feature map at the tth feature processing module, represents the output feature map at the tth feature processing module, 1≤t≤4, when t=1 0 To enhance the MBR membrane surface image fe(x, y) or spectrum image fr(x, y); The enhanced MBR membrane surface image fe(x, y) and the spectrum image fr(x, y) are respectively processed through t feature processing modules to obtain an output MBR membrane surface output feature map And spectrum output characteristic diagram And perform channel splicing to get the output feature map 2. The membrane cleaning dynamic monitoring method according to claim 1, characterized in that: The color range set for setting multiple pollutions is specifically to set the color range of 5 pollutants, the color range of bacteria 1 pollution is: {(0, 10), (50, 100), (20, 100)}, the color range of bacteria 2 pollution is: {(340, 360), (50, 100), (20, 100)}, the color range of algae pollution is: {(40, 65), (40, 100), (20, 100)}, the color range of mud pollution is: {(20, 40), (20, 100), (10, 50)}, and the color range of chemical precipitation pollution is: {(190, 240), (40, 100), (20, 100)}.
3. The membrane cleanliness dynamic monitoring method according to claim 1, characterized in that: Inputting the MBR membrane surface image f(x, y), the brightness weight map ft(x, y) and the color weight map M(x, y) into the attention module to obtain the enhanced MBR membrane surface image fe(x, y) specifically includes: S3-1: splicing the brightness weight map ft(x, y) and the color weight map M(x, y) by channel to obtain a weight feature map with the same size as the MBR membrane surface image f(x, y) and a channel number of 2; S3-2: Input the spliced weight feature map into the attention module to calculate the enhanced MBR membrane surface image fe(x, y): fe(x,y)=sigmoid(Conv(Fo,kernel=1,s=1,p=0))⊙f(x,y) Fo=ReLU(Conv(Fm,kernel=3,s=1,p=1,c=32)) Among them, s represents the step size, p represents padding, and c represents the output channel. represents channel-wise concatenation, Fm and Fo represent the intermediate and final feature maps respectively, and ⊙ represents the Hadamard product.
4. The membrane cleanliness dynamic monitoring method according to claim 3, characterized in that: Based on the contaminated area detection result, generating cleaning plan information includes: S total =100 indicates the completely clean score, S indicates the current clean score, N m ,w_m,penalty m are the number of detections, preset weights and impact scores of the mth type of pollutants, respectively. Feedback the current cleanliness score and test results to MBR supervisors to guide the generation of cleaning plans.
5. A membrane cleaning dynamic monitoring system, used to execute the membrane cleaning dynamic monitoring method according to any one of claims 1 to 4, characterized in that The system includes: Image acquisition device: The image acquisition device captures the MBR membrane surface image f(x, y) and the MBR membrane transmission image and calculates the brightness weight map ft(x, y); Frequency domain conversion module: The frequency domain conversion module performs frequency domain conversion on the MBR membrane surface image to obtain a spectrum image fr(x, y); Color domain conversion module: The color domain conversion module performs color domain conversion on the MBR membrane surface image to obtain a color weight map M (x, y); Attention module: the MBR membrane surface image f(x, y), the brightness weight map ft(x, y) and the color weight map M(x, y) are input into the attention module to obtain an enhanced MBR membrane surface image fe(x, y); Target detection module: The target detection module inputs the enhanced MBR membrane surface image fe(x, y) and the spectrum image fr(x, y) into the feature fusion model to obtain fusion features and inputs them into the detection head to obtain the contaminated area detection result; Feedback module: the feedback module generates cleaning plan information based on the contaminated area detection result; The step of inputting the enhanced MBR membrane surface image fe(x, y) and the spectrum image fr(x, y) into the feature fusion model to obtain the fusion feature specifically includes: where F t-1 Represents the input feature map at the tth feature processing module, Represents the intermediate feature map at the tth feature processing module, represents the output feature map at the tth feature processing module, 1≤t≤4, when t=1 0 To enhance the MBR membrane surface image fe(x, y) or the spectrum image fr(x, y); the enhanced MBR membrane surface image fe(x, y) and the spectrum image fr(x, y) are respectively processed through t feature processing modules to obtain an output MBR membrane surface output feature map And spectrum output characteristic diagram And perform channel splicing to get the output feature map 6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the membrane cleanliness dynamic monitoring method according to any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the membrane cleaning dynamic monitoring method according to any one of claims 1 to 4.
