Multi-objective real-time optimization method and system for wastewater treatment considering carbon emission constraints

By integrating intelligent data processing and multi-objective evolutionary algorithms, a unified carbon accounting model was constructed, which solved the multi-objective optimization problem of operating costs and carbon emissions in wastewater treatment, and realized the low-carbon and economical operation of the wastewater treatment process.

CN122085706BActive Publication Date: 2026-07-24GUIZHOU UNIVERSITY OF FINANCE AND ECONOMICS
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUIZHOU UNIVERSITY OF FINANCE AND ECONOMICS
Filing Date
2026-04-22
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing wastewater treatment technologies lack intelligent decision-making capabilities, making it impossible to effectively address the multi-objective optimization of operating costs and carbon emissions. Furthermore, their real-time data processing and state estimation capabilities are insufficient, resulting in inadequate carbon emission accounting accuracy and making it difficult to support real-time optimization decisions.

Method used

By integrating intelligent data processing algorithms, probabilistic state estimation models, and multi-objective evolutionary algorithms, a unified carbon accounting model is constructed. Combined with an interactive decision support interface, intelligent collaborative optimization of operating costs and carbon emissions is achieved.

Benefits of technology

While ensuring effluent quality, it effectively balances operating costs and carbon emissions, supports operators in making flexible decisions based on actual needs, and achieves low-carbon and economical operation of the wastewater treatment process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122085706B_ABST
    Figure CN122085706B_ABST
Patent Text Reader

Abstract

The application provides a sewage treatment multi-objective real-time optimization method and system considering carbon emission constraints, comprising: obtaining original real-time data flow of a sewage treatment process and performing cleaning, denoising and standardization processing; constructing a unified carbon accounting model, respectively calculating direct carbon emission and indirect carbon emission to obtain real-time carbon emission accounting results; constructing an optimization function with ton water operation cost and ton water carbon emission as double objectives, and establishing a multi-objective optimization mathematical model in combination with water quality and equipment constraints; solving the model by using a multi-objective evolutionary algorithm or a weighted Chebyshev method to obtain a Pareto optimal solution set; and presenting the optimal solution set by using a visual technology and determining optimization control parameters of the sewage treatment process based on interactive decision-making.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automated control technology for wastewater treatment, and in particular to a multi-objective real-time optimization method and system for wastewater treatment that takes carbon emission constraints into account. Background Technology

[0002] Wastewater treatment is a crucial component of urban infrastructure and environmental protection, but it is also an energy-intensive industry. With the increasing severity of global climate change, the wastewater treatment industry faces new challenges in reducing carbon emissions. Currently, common wastewater treatment optimization technologies primarily focus on minimizing operating costs and achieving effluent quality standards, such as model-based predictive control methods or data-driven methods (e.g., artificial neural networks).

[0003] However, the existing technology has the following technical defects:

[0004] First, the intelligent decision-making capability is insufficient. Existing methods lack the ability to intelligently solve multi-objective optimization problems. They typically simplify multiple conflicting objectives, such as operating costs and carbon emissions, into a single weighted objective function, failing to effectively handle the optimal relationship between objectives. This results in insufficient exploration of the decision space and makes it difficult to provide operators with diverse optimization options.

[0005] Secondly, the real-time data processing and state estimation capabilities are weak. Existing technologies lack efficient preprocessing algorithms and anomaly detection mechanisms for real-time data streams of wastewater treatment processes, and also lack state estimation methods based on probabilistic reasoning. This makes it impossible to accurately capture dynamic changes and uncertainties in the system, resulting in insufficient accuracy in carbon emission accounting and difficulty in supporting real-time optimization decisions. Summary of the Invention

[0006] To address the aforementioned technical problems, this invention provides a multi-objective real-time optimization method and system for wastewater treatment that considers carbon emission constraints. By integrating intelligent data processing algorithms, probabilistic state estimation models, improved multi-objective evolutionary algorithms, and interactive decision support interfaces, it achieves intelligent collaborative optimization of operating costs and carbon emissions.

[0007] This invention provides a multi-objective real-time optimization method for wastewater treatment considering carbon emission constraints, comprising:

[0008] The raw real-time data stream of the wastewater treatment process is acquired, and the raw real-time data stream is cleaned, outlier handled, and data standardized to obtain a standardized real-time wastewater treatment dataset.

[0009] Based on the standardized real-time wastewater treatment dataset, a unified carbon accounting model is constructed to calculate and integrate direct and indirect carbon emissions to obtain real-time carbon emission accounting results.

[0010] Based on the real-time carbon emission accounting results and wastewater treatment operation cost data, an optimization function with dual objectives of operating cost per ton of water and carbon emission per ton of water is constructed, and combined with constraints, a multi-objective optimization mathematical model for wastewater treatment is obtained.

[0011] Based on the aforementioned multi-objective optimization mathematical model for wastewater treatment, a multi-objective evolutionary algorithm or a weighted Chebyshev method is used to solve the problem. Through iterative calculation and non-dominated sorting, the Pareto optimal solution set is obtained.

[0012] The Pareto optimal solution set is presented using visualization technology, and a specific optimal operating scheme is selected based on interactive decision-making to obtain the optimized control parameters of the wastewater treatment process.

[0013] Furthermore, the process of cleaning, outlier handling, and data standardization of the original real-time data stream to obtain a standardized real-time wastewater treatment dataset includes:

[0014] The original real-time data stream is cleaned by interpolation or forward padding to remove missing values ​​and outliers identified based on the 3σ rule or box plot rule, resulting in a cleaned dataset.

[0015] The cleaned dataset is then subjected to data denoising processing using moving average or wavelet transform filtering methods to obtain the denoised dataset.

[0016] The denoised dataset is then subjected to data standardization processing. The data of different dimensions are converted into a uniform scale by using the max-min normalization or Z-score standardization method to obtain the standardized real-time wastewater treatment dataset.

[0017] Furthermore, the construction of a unified carbon accounting model, which calculates and integrates direct and indirect carbon emissions to obtain real-time carbon emission accounting results, includes:

[0018] Based on the standardized real-time wastewater treatment dataset, a direct carbon emission accounting model is constructed. The operating parameters of the biological treatment unit are extracted from the standardized real-time wastewater treatment dataset, and the N2O greenhouse gas emissions during the biological treatment process are calculated using the IPCC emission factor method in combination with the operating parameters to obtain the direct carbon emissions.

[0019] An indirect carbon emission accounting model is constructed. The real-time power consumption data in the standardized real-time wastewater treatment dataset is multiplied with the regional power grid carbon emission factor to calculate the carbon emission of power consumption. The chemical dosage data in the standardized real-time wastewater treatment dataset is multiplied with the life cycle carbon emission factor to calculate the carbon emission of chemical consumption, thus obtaining the indirect carbon emission amount.

[0020] By integrating the direct and indirect carbon emissions, the total carbon emissions are calculated, and the carbon emission intensity per unit volume of treated water is calculated by combining the treated water volume data, thus obtaining the real-time carbon emission accounting result.

[0021] Furthermore, the construction of an optimization function with dual objectives of operating cost per ton of water and carbon emissions per ton of water, combined with constraints, yields a multi-objective optimization mathematical model for wastewater treatment, including:

[0022] Based on the real-time carbon emission accounting results and wastewater treatment operation data, an objective function for the operating cost per ton of water, including electricity cost, chemical cost and labor cost, is constructed.

[0023] Based on the unified carbon accounting model, a mapping relationship between decision variables and carbon emission intensity is established, and an objective function for carbon emissions per ton of water is constructed.

[0024] Determine the effluent water quality constraints and equipment operation constraints;

[0025] By integrating the objective function of operating cost per ton of water, the objective function of carbon emissions per ton of water, the effluent quality constraints, and the equipment operation constraints, a multi-objective optimization mathematical model for wastewater treatment is obtained.

[0026] Furthermore, the method employs a multi-objective evolutionary algorithm or a weighted Chebyshev method to solve the problem, and through iterative calculation and non-dominated sorting, obtains a Pareto optimal solution set, including:

[0027] For the aforementioned multi-objective optimization mathematical model for wastewater treatment, a non-dominated sorting genetic algorithm is used for population initialization to obtain an initial solution set;

[0028] The objective function value is evaluated and the constraint conditions are checked for individuals in the initial solution set. The fitness of individuals is determined by non-dominated sorting and crowding distance calculation.

[0029] Based on the individual fitness, a selection operation is performed, and crossover and mutation operations are performed on the selected individuals to generate offspring individuals. The offspring individuals are merged with the current generation individuals to form a mixed population. The mixed population is subjected to non-dominated sorting and crowding calculation. Based on the level of non-dominated sorting and the size of crowding distance, a preset number of individuals are selected to form a new generation population.

[0030] The new generation population is updated to the current generation population, and the individual evaluation, fitness determination, selection, crossover, mutation and screening steps are repeated until the preset iteration termination condition is met to obtain the final convergent solution set.

[0031] Non-dominated solutions are extracted from the final convergent solution set to form the Pareto optimal solution set representing different cost-carbon emission trade-offs.

[0032] Furthermore, the construction of a unified carbon accounting model, which calculates and integrates direct and indirect carbon emissions to obtain real-time carbon emission accounting results, includes:

[0033] Based on the standardized real-time wastewater treatment dataset, a state-space model of the wastewater treatment process is constructed, defining the state vector, observation vector, system dynamic equation, and observation equation.

[0034] Design a deep density network structure containing an encoder and a decoder for learning and representing the posterior distribution of states;

[0035] The prediction and update steps of Bayesian filtering are implemented based on the deep density network, and the posterior distribution of the state at the current time is calculated.

[0036] Based on the posterior distribution of the current state, Monte Carlo sampling is used to perform probability estimation of direct and indirect carbon emissions, resulting in real-time carbon emission accounting results including mean, variance, and confidence interval.

[0037] Furthermore, the method employs a multi-objective evolutionary algorithm or a weighted Chebyshev method to solve the problem, and through iterative calculation and non-dominated sorting, obtains a Pareto optimal solution set, including:

[0038] Based on the decision variable space, the Delaunay tetrahedral partitioning algorithm is used to construct a tetrahedral mesh representation with probabilistic degrees of freedom, where each node contains position coordinates and probability distribution parameters representing uncertainty, thus obtaining the constructed tetrahedral mesh model.

[0039] Based on the completed tetrahedral mesh model, a quadratic interpolation basis function is constructed on each tetrahedral element, and a quadratic weighted interpolation is performed using the probability distribution parameters of the nodes to obtain an interpolation representation model that represents the value of any point in the decision space and the corresponding probability distribution.

[0040] Based on the constructed tetrahedral mesh model and the interpolation representation model, adaptive population updates are performed during the optimization process. Robust crossover and adaptive mutation operations are designed using the probability distribution parameters of the nodes to generate a new generation of population.

[0041] Based on the interpolation representation model, a local search is performed on the new generation population, and non-dominated solutions are extracted from the final population to reconstruct the Pareto front, thereby obtaining the Pareto optimal solution set containing probability-enhanced representations.

[0042] Furthermore, the process of presenting the Pareto optimal solution set using visualization technology and selecting a specific optimal operating scheme based on interactive decision-making to obtain the optimized control parameters of the wastewater treatment process includes:

[0043] Based on the Pareto optimal solution set, a spatial grid is constructed in the target space according to a preset resolution, and the discrete solution is interpolated and fitted using the grid line integral method to obtain a continuous Pareto front curve.

[0044] Geometric feature analysis is performed on the continuous Pareto front curve to determine the segmentation nodes. Based on the segmentation nodes, the continuous Pareto front curve is divided into multiple front segment segments. The weighted function is used to smoothly splice the front segment segments to reconstruct a globally continuous Pareto front surface.

[0045] Based on the globally continuous Pareto front surface, an interactive visual exploration interface is constructed, which supports operators to continuously slide and position themselves along the globally continuous Pareto front surface on the interactive visual exploration interface, and obtain the combination of decision variables corresponding to the current positioning point in real time.

[0046] In response to the operator's confirmation operation on the interactive visual exploration interface, based on the combination of decision variables corresponding to the current location point, the control parameter set values ​​of each unit of the wastewater treatment process are extracted through mapping relationship to obtain the optimized control parameters of the wastewater treatment process.

[0047] Furthermore, the step of selecting a specific optimal operating scheme based on interactive decision-making to obtain the optimized control parameters of the wastewater treatment process includes:

[0048] Based on the Pareto optimal solution set, a two-dimensional scatter plot is constructed with the horizontal axis representing the operating cost per ton of water and the vertical axis representing the carbon emissions per ton of water, resulting in a visualization interface that presents the distribution of the Pareto optimal solution set.

[0049] In response to the interactive selection operation performed by the operator on the visualization interface based on current compliance indicator requirements or corporate preferences, determine the target optimal solution corresponding to the interactive selection operation;

[0050] Based on the target optimal solution, the corresponding aeration rate, reflux ratio and reagent dosage values ​​are extracted to obtain a set of process control parameters.

[0051] The set of process control parameters is sent to the field control system through the control interface to obtain the optimized control parameters of the wastewater treatment process.

[0052] The present invention also provides a multi-objective real-time optimization system for wastewater treatment considering carbon emission constraints, comprising:

[0053] The data acquisition and preprocessing module is used to acquire the raw real-time data stream of the wastewater treatment process, and to perform data cleaning, outlier handling and data standardization on the raw real-time data stream to obtain a standardized real-time wastewater treatment dataset.

[0054] The carbon accounting model construction module is used to construct a unified carbon accounting model based on the standardized real-time wastewater treatment dataset, calculate and integrate direct and indirect carbon emissions respectively, and obtain real-time carbon emission accounting results.

[0055] The optimization model construction module is used to construct an optimization function with dual objectives of operating cost per ton of water and carbon emission per ton of water based on the real-time carbon emission accounting results and wastewater treatment operation cost data, and to obtain a multi-objective optimization mathematical model for wastewater treatment by combining the constraints.

[0056] The optimization solution module is used to solve the multi-objective optimization mathematical model of wastewater treatment using a multi-objective evolutionary algorithm or a weighted Chebyshev method, and obtain the Pareto optimal solution set through iterative calculation and non-dominated sorting.

[0057] The interactive decision-making and control module is used to present the Pareto optimal solution set through visualization technology, and select a specific optimal operating scheme based on interactive decision-making to obtain the optimized control parameters of the wastewater treatment process.

[0058] The beneficial effects of this invention are: by establishing a unified carbon accounting model and a multi-objective optimization framework, it is possible to effectively balance operating costs and carbon emissions while ensuring effluent quality, supporting operators to make flexible decisions based on actual needs and achieving low-carbon and economical operation of the wastewater treatment process. Attached Figure Description

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

[0060] Figure 1 This is a schematic flowchart of the multi-objective real-time optimization method for wastewater treatment that takes carbon emission constraints into account, as described in this invention.

[0061] Figure 2 This is a flowchart illustrating the steps involved in constructing the unified carbon accounting model of this invention.

[0062] Figure 3 This is a structural block diagram of the multi-objective real-time optimization system for wastewater treatment that takes carbon emission constraints into account, as described in this invention. Detailed Implementation

[0063] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0064] Example 1

[0065] like Figure 1 As shown, this invention provides a multi-objective real-time optimization method for wastewater treatment considering carbon emission constraints, comprising:

[0066] Step S1: Obtain the raw real-time data stream of the wastewater treatment process, and perform data cleaning, outlier processing and data standardization on the raw real-time data stream to obtain a standardized real-time wastewater treatment dataset.

[0067] In the specific implementation process, online monitoring instruments, smart meters, and SCADA systems are deployed to collect multi-source heterogeneous data, including process parameters (such as dissolved oxygen, pH value, temperature, sludge concentration, etc.), equipment operating status (such as blower frequency, pump flow rate, etc.), energy consumption data, and water quality data, forming a raw real-time data stream. Considering that the raw data may contain noise and missing information, preprocessing is necessary to ensure the accuracy of subsequent model calculations.

[0068] Step S2: Based on the standardized real-time wastewater treatment dataset, construct a unified carbon accounting model, calculate and integrate direct and indirect carbon emissions respectively, and obtain real-time carbon emission accounting results.

[0069] This step aims to quantify the carbon footprint of the wastewater treatment process. Direct carbon emissions primarily originate from the emission of greenhouse gases such as nitrous oxide generated during biological treatment; indirect carbon emissions mainly stem from electricity and chemical consumption. These two emissions are calculated separately and then integrated to obtain the total carbon emissions, ultimately outputting real-time carbon emission accounting results.

[0070] Step S3: Based on the real-time carbon emission accounting results and wastewater treatment operation cost data, construct an optimization function with dual objectives of operating cost per ton of water and carbon emission per ton of water, and combine it with constraints to obtain a multi-objective optimization mathematical model for wastewater treatment.

[0071] This step clarifies the two core objectives of optimizing the system: reducing economic costs and minimizing environmental impact. An objective function for the operating cost per ton of water (including electricity, chemical costs, etc.) and an objective function for carbon emissions per ton of water are constructed. Simultaneously, to ensure process safety and compliance, constraints on effluent quality and equipment operation are set, transforming the problem into a constrained multi-objective optimization problem.

[0072] Step S4: Based on the multi-objective optimization mathematical model for wastewater treatment, a multi-objective evolutionary algorithm or weighted Chebyshev method is used to solve the problem. Through iterative calculation and non-dominated sorting, the Pareto optimal solution set is obtained.

[0073] Since cost and carbon emissions are often conflicting, there is no single, absolutely optimal solution. Multi-objective evolutionary algorithms (such as NSGA-II) are used to find a set of Pareto optimal solutions through operations such as population evolution, selection, crossover, and mutation. This set of solutions represents the set of optimal operating schemes under different trade-offs.

[0074] Step S5: Present the Pareto optimal solution set using visualization technology, and select a specific optimal operating scheme based on interactive decision-making to obtain the optimized control parameters of the wastewater treatment process.

[0075] The calculated Pareto optimal solution set is presented to the operator, enabling interactive selection based on current policy requirements (such as carbon quotas) or business strategies (such as cost control priorities). Once a specific optimal solution is determined, it is converted into specific process control parameters (such as aeration setpoint, reflux ratio, etc.) to guide on-site control.

[0076] Specifically, firstly, a communication connection is established with the underlying industrial control network of the wastewater treatment plant. Using OPC UA or Modbus TCP / IP protocols, all process variables are read frequently (e.g., once per minute) from SCADA (Supervisory Control and Data Acquisition) or PLC (Programmable Logic Controller). These variables are divided into three categories: firstly, water quality status variables, including chemical oxygen demand (COD), ammonia nitrogen, total nitrogen, total phosphorus, pH value of influent and effluent, and dissolved oxygen (DO) concentration, oxidation-reduction potential (ORP), and sludge concentration (MLSS) in each corridor of the biological treatment tank; secondly, equipment operation variables, covering the operating frequency, current, and outlet pressure of blowers, as well as the start / stop status and flow feedback of various pumps (influent pumps, return pumps, sludge pumps, and chemical dosing pumps); and thirdly, energy consumption data based on smart meter readings. After acquiring the raw data stream, a data cleaning procedure is immediately executed. Outliers caused by sensor malfunctions were identified and removed using the Wright criterion (3-sigma principle) or box plot method based on statistics. For data gaps caused by communication packet loss, time series interpolation methods (such as linear interpolation or spline interpolation) were used to fill in the gaps. Subsequently, data standardization was performed. Due to the significant differences in the dimensions of different variables (e.g., flow rate can reach thousands of cubic meters per hour, while dissolved oxygen is only a few milligrams per liter), Z-score standardization or Min-Max normalization methods were used to map all data to a unified dimensionless interval, thereby eliminating the adverse effects of numerical differences on the convergence of subsequent optimization models, ultimately resulting in a standardized real-time wastewater treatment dataset.

[0077] Second, upon obtaining high-quality data, a unified carbon accounting model is immediately activated for real-time calculations. This model aims to overcome the lag inherent in traditional carbon accounting, which relies solely on monthly reports, and achieve minute-level carbon emission quantification. Carbon emissions are logically divided into direct emissions (Scope 1) and indirect emissions (Scope 2). For direct emissions, the focus is on greenhouse gases generated during biochemical reactions. Based on the International Water Association's (IWA) carbon emission calculation guidelines or the IPCC National Greenhouse Gas Inventory Guidelines, and considering current influent water quality load, aeration rate, and denitrification efficiency, the empirical coefficient method or simplified mechanistic model is used to estimate the production of nitrous oxide (N2O) in the aerobic stage and methane (CH4) in the anaerobic stage, and convert them into carbon dioxide equivalents. For indirect emissions, the electricity carbon footprint is calculated by multiplying real-time collected equipment power consumption data by the average carbon dioxide emission factor of the regional power grid; simultaneously, the material consumption carbon footprint is calculated based on the real-time addition flow rates of phosphorus removal agents and external carbon sources, combined with the carbon emission coefficients of upstream chemical production. In each calculation cycle, all the above-mentioned emissions are summed up and divided by the current instantaneous water volume to output the real-time carbon emission intensity index per ton of water.

[0078] Third, this step is a crucial construction phase that transforms the physical problem into a mathematical problem. Based on the calculation logic and actual operating cost structure in step S2, two core objective functions are defined. The first objective function is to minimize the operating cost per ton of water, and its mathematical expression encompasses real-time electricity costs based on peak-valley electricity prices, reagent consumption costs, and subsequent sludge disposal costs. The second objective function is to minimize carbon emissions per ton of water, directly referencing the calculation results from S2. To ensure the optimization results are feasible and compliant in engineering, strict constraints must be set. These constraints are divided into hard constraints and soft constraints: hard constraints mainly refer to the operating boundaries of physical equipment, such as the blower frequency not falling below its surge limit and the return pump flow rate not exceeding its rated nameplate flow rate; soft constraints mainly refer to environmental compliance requirements, i.e., under any optimized operating conditions, the effluent quality (COD, ammonia nitrogen, etc.) predicted by the model must be strictly lower than the national Class A discharge standard. Key process operating parameters are selected as decision variables, mainly including the dissolved oxygen setpoint in the aerobic zone, the internal reflux ratio of the mixed liquor, the external reflux ratio of sludge, and the dosage rate of key reagents. Therefore, a nonlinear multi-objective optimization mathematical model was constructed, which includes two conflicting objective functions, multiple inequality constraints, and multidimensional decision variables.

[0079] Fourth, given the highly nonlinear nature of wastewater treatment processes and the inherent mutual exclusion between cost and low-carbon objectives (e.g., increasing aeration can reduce pollutant and N2O emission risks, but increases energy costs), traditional single-objective optimization methods (such as weighted summation) struggle to find perfect solutions. Therefore, high-performance multi-objective solution algorithms are introduced. Mathematically, an evolutionary computation engine is activated, typically based on non-dominated sorting genetic algorithms (such as NSGA-II or NSGA-III). The algorithm first randomly initializes a population with different combinations of operating parameters, then simulates biological evolution, iterating through selection, crossover, and mutation. In each generation, the algorithm evaluates the cost and carbon emission performance of each individual, retaining non-dominated solutions where "one objective cannot be optimized without sacrificing another." After hundreds of generations of iterative convergence, the algorithm finally outputs a Pareto optimal solution set. This solution set is not a single solution, but a frontier curve, where each point represents a theoretically optimal operating strategy under current conditions, covering the complete trade-off range from the "lowest cost mode" to the "lowest carbon emission mode."

[0080] Fifth, to ensure that complex mathematical solution sets can be understood and applied by on-site operators, a visualization mapping and decision-making implementation procedure is implemented. The generated high-dimensional solution set is mapped onto a two-dimensional or three-dimensional visual interactive interface, forming a Pareto front graph. Based on the current external environment (such as whether it is during an environmental inspection period or the current electricity price period) and internal strategies (not only meeting standards but also saving energy), operators select the operating point that best meets their current needs on the graph via mouse interaction. Once selected, reverse analysis is immediately performed to extract the corresponding decision variable vector from the optimal solution—namely, the specific dissolved oxygen setpoint, reflux ratio, and dosage. Subsequently, these setpoints are sent to the underlying PLC control system via industrial communication protocols. To ensure safety, a smooth transition logic is implemented to avoid drastic changes in setpoints impacting the microbial environment. After receiving the new setpoints, the on-site equipment executes corresponding actions through PID closed-loop regulation, thereby pulling the actual operating state of the wastewater treatment plant towards the theoretical optimal state, achieving a complete closed loop from data perception to control execution.

[0081] Example 2

[0082] In this embodiment, the process of cleaning, handling outliers, and standardizing the original real-time data stream to obtain a standardized real-time wastewater treatment dataset includes:

[0083] Step S1.1: Clean the original real-time data stream by interpolating or forward padding to remove missing values ​​and outliers identified based on the 3σ rule or box plot rule to obtain the cleaned dataset.

[0084] In actual data acquisition, instrument malfunctions or transmission losses can lead to data gaps. Interpolation methods are used to complete the data and ensure the continuity of the time series. Simultaneously, statistical methods (such as the 3σ rule) are used to identify and remove outliers that significantly deviate from the normal range, preventing them from interfering with subsequent model training and prediction.

[0085] Step S1.2: Perform data denoising on the cleaned dataset by using moving average or wavelet transform filtering methods to obtain the denoised dataset.

[0086] To further improve data quality, filtering techniques such as moving average or wavelet transform are used to smooth data fluctuations and eliminate high-frequency noise caused by sensor jitter or environmental interference, thereby preserving the true process trend reflected by the data.

[0087] Step S1.3: Perform data standardization processing on the denoised dataset. Use max-min normalization or Z-score standardization methods to convert data of different dimensions into a unified scale to obtain the standardized real-time sewage treatment dataset.

[0088] Because wastewater treatment processes involve a wide variety of data with vastly different dimensions and orders of magnitude (e.g., flow rates of thousands of cubic meters versus dissolved oxygen concentrations of only a few milligrams per liter), direct use of these data can negatively impact algorithm convergence. By employing max-min normalization or Z-score standardization, all data are transformed to a uniform scale, laying the foundation for building high-precision carbon accounting and optimization models.

[0089] Specifically, firstly, during the data cleaning phase, the system performs classification, identification, and imputation of missing values. For short-term data loss caused by transient sensor malfunctions or signal transmission interruptions, the system employs linear interpolation. This involves using valid data points before and after the missing point and calculating the linear rate of change between the two points to estimate the value at the intermediate missing moment, thus maintaining the continuity of the data trend. For long-term data loss caused by equipment maintenance, the system searches the historical database and matches historical averages from the same season, time period, and similar water intake conditions to fill the missing data, avoiding the cumulative bias that can occur with a single interpolation method over long periods.

[0090] Next, outlier detection and handling based on the box plot rule are performed. In wastewater treatment data streams, since water quality fluctuations typically do not strictly follow a normal distribution, the box plot rule is preferred over the 3σ rule. The specific steps are as follows: First, the data within the sliding time window is sorted to determine the upper and lower quartiles, and the difference between them is calculated to obtain the interquartile range. Then, the upper bound is defined as the upper quartile plus 1.5 times the interquartile range, and the lower bound is the lower quartile minus 1.5 times the interquartile range. Any data points exceeding these upper and lower bounds are identified as disturbed outliers and automatically replaced using the median within the window. This process effectively removes outliers while preserving the overall distribution characteristics of the data.

[0091] Second, after initial cleaning, wavelet transform threshold denoising technology is used for deep data purification. Wastewater treatment process signals typically contain low-frequency true biochemical reaction trends and high-frequency random measurement noise. Wavelet transform can effectively achieve time-frequency local analysis of the signal. The specific operation process is as follows: First, select appropriate wavelet basis functions (such as the Daubechies wavelet system) and decomposition levels to perform multi-scale decomposition on the cleaned data signal, separating it into approximation coefficients representing low-frequency trends and detail coefficients representing high-frequency disturbances. Second, apply a soft thresholding function to the detail coefficients at each level, shrinking or zeroing noise coefficients with absolute values ​​below a specific threshold to suppress noise components. Finally, use the processed detail coefficients and the original approximation coefficients to perform inverse wavelet transform reconstruction, outputting a denoised dataset that retains the key features of the original signal while removing random interference.

[0092] Third, to eliminate the impact of significant differences in the dimensions and orders of magnitude between different variables on the convergence speed of subsequent optimization algorithms, the denoised data undergoes max-min normalization. A dynamically updated extreme value table is maintained in memory, recording the maximum and minimum values ​​of each parameter (such as influent flow rate, chemical oxygen demand, dissolved oxygen, current, etc.) within historical operating cycles. For each new real-time sampled data point, the corresponding historical minimum value is first subtracted, and then divided by the difference between the historical maximum and minimum values ​​(i.e., the range), thereby linearly mapping all input variables to a closed interval between zero and one. This standardized processing method assigns equal importance weights to all features, significantly improving the training efficiency and optimization accuracy of subsequent machine learning prediction models and multi-objective evolutionary algorithms.

[0093] Example 3

[0094] In this embodiment, as Figure 2 As shown, the construction of a unified carbon accounting model, which calculates and integrates direct and indirect carbon emissions to obtain real-time carbon emission accounting results, includes:

[0095] Step S2.1: Based on the standardized real-time wastewater treatment dataset, construct a direct carbon emission accounting model, extract the operating parameters of the biological treatment unit from the standardized real-time wastewater treatment dataset, and use the IPCC emission factor method in combination with the operating parameters to calculate the N2O greenhouse gas emissions during the biological treatment process to obtain the direct carbon emissions.

[0096] Direct carbon emissions are a significant component of the carbon footprint of wastewater treatment, primarily generated by byproducts of biological nitrogen removal processes. Based on IPCC guidelines and combined with real-time monitoring of biological treatment unit operating parameters, emissions of strong greenhouse gases such as nitrous oxide are dynamically calculated.

[0097] Step S2.2: Construct an indirect carbon emission accounting model. Multiply the real-time power consumption data in the standardized real-time wastewater treatment dataset with the regional power grid carbon emission factor to calculate the carbon emission from power consumption. Multiply the reagent dosage data in the standardized real-time wastewater treatment dataset with the life cycle carbon emission factor to calculate the carbon emission from reagent consumption, thereby obtaining the indirect carbon emission amount.

[0098] This step quantifies the carbon emissions inherent in the consumption of energy and materials. By introducing regional grid carbon emission factors and reagent lifecycle factors, the real-time power consumption and reagent dosage are converted into equivalent CO2 emissions, thereby comprehensively assessing the indirect emissions component.

[0099] Step S2.3: Integrate the direct carbon emissions and the indirect carbon emissions to calculate the total carbon emissions, and combine the treated water volume data to calculate the carbon emission intensity per unit of treated water volume, thereby obtaining the real-time carbon emission accounting result.

[0100] The total carbon emissions are obtained by summing up direct and indirect emissions. To facilitate horizontal comparison and benchmark assessment, the carbon emission intensity (e.g., carbon dioxide equivalent per cubic meter of wastewater) is further calculated by combining the real-time treated water volume, and the final real-time accounting result is output.

[0101] Specifically, firstly, the direct carbon emission accounting submodule mainly targets greenhouse gases such as nitrous oxide generated in the biological treatment unit. Traditional accounting methods typically use fixed emission factors, easily ignoring the impact of changes in the process environment. A dynamic emission factor method based on real-time operating condition correction is adopted. The specific steps are as follows: First, based on the real-time collected influent and effluent total nitrogen concentrations, combined with the instantaneous influent flow rate, the current biological denitrification load is calculated. Second, dissolved oxygen concentration and nitrite concentration are introduced as key correction variables to construct a nonlinear mapping relationship table between nitrous oxide conversion rate and environmental variables; when the dissolved oxygen concentration deviates from the optimal range, leading to incomplete nitrification, the conversion rate coefficient is adjusted accordingly. Third, the real-time nitrous oxide production is calculated by multiplying the corrected conversion rate coefficient by the biological denitrification load. Finally, based on the global warming potential standard, the nitrous oxide production is multiplied by its corresponding carbon dioxide equivalent coefficient (usually taken as 265) to obtain the carbon dioxide equivalent value of the direct carbon emissions.

[0102] Second, the indirect carbon emission accounting submodule focuses on quantifying the implicit emissions from energy and material consumption, divided into two parts: electricity emissions and chemical emissions. For electricity consumption, real-time power data from the entire plant and key process sections such as blowers and reflux pumps is first collected using smart meters, and the power consumption for each time period is obtained by integrating over time. Then, the regional power grid average emission factor database is accessed, which stores the grams of carbon dioxide emitted per kilowatt-hour of electricity produced by the local power grid. The real-time power consumption is multiplied by the power grid emission factor to obtain the electricity-related indirect emissions. For chemical consumption, the flow meter readings of chemicals such as sodium acetate (carbon source) and polyaluminum chloride (phosphorus removal agent) are monitored simultaneously. Combined with the density and concentration parameters of the chemical solution, the real-time consumption mass of pure chemicals is calculated. Then, using the carbon footprint factors of various chemicals in the life cycle assessment database (covering emissions from raw material extraction, production, and transportation), the chemical mass is converted into the corresponding carbon emissions. The sum of these two parts constitutes the complete indirect carbon emission data.

[0103] Third, the comprehensive intensity calculation submodule is responsible for data integration and index output. Within each calculation step, the direct and indirect carbon emissions are summed to obtain the total carbon emissions. To eliminate the impact of treatment scale fluctuations on the evaluation results, the key performance indicator of "carbon emission intensity per ton of water" is further introduced. In the specific calculation, a moving average window is used to smooth the instantaneous influent flow rate data to avoid index jumps caused by flow meter fluctuations. Subsequently, the total carbon emissions are divided by the smoothed treated water volume to obtain the carbon dioxide equivalent produced per unit volume of wastewater treatment. This real-time carbon emission intensity indicator is directly used as one of the optimization objectives of the subsequent multi-objective optimization model. By minimizing this indicator, the control system is driven to find a lower-carbon operating strategy.

[0104] Example 4

[0105] In this embodiment, the construction of an optimization function with dual objectives of operating cost per ton of water and carbon emissions per ton of water, combined with constraints, yields a multi-objective optimization mathematical model for wastewater treatment, including:

[0106] Step S3.1: Based on the real-time carbon emission accounting results and wastewater treatment operation data, construct an objective function for the operating cost per ton of water, which includes electricity costs, chemical costs, and labor costs.

[0107] The objective function aims to minimize economic input. By analyzing real-time operational data, the composition of various costs is quantified, and a mathematical relationship is established between decision variables (such as operating parameters) and operating costs.

[0108] Step S3.2: Based on the unified carbon accounting model, establish the mapping relationship between decision variables and carbon emission intensity, and construct the objective function of carbon emissions per ton of water.

[0109] The objective function aims to minimize environmental impact. Based on the aforementioned carbon accounting model, a model of the impact of operating parameters on carbon emission intensity is further established, enabling the optimization algorithm to find low-carbon operating areas.

[0110] Step S3.3: Determine the effluent water quality constraints and equipment operation constraints.

[0111] Optimization must be based on compliance and safety. Strict constraints must be set to ensure that, under any optimization scheme, the effluent quality indicators meet national or local discharge standards, and the equipment operating parameters are within safe ranges.

[0112] Step S3.4: Integrate the objective function of operating cost per ton of water, the objective function of carbon emissions per ton of water, the effluent quality constraints, and the equipment operation constraints to obtain the multi-objective optimization mathematical model for wastewater treatment.

[0113] By integrating the two objective functions and all constraints mentioned above, a standard mathematical model for a constrained multi-objective optimization problem is constructed. This model serves as the input foundation for subsequent solution algorithms.

[0114] Specifically, firstly, a cost function that dynamically reflects actual economic consumption is constructed. This involves connecting to the local power supply department's time-of-use pricing interface to obtain real-time electricity rates for peak, off-peak, and flat periods. Simultaneously, real-time market unit prices for carbon sources (such as sodium acetate), phosphorus removal agents (such as PAC), and other chemical reagents are maintained in the database. When constructing the function, the focus is on the variable cost component. For electricity costs, the power characteristic curves of key equipment such as blowers and reflux pumps are used to establish a functional relationship between equipment energy consumption and operating parameters such as dissolved oxygen setpoints and reflux ratios. For reagent costs, a dose-response relationship is established between dosage and target removal rate. The instantaneous electricity consumption costs of each piece of equipment and reagent consumption costs are summed and divided by the wastewater treatment volume per unit time to obtain a normalized target function for the operating cost per ton of water. This function can sensitively capture the impact of small changes in operating parameters on economic costs; for example, appropriately increasing aeration during low-electricity-price periods may be more economical than during high-electricity-price periods.

