Coagulant adding control method and system based on visual identification of dynamic change of floc

By combining real-time image recognition of floc particle characteristics with historical data, the dosage of coagulant was optimized, solving the problem of insufficient perception of the dynamic growth state of flocs in existing technologies, and realizing precise control of the flocculation process and improved agent utilization efficiency.

CN121377271AActive Publication Date: 2026-01-23NORTHWEST A & F UNIV

Patent Information

Application Number
CN202511991091.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-01-23
Estimated Expiration
2045-12-26

AI Technical Summary

Technical Problem

Existing water treatment technologies cannot detect the dynamic growth status of flocs in real time, resulting in lag and deviation in coagulant dosing control, which affects water quality and increases chemical consumption.

Method used

The image acquisition device acquires images of the flocculation process in real time, performs image enhancement processing, identifies the characteristics of floc particles, calculates the addition adjustment coefficient based on historical data, optimizes the amount of coagulant added, and controls the flocculation process through closed-loop feedback.

Benefits of technology

It achieves precise closed-loop control of the flocculation process state, improves the sensing sensitivity and response directness of the control system, reduces reagent consumption, and improves treatment efficiency and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121377271A_ABST
    Figure CN121377271A_ABST
Patent Text Reader

Abstract

The invention discloses a coagulant addition control method and system based on visual identification of dynamic change of floc, and the method comprises the steps: collecting image data of a flocculation process in a water body in real time, and carrying out the image enhancement processing, so as to obtain a clear particle distribution image; identifying the size and quantity characteristics of floc particles through an image analysis technology, and determining the average diameter and density value of the particles in the current flocculation stage; calculating the deviation between the current floc state deviation and a preset standard value, and obtaining a preliminary adding adjustment coefficient matched with the current floc state deviation; combining with water body flow data monitored in real time to obtain an optimized adding amount for the current working condition; and generating a control instruction to adjust the input acceleration or stroke of the pump adding equipment, and continuously monitoring the updated floc image to verify the adjustment effect. According to the method, the floc state can be identified on line through an image technology, the adding amount is accurately calculated in combination with historical experience and real-time flow, and closed-loop optimization control over the intrinsic nature of the coagulation process is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of visual identification water treatment technology, in particular to a coagulant dosing control method and system based on visual identification of floc dynamic changes. BACKGROUND

[0002] In the water treatment process, coagulant dosing control is the core link to ensure the stability of subsequent sedimentation, filtration and other units and to reduce operating costs. Precise regulation of the dosing amount is of great value in dealing with raw water quality fluctuations, improving treatment efficiency, and reducing chemical consumption and sludge production.

[0003] Currently, the general practice and existing technology in this field mainly rely on two methods: one is manual control based on operator experience, and the other is an automatic control system (such as feedforward control or simple feedback control) based on a few online parameters such as inflow and turbidity. These methods have achieved automation to some extent, but their control basis does not go deep into the most critical internal state of the flocculation reaction itself, i.e., the real-time growth and aggregation dynamics of floc particles. The size, density distribution, and change rate of flocs are the most direct representation of coagulation effect. However, existing technologies lack effective and stable online monitoring of such microscopic morphological parameters and direct use of them for control. Therefore, when water quality composition changes complexly or treatment load fluctuates rapidly, the existing control system cannot real-time perceive the real evolution of floc state, and its regulation response often lags or deviates significantly, easily leading to insufficient dosing affecting water quality or excessive dosing causing economic waste and environmental burden.

[0004] Although some studies have explored the application of image analysis technology in floc observation, how to convert the observation results into reliable control signals and build a closed-loop automatic dosing control system based on floc visual dynamics is still a technical problem to be solved in this field. SUMMARY

[0005] To this end, the technical problem to be solved by the present application is to overcome the lag and deviation of dosing control in existing technologies due to the reliance on indirect parameters and the inability to real-time perceive the dynamic growth state of flocs, and to provide a coagulant dosing control method and system based on visual identification of floc dynamic changes, which can online identify floc state through image technology, accurately calculate the dosing amount combined with historical experience and real-time flow, and realize closed-loop optimization control of the intrinsic nature of the coagulation process, thereby improving the stability of the treatment effect and reducing chemical consumption.

[0006] To solve the above technical problems, the present application provides a coagulant dosing control method based on visual identification of floc dynamic changes, applied to the flocculation process section of a water treatment system, comprising the following steps: The image data of the flocculation process in the water body is collected in real time by the image acquisition device, and the original image collected is subjected to image enhancement processing to highlight the flocculation particle boundary, so that a clear particle distribution image is obtained. Based on the particle distribution image, the size and number characteristics of the flocculation particles are identified through image analysis technology to determine the particle average diameter and density value of the current flocculation stage. According to the current particle average diameter and density value, the deviation thereof from the preset standard value is calculated, the dosage adjustment record under similar water quality conditions is extracted from the historical data, and a preliminary dosage adjustment coefficient matching the current flocculation state deviation is obtained. The preliminary dosage adjustment coefficient is combined with the water flow data monitored in real time, the coagulant dosage is updated by calculation, and the optimized dosage for the current working condition is obtained. The control instruction is generated according to the optimized dosage and is sent to the dosing pump device to adjust the dosing speed or stroke of the dosing pump device, so as to change the actual coagulant dosage per unit time, continuously monitor the updated flocculation image to verify the adjustment effect, and realize continuous regulation and control of the flocculation process state.

[0007] In an embodiment of the present application, the original image collected is subjected to image enhancement processing to highlight the flocculation particle boundary, so that a clear particle distribution image is obtained, which includes: The original image is subjected to noise reduction and brightness compensation to obtain an initial image with a uniform background; The initial image is subjected to local contrast adaptive enhancement, the enhancement intensity is dynamically adjusted according to the gray distribution of each region of the image, the outline features of the flocculation particle edges are enlarged, and an edge enhanced image is generated; The edge enhanced image is subjected to gradient detection and edge connection to identify and strengthen the significant boundary, and the incomplete edge fragments meeting the conditions are connected into continuous boundaries based on the preset geometric continuity rules, so that a complete flocculation boundary image is obtained; The flocculation boundary image is converted into a binary image, and morphological optimization processing is performed on the binary image to eliminate noise points and fill the gaps in the boundary, so that a clear particle distribution image for subsequent feature identification is output.

[0008] In an embodiment of the present application, the particle average diameter and density value of the current flocculation stage are determined, which includes: The particle distribution image is subjected to particle labeling operation, each independent flocculation particle region is assigned a unique identifier, and the geometric outline information of each labeled region is extracted; Based on the geometric outline information of each particle, the maximum inscribed circle diameter of each particle is calculated as the equivalent diameter of the particle, and the total number of effective labeled regions in the image field of view is counted; arranging equivalent diameters of all particles in descending order, removing the smallest particle group with equivalent diameter less than a preset threshold, and calculating a weighted average of equivalent diameters of the remaining particles as the average particle diameter in the current flocculation stage; dividing the total number of effective marking areas by the actual water volume corresponding to the image to obtain the particle density value in the current flocculation stage.

[0009] In an embodiment of the present application, in the process of removing the smallest particle group with equivalent diameter less than a preset threshold in determining the average particle diameter, an adaptive threshold method is adopted, which includes: dividing all particle equivalent diameters into several levels according to size order; calculating the proportion distribution of the number of particles in each level to the total number of particles, and finding the first obvious local minimum point in the proportion distribution; taking the upper limit value of the equivalent diameter range corresponding to the local minimum point as the dynamically determined removal threshold; after automatically filtering out the particle group with equivalent diameter less than the removal threshold according to the dynamically determined removal threshold, recalculating the weighted average of the remaining particles as the final average particle diameter.

[0010] In an embodiment of the present application, obtaining a preliminary dosage adjustment coefficient matching the deviation of the current floc state includes: comparing the currently calculated average particle diameter and density value with the preset standard diameter range and standard density range respectively, calculating the absolute deviation value from the median value in each range, and combining the two absolute deviation values into a comprehensive deviation index according to a preset weight; based on the comprehensive deviation index, searching for operation records with similar water quality conditions and current water quality parameters in the historical database, the operation records containing historical comprehensive deviation indexes and their corresponding dosage adjustment coefficients; from the searched operation records, selecting several records with the smallest difference between the comprehensive deviation index and the current comprehensive deviation index, and extracting their corresponding dosage adjustment coefficients; performing weighted average calculation on the extracted multiple dosage adjustment coefficients, wherein the weight is determined according to the overall similarity between the corresponding historical record and the current operating condition, and the calculation result is the preliminary dosage adjustment coefficient.

