Computer-aided adaptive flocculant adding system for sewage treatment

The computer AI vision-based wastewater treatment flocculant adaptive addition system solves the problems of reagent waste and excessive effluent quality caused by manual experience-based and quantitative constant dosage modes. It achieves precise adjustment of flocculants and real-time quantitative perception of flocculation reactions, adapts to dynamic changes in water quality, and meets the energy-saving and consumption-reducing requirements of wastewater treatment.

CN123170774APending Publication Date: 2026-11-27CHINESE RES ACAD OF ENVIRONMENTAL SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611252934.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing wastewater treatment systems, the manual experience-based and quantitative constant dosage mode makes it difficult to achieve precise adjustment of flocculants, resulting in waste of reagents and excessive effluent. Furthermore, the lack of real-time online quantitative perception of the flocculation reaction process makes it unable to adapt to dynamic changes in water quality.

Method used

An adaptive dosing system based on computer AI vision is adopted. Through multi-source influent data prediction, visual dynamic tracking of flocculation state, and multi-dimensional quantification of flocculation dynamics, the system achieves coordinated adaptive correction of the reagents. It includes an influent pollution feature prediction module, a flocculation visual time sequence perception module, and a reagent compensation amount calculation module. It combines a long short-term memory network and a support vector machine model for real-time adjustment.

Benefits of technology

It enables precise dosing of flocculants, reduces chemical consumption, ensures stable effluent quality, lowers operation and maintenance costs, adapts to changes in water quality, and meets the energy-saving and consumption-reducing requirements of wastewater treatment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123170774A_ABST
    Figure CN123170774A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of machine vision intelligent control, and relates to a computer AI vision-based flocculant self-adaptive adding system for sewage treatment. The method comprises the following steps: an inflow pollution characteristic pre-judgment module collects inflow water quality and working condition data, obtains a pollution characteristic vector through SVM analysis, and outputs an initial composite flocculant ratio through table lookup; a flocculation visual time sequence sensing module collects flocculation images after dosing, generates a floc evolution trajectory sequence through LSTM, and calculates a settling velocity and an aggregation degree parameter through floc tracking; a reagent compensation amount calculation module analyzes the flocculation reaction dynamic evolution state based on the two parameters, and solves reagent compensation values of each component when the indicators do not meet the standards; and a self-adaptive dosing execution module completes collaborative correction and boundary constraint calculation in combination with the initial ratio and the compensation values, generates a target ratio, and issues an instruction to drive the equipment to dose. The system can avoid water quality mutation leading to effluent exceeding the standard or reagent waste, realize all-weather uninterrupted monitoring, and meet the management and control requirements of precise consumption reduction of sewage treatment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of machine vision intelligent control technology, and in particular relates to an adaptive flocculant addition system for wastewater treatment based on computer AI vision. Background Technology

[0002] Flocculation and sedimentation are the core unit of solid-liquid separation in the treatment processes of various industrial wastewaters, such as municipal sewage, dyeing and printing, electroplating, and food processing. The dosage of flocculant directly determines the removal efficiency of pollutants such as suspended solids, color, total phosphorus, and heavy metals in the effluent, and is also a major component of the energy consumption cost of wastewater treatment chemicals. Currently, the mainstream dosing control methods in the industry are still mainly based on two schemes: manual experience-based operation and fixed flow rate quantitative dosing, which have shortcomings in industry application that are difficult to eradicate.

[0003] The manual control model relies entirely on maintenance personnel to observe the morphology of flocs in the reaction tank and the turbidity of the effluent to determine the dosage. However, the judgment standards of different maintenance personnel vary subjectively, making it difficult to establish a unified quantitative control benchmark. Furthermore, manual monitoring cannot be maintained 24 / 7, and delays are likely to occur during nighttime, shift changes, and periods of sudden changes in influent water quality load. Fluctuations in influent turbidity, pH, and instantaneous flow rate can easily lead to insufficient dosage resulting in excessive effluent quality, or excessive dosage causing waste and increased sludge production. At the same time, there is a risk of losing experienced maintenance personnel with mature floc assessment skills, and the training period for new employees is lengthy, leading to continuously rising maintenance labor costs for the company.

[0004] The quantitative constant-volume dosing mode relies on a preset fixed ratio to output flocculant, which is only suitable for ideal operating conditions where the influent water quality is stable over a long period of time, and does not have the ability to dynamically and adaptively adjust the water quality. The few existing automated dosing devices rely on a single water quality sensor threshold for simple segmented adjustment, without real-time online quantitative sensing of floc formation and sedimentation dynamics during the flocculation reaction process, and cannot simultaneously capture microscopic flocculation characteristics such as floc particle size, density, and settling velocity. When there are drastic fluctuations in the influent pollutant composition and water flow conditions, the control and adjustment lag is significant, and the amount of reagent saving is limited, making it difficult to meet the rigid control requirements of energy saving, consumption reduction, and precise pollution treatment in wastewater treatment plants under current policies.

[0005] In recent years, machine vision and deep learning algorithms have been gradually introduced into the field of water environment monitoring. However, existing visual monitoring solutions are limited to simple acquisition of floc images and basic particle size statistics, and have obvious technical defects: First, they lack long-term floc evolution trajectory prediction models, making it impossible to predict the development trend of flocculation reaction in advance, and only able to make passive corrections after the fact; Second, they do not combine floc fractal structure, collision frequency and other dynamic indicators to comprehensively evaluate the flocculation effect, and the evaluation of a single visual parameter has a large bias; Third, they do not consider the synergistic effect between multiple components of composite flocculants, and the agent compensation is only adopted by simple linear superposition, which is prone to imbalance of ratio and repeated fluctuations in flocculation effect. Summary of the Invention

[0006] Therefore, it is necessary to address the aforementioned technical issues by providing a computer AI vision-based adaptive flocculant addition system for wastewater treatment that enables intelligent prediction of multi-source influent data, long-term visual dynamic tracking of flocs, multi-dimensional quantitative evaluation of flocculation kinetics, and synergistic adaptive correction of composite agents.

[0007] In the first aspect, this application provides a computer AI vision-based adaptive flocculant addition system for wastewater treatment, including:

[0008] The influent pollution feature prediction module is used to collect influent water quality parameters and single-point operating condition data at the inlet of the sewage treatment system. The influent water quality parameters and single-point operating condition data are input into a pre-trained support vector machine model for feature parsing to obtain the pollution feature vector of the current sewage. It is also used to query a pre-built mapping table of pollution features and composite flocculant ratios based on the pollution feature vectors to match and determine the initial composite flocculant composition ratio corresponding to the current sewage pollution features.

[0009] The flocculation visual temporal perception module is used to acquire images of the flocculation state of the water body after adding flocculant according to the initial compound flocculant group ratio in the flocculation reaction tank. The flocculation state images are input into a long short-term memory network model for image feature extraction, and the morphological evolution trajectory sequence in the reaction tank is output. It is also used to identify the floc contour and track the floc movement trajectory of the morphological evolution trajectory sequence, and calculate the global settling velocity parameters and aggregation degree parameters of the corresponding flocs.

[0010] The reagent compensation calculation module is used to calculate the rate of change of physical state of the flocculation reaction process based on the global settling velocity parameter and the degree of polymerization parameter, and to determine the dynamic evolution state of the current flocculation reaction based on the rate of change of physical state. If the core quantitative indicators in the dynamic evolution state of the flocculation reaction do not meet the preset threshold, the corresponding reagent addition compensation value is calculated based on the dynamic evolution state of the flocculation reaction.

[0011] The adaptive dosing execution module is used to perform a ratio superposition correction calculation between the reagent dosing compensation value and the initial compound flocculant group allocation ratio to obtain the target compound flocculant group allocation ratio adapted to the current water quality; it is also used to generate dosing control instructions based on the target compound flocculant group allocation ratio, and execute the flocculant dosing of the corresponding group allocation ratio through the dosing control instructions.

[0012] Secondly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the system as described above.

[0013] Thirdly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the system as described above.

[0014] The aforementioned computer AI-based visual wastewater treatment flocculant adaptive addition system, computer equipment, and storage media, with each module sequentially performing influent water quality prediction, visual monitoring of flocculation status, calculation of reagent compensation, and precise flocculant dosing, is as follows: First, the influent pollution feature prediction module collects real-time water quality indicators and raw data of influent operating conditions at the wastewater treatment system influent points. After fusing and reducing the dimensionality of multi-source data, it inputs the data into a pre-trained support vector machine to perform pollution feature analysis, outputting pollution feature vectors that quantify the wastewater pollution components and concentration levels. Then, based on a preset mapping table, it performs feature matching and outputs an initial composite flocculant composition ratio adapted to the current influent load. This initial ratio is synchronously transmitted to the two downstream modules as a visual monitoring benchmark and a ratio correction benchmark. Second, the flocculation visual temporal perception module receives the initial composition ratio from the influent pollution feature prediction module. After dosing the reagent in the flocculation reaction tank according to this ratio, it continuously collects flocculation images of the water in the tank. Based on a long short-term memory network, it extracts temporal image features and outputs a floc morphology evolution trajectory sequence. The process involves four steps: First, contour recognition and cross-frame floc tracking are performed to quantitatively calculate global settling velocity parameters and floc aggregation degree parameters. These two sets of core quantitative indicators of flocculation effect are then transmitted to the reagent compensation calculation module. Second, the reagent compensation calculation module receives the two types of quantitative parameters—settling velocity and aggregation degree—and substitutes them into the flocculation kinetic model to solve for the rate of change of the physical state of the flocculation reaction. This rate of change fully characterizes the entire dynamic evolution process of the flocculation reaction. Each core indicator during the evolution process is compared with a preset threshold. When an indicator fails to meet the process standard, the module calculates the corresponding dosage compensation value for each component reagent based on the dynamic evolution law of flocculation. This compensation value, along with the initial ratio, is then synchronously pushed to the adaptive dosing execution module. Third, the adaptive dosing execution module receives the initial composite flocculant group allocation ratio and the reagent dosing compensation value. It completes the synergistic superposition and boundary constraint correction calculations of the multi-component reagent ratios to generate a target composite flocculant group allocation ratio adapted to real-time water quality fluctuations. Based on the target ratio, a standardized dosing control command is generated and sent to the on-site dosing execution unit to complete the synchronous quantitative dosing of the multi-component flocculant.

