Water treatment agent intelligent dosing method, device, equipment and storage medium

By acquiring and preprocessing multidimensional water quality data in the wastewater treatment system, constructing a standardized dataset, and utilizing the particle swarm optimization algorithm, the problems of large dosing deviations and fluctuating treatment effects were solved, achieving precise dosing of chemicals and efficient and reliable wastewater treatment.

CN122166950APending Publication Date: 2026-06-09HEBEI XIONGAN RUITIAN TECH CO LTD +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HEBEI XIONGAN RUITIAN TECH CO LTD
Filing Date
2026-03-12
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing methods for adding water treatment chemicals rely on manual experience or single parameter control, which cannot systematically integrate multi-dimensional water quality data. This results in large deviations in chemical dosage, fluctuating treatment effects, and difficulty in meeting the needs of complex wastewater treatment, as well as failing to guarantee efficient and reliable operation.

Method used

By acquiring multidimensional water quality data from different treatment units in the wastewater treatment system, a standardized dataset is constructed after preprocessing. Then, the reagent combination set is iteratively optimized using the particle swarm optimization algorithm to ensure the accuracy and suitability of reagent dosing.

Benefits of technology

It enables precise dosing of chemicals, reduces chemical consumption and operating costs, and improves the stability of treatment effects and the high efficiency and reliability of wastewater treatment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122166950A_ABST
    Figure CN122166950A_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, equipment, and storage medium for intelligent dosing of water treatment chemicals, belonging to the field of wastewater treatment technology. The method includes: preprocessing multidimensional water quality data to obtain standardized water quality datasets corresponding to different treatment units; for the current treatment unit, based on the standardized water quality dataset and wastewater flow rate, and through a corresponding preset sub-model, obtaining an initial chemical combination set corresponding to the current treatment unit; determining the objective function for chemical dosing of the current treatment unit based on independent basic dosage and process correlation parameters; based on the objective function, iteratively optimizing the initial chemical combination set using a particle swarm optimization algorithm to obtain a target chemical combination set, and dosing chemicals based on the target chemical combination set. The intelligent dosing method, apparatus, equipment, and storage medium for water treatment chemicals provided in this application can solve the problem of not being able to guarantee the efficient and reliable operation of wastewater treatment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of wastewater treatment technology, and more specifically, relates to a method, apparatus, equipment, and storage medium for intelligent dosing of water treatment agents. Background Technology

[0002] Existing water treatment chemical dosing methods largely rely on manual experience or single-parameter control, lacking precise adaptation to the water quality characteristics of different units such as pretreatment, biochemical treatment, and advanced treatment. They also fail to systematically integrate multi-dimensional water quality data and wastewater flow to construct a scientific basis for decision-making. Dosing parameters are easily out of sync with actual operating conditions, exhibiting delayed responses to dynamic changes in water quality. This results in significant deviations in chemical dosage, marked fluctuations in treatment effectiveness, and an inability to meet the needs of complex wastewater treatment scenarios, thus failing to guarantee efficient and reliable operation of wastewater treatment systems. Summary of the Invention

[0003] The purpose of this application is to provide a method, apparatus, equipment, and storage medium for intelligent dosing of water treatment agents to solve the problem of not being able to guarantee the efficient and reliable operation of wastewater treatment.

[0004] A first aspect of this application provides a method for intelligent dosing of water treatment chemicals, comprising: Multidimensional water quality data of the inlet and outlet of different treatment units in the wastewater treatment system are acquired, and the multidimensional water quality data are preprocessed to obtain standardized water quality datasets corresponding to different treatment units; the different treatment units include pretreatment units, biochemical treatment units and advanced treatment units. For the current treatment unit, based on the standardized water quality dataset and wastewater flow rate, and through the corresponding preset sub-model, the initial reagent combination set corresponding to the current treatment unit is obtained; different treatment units correspond to different preset sub-models; the initial reagent combination set includes the independent basic dosage of each reagent, the dosage priority of each reagent, and process correlation parameters; among which, the process correlation parameters include the basic suspended solids generation in wastewater, the reagent-sludge correlation coefficient, and the reagent reaction lag time; The objective function for reagent dosing in the current treatment unit is determined based on the independent basic dosage and process-related parameters. Based on the objective function, the initial drug combination set is iteratively optimized using the particle swarm optimization algorithm to obtain the target drug combination set, and the drugs are then added based on the target drug combination set.

[0005] A second aspect of this application provides a smart dosing device for water treatment chemicals, comprising: The data acquisition module is used to acquire multidimensional water quality data at the inlet and outlet of different treatment units in the wastewater treatment system, and to preprocess the multidimensional water quality data to obtain standardized water quality datasets corresponding to different treatment units; the different treatment units include pretreatment units, biochemical treatment units, and advanced treatment units; The initial reagent module is used to obtain the initial reagent combination set for the current treatment unit based on a standardized water quality dataset and wastewater flow rate, and through corresponding preset sub-models. Different treatment units correspond to different preset sub-models. The initial reagent combination set includes the independent basic dosage for each reagent, the dosage priority for each reagent, and process correlation parameters. Among them, the process correlation parameters include the basic suspended solids generation in wastewater, the reagent-sludge correlation coefficient, and the reagent reaction lag time. The function construction module is used to determine the objective function for reagent dosing in the current processing unit based on the independent basic dosage and process-related parameters. The dosing control module is used to iteratively optimize the initial drug combination set based on the objective function and the particle swarm optimization algorithm to obtain the target drug combination set, and then dosing the drug based on the target drug combination set.

[0006] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the above-described intelligent dosing method for water treatment agents.

[0007] In a fourth aspect of this application, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described intelligent dosing method for water treatment agents.

[0008] The beneficial effects of the intelligent dosing method, device, equipment, and storage medium for water treatment chemicals provided in this application are as follows: By collecting and preprocessing multi-dimensional water quality data from the inlet and outlet of multiple treatment units, this application can comprehensively and accurately capture water quality change characteristics, avoid misjudgments caused by single data, and provide reliable data support for subsequent optimization; it matches exclusive preset sub-models for different treatment units, and combines water quality data and sewage flow to output an initial chemical combination set including dosage, priority, etc., to ensure that the initial parameters are adapted to the process characteristics of each unit; it constructs an objective function based on the basic dosage and process-related parameters to achieve coordinated measurement of multiple objectives such as chemical consumption and sludge generation; and iteratively optimizes the initial parameters through a particle swarm optimization algorithm to obtain the optimal target chemical combination set. In summary, this application can achieve precise chemical dosing, reduce chemical consumption and operating costs, improve the stability of treatment effects, and ensure efficient and reliable operation of sewage treatment. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the 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.

[0010] Figure 1 A schematic flowchart of a smart dosing method for water treatment agents provided in an embodiment of this application; Figure 2 This is a structural block diagram of a smart dosing device for water treatment agents provided in an embodiment of this application; Figure 3 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0011] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0012] It is understood that in the embodiments of this application, data such as user information are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with relevant laws, regulations and standards.

[0013] It should be noted that the terms "first," "second," etc., used in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in sequences other than those illustrated or described herein.

[0014] To make the objectives, technical solutions, and advantages of this application clearer, the following description will be provided in conjunction with the accompanying drawings and specific embodiments.

[0015] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a method for intelligent dosing of water treatment chemicals according to an embodiment of this application. The method can be executed by an electronic device and may include: S101: Obtain multidimensional water quality data at the inlet and outlet of different treatment units in the wastewater treatment system, and preprocess the multidimensional water quality data to obtain standardized water quality datasets corresponding to different treatment units; different treatment units include pretreatment units, biochemical treatment units, and advanced treatment units.

[0016] In this embodiment, multidimensional water quality data refers to a set of parameters reflecting the physical and chemical characteristics of wastewater. This embodiment can deploy monitoring nodes at the inlet and outlet of the pretreatment unit, the inlet and outlet of the biochemical treatment unit, and the inlet and outlet of the advanced treatment unit in the wastewater treatment system. Each monitoring node is equipped with multidimensional monitoring equipment. Specifically, online sensors are used for monitoring conventional water quality indicators, including COD sensors, ammonia nitrogen sensors, total phosphorus sensors, and pH sensors. Dynamic water quality characteristic monitoring equipment includes laser particle size analyzers, high-speed samplers, and rotational viscometers. The data acquisition frequency can be set according to the parameter type, such as collecting data for conventional water quality indicators every 5 minutes and for dynamic water quality characteristics every 1 minute, ensuring that the data reflects water quality changes in real time.