[0011] In an embodiment of the present application, the preset standard diameter range and standard density range are established by the following method: synchronously collecting and recording the corresponding particle average diameter and density value data sequences in multiple historical periods when the system is stably running and the effluent water quality meets the standard; statistically analyzing the recorded particle average diameter and density value data sequences in each historical period respectively, and calculating the average value and statistical distribution characteristics of each. Based on the data distribution of each historical period, after eliminating obviously abnormal data points, the safe and stable running interval of the average particle diameter and the density value is determined respectively; The safe and stable running interval of the average particle diameter determined is taken as a preset standard diameter range, and the safe and stable running interval of the particle density value determined is taken as a preset standard density range.

[0012] In an embodiment of the present application, when no similar running record of the current water quality parameter is searched in the historical database, the method for obtaining the preliminary dosing adjustment coefficient comprises: The comprehensive deviation index of the current average particle diameter and density value is decomposed into a diameter deviation component and a density deviation component; In the historical database, records similar to the current diameter deviation component and records similar to the current density deviation component are searched respectively; From the two groups of search results, a plurality of records closest to the deviation are selected respectively, corresponding dosing adjustment coefficients are extracted, and the extracted adjustment coefficients are classified and counted; According to the contribution proportion of the diameter deviation component and the density deviation component to the comprehensive deviation respectively, the adjustment coefficients extracted respectively are proportionally fused and calculated to generate a preliminary dosing adjustment coefficient suitable for the current abnormal deviation.

[0013] In an embodiment of the present application, the preliminary dosing adjustment coefficient is combined with the real-time monitored water flow data, and the coagulant dosing amount is calculated and updated, comprising: The coagulant reference dosing rate on which the current system runs is obtained, and water flow data is collected in real time; According to the current water flow data, the flow proportion component of the coagulant dosing demand amount is calculated; The preliminary dosing adjustment coefficient is fused and operated with the flow proportion component to generate a comprehensive dosing adjustment factor; The comprehensive dosing adjustment factor is applied to the reference dosing rate to calculate a theoretical dosing amount; The theoretical dosing amount is engineering adjusted in combination with the minimum adjustment precision and the maximum adjustment range of the dosing equipment, and an optimized dosing amount value directly executable is output.

[0014] In an embodiment of the present application, in the fusion operation step, when the adjustment direction indicated by the preliminary dosing adjustment coefficient is inconsistent with the adjustment direction indicated by the flow change trend, the following priority decision mechanism is adopted: The severity level of the current flocculation state comprehensive deviation is obtained; If the severity level exceeds a preset first threshold value, the adjustment direction indicated by the preliminary dosing adjustment coefficient is given priority, and the flow change trend is used as an auxiliary correction term for fusion. If the severity level does not exceed the preset first threshold but exceeds the preset second threshold, the preliminary coagulant dosage adjustment coefficient and the flow change trend are balanced and fused with the same weight; If the severity level does not exceed the preset second threshold, the adjustment direction indicated by the flow change trend is given priority, and the preliminary coagulant dosage adjustment coefficient is used as an auxiliary correction term for fusion.

[0015] To solve the above technical problems, the application further provides a coagulant dosage control system based on visual recognition of floc dynamic changes, which is used to realize the above method, comprising: An image acquisition and processing module is used to acquire image data of the flocculation process in the water body in real time through an image acquisition device, and to perform image enhancement processing on the acquired original image to highlight the floc particle boundary, and output a clear particle distribution image; A floc feature analysis module is connected with the image acquisition and processing module, and is used to identify the size and quantity characteristics of the floc particles based on the particle distribution image through image analysis technology, and to determine the average particle diameter and density value of the current flocculation stage; An intelligent decision-making module is connected with the floc feature analysis module, and is used to calculate the deviation of the current average particle diameter and density value from the preset standard value, to extract coagulant dosage adjustment records under similar water quality conditions from historical data, and to obtain a preliminary coagulant dosage adjustment coefficient matched with the deviation of the current floc state; A dosage optimization module is connected with the intelligent decision-making module, and is used to combine the preliminary coagulant dosage adjustment coefficient with the real-time monitored water flow data, to update the coagulant dosage by calculation, and to obtain an optimized dosage for the current working condition; A control execution and feedback module is connected with the dosage optimization module, and is used to generate a control instruction according to the optimized dosage and send it to the dosing pump device, to adjust the dosing speed or stroke of the dosing pump device to change the actual coagulant dosage per unit time, and to continuously receive the updated floc image data from the image acquisition and processing module to verify the adjustment effect, thereby forming a closed-loop continuous regulation and control of the flocculation process state.

[0016] The above technical solutions of the application have the following advantages compared with the prior art: The coagulant dosing control method based on visual recognition of flocculation dynamic change provided by the present application realizes precise closed-loop regulation and control of the flocculation process state through the synergistic effect of the following technical solutions: firstly, through image acquisition and enhancement processing, the flocculation particle boundary is clarified, providing high-quality image data basis for subsequent analysis; then, the image analysis technology is used to quantitatively extract the flocculation average diameter and density value from the particle distribution image, and the flocculation growth state is converted into quantifiable key process parameters; further, the deviation of the above-mentioned parameters from the preset standard is calculated, and the effective adjustment record under similar deviation in the historical operation data is associated to obtain a preliminary dosing adjustment coefficient, so that the control decision has intelligence based on historical experience; subsequently, the coefficient is combined with real-time water flow data to calculate the optimized dosing amount suitable for the current working condition, ensuring that the control instruction reflects the essence of the process state and conforms to the actual production scale; finally, the optimized dosing amount is used to drive the dosing equipment to execute adjustment, and a closed-loop feedback is formed through continuous image monitoring, thereby realizing continuous verification and optimization of the dosing strategy.

[0017] The beneficial effects brought by the present application include: first, by deeply embedding the image recognition technology into the control closed loop, online real-time regulation and control is realized according to the flocculation core growth characteristics, which fundamentally improves the sensing sensitivity and response immediacy of the control system to the internal state change of the flocculation process, making the regulation and control more scientific and essential; second, by introducing an adjustment coefficient decision mechanism based on historical deviation data, excellent operation experience can be simulated and solidified, so that the control behavior has both the pertinence of case learning and the stability of rule execution, effectively reducing the continuous dependence on the experience of senior operators and improving the adaptability and reliability of control under different working conditions; third, by fusing the state adjustment coefficient with real-time flow data, the linkage between process state fine-tuning and macro processing scale is realized, ensuring the accuracy and engineering practicability of dosing amount adjustment.

[0018] In summary, this method can more quickly and accurately stabilize the flocculation effect when the water quality or load fluctuates, reduce the invalid dosing of reagents under the premise of ensuring the effluent water quality, thereby achieving the dual goals of improving treatment efficiency and reducing operating cost, and providing a practical solution for the intelligent and fine operation of water treatment plants. BRIEF DESCRIPTION OF DRAWINGS

[0019] In order to make the content of the present application more easily understood, the present application will be further described in detail below according to specific embodiments of the present application and in conjunction with the drawings, in which: Figure 1 is a step flow chart of the coagulant dosing control method based on visual recognition of flocculation dynamic change of the present application; Figure 2is a step flow chart of the image enhancement processing of the collected original image of the present application; Figure 3 is a step flow chart of the determination of the particle average diameter and density value of the current flocculation stage of the present application; Figure 4 is a step flow chart of the obtaining of a preliminary dosage adjustment coefficient matching the current flocculation state deviation of the present application; Figure 5 is a step flow chart of the calculation of the updated coagulant dosage by combining the preliminary dosage adjustment coefficient with the real-time monitored water flow data of the present application; Figure 6 is a structural framework diagram of the coagulant dosage control system based on the visual recognition of the dynamic changes of the flocculation of the present application. DETAILED DESCRIPTION

[0020] The present application will be further described below in conjunction with the drawings and specific embodiments, so that those skilled in the art can better understand the present application and implement it, but the embodiments are not limiting to the present application.