[0115] Second, the core of this step lies in establishing a rapid prediction model (i.e., a surrogate model) from decision variables to carbon emission intensity. Since the biochemical reactions in wastewater treatment are extremely complex, and the calculation process in Example 3 is often lagging, directly using it for real-time optimization is inefficient. Therefore, a nonlinear regression model based on machine learning (such as Gaussian process regression or random forest) is trained using historically accumulated standard datasets. This model uses dissolved oxygen concentration, internal recirculation ratio, external recirculation ratio, sludge discharge, and added carbon source as inputs, and the carbon emission intensity per ton of water calculated in Example 3 as the output target for supervised learning. Through extensive training, this model establishes a high-dimensional nonlinear mapping relationship between operating parameters and carbon emissions. During the optimization process, the algorithm only needs to input candidate operating parameters into this model to obtain the corresponding carbon emission prediction value within milliseconds, thereby achieving rapid search and location of low-carbon operating areas.

[0116] Third, defining the constraints is crucial to ensuring the feasibility of the optimization scheme. A two-layer constraint system was established: the first layer is the hard constraint of effluent quality based on regulations. A simplified activated sludge mechanism model (such as ASM and its variants) or a deep neural network prediction model was integrated to predict future effluent chemical oxygen demand, ammonia nitrogen, total nitrogen, and total phosphorus concentrations based on the current influent status and candidate operating parameters. The optimization model mandates that these predicted values ​​must be strictly lower than the upper limits of national or local emission standards (e.g., Class A standards). The second layer is the operational constraint based on the physical characteristics of the equipment. The rated parameters of each device in the SCADA system were read, defining the frequency range of the blower (e.g., 30 to 50 Hz), the maximum and minimum limits of the pump flow rate, and the physical opening range of the valves. This ensures that the control commands generated by the optimization algorithm do not exceed the safe operating boundaries of the hardware, avoiding equipment damage or process oscillations.

[0117] Fourth, the aforementioned dispersed objectives and constraints are mathematically integrated. A multi-dimensional vector is defined as the decision variable space, containing controllable parameters such as dissolved oxygen setpoint, internal recirculation ratio, external recirculation ratio, and carbon source addition rate. The ton-of-water operating cost function and the ton-of-water carbon emission function are assembled into a vector objective function, aiming to simultaneously minimize these two often conflicting objectives (for example, increasing aeration to reduce ammonia nitrogen increases energy consumption and cost, while also increasing indirect carbon emissions). Simultaneously, water quality compliance requirements and equipment physical limitations are transformed into a set of inequality constraint equations. Finally, a standard constrained multi-objective nonlinear programming mathematical model is constructed. This model clearly defines the optimization search space, objective direction, and feasible region, providing a rigorous mathematical description for subsequent use of evolutionary algorithms to solve for the Pareto optimal solution set.

[0118] In engineering optimization, surrogate models are also known as meta-models or response surface models. In wastewater treatment process optimization, the computational complexity of real biochemical reaction mechanism models (such as the ASM series) is extremely high, making it difficult to perform thousands of iterative calculations in the short time required for real-time optimization. Therefore, machine learning algorithms are used to construct an approximate mathematical model with low computational cost and fast response speed to replace the complex original model. This model, by learning from historical input and output data, can "surrogate" the original process with extremely high computational efficiency, predicting the system response (such as carbon emissions or effluent quality) under given operating conditions, thereby significantly reducing the optimization solution time.

[0119] The dose-response relationship refers to the quantitative relationship between the dosage of a reagent and the removal efficiency (response). For example, how many units of total phosphorus can be removed by adding a certain amount of polyaluminum chloride (PAC)? This relationship is usually not linear and exhibits diminishing marginal returns (i.e., as the dosage increases, the removal efficiency per unit of reagent decreases). The system accurately calculates the minimum reagent cost required to achieve a specific effluent quality by fitting the dosage and corresponding removal rate curves from historical data, preventing cost waste and secondary pollution caused by overdosing.

[0120] The decision variable space refers to the multidimensional space comprised of all independent variables that can be adjusted by the control system in an optimization problem. In this system, this space consists of parameter axes such as dissolved oxygen setpoint, internal recirculation ratio, external recirculation ratio, carbon source dosage, and phosphorus removal agent dosage. Each point in the space represents a specific operating condition of the wastewater treatment plant (i.e., a specific combination of parameters). The task of the optimization algorithm is to avoid regions (infeasible regions) in this multidimensional space that would lead to water quality exceeding standards or equipment failure, and to find the set of points in the remaining feasible region that simultaneously achieve a relatively optimal state for both cost and carbon emission targets.

[0121] Example 5

[0122] In this embodiment, the step of using a multi-objective evolutionary algorithm or a weighted Chebyshev method to solve the problem, and obtaining the Pareto optimal solution set through iterative calculation and non-dominated sorting, includes:

[0123] Step S4.1: For the multi-objective optimization mathematical model of wastewater treatment, a non-dominated sorting genetic algorithm is used to initialize the population and obtain an initial solution set.

[0124] The solution process begins with a non-dominated sorting genetic algorithm (such as NSGA-II). First, a set of initial solutions is randomly generated as a population, with each individual representing a potential combination of running parameters.

[0125] Step S4.2: Evaluate the objective function value and check the constraints for individuals in the initial solution set, and determine the fitness of individuals by non-dominated sorting and crowding distance calculation.

[0126] Calculate the cost and carbon emissions for each individual and check if it meets the constraints. Stratify the population using a non-dominated sorting algorithm and maintain solution diversity using crowding distance to determine the quality of individuals.

[0127] Step S4.3: Perform a selection operation based on the individual fitness, and perform crossover and mutation operations on the selected individuals to generate offspring individuals. Merge the offspring individuals with the current generation individuals to form a mixed population. Perform non-dominated sorting and crowding calculation on the mixed population. Based on the level of the non-dominated sorting and the crowding distance, select a preset number of individuals to form a new generation population.

[0128] Simulating the process of biological evolution, superior individuals are selected and produce offspring, introducing new genetic traits through crossover and mutation. An elite preservation strategy involves mixing parent and offspring and re-selecting to ensure that superior genes are passed on to the next generation.

[0129] Step S4.4: Update the new generation population to the current generation population, and repeat the individual evaluation, fitness determination, selection, crossover, mutation and screening steps until the preset iteration termination condition is met to obtain the final converged solution set.

[0130] Through continuous iterative evolution, the population gradually approaches the Pareto optimal front. The computation stops when the preset number of iterations or convergence criteria are reached.

[0131] Step S4.5: Extract non-dominated solutions from the final converged solution set to form the Pareto optimal solution set representing different cost-carbon emission trade-offs.

[0132] The final output solution set contains all the optimal solutions that cannot be "dominated" by other solutions under the current conditions (i.e., cannot improve one objective without sacrificing another), reflecting the best trade-off between cost and carbon emissions.

[0133] Specifically, first, a population initialization procedure is executed, which is the starting point of the entire evolutionary algorithm. Based on pre-defined physical boundaries of decision variables (e.g., dissolved oxygen concentration set at 0.5 to 4.0 mg / L, internal recirculation ratio at 100% to 300%, and external recirculation ratio at 50% to 100%), an initial population is generated using real-number encoding. Each "individual" actually represents a complete set of wastewater treatment plant operation control parameters. To ensure good uniformity and representativeness of the initial solutions within the solution space, not only is a random number generator used to produce random solutions, but a strategy based on Latin hypercube sampling is also introduced to avoid the initial population clustering in small, localized areas. Furthermore, during the initialization phase, the system immediately performs feasibility prediction on the generated individuals, directly eliminating those that clearly violate hard physical constraints (such as exceeding the maximum frequency limit of the blower) and regenerating compliant individuals at their locations, thus ensuring that every chromosome in the initial population is physically executable.

[0134] Secondly, after the initial population is generated, the core evaluation and stratification stage begins. First, the decision variables of each individual in the population are substituted into the optimization mathematical model constructed in Example 4 to calculate the corresponding two objective function values: operating cost per ton of water and carbon emission intensity per ton of water. Simultaneously, the degree of violation of constraints (such as whether effluent ammonia nitrogen exceeds the standard) is calculated. For individuals that violate constraints, a penalty function method is used to assign them a maximal objective value, causing them to be naturally eliminated in subsequent competition. Then, a fast non-dominated sorting algorithm is executed. This algorithm divides individuals in the population into different levels (i.e., the frontier) based on dominance relationships. If individual A is not inferior to individual B in all objectives and is superior to individual B in at least one objective, then A is said to dominate B. The first level consists of optimal individuals not dominated by any other individual, the second level consists of individuals dominated only by the first level, and so on. To distinguish the superiority or inferiority of individuals within the same level and maintain population diversity, the "crowding distance" of each individual is further calculated. This distance index quantifies the density of an individual in the surrounding area of ​​the target space; individuals with extreme solutions at both ends of the front surface or with sparser surrounding solutions will be assigned a larger crowding distance value, thus gaining priority in comparisons at the same level.

[0135] Next, based on hierarchical and crowding information, a survival-of-the-fittest operation simulating biological evolution is executed. First, a selection operation is performed using a binary tournament selection method, randomly selecting two individuals for comparison, prioritizing the individual with the lower hierarchical level (i.e., the better one); if the hierarchical levels are the same, individuals with greater crowding distance are selected to ensure a wide distribution of solutions. The selected superior individuals enter the mating pool. Next, a crossover operation is performed using a simulated binary crossover operator (SBX), allowing the genes (i.e., operation parameters) of the two parent individuals to be exchanged and recombinated, generating offspring individuals that inherit parental characteristics while possessing new traits. Then, a mutation operation is performed, using a polynomial mutation operator to slightly perturb the genes of the offspring individuals, preventing the algorithm from prematurely getting trapped in local optima. Finally, an elite preservation strategy is implemented: the newly generated offspring population is merged with the parent population, forming a mixed population doubled in size. This mixed population is then re-sorted for non-dominated ranking and crowding calculation, and based on the ranking results, the same number of individuals as the original population size are truncated from top to bottom to form the next generation population. This process ensures that the best individuals produced in each generation are not lost due to the randomness of crossover mutation.

[0136] Then, the selected new generation is used as the current parent generation, and the above evaluation, sorting, selection, crossover, and mutation steps are repeated iteratively. Strict iteration termination conditions are set, including a preset maximum number of generations (e.g., 500 generations) and a population convergence stability index (i.e., the average change in the Pareto front over several consecutive generations is less than a specific threshold). During the iteration process, the population continuously approaches the origin in the target space, and its distribution range gradually expands. This means that the solutions in the solution set are continuously optimized in terms of cost reduction and carbon emission reduction. The hypervolume index of each generation is monitored in real time. This index comprehensively reflects the convergence and distribution diversity of the solution set. When the hypervolume index tends to stabilize, it indicates that the algorithm has found the globally optimal frontier.

[0137] Finally, once the termination condition is met, the iterative calculation stops, and the final generation population is output. Only the non-dominated solutions ranked Rank 1 are extracted from this population to form the final Pareto optimal solution set. For ease of engineering application, these mathematical solutions are converted into an intuitive graphical form: the horizontal axis represents the operating cost per ton of water, and the vertical axis represents the carbon emission intensity per ton of water. Each point on the graph corresponds to a specific operating plan. The curve connecting these points is the Pareto front. Based on different decision-makers' preferences, three key solutions are automatically identified: the lowest cost solution, suitable for extremely limited budgets; the lowest carbon emission solution, suitable for periods with stringent environmental assessments; and the "knee point" solution, located at the point of greatest curvature on the front, representing a balanced solution that achieves maximum carbon emission reduction at the lowest cost, typically used as the system's recommended settings and sent to the underlying PLC controller.

[0138] In multi-objective optimization problems, the Pareto optimal set is defined as a set of solutions where no single solution is optimal across all objectives. This is because there are often inherent contradictions between the objectives (for example, drastically reducing effluent pollutant concentrations typically requires higher energy and chemical consumption, leading to increased costs and indirect carbon emissions). Therefore, there is no single solution that is optimal for all objectives simultaneously. In other words, these solutions represent the best, irreplaceable trade-offs between different objectives. For wastewater treatment managers, the Pareto optimal set doesn't tell them "which one" is absolutely best, but rather demonstrates the objective boundaries of "the minimum cost I must incur to reduce carbon emissions to a certain level."