[0015] This invention differs from traditional delayed control modes that rely solely on feedback from the effluent. It proactively identifies water quality load fluctuations through multi-source influent data and simultaneously integrates AI vision to quantify the microscopic reaction state of flocs. With dual data support, it improves the response speed of reagent ratio adjustments, effectively avoiding problems such as excessive effluent and reagent consumption caused by sudden water quality changes. The system utilizes machine vision and temporal deep learning algorithms to perform a comprehensive quantitative assessment of floc state, replacing subjective human judgment of floc morphology, standardizing flocculation effect evaluation, and supporting 24 / 7 uninterrupted online monitoring. This eliminates management gaps caused by manual on-duty personnel and shift changes, while solidifying operational experience into standardized algorithm models to avoid operational capability gaps caused by personnel turnover. The system is based on a comprehensive table of floc settling dynamics and fractal structure theory. The system assesses the evolution of the flocculation reaction, calculates the incremental reagent compensation through multi-index coupling, and introduces a component synergistic correction matrix for ratio superposition correction. This fully considers the synergistic and antagonistic effects between multiple flocculants, achieving higher ratio correction accuracy compared to traditional simple linear dosing adjustment, and can stably reduce the overall consumption of flocculant. The system adopts a modular and hierarchical architecture, with each module directly adaptable to the existing dosing equipment, sensing devices, and control cabinets of wastewater treatment plants. This eliminates the need for large-scale modifications to the existing water treatment process, resulting in short equipment downtime, strong compatibility, and fully automated operation that significantly reduces on-site manual maintenance. It also continuously stabilizes core pollutant indicators such as effluent color, suspended solids, and total phosphorus, meeting the current energy-saving, consumption-reducing, and precise pollution control requirements in the wastewater treatment field. Attached Figure Description

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

[0017] Figure 1 This is a structural block diagram of a computer AI vision-based adaptive flocculant addition system for wastewater treatment provided in an embodiment of the present invention.

[0018] Figure 2 This is a flowchart provided by an embodiment of the present invention, which shows how to input flocculation state images into a long short-term memory network model for image feature extraction and output a sequence of morphological evolution trajectories within a reaction tank.

[0019] Figure 3 A schematic diagram illustrating the entire wastewater treatment process layout of the AI ​​visual flocculation control system provided in this embodiment of the invention;

[0020] Figure 4A comparison chart of the frequency of turbidity exceeding the standard in the effluent under the two dosing modes provided in the embodiments of the present invention within three statistical periods of weeks, months, and years;

[0021] Figure 5 This is a schematic diagram of the operation interface of the local / cloud-based digital twin monitoring platform provided in an embodiment of the present invention. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0023] Secondly, the implementation environment of this application embodiment will be described. Exemplarily, this implementation environment includes four main components: a wastewater treatment main process unit, an online sensing hardware unit, an intelligent control and computing unit, and an on-site dosing execution unit. The wastewater treatment main process unit sequentially includes an inlet screen, a regulating tank, a flocculation reaction tank, a sedimentation tank, and a clear water tank, providing a complete wastewater flocculation treatment operating condition carrier for this system. The online sensing hardware unit is located at the inlet and within the flocculation reaction tank, and includes a pH sensor, a turbidity sensor, a flow transmitter, an industrial high-definition camera acquisition device, and a level sensor, used to collect inlet water quality, operating condition data, and images of flocculated flocs in the tank in real time. The intelligent control and computing unit is equipped with local data analysis... The control system's dedicated control cabinet has a built-in memory and processor, storing various algorithm models, parameter thresholds, and feature ratio mapping tables. It executes all data parsing, feature calculation, and reagent ratio calculation logic for the four major modules. The on-site dosing execution unit includes multiple reagent storage tanks, a stirring and dosing mechanism, and a multi-channel quantitative dosing pump. It receives dosing control commands from the intelligent control and computing unit to complete the synchronous quantitative dosing of multiple components of the composite flocculant. The units communicate with each other through a standard industrial communication interface to achieve bidirectional data transmission. The entire implementation environment can be directly modified and built in existing municipal sewage and industrial wastewater treatment plants without large-scale dismantling and modification of the original sewage treatment process.

[0024] In one embodiment, such as Figure 1 As shown, this application provides a computer AI vision-based adaptive flocculant addition system for wastewater treatment, which may include:

[0025] The influent pollution feature prediction module 101 is used to collect influent water quality parameters and single-point influent operating condition data at the inlet of the sewage treatment system, input the influent water quality parameters and single-point influent operating condition data into a pre-trained support vector machine model for feature parsing, and obtain the pollution feature vector of the current sewage; it is also used to query a pre-constructed mapping relationship table between pollution features and composite flocculant ratio based on the pollution feature vector, and match and determine the initial composite flocculant composition ratio corresponding to the current sewage pollution features.

[0026] Specifically, at the hardware level, the modules are linked and deployed at the front end of the sewage treatment system's inlet channel and equalization tank to continuously collect two types of basic data: the first type is influent water quality parameters, including indicators that can directly characterize pollutant content such as water turbidity, pH value, conductivity, COD, total phosphorus, and suspended solids concentration; the second type is influent single-point operating condition data, including operating parameters that reflect sewage transport load, such as instantaneous influent flow rate, influent level, influent temperature, and pump operating frequency. The module first performs time-series alignment calibration on discrete data output by different sensors at the same sampling time, eliminating outliers caused by sensor malfunctions and signal interference, unifying data dimensions, and constructing a standardized initial fusion data matrix. Then, it calls the multi-class support vector machine model that has been trained and fixed offline in the system's local storage unit, uses principal component analysis algorithm to reduce the dimensionality of the fusion matrix, inputs the dimensionality-reduced low-dimensional feature sequence into the SVM model to complete high-dimensional feature mapping parsing, and outputs a structured pollution feature vector. This vector fully contains three types of quantitative information: the pollutant type of the current wastewater, the concentration level of each pollutant, and the proportion of organic / inorganic pollutant components. The module retrieves a mapping table of pollution characteristics and composite flocculant ratios pre-established based on numerous on-site water quality calibration tests from the local database. Using the real-time output pollution characteristic vector as the unique retrieval index, it completes accurate matching and outputs an initial composite flocculant composition ratio that is suitable for the current influent pollution load and the multi-component composite flocculant system. The module synchronously pushes this initial ratio to the downstream flocculation visual time-series perception module and adaptive dosing execution module. On the one hand, it provides a benchmark dosing condition for flocculation tank image acquisition and floc effect evaluation; on the other hand, it provides a basic ratio benchmark for subsequent reagent ratio correction calculations, completing all output work of the influent side data link.

[0027] The flocculation visual temporal perception module 102 is used to acquire images of the flocculation state of the water body after adding flocculant according to the initial compound flocculant group ratio in the flocculation reaction tank, input the flocculation state images into the long short-term memory network model for image feature extraction, and output the morphological evolution trajectory sequence in the reaction tank; it is also used to perform floc contour recognition and floc motion trajectory tracking on the morphological evolution trajectory sequence, and calculate the global settling velocity parameters and aggregation degree parameters of the corresponding flocs.

[0028] After the flocculant dosing unit stabilizes according to the initial compound flocculant composition ratio, the module continuously acquires multiple frames of original images of the water flocculation state at fixed sampling intervals using an industrial high-definition camera with a dedicated anti-reflective light source installed in the middle of the flocculation reaction tank. The module then sequentially performs grayscale conversion, Gaussian filtering for noise reduction, and Canny edge detection image processing on the original images, extracting pixel data of all floc contour edges in each frame. It then segments independent floc targets using an eight-connected-domain analysis method, calculating the projected area, contour perimeter, and planar centroid coordinates of each floc's connected domain. Based on image grid division rules, a floc morphology distribution density matrix is ​​constructed to quantify the spatial density of flocs within the tank. The module extracts the floc morphology distribution density matrix and the instantaneous motion vector set of each floc from multiple consecutive frames, integrating them into a unified temporal input feature vector. This vector is fed into a pre-trained long short-term memory network model to perform temporal feature learning, predicting and outputting a continuous floc morphology evolution trajectory sequence within a set time period based on historical frame floc change patterns. The module re-extracts floc contour data for each frame of the trajectory sequence, calculates the centroid plane coordinates of all flocs frame by frame, and constructs a temporal centroid coordinate sequence. Using the Euclidean distance between the centroids of flocs in adjacent frames, the ratio of their contour areas, and the similarity of their contour circles as three-dimensional input features, it calls a pre-trained SVM binary classifier to achieve cross-frame matching of flocs from the same source. It then filters out the centroid pairing data of the same floc at different sampling times, calculates the displacement vector of a single floc based on the difference in the paired coordinates, and summarizes the displacement vectors of all matched flocs to form a global displacement vector set. The module extracts the vertically downward settling components of each displacement vector and performs a weighted average calculation using the equivalent projected area of ​​each floc as the weight to obtain the global settling velocity parameter. Simultaneously, based on the rule of determining the overlap area between the set of displacement vectors and the floc contour, it counts the number of effective floc collisions per unit time, calculates the floc collision frequency, and combines the temporal change of the equivalent particle size of the floc to solve the particle size growth rate. After the collision frequency exceeds a preset threshold, the module calculates the aggregation degree parameter using a weighted average calculation. The module transmits the two sets of quantitative flocculation effect indicators, the global settling velocity parameter and the aggregation degree parameter, to the downstream reagent compensation calculation module as the core input data source for the flocculation reaction kinetics assessment.