[0021] Referring to Figure 1 , the present application proposes a coagulant dosage control method based on the visual recognition of the dynamic changes of the flocculation, which is applied to the flocculation process section of the water treatment system, including the following steps: Real-time image data of the flocculation process in the water body is collected by the image collection device, and the collected original image is subjected to image enhancement processing to highlight the flocculation particle boundary, so as to obtain a clear particle distribution image; based on the particle distribution image, the size and quantity characteristics of the flocculation particles are identified by image analysis technology, and the particle average diameter and density value of the current flocculation stage are determined; the deviation of the current particle average diameter and density value from the preset standard value is calculated, the dosage adjustment records under similar water quality conditions are extracted from the historical data, and a preliminary dosage adjustment coefficient matching the current flocculation state deviation is obtained; the preliminary dosage adjustment coefficient is combined with the real-time monitored water flow data, the coagulant dosage is updated by calculation, and the optimized dosage for the current working condition is obtained; the control instruction is generated according to the optimized dosage and sent to the dosage pump equipment, the dosage speed or stroke of the pump equipment is adjusted to change the actual dosage of the coagulant per unit time, the adjusted effect is verified by continuously monitoring the updated flocculation image, and the continuous regulation and control of the flocculation process state are realized.

[0022] For the convenience of understanding, some key terms in the present embodiment are explained as follows: The image collection device refers to a hardware device for real-time acquisition of visual information of the flocculation process in the water body; for example, an industrial camera or a high-resolution camera, which functions to convert continuous physical images into digital image data for computer processing.

[0023] Image enhancement processing refers to a series of algorithmic operations on raw image data, aiming to improve the visual quality of the image or make it more suitable for subsequent machine analysis; for example, by adjusting brightness, contrast, sharpening edges, or reducing noise, etc., to highlight the features of specific targets (such as floc particles) in the image.

[0024] Particle distribution image refers to an image that can clearly display the outline, size, and spatial distribution of floc particles after image enhancement processing; this image is the basis for subsequent floc feature quantification analysis.

[0025] Image analysis technology refers to a method of extracting, identifying, and quantifying specific target features from an image using computer vision and digital image processing algorithms; for example, to identify the boundaries of floc particles, calculate their geometric dimensions, and count their number.

[0026] Floc particles refer to macroscopic particles formed by the aggregation of colloidal particles and suspended solids in water during the coagulation process, resulting from the action of coagulants; their size, shape, and density are key indicators of coagulation effectiveness.

[0027] Average particle diameter refers to the average value obtained by statistically calculating the size of all effective floc particles in the field of view through image analysis technology; this value reflects the overall growth of floc particles.

[0028] Density value refers to the number of floc particles per unit volume calculated by counting the number of effective floc particles in the image field of view and combining the sampling volume; this value reflects the degree of floc particle aggregation.

[0029] Preliminary dosage adjustment coefficient refers to a factor used to preliminarily correct the coagulant baseline dosage, calculated by an intelligent decision-making model based on the deviation of the current floc state from the preset standard state and combined with historical operation data.

[0030] Optimized dosage refers to the actual coagulant dosage determined and sent to the dosing pump device for execution after considering factors such as floc dynamic changes, water flow, and equipment adjustment accuracy.

[0031] The coagulant dosage control method of the present embodiment is implemented as follows: First, image data of the coagulation process in the water body is collected in real time by an image acquisition device, which can be an industrial camera fixedly installed beside the observation window of the coagulation tank or a movable underwater camera. The raw image data collected is then sent to an image processing unit for image enhancement processing. For example, basic image processing techniques such as global brightness adjustment and contrast stretching can be used to make the boundaries of floc particles relatively clear in the image, thereby obtaining a preliminary particle distribution image.

[0032] Secondly, based on the obtained particle distribution image, the size and number characteristics of the flocculation particles are identified through image analysis technology, and then the average particle diameter and density value of the current flocculation stage are determined. Specifically, a simple connected component analysis can be performed on the particle distribution image to identify each independent region in the image and regard it as a flocculation particle; then, the particle size is estimated by measuring the pixel area or the longest axis length of these regions, and the number of regions is counted. The average particle diameter can be obtained by the arithmetic mean of all identified particle sizes, and the density value can be calculated by dividing the number of particles by the volume of the water body corresponding to the image field of view.

[0033] Furthermore, according to the currently determined average particle diameter and density value, the deviation from the preset standard value is calculated, and the preset standard value can be a set of fixed diameter and density reference values, such as setting an ideal diameter range and an ideal density range through historical experience. If the current average particle diameter or density value exceeds these ranges, it is considered to have a deviation. Then, the dosage adjustment records similar to the current water quality conditions (such as raw water turbidity, pH value, etc.) are extracted from the historical data; for example, the records in the historical database that completely match the current water quality parameters can be simply searched, and the corresponding dosage adjustment coefficient is directly obtained.

[0034] Further, the obtained preliminary dosage adjustment coefficient is combined with the real-time monitored water flow data to update the coagulant dosage by calculation, and the optimized dosage for the current working condition is obtained. For example, a baseline dosage based on the water flow can be first determined, and then the preliminary dosage adjustment coefficient is directly multiplied by the baseline dosage to obtain the new dosage.

[0035] Finally, control instructions are generated according to the calculated optimized dosage and sent to the dosing pump device; after receiving the instructions, the dosing pump device will adjust its dosing speed or stroke to change the actual coagulant dosage per unit time; for example, if the optimized dosage increases, the stroke or frequency of the dosing pump will be correspondingly increased. After the dosage adjustment, the system will continuously monitor the updated flocculation image to verify the effect of this adjustment; this verification can be manual observation of image changes or judgment of whether the flocculation effect is improved through simple image feature comparison.

[0036] The present application realizes the precise optimization of coagulant dosage by real-time visual identification of the dynamic changes of flocculation particles and intelligent decision-making combined with historical data. Therefore, the lag and deviation problems of traditional methods in dealing with raw water quality fluctuations and processing load changes are effectively overcome, the adaptability and stability of the water treatment flocculation process are significantly improved, and the problems of substandard effluent water quality caused by insufficient dosage and waste of chemicals and increased sludge production caused by excessive dosage are avoided.

[0037] In the flocculation process section of a water treatment system, image acquisition devices collect real-time image data of the flocculation process in the water. Image enhancement processing is then performed on the acquired raw images to highlight the boundaries of floc particles, obtaining a clear particle distribution image, which is fundamental for subsequent floc feature analysis. However, actual water images are often affected by factors such as uneven lighting, suspended solids interference, and blurred particle edges. Direct image enhancement processing makes it difficult to effectively and stably obtain high-quality particle distribution images, thus affecting the accuracy of subsequent floc feature identification.

[0038] In this regard, refer to Figure 2 As shown, this application further proposes a step for image enhancement processing of the acquired original image to highlight the boundaries of flocculent particles and obtain a clear particle distribution image, including: denoising and brightness compensation of the original image to obtain an initial image with a uniform background; local contrast adaptive enhancement of the initial image, dynamically adjusting the enhancement intensity according to the grayscale distribution of each region of the image to amplify the contour features of the flocculent particle edges and generate an edge-enhanced image; gradient detection and edge connection of the edge-enhanced image to identify and strengthen significant boundaries, while connecting incomplete edge segments that meet the conditions into continuous boundaries based on preset geometric continuity rules to obtain a complete flocculent boundary image; converting the flocculent boundary image into a binary image and performing morphological optimization processing on the binary image to eliminate noise points and fill gaps within the boundaries, outputting a clear particle distribution image for subsequent feature recognition.