[0017] In this embodiment, preprocessing refers to the preliminary processing of the collected multidimensional water quality data. The preprocessing process includes three steps: outlier removal, data normalization, and data fusion. The specific operations are as follows: Outlier removal adopts... The criteria are as follows: First, calculate the mean and standard deviation of each water quality parameter monitoring data. Data exceeding the mean plus three times the standard deviation or falling below the mean minus three times the standard deviation are identified as outliers and directly removed to avoid interference from extreme data in subsequent analysis results. Data normalization uses an extreme value standardization method. For each water quality parameter with different dimensions, the maximum and minimum values ​​within its historical monitoring period are used as benchmarks to linearly map all monitoring data of that parameter to the interval between 0 and 1, achieving dimensional uniformity for different water quality parameters and facilitating subsequent multi-parameter integration analysis. Data fusion integrates multi-dimensional water quality data from the same monitoring node using a weighted average algorithm. The weights are determined as follows: First, based on the process objectives of different treatment units in the wastewater treatment system, determine the core treatment effect indicators that can be directly measured and quantified for each unit. The core treatment effect indicator for the pretreatment unit is the suspended solids removal rate; for the biochemical treatment unit, the core treatment effect indicators are the COD removal rate and ammonia nitrogen removal rate; and for the advanced treatment unit, the core treatment effect indicators are the total phosphorus removal rate and turbidity removal rate. All indicators are routine testing indicators in the field of wastewater treatment, and their specific values ​​can be directly obtained through online monitoring equipment. Then, using the well-known grey relational analysis method in this field, the core treatment effect indicators of each treatment unit are used as a reference sequence, and the water quality parameters monitored in the corresponding unit are used as a comparison sequence to calculate the grey relational degree of each water quality parameter relative to the core treatment effect indicators. This grey relational degree is the influence coefficient of each water quality parameter on the treatment effect, with the influence coefficient ranging from 0 to 1. The larger the value, the higher the influence of the water quality parameter on the treatment effect. Finally, the influence coefficients of each water quality parameter under the same monitoring node are normalized by dividing the influence coefficient of a single water quality parameter by the sum of the influence coefficients of all water quality parameters. The result is the fusion weight corresponding to that water quality parameter in the weighted average algorithm. The sum of the fusion weights of all water quality parameters is 1. Based on the determined fusion weights, the normalized multi-dimensional water quality data of the same monitoring node are integrated by weighted average to finally obtain the standardized water quality dataset corresponding to each treatment unit.

[0018] In this embodiment, the different treatment units are treatment links with different functions in the sewage treatment system, specifically including a pretreatment unit (used to remove floating oil, large particulate suspended solids, etc. from sewage, reducing the burden on subsequent treatment), a biochemical treatment unit (using microorganisms to degrade organic matter, nitrogen, phosphorus and other pollutants in sewage), and an advanced treatment unit (further purifying sewage to ensure that the effluent meets the discharge standards or is reused).

[0019] In this embodiment, monitoring equipment is deployed at the inlet and outlet of the pretreatment unit, biochemical treatment unit, and advanced treatment unit to comprehensively collect multi-dimensional data reflecting the wastewater quality status. This ensures coverage of water quality change characteristics throughout the entire wastewater treatment process and avoids misjudgments caused by a single monitoring point or single indicator. The collected multi-dimensional water quality data is preprocessed to eliminate data interference and standardize data dimensions. Outliers are removed to prevent extreme data from affecting the accuracy of subsequent analysis, and data normalization solves the problem of incomparability caused by differences in the dimensions of different indicators, ultimately resulting in a standardized water quality dataset.

[0020] S102: For the current treatment unit, based on the standardized water quality dataset and wastewater flow rate, and through the corresponding preset sub-model, the initial reagent combination set corresponding to the current treatment unit is obtained; different treatment units correspond to different preset sub-models; the initial reagent combination set includes the independent basic dosage of each reagent, the dosage priority of each reagent, and process correlation parameters; among which, the process correlation parameters include the basic suspended solids generation in wastewater, the reagent-sludge correlation coefficient, and the reagent reaction lag time.

[0021] In this embodiment, the pre-set sub-model is a mathematical model pre-trained based on historical water quality data, wastewater flow data, reagent dosage data, and treatment effect data. The pre-set sub-model can be constructed using the random forest algorithm. The training dataset includes at least 1000 sets of historical data, covering multi-dimensional water quality data, wastewater flow rate, process operating parameters, reagent dosage, and treatment effect data. During model training, 5-fold cross-validation is used to optimize parameters. The number of decision trees is set to 50-100, and the maximum tree depth is set to 8-12 layers to ensure that the model's prediction accuracy for independent baseline dosages is not less than 95%. For the current treatment unit, its type is automatically identified, and the corresponding pre-set sub-model is invoked. The standardized water quality dataset and wastewater flow rate are input into the model, and the initial reagent combination set is output.

[0022] The initial reagent combination set is a set of basic dosing parameters output by the preset sub-model, adapted to the current water quality state of the treatment unit. It includes the independent basic dosing amount, dosing priority, and process-related parameters for each reagent. The independent basic dosing amount is the basic dosing concentration calculated for each reagent based on the current water quality and flow rate; it is an unoptimized initial dosing reference value. Dosing priority refers to the order in which multiple reagents are added (e.g., adding demulsifiers first, then flocculants), used to ensure synergistic effects between reagents and avoid reagent conflicts affecting treatment efficiency. Process-related parameters are a set of process auxiliary parameters directly related to the reagent dosing effect. The objective function and optimization logic loop are constructed by considering factors including the basic suspended solids generation in wastewater, the reagent-sludge correlation coefficient, and the reagent reaction lag time. The basic suspended solids generation in wastewater is the baseline amount of suspended solids naturally generated in wastewater under current water quality conditions without the addition of any reagents, serving as the basic benchmark for calculating the sludge increment after reagent addition. The reagent-sludge correlation coefficient is the sludge increment coefficient corresponding to a unit dosage of reagent, reflecting the quantitative correlation between reagent dosage and sludge generation. The reagent reaction lag time is the basic time required for a reagent to reach a stable reaction state after being added to wastewater, used to evaluate reaction efficiency and optimize the dosing interval.

[0023] In this embodiment, due to differences in the process objectives and treatment targets of different treatment units (e.g., pretreatment focuses on removing suspended solids, while biochemical treatment focuses on degrading organic matter), a dedicated pre-set sub-model needs to be configured for each unit. The sub-model establishes a mapping relationship between input and output by pre-training on historical water quality-flow-dosing parameter data. The input is wastewater flow rate because changes in flow rate directly affect the reagent requirements per unit volume of wastewater; combined with standardized water quality data, the current water quality load can be accurately matched. The output initial reagent combination set includes dosage, priority, and process-related parameters, providing basic parameters for subsequent optimization and establishing a correlation between reagent dosing and subsequent treatment effects (such as sludge generation) through process-related parameters, ensuring the continuity of the process.

[0024] S103: Determine the objective function for reagent dosing in the current treatment unit based on the independent basic dosage and process-related parameters.

[0025] In this embodiment, based on the independent basic dosage and process correlation parameters in the initial reagent combination set, the total reagent consumption per unit volume of water, the sludge production per unit volume of water, and the reagent reaction stabilization time are calculated respectively. After extreme value standardization of the three parameters, an objective function is constructed by combining the dynamically determined correlation weights. The core of the objective function is to minimize the comprehensive optimization index.

[0026] In this embodiment, the objective function transforms the abstract requirement of high efficiency and energy saving into quantifiable mathematical indicators. The independent base dosage directly reflects the cost of reagent consumption, while process-related parameters relate to key benefit indicators such as sludge production and reaction efficiency. By integrating these two types of parameters to construct the objective function, a comprehensive consideration of multiple objectives, including reagent consumption, sludge production, and reaction efficiency, can be achieved. This avoids the pitfalls of optimizing a single objective (such as pursuing only reagent reduction leading to a surge in sludge), and provides clear evaluation criteria for subsequent iterative optimization.

[0027] S104: Based on the objective function, the initial drug combination set is iteratively optimized using the particle swarm optimization algorithm to obtain the target drug combination set, and the drug is added based on the target drug combination set.

[0028] In this embodiment, the particle swarm optimization algorithm simulates the search behavior of particles in space and iteratively updates parameters (particle positions) to find the optimal solution of the objective function. It has the characteristics of strong global search capability and fast convergence speed, and is suitable for multi-parameter collaborative optimization problems.

[0029] For example, the particle encoding dimension is the number of drug types and the number of intervals between drugs. For instance, the encoding format for three drugs is... ,in This refers to the dosage of the drug. The dosing intervals for the reagents are sequentially encoded to correspond to their dosing priorities. The algorithm parameters are set as follows: number of particles 50, number of iterations 100, inertia weight 0.7, cognitive factor 1.5, and social factor 1.5. During iteration, the performance of each particle is evaluated using a fitness function (objective function + constraint penalty term). Constraints include reagent chemical stability (prohibiting simultaneous dosing of conflicting reagents), reaction logic (dosing according to priority), and effluent water quality compliance, etc., ultimately yielding the target reagent combination set through iteration.