[0029] The reagent compensation calculation module 103 is used to calculate the rate of change of physical state of the flocculation reaction process based on the global settling velocity parameter and the degree of polymerization parameter, and to determine the dynamic evolution state of the current flocculation reaction based on the rate of change of physical state; if the core quantitative indicators in the dynamic evolution state of the flocculation reaction do not meet the preset threshold, the corresponding reagent addition compensation value is calculated based on the dynamic evolution state of the flocculation reaction.

[0030] First, the global settling velocity parameters, average floc density coefficient, average equivalent particle size, and benchmark single particle calibration parameters are substituted into the floc fractal structure calculation model to solve for the initial fractal dimension of the current flocculation system. The fractal dimension is used to quantify the density and complexity of the internal spatial structure of the floc. Based on the obtained fractal dimension, the module constructs a fractal correction coefficient to correct the traditional formula for the collision section of spherical particles. Combining the real-time floc number density in the reaction tank, the average relative motion velocity between flocs, the fixed collision effective coefficient, and the fractal correction index, the particle collision frequency per unit volume and per unit time is calculated. The module integrates four types of indicators—initial fractal dimension of flocs, particle collision frequency, global settling velocity parameter, and aggregation degree parameter—to construct a unified multidimensional temporal feature vector. This feature vector is then input into an offline-trained random forest regression model to complete the temporal trend feature mapping, outputting a floc morphology evolution feature vector that can fully characterize the development trend of the flocculation reaction. The module extracts the floc volume concentration time series and the predicted settling velocity time series within the predicted period from the evolution feature vector. Through integral calculation, it solves for the total amount of flocs passing through a unit water cross section per unit time, obtaining the real-time dynamic settling flux. The module compares all core quantitative indicators, including dynamic sedimentation flux, floc fractal dimension, aggregation degree parameters, and particle collision frequency, with the process compliance thresholds stored locally in the system. It comprehensively divides the flocculation reaction into three stages: initial stage, mature stage, and decay stage, based on the time-series change curves of each indicator, the deviation range of the indicator, and the duration of the reaction. It fully quantifies the dynamic evolution state of the flocculation reaction, including the division of reaction stages, the trend of sedimentation efficiency change, and the rate of change of physical state. If any core quantitative indicator in the dynamic evolution state of the flocculation reaction is less than the preset compliance threshold, it is determined that there is a deviation in the current flocculation dosage ratio. The module retrieves the pre-constructed association weight matrix of reagent components and evaluation indicators, calculates the relative deviation rate of each evaluation indicator, and obtains the preliminary reagent dosage compensation value corresponding to each composite flocculant component by linear operation of the weight matrix. The module synchronously sends the preliminary compensation value and the initial composite flocculant component distribution ratio output from the influent side to the downstream adaptive dosing execution module to complete the calculation and transmission of reagent correction.

[0031] The adaptive dosing execution module 104 is used to perform a ratio superposition correction calculation between the reagent dosing compensation value and the initial compound flocculant group allocation ratio to obtain the target compound flocculant group allocation ratio adapted to the current water quality; it is also used to generate a dosing control command based on the target compound flocculant group allocation ratio, and execute the flocculant dosing of the corresponding group allocation ratio through the dosing control command.

[0032] Specifically, the first step involves decomposing the initial composite flocculant composition ratio into an initial concentration vector according to the type of flocculant component. Simultaneously, a compensation increment vector with the same dimension as the initial concentration vector is constructed for the corresponding reagent addition compensation values ​​of each component. This ensures that the same index position within the vector corresponds to the same flocculant component, eliminating calculation mismatch issues caused by different data formats. The module retrieves a component synergistic correction matrix preset by the system and calibrated through on-site reagent compatibility tests. The diagonal elements of the matrix represent the self-adjustment correction coefficient of a single component, while the off-diagonal elements represent the synergistic and antagonistic cross-influence coefficients between different reagent components. The synergistic correction matrix is ​​used to perform cross-effect correction operations on the compensation increment vector. The corrected compensation vector is then linearly superimposed with the initial concentration vector, outputting an intermediate ratio vector without any superimposed process constraints. The module performs a two-layer safety boundary verification process on the intermediate ratio vector. The first layer is a single-component concentration limit verification, which iterates through the concentration values ​​of each component in the vector and performs limit clipping based on the preset minimum effective dosage concentration and maximum safe dosage concentration of each reagent component to obtain a temporary sequence of compliant single-component concentrations. The second layer is a total dosage normalization verification, which sums up the concentrations of all components after the limit and retrieves the system's preset total dosage limit of the composite reagent, which is jointly calibrated by the rated delivery flow rate of the dosing pump, wastewater discharge standards, and the physicochemical properties of the reagent. If the accumulated total concentration exceeds the limit, a unified scaling factor is constructed according to the ratio of the total limit to the current total concentration, and all component temporary concentrations are simultaneously normalized and scaled proportionally. Finally, the target composite flocculant composition ratio that simultaneously meets the single-component constraints and the total dosage constraints is output. Based on the standard industrial communication protocol of the on-site dosing unit, the module converts the dosage concentration of each component within the target ratio into standardized digital dosing control commands, which are then sent to the multi-channel quantitative dosing pump execution unit via industrial communication buses such as RS485 and Ethernet. These commands drive the corresponding delivery pumps of the corresponding reagent storage tanks to synchronously complete the quantitative dosing of multi-component flocculants according to the target ratio. After a single round of dosing is completed, the system automatically jumps to the influent pollution characteristic prediction module to re-collect influent data and start the next round of complete closed-loop control process, realizing uninterrupted adaptive reagent adjustment throughout the entire wastewater treatment process.

[0033] The aforementioned AI-based adaptive flocculant dosing system for wastewater treatment comprises several modules. The influent pollution feature prediction module collects influent water quality and operating condition data, analyzes it using SVM to obtain pollution feature vectors, looks up the initial composite flocculant ratio, and simultaneously sends it to downstream modules. The flocculation visual time-series perception module collects flocculation images after dosing, generates a floc evolution trajectory sequence using LSTM, calculates settling velocity and aggregation degree parameters through floc tracking, and transmits them to the compensation calculation module. The agent compensation calculation module analyzes the dynamic evolution state of the flocculation reaction based on two parameters, and calculates the agent compensation values ​​for each component when the indicators are not met. The adaptive dosing execution module combines the initial ratio and compensation values ​​to complete collaborative correction and boundary constraint calculations, generates the target ratio, and issues commands to drive precise dosing of the equipment. This system can prevent sudden changes in water quality from causing effluent exceeding standards or waste of chemicals; it uses machine vision and deep learning to quantify floc state, replacing subjective human judgment, and achieves uninterrupted monitoring around the clock, solidifying operation and maintenance experience into algorithm models; it combines fractal dynamics with multi-index coupling to calculate the amount of chemical compensation, and introduces a collaborative matrix to correct multiple allocation ratios, resulting in higher adjustment accuracy and lower chemical consumption, meeting the control requirements for precise consumption reduction in wastewater treatment.

[0034] In one embodiment, the influent pollution characteristic prediction module can also be used for:

[0035] Step S201: The collected influent water quality parameters and influent single-point operating condition data are spatiotemporally aligned according to the sampling time, multi-source data fusion processing is performed, and an initial fused data matrix is ​​constructed. .

[0036] The initial fused data matrix satisfies:

[0037]

[0038] in, This represents the total number of time-series sampling points. The total dimension of the parameters for a single sampling point. For the first A multidimensional parameter row vector at each sampling time.

[0039] Step S202: Principal component analysis algorithm is used to analyze the initial fused data matrix. Feature dimensionality reduction is performed by extracting the eigenvalues ​​from the covariance matrix. Construct the projection matrix from the principal components. And calculate the dimensionality-reduced feature sequence. .

[0040] The dimensionality-reduced feature sequence satisfies:

[0041]

[0042] in, Projection matrix The first covariance matrix of the initial fused data matrix The eigenvectors corresponding to the largest eigenvalues ​​are arranged in columns.

[0043] Step S203, based on the dimensionality reduction feature sequence The comprehensive water quality fluctuation index is calculated by weighting the variance contribution rates of each principal component. .

[0044] The comprehensive water quality fluctuation index meets the following requirements:

[0045]

[0046] in, For the first The eigenvalues ​​corresponding to each principal component The first feature sequence in the dimensionality reduction dimensional temporal feature vectors, This is the function for calculating time series variance.

[0047] Step S204, integrate water quality fluctuation indicators With preset fluctuation threshold Compare them.

[0048] like If the current influent water quality fluctuates significantly, the feature vector corresponding to the current sampling time in the dimensionality-reduced feature sequence is extracted as the high-dimensional mapping feature vector.

[0049] Step S205: Input the high-dimensional mapping feature vector into the pre-trained multi-class support vector machine model for pollution feature mapping parsing, and output the current sewage pollution feature vector including pollutant type, concentration level, and proportion of pollutant components.

[0050] Specifically, the module synchronously collects influent water quality parameters and influent single-point operating condition data. Water quality parameters refer to indicators that directly reflect the degree of sewage pollution, such as turbidity, pH, and pollutant concentration. Influent single-point operating condition data refer to operating parameters that reflect the sewage transport load, such as influent flow rate, liquid level, and water temperature. The module first performs spatiotemporal alignment processing on the two types of data according to a unified sampling time to eliminate the time series deviation caused by the asynchronous acquisition time of data from different sensors. Then, it performs multi-source data fusion processing on all aligned data to integrate and generate an initial fused data matrix containing all time series sampling points and all monitoring parameters at a single moment. The module uses principal component analysis (PCA) algorithm to perform feature reduction processing on this matrix. PCA is a data processing method that removes redundant information and compresses data dimensions. By performing feature decomposition on the matrix covariance matrix, the top few principal components with the highest contribution are selected to construct a projection matrix. The projection matrix is ​​then used to perform feature reduction on the original data. The module first performs matrix operations to generate a dimensionality-reduced feature sequence by removing redundant information. Based on this dimensionality-reduced feature sequence, the module performs weighted calculations using the variance contribution rate of each principal component to solve for a comprehensive water quality fluctuation index that can represent the overall range of changes in influent water quality. The module then compares the comprehensive water quality fluctuation index with a pre-set fluctuation threshold. When the index value is greater than the threshold, it is determined that there is a significant fluctuation in the current influent water quality. The module extracts the feature vector corresponding to the current sampling time from the dimensionality-reduced feature sequence as a high-dimensional mapping feature vector. Finally, this feature vector is input into a pre-trained offline multi-class support vector machine model. The multi-class support vector machine is an artificial intelligence model that can classify and recognize multi-dimensional data. It completes the pollution feature mapping and outputs a standardized wastewater pollution feature vector containing information on pollutant type, pollutant concentration level, and the proportion of various pollutant components. This vector serves as the basic input data for subsequent matching of the initial flocculant ratio.