[0039] Specifically, denoising and brightness compensation are performed on the original image to eliminate random noise introduced during image acquisition and correct uneven image brightness caused by changes in ambient lighting or equipment limitations. Noise reduction can employ algorithms such as median filtering, Gaussian filtering, or bilateral filtering to smooth the image while preserving edge information as much as possible. Brightness compensation can be achieved through methods such as histogram equalization, gamma correction, or adaptive brightness adjustment to make the background brightness of the image more uniform, providing a more stable foundation for subsequent contrast enhancement and edge detection, thus obtaining an initial image with a uniform background. Based on this, local adaptive contrast enhancement is performed on the initial image. Its purpose is to dynamically adjust the enhancement intensity according to the grayscale distribution characteristics of different regions of the image to more effectively amplify the edge contour features of the flocculent particles. Unlike global contrast enhancement, local adaptive contrast enhancement (e.g., using the Limiting Contrast Adaptive Histogram Equalization (CLAHE) algorithm) avoids over-enhancement or under-enhancement in areas with high or low image brightness, thus presenting the details of the flocculent particles more clearly against complex backgrounds and generating an edge-enhanced image. Subsequently, gradient detection and edge joining are performed on the edge enhancement image to accurately identify and strengthen the significant boundaries of flocculent particles while addressing edge breakage issues. Gradient detection typically employs operators such as Canny, Sobel, or Prewitt, locating potential edges by calculating the grayscale change rate of image pixels. Based on this, edge joining techniques, using predefined geometric continuity rules (such as distance between edge segments, directional similarity, curvature changes, etc.), connect incomplete edge fragments caused by noise or weak contrast, forming continuous and complete flocculent boundaries, resulting in a complete flocculent boundary image. Finally, after converting the flocculent boundary image into a binary image, morphological optimization processing is performed to further refine the shape of the flocculent particles, eliminate isolated noise points in the image, and fill any gaps that may exist inside the particles. Binarization typically uses the Otsu method or adaptive thresholding to divide image pixels into foreground (flocculent) and background. Morphological operations include erosion, dilation, opening, and closing operations. For example, opening operations can effectively remove small isolated points and burrs, while closing operations can fill small holes and broken connection areas, thereby outputting a clear particle distribution image for subsequent feature recognition, ensuring the integrity and accuracy of the particle region.

[0040] In actual water treatment processes, floc particles have complex shapes and uneven size distribution, and there may be noise or incomplete particles in the image. If simple statistical calculations are performed directly, the measurement accuracy of particle diameter and density values ​​may be insufficient, thus affecting the accuracy of subsequent coagulant dosing control.

[0041] In this regard, refer to Figure 3 As shown, this application further proposes a method for determining the average particle diameter and density values ​​at the current flocculation stage, specifically including the following steps: Firstly, a particle labeling operation is performed on the particle distribution image, assigning a unique identification to each individual floe particle region, and extracting the geometric contour information of each labeled region. This step aims to identify continuous floe regions in the image as independent individuals and obtain their boundary information. The particle labeling operation can be achieved through Connected Component Analysis, which scans the binaryzed particle distribution image and labels mutually connected pixel sets as the same particle. For floes that may have adhesion or overlap, more advanced image segmentation techniques such as Watershed Algorithm can be used to separate adjacent particles by identifying "basins" and "watersheds" in the image. Extracting geometric contour information usually involves edge detection algorithms such as Canny operator or Sobel operator to obtain the precise boundary pixel set of each labeled particle. These contour information is the basis for subsequent calculation of particle size and shape features.

[0042] Secondly, based on the geometric contour information of each particle, the maximum inscribed circle diameter of each particle is calculated as the equivalent diameter of the particle, and the total number of effective labeled regions in the image field of view is counted. The maximum inscribed circle diameter is a robust particle size measurement method that can effectively reflect the minimum feature size of the particle and has good adaptability to the irregularity of the particle shape. When calculating, distance transformation can be performed on the binary region of each particle, and then the maximum value in the distance transformation graph of the region is found, which is the radius of the maximum inscribed circle. All successfully labeled and calculated equivalent diameter regions are counted into the total number of effective labeled regions, which will be used for subsequent particle density calculation.

[0043] Next, the equivalent diameters of all particles are arranged in descending order, and after removing the smallest particle group with equivalent diameter less than a preset threshold, the weighted average of the remaining particle equivalent diameters is calculated as the average diameter of the current flocculation stage. This step aims to optimize the calculation accuracy of the average diameter. By setting a preset threshold, image noise, small particles that have not fully flocculated or background impurities can be effectively filtered out, avoiding interference of these irrelevant small particles in the statistics of the average diameter. For example, a minimum identifiable floe size can be set as the threshold based on experience or historical data. After removing these small particles, the equivalent diameters of the remaining effective floe particles are weighted and averaged. Weighted average can be based on the area, perimeter or equivalent diameter of the particles, for example, particles with larger area can be given higher weight to better reflect their actual contribution in the flocculation process.

[0044] Finally, the total number of effective marked areas is divided by the actual water volume corresponding to the image to calculate the particle density value of the current flocculation stage. The actual water volume refers to the actual water volume covered by the image acquisition device in one imaging, which needs to be determined through system calibration. By dividing the total number of effective marked areas (i.e. the number of flocculation particles identified in the image) by the volume, the number of flocculation particles per unit volume of water can be obtained, thereby accurately quantifying the particle density of the current flocculation stage.

[0045] In some embodiments of the present application described above, when determining the average particle diameter of the current flocculation stage, the smallest particle group with an equivalent diameter less than a preset threshold needs to be removed. However, in actual water treatment process, water quality conditions and flocculation state are dynamically changing, if a fixed preset threshold is used to filter out the smallest particle group, it may not accurately reflect the real distribution of effective flocculation under different working conditions, thereby affecting the accuracy of subsequent coagulant dosage.

[0046] To this end, the present application further proposes that the process of removing the smallest particle group with an equivalent diameter less than a preset threshold when determining the average particle diameter uses an adaptive threshold method. Specifically, the method includes the following steps: first, all particle equivalent diameters are divided into several levels in order of size. This step aims to preliminarily quantify and classify the equivalent diameters of the flocculation particles identified by image analysis technology, for example, all calculated particle equivalent diameter data can be grouped according to a preset diameter interval (such as 0-10 microns, 10-20 microns, etc.), and the number of particles in each level is counted. This division helps to analyze the size distribution of particles for subsequent statistical analysis, and lays the foundation for identifying the characteristics of different size particle groups.

[0047] Secondly, the proportion distribution of the number of particles in each level to the total number of particles is calculated, and the first obvious local minimum point in the proportion distribution is found. After completing the particle level division, the percentage of the number of particles in each level to the total number of particles is calculated, thereby obtaining the frequency distribution of particle size. By analyzing the proportion distribution curve, the first significant local minimum point in the curve can be identified. This local minimum point usually represents a natural dividing line between small size particle groups and effective flocculation particle groups, and its appearance indicates that the proportion of particle number significantly decreases near this size range, indicating a transition region.

[0048] Next, the upper limit of the equivalent diameter range corresponding to the local minimum point is used as the dynamically determined removal threshold. Once the first obvious local minimum point in the proportional distribution is identified, the upper limit of the particle equivalent diameter class corresponding to that point is determined as the dynamic removal threshold. For example, if the local minimum point appears in the diameter class of 10 to 15 micrometers, then 15 micrometers will be set as the current removal threshold. This approach allows the removal threshold to be adaptively adjusted according to the actual particle distribution, rather than using a fixed empirical value.

[0049] Finally, based on a dynamically determined removal threshold, particles with an equivalent diameter smaller than the threshold are automatically filtered out, and the weighted average of the remaining particles is recalculated as the final average particle diameter. After determining the dynamic removal threshold, the system automatically filters and excludes all particles with an equivalent diameter smaller than that threshold. These filtered-out particles are generally considered to be small particles or impurities that have not yet grown sufficiently or contribute little to the flocculation effect. Subsequently, only the remaining particles with an equivalent diameter greater than or equal to the removal threshold are weighted and averaged to obtain a more representative average particle diameter. The weighted average can be calculated based on factors such as the number, area, or volume of particles to more accurately reflect the overall size characteristics of the effective flocs.

[0050] In practice, the key challenges in ensuring dosing control accuracy lie in accurately quantifying the deviation of the current floc state, efficiently and accurately selecting the best-matching records from a vast amount of historical data, and comprehensively utilizing these records to generate a reliable initial dosing adjustment coefficient. Inaccurate deviation quantification or insufficient utilization of historical data may lead to discrepancies between the initial dosing adjustment coefficient and actual requirements, affecting the optimization of coagulant dosing.

[0051] In this regard, refer to Figure 4 As shown, this application further proposes a method for obtaining a preliminary dosing adjustment coefficient that matches the current floc state deviation, including: comparing the currently calculated average particle diameter and density values ​​with preset standard diameter and standard density ranges respectively, calculating the absolute deviation values ​​from the midpoint of each range, and combining the two absolute deviation values ​​into a comprehensive deviation index according to preset weights; based on the comprehensive deviation index, retrieving operating records with similar water quality conditions to the current water quality parameters from a historical database, the operating records containing historical comprehensive deviation indices and their corresponding dosing adjustment coefficients; selecting several records with the smallest difference between the comprehensive deviation index and the current comprehensive deviation index from the retrieved operating records, and extracting their corresponding dosing adjustment coefficients; performing a weighted average calculation on the extracted multiple dosing adjustment coefficients, where the weights are determined based on the overall similarity between the corresponding historical records and the current operating conditions, and the calculation result is the preliminary dosing adjustment coefficient.