[0030] The target reagent combination set is the optimal dosing parameter set obtained through iterative optimization using the particle swarm optimization algorithm. It is the final execution plan that takes into account multiple objectives such as reagent consumption, treatment effect, and sludge generation, and is directly used to guide reagent dosing.

[0031] In this embodiment, the particle swarm optimization algorithm possesses the characteristics of global search and fast convergence, making it suitable for handling multi-parameter collaborative optimization problems. The algorithm starts with an initial set of reagent combinations, treating parameters such as reagent dosage and dosing priority as "particles." Using the objective function value as the evaluation criterion, it iteratively updates the particle positions (i.e., adjusts the dosing parameters) to continuously search for the optimal solution to the objective function. During the iteration process, the process constraints of wastewater treatment (such as avoiding reagent conflicts and ensuring effluent meets standards) must be considered. The final target reagent combination set represents the optimal solution that balances cost, effectiveness, and efficiency; the reagent dosing is completed by executing this solution.

[0032] As can be seen from the above, this embodiment, by collecting and preprocessing multi-dimensional water quality data from the inlet and outlet of multiple treatment units, can comprehensively and accurately capture water quality change characteristics, avoiding misjudgments caused by single data points and providing reliable data support for subsequent optimization. It matches specific preset sub-models to different treatment units, combining water quality data with wastewater flow output to create an initial reagent combination set including dosage, priority, etc., ensuring that initial parameters are adapted to the process characteristics of each unit. Based on the basic dosage and process-related parameters, an objective function is constructed to achieve coordinated measurement of multiple objectives such as reagent consumption and sludge generation. The initial parameters are iteratively optimized using a particle swarm optimization algorithm to obtain the optimal target reagent combination set. In summary, this embodiment can achieve precise reagent dosing, reduce reagent consumption and operating costs, improve the stability of treatment effects, and ensure efficient and reliable operation of wastewater treatment.

[0033] In one embodiment of this application, the objective function for determining the dosage of reagents in the current processing unit is based on an independent base dosage and process-related parameters, including: The total chemical consumption per unit volume of water is determined based on the independent baseline dosage. The amount of sludge produced per unit volume of water is determined based on the chemical-sludge correlation coefficient, the basic suspended solids generation in wastewater, and the independent basic dosage. Determine the steady-state time of a drug reaction based on the drug reaction lag time; Extreme value standardization was performed on the total consumption of reagents per unit volume of water, the amount of sludge produced per unit volume of water, and the reaction stabilization time of reagents to obtain standardized total consumption of reagents per unit volume of water, standardized sludge produced per unit volume of water, and standardized reaction stabilization time of reagents. The objective function for reagent dosing in the current treatment unit is determined based on the total consumption of reagents per standardized unit volume of water, the amount of sludge generated per standardized unit volume of water, and the reaction settling time of the standardized reagents.

[0034] In this embodiment, the total chemical consumption per unit volume of water refers to the total mass of all chemicals consumed in treating a unit volume of wastewater, and is an indicator for measuring the cost of chemical use. The sludge production per unit volume of water refers to the total mass of sludge produced in treating a unit volume of wastewater, directly related to sludge treatment costs and environmental pressure. The chemical reaction stabilization time refers to the total time required for the chemical to react with pollutants and achieve a stable treatment effect after being added to the wastewater, and is a key indicator for evaluating treatment efficiency.

[0035] In this embodiment, directly constructing the objective function can easily lead to problems such as chaotic parameter dimensions and unreasonable allocation of index weights, which makes the objective function unable to accurately reflect the comprehensive optimization requirements and affect the subsequent optimization effect. The extreme value standardization process maps the original data to the [0,1] interval, eliminates the differences between parameters with different dimensions and different numerical ranges, and makes each parameter have a comparable basis.

[0036] In this embodiment, the parameters in the initial reagent combination set are first decomposed into core variables related to reagent consumption, sludge generation, and reaction time. Three original indicators with dimensions are obtained through quantitative calculation. Then, the difference in dimensions is eliminated by extreme value standardization, so that each indicator has a comparable basis. Finally, the objective function is constructed by combining dynamic correlation weights, integrating the multi-dimensional optimization requirements into a single quantifiable optimization objective, providing a clear and scientific optimization direction for the subsequent particle swarm optimization algorithm.

[0037] As can be seen from the above, this embodiment clarifies the construction path of the objective function and solves the problem of inconsistent parameter dimensions; through step-by-step quantitative calculation and standardization, it ensures that the objective function can accurately reflect the comprehensive optimization needs of reagent consumption, sludge generation and reaction efficiency; the introduction of dynamic correlation weights enables the objective function to accurately match the current working conditions, improving the rationality and practicality of subsequent optimization results.

[0038] In one embodiment of this application, determining the total chemical consumption per unit volume of water based on an independent baseline dosage includes: The total amount of reagent consumed per unit volume of water is determined based on the first formula. The first formula is: ; Where C represents the total amount of reagent consumed per unit volume of water. This represents the independent basal dosage of the i-th agent. Let m represent the overall correction coefficient for the i-th drug, and m represent the quantity of the drug. The amount of sludge produced per unit volume of wastewater is determined based on the reagent-sludge correlation coefficient, the basic suspended solids production of wastewater, and the independent basic dosage, including: The amount of sludge produced per unit volume of water is determined based on the second formula. The second formula is: ; in, This indicates the amount of sludge produced per unit volume of water. This indicates the amount of basic suspended solids generated in the wastewater. Represents the reagent-sludge correlation coefficient for the i-th reagent; Determining the steady-state time of a drug reaction based on the drug reaction lag time includes: The reaction stabilization time of the drug is determined based on the third formula; The third formula is: ; Where T represents the drug reaction stabilization time. Indicates natural reaction time. This represents the reaction lag time of the i-th drug. This represents the influence coefficient of the order of addition of the i-th drug.

[0039] In the first formula, This represents the independent baseline dosage of the i-th reagent, which is the mass concentration of the pure i-th reagent required to achieve the preset treatment effect, considering only the current water quality indicators and without considering the interaction between reagents and process-related parameters. This represents the comprehensive correction coefficient for the i-th reagent. This coefficient comprehensively reflects the synergistic effect between reagents and the corrective effect of process-related parameters (such as sludge concentration, hydraulic retention time, and water temperature) on the dosage. It can be pre-calibrated using conventional orthogonal experimental methods or historical operating condition fitting algorithms, and dynamically updated based on real-time process data. The formula... This is a unit conversion factor used to convert the dosage of the agent in mg / L to the unit of total agent consumption per unit volume of water. It can be set based on experience.

[0040] In the second formula, S0 represents the baseline suspended solids generation output by the preset sub-model, which is the baseline sludge value generated by the pretreatment unit of the wastewater treatment system without the addition of any chemicals under the current water quality indicators and process operating parameters. This value can be determined using a conventional blank test method in this field: under process conditions consistent with actual operating conditions, such as water temperature, hydraulic retention time, and sludge concentration, the suspended solids generation of the pretreatment unit without the addition of chemicals is monitored, and the average value is determined after multiple parallel tests; k i The correlation coefficient between the i-th agent and sludge output from the preset sub-model represents the increase in sludge production caused by each 1 mg / L addition of the i-th agent under the current process system. Specifically, it can be obtained by fitting historical operating data: collecting historical sludge production data, corresponding agent dosage data, and water quality indicators (such as COD, SS, turbidity) and process-related parameters (such as sludge concentration, hydraulic retention time, and water temperature) matching the operating conditions within a conventional monitoring period in this field; and using conventional data fitting algorithms in this field, such as the least squares method, establishing a linear correlation model between sludge production and the dosage of each agent, and extracting the k-value of the i-th agent from it. i value.

[0041] In the third formula, t0 is the natural reaction time, i.e., the hydraulic retention time of wastewater in the current treatment unit without the addition of chemicals. It is the necessary time to ensure basic mixing and diffusion of water quality, and is determined through statistical analysis of historical process operation data (taking the average hydraulic retention time under multiple stable operating conditions). An example value is taken as t0 = 2 min for the pretreatment unit; t iThe reaction lag time of the i-th agent output by the preset sub-model represents the basic time required for the i-th agent to reach a stable state with the target pollutant when added alone. This time is fitted and calibrated by combining the agent reaction kinetics experiment (such as beaker stirring test, online reaction monitoring) with historical operating data. The exemplary values ​​are: polyaluminum chloride (PAC) t1=1min, polyacrylamide (PAM) t2=0.5min, and demulsifier t3=2min. Let be the influence coefficient of the order of addition of the i-th agent. Its value is based on the synergistic / interference mechanism of the reaction between agents: the agent added earlier will provide the reaction basis for the subsequent agents (such as the demulsifier first destroys the emulsion structure, creating conditions for PAC flocculation), so its reaction lag time can play a full role. Take 1; the effective reaction time of the reagent added later will be shortened due to the reaction consumption of the preceding reagents and changes in the water quality environment (such as pH, turbidity, floc morphology), therefore η i The value decreases as the application priority decreases, and the specific value rule is bound to the application priority output by the preset sub-model: priority 1 (application first) corresponds to =1, Priority 2 corresponds to =0.8, priority 3 (last addition) corresponds to =0.5, an example value is: demulsifier (priority 1) =1, PAC (Priority 2) =0.8, PAM (Priority 3) =0.5.