[0139] Non-dominated sorting is a core hierarchical mechanism in multi-objective evolutionary algorithms. Its basic principle is to determine dominance by pairwise comparisons of the objective function values ​​of individuals in the population. If an individual A is no worse than individual B on all objectives and is strictly better than B on at least one objective, then A is said to dominate B. Non-dominated sorting involves selecting all individuals in the population that are not dominated by any other individual to form the first non-dominated layer (i.e., the current optimal front); then these individuals are temporarily removed, and the remaining population is used to find non-dominated individuals to form the second layer, and so on. This hierarchical mechanism enables the algorithm to continuously drive the population towards the Pareto front, and is the key logic for achieving simultaneous multi-objective optimization.

[0140] Crowding distance is an evaluation metric used to maintain the diversity of solution sets. In the target space, if all solutions are clustered in a small region, although they may all be optimal, they do not provide decision-makers with a rich range of choices. Crowding distance calculates the perimeter or volume of the cube (or rectangle) formed by an individual and its two neighboring individuals in the target space. The larger the crowding distance, the more "open" the area around the individual is, meaning the solution has more unique distribution characteristics. When selecting, the algorithm tends to retain individuals with large crowding distances, thereby guiding the population to be evenly distributed along the entire Pareto front and avoiding the homogenization of the solution set due to premature convergence.

[0141] Example 6

[0142] In this embodiment, the construction of a unified carbon accounting model, calculating and integrating direct and indirect carbon emissions to obtain real-time carbon emission accounting results, includes:

[0143] Step S6.1: Based on the standardized real-time wastewater treatment dataset, construct a state-space model of the wastewater treatment process, and define the state vector, observation vector, system dynamic equation, and observation equation.

[0144] This step introduces a more advanced dynamic modeling method. It defines a state vector containing key process parameters (such as dissolved oxygen and suspended solids concentration) and an observation vector based on online monitoring data. By establishing system dynamic equations and observation equations, the nonlinear dynamic characteristics and observation mechanisms of the wastewater treatment system are described.

[0145] Step S6.2: Design a deep density network structure, including an encoder and a decoder, for learning and representing the posterior distribution of the state.

[0146] To handle system uncertainties, a deep density network was designed. The encoder uses a convolutional neural network to map the observed data to the feature space; the decoder employs a hybrid density network structure to output the parameters of a Gaussian mixture model. This structure can learn and represent complex posterior distributions of states, rather than just single predicted values.

[0147] Step S6.3: Implement the prediction and update steps of Bayesian filtering based on the deep density network, and calculate the posterior distribution of the state at the current time.

[0148] A Bayesian filtering process was implemented using a deep density network. The prior distribution of the state is calculated in the prediction step, and the posterior distribution is calculated in the update step by incorporating new observations. This method effectively integrates model predictions and real-time observations, providing more accurate state estimates.

[0149] Step S6.4: Based on the posterior distribution of the state at the current moment, Monte Carlo sampling is used to perform probability estimation of direct and indirect carbon emissions to obtain real-time carbon emission accounting results including mean, variance and confidence interval.

[0150] Based on the state posterior distribution, Monte Carlo sampling is used to probabilistically estimate carbon emissions. This not only provides the expected value of carbon emissions but also the variance and confidence interval, thus comprehensively quantifying the uncertainty in carbon emission accounting and improving the reliability of the data.

[0151] Specifically, firstly, a state-space mathematical framework describing the biochemical reaction process of wastewater treatment is constructed. The state-space model consists of two parts: state equations and observation equations. When defining the state vector, a set of variables that can comprehensively characterize the microenvironment inside the biochemical tank is selected. This includes not only conventional dissolved oxygen concentration and mixed liquor suspended solids concentration, but also latent variables that are difficult to measure directly online but are crucial for carbon emissions, such as heterotrophic bacteria biomass, autotrophic bacteria biomass, and the concentration of readily biodegradable substrates. The observation vector is defined as the sequence of online sensor readings that are actually obtainable, such as effluent ammonia nitrogen, effluent nitrate nitrogen, and the ORP value of the aeration tank. The dynamic equations describe the evolution of the state vector over time. Traditional methods usually rely on the ASM mechanism model, but this embodiment considers the time-varying nature of the mechanism parameters and uses a data-driven nonlinear function to approximate this dynamic process. The observation equations describe how the internal state is mapped to external observations. This rigorous mathematical definition transforms the carbon emission accounting problem into a typical dynamic system state estimation problem.

[0152] Second, to accurately learn the complex nonlinear dynamic relationships and their accompanying random noise distribution, a special deep neural network structure—the deep density network—was designed. This network mainly consists of an encoder and a decoder. The encoder employs a stacked Long Short-Term Memory (LSTM) network or a one-dimensional convolutional neural network (1D-CNN), with its input being a sequence of observation vectors from several past time steps. The encoder's role is to automatically extract deep spatiotemporal features from the time-series data, mapping the high-dimensional, noisy raw data to a low-dimensional latent feature space. The decoder abandons the traditional approach of directly outputting point predictions in neural networks, instead connecting to a Mixture Density Layer. This layer aims to output the probability distribution parameters of the target state variable; specifically, it outputs the weight vector, mean vector, and covariance matrix of a Gaussian Mixture Model (GMM). Through this structure, the network can not only predict "what the state is," but also "what the probability is of the state falling within a certain range," thus fully learning and representing the posterior probability distribution of the state.

[0153] Third, based on the trained deep density network, a Bayesian filtering process is executed in real-time. This process is divided into a prediction step and an update step. In the prediction step, the prior state distribution at the current moment is predicted using the posterior distribution of the state at the previous moment and the current control input through the dynamic subnet of the deep density network. Since the wastewater treatment process is not only affected by the current control but also has a significant historical memory effect, the network's cyclic structure can effectively capture this time dependency. In the update step, when new online observation data (such as the latest effluent water quality reading) arrives, the observation likelihood probability is calculated using the observation equation, and according to Bayes' theorem, the prior distribution is combined with the observation likelihood to calculate the corrected posterior state distribution at the current moment. This process essentially uses real-time measured data to continuously correct the model's prediction bias. Even in the event of sudden changes in influent water quality or measurement noise from sensors, the system's internal state estimate, which is closest to the actual situation, can be obtained through a probability fusion mechanism.

[0154] Fourth, after obtaining the accurate posterior distribution of the system's internal states at the current moment (especially those biological reaction kinetic parameters that are difficult to measure), Monte Carlo sampling is performed to quantify the uncertainty of carbon emissions. Since the carbon emission calculation formulas (especially the direct emission nitrous oxide production model) are nonlinear with respect to state variables, variance cannot be directly transferred analytically. Therefore, thousands of state sample particles are randomly selected from the state posterior distribution. For each sample particle, the instantaneous direct and indirect carbon emissions are calculated once according to the physicochemical accounting rules in Example 3. The probability density function of the current moment's carbon emissions is obtained by statistically analyzing the results of these thousands of calculations. Finally, the statistical characteristics of this distribution are output, typically including: the expected value of carbon emission intensity (as the main accounting result), the standard deviation (representing the risk of fluctuation), and a 95% confidence interval. This result not only tells operators the approximate current carbon emissions, but also clearly indicates the credibility of the figure. For example, it provides a detailed report stating that "the carbon emission intensity is 0.5 kg / ton, and there is a 95% probability that it will fall between 0.45 and 0.55," which greatly enhances the practical value of the accounting data.

[0155] In Bayesian statistical inference, the state posterior distribution represents the cognitive belief about the true internal state of a system after observing all existing evidence (i.e., sensor data). Before introducing observational data, the distribution predicted by the model is the "prior distribution," which may be broad and uncertain. Once the actual measured values ​​are obtained, the prior distribution is corrected using the information contained in the measured values, resulting in the "posterior distribution." In the context of wastewater treatment, it vividly describes the most likely range of values ​​for core parameters such as microbial activity and substrate concentration within the biological treatment tank, combined with historical operating patterns and current instrument readings, and the probability density of falling within that range.

[0156] Deep density networks (DDNs) are a hybrid artificial intelligence model that combines the powerful feature extraction capabilities of deep learning with the uncertainty modeling capabilities of probabilistic graphical models. Ordinary deep neural networks typically output only a definite predicted value (e.g., predicting effluent COD as 30 mg / L), ignoring data noise and model errors. In contrast, the output layer of a DDN is specially designed to output parameters of a probability distribution (e.g., mean and variance). This means that DDN can fully describe the statistical distribution characteristics of the target variable through a single forward propagation. In this embodiment, it is used to replace the solution of complex partial differential equations, quickly and probabilistically mapping the "input-state-output" relationship in the wastewater treatment process.

[0157] Monte Carlo sampling is a computational method based on random numbers used to solve complex mathematical, physical, or engineering problems, particularly those involving probability distribution calculations. Its core idea is to "approximate the true result through a large number of random experiments." In the carbon accounting of this embodiment, due to the uncertainty of input variables (such as biomass and reaction rate) and the highly nonlinear calculation process, it is difficult to derive the error range of the final carbon emissions using formulas. The system generates tens of thousands of random input samples conforming to a specific probability distribution through computer simulation, calculates the results for each sample, and then statistically analyzes the distribution of these results. This is analogous to estimating the probability of heads by tossing a coin thousands of times; the more samples taken, the closer the statistical characteristics of the final carbon emission probability distribution will be to the true situation.

[0158] Example 7

[0159] In this embodiment, the step of using a multi-objective evolutionary algorithm or a weighted Chebyshev method to solve the problem, and obtaining the Pareto optimal solution set through iterative calculation and non-dominated sorting, includes:

[0160] Step S7.1: Based on the decision variable space, the Delaunay tetrahedral subdivision algorithm is used to construct a tetrahedral mesh representation with probabilistic degrees of freedom, where each node contains position coordinates and probability distribution parameters representing uncertainty, thus obtaining the completed tetrahedral mesh model.

[0161] To improve the accuracy and efficiency of the optimization solution, a tetrahedral mesh structure is introduced into the decision variable space. Through Delaunay partitioning, the continuous decision space is discretized into tetrahedral elements. Simultaneously, each node is assigned a probabilistic degree of freedom, enabling it to express the uncertainty characteristics of the decision variables.

[0162] Step S7.2: Based on the completed tetrahedral mesh model, construct a quadratic interpolation basis function on each tetrahedral element, and use the probability distribution parameters of the nodes to perform quadratic weighted interpolation to obtain an interpolation representation model that represents the value of any point in the decision space and the corresponding probability distribution.

[0163] To overcome the limitations of traditional linear interpolation, quadratic basis functions are constructed on tetrahedral elements. Quadratic weighted interpolation is then performed using the probability distribution parameters of the nodes. This method can more accurately approximate complex nonlinear objective functions and simultaneously estimate the probability distribution at any point.

[0164] Step S7.3: Based on the completed tetrahedral mesh model and the interpolation representation model, an adaptive population update is performed during the optimization process. Robust crossover and adaptive mutation operations are designed using the probability distribution parameters of the nodes to generate a new generation of population.

[0165] In the population update process of the evolutionary algorithm, a tetrahedral mesh model is used to guide the search direction. By designing robust crossover and adaptive mutation operations that consider probability distribution parameters, the algorithm can intelligently explore sparse mesh regions or regions with high uncertainty, improving the efficiency and robustness of the search.

[0166] Step S7.4: Perform a local search on the new generation population based on the interpolation representation model, extract non-dominated solutions from the final population, reconstruct the Pareto front, and obtain the Pareto optimal solution set containing the probability enhancement representation.

[0167] By utilizing a high-precision interpolation representation model, a refined local search is performed in the later stages of evolution. The final extracted Pareto solution set not only contains the location of the optimal solution but also includes uncertainty information based on probability-enhanced representation, providing richer evidence for decision-making.

[0168] Specifically, the first step involves constructing a decision variable space model that combines geometric topological structure with stochastic statistical characteristics. First, the physical boundary of the multidimensional decision variable space is determined, defined by the allowable range of various process parameters (such as dissolved oxygen and reflux ratio). Within this space, an extended form of the enhanced Delaunay triangulation algorithm—the tetrahedral partitioning algorithm—is used for spatial discretization. In the execution process, an initial high-density node set is first generated based on Latin hypercube sampling or a quasi-random sequence. These nodes are uniformly distributed throughout the decision space. Then, based on the "empty circumsphere" criterion—that is, for any generated tetrahedral element, its circumsphere does not contain any other nodes from the point set—the algorithm connects the nodes to form a non-overlapping tetrahedral mesh that fills the entire convex hull. This partitioning method maximizes the minimum interior angle of the tetrahedral elements, avoids the formation of elongated, distorted elements, and ensures the stability of numerical calculations. More importantly, it endows the mesh nodes with "probabilistic degrees of freedom." Unlike traditional grid nodes that only store definite coordinate values, each node in this system also encapsulates the probability distribution parameters of that location (such as the mean vector and covariance matrix of a Gaussian distribution) in its data structure. These probability parameters are derived from statistical analysis of historical operating data within the node's neighborhood or calculated through local sensitivity analysis. This allows the constructed tetrahedral grid model to not only describe the geometry of the decision space but also map the volatility and controllability confidence of the process parameters in that region through the probabilistic degrees of freedom of the nodes.