[0052] Specifically, the current calculated particle average diameter and density value are compared with the preset standard diameter range and standard density range, respectively, the absolute deviation value from the median value in the respective range is calculated, and the two absolute deviation values are combined into a comprehensive deviation index according to the preset weight, which aims to quantify the deviation degree between the current flocculation state and the ideal or target state. The preset standard diameter range and standard density range are usually determined by statistical analysis of historical data of multiple periods of stable system operation and water quality meeting standards, combined with expert experience or experiments. For example, a ideal diameter interval [D min, D max ] and a ideal density interval [P min , P max ] can be set; when calculating the absolute deviation value from the median value of the respective range, for the particle average diameter D current , the median value of the standard range can be set as (D min +D max ) / 2, and the diameter deviation value can be calculated as |D current -(D min +D max ) / 2|. Similarly, the density deviation value is calculated. The preset weight can be set according to the importance of diameter and density on flocculation effect, for example, if the diameter has a greater impact on flocculation effect, the diameter deviation can be given a higher weight, these weights are usually empirical values, and can also be optimized by machine learning model. The comprehensive deviation index can be synthesized in the form of weighted sum, for example: comprehensive deviation index = W D ×diameter deviation value + W P ×density deviation value, where W D and W P are the preset weights of diameter and density, respectively.

[0053] Based on the comprehensive deviation index, search for operation records with similar water quality parameters in the historical database, which contains historical comprehensive deviation indexes and their corresponding dosage adjustment coefficients; the purpose of this step is to find the most similar past operation experience from a large amount of historical data. The historical database is a database that stores long-term operation data, including timestamp, water quality parameters (such as turbidity, pH, temperature, etc.), flocculation characteristics (particle average diameter, density), comprehensive deviation index, and actual application of dosage adjustment coefficient, etc. The operation records with similar water quality parameters can be preliminarily screened by comparing the similarity of the current water quality parameters with the water quality parameters in the historical records. For example, a water quality parameter similarity threshold can be set to only retrieve historical records that meet the threshold, and similarity calculation can use methods such as Euclidean distance, cosine similarity, etc.

[0054] From the retrieved operational records, several records with the smallest difference between the overall deviation index and the current overall deviation index are selected, and their corresponding dosage adjustment coefficients are extracted. After initially screening records with similar water quality conditions, this step further refines the matching, focusing on records with the closest degree of floc state deviation. By selecting several records with the smallest difference in the overall deviation index, it can be ensured that the selected historical experience is highly relevant to the current problem. The difference calculation can be performed for each retrieved historical record, calculating the absolute difference between its historical overall deviation index and the current overall deviation index. A fixed number N can be set (e.g., N=3 or N=5), selecting the top N records with the smallest difference. Alternatively, a difference threshold can be set, selecting all records with differences less than the threshold.

