Sewage treatment model construction method and system based on ai digital twin driving

CN122627569BActive Publication Date: 2026-10-27Hangzhou Gongshu District University of Technology Future Technology Research Institute +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611140106.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-10-27
Estimated Expiration
2046-07-30

AI Technical Summary

Technical Problem

数据采集维度单一、融合度低,仅依赖有限在线仪表,难以全面反映污水治理设施的静态结构、动态运行及外部环境因素,导致模型输入数据不充分,时序不一致,预测精度受限

Benefits of technology

1.本发明针对现有技术中数据采集维度单一、融合不足的问题,提供了一种全维度数据采集与数字孪生虚实映射机制。通过SP1步骤全面采集污水治理设施的静态结构数据、动态运行数据以及外部环境数据,并经过标准化、时间戳同步、完整性校验和多源融合处理生成高质量的多维度原始采集数据集,同时建立物理实体与数字孪生平台的完整一一对应的虚实映射关系,实现了物理现场运行状态实时镜像至虚拟平台,为后续机理建模、数据驱动建模及混合模型构建提供了同源、可靠、高一致性的数据基础,显著提升了模型输入数据的完整性、时序一致性和工况泛化能力,从源头上解决了现有技术数据支撑薄弱的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122627569B_ABST
    Figure CN122627569B_ABST
Patent Text Reader

Abstract

The application provides an AI digital twin driving sewage treatment model construction method and system, relates to the technical field of sewage treatment, comprises collecting static structure data, dynamic operation data and external environment data of sewage treatment facilities, integrating to generate a multidimensional original collection data set after completing data standardization, timestamp synchronization and integrity verification, and establishing a virtual-real mapping relationship between physical entities and a digital twin platform, The application provides a full-dimensional data collection and digital twin virtual-real mapping mechanism to solve the problems of single data collection dimension and insufficient fusion in the prior art. Through the SP1 step, the static structure data, dynamic operation data and external environment data of the sewage treatment facilities are comprehensively collected, and high-quality multidimensional original collection data sets are generated through standardization, timestamp synchronization, integrity verification and multi-source fusion processing, and a complete one-to-one virtual-real mapping relationship between physical entities and the digital twin platform is established.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wastewater treatment technology, specifically to a method and system for constructing wastewater treatment models based on AI digital twins. Background Technology

[0002] In the field of wastewater treatment, wastewater treatment technology has evolved from traditional manual experience-based control to automated instrument monitoring, and then to the introduction of mathematical models to assist decision-making. Early on, wastewater treatment relied primarily on operators manually adjusting aeration rates and reagent dosages based on experience, with influent and effluent water quality indicators monitored periodically through laboratory testing. With the application of SCADA systems and PLC control technology, wastewater treatment plants have gradually achieved automated monitoring and fixed parameter control of certain processes. In recent years, some companies have begun to experiment with using single mechanistic models (such as the ASM series of activated sludge models) or data-driven models (such as neural networks and LSTM) for water quality simulation and process optimization.

[0003] Although existing technologies can achieve wastewater treatment and discharge compliance to a certain extent, the following problems still exist in actual operation: The data collection is limited in scope and has low integration, relying only on a limited number of online instruments. This makes it difficult to fully reflect the static structure, dynamic operation, and external environmental factors of wastewater treatment facilities, resulting in insufficient input data for the model, inconsistent time series, and limited prediction accuracy.

[0004] Many models employ a single mechanism model or a single data-driven model. The former has poor adaptability and its parameters are difficult to calibrate in real time, while the latter lacks physical constraints and is prone to producing unreasonable predictions. The two have not been effectively integrated, resulting in insufficient overall model accuracy and reliability.

[0005] Chemical dosing control relies heavily on experience or simple feedback, lacks real-time water quality prediction and multi-objective dynamic optimization capabilities, has a weak closed-loop feedback mechanism, and cannot achieve adaptive updates based on actual operating data, resulting in high chemical consumption and large fluctuations in effluent water quality.

[0006] Therefore, a wastewater treatment model construction method and system based on AI digital twins is needed to solve the above problems. Summary of the Invention

[0007] Technical problems to be solved

[0008] To address the shortcomings of existing technologies, this invention provides a method and system for constructing wastewater treatment models based on AI digital twins, which solves the problems mentioned in the background section.

[0009] Technical solution To achieve the above objectives, the present invention provides the following technical solution: a wastewater treatment model construction method based on AI digital twin, comprising the following steps: SP1 collects static structural data, dynamic operation data, and external environmental data of sewage treatment facilities. After completing data standardization, timestamp synchronization, and integrity verification, it integrates and generates a multi-dimensional raw data set, and establishes a virtual-real mapping relationship between physical entities and the digital twin platform. SP2, based on the multi-dimensional raw data set output by SP1, constructs a wastewater treatment process mechanism model according to the core reaction kinetics and material balance equations of the activated sludge process in wastewater treatment; SP3, based on the multi-dimensional raw data collected from SP1, uses a multi-scale hybrid neural network to perform cross-scale feature extraction and dynamic correlation modeling on the multi-dimensional raw data collected, and trains to generate a wastewater treatment data-driven prediction model. SP4. After the wastewater treatment process mechanism model and the wastewater treatment data-driven prediction model are both constructed, a physical information constrained neural network is built. The residual of the differential equation of the wastewater treatment process mechanism model is embedded into the loss function of the wastewater treatment data-driven prediction model. Through joint backpropagation driven by an adaptive joint optimization strategy, the deep fusion of the two types of models and the parameter collaborative optimization are completed to generate a wastewater treatment process mechanism and data hybrid driven model. SP5, based on the wastewater treatment process mechanism and data hybrid driving model generated by SP4, deploys the model on the digital twin platform, inputs real-time multi-dimensional raw data collection to complete multi-step prediction of influent and effluent water quality, and uses a multi-objective optimization algorithm to search for the appropriate reagent dosing sequence for the working conditions; SP6, relying on the chemical dosing sequence output by SP5, sends the chemical dosing sequence to the actuator to complete the closed-loop control on site, and at the same time transmits back the actual on-site operation data to perform residual-driven adaptive updates of the wastewater treatment process mechanism and data hybrid driven model.

[0010] Preferably, SP1 specifically includes the following execution steps: SP1.1 Collect static structural data of wastewater treatment facilities, including the geometric dimensions of the reaction tank, the configuration of the aeration system, and the layout of the sludge return pipeline; SP1.2: Dynamic operating data is collected through a multi-source sensor array, including influent flow rate, effluent flow rate, influent COD concentration, ammonia nitrogen concentration, dissolved oxygen concentration, pH value, temperature, and sludge concentration. SP1.3 Collect external environmental data, including influent temperature fluctuation data and seasonal water quality change trend data; SP1.4 performs standardized and unified processing, timestamp alignment and synchronization, and integrity verification of abnormal and missing data on the three types of collected data in sequence. It also completes the fusion of multi-source data according to the process sequence and integrates them to generate a unified and standardized multi-dimensional original collected dataset. SP1.5: Based on the collected static structural data, a digital twin 3D facility model is built. Combined with real-time dynamic operation data, the physical working conditions and the virtual model are synchronized, and a complete one-to-one virtual-real mapping relationship is established between the physical entity and the digital twin platform.

[0011] Preferably, SP2 specifically includes the following execution steps: SP2.1. Based on the reaction kinetics formula of the activated sludge process and the water material balance equation set, a basic mathematical calculation framework for the wastewater treatment process mechanism model is built. SP2.2, break down the entire wastewater treatment process into biochemical reaction and precipitation reaction stages, build biodegradation kinetics sub-models and chemical precipitation equilibrium sub-models respectively, and calibrate the key kinetic parameters corresponding to the two types of sub-models; SP2.3 employs the finite volume method to numerically discretize and solve the material balance equation, outputting a complete water quality state simulation trajectory in the time-series dimension. This water quality state simulation trajectory serves as the physical constraint boundary for the subsequent wastewater treatment process mechanism and data-driven model operation, ensuring that the subsequent model prediction results fully conform to the objective physical laws of wastewater biochemical reactions.

[0012] Preferably, SP3 specifically includes the following execution steps: SP3.1 addresses the temporal and spatial scale differences in multi-dimensional raw datasets by embedding multi-scale data nodes and constructing the relationships between upstream and downstream process units, forming a standardized spatiotemporal graph structure that can characterize the cross-scale material transfer patterns in wastewater treatment plants. SP3.2, based on the completed spatiotemporal graph structure, uses a multi-scale hybrid neural network to perform cross-scale feature extraction at the equipment operation level, process unit level, and plant-wide operation level, and mines the hidden dynamic operating condition correlations between different process units; SP3.3: Based on the extracted multi-level cross-scale correlation features, an end-to-end training link is built to complete the network iterative training until the error converges, and finally the trained wastewater treatment data-driven prediction model is obtained.

[0013] Preferably, SP4 specifically includes the following execution steps: SP4.1 Build a physical information constraint neural network adapted to the wastewater quality prediction scenario, extract the differential equation residuals output by the wastewater treatment process mechanism model, and embed the differential equation residuals as rigid physical constraints into the loss function of the wastewater treatment data-driven prediction model. SP4.2 adopts an adaptive joint optimization strategy, initiates a bidirectional joint backpropagation algorithm, and synchronously updates the internal parameters of the wastewater treatment process mechanism model and the network weights of the wastewater treatment data-driven prediction model. SP4.3: Complete the deep coupling and fusion of two independent models, eliminate the inherent defects of a single model, and finally generate a wastewater treatment process mechanism and data-driven hybrid model.