[0042] The calculation logic for the drug reaction stabilization time T is as follows: First, calculate the effective reaction lag time (t) of each drug after correction for the order of addition. i × Then, sum all effective reaction lag times, and finally add the natural reaction time t0 to obtain the total time T required for the reagent reaction to be completely stable under the current operating conditions. An exemplary calculation process is as follows: For the pretreatment unit, combined with the exemplary reagent addition priority and parameters, T = 2min + (2min × 1) + (1min × 0.8) + (0.5min × 0.5) = 5.05min.

[0043] In this embodiment, three formulas are used to transform abstract parameters such as the independent basic dosage and process-related parameters in the initial reagent combination set into directly calculable total reagent consumption per unit volume of water, sludge production per unit volume of water, and reagent reaction stabilization time. Each parameter in the formula comes from the output of the preset sub-model or the system's preset characteristic database, ensuring the consistency of the calculation process and the uniformity of data sources. Through unit conversion and summation operations, the comprehensive quantification of multiple reagent parameters is achieved, providing accurate raw data for subsequent standardization processing and objective function construction.

[0044] As can be seen from the above, this embodiment solves the problem of the lack of a unified standard for the calculation of key indicators, making the calculation results of different working conditions and different processing units comparable; the formula parameters are directly related to the output of the pre-set sub-model, ensuring the logical closed loop of the technical solution; and it provides reliable support for the scientific construction of the objective function.

[0045] In one embodiment of this application, the objective function for determining the current treatment unit's reagent dosing is based on the total reagent consumption per standardized unit volume of water, the sludge production per standardized unit volume of water, and the standardized reagent reaction settling time, including: The fluctuation characteristics of the standardized water quality dataset, the deviation of process operating parameters, and the intensity of the synergistic effect of reagents for the current treatment unit are obtained. Among them, the fluctuation characteristics of the standardized water quality dataset are the degree of deviation between the standardized water quality parameters at the current moment and the average of the historical water quality parameters; the deviation of process operating parameters is the difference between the current process operating parameters and the optimal process parameter range; and the intensity of the synergistic effect of reagents is the average of the reaction synergy coefficients among the reagents. Based on the fluctuation characteristics of the standardized water quality dataset, the correlation weight corresponding to the total consumption of reagents per unit of water volume was determined by grey relational analysis. Based on the deviation of process operating parameters, the correlation weight corresponding to the amount of sludge generated per standardized unit of water volume is determined by grey relational analysis. Based on the strength of the synergistic effect of the drugs, the correlation weights corresponding to the stable reaction time of the standardized drugs were determined by grey relational analysis. Based on the total consumption of reagents per standardized unit volume of water, the amount of sludge generated per standardized unit volume of water, the reaction stabilization time of standardized reagents, and their corresponding correlation weights, the objective function for reagent dosing in the current treatment unit is determined.

[0046] In this embodiment, the fluctuation characteristics of the standardized water quality dataset represent the degree of deviation between the current standardized water quality parameters and the historical average water quality parameters. This is used to measure the dynamic range of water quality changes and reflect water quality stability. It can be obtained by calculating the absolute deviation of each parameter in the current standardized water quality dataset from the historical average, and then taking a weighted average of all deviations. The formula is as follows: ,in The weight of the j-th water quality parameter (consistent with the fusion weight in the data preprocessing stage). The j-th standardized water quality parameter at the current time The historical average of this parameter (calculated based on data from the same period over the past 30 days).

[0047] In this embodiment, the process operating parameter deviation is used to evaluate the degree of deviation between the process operating state and the optimal operating state. Its calculation rule is tied to whether the current process operating parameters (such as aeration intensity, hydraulic retention time, and stirring rate) are within the optimal process parameter range. Specifically, it is defined as follows: the process operating parameter deviation is the absolute difference between the current parameter and the boundary of the optimal process parameter range (0 is taken within the range); wherein, the optimal process parameter range is determined based on historical best treatment effect data, and the current process operating parameters include aeration intensity, hydraulic retention time, and stirring rate, etc.

[0048] The specific calculation logic for the deviation is as follows: If the current process operating parameter value is within the optimal process parameter range (including the endpoints of the range), then the process operating parameter deviation is 0. If the current process operating parameter value is lower than the lower limit of the optimal process parameter range, the deviation is the absolute difference between the lower limit of the optimal range and the current parameter. If the value of the current process operating parameter is higher than the upper limit of the optimal process parameter range, the deviation is the absolute difference between the current parameter and the upper limit of the optimal range.

[0049] For example, the optimal aeration intensity range for the pretreatment unit is 0.8-1.2 m³ / (m²) h), the current aeration intensity is 0.9 m³ / (m²) h) (in the range of 0.8-1.2 m³ / (m²) If the aeration intensity is within the range of h), then the deviation is 0; if the current aeration intensity is 0.7 m³ / (m²) h) (below the lower limit of the interval by 0.8 m³ / (m²) h), then the deviation is |0.8-0.7|=0.1m³ / (m²) h).

[0050] In this embodiment, the strength of the drug synergy effect represents the average value of the reaction synergy coefficients among the agents in the target drug combination. The synergy coefficient reflects the proportion of increase in reaction efficiency after mixing two agents, and the average value is used to comprehensively evaluate the synergistic effect of multiple agents. The reaction synergy coefficient between each pair of agents can be obtained by experimentally measuring the proportion of increase in reaction efficiency after mixing two agents (the value ranges from [0,1], and the larger the value, the better the synergistic effect). Then, the average value of all synergy coefficients is taken to obtain the strength of the drug synergy effect. For example, in the pretreatment unit, the synergy coefficient between PAC and demulsifier is 0.8, the synergy coefficient between PAC and PAM is 0.9, and the synergy coefficient between demulsifier and PAM is 0.7. Then, the strength of the drug synergy effect = (0.8 + 0.9 + 0.7) / 3 = 0.8.