[0055] The extracted adjustment coefficients are weighted and averaged. The weights are determined based on the overall similarity between the corresponding historical records and the current operating conditions. The result is the initial adjustment coefficient. This step aims to comprehensively utilize the experience of multiple similar historical records, avoiding the randomness or incomplete matching that may exist in a single historical record, thus generating a more robust and accurate initial adjustment coefficient. Weighted averaging assigns higher influence to historical records more similar to the current operating conditions. The overall similarity can comprehensively consider the similarity of water quality parameters, the closeness of comprehensive deviation indicators, and the similarity of other operating parameters that may affect flocculation (such as temperature, stirring intensity, etc.). For example, a comprehensive similarity function can be defined, which sums or multiplies the above multiple similarity components with weights. When calculating the weighted average, it is assumed that K adjustment coefficients (C1, C2, ..., C...) are extracted. K ) and their corresponding overall similarity weights (W1, W2, ..., W K If the initial adjustment factor C is added, then... preliminary =(W1×C1+W2×C2+...+W K ×C K ) / (W1+W2+...+W K ), similarity weights (W1, W2, ..., W K The weight is usually proportional to the similarity; the higher the similarity, the greater the weight.

[0056] By the technical solution, the application can quantitatively quantify the deviation of the current flocculation state from the ideal state, and accurately match and intelligently learn by using historical operation data. First, the average particle diameter and density value are compared with the preset standard range and synthesized into a comprehensive deviation index, realizing comprehensive and quantitative evaluation of the deviation degree of the flocculation state, and avoiding the one-sidedness that may be caused by a single index. Secondly, based on the comprehensive deviation index, the most relevant operation records are efficiently retrieved from the historical database by combining the water quality parameter similarity, ensuring the effectiveness of the reference historical experience. Finally, by weighting and averaging the adjustment coefficients of multiple matching records, and determining the weight according to the overall similarity between the historical records and the current working condition, the multi-source experience is effectively fused, the error and contingency that may be caused by a single historical data are reduced, thereby generating a more robust and more targeted preliminary coagulant dosage adjustment coefficient. This method significantly improves the accuracy and reliability of the preliminary coagulant dosage adjustment coefficient, provides a solid foundation for the subsequent optimization of the coagulant dosage, and further improves the control accuracy of the entire flocculation process and the stability of the effluent water quality.

[0057] In some embodiments of the application described above, the preliminary coagulant dosage adjustment coefficient is obtained by comparing the currently calculated average particle diameter and density value with the preset standard diameter range and standard density range. However, if these preset standard ranges fail to accurately reflect the optimal flocculation state of the system under different working conditions, or lack dynamic adaptability, the calculated deviation may not be accurate, thereby affecting the accuracy and stability of the coagulant dosage adjustment, and failing to continuously ensure the compliance of the effluent water quality.

[0058] To this end, the application further proposes that the preset standard diameter range and the preset standard density range are established in the following manner: during multiple historical periods when the system is stably running and the effluent water quality is up to standard, the corresponding average particle diameter and density value data sequences are simultaneously collected and recorded; the average particle diameter and density value data sequences recorded in each historical period are respectively statistically analyzed to calculate their respective average values and statistical distribution characteristics; based on the data distribution of each historical period, after removing the obviously outlying abnormal data points, the safe and stable running intervals of the average particle diameter and the density value are determined; the determined safe and stable running interval of the average particle diameter is taken as the preset standard diameter range, and the determined safe and stable running interval of the density value is taken as the preset standard density range.

[0059] Specifically, during multiple historical periods when the system is stably running and the effluent water quality meets the standards, the corresponding particle average diameter and density value data sequences are synchronously collected and recorded, aiming to obtain real running data representing ideal flocculation state. Here, "system stable running" generally means that the main operating parameters (such as raw water flow, raw water quality indicators, coagulant dosage, etc.) of the water treatment system fluctuate less within a period of time, and "effluent water quality meets the standards" means that key indicators such as effluent turbidity, color, COD, etc. continuously meet national or industry discharge standards. During this period, the average diameter and density value of the flocculent particles are monitored and recorded in real time through the image acquisition device, ensuring that the collected data sequences can truly reflect the flocculation characteristics of the system under optimal performance. The frequency of data collection can be set according to process requirements, for example, collecting once every few minutes or hours to accumulate sufficient data for subsequent analysis.

[0060] Subsequently, statistical analysis is performed on the particle average diameter and density value data sequences recorded in each historical period, and the average values and statistical distribution characteristics of each are calculated. The purpose of statistical analysis is to extract meaningful rules and trends from a large amount of raw data. The average value can intuitively reflect the central tendency of the flocculent characteristics in that period, for example, the arithmetic mean can be calculated. Statistical distribution characteristics can reveal the dispersion and distribution form of the data, for example, standard deviation, variance can be calculated to measure the volatility of the data, or histograms, box plots can be drawn to visualize the data distribution, so as to more comprehensively understand the stability of the flocculent state.

[0061] On this basis, based on the data distribution of each historical period, after removing obviously outlier abnormal data points, the safe and stable running interval of the particle average diameter and density value is determined. Outlier points are usually caused by sensor failure, instantaneous operating condition changes or operation errors, etc. Non-normal factors cause data anomalies, which do not represent the normal and stable running state of the system, so they need to be identified and removed to avoid interference with the accuracy of subsequent interval determination. The method of removing outliers can use statistical methods, such as 3σ criterion (i.e. data points beyond the range of average value plus or minus three standard deviations are considered abnormal), based on interquartile range (IQR) method, or more complex machine learning algorithms. After removing abnormal data, the determination of the safe and stable running interval can be based on the statistical confidence interval (for example, 95% or 99% confidence interval), or by analyzing the upper and lower limits of the data distribution (such as the 5th percentile and the 95th percentile) to set, so as to define the ideal range of particle average diameter and density value under the premise of ensuring that the effluent water quality meets the standards.

[0062] Finally, the determined particle average diameter safe and stable operation interval is taken as the preset standard diameter range, and the determined particle density value safe and stable operation interval is taken as the preset standard density range. The standard range established in this way is based on the real data of the water treatment system when it is actually stably operated and outputs qualified water quality, rather than empirical or fixed values. These dynamically established standard ranges will serve as the benchmark for the intelligent decision-making module to calculate the deviation of the current flocculation state, ensuring that the benchmark can accurately reflect the flocculation characteristics of the system under the best working condition.

[0063] In some embodiments of the present application, the deviation of the current particle average diameter and density value from the preset standard value is calculated, and the dosage adjustment records under similar water quality conditions are extracted from the historical data to obtain a preliminary dosage adjustment coefficient matching the current flocculation state deviation. However, during actual operation, there may be cases where similar operation records to the current water quality parameters cannot be retrieved from the historical database, which may result in the inability to effectively obtain the preliminary dosage adjustment coefficient, thereby affecting the accuracy and continuity of the coagulant dosage control.

[0064] To this end, the present application further proposes a method for obtaining a preliminary dosage adjustment coefficient when similar operation records to the current water quality parameters cannot be retrieved from the historical database, which includes: decomposing the comprehensive deviation index of the current particle average diameter and density value into a diameter deviation component and a density deviation component; retrieving records similar to the current diameter deviation component and records similar to the current density deviation component from the historical database respectively; selecting several records with the closest deviation from each of the two groups of retrieval results, extracting the corresponding dosage adjustment coefficients, and classifying and statistically analyzing the extracted adjustment coefficients; proportionally fusing the extracted adjustment coefficients according to the contribution proportion of the diameter deviation component and the density deviation component to the comprehensive deviation, to generate a preliminary dosage adjustment coefficient suitable for the current abnormal deviation condition.

[0065] Specifically, the comprehensive deviation index is a quantitative value that measures the deviation of the current flocculation state from the ideal standard state, which is usually a weighted combination of the deviation of the particle average diameter and the deviation of the particle density value. Decomposing it into a diameter deviation component and a density deviation component means that the overall influence of the comprehensive deviation is decomposed into two independent and traceable components. For example, if the comprehensive deviation index is a linear combination of the diameter deviation and the density deviation, then the decomposition is to extract the two original deviation values or their weighted contribution values. The purpose of this is to enable more detailed matching and analysis for a single dimension when there is a lack of overall matching data.

[0066] After the diameter deviation component and the density deviation component are decomposed, the system no longer attempts to find a historical record that completely matches the entire comprehensive deviation index, but instead retrieves records from the historical database that are similar to the current diameter deviation component and records that are similar to the current density deviation component. This retrieval strategy expands the scope of historical data utilization, enabling the finding of historical data with similarities in certain key parameters even if there is no complete match. For example, a similarity threshold can be set to retrieve all historical records with a diameter deviation component within ±X% of the current value and all historical records with a density deviation component within ±Y% of the current value.

[0067] Subsequently, from the two sets of historical records retrieved above, select several records that are closest to the current deviation components. For example, select the first N records for each deviation component whose value has the smallest Euclidean distance from the current deviation component. Extract the corresponding dosage adjustment coefficients from these records and perform classification statistics on them. Classification statistics can be the average or median calculation of the adjustment coefficients corresponding to the diameter deviation component, similar processing of the adjustment coefficients corresponding to the density deviation component, or more complex statistical analysis to obtain representative adjustment coefficients in each dimension.

[0068] Finally, according to the contribution proportion of the diameter deviation component and the density deviation component to the comprehensive deviation, perform proportional fusion calculation on the extracted adjustment coefficients. For example, if the weight of the diameter deviation in the calculation of the comprehensive deviation index is w d , and the weight of the density deviation is w rho , then the final preliminary dosage adjustment coefficient can be represented as (w d × diameter adjustment coefficient) + (w rho × density adjustment coefficient). This fusion method ensures that in the absence of complete matching data, a reasonable and representative preliminary dosage adjustment coefficient can still be generated according to the relative importance of each deviation component, thereby adapting to the current unique deviation situation.

[0069] In actual water treatment processes, water flow is not constant, and if only the floe state is used to adjust the dosage coefficient while ignoring the real-time water flow changes, it may lead to a mismatch between the coagulant dosage and the actual water volume, affecting the coagulation effect or causing waste of chemicals.

[0070] To this end, refer to Figure 5As shown, the present application further proposes a method of updating the coagulant dosage by combining the preliminary dosage adjustment coefficient with the real-time monitored water flow data, which specifically includes: obtaining the coagulant reference dosage rate based on which the current system operates, and collecting water flow data in real time; calculating the flow proportion component of the coagulant dosage requirement according to the current water flow data; performing fusion operation on the preliminary dosage adjustment coefficient and the flow proportion component to generate a comprehensive dosage adjustment factor; applying the comprehensive dosage adjustment factor to the reference dosage rate to calculate the theoretical dosage; combining the minimum adjustment precision and the maximum adjustment range of the dosing equipment to engineer the theoretical dosage, and outputting the optimized dosage value that can be directly executed.

[0071] Among them, the coagulant reference dosage rate based on which the current system operates is obtained, and water flow data is collected in real time. The coagulant reference dosage rate is usually an initial reference value determined according to the design parameters of the water treatment plant, historical operation experience or preliminary optimization experiment, which represents the required dosage rate of the agent to maintain good coagulation effect under standard or design flow. The rate can be a fixed value, or a ladder value preset according to the fluctuation range of raw water quality. Real-time acquisition of water flow data is continuously obtained through the flow meter (such as electromagnetic flow meter, ultrasonic flow meter or vortex flow meter, etc.) installed in the water inlet pipeline or the entrance of flocculation tank of the water treatment system. These flow meters can convert water flow velocity or volume flow into electrical signals and transmit them to the control system to reflect the current actual water quantity.

[0072] The flow proportion component of the coagulant dosage requirement is calculated according to the current water flow data. The flow proportion component aims to quantify the degree of change of the current water flow relative to a certain reference flow (such as design flow, average flow or flow corresponding to the reference dosage rate). Its calculation method is usually the ratio of the current real-time flow to the reference flow, for example: flow proportion component=(current real-time flow / reference flow). This component intuitively reflects the linear adjustment of coagulant requirement caused by water quantity change.

[0073] The preliminary dosage adjustment coefficient and the flow proportion component are fused to generate a comprehensive dosage adjustment factor. The purpose of fusion operation is to combine the preliminary dosage adjustment coefficient based on the dynamic change of floc (reflecting the demand of water quality and flocculation effect) with the flow proportion component based on the change of water flow (reflecting the demand of water quantity) organically. Common fusion operation methods include multiplication fusion (for example, comprehensive dosage adjustment factor=preliminary dosage adjustment coefficient x flow proportion component), weighted average fusion or fusion based on fuzzy logic. Through this fusion, a more comprehensive and accurate comprehensive dosage adjustment factor can be generated, which considers the influence of water quality change and water quantity change on coagulant dosage.

[0074] The theoretical dosage is calculated by applying the comprehensive dosage adjustment factor to the baseline dosage rate. The application usually means multiplying the comprehensive dosage adjustment factor by the baseline dosage rate of coagulant, that is, theoretical dosage = baseline dosage rate of coagulant x comprehensive dosage adjustment factor. This theoretical dosage represents the total amount of coagulant that should be ideally dosed under the current floc state and water flow conditions.

[0075] The theoretical dosage is engineeringly rounded off in combination with the minimum adjustment precision and maximum adjustment range of the dosing equipment, and the optimized dosage value that can be directly executed is output. The engineering rounding off takes into account the physical limitations of the actual dosing pump equipment. The minimum adjustment precision refers to the smallest dosage change step that the dosing pump can achieve, for example, the stroke or frequency of the pump can only be adjusted in a certain increment. The maximum adjustment range refers to the maximum and minimum dosage that the dosing pump can reach. The rounding off process may include rounding off the theoretical dosage to the nearest adjustable value of the equipment, or limiting it within the executable range when the theoretical dosage exceeds the maximum or minimum range of the equipment. In this way, the output optimized dosage value is an instruction that can be accurately executed by the actual equipment.

[0076] Specifically, in the actual operation process, when the adjustment direction indicated by the preliminary dosage adjustment coefficient is inconsistent with the adjustment direction indicated by the water flow change trend, for example, the floc state shows that the dosage needs to be reduced, but the water flow is increasing, the simple fusion operation may cause conflict or instability of the dosage adjustment strategy, affecting the accurate control of the coagulation effect.

[0077] To this end, the application further proposes that, in the fusion operation step, when the adjustment direction indicated by the preliminary dosage adjustment coefficient is inconsistent with the adjustment direction indicated by the flow change trend, the following priority decision mechanism is adopted: obtaining the severity level of the current flocculation state comprehensive deviation; if the severity level exceeds a preset first threshold, the adjustment direction indicated by the preliminary dosage adjustment coefficient is given priority, and the flow change trend is used as an auxiliary correction term for fusion; if the severity level does not exceed the preset first threshold but exceeds a preset second threshold, the preliminary dosage adjustment coefficient and the flow change trend are given the same weight for balanced fusion; if the severity level does not exceed the preset second threshold, the adjustment direction indicated by the flow change trend is given priority, and the preliminary dosage adjustment coefficient is used as an auxiliary correction term for fusion.

[0078] Specifically, obtaining the severity level of the current flocculation state comprehensive deviation refers to quantitatively classifying the comprehensive deviation index calculated by comparing the average particle diameter and density value with the preset standard value. The level can be determined according to a plurality of preset threshold intervals, for example, the comprehensive deviation index is divided into different levels such as "slight", "moderate", "severe", and each level corresponds to a specific deviation range. This step aims to provide a quantitative basis for subsequent decision-making to judge the stability and risk level of the current flocculation process.

[0079] When the obtained severity level exceeds the preset first threshold, it indicates that the deviation of the current flocculation state is very serious, and the flocculation effect has deviated significantly from the target. In this case, correcting the floc state is the top priority, therefore, the adjustment direction indicated by the preliminary adjustment coefficient (which directly reflects the deviation of the floc state) will dominate to ensure that the floc state is quickly and effectively pulled back to the normal range. At this time, the flow change trend is still an important factor, but its role is downgraded to an auxiliary correction term for integration to avoid interference with the emergency correction of the floc state due to flow fluctuations. For example, a larger weight factor can be set for the preliminary adjustment coefficient, and a smaller weight factor can be set for the flow change trend.

[0080] If the severity level does not exceed the preset first threshold but exceeds the preset second threshold, it indicates that the flocculation state deviation is moderate. In this case, both the adjustment of the floc state and the influence of the water flow change on the dosage need to be considered. Therefore, the present scheme adopts a balanced integration strategy, i.e., the preliminary adjustment coefficient and the flow change trend are given the same weight. This ensures that the dosage adjustment can respond to the deviation of the floc state and adapt to the normal fluctuations of the water flow, thereby maintaining the overall stability of the system. For example, a simple arithmetic mean or weighted mean can be used, in which the weights of the two factors are equal.

[0081] When the severity level does not exceed the preset second threshold, it indicates that the flocculation state deviation is slight, and the flocculation process is in a relatively stable state. At this time, the fine-tuning requirement for the floc state is not so urgent, and the real-time change of the water flow may have a more significant impact on the coagulant demand. Therefore, in this case, the adjustment direction indicated by the flow change trend should be given priority to ensure that the coagulant dosage can match the change of the water flow in a timely and accurate manner, maintaining the dynamic balance of the dosage. The preliminary adjustment coefficient is used as an auxiliary correction term for fine-tuning to further optimize the flocculation effect. For example, a larger weight factor can be set for the flow change trend, and a smaller weight factor can be set for the preliminary adjustment coefficient.

[0082] By introducing a priority decision mechanism based on the comprehensive deviation severity level of the flocculation state, the application can intelligently solve the conflict problem of the initial dosage adjustment coefficient and the flow change trend indication direction. When the flocculation state deviation is serious, the flocculation state is corrected first to ensure the rapid recovery of process stability; when the deviation is moderate, the flocculation state and the flow change are balanced to achieve robust control; when the deviation is slight, the flow change is mainly considered to ensure the dynamic matching of the dosage and the water flow. This hierarchical decision mechanism makes the coagulant dosage control more refined and intelligent, effectively avoids the dosage fluctuation or control failure caused by simple fusion, and significantly improves the accuracy of coagulant dosage and the operation stability of the water treatment system, ensuring the continuous compliance of the effluent water quality.

[0083] Referring to Figure 6 As shown in the figure, the application further proposes a coagulant dosage control system based on visual recognition of flocculation dynamic changes, which is used to implement the above method. The system includes an image acquisition and processing module, a flocculation feature analysis module, an intelligent decision module, a dosage optimization module, and a control execution and feedback module.

[0084] The image acquisition and processing module is used to acquire image data of the flocculation process in the water body in real time through an image acquisition device, and to perform image enhancement processing on the acquired original image to highlight the flocculation particle boundary, and output a clear particle distribution image; The flocculation feature analysis module is connected with the image acquisition and processing module, and is used to identify the size and quantity characteristics of the flocculation particles based on the particle distribution image through image analysis technology, and to determine the average particle diameter and density value of the current flocculation stage; The intelligent decision module is connected with the flocculation feature analysis module, and is used to calculate the deviation of the current average particle diameter and density value from the preset standard value, to extract the dosage adjustment records under similar water quality conditions from the historical data, and to obtain a preliminary dosage adjustment coefficient matched with the current flocculation state deviation; The dosage optimization module is connected with the intelligent decision module, and is used to combine the preliminary dosage adjustment coefficient with the real-time monitored water flow data, to update the coagulant dosage through calculation, and to obtain the optimized dosage for the current working condition; The control execution and feedback module is connected with the dosage optimization module, and is used to generate a control instruction according to the optimized dosage, and to send it to the dosing pump device to adjust the dosing speed or stroke of the dosing pump device to change the actual dosage of the coagulant per unit time, and to continuously receive the updated flocculation image data from the image acquisition and processing module to verify the adjustment effect, forming a closed loop continuous regulation and control of the flocculation process state.

[0085] Obviously, the above embodiments are merely example for clearly illustrating, and are not limitation to the embodiments. Based on the above description, other different forms of changes or variations can be made by those skilled in the art. Here, all the embodiments are not required to be enumerated, and the obvious changes or variations derived from the above are still within the protection scope of the present application.

Claims

1. A coagulant dosing control method based on visual recognition of floc dynamic changes, applied to a flocculation process section of a water treatment system, characterized in that, The method comprises the following steps: Real-time image data of the flocculation process in the water body is collected by an image collection device, and the collected original image is subjected to image enhancement processing to highlight the flocculation particle boundary, so that a clear particle distribution image is obtained; Based on the particle distribution image, the size and number characteristics of the flocculation particles are identified by image analysis technology to determine the particle average diameter and density value of the current flocculation stage; The deviation of the current particle average diameter and density value from the preset standard value is calculated, the dosage adjustment record under similar water quality conditions is extracted from the historical data, and a preliminary dosage adjustment coefficient matching the current flocculation state deviation is obtained; The preliminary dosage adjustment coefficient is combined with the real-time monitored water flow data, the coagulant dosage is updated by calculation, and the optimized dosage for the current working condition is obtained; The control instruction is generated according to the optimized dosage and is sent to the dosing pump device to adjust the dosing speed or stroke of the pump device, so as to change the actual coagulant dosage per unit time, continuously monitor the updated flocculation image to verify the adjustment effect, and realize continuous regulation and control of the flocculation process state.

2. The method according to claim 1, wherein the method is characterized by: The original image collected is subjected to image enhancement processing to highlight the flocculation particle boundary, so that a clear particle distribution image is obtained, which comprises: The original image is subjected to noise reduction and brightness compensation to obtain an initial image with a uniform background; The initial image is subjected to local contrast adaptive enhancement, the enhancement intensity is dynamically adjusted according to the gray distribution of each region of the image, the outline features of the flocculation particle edges are enlarged, and an edge enhanced image is generated; The edge enhanced image is subjected to gradient detection and edge connection to identify and strengthen the obvious boundary, and the incomplete edge fragments meeting the conditions are connected into continuous boundaries based on the preset geometric continuity rules, so that a complete flocculation boundary image is obtained; The flocculation boundary image is converted into a binary image, and morphological optimization processing is performed on the binary image to eliminate noise points and fill the gaps in the boundary, so that a clear particle distribution image for subsequent feature identification is output.

3. The method according to claim 1, wherein the method is characterized by: The particle average diameter and density value of the current flocculation stage are determined, which comprises: A particle labeling operation is performed on the particle distribution image, each independent flocculation particle region is assigned a unique identifier, and the geometric outline information of each labeled region is extracted; Based on the geometric outline information of each particle, the maximum inscribed circle diameter of each particle is calculated as the equivalent diameter of the particle, and the total number of effective labeled regions in the image field of view is counted; After arranging all the equivalent diameters of the particles in descending order and removing the smallest particle group with an equivalent diameter less than a preset threshold, the weighted average value of the equivalent diameters of the remaining particles is calculated as the particle average diameter of the current flocculation stage; The total number of effective labeled regions is divided by the actual water sampling volume corresponding to the image to calculate the particle density value of the current flocculation stage.

4. The method according to claim 3, wherein the method is characterized by: In the process of removing the smallest particle group with an equivalent diameter less than a preset threshold when determining the particle average diameter, an adaptive threshold method is adopted, which comprises: All the particle equivalent diameters are divided into several levels according to size; The proportion distribution of the number of particles in each level to the total number of particles is calculated, and the first obvious local minimum point in the proportion distribution is found out; The upper limit value of the equivalent diameter range corresponding to the local minimum point is taken as the dynamically determined removal threshold value; After automatically filtering out the particle groups with an equivalent diameter less than the removal threshold value according to the dynamically determined removal threshold value, the weighted average value of the remaining particles is recalculated as the final average particle diameter.

5. The method according to claim 1, wherein the method is characterized by: A preliminary dosage adjustment coefficient matching the current deviation of the flocculation state is obtained, including: The current calculated average particle diameter and density value are compared with the preset standard diameter range and standard density range respectively, the absolute deviation value from the median value in each range is calculated, and the two absolute deviation values are combined into a comprehensive deviation index according to the preset weight; Based on the comprehensive deviation index, the operation records with similar water quality parameters to the current water quality parameters are retrieved from the historical database, and the operation records contain the historical comprehensive deviation index and the corresponding dosage adjustment coefficient; From the retrieved operation records, a number of records with the smallest difference between the comprehensive deviation index and the current comprehensive deviation index are selected, and the corresponding dosage adjustment coefficients are extracted; The extracted multiple dosage adjustment coefficients are weighted and averaged, and the weight is determined according to the overall similarity between the corresponding historical record and the current operating condition. The calculation result is the preliminary dosage adjustment coefficient.

6. The method according to claim 5, wherein the method is characterized by: The preset standard diameter range and standard density range are established by the following method: During the stable operation of the system and the compliance of the effluent water quality, the corresponding average particle diameter and density value data sequences are synchronously collected and recorded in multiple historical periods; The average particle diameter and density value data sequences recorded in each historical period are statistically analyzed respectively to calculate the average value and statistical distribution characteristics; Based on the data distribution of each historical period, after removing the obviously outlying abnormal data points, the safe and stable operation interval of the average particle diameter and the density value is determined; The determined safe and stable operation interval of the average particle diameter is taken as the preset standard diameter range, and the determined safe and stable operation interval of the particle density value is taken as the preset standard density range.

7. The method according to claim 5, wherein the method is characterized by: When no operation record similar to the current water quality parameters can be retrieved from the historical database, the method for obtaining the preliminary dosage adjustment coefficient includes: The comprehensive deviation index of the current average particle diameter and density value is decomposed into a diameter deviation component and a density deviation component; Records similar to the current diameter deviation component and records similar to the current density deviation component are retrieved from the historical database respectively; A number of records closest to the deviation are selected from the two groups of retrieval results respectively, the corresponding dosage adjustment coefficients are extracted, and the extracted adjustment coefficients are classified and counted; According to the contribution proportion of the diameter deviation component and the density deviation component to the comprehensive deviation, the extracted adjustment coefficients are proportionally fused to generate a preliminary dosage adjustment coefficient suitable for the current abnormal deviation.

8. The method according to claim 1, wherein the method is characterized by: The preliminary dosage adjustment coefficient is combined with the real-time monitored water flow data to update the coagulant dosage, including: The coagulant reference dosage rate based on the current system operation is obtained, and the water flow data is collected in real time; The flow proportion component of the coagulant dosage requirement is calculated according to the current water flow data; The preliminary dosing adjustment coefficient is fused with the flow proportion component to generate a comprehensive dosing adjustment factor; The comprehensive dosing adjustment factor is applied to the reference dosing rate to calculate a theoretical dosing amount; The theoretical dosing amount is engineering-modified according to the minimum adjustment precision and the maximum adjustment range of the dosing equipment to output an optimized dosing amount value that can be directly executed.

9. The method according to claim 8, wherein the method is characterized by: In the fusion operation step, when the adjustment direction indicated by the preliminary dosing adjustment coefficient is inconsistent with the adjustment direction indicated by the flow change trend, the following priority decision mechanism is adopted: Obtain the severity level of the current flocculation state comprehensive deviation; If the severity level exceeds the preset first threshold value, the adjustment direction indicated by the preliminary dosing adjustment coefficient is given priority, and the flow change trend is used as an auxiliary correction term for fusion; If the severity level does not exceed the preset first threshold value but exceeds the preset second threshold value, the preliminary dosing adjustment coefficient and the flow change trend are balanced and fused with the same weight; If the severity level does not exceed the preset second threshold value, the adjustment direction indicated by the flow change trend is given priority, and the preliminary dosing adjustment coefficient is used as an auxiliary correction term for fusion.

10. A coagulant dosing control system based on visually identifying floc dynamic changes, for implementing the method of any one of claims 1 to 9, characterized in that: It comprises: An image acquisition and processing module for real-time acquisition of image data of the flocculation process in the water body through an image acquisition device, and image enhancement processing of the acquired original image to highlight the particle boundary of the floc, and output of a clear particle distribution image; A floc feature analysis module connected with the image acquisition and processing module, for identifying the size and quantity characteristics of the floc particles based on the particle distribution image through image analysis technology, and determining the average particle diameter and density value of the current flocculation stage; An intelligent decision-making module connected with the floc feature analysis module, for calculating the deviation of the current average particle diameter and density value from the preset standard value, extracting the dosing adjustment records under similar water quality conditions from the historical data, and obtaining a preliminary dosing adjustment coefficient matching the current floc state deviation; A dosing amount optimization module connected with the intelligent decision-making module, for combining the preliminary dosing adjustment coefficient with the real-time monitored water flow data, updating the coagulant dosing amount through calculation, and obtaining an optimized dosing amount for the current working condition; A control execution and feedback module connected with the dosing amount optimization module, for generating a control instruction according to the optimized dosing amount and sending it to the dosing pump equipment to adjust the dosing speed or stroke of the dosing pump equipment to change the actual dosing amount of the coagulant per unit time, and continuously receiving the updated floc image data from the image acquisition and processing module to verify the adjustment effect, forming a closed-loop continuous regulation and control of the flocculation process state.

Citation Information

Patent Citations

  • Sewage treatment system and method based on image acquisition

    CN112919605A

  • Method for predicting and controlling dosage of high-density clarification tank based on multi-dimensional scoring model

    CN114781249A

  • Coagulation clarification tank accurate dosing method and system based on machine learning and image recognition

    CN118579911A

  • Intelligent coagulant adding control method and system based on image recognition and multi-parameter modeling

    CN120535101A

  • Water plant intelligent dosage prediction method based on data preprocessing

    CN121189940A

Cited By

  • Coagulation dosing control method and system based on image processing and analogue simulation

    CN122157831A

  • A coagulant dosing control method and system based on image processing and simulation

    CN122157831B