[0014] Preferably, SP5 specifically includes the following execution steps: SP5.1 Deploys the wastewater treatment process mechanism and data-driven hybrid model, which has been trained and integrated, to the backend simulation environment of the digital twin platform; SP5.2 Input real-time multi-dimensional raw data sets into the deployed wastewater treatment process mechanism and data hybrid driving model to complete multi-step time series prediction of key water quality indicators of influent and effluent at multiple future moments; SP5.3 uses wastewater discharge standards and the range of on-site reagent dosing equipment as dual constraints, and employs a multi-objective optimization algorithm to iteratively find the optimal reagent dosing sequence in a digital twin simulation environment to output the optimal reagent dosing sequence that adapts to the current real-time operating conditions.

[0015] Preferably, SP6 specifically includes the following execution steps: SP6.1 converts the optimal reagent dosing sequence output by SP5 into standard electrical control instructions that can be recognized by the field PLC actuator, and issues instructions to complete the automatic closed-loop control of the sewage treatment site; SP6.2 After the closed-loop control is completed, real-time data on actual water quality and equipment operating conditions at the wastewater treatment site are collected. The predicted output values ​​of the wastewater treatment process mechanism and the data-driven model are compared, and the model prediction residuals are quantitatively calculated. SP6.3: A fixed residual threshold is preset. When the calculated model prediction residual exceeds the preset residual threshold, the adaptive update process is automatically started to update the wastewater treatment process mechanism and data-driven model parameters across the entire domain to ensure the long-term prediction accuracy of the model.

[0016] Preferably, the specific steps for embedding physical constraints in SP4.1 are as follows: SP4.1.1 Extract the residual expressions of the differential equations corresponding to each key water quality state variable from the completed wastewater treatment process mechanism model; SP4.1.2. Perform differentiable function transformation on the extracted differential equation residual expression to unify the residual output dimension and output time sequence, so as to achieve accurate alignment between the residual output result and the output result of the wastewater treatment data-driven prediction model. SP4.1.3 Dynamically configure residual weighting coefficients based on the fluctuation of influent load on site, and superimpose the processed differential equation residuals into the total loss function of the wastewater treatment data-driven prediction model in a weighted form.

[0017] Preferably, the AI-based digital twin-driven wastewater treatment model building system is used to execute the building method, and the system includes: The data acquisition module is used to collect static structural data, dynamic operation data and external environmental data of sewage treatment facilities in SP1, and integrates them to generate a multi-dimensional raw data set after completing data standardization, timestamp synchronization and integrity verification. The digital twin modeling module is used in SP1 to establish the virtual-physical mapping relationship between physical entities and the digital twin platform; The mechanism modeling module is used to build mechanism models of wastewater treatment processes in SP2; The data-driven modeling module is used to train and generate data-driven prediction models for wastewater treatment in SP3. The hybrid-driven model building module is used to generate a hybrid-driven model of wastewater treatment process mechanism and data in SP4; The prediction and optimization module is used in SP5 to deploy the wastewater treatment process mechanism and data-driven model to the digital twin platform. It inputs real-time multi-dimensional raw data collection to complete multi-step prediction of influent and effluent water quality, and uses a multi-objective optimization algorithm to search for the appropriate reagent dosing sequence for the working conditions. The closed-loop control module is used in SP6 to send the reagent dosing sequence to the actuator to complete the closed-loop control on site, and at the same time to send back the actual on-site operation data to perform residual-driven adaptive updates of the sewage treatment process mechanism and data hybrid driving model. The core processing module includes a processor and a memory. The memory stores computer programs that can be called and executed by the processor. The processor is communicatively connected to all the above modules and coordinates each module to complete data interaction and calculation tasks.

[0018] Beneficial effects This invention provides a method and system for constructing a wastewater treatment model based on AI digital twins. It offers the following advantages: 1. This invention addresses the problems of single-dimensional data acquisition and insufficient data fusion in existing technologies by providing a comprehensive data acquisition and digital twin virtual-physical mapping mechanism. Through the SP1 step, it comprehensively collects static structural data, dynamic operational data, and external environmental data of wastewater treatment facilities. After standardization, timestamp synchronization, integrity verification, and multi-source fusion processing, a high-quality, multi-dimensional original dataset is generated. Simultaneously, a complete one-to-one virtual-physical mapping relationship is established between physical entities and the digital twin platform, enabling real-time mirroring of the physical site's operational status to the virtual platform. This provides a consistent, reliable, and highly uniform data foundation for subsequent mechanism modeling, data-driven modeling, and hybrid model construction, significantly improving the integrity, temporal consistency, and generalization ability of model input data, fundamentally solving the problem of weak data support in existing technologies.

[0019] 2. This invention addresses the shortcomings of existing single-mechanism models or single-data-driven models, which suffer from significant individual deficiencies and fail to effectively integrate. It innovatively proposes a hybrid-driven modeling method based on a physically constrained neural network. In step SP4, after the wastewater treatment process mechanism model and the wastewater treatment data-driven prediction model are constructed, the residuals of the differential equations of the mechanism model are embedded as rigid physical constraints into the loss function of the data-driven prediction model. An adaptive joint optimization strategy-driven bidirectional joint backpropagation is employed to achieve parameter synergistic optimization and deep integration of the two models. This generates a hybrid-driven model of wastewater treatment process mechanism and data that combines physical interpretability and high data fitting accuracy. This effectively compensates for the inherent shortcomings of single models and significantly improves the prediction accuracy and physical consistency of the model under complex and variable operating conditions.

[0020] 3. This invention addresses the lack of dynamic optimization capabilities and closed-loop adaptive mechanisms in existing technologies for chemical dosing control. Through steps SP5 and SP6, it leverages the integrated wastewater treatment process mechanism and a data-driven hybrid model to achieve multi-step accurate prediction of influent and effluent water quality. A multi-objective optimization algorithm searches for the optimal chemical dosing sequence adapted to real-time operating conditions within a digital twin platform. The optimized sequence is then distributed to the actuators to complete on-site closed-loop control. Simultaneously, real-time feedback of actual operating data drives adaptive updates to the hybrid model based on residuals, forming a complete virtual-real closed-loop control system of "prediction-optimization-execution-feedback-iteration." This achieves a multi-objective dynamic balance between water quality compliance, chemical consumption, and operating costs, effectively reducing chemical dosing and energy consumption, and improving the stability and long-term operational reliability of effluent water quality. Attached Figure Description

[0021] Figure 1 This is the main flowchart of the present invention; Figure 2 This is the SP1 flowchart of the present invention; Figure 3 This is the SP4 flowchart of the present invention; Figure 4 This is a system framework diagram of the present invention; Figure 5 This is a schematic diagram of the main interface of the system front end of the present invention; Figure 6 This is a schematic diagram of the system running status bar of the present invention; Figure 7 This is a schematic diagram of the prediction and optimization status bar of the system interface of the present invention. Detailed Implementation