[0051] Grey relational analysis is a data analysis method used to process incomplete information systems. It reflects the degree of correlation between different parameters by calculating the correlation between data sequences. For example, the fluctuation characteristics of a standardized water quality dataset, the deviation of process operating parameters, and the intensity of synergistic effects of reagents are used as reference sequences. Each reference sequence contains five consecutive data sets for the current time and the previous four time points; the total chemical consumption is standardized per unit of water volume (CDC). Standardized unit water volume sludge production ( Standardized reagent reaction stability time ( ) is a comparison sequence The time dimension of the comparison sequence is consistent with that of the reference sequence.

[0052] The reference and comparison sequences are processed using extreme value normalization and mapped to the [0,1] interval to eliminate the difference in data magnitude.

[0053] First, calculate the absolute difference between the comparison sequence and the reference sequence. (k=1,2,...,5), then determine the minimum value of the difference sequence. and maximum value Finally, substitute into the correlation coefficient formula Calculation, where The resolution coefficient is set to 0.5.

[0054] The overall correlation coefficient is obtained by averaging the correlation coefficients between each comparison sequence and the reference sequence. This reflects the long-term correlation between the comparison sequence and the reference sequence.

[0055] Based on the fluctuation characteristics of standardized water quality datasets and Determining the degree of correlation Based on the deviation of process operating parameters and Determining the degree of correlation Based on the strength of drug synergistic effect and Determining the degree of correlation And then , , Perform normalization processing to ensure .

[0056] In this embodiment, three core parameters reflecting the stability of the current operating conditions (water quality fluctuation, process deviation, and reagent synergy) are first obtained through quantitative calculation. Then, grey relational analysis is used to quantify the correlation between the three standardized optimization indicators and each operating condition parameter, and the correlation degree is converted into corresponding correlation weights. Finally, an objective function is constructed based on the three standardized indicators and correlation weights, so that the weight allocation of the objective function is accurately matched with the current operating conditions, ensuring that the optimization direction meets the actual needs.

[0057] As can be seen from the above, this embodiment realizes the dynamic and scientific allocation of correlation weights, solving the problem that fixed weights cannot adapt to changes in operating conditions; grey relational analysis is suitable for sewage treatment scenarios with limited data and complex operating conditions, without the need to establish complex mathematical models, thus improving the practicality and reliability of weight allocation; the accurate matching of the objective function with the current operating conditions enables subsequent optimization results to prioritize the optimization needs, thereby improving the overall treatment effect and operational efficiency.

[0058] In one embodiment of this application, the objective function for the current treatment unit's reagent dosing is determined based on the total reagent consumption per standardized unit volume of water, the sludge production per standardized unit volume of water, the standardized reagent reaction stabilization time, and their corresponding correlation weights, including: The objective function for drug dosing in the current treatment unit is determined based on the fourth formula; The fourth formula is: ; Where F represents the objective function value of the current processing unit's reagent dosage. The correlation weight represents the total consumption of reagents per standardized unit of water. This represents the total amount of chemicals consumed per standardized unit of water volume. The correlation weight represents the amount of sludge produced per standardized unit of water volume. This represents the amount of sludge produced per standardized unit of water volume. The association weights represent the correlations corresponding to the stability times of standardized drug reactions. Indicates the stabilization time of a standardized pharmaceutical reaction.

[0059] In this embodiment, the objective function aims to minimize the objective function value F of the current treatment unit's reagent addition. That is, the reagent addition parameters are adjusted through subsequent particle swarm optimization algorithms to make the F value as small as possible, thereby achieving the comprehensive optimization goal of less reagent consumption, less sludge production, and shorter reaction time.

[0060] For example, when , , , , , When, F = 0.6 × 0.1887 + 0.3 × 0.201 + 0.1 × 0.3 ≈ 0.1915.

[0061] In the fitness function of the subsequent particle swarm optimization algorithm, the F value is combined with the constraint penalty term (if the parameters violate the constraints, such as excessive effluent or chemical conflict, a penalty value is added to the F value) to ensure that the optimization result satisfies both the minimization of the comprehensive objective and the process constraint requirements.

[0062] In this embodiment, the fourth formula sums the three standardized optimization indices with the dynamic correlation weights to construct a single quantifiable comprehensive optimization objective function; by minimizing F, the optimization direction is clarified, so that the subsequent particle swarm optimization algorithm can iteratively adjust the drug dosing parameters around the objective.

[0063] As can be seen from the above, this embodiment provides a clear objective function expression, solving the problem of unfounded quantitative calculation of the objective function; the weighted summation form realizes the comprehensive integration of multi-dimensional optimization requirements, avoiding the neglect of one aspect due to optimization of a single indicator; the introduction of dynamic weights enables the objective function to adapt to changes in operating conditions in real time, ensuring that the optimization direction always meets the actual needs, and providing clear guidance for subsequent iterative optimization.

[0064] In one embodiment of this application, the method further includes: Real-time acquisition of reaction process parameters between reagents and wastewater within the current treatment unit, including floc formation characteristic parameters and reagent residual concentration; Calculate the deviation between the reaction process parameters and the preset reaction parameter thresholds; Based on the deviation, the independent base dosage of each agent in the target agent combination set is corrected to obtain the corrected target agent combination set. Among them, the dosing of agents based on the target agent combination set includes: Dosing of agents is based on the modified target agent combination set.

[0065] In this embodiment, the reaction process parameters are key parameters for real-time monitoring during the reaction between the reagent and wastewater, directly reflecting the reaction progress and effect. These include floc formation characteristic parameters and reagent residual concentration. In this embodiment, reaction process monitoring equipment can be deployed downstream of the reagent dosing area and upstream of the unit outlet of the current treatment unit to collect floc formation characteristic parameters and reagent residual concentration in real time. The floc formation characteristic parameters are collected by a floc monitor, including the average floc particle size and floc formation rate. The reagent residual concentration can be collected by a reagent concentration sensor, such as a PAC residual aluminum ion concentration sensor or a PAM residual concentration sensor. The collection frequency is set to 30 seconds per time to ensure timely capture of dynamic changes in the reaction process.

[0066] The preset reaction parameter thresholds are critical values ​​for reaction process parameters determined based on historical best reaction performance data and process requirements. They serve as the benchmark for judging whether the reaction effect meets the standards. These thresholds can be stored in a threshold database and adjusted according to the treatment unit type and wastewater type. For example, the preset reaction parameter thresholds for a pretreatment unit might be: average floc size ≥ 50 mm. The floc formation rate is ≥0.5cm / min, the residual aluminum ion concentration of PAC is ≤0.2mg / L, and the residual concentration of PAM is ≤0.5mg / L.

[0067] The deviation is the difference between the current reaction process parameters and the preset reaction parameter thresholds. It is used to measure the degree of deviation between the reaction effect and the expected target, providing a basis for adjusting the dosage. The specific calculation rules are as follows: For parameters where a larger value is better (such as average floc size and floc formation rate), the deviation = current value - preset threshold; for parameters where a smaller value is better (such as residual reagent concentration), the deviation = preset threshold - current value. For example, if the current floc formation rate is 0.4 cm / min and the preset threshold is 0.5 cm / min, then the deviation = 0.4 - 0.5 = -0.1 cm / min; if the current PAC residual aluminum ion concentration is 0.25 mg / L and the preset threshold is 0.2 mg / L, then the deviation = 0.2 - 0.25 = -0.05 mg / L.

[0068] The revised target reagent combination set is a set of addition parameters obtained by adjusting the independent basic addition amount of the original target reagent combination set based on the deviation of reaction process parameters, so that the addition parameters are adapted to the dynamic changes of the reaction process.

[0069] In this embodiment, a graded correction rule is formulated based on the magnitude and direction of the deviation to correct the independent base dosage in the target drug combination set: When the deviation is ≥0 (the parameter meets or is better than the preset threshold): the dosage of the corresponding agent is not corrected; When the deviation is < 0 and ≤10%×preset threshold (parameters slightly deviate from the threshold): adjust the corresponding dosage of the agent by 5% (increase the dosage of the coagulant aid when the floc-related parameters do not meet the standards; reduce the dosage of the corresponding agent when the agent residue exceeds the standard). When the deviation is < 0 and >10%×preset threshold (parameter deviates significantly from threshold): Adjust the corresponding dosage of the agent by 10%.

[0070] For example, the deviation in floc formation rate is -0.1 cm / min ( =20% × preset threshold 0.5cm / min), then the PAM dosage will be increased by 10%; the deviation of PAC residual aluminum ion concentration is -0.05mg / L ( =25% × preset threshold 0.2 mg / L), then the PAC dosage will be reduced by 10%. After correction, the target reagent combination set is obtained, ensuring that the dosage parameters can adapt to changes in the reaction process.

[0071] In this embodiment, during the drug dosing process, key parameters of the reaction process (floc formation characteristics, drug residue) are monitored in real time to dynamically determine whether the reaction effect meets expectations. When the reaction parameters deviate from the preset threshold, the deviation is calculated and the independent basic dosage of the target drug combination set is corrected according to the grading rules. Finally, the dosing is performed based on the corrected target drug combination set, forming a real-time feedback closed loop of dosing, monitoring and correction to ensure that the reaction effect is always stable within the expected range.

[0072] As can be seen from the above, this embodiment solves the problem that fixed dosing parameters cannot adapt to the dynamic changes in the reaction process, and improves the dynamic adaptability of the dosing parameters; by adjusting the dosage of the reagent in real time, it can avoid the increase in subsequent treatment load due to insufficient reaction, or the waste and secondary pollution caused by excessive reagent; and improve the compliance rate of the final effluent water quality.

[0073] In one embodiment of this application, the method further includes: Obtain the fluctuation characteristics and abrupt changes in wastewater flow rate of the standardized water quality dataset for the current processing unit; If the fluctuation range of the standardized water quality dataset is greater than the first preset range, or the sudden change range of the sewage flow is greater than the second preset range, then it is determined that the current working condition is abnormal. For abnormal operating conditions, based on the type and degree of abnormality of the abnormal operating conditions and the processing data of similar abnormal operating conditions in the past, and through the preset emergency sub-model, an initial emergency agent combination set is obtained. The initial emergency agent combination set includes the basic emergency dosage and the emergency dosage priority. The optimization constraint boundary of the particle swarm optimization algorithm is adjusted based on the key constraints under abnormal operating conditions to obtain the adjusted particle swarm optimization algorithm; the key constraints are the conditions to ensure that the effluent water quality meets the standards and the process operation is safe. The emergency initial agent combination set is iteratively optimized based on the adjusted particle swarm optimization algorithm to obtain the emergency target agent combination set, and agents are added based on the emergency target agent combination set.

[0074] In this embodiment, the fluctuation characteristic amplitude is a quantified value of the fluctuation characteristics of the standardized water quality dataset, reflecting the maximum deviation ratio of the current water quality from the historical mean, and is used to determine whether the water quality is abnormal. The fluctuation characteristic amplitude can be obtained by calculating the maximum deviation ratio between the current standardized water quality dataset and the historical mean, using the following formula: ,in, Let j be the j-th standardized water quality parameter at the current moment. This is the historical average of the parameter. For example, if the current value of the COD standardized parameter is 0.8 and the historical average is 0.5, then the deviation ratio is 60%, meaning the fluctuation characteristic amplitude is 60%.

[0075] The magnitude of a sudden change in wastewater flow rate is the percentage deviation of the current wastewater flow rate from the average flow rate over a previous period (e.g., 1 hour). It is used to determine whether the wastewater flow rate has suddenly increased or decreased. The magnitude of the sudden change in wastewater flow rate can be obtained by calculating the percentage deviation of the current wastewater flow rate from the average flow rate over the previous hour, using the following formula: ,in Given the current sewage flow rate, This represents the average flow rate over the previous hour. For example, if the current flow rate is 120 m³ / h and the average flow rate over the previous hour is 80 m³ / h, then the change in flow rate is 50%.

[0076] The first preset range is a critical value for water quality fluctuations determined based on the impact resistance of the wastewater treatment system. If this range is exceeded, the water quality is considered abnormal. The second preset range is a critical value for sudden flow changes determined based on the treatment capacity of the wastewater treatment system. If this range is exceeded, the flow is considered abnormal.

[0077] The methods for determining the first and second preset amplitudes are as follows: Data Acquisition and Preprocessing: Collect historical operating data of the target wastewater treatment system for the past 1–3 years, including influent water quality indicators (such as COD, ammonia nitrogen, total phosphorus, SS), influent flow rate, corresponding treatment effect data (such as effluent water quality compliance rate) and historical fault records (such as effluent exceeding standards, sludge bulking, equipment overload), and remove invalid data under abnormal operating conditions (such as equipment maintenance, extreme weather interference data).

[0078] Impact resistance and handling capacity rating: Regarding the first preset range: Based on historical water quality fluctuation data, the maximum fluctuation range of each water quality indicator under fault-free operating conditions is statistically analyzed. Combined with the water quality fluctuation threshold that caused the effluent to exceed the standard in historical fault records, the water quality fluctuation threshold of each treatment unit is determined by the percentile method (such as taking the 95th percentile), which is the first preset range. For example, if the maximum fluctuation range of COD in the pretreatment unit under fault-free conditions is ±15% and the fault trigger threshold is ±20%, then the first preset range is ±18%.

[0079] Regarding the second preset range: Based on historical flow data, the maximum flow change rate of each processing unit under fault-free operating conditions is statistically analyzed. Combined with the flow mutation threshold that caused overload of processing capacity in historical fault records, the critical value of flow mutation is determined by the safety factor method (multiplying the maximum flow change rate under fault-free conditions by a safety factor of 0.8–0.9), which is the second preset range. For example, if the maximum flow change rate of the biochemical unit under fault-free conditions is ±25%, then the second preset range is ±20%.

[0080] Dynamic adjustment mechanism: The first and second preset ranges can be dynamically adjusted according to the type of processing unit, seasonal operating conditions and real-time operating data. For example, under low temperature conditions in winter, the first preset range can be appropriately reduced (e.g., ±15%) to strengthen the early warning of abnormal water quality. Under high flow conditions in the rainy season, the second preset range can be finely adjusted (e.g., ±22%) to adapt to the processing capacity.

[0081] Abnormal operating conditions refer to operational states where water quality fluctuations or flow rate mutations exceed corresponding preset limits. These include water quality shocks (such as a sudden increase in COD or ammonia nitrogen) and flow rate mutations (such as a sudden increase in flow rate due to heavy rain). This embodiment can calculate the fluctuation characteristic amplitude and mutation amplitude in real time. If either amplitude exceeds the corresponding preset limit, it is determined that the current operating condition is abnormal. At the same time, based on the specific parameters of the fluctuation characteristic amplitude and the changing trend of the mutation amplitude, the type of abnormal operating condition (such as COD shock, ammonia nitrogen shock, sudden increase or decrease in flow rate) and the degree of abnormality (mild: amplitude is 1-1.5 times the preset amplitude; moderate: 1.5-2 times; severe: >2 times) are identified. For example, if the COD fluctuation characteristic amplitude is 60% (twice the first preset amplitude of 30%), it is determined to be a COD shock - moderate abnormality.

[0082] The preset emergency sub-model is a dedicated model trained based on historical abnormal working condition processing data. It is used to quickly output an initial emergency agent combination set adapted to the current abnormal working condition, thereby improving the speed of abnormal response. For the currently identified abnormal working condition, the abnormality type, abnormality degree and historical processing data of similar abnormal working conditions are input into the preset emergency sub-model, and the model outputs an initial emergency agent combination set.

[0083] The quantitative correspondence between the emergency basic injection volume and the degree of abnormality is as follows: Anomaly severity classification: Based on the first preset amplitude (critical value for water quality fluctuation) and the second preset amplitude (critical value for sudden change in flow rate) mentioned above, the anomaly severity is divided into 3 levels: Mild anomaly: The current parameter fluctuation range is 100%–120% of the preset range (i.e., just triggered by the anomaly judgment, deviating from the critical value ≤20%), such as the COD concentration exceeding the first preset range by 10%; Moderate abnormality: The fluctuation range of the current parameter is 120%–150% of the preset range (20%–50% deviation from the critical value), such as the influent flow rate exceeding the second preset range by 30%; Severe anomaly: The fluctuation range of the current parameter is more than 150% of the preset range (deviation from the critical value > 50%), such as the ammonia nitrogen concentration exceeding the first preset range by 60%.

[0084] Dosage multiple mapping: The ratio of the emergency basic dosage to the regular basic dosage is directly linked to the degree of abnormality. Mild abnormality: take 1.3–1.5 times; Moderately abnormal: take 1.5–1.8 times; Severe abnormality: take 1.8–2.0 times; The more severe the anomaly, the higher the dosage multiplier should be. The specific value can be determined by fitting the best effect of historical anomaly handling data (e.g., for mild COD shock, the optimal multiplier is 1.4 times).

[0085] Emergency dosing priorities are adjusted based on reaction requirements under abnormal operating conditions: for example, during COD surges, oxidants are prioritized to rapidly degrade pollutants, thus increasing their dosing priority; during ammonia nitrogen surges, nitrifying agents and alkalinity regulators are prioritized to ensure nitrification efficiency. Key constraints under abnormal operating conditions include ensuring effluent quality meets standards (e.g., COD ≤ 50 mg / L, ammonia nitrogen ≤ 5 mg / L) and ensuring process safety (e.g., reagent dosage does not exceed the equipment's maximum dosing capacity, and there are no reagent conflicts). Based on these key constraints, the optimization constraint boundaries of the particle swarm optimization algorithm are adjusted: the range of emergency baseline dosage is expanded (1.5 times the normal range), effluent quality-related constraint thresholds are tightened (e.g., adjusting the COD constraint threshold from 50 mg / L to 45 mg / L), and mandatory constraints for reagent conflict avoidance are added.

[0086] The initial emergency agent combination set is input into the adjusted particle swarm optimization algorithm, and the emergency target agent combination set is obtained by calculating according to the above iterative optimization process. In this embodiment, the system automatically switches to the emergency dosing mode, controls the metering pump to add agents based on the emergency target agent combination set, and simultaneously activates the audible and visual alarm device to remind maintenance personnel to pay attention.

[0087] In this embodiment, the fluctuation characteristics of the standardized water quality dataset and the abrupt change in sewage flow are monitored in real time to promptly determine abnormal operating conditions and identify their type and degree. An emergency initial reagent combination set adapted to the abnormal operating conditions is quickly output through a preset emergency sub-model to avoid the problem of response lag in conventional models. The constraint boundary of the particle swarm optimization algorithm is adjusted to ensure that the optimization process prioritizes meeting the key requirements of effluent water quality compliance and process safety. Dosing is performed based on the optimized emergency target reagent combination set to achieve rapid response and stable treatment under abnormal operating conditions. After the operating conditions are restored, the system switches back to the conventional mode.

[0088] As can be seen from the above, this embodiment fills the gap in the adaptation of conventional optimization logic under abnormal operating conditions, and improves the shock resistance of the sewage treatment system; the preset emergency sub-model combined with historical data ensures the rationality of the initial emergency dosing parameters and shortens the response time; the adjusted optimization constraint boundary ensures the treatment effect and process safety under abnormal operating conditions, effectively avoids excessive effluent and process disorder, and improves the stability and reliability of the entire system operation.

[0089] Based on the same inventive concept, this application also provides an intelligent water treatment agent dosing device for implementing the intelligent water treatment agent dosing method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more embodiments of the intelligent water treatment agent dosing device provided below can be found in the limitations of the intelligent water treatment agent dosing method described above, and will not be repeated here.

[0090] This application provides an intelligent dosing device for water treatment chemicals, such as... Figure 2 As shown, the intelligent water treatment chemical dosing device 20 includes: a data acquisition module 21, an initial chemical module 22, a function construction module 23, and a dosing control module 24; The data acquisition module 21 is used to acquire multidimensional water quality data at the inlet and outlet of different treatment units in the sewage treatment system, and to preprocess the multidimensional water quality data to obtain standardized water quality datasets corresponding to different treatment units; the different treatment units include pretreatment units, biochemical treatment units and advanced treatment units. The initial reagent module 22 is used to obtain the initial reagent combination set corresponding to the current treatment unit based on the standardized water quality dataset and wastewater flow rate, and through the corresponding preset sub-model. Different treatment units correspond to different preset sub-models. The initial reagent combination set includes the independent basic dosage of each reagent, the dosage priority of each reagent, and process correlation parameters. Among them, the process correlation parameters include the basic suspended solids generation in wastewater, the reagent-sludge correlation coefficient, and the reagent reaction lag time. Function construction module 23 is used to determine the objective function for the current treatment unit's reagent dosing based on the independent basic dosage and process-related parameters; The dosing control module 24 is used to iteratively optimize the initial drug combination set based on the objective function and the particle swarm optimization algorithm to obtain the target drug combination set, and then dosing the drug based on the target drug combination set.

[0091] In one embodiment of this application, the function construction module 23 is specifically used for: The total chemical consumption per unit volume of water is determined based on the independent baseline dosage. The amount of sludge produced per unit volume of water is determined based on the correlation coefficient between the agent and sludge, the basic suspended solids generation in wastewater, and the independent basic dosage. Determine the steady-state time of a drug reaction based on the drug reaction lag time; Extreme value standardization was performed on the total consumption of reagents per unit volume of water, the amount of sludge produced per unit volume of water, and the reaction stabilization time of reagents to obtain standardized total consumption of reagents per unit volume of water, standardized sludge produced per unit volume of water, and standardized reaction stabilization time of reagents. The objective function for reagent dosing in the current treatment unit is determined based on the total consumption of reagents per standardized unit volume of water, the amount of sludge generated per standardized unit volume of water, and the reaction settling time of the standardized reagents.

[0092] In one embodiment of this application, the function construction module 23 is further configured to: The total amount of reagent consumed per unit volume of water is determined based on the first formula. The first formula is: ; Where C represents the total amount of reagent consumed per unit volume of water. This represents the independent basal dosage of the i-th agent. Let m represent the overall correction coefficient for the i-th drug, and m represent the quantity of the drug. The amount of sludge produced per unit volume of wastewater is determined based on the reagent-sludge correlation coefficient, the basic suspended solids production of wastewater, and the independent basic dosage, including: The amount of sludge produced per unit volume of water is determined based on the second formula. The second formula is: ; in, This indicates the amount of sludge produced per unit volume of water. This indicates the amount of basic suspended solids generated in the wastewater. Represents the reagent-sludge correlation coefficient for the i-th reagent; Determining the steady-state time of a drug reaction based on the drug reaction lag time includes: The reaction stabilization time of the drug is determined based on the third formula; The third formula is: ; Where T represents the drug reaction stabilization time. Indicates natural reaction time. This represents the reaction lag time of the i-th drug. This represents the influence coefficient of the order of addition of the i-th drug.

[0093] In one embodiment of this application, the function construction module 23 is further configured to: The fluctuation characteristics of the standardized water quality dataset, the deviation of process operating parameters, and the intensity of the synergistic effect of reagents for the current treatment unit are obtained. Among them, the fluctuation characteristics of the standardized water quality dataset are the degree of deviation between the standardized water quality parameters at the current moment and the average of the historical water quality parameters; the deviation of process operating parameters is the difference between the current process operating parameters and the optimal process parameter range; and the intensity of the synergistic effect of reagents is the average of the reaction synergy coefficients among the reagents. Based on the fluctuation characteristics of the standardized water quality dataset, the correlation weight corresponding to the total consumption of reagents per unit of water volume was determined by grey relational analysis. Based on the deviation of process operating parameters, the correlation weight corresponding to the amount of sludge generated per standardized unit of water volume is determined by grey relational analysis. Based on the strength of the synergistic effect of the drugs, the correlation weights corresponding to the stable reaction time of the standardized drugs were determined by grey relational analysis. Based on the total consumption of reagents per standardized unit volume of water, the amount of sludge generated per standardized unit volume of water, the reaction stabilization time of standardized reagents, and their corresponding correlation weights, the objective function for reagent dosing in the current treatment unit is determined.

[0094] In one embodiment of this application, the function construction module 23 is further configured to: The objective function for drug dosing in the current treatment unit is determined based on the fourth formula; The fourth formula is: ; Where F represents the objective function value of the current processing unit's reagent dosage. The correlation weight represents the total consumption of reagents per standardized unit of water. This represents the total amount of chemicals consumed per standardized unit of water volume. The correlation weight represents the amount of sludge produced per standardized unit of water volume. This represents the amount of sludge produced per standardized unit of water volume. The association weights represent the correlations corresponding to the stability times of standardized drug reactions. Indicates the stabilization time of a standardized pharmaceutical reaction.

[0095] In one embodiment of this application, the intelligent dosing device 20 for water treatment agents further includes: a correction module, specifically used for: real-time acquisition of reaction process parameters between the agent and the wastewater in the current treatment unit, the reaction process parameters including floc formation characteristic parameters and agent residual concentration; Calculate the deviation between the reaction process parameters and the preset reaction parameter thresholds; Based on the deviation, the independent base dosage of each agent in the target agent combination set is corrected to obtain the corrected target agent combination set. The dosing control module is specifically used for: Dosing of agents is based on the modified target agent combination set.

[0096] In one embodiment of this application, the intelligent dosing device 20 for water treatment agents further includes: an anomaly handling module, specifically used to: acquire the fluctuation characteristic amplitude and the abrupt change amplitude of the wastewater flow rate of the standardized water quality dataset of the current treatment unit; If the fluctuation range of the standardized water quality dataset is greater than the first preset range, or the sudden change range of the sewage flow is greater than the second preset range, then it is determined that the current working condition is abnormal. For abnormal operating conditions, based on the type and degree of abnormality of the abnormal operating conditions and the processing data of similar abnormal operating conditions in the past, and through the preset emergency sub-model, an initial emergency agent combination set is obtained. The initial emergency agent combination set includes the basic emergency dosage and the emergency dosage priority. The optimization constraint boundary of the particle swarm optimization algorithm is adjusted based on the key constraints under abnormal operating conditions to obtain the adjusted particle swarm optimization algorithm; the key constraints are the conditions to ensure that the effluent water quality meets the standards and the process operation is safe. The emergency initial agent combination set is iteratively optimized based on the adjusted particle swarm optimization algorithm to obtain the emergency target agent combination set, and agents are added based on the emergency target agent combination set.

[0097] See Figure 3 , Figure 3 This is a schematic block diagram of an electronic device provided according to an embodiment of this application. Figure 3 The electronic device 300 in this embodiment may include one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The processors 301, input devices 302, output devices 303, and memories 304 communicate with each other via a communication bus 305. The memories 304 store computer programs, including program instructions. The processors 301 execute the program instructions stored in the memories 304. Specifically, the processors 301 are configured to invoke the program instructions to perform the functions of the modules in the aforementioned device embodiments, for example... Figure 2 The functions of the data acquisition module 21, the initial reagent module 22, the function construction module 23, and the dosing control module 24 are shown.

[0098] It should be understood that, in the embodiments of this application, the processor 301 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0099] Input device 302 may include a touchpad, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint orientation information), a microphone, etc., and output device 303 may include a display (LCD, etc.), a speaker, etc.