[0051] This embodiment unifies the output data format of different sensing devices through time-series alignment and multi-source data fusion. It relies on principal component analysis to remove redundant noise in water quality condition data, reducing the computational load of subsequent models. It quantifies the degree of water quality disturbance by using a weighted comprehensive water quality fluctuation index, and only initiates the high-dimensional feature parsing process when water quality fluctuates significantly, reducing the computational power consumption caused by continuous model operation. It uses a multi-class support vector machine to complete the quantitative output of pollution features, transforming the scattered multi-dimensional water quality condition data into a unified structured feature vector, realizing the accurate quantitative identification of the degree and components of influent pollution. This provides a stable, low-noise standardized input for the initial composite flocculant ratio lookup and matching, avoiding the deviation of the initial reagent ratio caused by influent data time sequence misalignment, information redundancy, and disturbance identification lag.

[0052] In one embodiment, such as Figure 2 As shown, inputting the flocculation state image into a long short-term memory network model for image feature extraction and outputting a sequence of morphological evolution trajectories within the reaction tank can include the following steps:

[0053] Step S301: Continuously acquire multiple frames of flocculation state images in the flocculation reaction tank. After grayscale conversion and filtering preprocessing of the flocculation state images, use an edge detection algorithm to extract the floc contour edge data in the images.

[0054] Step S302: Perform connected component analysis on the floc contour edge data, and statistically analyze the area, perimeter, and spatial coordinate distribution parameters of each connected component to construct a floc morphology distribution density matrix. .

[0055] The distribution density matrix of floc morphology satisfies:

[0056] ,

[0057] in, For the first Line number The floc area density value of the column grid cell, This is the sum of the projected areas of all connected domains within the grid cell. The total area of ​​a single grid cell. , These represent the number of rows and columns of the image grid, respectively.

[0058] Step S303: Based on the floc morphology distribution density matrix corresponding to multiple consecutive frames of flocculation state images, the instantaneous motion vector of each floc connected domain is calculated using the optical flow method to obtain the set of floc settling velocity vectors. .

[0059] The vertical settling velocity of a single floc in the set of floc settling velocity vectors satisfies:

[0060]

[0061] In the formula, For the first Vertical settling velocity of each floc connected domain For the first The first frame The centroid ordinate of a connected domain of a flocculent body For the first The centroid ordinate of the corresponding matching floc in the frame. The sampling time interval between adjacent frames.

[0062] Step S304: Input the set of floc settling velocity vectors and the floc morphology distribution density matrix at the corresponding time into the pre-trained long short-term memory network model, and predict the floc morphology evolution trajectory sequence within a set time period through temporal feature learning.

[0063] The first time series feature input sequence The input feature vector at time step t satisfies:

[0064]

[0065] In the formula, For the first The global average density value of the frame flocculent morphology distribution density matrix. For the first Standard deviation of the density spatial distribution of the frame density matrix. For the first The average settlement velocity of the set of settlement velocities corresponding to the frame. This represents the sample standard deviation of the settling velocity.

[0066] Specifically, the system continuously acquires multiple consecutive images of the flocculation state inside the flocculation reaction tank. These images are real-time images of the flocs in the tank captured by an industrial camera. First, two preprocessing operations are performed on all raw images: grayscale conversion and filtering. Grayscale conversion removes color information, retaining only the light and dark gray values ​​to reduce computation. Filtering eliminates noise interference from lighting and water impurities. After preprocessing, an edge detection algorithm extracts the contour edge information of all flocs within the image. Connectivity analysis is then performed on the extracted floc contour edge data. A connected component refers to the pixel regions within the image that are interconnected and belong to the same floc. Basic parameters such as the projected area, contour perimeter, and planar spatial coordinates of each independent floc connected component are calculated. The entire image is then uniformly divided into row and column grids. A floc morphology distribution density matrix is ​​constructed based on the proportion of floc area within the grid. This matrix quantifies the density of floc distribution in different image regions. Based on the floc morphology distribution density matrices corresponding to each consecutive frame, an optical flow method is used to calculate... The instantaneous motion vectors of all connected components of the flocs are calculated. The optical flow method is an image algorithm that infers the motion trend of objects by the changes in the pixel positions of adjacent frames. The motion vectors contain the movement information of the flocs in both horizontal and vertical directions. The motion information of all flocs is summarized to form a set of floc settling velocity vectors. Based on the change of the longitudinal coordinate of the centroid of the flocs in adjacent frames, the independent vertical settling velocity of each floc is obtained. Four statistical indicators are extracted from a single frame image: overall average floc density, density distribution dispersion, overall average settling velocity, and settling velocity dispersion, and they are combined to form a temporal feature vector. After the floc settling velocity vector and floc morphology distribution density matrix corresponding to each frame are transformed into standardized temporal feature vectors, they are uniformly input into a pre-trained long short-term memory network model. The long short-term memory network is a deep learning model that is specifically designed to process continuous temporal data. It can learn the floc change patterns of consecutive frames in an image. Through the temporal feature learning of the model, the complete floc morphology evolution trajectory sequence within a fixed time period in the future is predicted and output for subsequent floc tracking and quantitative calculation of flocculation effect.

[0067] This embodiment first performs image noise reduction preprocessing through grayscale conversion and filtering. It then uses edge detection and connected component analysis to accurately segment individual floc targets, quantifying the spatial distribution characteristics of the flocs using a grid density matrix to solve the problems of interference from impurities in the original image and the difficulty in distinguishing floc boundaries. Optical flow is used to accurately capture the dynamic movement trend of the flocs, quantifying sedimentation velocity-related indicators and simultaneously collecting both static distribution and dynamic movement information of the flocs. By relying on a long short-term memory network to learn the temporal variation patterns of multiple frames of images, it predicts the subsequent morphological evolution trend of the flocs in advance, no longer limited to single-frame static image analysis. The entire process achieves full-dimensional quantification of floc distribution and movement state, eliminating subjective biases from human visual judgment. Continuous temporal prediction can perceive the changing trend of flocculation reaction in advance, providing continuous, complete, and low-noise standardized temporal data for subsequent calculations of flocculation and sedimentation effect indicators, avoiding distortion in flocculation effect evaluation caused by the randomness of single-frame image data.

[0068] In one embodiment, the flocculation visual timing perception module can also be used for:

[0069] Step S401: Extract edge features from the floc region at each moment in the morphological evolution trajectory sequence frame by frame to obtain the floc contour data set corresponding to each frame.

[0070] Step S402: For each frame of floc contour data set, calculate the centroid plane coordinates corresponding to each floc contour to obtain the floc centroid coordinate set for each frame.

[0071] Step S403: Arrange the centroid coordinate sets of all frames in chronological order to construct a temporal centroid coordinate sequence set.

[0072] Step S404: Based on the time-series centroid coordinate sequence set, the centroid distance, contour area ratio, and contour shape similarity of flocs in adjacent frames are used as input features. A pre-trained support vector machine classifier is used to perform homologous matching on flocs in adjacent frames to obtain multiple sets of continuously matched centroid pairs of the same floc.

[0073] Step S405: Calculate the displacement vector of the corresponding floc based on the coordinate difference of the centroid pairs of the same floc, and the displacement vectors of all flocs constitute a displacement vector set.

[0074] No. The displacement vectors of the group of homologous matching flocs satisfy:

[0075]

[0076] In the formula, , For the first The first frame The x and y coordinates of the centroid of the flocculent , For the first Match the centroid coordinates of homologous flocs within the frame. The sampling time interval between adjacent frames.

[0077] Step S406: Extract the vertical settlement component of each displacement vector in the displacement vector set, and perform weighted statistics by combining it with the equivalent projected area of ​​the corresponding floc body to calculate the global settlement velocity parameter.

[0078] The global settlement velocity parameters satisfy:

[0079]

[0080] In the formula, For global settlement velocity parameters, The total number of successfully matched homologous flocculents. For the first The equivalent projected area of ​​each flocculent For the first The vertical settling velocity component of each floc is set with the vertical downward direction of the image as the positive direction of the ordinate.

[0081] Step S407: Combining the displacement vector set with the floc contour data of the corresponding frame, count the number of floc interactions that meet the valid collision judgment conditions within a unit time window, and calculate the floc collision frequency.

[0082] The collision frequency of the flocs satisfies:

[0083]

[0084] In the formula, The collision frequency of the flocs. unit time window Total number of valid collisions within the area For time window The average number of flocs in the internal reaction tank.

[0085] Step S408: Compare the floc collision frequency with a preset collision frequency threshold. If the floc collision frequency is greater than the preset collision frequency threshold, calculate the degree of aggregation parameter based on the floc collision frequency and the floc particle size growth rate.

[0086] The degree of aggregation parameter satisfies:

[0087]

[0088] In the formula, This is a parameter for the degree of polymerization; a larger value indicates a more complete flocculation and aggregation reaction. The reference collision frequency under standard flocculation conditions. The growth rate of floc particles. The reference particle size growth rate under standard operating conditions. , These are preset weighting coefficients.