[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Specific Implementation Example 1: This embodiment provides a method and system for constructing a wastewater treatment model based on AI digital twins. Each step in the method relies on the system's built-in hardware modules and collaborative software programs for execution, with hardware and software bound one-to-one and data links interconnected in a closed loop. Figure 1 As shown, the main flowchart of this invention is provided. The main process of the entire method is divided into SP1-SP6. The core of the entire method is to establish a wastewater treatment process mechanism and data-driven hybrid model to achieve water quality prediction and reagent dosing optimization. The specific description is as follows: First, SP1 is executed through the data acquisition module and the digital twin modeling module to collect static structural data, dynamic operation data and external environmental data of the sewage treatment facilities. After data standardization, timestamp synchronization and integrity verification are completed, the data is integrated to generate a multi-dimensional original dataset and establish a virtual-real mapping relationship between the physical entity and the digital twin platform.

[0024] like Figure 5 As shown, a schematic diagram of the system's front-end main interface is provided, presenting the underlying architecture of this solution's virtual-physical mirror mapping, enabling integrated and visualized management and control of the wastewater treatment plant's processes, water quality, and equipment. In the front-end interface, users can click on data acquisition, digital twin, model building, predictive optimization, closed-loop control, and system monitoring to view corresponding details.

[0025] SP1 relies on two established system modules and their supporting software to operate collaboratively. The hardware configuration of the modules is described below: The data acquisition module hardware consists of a multi-parameter integrated water quality sensor, an electromagnetic flow sensor, a temperature transmitter, a meteorological acquisition terminal, an industrial serial port server, a 485 bus acquisition board, and an edge preprocessing industrial control computer. All sensing hardware is uniformly deployed at key process points such as the influent well, biochemical reaction tank, secondary sedimentation tank, and effluent channel of the sewage treatment plant, and is responsible for the acquisition of raw data across the entire area and the initial local data cleaning.

[0026] The hardware components of the digital twin modeling module include an edge GPU graphics processing card and an industrial touch-screen host computer; the supporting software includes an industrial real-time Linux underlying operating system, the Unity industrial digital twin simulation platform, and the Modbus TCP industrial communication protocol; the fixed 100ms data transmission cycle between all modules ensures complete synchronization of timing across modules.

[0027] The overall input for this step is the raw, heterogeneous data from the wastewater treatment plant site. The overall output is a time-aligned, formatted, multi-dimensional raw dataset and a one-to-one virtual-to-real mapping channel. The entire hardware and software collaborative architecture can adapt to the complex on-site conditions of municipal wastewater treatment plants, including diurnal water quality fluctuations and seasonal water temperature changes.

[0028] like Figure 2 As shown, the SP1 flowchart is provided, which is divided into 5 sub-steps. The specific steps are as follows: SP1.1 Collect static structural data of wastewater treatment facilities. Static structural data includes the geometric dimensions of the reaction tank, the configuration of the aeration system, and the layout of the sludge return pipeline. Its purpose is to obtain the fixed hardware parameters of the wastewater treatment facilities, provide structural basis for digital twin 3D modeling, and ensure that the virtual model is completely consistent with the physical facility structure.

[0029] This step relies on the built-in industrial touch-screen host computer within the digital twin modeling module to perform hardware execution. Through the host computer's local file reading function, it directly imports the as-built CAD drawings of the wastewater treatment plant and automatically parses the civil engineering and equipment structural parameters, eliminating the need for additional external hardware. The host computer transmits the parsed standardized structural parameters to the edge GPU in real time, providing the basic structural parameters for subsequent 3D model rendering. This ensures that the effective volume of the virtual biochemical tank, the length of the pipeline layout, and the installation points of the aeration equipment are consistent with the physical site, guaranteeing the accuracy of subsequent spatial dimension calculations of the mechanism model from the source. In practical engineering applications, completely replicating the on-site civil engineering and equipment structure avoids simulation errors caused by deviations between the virtual model and the physical facility structure, making the simulation results of the twin platform more closely match the actual layout of the wastewater treatment plant.

[0030] SP1.2 collects dynamic operating data through a multi-source sensor array. The dynamic operating data includes influent flow rate, effluent flow rate, influent COD concentration, ammonia nitrogen concentration, dissolved oxygen concentration, pH value, temperature, and sludge concentration. Its function is to collect dynamic operating parameters of the entire wastewater process in real time, accurately reproduce the real-time operating conditions on site, and support subsequent dynamic modeling and simulation calculations.

[0031] This step relies on the built-in multi-source sensor array in the data acquisition module to complete the hardware acquisition. A standardized sensor deployment scheme is defined for the entire area: influent flow and influent water quality sensors are installed at the front end of the influent well, 0.5m below the liquid surface; effluent flow and effluent water quality sensors are installed at the end of the effluent channel, 0.3m below the liquid surface; dissolved oxygen, sludge concentration, pH, and water temperature sensors are evenly distributed at the front, middle, and rear sections of the biochemical reaction tank, with one set of sensors at each section, comprehensively covering the reaction conditions in both anoxic and aerobic zones; the meteorological acquisition terminal is installed in an open, unobstructed location within the wastewater treatment plant to avoid interference from plant buildings. All sensors are uniformly set to a sampling frequency of 1 second / time. Various sensors collect analog operating condition signals in real time, which are then converted into digital signals via a 485 bus acquisition board and uploaded to an edge preprocessing industrial control computer via an industrial serial port server. Finally, a continuous time-series dynamic operating condition sequence is output, fully covering the core monitoring variables of the entire wastewater biochemical reaction process, avoiding subsequent modeling distortion due to missing key operating parameters. In practical engineering applications, this deployment method can avoid data deviations caused by dead zones in the sewage tank and fluctuations in the liquid level, ensuring that the dynamic operation data closely matches the actual operating conditions inside the tank, and adapting to the normalized operation scenario of fluctuating influent load during the day and night in sewage treatment plants.

[0032] SP1.3 collects external environmental data, including influent temperature fluctuation data and seasonal water quality change trend data. Its purpose is to incorporate external disturbance variables such as season and water temperature to match the real and complex operating environment of the sewage treatment plant and improve the generalization ability of the subsequent model.

[0033] This step relies on the built-in temperature transmitter and meteorological acquisition terminal of the data acquisition module to complete the hardware data acquisition. The temperature transmitter collects real-time water temperature fluctuation data at the influent front end, while the meteorological acquisition terminal continuously collects long-term seasonal water quality change trend data. Both types of environmental data are simultaneously uploaded to the edge preprocessing industrial control computer. Finally, a time-series environmental interference feature sequence is output, which can effectively compensate for the model's insufficient perception of seasonal temperature differences and sudden changes in influent load, and solve the problem of model prediction failure caused by low-temperature influent in autumn and winter and high-load influent in summer. In practical engineering applications, after incorporating environmental variables, the model can adapt to the different water quality and temperature conditions in winter and summer, solving the industry pain point that traditional wastewater models can only adapt to a single fixed operating condition.

[0034] SP1.4 performs standardized and unified processing, timestamp alignment and synchronization, and integrity verification of abnormal and missing data on the three types of collected data in sequence. It then integrates multi-source data according to the process timeline to generate a unified and standardized multi-dimensional original collected dataset. Its purpose is to eliminate abnormal and invalid data, unify the format and timeline of multi-source heterogeneous data, and prevent defects in the original data from affecting the accuracy of subsequent modeling. This step relies on the built-in edge preprocessing industrial control computer of the data acquisition module to complete the hardware calculation of full-domain data preprocessing. Dimensionless standardization is achieved using the maximum and minimum value normalization formula, as shown in the following calculation formula: ; in: Represents the original data collected by the sensor; Represents the historical maximum value of a single type of runtime variable; Represents the historical minimum value of a single type of runtime variable; This represents the standard input data that falls within the 0-1 range after normalization. This formula eliminates the dimensional differences between various monitoring parameters such as flow rate, water quality, and temperature, unifies the numerical range of all input data, and avoids the problem of large parameters dominating model training while small parameters become ineffective.

[0035] Meanwhile, the edge preprocessing industrial control computer is equipped with a built-in algorithm program that uses linear interpolation to fill in missing data, aligns all heterogeneous data timestamps to the global system reference clock, and finally outputs a standardized dataset that is time-synchronized, formatted, and free of abnormal missing data.

[0036] In practical engineering applications, this preprocessing process can eliminate the differences in the dimensions of data from different sensors, prevent common data failures on-site such as asynchronous data, garbled characters, and single-point missing data from multi-source equipment in sewage treatment plants, and ensure the quality of backend modeling data.

[0037] SP1.5 builds a digital twin 3D facility model based on the collected static structural data, and combines it with real-time dynamic operation data to synchronize the physical operating conditions with the virtual model, establishing a complete one-to-one virtual-real mapping relationship between the physical entity and the digital twin platform; its function is to realize the real-time mirroring of the physical site's operating status to the virtual twin platform, and build a virtual operating environment for online simulation, water quality prediction, and control optimization.

[0038] This step relies on the built-in edge GPU of the digital twin modeling module and the industrial touch screen host computer to collaboratively complete hardware rendering and synchronized actions. The industrial touch screen host computer calls Unity twin simulation software to build the 3D facility model, while the edge GPU is responsible for parallel computing power acceleration to ensure model rendering efficiency. At the same time, millisecond-level virtual-real linkage is achieved through the virtual-real synchronization timing mapping formula, the corresponding calculation formula is as follows: ; in: This represents the operating condition of the virtual twin model at time t. This represents the actual operating conditions of the physical wastewater treatment plant at time t. Representing system communication latency, this system strictly controls communication latency to within 100ms, achieving near real-time synchronous mirroring between the physical site and the virtual model. In practical engineering applications, millisecond-level virtual-physical synchronization allows maintenance personnel to intuitively view the real-time operating status of every piece of equipment and every process segment on the twin platform, eliminating the need for on-site inspections and reducing on-site maintenance workload.

[0039] Then, SP2 is executed through the mechanism modeling module. Based on the multi-dimensional original datasets output by SP1, and according to the core reaction kinetics and material balance equations of the activated sludge process in wastewater treatment, a mechanism model of the wastewater treatment process is constructed. Its function is to build a mechanism model based on the objective biochemical reaction laws of wastewater treatment, to give the model physical interpretability, and to make up for the shortcomings of pure data-driven models that have no theoretical basis and whose prediction results violate the process laws.

[0040] SP2 relies on an edge computing industrial control computer equipped with an Intel i7 industrial processor and 16GB of industrial memory, based on a mechanism modeling module. The accompanying software is the MATLAB Simulink differential equation solving toolbox. The edge computing industrial control computer directly receives standardized multi-dimensional datasets from the SP1 edge preprocessing industrial control computer as input via the Modbus TCP protocol, with no cross-module hardware conflicts throughout the process. The final output includes three types of data: fixed parameters of the mechanism model, time-series water quality simulation trajectory, and physical differential residual sequence. The wastewater treatment process mechanism model constructed in this study is a white-box mechanism model, relying entirely on the objective physicochemical laws of wastewater biochemical reactions for calculations. It has no randomly trained black-box parameters, and all calculation processes are traceable, providing rigid physical constraints for subsequent AI models and preventing AI models from outputting erroneous water quality predictions that violate biochemical common sense.

[0041] The specific steps are as follows: SP2.1, based on the reaction kinetic formula of activated sludge process and the water material balance equation set, establishes the underlying mathematical calculation framework of wastewater treatment process mechanism model; its function is to establish the underlying calculation logic of mechanism model, strictly follow the basic theory of biochemical reaction in wastewater treatment industry, and ensure the compliance of mechanism model calculation.

[0042] This step relies on the edge computing industrial control computer built into the mechanism modeling module to complete the underlying mathematical framework. The industrial control computer calls the MATLAB Simulink toolbox to input a complete set of basic biochemical reaction equations. The overall calculation follows a progressive hardware operation logic of first calculating material conservation and then solving reaction kinetics. First, the total amount of pollutants in the influent and effluent of the reaction tank is conserved through the water body material balance equation. Then, the real-time degradation rate of microorganisms in the tank is calculated by nesting the organic matter degradation kinetic formula. The two equations are combined to form the entire underlying operation kernel of the mechanism model, without any user-defined random parameters. The core calculation formulas are as follows: One is the kinetic formula for organic matter degradation in the activated sludge process: ; in: This represents the real-time rate of change in COD substrate concentration in wastewater; It represents the maximum specific growth rate of microorganisms in wastewater and is directly affected by water temperature and sludge concentration. This represents the concentration of sludge in the mixed liquor of the biological treatment tank. Represents the real-time concentration of organic substrates; This represents the half-saturation constant of microorganisms, characterizing the sensitivity threshold of microbial degradation of pollutants. This formula is used to quantitatively characterize the degradation rate of organic pollutants by microorganisms in the pool, reconstruct the core biochemical reaction kinetics of the aerobic pool, and is the core fundamental equation for water quality extrapolation in mechanistic models.

[0043] The second is the general material balance equation for water bodies: ; in: Represents the effective volume of the biochemical reaction tank; Represents real-time water inflow rate; Represents real-time water flow rate; This represents the concentration of pollutants at the inlet end; This represents the concentration of pollutants at the outlet water level; This represents the intrinsic reaction rate of the wastewater biochemical reaction and is directly related to the dissolved oxygen content in the tank. This formula follows the law of conservation of mass to calculate the total changes in pollutants in the influent and effluent of a single reaction tank, establishing the underlying logic of the overall material balance of the wastewater treatment process.

[0044] SP2.2 breaks down the entire wastewater treatment process into biochemical and sedimentation reaction stages, and builds separate sub-models for biodegradation kinetics and chemical precipitation equilibrium, calibrating the key kinetic parameters corresponding to the two types of sub-models. Its function is to break down complex wastewater treatment processes, accurately model them in modules, and match the calibration parameters with actual on-site operating conditions to improve the adaptability of the mechanism model to operating conditions.

[0045] This step utilizes the built-in edge computing industrial control computer within the mechanism modeling module to complete modular modeling and parameter calibration. The industrial control computer imports global influent load and real-time water temperature data as input variables, and performs multiple rounds of automatic parameter calibration through iterative calculations, outputting fixed dynamic parameters that closely match the actual on-site operating conditions. Modular modeling reduces the computational complexity of a single overall model, allowing it to adapt to two different on-site operating conditions: low-temperature wastewater treatment plants in the north and high-load wastewater treatment plants in the south. In practical engineering applications, modular modeling allows maintenance personnel to individually debug individual process steps such as biodegradation and chemical precipitation without requiring overall model modifications, significantly reducing the difficulty of on-site model debugging.

[0046] SP2.3 employs the finite volume method to numerically discretize and solve the material balance equation, outputting a complete water quality state simulation trajectory in the time-series dimension. This water quality state simulation trajectory serves as the physical constraint boundary for the subsequent operation of the wastewater treatment process mechanism and data-driven hybrid model, ensuring that the prediction results of the subsequent model fully conform to the objective physical laws of wastewater biochemical reactions. Its function is to output standardized physical constraint boundaries, limit the prediction output range of the subsequent hybrid model, and prevent unreasonable prediction results from the data-driven model that violate the common sense of wastewater processes.

[0047] This step uses the finite volume method to perform numerical discretization and solution of the differential equation. The specific calculation logic is as follows: Algorithm input: continuous form water body material balance differential equation, biological tank spatial grid division parameters, and a fixed simulation time step of 5 seconds; Step-by-step calculation steps: Step 1: Spatial discretization: Divide the biochemical reaction tank into uniform control volume grids according to the actual partitions, and define the interface flux and water quality state variables at the center of each grid; Step 2: Temporal discretization: For each control volume grid, perform time integration on the differential equation within a single simulation step; Step 3: Flux solution: Calculate the fluxes of the three types of interfacial substances (influent, effluent, and biochemical reaction) in the grid, and update the water quality state of each grid at the next time step by solving the simultaneous conservation equations; Step 4: Global stitching: Integrate the time-series calculation results of all grids to obtain the continuous water quality change trajectory of the entire tank; Algorithm output: Discretized time-series water quality simulation data sequence that can be processed by an industrial control computer.

[0048] This step relies on the edge computing industrial computer built into the mechanism modeling module to perform discrete solutions to the differential equations. Since the industrial computer cannot directly analyze continuous differential equations, the built-in finite volume method algorithm is used to decompose the continuous material balance differential equations into discrete time-series data that can be iteratively computed in hardware. The corresponding discrete solution formulas are as follows: ; in: Represents the current simulation moment. This represents the time step of a single-step simulation. The fixed simulation step size for this system is 5 seconds. This represents the current concentration of water pollutants. The symbol represents the concentration of water pollutants at the next simulation moment; the integral symbol represents the global integral calculation of water quality changes over a continuous time period.

[0049] Based on the actual wastewater treatment process, the specific discretization solution operation of the finite volume method is divided into three steps: First, the edge computing industrial control computer divides the entire biochemical reaction tank into several uniform control volume grids, corresponding to the actual tank partitions of the wastewater treatment plant, to achieve spatial dimension discretization; Second, for each grid control volume, the changes in pollutants brought about by the influent, effluent, and biochemical reaction are solved by integration, completing the time dimension discretization; Third, all grid discretization equations are solved simultaneously, and the time-series water quality values ​​of the entire domain are iteratively solved, finally splicing together to obtain a complete and continuous water quality simulation trajectory. The input is a continuous material balance differential equation, and the output is a second-by-second time-series water quality simulation value. The industrial control computer sends the simulation trajectory data to subsequent modules in real time, which serves as an insurmountable physical constraint boundary to control the prediction results of all subsequent AI models. In practical engineering applications, this discretization solution method can be adapted to biochemical reaction tanks with different volumes and partition structures, solving the problem that continuous differential equations cannot be directly calculated by industrial control computers, while closely reflecting the real physical conditions of the wastewater tank partition reaction.

[0050] Then, SP3 is executed through the data-driven modeling module. Based on the multi-dimensional raw data set output by SP1, a multi-scale hybrid neural network is used to perform cross-scale feature extraction and dynamic correlation modeling on the multi-dimensional raw data set, and train to generate a wastewater treatment data-driven prediction model. Its function is to mine the complex nonlinear and cross-scale hidden operating conditions in wastewater operation data, and complete high-precision modeling based on measured data, so as to make up for the shortcomings of pure mechanism models that cannot adapt to the changing actual operating conditions on site and have poor fitting accuracy.

[0051] This SP3 model relies on a data-driven modeling module with hardware including a cloud computing server and a local edge AI inference card. The accompanying software is the lightweight industrial deep learning framework PyTorch 2.0. This module, along with the upstream mechanism modeling module, receives the same standardized dataset from SP1 as input, ultimately outputting all the network weight parameters that are fixed after training. The wastewater treatment data-driven prediction model constructed in this study is a pure data-driven gray-box AI model. It relies on massive amounts of on-site measured data to fit the complex nonlinear correlations within the wastewater treatment process. It excels at handling extreme conditions that mechanism models struggle to accurately depict, such as influent shock loads and sudden water quality disturbances, effectively compensating for the insufficient dynamic fitting capabilities of pure mechanism models.

[0052] The specific steps are as follows: SP3.1 addresses the temporal and spatial scale differences in multi-dimensional raw datasets by embedding multi-scale data nodes and constructing the relationships between upstream and downstream process units, forming a standardized spatiotemporal graph structure capable of characterizing the cross-scale mass transfer patterns in wastewater treatment plants. Its purpose is to unify data formats at different scales, construct graph structure data adapted to neural network inputs, and adapt to the spatiotemporal correlation characteristics of wastewater treatment processes. The specific execution steps are as follows: Step 1: Concrete spatial node division. Based on the actual process sections of the wastewater treatment plant, independent nodes are broken down into eight categories of physical process nodes, completely corresponding to the actual on-site structures: influent well node, anoxic tank pre-section node, anoxic tank post-section node, aerobic tank pre-section node, aerobic tank middle section node, aerobic tank post-section node, secondary sedimentation tank node, and effluent channel node. Each node is bound to the measured data of a corresponding location sensor, eliminating problems such as ambiguous spatial node divisions and lack of corresponding hardware data. Step 2: Time-series scale unification calibration. The original dataset has sensor sampling time differences: water quality sensor samples once every 1 second, flow sensor samples once every 2 seconds, and meteorological sensor samples once every 60 seconds. This time, a unified time-series step of 1 second is used, and third-order spline interpolation is used to fill in the missing time-series data of low-sampling-frequency sensors, so that the time-series axes of all process node data are fully aligned, preventing the original data time-series misalignment.

[0053] Step 3: Constructing Directed Edges. Based on the unidirectional flow process logic of wastewater, the system is constructed with upstream nodes pointing to downstream nodes. The specific link is as follows: Inlet well → Anoxic tank front section → Anoxic tank rear section → Aerobic three-section zone connected in series → Secondary sedimentation tank → Effluent channel; At the same time, a return edge is added to match the on-site sludge return process: the sludge return node in the secondary sedimentation tank points to the anoxic tank front section, completely restoring the actual hydraulic flow direction and sludge return coupling relationship of the wastewater treatment plant.

[0054] Step 4: Multi-scale data node embedding operation. The pre-processed 0-1 normalized water quality, flow rate, temperature, and sludge concentration data (8 dimensions in total) are used as the feature vectors of each process node. The vectors are then input into the graph embedding layer for dimensionality reduction, compressing all node feature dimensions to 32 dimensions. Finally, a standardized spatiotemporal graph structure data with one-to-one correspondence between node features and topological edges is generated.

[0055] The core function of this step is to overcome the shortcomings of traditional temporal neural networks that only consider time changes and ignore process space topological relationships. It fully replicates the real spatial topological relationships of water flow and sludge return in wastewater treatment plants, allowing subsequent neural network training to learn both "temporal fluctuation patterns of water quality and process space coupling patterns", thereby further improving the prediction accuracy under complex influent conditions.

[0056] This step relies on the cloud computing server built into the data-driven modeling module to complete the entire set of concrete data structure reconstruction operations. The server reads the standardized dataset sent from upstream frame by frame, and automatically builds the graph structure in strict accordance with the above-mentioned 8 types of node division, directed edge topology rules, and 1-second time series benchmark, without the need for manual intervention in topology editing. The output standardized spatiotemporal graph data is directly adapted to the input format of subsequent multi-scale hybrid neural networks without the need for secondary format conversion. In practical engineering applications, this refined topology construction method perfectly matches the actual process layout on site, avoiding the disconnect between the abstract graph structure and the real wastewater treatment process.

[0057] SP3.2, based on the completed spatiotemporal graph structure, uses a multi-scale hybrid neural network to perform cross-scale feature extraction at the equipment operation level, process unit level, and plant-wide operation level, and mines the hidden dynamic operating condition relationships between different process units; its function is to mine the operation characteristics of equipment, units, and the entire plant at all levels in a hierarchical manner, and comprehensively capture the local and global dynamic change patterns of wastewater processes.

[0058] This step relies on the cloud computing server built into the data-driven modeling module to complete multi-level feature extraction. The server calls the multi-scale hybrid neural network built into the PyTorch framework to complete feature mining layer by layer according to the equipment level, process unit level, and overall plant operation level. It automatically collects the hidden dynamic correlation features between different process units, providing a high-quality feature set for subsequent model training. In practical engineering applications, hierarchical feature extraction can accurately capture faults at different levels, such as single aeration equipment failure, water quality fluctuations in a single reaction tank, and sudden changes in influent load across the entire plant, achieving comprehensive perception of multi-scale operating conditions.

[0059] SP3.3, based on the extracted multi-level cross-scale correlation features, builds an end-to-end training link, completes iterative training of the network until the error converges, and finally obtains the trained wastewater treatment data-driven prediction model; its function is to complete the iterative optimization of network parameters, converge to obtain a high-precision data-driven prediction model, and realize direct water quality prediction based on measured data.

[0060] This step relies on the built-in cloud computing server of the data-driven modeling module to complete iterative training, while simultaneously using a local edge AI inference card to accelerate the training process in real time. During the training phase, mean squared error is used as the basic loss function to measure the deviation between the model's predicted values ​​and the actual values ​​on site. The formula for calculating the basic loss function is as follows: ; in: The predicted water quality value represents the output of the neural network; This represents the actual water quality values ​​collected by on-site sensors. This represents the total number of samples used in this training round. This formula quantifies the overall error between the model's predicted values ​​and the actual on-site monitoring values, guiding the neural network to update its parameters in reverse and continuously reduce the prediction bias. After training, the cloud server distributes the fixed model weights to the edge AI inference card to meet the on-site real-time inference needs. In practical engineering applications, this loss function can accurately quantify the model's prediction bias, guide the neural network to optimize parameters in a targeted manner, and effectively improve the model's dynamic fitting accuracy for nonlinear conditions such as sewage treatment plant influent shock loads and sudden water quality anomalies.

[0061] Then, SP4 is executed through the hybrid-driven model building module. After the wastewater treatment process mechanism model and the wastewater treatment data-driven prediction model are built, a physical information constraint neural network is constructed. The residuals of the differential equations of the wastewater treatment process mechanism model are embedded into the loss function of the wastewater treatment data-driven prediction model. Through joint backpropagation driven by an adaptive joint optimization strategy, the deep fusion and parameter co-optimization of the two types of models are completed, generating a hybrid-driven model of wastewater treatment process mechanism and data. Its function is to combine the physical constraint advantages of the mechanism model with the high-precision fitting advantages of the data-driven model, realize the co-optimization of the parameters of the two models, and obtain a hybrid model that takes into account both physical rationality and prediction accuracy.

[0062] This SP4 implementation relies on a hybrid-driven model building module with pre-defined hardware and software. The hardware consists of an industrial AI acceleration computing board, and the software reuses the PyTorch deep learning framework. The industrial AI acceleration computing board receives physical differential residual data from the SP2 mechanism modeling module and network weight data from the SP3 data-driven modeling module in parallel. Computation can only begin after the first two types of models have been fully trained and converged; premature access is prohibited. The generated wastewater treatment process mechanism and data-driven hybrid model is the core gray-box model of the system. It retains both the fixed mechanism differential equation calculation link and the dynamically iterative neural network weight link, possessing both the physical interpretability of the mechanism model and the high-precision fitting capability of the data-driven model. It is adaptable to all scenarios of wastewater treatment plant operation, including steady-state operation, variable operating condition fluctuations, and influent shock loads.

[0063] like Figure 3 As shown, the SP4 flowchart is provided, and the specific steps are as follows: SP4.1 Build a physical information constraint neural network adapted to the wastewater quality prediction scenario, extract the differential equation residuals output by the wastewater treatment process mechanism model, and embed the differential equation residuals as rigid physical constraints into the loss function of the wastewater treatment data-driven prediction model; its function is to embed objective process physical rules into the network training process, so that the data-driven model training is constrained by physical laws throughout the process.

[0064] The specific details are as follows: SP4.1.1 Extract the residual expressions of the differential equations corresponding to each key water quality state variable from the completed wastewater treatment process mechanism model; its function is to accurately extract the physical operation deviations of the mechanism model and obtain standardized physical constraint expressions that can be used for network constraints.

[0065] This step relies on an industrial AI acceleration computing board to automatically extract residuals. The board directly reads the original calculation data of the mechanism model transmitted by the edge computing industrial control computer, and solves the physical differential residuals corresponding to each water quality variable in batches. The corresponding calculation formulas are as follows: ; in: Represents the physical differential residual of the biochemical reaction in wastewater; Represents the actual rate of change in water quality status; This represents the rate of change in water quality state obtained from the theoretical solution of the mechanistic model. This formula is used to calculate the difference between the theoretical calculation results of the mechanistic model and the actual water quality change patterns, generating a physical constraint residual term that can be embedded in a neural network. In practical engineering applications, this residual can intuitively reflect the deviation between the theoretical calculation values ​​of the mechanistic model and the actual water quality change patterns. As a rigid constraint, it can prevent the neural network from blindly fitting data without adhering to the objective laws of wastewater treatment processes.

[0066] SP4.1.2 performs differentiable function transformation on the extracted differential equation residual expression to unify the residual output dimension and output time sequence, achieving accurate alignment between the residual output result and the output result of the wastewater treatment data-driven prediction model; its function is to solve the problem of mismatch between the mechanism output and the network output dimension and time sequence, and to ensure that physical constraints can participate normally in the network backpropagation training.

[0067] This step leverages the built-in dimension alignment program on the industrial AI acceleration computing board to complete the residual data format and timing calibration, ensuring that the mechanistic residual data and the neural network output data dimensions and time axis are perfectly matched. This guarantees that the subsequent loss function can correctly complete gradient backpropagation calculations. In practical engineering applications, this step solves the natural timing misalignment problem of long time intervals between mechanistic model outputs and short time intervals between neural network outputs, ensuring that physical constraints can stably apply throughout the entire network training process.

[0068] SP4.1.3. Based on the fluctuations in the on-site influent load, the residual weighting coefficients are dynamically configured. The processed differential equation residuals are then weighted and added to the total loss function of the wastewater treatment data-driven prediction model. This process dynamically adjusts the physical constraint weights according to the influent load, adapting to different operating scenarios such as steady-state and variable conditions, and improving constraint adaptability. This step relies on industrial AI-accelerated computing boards to read the on-site influent load data in real time, dynamically and adaptively adjusting the residual weighting coefficients to ultimately generate the total loss function that integrates physical constraints. In practical engineering applications, the dynamic weighting coefficients can adapt to two typical operating conditions of wastewater treatment plants: steady-state low load and high influent shock load, avoiding the problems of overly strong or insufficient constraints caused by fixed weight constraints.

[0069] SP4.2 adopts an adaptive joint optimization strategy and initiates a bidirectional joint backpropagation algorithm to synchronously update the internal parameters of the wastewater treatment process mechanism model and the network weights of the wastewater treatment data-driven prediction model. Its function is to synchronously optimize the parameters of the two models, avoid parameter adaptation deviation caused by step-by-step optimization, and improve the fusion fit of the two types of models.

[0070] This step relies on industrial AI acceleration computing boards and employs a bidirectional joint backpropagation algorithm to complete the collaborative optimization of two models. The specific computational logic is as follows: Algorithm inputs: total loss function of the hybrid model, initial parameter set of the mechanistic model, initial weights of the neural network, and a fixed learning rate. =0.001; Step-by-step calculation steps: Step 1: Forward propagation: Simultaneously run the mechanistic model and the data-driven model, outputting water quality simulation results and prediction results respectively, and calculate the total loss function value; Step 2: Gradient backward solving: Solve the gradient of the total loss with respect to the mechanistic parameters and network weights respectively; Step 3: Synchronous parameter update: Based on the gradient value, synchronously iteratively update all process parameters of the mechanistic model and all weight parameters of the neural network; Step 4: Convergence judgment: If the fluctuation of the loss value is less than the threshold for 10 consecutive iterations, it is determined that the parameters of the two models have converged, and the iteration is stopped; Algorithm output: An integrated hybrid driving model with parameters co-optimized and adapted to the field conditions. This step simultaneously iteratively updates the mechanistic model parameters and neural network weights; the parameter synchronization update formula is as follows: ; in: The set of all parameters to be updated for the representative mechanism model and neural network; The learning rate represents a fixed value for the algorithm; in this scheme, it is set to 0.001. This represents the gradient value of the total loss function. This formula is used to synchronously and iteratively update the parameters of the mechanistic model and the neural network based on the gradient of the total loss, achieving integrated collaborative optimization of the two models. In practical engineering applications, bidirectional synchronous backpropagation can simultaneously correct the process parameters of the mechanistic model and the weights of the neural network, avoiding mismatches in the adaptation of the two models caused by step-by-step optimization, and improving the overall stability of the hybrid model.

[0071] SP4.3 achieves deep coupling and fusion of two independent models, eliminates the inherent defects of single models, and finally generates a hybrid model driven by wastewater treatment process mechanism and data. Its function is to make up for the shortcomings of single mechanism model and single data driven model, and generate a high-precision and highly interpretable hybrid model that is adapted to complex and variable working conditions of wastewater.

[0072] This step leverages industrial AI-accelerated computing boards to complete the final model packaging and fusion, solidifying the dual-model computation chain into an integrated hybrid-driven model, which is then simultaneously deployed to the downstream digital twin platform for backup. In practical engineering applications, the integrated hybrid model eliminates the need to separately call the mechanism model and the data-driven model, reducing platform computing power overhead and ensuring stable operation of low-computing-power field devices at the edge.

[0073] Then, SP5 is executed through the prediction and optimization module. Based on the wastewater treatment process mechanism and data-driven hybrid model generated in SP4, this model is deployed on a digital twin platform. Real-time, multi-dimensional raw data sets are input to complete multi-step prediction of influent and effluent water quality. A multi-objective optimization algorithm is used to search for the appropriate chemical dosing sequence for the operating conditions. Its function is to achieve advanced water quality prediction based on a mature hybrid model, while simultaneously using water quality compliance and equipment limits as constraints to solve for the optimal dosing scheme, achieving bidirectional optimization of water quality control and chemical consumption reduction. Figure 7 As shown, a schematic diagram of the prediction and optimization status bar of the system interface is provided to display the real-time prediction and optimization status after the hybrid-driven model is deployed on the digital twin platform.

[0074] This SP5 relies on the established hardware and software of the prediction and optimization module. The module hardware is an industrial parallel computing unit, and the supporting software is the NSGA-II multi-objective optimization algorithm toolbox built into the twin platform. The industrial parallel computing unit receives the solidified mixed driving model sent from upstream and the real-time data stream from the field, and outputs the time-series water quality prediction results for the next 6 hours and the optimal chemical dosing sequence. It can realize the early prediction of water quality change trends, replace the traditional manual experience-based chemical dosing mode, and reduce the ineffective consumption of chemicals from the source.

[0075] The specific steps are as follows: SP5.1 deploys the fully trained and integrated wastewater treatment process mechanism and data-driven hybrid model to the backend simulation environment of the digital twin platform. Its function is to connect the trained hybrid model to the twin simulation platform and open up the channel between model prediction and virtual simulation operation.

[0076] This step relies on the industrial parallel computing unit of the prediction and optimization module to complete model deployment. The parallel computing unit calls the backend simulation interface of the digital twin platform to import the integrated hybrid-driven model into the simulation environment, completing the model mounting and establishing the running channel. In actual engineering applications, the model is deployed on the backend of the twin platform, without consuming computing power from the on-site front-end monitoring interface, ensuring smooth and lag-free operation of the front-end human-machine interface.

[0077] SP5.2 inputs real-time multi-dimensional raw data sets into the deployed wastewater treatment process mechanism and data hybrid driving model to complete multi-step time-series prediction of key water quality indicators of influent and effluent at multiple future moments; its function is to achieve advanced prediction of water quality change trends, perceive water quality fluctuation risks in advance, and provide advance prediction basis for chemical optimization and control.

[0078] This step relies on the industrial parallel computing unit of the prediction and optimization module to complete multi-step time-series predictions. The parallel computing unit receives real-time operational data transmitted from the SP1 and drives the hybrid model to continuously output water quality prediction results for multiple future time points, comprehensively predicting water quality fluctuation trends. In practical engineering applications, water quality predictions up to 6 hours in advance allow maintenance personnel to anticipate influent impacts and risks of water quality exceeding standards, enabling them to prepare process control plans in advance and avoid temporary exceedances of effluent water quality standards.

[0079] SP5.3 uses wastewater discharge standards and the range of on-site chemical dosing equipment as dual constraints. It employs a multi-objective optimization algorithm to iteratively find the optimal chemical dosing sequence in a digital twin simulation environment and outputs the optimal chemical dosing sequence that adapts to the current real-time operating conditions. Its function is to balance the hard requirements of effluent water quality compliance with the need for chemical conservation and consumption reduction, and to solve the optimal dosing timing scheme that adapts to the real-time operating conditions.

[0080] In this step, the multi-objective optimization algorithm uses the NSGA-II second-generation non-dominated sorting genetic algorithm to complete the multi-objective optimization. The complete calculation logic is as follows: Algorithm inputs: two main optimization objective functions, hardware constraints of the dosing pump, population size, and maximum number of iterations; Step-by-step calculation steps: Step 1: Population initialization: Randomly generate multiple sets of different time-series reagent dosages to form the initial dosing scheme population; Step 2: Non-dominated sorting: Based on the two objectives of minimizing effluent deviation and minimizing reagent consumption, stratify and sort the individuals in the population to select the non-dominated optimal solution; Step 3: Crowding calculation: Calculate the crowding degree of individuals in the same layer to ensure a uniform distribution of the solution space and avoid clustering of optimal solutions; Step 4: Selection, crossover, and mutation: Genetic operators iteratively update the dosing scheme population; Step 5: Cancellation decision: After reaching the maximum number of iterations, output the Pareto optimal frontier solution set; Algorithm output: The optimal timing of chemical dosing, which balances achieving effluent standards with reducing chemical consumption.

[0081] This step relies on the industrial parallel computing unit of the predictive optimization module to call the built-in multi-objective optimization algorithm to complete iterative optimization, setting dual optimization objectives and hardware boundary constraints, as follows: The objective is to minimize deviations from water quality standards. ; Objective: Minimize total dosage of pesticides ; Hardware boundary constraints: ; in: The representative model predicts the concentration of effluent water quality. Represents the national standards and limits for pollutant discharge from urban wastewater treatment plants; This represents the real-time dosage of the drug at time t; and These represent the minimum and maximum dosing ranges of the on-site variable frequency dosing pump, respectively.

[0082] The parallel computing unit ultimately outputs the time-series optimal reagent dosing sequence and sends it to the downstream closed-loop control module. In practical engineering applications, this multi-objective optimization strategy can minimize the consumption of PAC and PAM reagents while ensuring stable effluent compliance, meeting the actual operational needs of wastewater treatment plants for cost reduction and efficiency improvement.

[0083] Finally, SP6 is executed through the closed-loop control module. Based on the reagent dosing sequence output by SP5, the reagent dosing sequence is sent to the actuator to complete the on-site closed-loop control. At the same time, the actual on-site operating data is transmitted back to perform residual-driven adaptive updates on the wastewater treatment process mechanism and data-driven hybrid model. Its function is to complete the execution of virtual optimization instructions and correct model deviations based on on-site measured data, forming a complete closed-loop iterative system that combines virtual and real data.

[0084] This SP6 system operates based on a pre-defined closed-loop control module. The module hardware includes a field PLC controller, relay control module, variable frequency pump for chemical dosing, valve actuator, and field data feedback terminal. The PLC controller handles signal conversion and command issuance, the actuators handle the chemical dosing actions, and the data feedback terminal transmits real-world data back to the system, forming a complete virtual-real closed loop. The system employs a threshold-triggered incremental update mechanism, which does not continuously consume edge computing power. Model updates are only automatically initiated when the model prediction deviation exceeds the limit, effectively mitigating model drift caused by equipment aging and natural sludge microbial turnover, eliminating the need for regular manual model retraining.

[0085] The specific steps are as follows: SP6.1 converts the optimal reagent dosing sequence output by SP5 into standard electrical control instructions that can be recognized by the on-site PLC actuator, and issues instructions to complete the automatic closed-loop control of the sewage treatment site; its function is to complete the conversion of virtual optimization instructions into on-site hardware control signals, and realize unmanned automated reagent dosing control.

[0086] This step relies on the built-in PLC controller in the closed-loop control module to complete signal conversion and command issuance. The PLC controller receives the digital dosing sequence transmitted from upstream, converts the digital optimization commands into standard electrical signals recognizable by relays, and drives the variable frequency pump and valve actuator to complete precise dosing. In practical engineering applications, fully automatic closed-loop dosing replaces manual knob control, improving dosing accuracy and avoiding problems such as lag, overdosing, or underdosing caused by manual operation.

[0087] SP6.2 After the closed-loop control is completed, the actual water quality data and equipment operating condition data of the sewage treatment site are collected in real time. The sewage treatment process mechanism and the data-driven model prediction output value are compared, and the model prediction residual is quantitatively calculated. Its function is to quantify the deviation between the model prediction value and the actual value on site, and accurately determine the degree of decay of the model's real-time prediction accuracy.

[0088] This step relies on the built-in field data feedback terminal of the closed-loop control module to complete the collection of measured data. The terminal collects real-time data on actual water quality and equipment operating conditions on site and sends it back to the prediction and optimization module to quantitatively solve the model's global prediction residual. The solution formula is as follows: ; in: This represents actual water quality data measured on-site. The predicted water quality data represents the output of the hybrid model; The representative model's global prediction residual.

[0089] This residual index serves as the trigger for adaptive model updates. In practical engineering applications, it can intuitively quantify the degree of accuracy decay after long-term model operation and accurately capture model drift issues caused by sludge aging and equipment aging.

[0090] SP6.3, Preset fixed residual threshold When the calculated model prediction residuals exceed the preset residual threshold, an adaptive update process is automatically initiated to update the parameters of the wastewater treatment process mechanism and data-driven hybrid model across the entire domain, ensuring the long-term prediction accuracy of the model. Its function is to automatically calibrate the model parameters, offsetting the accuracy decrease caused by long-term operating condition drift, and ensuring the long-term stable operation of the system. The specific calculation steps in this process are as follows: First, input the model's real-time prediction residuals as follows: The system presets a fixed residual threshold. and all current parameters of the hybrid model; During the calculation, the first step is real-time residual comparison: Field measurement data is collected every 5 minutes, the model-predicted residual is calculated, and the residual is compared with a preset threshold; the second step is trigger judgment: if... If the model accuracy meets the standard, no parameter update is performed; if The first step is to determine if the model has drifted and trigger incremental updates; the second step is incremental fine-tuning: only small gradient parameter iterations are performed based on the latest time series data, without full retraining; the third step is to update the closed loop: after the update is completed, the residuals are re-compared until the residuals fall back to within the threshold.

[0091] This step relies on a closed-loop control module to coordinate with upstream industrial AI acceleration computing boards to complete adaptive updates. The system has a preset fixed residual threshold. Once the measured residual exceeds the threshold, the board's internal parameter iteration program is automatically triggered, synchronously updating all parameters of the hybrid model across the entire domain. Model self-calibration can be completed without manual intervention. In practical engineering applications, the model's adaptive updates achieve maintenance-free operation throughout its entire lifecycle, eliminating the need for technicians to periodically retrain the model on-site, significantly reducing the operation and maintenance costs of intelligent wastewater treatment systems.

[0092] like Figure 4 The diagram provided illustrates the system framework of this invention, showing the system's composition. The core processing module serves as the control center of the entire system. This module includes a dual-redundant industrial processor and a power-loss-protected industrial memory. The memory stores a complete set of control computer programs that can be called and executed by the processor. The processor establishes communication connections with all functional modules within the system, coordinating global data interaction, computing power allocation, and step scheduling timing. Its function is to uniformly schedule the execution timing of all modules, cross-module data transmission, and hardware computing power allocation, ensuring that SP1 to SP6 run in an orderly and progressive manner according to the preset timing, and preventing problems such as step errors and parallel skipping of levels.

[0093] Based on the scheduling logic of the core processing module, the complete global timing control process of this solution is as follows: From 0s to 30s, the core processing module schedules the data acquisition module and the digital twin modeling module to execute SP1; from 30s to 90s, the parallel scheduling mechanism modeling module and the data-driven modeling module execute SP2 and SP3 respectively; from 90s to 150s, the SP4 model fusion process is executed serially, and the next stage can only be entered after the first two types of models have converged; from 150s to 210s, SP5 water quality prediction and multi-objective dosing optimization are executed; after 210s, the system continuously and cyclically executes SP6 on-site closed-loop control and threshold-triggered model adaptive update, strictly following the serial timing logic throughout the entire process.

[0094] like Figure 6As shown, a schematic diagram of the system's running status bar is provided, displaying the running status of each module of the system, which can be viewed in real time through the front-end interface.

[0095] In summary, this solution relies on the sequential linkage of six functional modules and the unified scheduling of the core processing module to form a closed-loop operation system encompassing "data acquisition and modeling → mechanism white-box modeling → data black-box modeling → dual-model fusion constraints → water quality prediction and dosing optimization → on-site closed-loop control + model self-updating." First, sensors deployed across multiple locations throughout the wastewater treatment plant complete comprehensive data acquisition and preprocessing, establishing a synchronized virtual-real digital twin environment. Then, a mechanism model conforming to biochemical reaction laws and a data-driven model adapting to complex nonlinear operating conditions are constructed in parallel, compensating for the shortcomings of each single model. Next, physical information neural networks embed the mechanism physical constraints into the loss function of the data-driven model, achieving deep coupling of the two models and obtaining a hybrid model with both interpretability and high accuracy. Based on the hybrid model, advanced water quality prediction is performed on the twin platform, and multi-objective algorithms are used to solve for the optimal dosing strategy. Finally, virtual optimization commands are sent to on-site execution equipment for automatic control, while real-world data is transmitted back for reverse iterative updates to model parameters, offsetting the accuracy degradation caused by long-term operational condition drift. The entire solution covers everything from bottom-level data perception, mid-level model construction, upper-level optimization and control to end-point closed-loop iteration. It solves four major industry pain points of traditional sewage treatment models: poor interpretability, insufficient prediction accuracy, inability to adapt to operating condition drift, and lag in manual control. This enables municipal sewage treatment plants to operate stably and intelligently in all weather, all seasons, and all changing operating conditions. Specific Implementation Example 2: This embodiment selects a municipal wastewater treatment plant with a daily treatment capacity of 20,000 m³ / d and adopting the A² / O main process as the actual application scenario. This wastewater treatment plant mainly treats urban domestic sewage and a small amount of low-concentration industrial wastewater. In daily operation, it faces practical problems such as large fluctuations in influent load between day and night, significant temperature differences between winter and summer, frequent sudden influent shock loads during the rainy season, serious waste of consumables due to manual dosing, and the lack of water quality early warning capabilities in the original monitoring system. The method and system of this invention are put into actual operation in this wastewater treatment plant. The overall application process is as follows: First, the on-site hardware integration, full-domain data collection, and digital twin modeling were completed. Based on the existing as-built drawings of the plant area, the static information of the sewage treatment plant's structures, pipelines, and on-site equipment was entered, and a digital twin 3D model that replicates the physical plant area one-to-one was built. At the same time, relying on the deployed multi-source sensors, various types of operational data such as water quality, flow rate, water temperature, and weather were collected in real time. The system automatically completed data cleaning, normalization, and time-series synchronization processing to build a standardized multi-dimensional dataset. Meanwhile, a low-latency virtual-real mapping channel was built between the physical site and the digital twin platform to achieve real-time mirror synchronization of the plant's operating conditions.

[0097] Then, relying on the same source dataset, the wastewater process mechanism model and the data-driven prediction model were built in parallel. The mechanism model that conforms to the reaction law of activated sludge process was constructed by combining the actual process parameters of the wastewater treatment plant. The equation was solved by relying on the finite volume method and the physical constraint trajectory of water quality was output. At the same time, a spatiotemporal graph structure was constructed based on the historical operation data of the plant. The spatiotemporal correlation features of the process were mined by multi-scale hybrid neural network to complete the training of the data-driven model. The two types of models were trained and converged at the same time, providing physical mechanism constraints and high-precision data fitting capabilities respectively.

[0098] Next, a hybrid driving model was constructed by deeply integrating the two models. The residuals of the differential equations generated by the mechanistic model were extracted as rigid physical constraints. The constraint weights were dynamically adjusted according to the real-time influent load. The physical residuals were embedded into the loss function of the data-driven model. Then, the parameters of the two types of models were optimized simultaneously through a bidirectional joint backpropagation algorithm. Finally, a hybrid driving model for wastewater treatment that balances physical interpretability and high prediction accuracy was obtained.

[0099] Subsequently, the trained hybrid-driven model is deployed into the digital twin platform and connected to the real-time on-site data stream to achieve multi-step advance prediction of key effluent water quality indicators for the next 6 hours. At the same time, relying on the NSGA-II multi-objective optimization algorithm, with national sewage discharge standards and the hardware range of on-site dosing equipment as dual constraints, the optimal dosing sequence for the reagents is automatically iteratively solved to adapt to the real-time operating conditions.

[0100] Subsequently, the system sends the generated optimal dosing command to the on-site PLC and dosing execution equipment to complete fully automatic unmanned closed-loop dosing control; at the same time, it continuously transmits real-time on-site operating data and calculates the model prediction residuals in real time. When the residuals exceed the system's preset threshold, it automatically triggers the model's adaptive incremental update, which can correct model drift deviations without manual intervention and ensure the long-term stability of the model's prediction accuracy.

[0101] Finally, the actual application effects of the wastewater treatment plant after long-term operation were statistically analyzed. The results showed that compared with the original traditional management and control mode of the plant, the average error of water quality prediction in this solution was significantly reduced, there were no abnormal prediction results that violated the laws of biochemical reaction of wastewater, and the risk of water quality fluctuations could be predicted in advance; the consumption of reagents throughout the plant was reduced, and the rate of stable compliance of effluent water quality was improved; at the same time, relying on digital twin visualization management and control reduced the workload of manual inspection, and with the automatic model update function, the on-site operation and maintenance costs were significantly reduced.

[0102] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a reference structure" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0103] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A wastewater treatment model construction method based on AI digital twin-driven approach, characterized in that, Includes the following steps: SP1 collects static structural data, dynamic operation data, and external environmental data of sewage treatment facilities. After completing data standardization, timestamp synchronization, and integrity verification, it integrates and generates a multi-dimensional raw data set, and establishes a virtual-real mapping relationship between physical entities and the digital twin platform. SP2, based on the multi-dimensional raw data set output by SP1, constructs a wastewater treatment process mechanism model according to the core reaction kinetics and material balance equations of the activated sludge process in wastewater treatment; SP3, based on the multi-dimensional raw data collected from SP1, uses a multi-scale hybrid neural network to perform cross-scale feature extraction and dynamic correlation modeling on the multi-dimensional raw data collected, and trains to generate a wastewater treatment data-driven prediction model. SP4. After the wastewater treatment process mechanism model and the wastewater treatment data-driven prediction model are both constructed, a physical information constrained neural network is built. The residual of the differential equation of the wastewater treatment process mechanism model is embedded into the loss function of the wastewater treatment data-driven prediction model. Through joint backpropagation driven by an adaptive joint optimization strategy, the deep fusion of the two types of models and the parameter collaborative optimization are completed to generate a wastewater treatment process mechanism and data hybrid driven model. SP4 specifically includes the following execution steps: SP4.1 Build a physical information constraint neural network adapted to the wastewater quality prediction scenario, extract the differential equation residuals output by the wastewater treatment process mechanism model, and embed the differential equation residuals as rigid physical constraints into the loss function of the wastewater treatment data-driven prediction model. SP4.2 adopts an adaptive joint optimization strategy, initiates a bidirectional joint backpropagation algorithm, and synchronously updates the internal parameters of the wastewater treatment process mechanism model and the network weights of the wastewater treatment data-driven prediction model. This step relies on industrial AI acceleration computing boards and employs a bidirectional joint backpropagation algorithm to complete the collaborative optimization of two models. The specific computational logic is as follows: Algorithm inputs: total loss function of the hybrid model, initial parameter set of the mechanistic model, initial weights of the neural network, and a fixed learning rate. =0.001; Step-by-step calculation steps: Step 1: Forward propagation: Simultaneously run the mechanistic model and the data-driven model, outputting water quality simulation results and prediction results respectively, and calculate the total loss function value; Step 2: Gradient backward solving: Solve the gradient of the total loss with respect to the mechanistic parameters and network weights respectively; Step 3: Synchronous parameter update: Based on the gradient value, synchronously iteratively update all process parameters of the mechanistic model and all weight parameters of the neural network; Step 4: Convergence judgment: If the fluctuation of the loss value is less than the threshold for 10 consecutive iterations, it is determined that the parameters of the two models have converged, and the iteration is stopped; Algorithm output: An integrated hybrid driving model with parameters co-optimized and adapted to the field conditions. This step simultaneously updates the mechanistic model parameters and neural network weights iteratively; the parameter synchronization update formula is as follows: ; in: The set of all parameters to be updated for the representative mechanism model and neural network; The learning rate represents a fixed value for the algorithm; in this scheme, it is set to 0.

001. This represents the gradient value of the total loss function. This formula is used to synchronously and iteratively update the parameters of the mechanism model and the neural network based on the gradient of the total loss, so as to realize the integrated collaborative optimization of the two models. In practical engineering applications, bidirectional synchronous backpropagation can synchronously correct the process parameters of the mechanism model and the weights of the neural network, avoid the mismatch of the two models caused by step-by-step optimization, and improve the overall stability of the hybrid model. SP4.3: Complete the deep coupling and fusion of two independent models, eliminate the inherent defects of a single model, and finally generate a wastewater treatment process mechanism and data-driven hybrid model. SP5, based on the wastewater treatment process mechanism and data hybrid driving model generated by SP4, is deployed on the digital twin platform. Real-time multi-dimensional raw data collection is input to complete multi-step prediction of influent and effluent water quality, and a multi-objective optimization algorithm is used to search for the appropriate reagent dosing sequence for the working conditions. SP6, relying on the chemical dosing sequence output by SP5, sends the chemical dosing sequence to the actuator to complete the closed-loop control on site, and at the same time transmits back the actual on-site operation data to perform residual-driven adaptive updates of the wastewater treatment process mechanism and data hybrid driven model.

2. The wastewater treatment model construction method based on AI digital twin driven according to claim 1, characterized in that, SP1 specifically includes the following execution steps: SP1.1 Collect static structural data of wastewater treatment facilities, including the geometric dimensions of the reaction tank, the configuration of the aeration system, and the layout of the sludge return pipeline; SP1.2: Dynamic operating data is collected through a multi-source sensor array, including influent flow rate, effluent flow rate, influent COD concentration, ammonia nitrogen concentration, dissolved oxygen concentration, pH value, temperature, and sludge concentration. SP1.3 Collect external environmental data, including influent temperature fluctuation data and seasonal water quality change trend data; SP1.4 performs standardized and unified processing, timestamp alignment and synchronization, and integrity verification of abnormal and missing data on the three types of collected data in sequence. It also completes the fusion of multi-source data according to the process sequence and integrates them to generate a unified and standardized multi-dimensional original collected dataset. SP1.5: Based on the collected static structural data, a digital twin 3D facility model is built. Combined with real-time dynamic operation data, the physical working conditions and the virtual model are synchronized, and a complete one-to-one virtual-real mapping relationship is established between the physical entity and the digital twin platform.

3. The wastewater treatment model construction method based on AI digital twin driven according to claim 1, characterized in that, SP2 specifically includes the following execution steps: SP2.

1. Based on the reaction kinetics formula of the activated sludge process and the water material balance equation set, a basic mathematical calculation framework for the wastewater treatment process mechanism model is built. SP2.2, break down the entire wastewater treatment process into biochemical reaction and precipitation reaction stages, build biodegradation kinetics sub-models and chemical precipitation equilibrium sub-models respectively, and calibrate the key kinetic parameters corresponding to the two types of sub-models; SP2.3 uses the finite volume method to numerically discretize and solve the material balance equation, outputting the complete water quality state simulation trajectory in the time dimension.

4. The wastewater treatment model construction method based on AI digital twin driven according to claim 1, characterized in that, SP3 specifically includes the following execution steps: SP3.1 addresses the temporal and spatial scale differences in multi-dimensional raw datasets by embedding multi-scale data nodes and constructing the relationships between upstream and downstream process units, forming a standardized spatiotemporal graph structure that can characterize the cross-scale material transfer patterns in wastewater treatment plants. SP3.2, based on the completed spatiotemporal graph structure, uses a multi-scale hybrid neural network to perform cross-scale feature extraction at the equipment operation level, process unit level, and plant-wide operation level, and mines the hidden dynamic operating condition correlations between different process units; SP3.3: Based on the extracted multi-level cross-scale correlation features, an end-to-end training link is built to complete the network iterative training until the error converges, and finally the trained wastewater treatment data-driven prediction model is obtained.

5. The wastewater treatment model construction method based on AI digital twin driven according to claim 1, characterized in that, SP5 specifically includes the following execution steps: SP5.1 deploys the fully trained and integrated wastewater treatment process mechanism and data-driven model to the backend simulation environment of the digital twin platform. SP5.2 Input real-time multi-dimensional raw data sets into the deployed wastewater treatment process mechanism and data hybrid driving model to complete multi-step time series prediction of key water quality indicators of influent and effluent at multiple future moments; SP5.3 uses wastewater discharge standards and the range of on-site reagent dosing equipment as dual constraints, and employs a multi-objective optimization algorithm to iteratively find the optimal reagent dosing sequence in a digital twin simulation environment to output the optimal reagent dosing sequence that adapts to the current real-time operating conditions.

6. The wastewater treatment model construction method based on AI digital twin driven according to claim 1, characterized in that, SP6 specifically includes the following execution steps: SP6.1 converts the optimal reagent dosing sequence output by SP5 into standard electrical control instructions that can be recognized by the on-site PLC actuator, and issues instructions to complete the automatic closed-loop control of the sewage treatment site; SP6.2 After the closed-loop control is completed, real-time data on actual water quality and equipment operating conditions at the wastewater treatment site are collected, and the predicted output values ​​of the wastewater treatment process mechanism and the data-driven model are compared to quantitatively calculate the model prediction residuals. SP6.3: A fixed residual threshold is preset. When the calculated model prediction residual exceeds the preset residual threshold, the adaptive update process is automatically started to update the wastewater treatment process mechanism and data-driven model parameters across the entire domain, ensuring the long-term prediction accuracy of the model.

7. The wastewater treatment model construction method based on AI digital twin driven according to claim 1, characterized in that, The specific steps for embedding physical constraints in SP4.1 are as follows: SP4.1.1 Extract the residual expressions of the differential equations corresponding to each key water quality state variable from the completed wastewater treatment process mechanism model; SP4.1.

2. Perform differentiable function transformation on the extracted differential equation residual expression to unify the residual output dimension and output time sequence, so as to achieve accurate alignment between the residual output result and the output result of the wastewater treatment data-driven prediction model. SP4.1.3 Dynamically configure residual weighting coefficients based on the fluctuation of influent load on site, and add the weighted residual terms of the processed differential equations to the total loss function of the wastewater treatment data-driven prediction model.

8. A wastewater treatment model construction system based on AI digital twin, characterized in that, The system is used to execute the wastewater treatment model construction method based on AI digital twin as described in claim 1, the system comprising: The data acquisition module is used to collect static structural data, dynamic operation data and external environmental data of sewage treatment facilities in SP1, and integrates them to generate a multi-dimensional raw data set after completing data standardization, timestamp synchronization and integrity verification. The digital twin modeling module is used in SP1 to establish the virtual-physical mapping relationship between physical entities and the digital twin platform; The mechanism modeling module is used to build mechanism models of wastewater treatment processes in SP2. The data-driven modeling module is used in SP3 to train and generate data-driven prediction models for wastewater treatment. The hybrid-driven model building module, used in SP4, generates a hybrid-driven model of wastewater treatment process mechanism and data. The prediction and optimization module, used in SP5, deploys a hybrid model of wastewater treatment process mechanism and data on a digital twin platform. It inputs real-time multi-dimensional raw data collection to complete multi-step prediction of influent and effluent water quality, and uses a multi-objective optimization algorithm to search for the appropriate reagent dosing sequence for the working conditions. The closed-loop control module, used in SP6, sends the reagent dosing sequence to the actuator to complete the on-site closed-loop control, and at the same time transmits back the actual on-site operating data to perform residual-driven adaptive updates of the wastewater treatment process mechanism and data hybrid driving model. The core processing module includes a processor and a memory. The memory stores computer programs that can be called and executed by the processor. The processor communicates with all modules and coordinates each module to complete data interaction and calculation tasks.

Citation Information

Patent Citations

  • Multispectral coupling intelligent water quality cooperative processing method based on digital twinning and physical fusion modeling

    CN121615561A

  • Digital twin system for power grid

    WO2025086085A1