[0100] The memory 304 may include read-only memory and random access memory, and provides instructions and data to the processor 301. A portion of the memory 304 may also include non-volatile random access memory. For example, the memory 304 may also store information such as preset sub-models and objective functions.

[0101] In specific implementations, the processor 301, input device 302, and output device 303 described in the embodiments of this application can execute the implementation method described in the intelligent dosing method for water treatment agents provided in the embodiments of this application, or they can execute the implementation method of the electronic device described in the embodiments of this application, which will not be repeated here.

[0102] In another embodiment of this application, a computer-readable storage medium is provided. This computer-readable storage medium stores a computer program, which includes program instructions. When executed by a processor, the program instructions implement all or part of the processes in the methods described above. Alternatively, the computer program can instruct related hardware to complete the process. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0103] The computer-readable storage medium can be an internal storage unit of the electronic device in any of the foregoing embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., provided on the electronic device. Furthermore, the computer-readable storage medium can include both internal and external storage units of the electronic device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.

[0104] Those skilled in the art will recognize that the modules / units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0105] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the electronic devices and units described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0106] In the several embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of modules / units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces or modules / units, or it may be an electrical, mechanical, or other form of connection.

[0107] The modules / units described as separate components may or may not be physically separate. Similarly, the components shown as modules / units may or may not be physical modules / units; they may be located in one place or distributed across multiple network modules / units. Some or all of the modules / units can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.