[0089] Specifically, the system performs frame-by-frame image processing based on the output sequence of floc morphological evolution trajectories. Edge features are extracted from the floc regions in the image at each moment in the sequence to obtain a set of contour data corresponding to all flocs in a single frame. The contour data set records the complete boundary pixel information of a single floc. Based on the contour information, the centroid plane coordinates of each independent floc are calculated. The centroid represents the geometric center of the pixel distribution of a single floc. The centroid coordinates of all flocs in a single frame are summarized to generate a set of coordinates specific to that frame. The system arranges the set of centroid coordinates of all frames in the order of image acquisition to construct a complete temporal centroid coordinate sequence set, thus completely preserving the positional change information of the flocs throughout the entire process. The system extracts three basic features of flocs from two adjacent frames: the spatial distance between the centroids of the flocs, the ratio of the floc contour area between the preceding and following frames, and the similarity of the floc contours. These three features are then fed into a pre-trained support vector machine (SVM) classifier. SVM is a machine learning model capable of binary classification of samples; here, it is used to distinguish between targets belonging to the same floc and different flocs in adjacent frames, completing cross-frame floc homogeneous matching and outputting multiple sets of centroid pairing data for the same floc from preceding and following frames. The system reads the difference between the horizontal and vertical coordinates of each pair of homogeneous flocs, converting it into the complete displacement vector of that floc. The displacement vector contains both horizontal offset and vertical settlement motion information. All floc displacement vectors are aggregated to form a global displacement vector set. The vertically downward settlement component within all displacement vectors is extracted and weighted statistically analyzed using the equivalent projected area of ​​the corresponding floc. The equivalent projected area refers to the total pixel area covered by the floc on the image plane. After weighting, the interference of flocs of different sizes on the overall settlement effect is eliminated, and finally, the global settlement velocity parameter is calculated to characterize the overall settlement level of all flocs in the pool. The system combines displacement vector sets with floc contour data from each frame, identifies effective collision behaviors that can lead to floc aggregation according to preset judgment rules, counts the total number of effective collisions within a fixed time window, and calculates the floc collision frequency based on the average number of flocs in the pool during the window period. This index reflects the frequency of floc contact and aggregation. The system compares the real-time calculated floc collision frequency with the system's preset standard collision frequency threshold. When the real-time collision frequency is higher than the threshold, it indicates that the water body has the basis for floc aggregation. Combining the current floc particle size growth rate with the baseline particle size growth rate under standard operating conditions, and using two sets of fixed weight coefficients for weighted calculation, the aggregation degree parameter is obtained. The higher the value of this parameter, the more complete the aggregation reaction between flocs. The global settling velocity parameter and the aggregation degree parameter are synchronously transmitted to the downstream module as the basis for evaluating the flocculation effect.

[0090] This embodiment utilizes a support vector machine to achieve precise matching of flocs from the same source across frames, distinguishing a large number of morphologically similar flocs in the water body and avoiding the distortion of sedimentation index calculations caused by the confusion of different floc movement data. It employs weighted statistics based on equivalent projected area to solve for global sedimentation velocity parameters, taking into account the contributions of large and small flocs to overall sedimentation performance, resulting in statistical index results that better reflect the actual working conditions of the flocculation tank. Effective collision identification quantifies the floc collision frequency, calculating the degree of aggregation parameters only when the collision meets the aggregation conditions. This quantifies the flocculation reaction state from multiple dimensions, including floc movement, collision, and particle size growth, eliminating the one-sidedness of evaluation based on a single image index. The entire process relies on image pixel data for objective quantitative calculations, completely replacing subjective human judgment of floc sedimentation and aggregation effects. The entire process outputs two sets of standardized quantitative parameters, reducing evaluation errors caused by accidental noise in single-frame images and floc overlap, and improving the overall accuracy of reagent ratio correction.

[0091] In one embodiment, the drug compensation calculation module can also be used for:

[0092] Step S501: Substitute the global settling velocity parameter and aggregation degree parameter into the floc fractal structure calculation model to calculate the initial floc fractal dimension of the flocculation system at the current moment.

[0093] The initial fractal dimension of the floc is used to quantify the density and spatial complexity of the internal structure of the floc.

[0094] The initial fractal dimension of the flocs satisfies:

[0095]

[0096] In the formula, This represents the initial fractal dimension of the flocs. A larger value indicates a denser floc structure and more complete fractal growth. For global settlement velocity parameters, The average density coefficient of the flocs is obtained analytically from the degree of polymerization parameter. The average equivalent particle size of the flocs. , These represent the settling velocity and particle size of the reference monomer particles, respectively, and are preset calibration constants.

[0097] Step S502: Based on the initial fractal dimension of the flocs, the effective collision section coefficient of the flocs is corrected. Combined with the number density of the flocs and the relative motion velocity of the flocs in the reaction tank, the particle collision frequency per unit volume per unit time is calculated.

[0098] The particle collision frequency satisfies:

[0099]

[0100] In the formula, The particle collision frequency, The number density of flocs per unit volume. The average relative velocity between the flocs is obtained statistically from the set of displacement vectors. The effective collision coefficient, Here, represents the fractal correction index, and represents the preset calibration parameter. This is a correction term for the fractal dimension on the collision cross section, used to correct the actual collision probability of irregular flocs.

[0101] Step S503: Construct a multi-dimensional time-series feature vector including the initial fractal dimension of flocs, particle collision frequency, global settling velocity parameter, and aggregation degree parameter. Input the multi-dimensional time-series feature vector into a pre-trained random forest regression model for trend feature mapping, and output the floc morphology evolution feature vector that characterizes the development trend of the flocculation reaction.

[0102] Step S504: Extract the floc volume concentration and sedimentation velocity sequence within the prediction period from the floc morphology evolution feature vector, and calculate the total floc sedimentation volume per unit time passing through a unit cross section through integral operation to obtain the dynamic sedimentation flux.

[0103] Dynamic settlement flux satisfies:

[0104]

[0105] In the formula, for Dynamic settlement flux at any given time for floc volume concentration at time t, for Predicted settlement velocity at any given time The fractal influence coefficient is... This is a fractal structure correction term used to characterize the effective settling ratio of dense flocs.

[0106] Step S505: Compare the dynamic settling flux with the preset standard flux threshold. If the dynamic settling flux is greater than the standard flux threshold, it is determined that the current flocculation reaction is in the effective settling stage. Combining the fractal dimension, particle collision frequency, and time-series change curve of dynamic settling flux, the dynamic evolution state of the current flocculation reaction is quantitatively output.

[0107] The dynamic evolution of the flocculation reaction includes the division of reaction stages, the trend of sedimentation efficiency changes, and the rate of change of physical state.

[0108] Specifically, the system receives global settling velocity parameters and aggregation degree parameters from upstream, and inputs these two indicators into the floc fractal structure calculation model to solve for the initial fractal dimension of the flocs. The fractal dimension of the flocs is a characteristic parameter that quantifies the porosity, density, and spatial complexity of the flocs. A higher value indicates that the particles inside the flocs are more tightly bound and the flocculation growth effect is better. The model calculates the average density coefficient of the flocs based on the aggregation degree parameters, and combines it with the pre-calibrated settling velocity of individual reference particles, reference particle size, and real-time average equivalent particle size of the flocs to complete the fractal dimension solution. The system corrects the effective collision cross-section coefficient of the flocs based on the calculated fractal dimension. Traditional collision calculations assume that particles are regular spheres, while flocs are porous and irregular structures. The fractal dimension can correct the actual effective collision contact area. Combined with the real-time statistical floc number density in the pool and the relative motion velocity of the flocs obtained from the floc displacement vector set, the system solves for the particle collision frequency per unit volume and per unit time. This indicator reflects the frequency of water particles contacting each other and combining to form large flocs. The system integrates four indicators—fractal dimension, particle collision frequency, global settling velocity parameter, and aggregation degree parameter—to construct a unified multi-dimensional temporal feature vector. This vector is then fed into an offline-trained random forest regression model. Random forest regression is a machine learning model that integrates multiple decision trees, adapting to the nonlinear coupling relationship of multiple indicators in the flocculation process. The model completes the temporal trend feature mapping and outputs a floc morphology evolution feature vector that fully reflects the development trend of the flocculation reaction. From the evolution feature vector, the system extracts two time series sequences: floc volume concentration and settling velocity within the prediction period. Through integral calculation, it statistically calculates the total mass of settled flocs per unit time and per unit flow cross-section to obtain the dynamic settling flux. The flux value intuitively reflects the actual processing capacity of flocculation solid-liquid separation. The calculation process simultaneously introduces a fractal structure correction term to distinguish the effective settling contribution of dense flocs and loose flocs. The system compares the real-time dynamic sedimentation flux with the system's preset process compliance flux threshold. If the real-time flux is higher than the threshold, it determines that the current flocculation reaction has entered a stable and effective sedimentation stage. The system integrates the continuous time-series change curves of three types of indicators: fractal dimension, particle collision frequency, and dynamic sedimentation flux, and outputs the dynamic evolution state of the flocculation reaction in a complete quantitative manner. This process includes three types of structured information: the stage division of the flocculation reaction, the continuous change trend of sedimentation efficiency, and the rate of change of flocculation physical state. The entire evolution process data will be sent to the downstream module for solving the reagent compensation amount.

[0109] This embodiment introduces floc fractal theory to correct the traditional spherical particle collision calculation model, which closely matches the real structural characteristics of porous flocs in actual wastewater and eliminates the calculation bias caused by the ideal particle assumption. It constructs time-series characteristics from multiple dimensions, including floc compaction structure, particle collision frequency, and sedimentation motion level, and uses a random forest regression model to capture the nonlinear coupling law between multiple indicators. Compared with single-indicator evaluation, this can comprehensively reflect the development trend of the flocculation reaction. Dynamic sedimentation flux is calculated by integrating operations and combining fractal correction terms to accurately quantify the actual solid-liquid separation efficiency. Effective sedimentation intervals are divided by flux thresholds to avoid the one-sidedness of judging flocculation effect solely based on floc appearance. Finally, it outputs a complete dynamic evolution state of the flocculation reaction, including stages, efficiency, and rate of change. This provides multi-dimensional, continuous, and standardized input data that conforms to the flocculation kinetic mechanism for calculating reagent compensation, reducing the adjustment bias caused by instantaneous data from a single image and improving the scientificity and accuracy of adaptive reagent ratio correction.