[0169] Second, after constructing a geometric mesh with probabilistic information, we aim to establish a high-precision spatial interpolation representation model to replace the computationally expensive original objective function for rapid evaluation of intermediate processes. Traditional linear interpolation (such as barycentric coordinate interpolation) suffers from significant truncation errors when approximating highly nonlinear wastewater treatment process models. Therefore, we construct quadratic interpolation basis functions within each tetrahedral element. Specifically, we not only utilize the function values ​​of the four vertices but also introduce auxiliary computation nodes at the midpoints of the six edges of the tetrahedron (or utilize the second-order distance information of the evaluated point relative to the vertices) to construct shape functions containing quadratic geometric terms. During interpolation calculations, we execute quadratic weighted interpolation logic: the weights depend not only on the volumetric coordinates of the point within the tetrahedron but also on the modulated node probability distribution parameters. If the probability distribution of a vertex shows a large variance (meaning high uncertainty), the contribution weight of that node to the interpolation result will be reduced accordingly during weighted summation, or the interpolation result will have an amplified confidence interval range. In this way, the generated interpolation representation model can not only output the accurate predicted value of the objective function (such as the predicted running cost) corresponding to any coordinate point in the decision space, but also simultaneously output the probability distribution characteristics of the predicted value, providing a complete mathematical basis for subsequent robust search.

[0170] Third, this step describes how the optimization algorithm utilizes the aforementioned grid model for intelligent population updates. In the iterative process of evolutionary algorithms, traditional crossover and mutation operations are often blind, random perturbations. This system implements an "adaptive population update" strategy. When selecting parent individuals for crossover, the algorithm queries the interpolation representation model of the individual's position in the tetrahedral grid. It prioritizes individuals located in regions with "low uncertainty" and "high fitness." During "robust crossover," the algorithm analyzes the probability parameters of the tetrahedron corresponding to the parent node, guiding the offspring generated by crossover to shift towards a more convergent (i.e., more stable) spatial direction, avoiding offspring falling into parameter regions where the theoretical target value is excellent but actual operation is highly unstable. For "adaptive mutation," the variable asynchronous length is no longer fixed but dynamically adjusted: in regions with sparse grids or large node probability variances, the system automatically increases the variable asynchronous length to enhance exploration capabilities, attempting to escape potential local extremum traps; while in regions with dense grids and compact probability distributions, the variable asynchronous length is reduced for refined development to accelerate convergence. This mechanism makes the evolution of the population no longer a purely random walk, but a directed search guided by a probabilistic geometric model.

[0171] Fourth, in the final stage of optimization, a high-precision interpolation model is used to refine and screen the evolved population. For each individual in the current population, the local gradient is estimated using the quadratic basis function of its tetrahedral unit, and a local search with microsteps is performed along the direction of improving the objective function. This process is similar to finding the approximate location through macro-evolution and then precisely correcting it to the peak point using numerical methods. Subsequently, the system extracts non-dominated solutions from the finally corrected population. Unlike traditional Pareto solution sets, the output is a Pareto optimal solution set containing "probability-enhanced representations." This means that each solution (Set point) in the solution set not only includes a set of definite operating parameters (e.g., DO = 2.0 mg / L) and the corresponding target value (cost = 0.5 yuan / ton), but also includes the solution's "robustness score" and "expected target fluctuation range." For example, it may indicate that although a low-cost solution has excellent mean performance, there is a 10% risk of exceeding the standard for ammonia nitrogen in the effluent within the 95% confidence interval. This solution set reconstruction, which incorporates uncertainty quantification, enables decision-makers to clearly identify "pseudo-optimal" solutions, thereby making decisions that are not only economical but also safe and reliable.

[0172] Among them, the Delaunay tetrahedral tessellation algorithm, in the field of computational geometry and optimization, is a specific algorithm that connects a discrete set of points in three-dimensional (or higher-dimensional without loss of generality) space into a series of non-overlapping tetrahedral elements. Its core feature is satisfying the "EmptySphere Property," meaning that the circumscribed sphere of any tetrahedron formed by the tessellation does not contain any other nodes from the point set. This property ensures that the generated tetrahedrons are geometrically as close as possible to regular tetrahedrons, avoiding the appearance of extremely flat or sharp "silver elements." In this embodiment, this algorithm is used to discretize the continuous and complex decision variable space into a mesh structure composed of a finite number of simple geometric shapes. This discretization structure allows the system to utilize the ideas of finite element analysis to perform high-precision local interpolation approximation within each small element, thereby transforming the complex global nonlinear optimization problem into a series of controllable analysis problems in local sub-regions.

[0173] The probabilistic degree of freedom (DOF) is a specific concept defined in this optimization system to describe the ability of a grid node to carry stochastic information. In a conventional physical grid, the degree of freedom of a node typically refers to spatial coordinates (x, y, z) or physical quantities (such as temperature and displacement). However, in the decision space grid of this embodiment, in addition to the deterministic process parameter coordinates, each node is additionally assigned a set of statistical parameters as additional degrees of freedom. These parameters typically include the moments of the probability density function (such as expected value, variance, and skewness). The principle behind assigning probabilistic degrees of freedom to nodes is that actual wastewater treatment processes are affected by uncontrollable factors such as influent fluctuations and equipment aging. The effect of a fixed operating setpoint in actual execution often follows a certain distribution rather than a constant value. By integrating these distribution parameters onto the grid nodes, the optimization algorithm, when searching the space, is actually dealing with the extremum problem of a random field, rather than a simple scalar field extremum problem.

[0174] Interpolation basis functions are mathematical tools used to reconstruct the values ​​of any point within a cell based on the values ​​of grid nodes. The simplest linear interpolation basis function assumes that physical quantities change linearly within the cell. This is effective when dealing with gently sloping surfaces, but it produces significant "peak-shaving and valley-filling" errors when describing highly nonlinear and complex surfaces such as biochemical reactions in wastewater treatment. Quadratic interpolation basis functions introduce quadratic terms to the coordinates, enabling the interpolated surface to describe curvature (degree of bending). Their construction principle typically requires more control points than linear interpolation (such as the midpoints of the edges of a tetrahedron). In this system, the interpolation representation model established using quadratic basis functions can more sensitively capture the local concavity and convexity changes in the shape of the objective function, thus providing more accurate gradient direction guidance during the local search phase and significantly improving the accuracy of the optimization solution.

[0175] Example 8

[0176] In this embodiment, the step of presenting the Pareto optimal solution set through visualization technology and selecting a specific optimal operating scheme based on interactive decision-making to obtain the optimized control parameters of the wastewater treatment process includes:

[0177] Step S8.1: Based on the Pareto optimal solution set, construct a spatial grid in the target space according to a preset resolution, and use the grid line integral method to interpolate and fit the discrete solution to obtain the continuous Pareto front curve.

[0178] To overcome the limitations of discrete solution set representation, this embodiment employs a grid line integral method. A grid is constructed in the target space, and continuous frontier curves are generated by interpolating and fitting discrete Pareto solutions. This allows decision-makers to see smooth transitions between solution sets, rather than just isolated points.

[0179] Step S8.2: Perform geometric feature analysis on the continuous Pareto front curve to determine the segmentation nodes. Based on the segmentation nodes, divide the continuous Pareto front curve into multiple front segment segments. Use a weighting function to smoothly splice the front segment segments to reconstruct a globally continuous Pareto front surface.

[0180] By utilizing geometric feature analysis techniques, characteristic points of the leading edge curve are identified and segmented to capture local structure. Subsequently, a weighted function is used to smoothly stitch the segments together, reconstructing a globally continuous Pareto leading edge surface, ensuring the accuracy and aesthetics of the visualization.

[0181] Step S8.3: Based on the globally continuous Pareto front surface, construct an interactive visual exploration interface to support operators in continuously sliding and positioning along the globally continuous Pareto front surface on the interactive visual exploration interface, and obtain the combination of decision variables corresponding to the current positioning point in real time.

[0182] An advanced interactive interface was built, allowing operators to freely slide the cursor on a continuous Pareto front surface. The system responds to the cursor position in real time, calculating and displaying the specific combination of decision variables corresponding to that point, enabling seamless exploration of the optimal solution space.

[0183] Step S8.4: In response to the operator's confirmation operation on the interactive visual exploration interface, based on the combination of decision variables corresponding to the current location point, the control parameter set values ​​of each unit of the wastewater treatment process are extracted through the mapping relationship to obtain the optimized control parameters of the wastewater treatment process.

[0184] Once the operator selects and confirms a satisfactory operating point, the decision variables corresponding to that point are immediately analyzed and extracted as specific process control parameters (such as setpoints), thus completing the transformation from decision to control.

[0185] Specifically, firstly, a continuous visualization foundation is constructed to fill the gaps between discrete solutions. The discrete Pareto optimal solution set output from Example 7 is first projected onto a two-dimensional or three-dimensional target space (e.g., a cost-carbon emission-water quality coordinate system). To achieve continuity, a high-resolution virtual raster mesh is defined within the target space. Subsequently, an interpolation fitting is performed using the "grid line integration method." This method differs from ordinary scatter interpolation; it considers that the Pareto front is typically a low-dimensional manifold and performs path integration along the gradient orthogonal direction of the objective function (i.e., the equipotential line direction) at the intersection of grid lines. Specifically, neighboring pairs of non-dominated solution points are identified, assuming an optimal path that conforms to physical constraints exists between them. This path is approximated along the grid line direction using spline functions or radial basis functions (RBF). By performing this operation on all adjacent solution point pairs, interpolated coordinates are calculated at each node of the virtual mesh, thus "weaving" the originally isolated scatter points into a continuous, smooth curve or surface (for dual-objective targets) or a single surface (for three-dimensional targets). This process mathematically guarantees that the generated continuous frontier curve satisfies the non-dominated property at any point and preserves the topological structure of the original solution set.