[0108] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0109] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for intelligent dosing of water treatment chemicals, characterized in that, include: Multidimensional water quality data of the inlet and outlet of different treatment units in a wastewater treatment system are acquired, and the multidimensional water quality data are preprocessed to obtain standardized water quality datasets corresponding to different treatment units; the different treatment units include pretreatment units, biochemical treatment units, and advanced treatment units. For the current treatment unit, based on the standardized water quality dataset and wastewater flow rate, and through the corresponding preset sub-model, the initial reagent combination set corresponding to the current treatment unit is obtained; different treatment units correspond to different preset sub-models; the initial reagent combination set includes the independent basic dosage for each reagent, the dosage priority for each reagent, and process correlation parameters; wherein, the process correlation parameters include the basic suspended solids generation in wastewater, the reagent-sludge correlation coefficient, and the reagent reaction lag time; The objective function for reagent dosing in the current treatment unit is determined based on the independent basic dosage and the process-related parameters. Based on the objective function, the initial drug combination set is iteratively optimized using a particle swarm optimization algorithm to obtain a target drug combination set, and drugs are then added based on the target drug combination set.

2. The intelligent dosing method for water treatment agents as described in claim 1, characterized in that, The objective function for determining the current treatment unit's reagent dosage based on the independent baseline dosage and the process correlation parameters includes: The total chemical consumption per unit volume of water is determined based on the aforementioned independent basic dosage. The amount of sludge produced per unit volume of water is determined based on the agent-sludge correlation coefficient, the basic suspended solids generation in the wastewater, and the independent basic dosage. The drug reaction lag time is determined based on the drug reaction lag time; The extreme values ​​of the total consumption of reagent per unit volume of water, the amount of sludge produced per unit volume of water, and the reaction stabilization time of the reagent are standardized to obtain the standardized total consumption of reagent per unit volume of water, the standardized amount of sludge produced per unit volume of water, and the standardized reaction stabilization time of the reagent. The objective function for reagent dosing in the current treatment unit is determined based on the total consumption of reagents per standardized unit volume of water, the amount of sludge produced per standardized unit volume of water, and the reaction stabilization time of the standardized reagents.