[0110] In one embodiment, the agent dosage compensation value can satisfy:

[0111]

[0112] In the formula, For the first Compensation values ​​for the dosage of various flocculant components. The first in the initial compound drug formulation The baseline dosage concentration of the component The total number of evaluation indicators. The first in the correlation weight matrix The first component on the first The influence weight of each indicator satisfies , This represents the total number of components in the composite flocculant.

[0113] The calculation method in this embodiment is used to solve the reagent addition compensation value corresponding to a single component flocculant. In the formula, the initial benchmark addition concentration represents the basic addition amount of the corresponding reagent component in the initial ratio output by the influent prediction module; the correlation weight matrix is ​​the parameter matrix obtained by the reagent compatibility test in the early stage. The weight value in the matrix represents the influence of a certain flocculant component on a single flocculation effect evaluation index. The total weight of all evaluation indexes corresponding to the same reagent component is fixed at 1, which can objectively limit the proportion of the effect of a single component on each flocculation index. The deviation values ​​of each flocculation quantitative evaluation index relative to the process compliance threshold are extracted from the dynamic evolution state of the upstream flocculation reaction. The calculation is based on the initial concentration of a single component, combined with the deviation of each evaluation index and the corresponding associated weights, and finally obtains the component compensation dosage that is adapted to the current flocculation effect deviation, so as to realize the simultaneous conversion of multiple index deviations into the adjustment amount of each reagent component.

[0114] This embodiment relies on pre-calibrated component-index correlation weights to distinguish the differentiated effects of different reagent components on flocculation, avoiding the imbalance problem caused by simultaneous equal adjustments of all components. It uses the actual deviations of various flocculation indices as the calculation basis, and simultaneously considers multiple flocculation state evaluation dimensions. Compared with the method of adjusting the dosage based on a single index, the compensation value is closer to the actual flocculation defects in the current water body. The weight constraint conditions limit the total proportion of the effect of a single component, preventing the excessive amplification of the compensation amount of a single component from causing an imbalance in the synergistic and antagonistic effects of the reagents, and ensuring that the compensation value calculation is stable and controllable.

[0115] In one embodiment, the adaptive dosing execution module can also be used for:

[0116] Step S601: Construct an initial concentration vector and a compensation increment vector of equal length for the initial composite flocculant group distribution ratio and the reagent addition compensation value according to the unified dimension of the flocculant components.

[0117] ,

[0118] In the formula, This represents the total number of flocculant components. For the first Initial concentration of components, For the first The corresponding compensation values ​​for the components.

[0119] Step S602: After cross-cooperative correction of the compensation increment vector using the pre-constructed component synergistic correction matrix, it is linearly superimposed with the initial concentration vector to output the intermediate ratio vector without boundary constraints.

[0120]

[0121] In the formula, This is the component co-correction matrix.

[0122] Step S603: Perform single-drug concentration upper and lower limit limit processing on each component of the intermediate ratio vector, verify the cumulative value of each component concentration after limit, and if the cumulative value exceeds the preset total threshold, perform normalization scaling operation on each component concentration and output the target composite flocculant composition ratio.

[0123] Single-component amplitude limiting formula: .

[0124] Total concentration normalization formula: .

[0125] In the formula, , The upper and lower process thresholds for single-component dosing concentration. The maximum limit for the total dosage of the pre-set compound reagent is determined by the equipment's rated flow rate, wastewater discharge standards, and reagent compatibility characteristics. The target ratio is the concentration of a single component.

[0126] Specifically, the system first unifies the data dimensions according to the types of flocculant components, generating initial concentration vectors and compensation increment vectors respectively. The lengths of both types of vectors are consistent with the total number of composite flocculant components, and the same position within the vector corresponds to the same agent. The initial concentration vector stores the basic dosage concentration of each component obtained from the influent prediction, while the compensation increment vector stores the agent compensation values ​​that need to be increased or decreased for each component. The component synergistic correction matrix is ​​a parameter matrix pre-calibrated through multiple sets of agent compatibility experiments. It is used to characterize the synergistic and antagonistic cross-effects between different flocculant components. The system uses this matrix to perform cross-correction on the compensation increment vector, eliminating the interference of adjusting a single component on other agent components. Then, the corrected compensation vector is linearly added to the initial concentration vector to obtain the intermediate ratio vector without the application of process constraints. The system performs concentration limiting processing on each component of the intermediate ratio vector. The upper and lower process thresholds for a single component are determined by the physicochemical properties of the reagent and the stable operating conditions of the equipment to avoid over- or under-dosing of a single reagent. After completing the single-component limiting, the concentrations of all components are summarized and the total concentration is compared with the preset upper limit of total dosage of the composite reagent. The upper limit of total dosage is calibrated in combination with the rated delivery capacity of the dosing equipment and the wastewater discharge control standards. If the total concentration exceeds the upper limit, the concentrations of all components are simultaneously scaled and normalized proportionally. Finally, the target composite flocculant composition ratio that simultaneously meets the constraints of single components and total dosage is output.

[0127] This embodiment standardizes the initial ratio and compensation increment data through a unified dimensional vector, eliminating the problem of mismatched output data formats from different calculation modules. It introduces a component synergistic correction matrix to consider the cross-effects between multiple agents, avoiding direct superposition of compensation values ​​that could cause ratio imbalance and improving the compatibility of agent adjustments. A dual-layer constraint verification mechanism limits the dosage range of a single component and the total dosage of the agent, preventing both excessive dosage of a single agent from causing sludge increase and secondary pollution of the effluent, and preventing the total dosage from exceeding the equipment's delivery limit. Normalized scaling operations ensure that the relative proportions of multiple component ratios remain unchanged, adjusting only the overall dosage scale, balancing flocculation reaction compatibility and equipment operational safety. The output target ratio can be directly matched with the on-site dosing unit for precise dosing.

[0128] In one embodiment, this application provides a computer AI vision-based wastewater treatment flocculant adaptive addition system. The system includes a hardware acquisition unit, a local data analysis and control system, and a multi-component agent dosing execution unit. The hardware acquisition unit's deployment points match the standard wastewater treatment plant process flow: influent bar screen - equalization tank - flocculation reaction tank - sedimentation tank - biological treatment tank - clear water tank. The influent water quality acquisition sensor is installed at the effluent end of the equalization tank, and the AI ​​vision image acquisition device, equipped with a dedicated anti-reflective light source, is fixed in the middle of the flocculation reaction tank. The entire system is an independent modular structure and can utilize conventional equipment in the plant for detection. The installation and modification of the window can be completed without shutting down the entire plant or replacing the existing dosing pumps, pipelines, and PLC control equipment. Signal connection is completed only through a standard industrial communication interface. The hardware includes a liquid level sensor, a high-precision industrial camera, a pH sensor, an electromagnetic flow meter, a turbidity sensor, and a touch screen. The control system supports two deployment methods: local deployment or cloud-based digital twin monitoring platform. The monitoring platform can display turbidity, pH, influent flow, floc particle index, and real-time dosing dosage in real time. It also has functions such as high and low liquid level alarms for the dosing tank, dosing fault alarms, and automatic dosing and stirring control.

[0129] The system is internally equipped with a module for predicting influent pollution characteristics, a module for visual time-series perception of flocculation, a module for calculating the amount of chemical compensation, and a module for adaptive dosing execution, forming a complete control link. The overall operating logic follows a data flow mechanism that combines water quality changes, changes in the morphology of alum flocs, real-time capture and quantification by AI vision, and dynamic output of chemical dosing adjustment instructions. The influent pollution characteristic prediction module continuously collects water quality parameters such as influent turbidity, pH, COD, and total phosphorus, as well as influent flow rate, liquid level, and water temperature data. After completing multi-source data time-series alignment, fusion, and dimensionality reduction, it generates pollution feature vectors through pre-trained support vector machines. It then uses a lookup table to match and output the initial compound flocculant composition ratio, which is simultaneously sent to downstream modules. The flocculation visual time-series perception module relies on an industrial camera with a dedicated supplementary light source to collect floc images in the flocculation tank around the clock. It processes the images through grayscale conversion, filtering, edge detection, and connected component analysis, and combines this with a long short-term memory network to complete time-series feature learning, predicting the floc morphology evolution trajectory sequence. Then, it uses a cross-frame homogeneous floc tracking algorithm to quantitatively calculate global settling velocity parameters and floc aggregation degree parameters. The reagent compensation calculation module solves for flocs based on two flocculation quantification parameters. Fractal dimension and particle collision frequency are used to construct a multidimensional time-series feature vector, which is input into a random forest regression model to obtain a floc evolution feature vector. The dynamic sedimentation flux is obtained by integral calculation and compared with the process threshold to quantify the complete dynamic evolution state of the flocculation reaction. The dosage compensation value of each flocculant component is solved by combining the component-index correlation weight matrix. The adaptive dosing execution module constructs an equal-length vector with the initial ratio and compensation value. The synergistic and antagonistic cross-influence between agents is eliminated by the component synergistic correction matrix. Then, the single-component concentration limit and the total dosage normalization double-layer boundary constraint correction are completed in sequence. The target composite flocculant ratio is output, and standardized control instructions are generated to drive the original dosing pump to complete the synchronous quantitative dosing of multi-component flocculants. After a single round of regulation is completed, the system automatically restarts the influent data acquisition process to achieve uninterrupted closed-loop adaptive regulation.