[0186] Second, the generated initial continuous curve may exhibit abrupt geometric changes or artifacts in certain regions, requiring segmented smoothing. First, differential geometric feature analysis is performed on the continuous Pareto front curve generated by S8.1, calculating the curvature and torsion at each point on the curve. Based on the curvature extrema (i.e., the points where the curve's transitions are most abrupt), the entire front curve is identified and marked as several "feature segmentation nodes." Based on these nodes, the curve is divided into multiple local segments, each representing a specific state of the system's operating mode (e.g., one segment might correspond to a low-oxygen energy-saving mode, while another corresponds to a high-dose enhanced denitrification mode). Subsequently, the system uses a weighted function with compact support properties (such as B-spline basis functions) to blend and stitch these segmented segments. At the stitching points, the algorithm enforces the C2 continuity condition (i.e., second-derivative continuity) to ensure a smooth transition without sharp inflections. Through this process, a "globally continuous Pareto front surface" is reconstructed. The surface appears as an elegant and smooth trajectory, which is not only aesthetically pleasing but also implies a smooth path for switching process parameters between different operating conditions, avoiding system oscillations that may be caused by sudden changes in control parameters.

[0187] Third, based on the reconstructed global smooth surface, an interactive visualization exploration environment based on a Web or SCADA human-machine interface was constructed. In this interface, the Pareto front is no longer a static chart, but a dynamic control track. A "sliding positioning" function was designed, allowing operators to control a virtual cursor to slide freely on a continuous Pareto surface via mouse or touchscreen. As the cursor moves, the backend performs inverse mapping calculations in real time. Since an interpolation representation model from the target space to the decision variable space has been established in the preceding steps, it can respond to changes in the cursor's position in the target space (cost-carbon emission coordinates) in milliseconds, and in real time reverse-engineer and display the combination of decision variables implied at that point (e.g., when the cursor moves to the extremely low cost zone, the interface displays in real time the corresponding DO=0.5 and reflux ratio=100%). In addition, the interface will also dynamically display the expected effluent water quality dashboard and equipment energy consumption pie chart under this operating condition, centered on this point. This WYSIWYG interactive approach allows operators to intuitively understand "how to adjust operating parameters and how much the cost will increase if I want to reduce carbon emissions by another 10%", thus greatly lowering the cognitive threshold for multi-objective decision-making.

[0188] Fourth, when the operator, through sliding comparisons on the exploration interface, finally stops the cursor at a balance point that aligns with current management expectations (e.g., choosing the low-carbon side when the budget is sufficient at the end of the month but environmental inspections are strict), and clicks the "Confirm" or "Issue" button, the parameter extraction and conversion process is triggered. Based on the precise positioning coordinates of the current cursor, the precise values ​​of all decision variables corresponding to that point are extracted from the underlying mathematical model through the established mapping relationship. These values ​​then undergo two processing steps: first, engineering tuning, converting mathematical floating-point numbers (e.g., DO=1.98743...) into engineering setpoints acceptable to the field controller (e.g., DO=2.0); second, logical verification, re-checking whether this set of parameters conflicts with the actual physical state of the current equipment (e.g., whether the frequency converter is faulty, or whether the valve is in maintenance mode). After the verification is passed, this set of "optimized control parameters for wastewater treatment process" is directly written into the PLC control system on site through OPC UA or Modbus TCP communication protocol, driving the blower frequency adjustment, the dosing pump stroke change and the reflux valve opening action, thereby completing the closed-loop control from "cloud multi-objective decision-making" to "edge side execution".

[0189] The Grid Line Integration Method (Grid Line Integration Method) is a numerical analysis technique used to fit discrete high-dimensional data points into a continuous manifold. In conventional interpolation, if the data points are unevenly distributed, direct fitting can easily lead to oscillations (Runge phenomenon). The Grid Line Integration Method first establishes a regular background grid in the space where the data resides, and then transforms the interpolation problem into an integration problem along the grid lines. Its basic principle is: assuming that the objective function changes smoothly between adjacent grid nodes, connecting these nodes through the integration path can construct a connection curve with minimum energy (i.e., the smoothest). In this embodiment, it specifically refers to using this algorithm in the visualization stage to fill the gaps between Pareto optimal solution points, thereby drawing a seemingly continuous and unbroken Pareto front curve on the screen, making the user's interactive scrolling experience silky smooth.

[0190] A Pareto front is typically a set of discrete points obtained by an algorithm. However, theoretically, for continuous engineering optimization problems, the Pareto front should be a continuous geometric hypersurface. A globally continuous Pareto front surface refers to the theoretically continuous surface that can be reconstructed from the discrete solution set through mathematical reconstruction techniques. It is not merely a line connecting points, but a geometric object with everywhere differentiable properties. The significance of constructing this surface lies in its coverage of all possible optimal trade-off states, including intermediate states that the algorithm failed to directly capture during sampling. This allows decision-makers to choose any compromise between two discrete solutions, greatly expanding the granularity of decision-making.

[0191] Interactive visualization exploration is a data analysis and human-computer interaction technology designed to allow users to explore the structure and meaning of complex underlying data by directly manipulating visual graphical elements. In traditional optimization, users typically only see static reports or charts. In interactive exploration, however, graphics become the input interface. In this embodiment, it specifically refers to users being able to directly drag operation points on the Pareto curve, receiving real-time feedback on the chain of changes in inputs (process parameters) and outputs (costs, emissions) caused by the operation. This mechanism leverages human visual sensitivity to position and shape, encapsulating complex numerical iteration processes in the background while presenting only intuitive causal relationships in the foreground. This allows wastewater treatment plant operators without algorithmic expertise to easily understand and apply complex optimization results.

[0192] Example 9

[0193] In this embodiment, the step of selecting a specific optimal operating scheme based on interactive decision-making to obtain the optimized control parameters of the wastewater treatment process includes:

[0194] Step S9.1: Based on the Pareto optimal solution set, construct a two-dimensional scatter plot with the horizontal axis representing the operating cost per ton of water and the vertical axis representing the carbon emissions per ton of water, to obtain a visualization interface that presents the distribution of the Pareto optimal solution set.

[0195] This is the most intuitive way to support decision-making. A two-dimensional scatter plot is generated, with the horizontal and vertical axes representing the two core objectives. Each point represents a feasible optimal solution. Through this graphical distribution, operators can clearly see the trade-off between cost and carbon emissions.

[0196] Step S9.2: In response to the interactive selection operation performed by the operator on the visualization interface based on current compliance indicator requirements or corporate preferences, determine the target optimal solution corresponding to the interactive selection operation.

[0197] Operators can make selections or choose regions on the interface, taking into account current external conditions (such as stringent carbon emission regulations) or internal needs (such as budget constraints). The system responds to these interactions to pinpoint the optimal solution.

[0198] Step S9.3: Based on the target optimal solution, extract the corresponding aeration rate, reflux ratio and reagent dosage values ​​to obtain a set of process control parameters.

[0199] Once the target solution is determined, the corresponding process parameters are looked up in reverse. These parameters typically include key parameters such as aeration rate, reflux ratio, and dosage of various chemicals, forming a complete set of process control parameters.

[0200] Step S9.4: Send the set of process control parameters to the field control system through the control interface to obtain the optimized control parameters of the wastewater treatment process.

[0201] Finally, the optimized parameter set is sent to the field PLC or SCADA system through a standard industrial control interface to directly drive the equipment and achieve closed-loop optimized control.

[0202] Specifically, firstly, this step focuses on constructing a rich and intuitive two-dimensional visualization decision-making interface. First, the Pareto optimal solution set data generated by the previous implementation examples is read from the database or memory. "Operating cost per ton of water" (yuan / ton) is selected as the horizontal axis, and "carbon emissions per ton of water" (kilograms of CO2 equivalent / ton) is selected as the vertical axis. The range of the axes is automatically adapted to the extreme value range of the current solution set. Then, using HTML5 Canvas or SVG vector graphics technology, each optimization scheme in the solution set is rendered as a scatter point in the chart. To enhance the richness of information, a multi-dimensional visual encoding strategy is adopted: the color depth or hue of the point can be used to map third-dimensional information, such as the "probability of stable effluent quality compliance" or "equipment load balance" of the scheme; the size of the point can be used to map "chemical dependence". In this way, the originally dry list of numbers is transformed into a clear lower left convex curve (Pareto Front). Through this interface, operators can clearly observe the non-linear inverse relationship between costs and carbon emissions. That is, as carbon emission requirements become extremely stringent, operating costs will rise exponentially, thus providing a macro perspective for subsequent trade-off decisions.

[0203] Second, this step describes how operators can intervene in the optimization loop through human-computer interaction mechanisms. The visual interface not only provides static displays but also integrates dynamic interactive logic. A "constraint filter" and a "preference weight slider" are designed. For example, when encountering a temporary period of strict enforcement, operators can use the "carbon emission cap cutoff tool" to drag a horizontal reference line on the vertical axis, automatically filtering out all solutions exceeding the emission limit and highlighting the compliant solutions. Alternatively, when facing tight year-end budgets, operators can click "cost priority mode," which automatically recommends solutions in the lower-cost region located in the upper left of the Pareto front. When an operator hovers the mouse over a specific point, a detailed tooltip pops up, displaying the corresponding expected indicators in real time, including estimated power consumption, sludge discharge, and predicted COD of the effluent. The operator's final confirmation action (such as double-clicking a point or clicking the "Apply this solution" button) is considered a clear decision instruction, and the system immediately locks the unique identifier (Solution ID) of the optimal solution for that objective, proceeding to the next step.

[0204] Third, this step is the decoding process of the "solution," aiming to restore the abstract objective function point to specific physical control parameters. Each optimal objective solution selected in S9.2 corresponds to a unique set of decision variable vectors at the system's underlying level. The values ​​of this vector are extracted from the decision variable space through index relationships. This set of values ​​constitutes a complete "process control parameter set," typically including, but not limited to, the following key items: the dissolved oxygen (DO) setpoint sequence for each zone of the biological treatment tank, the flow rate setpoint or reflux ratio of the internal return pump, the frequency converter frequency of the external return sludge pump, the stroke setpoint of the carbon source dosing pump, and the dosage of phosphorus removal agent. During this process, an "engineering verification" is also performed. Since the optimization algorithm may generate floating-point numbers with infinite precision (e.g., a DO setpoint of 1.9876 mg / L), it will be rounded to more meaningful engineering values ​​(e.g., a DO setpoint of 2.0 mg / L) based on the accuracy of the field instruments and the PLC's processing capability. In addition, it will check whether the extracted parameter combination conflicts with the current equipment status (for example, if a blower is under maintenance, the strategy will be automatically adjusted or an alarm will be issued) to ensure that the generated parameter set is physically executable.

[0205] Fourth, it achieves physical penetration from the decision-making level to the execution level, i.e., the "last mile" of closed-loop control. Once the process control parameter set is generated and verified, the upper computer establishes a connection with the lower computer (such as a PLC or DCS) through an industrial communication network. It supports standard industrial communication protocols such as OPC UA, Modbus TCP / IP, or Profinet. It doesn't simply write parameters; instead, it employs a "setpoint supervision control" mode. That is, the optimization system does not directly control the inverter voltage or valve opening, but writes the optimized "setpoint (SP)" into a specific memory address of the PLC. For example, the optimized dissolved oxygen value is written to the DO setpoint register of the aeration control PLC. The original PID closed-loop control logic and underlying safety interlock logic within the field PLC are retained. After the PLC takes over the new setpoint, it automatically adjusts the actuators (such as the blower frequency) to track the new setpoint based on its real-time sensor feedback (PV, ProcessValue). This hierarchical control architecture enables intelligent optimization at the upper layer while ensuring millisecond-level response security and stability at the lower layer.

[0206] Interactive decision making, in the field of multi-objective optimization, is a hybrid intelligent process that combines the computational power of computer algorithms with the cognitive abilities of human experts. Because mathematical models often struggle to fully quantify all unstructured constraints in the real world (such as the temporary intentions of leaders, sudden supply chain disruptions, and experiential risk preferences), the "optimal solution" generated by purely algorithms may not perfectly match actual needs. Interactive decision making allows human users to intervene at different stages of optimization (such as the post-optimization selection stage), expressing preferences through a graphical interface, setting critical thresholds, or selecting the solution that best suits the current situation from multiple mathematically equivalent "non-dominated solutions." This mechanism ensures that the final control strategy possesses both mathematically optimal properties and engineering acceptability.

[0207] A process control parameter set (PCP) refers to a combination of key variables in a wastewater treatment process that can be manually adjusted and directly affect treatment efficiency and energy consumption. Unlike "monitoring indicators" (such as effluent COD and influent flow rate, which are results or uncontrollable inputs), control parameters are operable "causes." In this embodiment, the PCP specifically refers to the setpoint combination output by the optimization algorithm to guide the operation of the next control cycle. Typical PCP sets include: dissolved oxygen concentration setpoint at the end of the aerobic tank (controlling the blower), mixed liquor internal recirculation ratio (controlling the internal recirculation pump), sludge recirculation ratio (controlling the external recirculation pump), daily excess sludge discharge (controlling the sludge discharge pump), and dosage rates of external carbon sources and chemical phosphorus removal agents (controlling the dosing pump). This set constitutes the core instruction set for the operation and control of the wastewater treatment plant.

[0208] Closed-loop optimization control is an advanced form of process control, distinct from traditional open-loop optimization (which only provides suggestions, leaving the decision to execute to the human). In closed-loop optimization control, the data flow forms a complete loop: first, sensors collect process data in real time (state awareness); second, the optimization system calculates optimal operating parameters based on models and algorithms (intelligent decision-making); third, the control system automatically sends out the parameters and drives the equipment to perform actions (automatic execution); finally, the equipment actions change the process state, and the new state is collected by the sensors again. In this process, apart from initial rule setting and necessary safety monitoring, routine parameter adjustments require no manual intervention. The system in this embodiment achieves truly unattended closed-loop optimization operation through fully automated parameter sending and PLC execution.

[0209] Example 10

[0210] like Figure 3As shown, the present invention also provides a multi-objective real-time optimization system for wastewater treatment considering carbon emission constraints, comprising:

[0211] The data acquisition and preprocessing module 10 is used to acquire the raw real-time data stream of the sewage treatment process, and to perform data cleaning, outlier processing and data standardization on the raw real-time data stream to obtain a standardized real-time sewage treatment dataset.

[0212] The carbon accounting model construction module 20 is used to construct a unified carbon accounting model based on the standardized real-time wastewater treatment dataset, calculate and integrate direct carbon emissions and indirect carbon emissions respectively, and obtain real-time carbon emission accounting results.

[0213] The optimization model construction module 30 is used to construct an optimization function with dual objectives of operating cost per ton of water and carbon emission per ton of water based on the real-time carbon emission accounting results and wastewater treatment operation cost data, and to obtain a multi-objective optimization mathematical model for wastewater treatment by combining the constraints.

[0214] The optimization solution module 40 is used to solve the multi-objective optimization mathematical model of wastewater treatment by using a multi-objective evolutionary algorithm or a weighted Chebyshev method, and obtain the Pareto optimal solution set through iterative calculation and non-dominated sorting.

[0215] The interactive decision and control module 50 is used to present the Pareto optimal solution set through visualization technology, and select a specific optimal operating scheme based on interactive decision to obtain the optimized control parameters of the wastewater treatment process.

[0216] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A multi-objective real-time optimization method for wastewater treatment considering carbon emission constraints, characterized in that, include: The raw real-time data stream of the wastewater treatment process is acquired, and the raw real-time data stream is cleaned, outlier handled, and data standardized to obtain a standardized real-time wastewater treatment dataset. Based on the standardized real-time wastewater treatment dataset, a unified carbon accounting model is constructed to calculate direct and indirect carbon emissions separately, and the results are integrated to obtain the real-time carbon emission accounting results. Based on the real-time carbon emission accounting results and wastewater treatment operation cost data, an optimization function with dual objectives of operating cost per ton of water and carbon emission per ton of water is constructed, and combined with constraints, a multi-objective optimization mathematical model for wastewater treatment is obtained. Based on the aforementioned multi-objective optimization mathematical model for wastewater treatment, a multi-objective evolutionary algorithm or weighted Chebyshev method is used for solution. Through iterative calculation and non-dominated sorting, a Pareto optimal solution set is obtained, including: constructing a tetrahedral mesh representation with probabilistic degrees of freedom based on the decision variable space using the Delaunay tetrahedral partitioning algorithm, where each node contains position coordinates and probability distribution parameters representing uncertainty, resulting in a completed tetrahedral mesh model; based on the completed tetrahedral mesh model, constructing a quadratic interpolation basis function on each tetrahedral element, and utilizing the nodes'... The probability distribution parameters are subjected to a second-order weighted interpolation to obtain an interpolation representation model that represents the value of any point in the decision space and the corresponding probability distribution. Based on the constructed tetrahedral mesh model and the interpolation representation model, an adaptive population update is performed during the optimization process. Robust crossover and adaptive mutation operations are designed using the probability distribution parameters of the nodes to generate a new generation of population. Based on the interpolation representation model, a local search is performed on the new generation of population, and non-dominated solutions are extracted from the final population to reconstruct the Pareto front, thereby obtaining the Pareto optimal solution set containing the probability enhancement representation. The Pareto optimal solution set is presented using visualization technology, and the optimal operating scheme is selected based on interactive decision-making to obtain the optimized control parameters of the wastewater treatment process. This includes: constructing a spatial grid in the target space according to a preset resolution based on the Pareto optimal solution set, and interpolating and fitting the discrete solutions using the grid line integral method to obtain a continuous Pareto front curve; performing geometric feature analysis on the continuous Pareto front curve to determine segment nodes, dividing the continuous Pareto front curve into multiple front segment segments based on the segment nodes, and smoothly splicing each front segment segment using a weighted function to reconstruct a globally continuous Pareto front surface; constructing an interactive visualization exploration interface based on the globally continuous Pareto front surface, allowing operators to continuously slide and position themselves along the globally continuous Pareto front surface on the interactive visualization exploration interface, and obtaining the decision variable combination corresponding to the current positioning point in real time; responding to the operator's confirmation operation on the interactive visualization exploration interface, extracting the control parameter setpoints of each unit of the wastewater treatment process based on the decision variable combination corresponding to the current positioning point through mapping relationships to obtain the optimized control parameters of the wastewater treatment process.

2. The method according to claim 1, characterized in that, The process of cleaning, outlier handling, and data standardization of the original real-time data stream to obtain a standardized real-time wastewater treatment dataset includes: The original real-time data stream is cleaned by interpolation or forward padding to remove missing values ​​and outliers identified based on the 3σ rule or box plot rule, resulting in a cleaned dataset. The cleaned dataset is then subjected to data denoising processing using moving average or wavelet transform filtering methods to obtain the denoised dataset. The denoised dataset is then subjected to data standardization processing. The data of different dimensions are converted into a uniform scale by using the max-min normalization or Z-score standardization method to obtain the standardized real-time wastewater treatment dataset.

3. The method according to claim 1, characterized in that, The construction of a unified carbon accounting model, which calculates direct and indirect carbon emissions separately and integrates them to obtain real-time carbon emission accounting results, includes: Based on the standardized real-time wastewater treatment dataset, a direct carbon emission accounting model is constructed. The operating parameters of the biological treatment unit are extracted from the standardized real-time wastewater treatment dataset, and the N2O greenhouse gas emissions during the biological treatment process are calculated using the IPCC emission factor method in combination with the operating parameters to obtain the direct carbon emissions. An indirect carbon emission accounting model is constructed. The real-time power consumption data in the standardized real-time wastewater treatment dataset is multiplied with the regional power grid carbon emission factor to calculate the carbon emission of power consumption. The chemical dosage data in the standardized real-time wastewater treatment dataset is multiplied with the life cycle carbon emission factor to calculate the carbon emission of chemical consumption, thus obtaining the indirect carbon emission amount. By integrating the direct and indirect carbon emissions, the total carbon emissions are calculated, and the carbon emission intensity per unit volume of treated water is calculated by combining the treated water volume data, thus obtaining the real-time carbon emission accounting result.

4. The method according to claim 1, characterized in that, The aforementioned construction of an optimization function with dual objectives of operating cost per ton of water and carbon emissions per ton of water, combined with constraints, yields a multi-objective optimization mathematical model for wastewater treatment, including: Based on the real-time carbon emission accounting results and wastewater treatment operation data, an objective function for the operating cost per ton of water, including electricity cost, chemical cost and labor cost, is constructed. Based on the unified carbon accounting model, a mapping relationship between decision variables and carbon emission intensity is established, and an objective function for carbon emissions per ton of water is constructed. Determine the effluent water quality constraints and equipment operation constraints; By integrating the objective function of operating cost per ton of water, the objective function of carbon emissions per ton of water, the effluent quality constraints, and the equipment operation constraints, a multi-objective optimization mathematical model for wastewater treatment is obtained.

5. The method according to claim 1, characterized in that, The method employs a multi-objective evolutionary algorithm or a weighted Chebyshev method to solve the problem. Through iterative calculation and non-dominated sorting, a Pareto optimal solution set is obtained, including: For the aforementioned multi-objective optimization mathematical model for wastewater treatment, a non-dominated sorting genetic algorithm is used for population initialization to obtain an initial solution set; The objective function value is evaluated and the constraint conditions are checked for individuals in the initial solution set. The fitness of individuals is determined by non-dominated sorting and crowding distance calculation. Based on the individual fitness, a selection operation is performed, and crossover and mutation operations are performed on the selected individuals to generate offspring individuals. The offspring individuals are merged with the current generation individuals to form a mixed population. The mixed population is subjected to non-dominated sorting and crowding calculation. Based on the level of non-dominated sorting and the size of crowding distance, a preset number of individuals are selected to form a new generation population. The new generation population is updated to the current generation population, and the individual evaluation, fitness determination, selection, crossover, mutation and screening steps are repeated until the preset iteration termination condition is met to obtain the final convergent solution set. Non-dominated solutions are extracted from the final convergent solution set to form the Pareto optimal solution set representing different cost-carbon emission trade-offs.

6. The method according to claim 1, characterized in that, The construction of a unified carbon accounting model, which calculates direct and indirect carbon emissions separately and integrates them to obtain real-time carbon emission accounting results, includes: Based on the standardized real-time wastewater treatment dataset, a state-space model of the wastewater treatment process is constructed, defining the state vector, observation vector, system dynamic equation, and observation equation. Design a deep density network structure containing an encoder and a decoder for learning and representing the posterior distribution of states; The prediction and update steps of Bayesian filtering are implemented based on the deep density network, and the posterior distribution of the state at the current time is calculated. Based on the posterior distribution of the current state, Monte Carlo sampling is used to perform probability estimation of direct and indirect carbon emissions, resulting in real-time carbon emission accounting results including mean, variance, and confidence interval.

7. The method according to claim 1, characterized in that, The step of selecting the optimal operating scheme based on interactive decision-making to obtain the optimized control parameters of the wastewater treatment process includes: Based on the Pareto optimal solution set, a two-dimensional scatter plot is constructed with the horizontal axis representing the operating cost per ton of water and the vertical axis representing the carbon emissions per ton of water, resulting in a visualization interface that presents the distribution of the Pareto optimal solution set. In response to the interactive selection operation performed by the operator on the visualization interface based on current compliance indicator requirements or corporate preferences, determine the target optimal solution corresponding to the interactive selection operation; Based on the target optimal solution, the corresponding aeration rate, reflux ratio and reagent dosage values ​​are extracted to obtain a set of process control parameters. The set of process control parameters is sent to the field control system through the control interface to obtain the optimized control parameters of the wastewater treatment process.

8. A multi-objective real-time optimization system for wastewater treatment considering carbon emission constraints, characterized in that, include: The data acquisition and preprocessing module is used to acquire the raw real-time data stream of the wastewater treatment process, and to perform data cleaning, outlier handling and data standardization on the raw real-time data stream to obtain a standardized real-time wastewater treatment dataset. The carbon accounting model construction module is used to construct a unified carbon accounting model based on the standardized real-time wastewater treatment dataset, calculate direct carbon emissions and indirect carbon emissions respectively, and integrate them to obtain real-time carbon emission accounting results. The optimization model construction module is used to construct an optimization function with dual objectives of operating cost per ton of water and carbon emission per ton of water based on the real-time carbon emission accounting results and wastewater treatment operation cost data, and to obtain a multi-objective optimization mathematical model for wastewater treatment by combining the constraints. The optimization solution module is used to solve the multi-objective optimization mathematical model of wastewater treatment using a multi-objective evolutionary algorithm or a weighted Chebyshev method. Through iterative calculation and non-dominated sorting, a Pareto optimal solution set is obtained. This includes: constructing a tetrahedral mesh representation with probabilistic degrees of freedom based on the decision variable space using the Delaunay tetrahedral partitioning algorithm, where each node contains position coordinates and probability distribution parameters representing uncertainty, resulting in a completed tetrahedral mesh model; and constructing a quadratic interpolation basis function on each tetrahedral element based on the completed tetrahedral mesh model, and utilizing... A weighted interpolation is performed using the probability distribution parameters of the nodes to obtain an interpolation representation model that represents the value of any point in the decision space and its corresponding probability distribution. Based on the constructed tetrahedral mesh model and the interpolation representation model, an adaptive population update is performed during the optimization process. Robust crossover and adaptive mutation operations are designed using the probability distribution parameters of the nodes to generate a new generation of population. A local search is performed on the new generation of population based on the interpolation representation model, and non-dominated solutions are extracted from the final population to reconstruct the Pareto front, resulting in the Pareto optimal solution set containing the probability enhancement representation. The interactive decision-making and control module is used to present the Pareto optimal solution set through visualization technology and select the optimal operating scheme based on interactive decision-making to obtain the optimized control parameters of the wastewater treatment process. This includes: constructing a spatial grid in the target space according to a preset resolution based on the Pareto optimal solution set, and interpolating and fitting the discrete solutions using the grid line integral method to obtain a continuous Pareto front curve; performing geometric feature analysis on the continuous Pareto front curve to determine segmentation nodes; dividing the continuous Pareto front curve into multiple front segment segments based on the segmentation nodes; and using a weighted function to divide each front segment segment... The segments are smoothly spliced ​​together to reconstruct a globally continuous Pareto front surface. Based on the globally continuous Pareto front surface, an interactive visual exploration interface is constructed, allowing operators to continuously slide and position themselves along the globally continuous Pareto front surface on the interactive visual exploration interface, and obtain the combination of decision variables corresponding to the current positioning point in real time. In response to the operator's confirmation operation on the interactive visual exploration interface, based on the combination of decision variables corresponding to the current positioning point, the control parameter setpoints of each unit of the wastewater treatment process are extracted through mapping relationships to obtain the optimized control parameters of the wastewater treatment process.