3. The intelligent dosing method for water treatment agents as described in claim 2, characterized in that, The determination of the total chemical consumption per unit volume of water based on the independent baseline dosage includes: The total amount of reagent consumed per unit volume of water is determined based on the first formula. The first formula is: ; Where C represents the total amount of reagent consumed per unit volume of water. This represents the independent basal dosage of the i-th agent. Let m represent the overall correction coefficient for the i-th drug, and m represent the quantity of the drug. The determination of sludge production per unit volume of water based on the reagent-sludge correlation coefficient, the basic suspended solids generation in the wastewater, and the independent basic dosage includes: The amount of sludge produced per unit volume of water is determined based on the second formula. The second formula is: ; in, This indicates the amount of sludge produced per unit volume of water. This indicates the amount of basic suspended solids generated in the wastewater. Represents the reagent-sludge correlation coefficient for the i-th reagent; The determination of the drug reaction stabilization time based on the drug reaction lag time includes: The reaction stabilization time of the drug is determined based on the third formula; The third formula is: ; Where T represents the drug reaction stabilization time. Indicates natural reaction time. This represents the reaction lag time of the i-th drug. This represents the influence coefficient of the order of addition of the i-th drug.

4. The intelligent dosing method for water treatment agents as described in claim 2, characterized in that, The objective function for determining the current treatment unit's reagent dosing based on the standardized unit water volume total reagent consumption, the standardized unit water volume sludge production, and the standardized reagent reaction settling time includes: The fluctuation characteristics of the standardized water quality dataset, the deviation of process operating parameters, and the intensity of the synergistic effect of reagents for the current treatment unit are obtained. The fluctuation characteristics of the standardized water quality dataset are the degree of deviation between the standardized water quality parameters at the current moment and the average of the historical water quality parameters. The deviation of process operating parameters is the difference between the current process operating parameters and the optimal process parameter range. The intensity of the synergistic effect of reagents is the average of the reaction synergy coefficients among the reagents. Based on the fluctuation characteristics of the standardized water quality dataset, the correlation weight corresponding to the total consumption of the standardized unit water volume reagent is determined by grey relational analysis. Based on the deviation of the process operating parameters, the correlation weight corresponding to the amount of sludge produced per standardized unit of water volume is determined by grey relational analysis. Based on the strength of the synergistic effect of the drug, the correlation weight corresponding to the reaction stability time of the standardized drug is determined by grey relational analysis. Based on the total consumption of reagents per standardized unit of water, the amount of sludge generated per standardized unit of water, the reaction stabilization time of the standardized reagents, and their corresponding correlation weights, the objective function for reagent dosing in the current treatment unit is determined.

5. The intelligent dosing method for water treatment agents as described in claim 4, characterized in that, The objective function for determining the dosing of reagents in the current treatment unit, based on the total consumption of reagents per standardized unit volume of water, the amount of sludge produced per standardized unit volume of water, the reaction stabilization time of the standardized reagents, and their corresponding correlation weights, includes: The objective function for drug dosing in the current treatment unit is determined based on the fourth formula; The fourth formula is: ; Where F represents the objective function value of the current processing unit's reagent dosage. The correlation weight represents the total consumption of reagents per standardized unit of water. This represents the total amount of chemicals consumed per standardized unit of water volume. The correlation weight represents the amount of sludge produced per standardized unit of water volume. This represents the amount of sludge produced per standardized unit of water volume. The association weights represent the correlations corresponding to the stability times of standardized drug reactions. Indicates the stabilization time of a standardized pharmaceutical reaction.

6. The intelligent dosing method for water treatment agents as described in claim 1, characterized in that, Also includes: Real-time acquisition of reaction process parameters between the reagent and wastewater within the current treatment unit, including floc formation characteristic parameters and reagent residual concentration; Calculate the deviation between the reaction process parameters and the preset reaction parameter thresholds; Based on the deviation, the independent base dosage of each agent in the target agent combination set is corrected to obtain the corrected target agent combination set. The dosing of agents based on the target agent combination set includes: Dosing of agents is based on the modified target agent combination set.

7. The intelligent dosing method for water treatment agents as described in claim 1, characterized in that, Also includes: Obtain the fluctuation characteristics and abrupt changes in wastewater flow rate of the standardized water quality dataset for the current processing unit; If the fluctuation range of the standardized water quality dataset is greater than the first preset range, or the sudden change range of the sewage flow is greater than the second preset range, then it is determined that the current operating condition is abnormal. For the aforementioned abnormal operating conditions, based on the type and degree of abnormality of the abnormal operating conditions and the processing data of similar historical abnormal operating conditions, and through a preset emergency sub-model, an initial emergency agent combination set is obtained. The initial emergency agent combination set includes the basic emergency dosage and the emergency dosage priority. The optimization constraint boundary of the particle swarm optimization algorithm is adjusted based on the key constraints under abnormal operating conditions to obtain the adjusted particle swarm optimization algorithm; the key constraints are the conditions to ensure that the effluent water quality meets the standards and the process operation is safe. The emergency initial agent combination set is iteratively optimized based on the adjusted particle swarm optimization algorithm to obtain the emergency target agent combination set, and agents are added based on the emergency target agent combination set.

8. A smart dosing device for water treatment agents, characterized in that, include: The data acquisition module is used to acquire multidimensional water quality data at the inlet and outlet of different treatment units in the wastewater treatment system, and to preprocess the multidimensional water quality data to obtain standardized water quality datasets corresponding to different treatment units; the different treatment units include a pretreatment unit, a biochemical treatment unit, and an advanced treatment unit. The initial reagent module is used to obtain the initial reagent combination set corresponding to the current treatment unit based on the standardized water quality dataset and wastewater flow rate, and through the corresponding preset sub-model. Different treatment units correspond to different preset sub-models. The initial reagent combination set includes the independent basic dosage for each reagent, the dosage priority for each reagent, and process correlation parameters. Among them, the process correlation parameters include the basic suspended solids generation in wastewater, the reagent-sludge correlation coefficient, and the reagent reaction lag time. The function construction module is used to determine the objective function for the current treatment unit's reagent dosing based on the independent basic dosage and the process-related parameters; The dosing control module is used to iteratively optimize the initial drug combination set based on the objective function and through the particle swarm optimization algorithm to obtain the target drug combination set, and then add drugs based on the target drug combination set.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.