[0130] This system was implemented at a comprehensive wastewater treatment plant for hardware processing, with a daily treatment capacity of 60 tons. The original plant used a traditional fixed-flow, quantitative dosing method, consuming 25L of flocculant per ton of wastewater. After adopting this system, deep learning algorithms were used to extract dozens of quantitative characteristics such as floc size, distribution density, and settling velocity. This solidified the subjective judgment and experience of maintenance personnel into a standardized algorithm model, achieving a shift from experience-driven to data-driven intelligence. The flocculant consumption per ton was reduced to 20L, resulting in a 20% saving in flocculant, and the equipment investment payback period is approximately 10 months. Third-party water quality testing data shows that after the wastewater was treated by this system, the effluent color decreased from 300 times to 2 times, suspended solids decreased from 304 mg / L to 5 mg / L, and COD, total phosphorus, and various heavy metal indicators all met emission standards. With the traditional fixed-dosing method, effluent turbidity exceeded standards 96-138 times per year; with this system, effluent turbidity only occurred 0-6 times per year, significantly reducing the risk of exceeding standards. The system can operate automatically and stably 24 / 7, eliminating gaps in manual management during nighttime and shift changes. It eliminates the need for long-term on-site personnel, reducing on-site maintenance costs. Furthermore, the algorithm model permanently stores flocculation judgment standards, eliminating the experience gap caused by the loss of senior maintenance personnel. In addition to metal wastewater, this embodiment of the system can be adapted to various wastewater treatment conditions, including municipal sewage, printing and dyeing, papermaking, electroplating, food processing, slaughtering, and seafood processing, demonstrating strong versatility.

[0131] In one embodiment, such as Figure 3 As shown, this application provides a schematic diagram of the entire wastewater treatment process layout of an AI visual flocculation control system, which may include:

[0132] The system consists of an inlet bar screen, a regulating tank, a flocculation reaction tank (Ⅰ), a sedimentation tank, a biological treatment tank, a secondary flocculation reaction tank (Ⅱ), a secondary sedimentation tank, a filtration device, and a clear water tank. The final discharge is monitored online to ensure compliance with standards. The system deploys modular AI vision acquisition and control cabinets in both flocculation reaction tanks, forming a data acquisition-identification-regulation control link. The upstream regulating tank performs water quality and quantity homogenization pretreatment. The two flocculation units optimize reagent dosage based on different stages of water quality characteristics. Subsequent sedimentation, biological treatment, and filtration units progressively deepen solid-liquid separation and pollutant degradation. The clear water tank is equipped with an online monitoring system to control the final effluent indicators.

[0133] This embodiment is applied to a municipal wastewater treatment plant with a daily treatment capacity of 20,000 tons, and involves modular transformation of the original traditional flocculation section:

[0134] Industrial cameras with dedicated supplementary lighting sources and local control cabinets are installed in the two-stage flocculation reaction tanks respectively. The original dosing pumps, pipelines and PLC systems in the plant are reused. The control signals are connected only through communication protocols. The transformation can be completed during the equipment maintenance window without the need for a complete production shutdown.

[0135] Sensors at the outlet of the equalization tank collect in-water turbidity, pH, and flow data in real time, and generate an initial composite flocculant ratio to be added to the primary flocculation tank; AI cameras capture the floc morphology in real time, calculate parameters such as floc fractal dimension and collision frequency, and dynamically adjust the dosage of the agent; the water after biological treatment enters the secondary flocculation tank, and the flocculation scheme is fine-tuned again through visual monitoring to adapt to the water quality fluctuations of the biological effluent.

[0136] Two-stage segmented control can match the different flocculation requirements of upstream raw sewage and downstream biochemical effluent respectively. The effluent stably meets the Class A discharge standard, and the number of times the effluent turbidity exceeds the standard is controlled within 3 times throughout the year. The overall consumption of flocculant is reduced by 17% compared with the original fixed addition mode.

[0137] In one embodiment, such as Figure 4 As shown, this application provides a comparison chart of the frequency of turbidity exceeding the standard in effluent under two dosing modes within three statistical periods: weekly, monthly, and yearly. This can include:

[0138] Dark blue bars represent traditional fixed-dosing solutions, while light blue bars represent AI-driven visual adaptive dosing solutions. Weekly, the traditional solution exceeded the standard 3-5 times, while the AI ​​solution exceeded it 0 times. Monthly, the traditional solution exceeded the standard 8-12 times, while the AI ​​solution exceeded it 0-1 times. Annually, the traditional solution exceeded the standard 96-138 times, while the AI ​​solution exceeded it only 0-6 times, clearly demonstrating the improved water stability of the AI ​​control mode.

[0139] This embodiment is applied to a dyeing and printing wastewater treatment project where the wastewater color and organic matter fluctuate greatly, and the original fixed dosing mode frequently resulted in the effluent exceeding the standards.

[0140] The same set of treatment structures and influent water quality range were used before and after the treatment. For the first 12 months, the traditional fixed flow rate of flocculant was used, and the frequency of turbidity exceeding the standard in the effluent was 112 times throughout the year. For the next 12 months, the AI ​​visual flocculant control system was used to dynamically adjust the multi-component formula and dosage based on the temporal changes in floc morphology.

[0141] The system quantifies floc density using fractal theory, corrects effective dosage by combining collision frequency, and simultaneously imposes component synergistic constraints and upper and lower limits on concentration to avoid excessive or insufficient dosage.

[0142] After switching systems, the effluent turbidity exceeded the standard only 4 times throughout the year, with virtually no weekly exceedances and a maximum of 1 monthly exceedance. The annual consumption of flocculant decreased by 22%, and the fluctuation range of wastewater color and COD emission indicators narrowed significantly, avoiding production stoppage losses caused by rectification for exceeding standards.

[0143] In one embodiment, such as Figure 5As shown in the diagram, this application provides a schematic diagram of the operation interface of the system's local / cloud-based digital twin monitoring platform. The interface is divided into six major modules: equipment basic information area, particle index monitoring area, pH monitoring area, turbidity monitoring area, flow monitoring area, and drug use monitoring area. It can display floc particle parameters, water pH, influent and effluent flow rates, historical turbidity changes, and time-series curves of drug dosage in real time. It can also simultaneously label statistical data such as equipment runtime and total daily drug use. It supports retrieving historical trends by day / week / month, realizing visualized and remote control of the entire flocculation process.

[0144] This embodiment is applied to a slaughterhouse wastewater treatment project with centralized operation and maintenance across multiple plant areas, comprising three sub-station wastewater treatment plants:

[0145] A cloud-based digital twin monitoring platform was built, and visual images, water quality sensor data, and chemical dosing operation data collected at each substation's flocculation site were uploaded to the cloud in real time. Maintenance personnel could remotely view the particle fractal index, pH, flow rate, and chemical dosing trends of each site through a web interface.

[0146] The platform will predict water quality change trends based on time-series characteristics and issue chemical compensation and adjustment instructions in advance. When the concentration of a single component is close to the upper or lower limit, the liquid level in the chemical tank is abnormal, or the chemical dosing pipeline is faulty, it will automatically push alarm information.

[0147] This embodiment enables 24 / 7 unmanned on-site operation at 3 sites, reducing maintenance manpower costs by 60%; the platform retains all historical data on flocculation control, solidifies senior maintenance experience into algorithm models, personnel turnover will not affect the stability of control standards, the average chemical saving rate at each site reaches 19%, and the effluent indicators have been consistently met in the long term.

[0148] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0149] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the computer AI vision-based wastewater treatment flocculant adaptive addition system as described above.

[0150] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0151] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0152] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.

Claims

1. A computer AI vision-based adaptive flocculant addition system for wastewater treatment, characterized in that, The system includes: The influent pollution feature prediction module is used to collect influent water quality parameters and single-point influent operating condition data at the inlet of the sewage treatment system, input the influent water quality parameters and single-point influent operating condition data into a pre-trained support vector machine model for feature parsing, and obtain the pollution feature vector of the current sewage; it is also used to query a pre-constructed mapping table of pollution features and composite flocculant ratios based on the pollution feature vectors, and match and determine the initial composite flocculant group allocation ratio corresponding to the current sewage pollution features; The flocculation visual temporal perception module is used to acquire flocculation state images of the water in the flocculation reaction tank after adding flocculant according to the initial compound flocculant group ratio, input the flocculation state images into a long short-term memory network model for image feature extraction, and output the morphological evolution trajectory sequence in the reaction tank; it is also used to perform floc contour recognition and floc motion trajectory tracking on the morphological evolution trajectory sequence, and calculate the global settling velocity parameters and aggregation degree parameters of the corresponding flocs. The reagent compensation calculation module is used to calculate the rate of change of physical state of the flocculation reaction process based on the global settling velocity parameter and the degree of polymerization parameter, and to determine the dynamic evolution state of the current flocculation reaction based on the rate of change of physical state; if the core quantitative indicators in the dynamic evolution state of the flocculation reaction do not meet the preset threshold, the corresponding reagent addition compensation value is calculated based on the dynamic evolution state of the flocculation reaction. The adaptive dosing execution module is used to perform a ratio superposition correction calculation on the reagent dosing compensation value and the initial compound flocculant group allocation ratio to obtain a target compound flocculant group allocation ratio that is suitable for the current water quality; it is also used to generate a dosing control command based on the target compound flocculant group allocation ratio, and execute the flocculant dosing of the corresponding group allocation ratio through the dosing control command.

2. The system according to claim 1, characterized in that, The influent pollution characteristic prediction module is also used for: The collected influent water quality parameters and influent single-point operating condition data are spatiotemporally aligned according to the sampling time, and multi-source data fusion processing is performed to construct an initial fused data matrix. ; The initial fused data matrix satisfies: in, This represents the total number of time-series sampling points. The total dimension of the parameters for a single sampling point. For the first A multidimensional parameter row vector at each sampling time; The initial fused data matrix was analyzed using principal component analysis. Feature dimensionality reduction is performed by extracting the eigenvalues ​​from the covariance matrix. Construct the projection matrix from the principal components. And calculate the dimensionality-reduced feature sequence. ; The dimensionality-reduced feature sequence satisfies: in, Projection matrix The first covariance matrix of the initial fused data matrix The eigenvectors corresponding to the largest eigenvalues ​​are constructed column-wise; Based on the dimensionality reduction feature sequence The comprehensive water quality fluctuation index is calculated by weighting the variance contribution rates of each principal component. ; The comprehensive water quality fluctuation index meets the following requirements: in, For the first The eigenvalues ​​corresponding to each principal component The first feature sequence in the dimensionality reduction dimensional temporal feature vectors, This is the function for calculating time series variance; The comprehensive water quality fluctuation index With preset fluctuation threshold Perform a comparison; like If the current influent water quality fluctuates significantly, the feature vector corresponding to the current sampling time in the reduced-dimensional feature sequence is extracted as the high-dimensional mapping feature vector. The high-dimensional mapping feature vector is input into a pre-trained multi-class support vector machine model for pollution feature mapping parsing, and the output is the current sewage pollution feature vector including pollutant type, concentration level, and proportion of pollutant components.

3. The system according to claim 1, characterized in that, The step of inputting the flocculation state image into a long short-term memory network model for image feature extraction and outputting a sequence of morphological evolution trajectories within the reaction tank includes: Multiple frames of flocculation state images in the flocculation reaction tank are continuously acquired. After grayscale conversion and filtering preprocessing of the flocculation state images, the edge detection algorithm is used to extract the floc contour edge data in the images. Connectivity analysis was performed on the floc contour edge data to statistically analyze the area, perimeter, and spatial coordinate distribution parameters of each connected region, and a floc morphology distribution density matrix was constructed. ; The floc morphology distribution density matrix satisfies: , in, For the first Line number The floc area density value of the column grid cell, This is the sum of the projected areas of all connected domains within the grid cell. The total area of ​​a single grid cell. , These represent the number of rows and columns into which the image grid is divided; Based on the floc morphology distribution density matrix corresponding to multiple consecutive frames of flocculation state images, the instantaneous motion vector of each floc connected domain is calculated using the optical flow method to obtain the set of floc settling velocity vectors. ; The vertical settling velocity of a single floc in the set of floc settling velocity vectors satisfies: In the formula, For the first Vertical settling velocity of each floc connected domain For the first The first frame The centroid ordinate of a connected domain of a flocculent body For the first The centroid ordinate of the corresponding matching floc in the frame. The sampling time interval between adjacent frames; The set of floc settling velocity vectors and the floc morphology distribution density matrix at the corresponding time are input into a pre-trained long short-term memory network model, and the floc morphology evolution trajectory sequence within a set time period is predicted through temporal feature learning. The time-series feature input sequence of the first The input feature vector at time step t satisfies: In the formula, For the first The global average density value of the frame flocculent morphology distribution density matrix. For the first Standard deviation of the density spatial distribution of the frame density matrix. For the first The average settlement velocity of the set of settlement velocities corresponding to the frame. This represents the sample standard deviation of the settling velocity.

4. The system according to claim 1, characterized in that, The flocculation visual temporal perception module is also used for: Edge features are extracted frame by frame from the floc region at each moment in the morphological evolution trajectory sequence to obtain the floc contour data set corresponding to each frame; For each frame of the floc contour data set, calculate the centroid plane coordinates corresponding to each floc contour to obtain the floc centroid coordinate set for each frame. Arrange the centroid coordinate sets of all frames in chronological order to construct a temporal centroid coordinate sequence set; Based on the time-series centroid coordinate sequence set, the centroid distance, contour area ratio, and contour shape similarity of flocs in two adjacent frames are used as input features. A pre-trained support vector machine classifier is used to perform homologous matching on flocs in adjacent frames to obtain multiple sets of continuously matched centroid pairs of the same floc. The displacement vector of the corresponding floc is calculated based on the coordinate difference of the centroid pair of the same floc, and the displacement vectors of all flocs constitute a displacement vector set; No. The displacement vectors of the group of homologous matching flocs satisfy: In the formula, , For the first The first frame The x and y coordinates of the centroid of the flocculent , For the first Match the centroid coordinates of homologous flocs within the frame. The sampling time interval between adjacent frames; The vertical settlement component of each displacement vector in the displacement vector set is extracted, and weighted statistically analyzed in combination with the equivalent projected area of ​​the corresponding floc body to calculate the global settlement velocity parameter. The global settlement velocity parameters satisfy: In the formula, For global settlement velocity parameters, The total number of successfully matched homologous flocculents. For the first The equivalent projected area of ​​each flocculent For the first The vertical settling velocity component of each floc is set with the vertical downward direction of the image as the positive direction of the ordinate. By combining the displacement vector set with the floc contour data of the corresponding frame, the number of floc interactions that meet the effective collision judgment conditions within a unit time window is counted, and the floc collision frequency is calculated. The collision frequency of the flocs satisfies: In the formula, The collision frequency of the flocs. unit time window Total number of valid collisions within the area For time window The average number of flocs in the internal reaction tank; The collision frequency of the flocs is compared with a preset collision frequency threshold. If the collision frequency of the flocs is greater than the preset collision frequency threshold, the degree of aggregation parameter is calculated based on the collision frequency of the flocs and the growth rate of the floc particle size. The degree of aggregation parameter satisfies: In the formula, This is a parameter for the degree of polymerization; a larger value indicates a more complete flocculation and aggregation reaction. The reference collision frequency under standard flocculation conditions. The growth rate of floc particles. The reference particle size growth rate under standard operating conditions. , These are preset weighting coefficients.

5. The system according to claim 1, characterized in that, The drug compensation calculation module is also used for: Substituting the global settling velocity parameter and the aggregation degree parameter into the floc fractal structure calculation model, the initial fractal dimension of the flocculation system at the current moment is calculated. The initial fractal dimension of the floc is used to quantify the density and spatial complexity of the internal structure of the floc; The initial fractal dimension of the flocs satisfies: In the formula, This represents the initial fractal dimension of the flocs. A larger value indicates a denser floc structure and more complete fractal growth. For global settlement velocity parameters, The average density coefficient of the flocs is obtained analytically from the degree of polymerization parameter. The average equivalent particle size of the flocs. , These are the settling velocity and particle size of the reference monomer particles, respectively, and are preset calibration constants; Based on the initial fractal dimension of the flocs, the effective collision section coefficient of the flocs is corrected, and the particle collision frequency per unit volume per unit time is calculated by combining the floc number density and the relative motion velocity of the flocs in the reaction tank. The particle collision frequency satisfies: In the formula, The particle collision frequency, The number density of flocs per unit volume. The average relative velocity between the flocs is obtained statistically from the set of displacement vectors. The effective collision coefficient, Here, represents the fractal correction index, and represents the preset calibration parameter. This is a correction term for the fractal dimension on the collision cross section, used to correct the actual collision probability of irregular flocs; A multi-dimensional temporal feature vector is constructed, including the initial fractal dimension of flocs, the particle collision frequency, the global settling velocity parameter, and the aggregation degree parameter. The multi-dimensional temporal feature vector is input into a pre-trained random forest regression model for trend feature mapping, and the output is a floc morphology evolution feature vector characterizing the development trend of the flocculation reaction. Extract the floc volume concentration and sedimentation velocity sequence within the prediction period from the floc morphology evolution feature vector, and calculate the total amount of floc sedimentation per unit time passing through a unit cross section through integral operation to obtain the dynamic sedimentation flux; The dynamic settlement flux satisfies: In the formula, for Dynamic settlement flux at any given time for floc volume concentration at time t, for Predicted settlement velocity at any given time The fractal influence coefficient is... This is a fractal structure correction term used to characterize the effective settling ratio of dense flocs; The dynamic settling flux is compared with the preset standard flux threshold. If the dynamic settling flux is greater than the standard flux threshold, it is determined that the current flocculation reaction is in the effective settling stage. Combining the fractal dimension, the particle collision frequency, and the time-series change curve of the dynamic settling flux, the dynamic evolution state of the current flocculation reaction is quantitatively output. The dynamic evolution of the flocculation reaction includes the division of reaction stages, the trend of sedimentation efficiency changes, and the rate of change of physical state.

6. The system according to claim 1, characterized in that, The drug dosage compensation value satisfies: In the formula, For the first Compensation values ​​for the dosage of various flocculant components. The first in the initial compound drug formulation The baseline dosage concentration of the component The total number of evaluation indicators. The first in the correlation weight matrix The first component on the first The influence weight of each indicator satisfies , This represents the total number of components in the composite flocculant.

7. The system according to claim 1, characterized in that, The adaptive dosing execution module is also used for: The initial composite flocculant group distribution ratio and the agent addition compensation value are constructed with equal-length initial concentration vectors and compensation increment vectors according to the unified dimension of the flocculant components. , In the formula, This represents the total number of flocculant components. For the first Initial concentration of components, For the first Component corresponding compensation values; After cross-cooperative correction of the compensation increment vector using a pre-constructed component synergistic correction matrix, it is linearly superimposed with the initial concentration vector to output an intermediate ratio vector without boundary constraints. In the formula, For component co-correction matrix; The concentration of each component in the intermediate ratio vector is limited by upper and lower limits. The cumulative value of the concentration of each component after the limit is verified. If the cumulative value exceeds the preset total threshold, the concentration of each component is normalized and scaled, and the target composite flocculant composition ratio is output. Single-component amplitude limiting formula: ; Total concentration normalization formula: ; In the formula, , The upper and lower process thresholds for single-component dosing concentration. The maximum limit for the total dosage of the pre-set compound reagent is determined by the equipment's rated flow rate, wastewater discharge standards, and reagent compatibility characteristics. The target ratio is the concentration of a single component.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the system according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the system according to any one of claims 1 to 7.