Digital Twin-Based Dynamic Process Simulation and Prediction Method and System for Sewage Treatment

Through digital twin technology and advanced data analysis methods, the adaptability problem of traditional sewage treatment simulation technology under nonlinear changes and complex disturbances is solved, real-time dynamic simulation and accurate prediction of sewage treatment process are achieved, and the stability and operation efficiency of the system are improved.

CN120197403BActive Publication Date: 2025-07-25CHENGDU RONGLIAN HI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510682716.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-07-25
Estimated Expiration
2045-05-26

AI Technical Summary

Technical Problem

Traditional sewage treatment simulation technology is difficult to reflect nonlinear changes and complex disturbances in real time, and cannot effectively deal with frequent fluctuations and sudden pollution sources, which have poor adaptability and limited prediction accuracy.

Method used

Using digital twin technology and advanced data analysis methods, a causal path map is constructed through multi-source data acquisition, nonlinear frequency domain perturbation modeling, timing alignment and Bayesian causal inference, and pollutant concentration trend prediction is carried out by combining residual perception graph attention network, and the graph structure is adjusted through dynamic error feedback optimization model.

Benefits of technology

It realizes accurate simulation and prediction of real-time dynamic changes in the sewage treatment process, improves the stability and efficiency of the system, and provides real-time operation optimization suggestions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120197403B_ABST
    Figure CN120197403B_ABST
Patent Text Reader

Abstract

The present invention discloses a dynamic process simulation and prediction method and system for sewage treatment based on digital twin, which relates to the field of digital twin sewage treatment. By introducing digital twin technology and a simulation and prediction method based on advanced data analysis, the present invention can reflect the complex dynamic changes in the sewage treatment process in real time, overcoming the deficiencies of traditional simulation technologies in dealing with non-linear disturbances, frequent fluctuations, and sudden pollution sources. Through multi-source data collection and time series alignment, combined with non-linear frequency domain disturbance modeling, it is possible to effectively suppress the noise and disturbances in the data, improve the quality and reliability of the data, and thus provide a more accurate basis for subsequent modeling and prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of digital twin sewage treatment, and specifically to a dynamic process simulation prediction method and system for sewage treatment based on digital twin. Background Technique

[0002] Currently, the dynamic simulation technology of sewage treatment plants mainly relies on traditional mathematical modeling and computational fluid dynamics (CFD) methods. These methods simulate various dynamic behaviors in the sewage treatment process, such as water quality changes, reaction rates, flow distributions, etc., by establishing accurate physical models. Common techniques include mathematical models based on bioreactor kinetics, kinetic equations for pollutant transformation processes, and CFD simulations of sewage flow. Through these models, engineers can analyze the sewage treatment effects under different operating conditions and optimize the sewage treatment process. However, these traditional technologies usually rely on complex assumption conditions and require a large amount of computing resources and long computing times.

[0003] However, the deficiencies of the existing technologies are that it is difficult to reflect the non - linear changes and complex disturbance factors in the sewage treatment process in real time. Traditional mathematical models often cannot effectively handle complex scenarios such as frequent fluctuations, sudden pollution sources, and equipment failures in the actual sewage treatment process. In addition, the existing methods usually cannot update the treatment model in real time and cannot provide flexible coping strategies for dynamically changing sewage treatment conditions. Many traditional simulation methods rely on prior assumptions and fixed parameters, resulting in poor adaptability to the actual system. Especially when facing a changing environment and operating conditions, the prediction accuracy and response ability of the model are often limited. Summary of the Invention

[0004] The present invention proposes a dynamic process simulation prediction method and system for sewage treatment based on digital twin, aiming to simulate the migration and diffusion paths of pollutants and pre - identify system risk points by dynamically modeling key water quality parameters and control variables.

[0005] Among them, the dynamic process simulation prediction method for sewage treatment based on digital twin includes the following steps:

[0006] S1. Through multi - source data collection, establish a data matrix related to the original pollution data of the sewage treatment plant, and according to the non - linear frequency - domain perturbation modeling theory, perform unified time - series alignment and perturbation suppression on the data matrix;

[0007] S2. According to the data matrix with unified time - series alignment and perturbation suppression, construct a variable causal path graph through time - delay mutual information and Bayesian causal inference, and combine an error - driven edge - weight adaptive mechanism to output a weighted dynamic graph structure reflecting the time - varying coupling relationship between variables in the sewage treatment process;

[0008] S3. According to the weighted dynamic graph structure, construct a residual-aware graph attention network. Using the graph structure as an edge constraint and combining time series residual vectors, extract the spatio-temporal interaction relationships between variables; and based on the Fourier frequency domain, construct phase shift modulation and multi-scale residual recursion to predict the future pollutant concentration trend;

[0009] S4. According to the error term between the predicted result and the actual measurement data, through multi-dimensional residual decomposition mechanism and extraction, compare the historical actual pollutant concentration sequence with the preliminary prediction result to obtain the time series residual vector, and inversely adjust the edge weights of the weighted dynamic graph structure and the graph convolution weight parameters;

[0010] S5. Based on the finally output predicted result, combine digital twin to construct a dynamic virtual working condition mirror image to contrast the time series evolution of the real sewage treatment process.

[0011] A sewage treatment dynamic process simulation prediction system based on digital twin, which is implemented based on the sewage treatment dynamic process simulation prediction method of digital twin described in any one of the above, includes:

[0012] A multi-source data acquisition module, which is used to establish a data matrix related to the original pollution data of the sewage treatment plant through multi-source data acquisition, and according to the non-linear frequency domain perturbation modeling theory, perform unified time series alignment and perturbation suppression on the data matrix;

[0013] A causal path graph construction module, which is used to construct a variable causal path graph based on the time delay mutual information and Bayesian causal inference according to the data matrix with unified time series alignment and perturbation suppression, and combine the error-driven edge weight adaptive mechanism to output a weighted dynamic graph structure reflecting the time-varying coupling relationship between variables in the sewage treatment process;

[0014] A residual-aware graph attention modeling module, which is used to construct a residual-aware graph attention network according to the weighted dynamic graph structure, use the graph structure as an edge constraint, and combine time series residual vectors to extract the spatio-temporal interaction relationships between variables;

[0015] A spectrum prediction and multi-scale residual recursion module, which is used to construct phase shift modulation and multi-scale residual recursion based on the Fourier frequency domain to predict the future pollutant concentration trend;

[0016] A dynamic error feedback optimization module, according to the error term between the predicted result and the actual measurement data, through multi-dimensional residual decomposition mechanism and extraction, compare the historical actual pollutant concentration sequence with the preliminary prediction result to obtain the time series residual vector, and inversely adjust the edge weights of the weighted dynamic graph structure and the graph convolution weight parameters;

[0017] The digital twin virtual working condition mirroring module is used to construct a dynamic virtual working condition mirroring in combination with digital twins based on the finally output prediction results, and to compare the time-series evolution of the real sewage treatment process.

[0018] A computer-readable storage medium is used to store a computer program, which, when running on a computer, causes the computer to execute the digital-twin-based sewage treatment dynamic process simulation and prediction method as described in any one of the above.

[0019] An electronic device includes:

[0020] A memory for storing a computer program;

[0021] A processor for executing the computer program to implement the digital-twin-based sewage treatment dynamic process simulation and prediction method as described in any one of the above.

[0022] The beneficial effects of the invention are:

[0023] (1) By introducing digital twin technology and a simulation and prediction method based on advanced data analysis, the present invention can reflect the complex dynamic changes in the sewage treatment process in real time, overcoming the deficiencies of traditional simulation technologies in dealing with non-linear disturbances, frequent fluctuations, and sudden pollution sources. Through multi-source data collection and time-series alignment, combined with non-linear frequency domain disturbance modeling, it can effectively suppress the noise and disturbances in the data, improve the quality and reliability of the data, and thus provide a more accurate basis for subsequent modeling and prediction;

[0024] (2) The causal path diagram constructed by the present invention based on time-delay mutual information and Bayesian causal inference can deeply reveal the time-varying coupling relationship in the sewage treatment process, thus providing an important decision-making basis for system optimization. Through the residual-aware graph attention network, the spatio-temporal interaction relationship between variables in the sewage treatment process can be extracted, further improving the prediction accuracy.

[0025] (3) By introducing spectrum prediction and a multi-scale residual recursive module, the present invention can accurately predict the future pollutant concentration trend, providing real-time support for the dynamic adjustment and operation optimization of sewage treatment plants.

[0026] (4) Through the dynamic error feedback optimization module, the present invention can not only correct the prediction model in real time, but also reverse-adjust the graph structure and graph convolution weights to ensure that the system is always in the best operating state, significantly improving the stability and efficiency of the sewage treatment process. Description of the Drawings

[0027] Figure 1 It is the method flow chart of the digital-twin-based sewage treatment dynamic process simulation and prediction method provided by Embodiment 1 of the present invention;

[0028] Figure 2 It is a graph showing the concentration changes of the key COD pollution index for 100 time steps in the sewage treatment dynamic process simulation prediction method based on digital twin provided in Embodiment 3 of the present invention;

[0029] Figure 3 It is a graph showing the concentration changes of the key BOD pollution index for 100 time steps in the sewage treatment dynamic process simulation prediction method based on digital twin provided in Embodiment 3 of the present invention;

[0030] Figure 4 It is a graph showing the concentration changes of the key DO pollution index for 100 time steps in the sewage treatment dynamic process simulation prediction method based on digital twin provided in Embodiment 3 of the present invention;

[0031] Figure 5 It is a graph showing the concentration changes of the key NH4-N pollution index for 100 time steps in the sewage treatment dynamic process simulation prediction method based on digital twin provided in Embodiment 3 of the present invention;

[0032] Figure 6 It is a graph showing the concentration changes of the key NO3-N pollution index for 100 time steps in the sewage treatment dynamic process simulation prediction method based on digital twin provided in Embodiment 3 of the present invention. Detailed implementation manners

[0033] The technical solution of the present invention will be further described in detail below with reference to the drawings, but the protection scope of the present invention is not limited to the following.

[0034] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail in combination with the drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, and are not used to limit the present invention, that is, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Usually, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0035] Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed present invention, but only represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the protection scope of the present invention. It should be noted that relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0036] Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or apparatus comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or apparatus. Without further limitation, an element qualified by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

[0037] The features and performance of the present invention will be further described in detail below in conjunction with embodiments.

[0038] Embodiment 1

[0039] Such as Figure 1 , a dynamic process simulation prediction method for sewage treatment based on digital twin, comprising the following steps:

[0040] S1. Through multi-source data acquisition, establish a data matrix related to the original pollution data of the sewage treatment plant, and according to the non-linear frequency domain perturbation modeling theory, perform unified time series alignment and perturbation suppression on the data matrix;

[0041] S2. According to the data matrix with unified time series alignment and perturbation suppression, construct a variable causal path graph through time-delay mutual information and Bayesian causal inference, and combine an error-driven edge weight adaptive mechanism to output a weighted dynamic graph structure reflecting the time-varying coupling relationship between sewage treatment process variables;

[0042] S3. According to the weighted dynamic graph structure, construct a residual-aware graph attention network, use the graph structure as an edge constraint, combine the time series residual vector, and extract the spatio-temporal interaction relationship between variables; and based on the Fourier frequency spectrum domain, construct phase shift modulation and multi-scale residual recursion to predict the future pollutant concentration trend;

[0043] S4. According to the error term between the output prediction result and the actual measurement data, through multi-dimensional residual decomposition mechanism and extraction, compare the historical actual pollutant concentration sequence with the preliminary prediction result to obtain a time series residual vector, and reversely adjust the edge weights and graph convolution weight parameters of the weighted dynamic graph structure;

[0044] S5. Based on the finally output prediction result, combine digital twin to construct a dynamic virtual working condition mirror image to compare the time series evolution of the real sewage treatment process.

[0045] Further, the step S1 specifically includes the following sub-steps:

[0046] S101. Collect multi-dimensional variables including influent, effluent, biochemical pool, air temperature, water temperature, and aeration volume from the sewage treatment plant, and construct an initial data matrix;

[0047] S102. Extract spectral features through variational dynamic time warping and short-time Fourier transform, calculate the spectral similarity between variables in the initial data matrix, and align them through the minimum phase error;

[0048] S103. Through the empirical mode perturbation deconstruction combined with the sparse wavelet transform suppression mechanism, locate the perturbation energy of the time series signal, strip the high-frequency non-steady components, and output a data matrix that is uniformly aligned and has suppressed perturbations.

[0049] Specifically, the implementation principle processes of each sub-step in the above embodiments are as follows:

[0050] In step S101, this step integrates each key pollution index and environmental parameter into a unified original input data matrix, which serves as the basis for subsequent frequency domain alignment and perturbation suppression. The data sources have heterogeneity and asynchrony and must be standardized to the same time domain and scale. Exemplarily, use the SCADA system or IoT platform to collect data, and combine Z-score standardization and linear interpolation to complete the missing items. Further, in step S102, the short-time Fourier transform is used to decompose the multi-dimensional time series signal into a spectral form, and variational dynamic time warping is introduced to define the spectral similarity of variables and perform the minimum phase difference matching for all sequences. This step converts the non-stationary time series into the spectral space through STFT, uses the spectral similarity measure as the basis for sequence alignment, which is more robust than the traditional time domain DTW; the phase offset correction strengthens the true time series consistency between variables. Exemplarily, the spectral extraction is realized by combining librosa.stft and scipy.signal.stft in Python, FastDTW is used for DTW, and the frequency domain phase difference is solved through Hilbert transform or complex domain envelope analysis.

[0051] In step S103, for each aligned variable sequence , perform the empirical mode decomposition operation to obtain its set of intrinsic mode components: ; where, the represents the time series value of the i-th variable at time t, the represents the number of intrinsic mode functions decomposed from the i-th variable, the represents the index of the intrinsic mode function, the represents the k-th intrinsic mode function decomposed from the i-th variable, the It represents the residual trend term, which is used to represent the long-term evolution trend. Among them, the intrinsic mode functions are arranged from high frequency to low frequency, and the perturbations are mainly concentrated in the first several high-frequency intrinsic mode functions. Applying the discrete wavelet transform to each intrinsic mode function component, the sparse energy coefficient vector is obtained: ; where the represents the sparse energy coefficient vector, and the represents performing the discrete wavelet transform on the k-th intrinsic mode function decomposed from the i-th variable; performing soft threshold compression on the coefficients in each wavelet decomposition level j: ; where the represents the compressed coefficient, the represents the sign function, the represents the coefficient of the k-th intrinsic mode function of the i-th variable in the wavelet decomposition level j, the represents the perturbation suppression threshold, usually , the is the standard deviation of the coefficients of this layer, and the is the sample length. And perform the inverse transform on the compressed to reconstruct the intrinsic mode function component after the perturbation is peeled off: ; the represents the reconstructed intrinsic mode function component after the perturbation is peeled off, and the represents the after the inverse transform. Reconstruct the variable sequence after the perturbation is suppressed by reconstructing each intrinsic mode function component after the perturbation is peeled off and the residual term: ; where the represents the signal after the perturbation is suppressed, that is, the data matrix after being uniformly aligned and the perturbation is suppressed.

[0052] Furthermore, in step S103, through empirical mode perturbation deconstruction, the non-stationary signal is automatically deconstructed into intrinsic oscillation modes without preset basis functions, which is naturally adapted to the sudden perturbations or periodic noises in the contaminated data, and the perturbations are concentrated and expressed as a few high-energy coefficients through sparse wavelet transform, and the unstructured noises are removed through soft threshold compression while maintaining the low-frequency form. Its reconstruction mechanism is: retaining the trend + peeling off the perturbation + reconstructing the intrinsic mode function, so as to ensure the physical interpretability and the subsequent index analysis is not distorted.

[0053] Furthermore, step S2 specifically includes the following sub-steps:

[0054] S201. Calculate the maximum information lag point between each pair of variables;

[0055] S202. Perform structure learning through the variational Bayesian network under the time-delay information constraint to obtain the initial causal graph;

[0056] S203. Set the initial residual, use the initial residual as the edge weight optimization driver, and perform reverse adjustment on the edge weights of the variable causal path to form a dynamic graph structure;

[0057] S204. Construct and output the variable causal path graph as the structural edge constraint in the graph attention network, where the nodes are variables, the edges are causal paths, and the edge weights reflect the coupling strength.

[0058] Specifically, the implementation principle processes of the respective sub-steps in the above embodiments are as follows:

[0059] In step S201, first, it is necessary to define the mutual information function: ; where the represents the mutual information intensity function, which is used to evaluate the dependence of variable and , the represents the value of variable i at time , is the lag time, the represents the value of variable j at time t, the represents the joint probability density estimation, which is obtained by using the kernel density or histogram method; combined with the mutual information function, through the maximum mutual information lag analysis, identify the maximum information transfer delay point between variables in the time dimension , providing a time constraint for causal structure learning, the represents the lag point at which variable makes the maximum information contribution to variable . Exemplarily, when there are two variables, the water temperature variable and the algae concentration variable , through the maximum mutual information lag analysis, it is calculated that , which indicates that the influence of water temperature on algae concentration most significantly appears 3 time units later, that is, on the 3rd day (or hour) after the water temperature change, the algae concentration will be significantly affected.

[0060] Further, in step S202, under the constraint of the obtained lag point , construct a time-delay constrained Bayesian network structure learning model, and construct an initial causal graph through this time-delay constrained Bayesian network structure learning model, where . In order to learn the structure under the time-delay constraint, the goal is set to maximize the log-likelihood function given the data matrix and the causal graph structure, and the posterior distribution is approximately solved through variational inference. In order to introduce the time-delay information into the model, we adjust the conditional probability distribution so that it takes into account the lag dependence, that is, the state of the variable is not only related to the value of its parent node at the current moment, but also related to the value of its parent node at the delayed time step is related to the value at, specifically: Let each edge satisfy the lagged dependence relationship: , and its dependence relationship is: the set of parent nodes of each parent node , must pass through the value after lag. Among them, the represents the initial causal graph structure, the represents the set composed of all variable nodes, the represents the set of initial causal edges, and each of its edges reflects an existing causal path, the represents the variable 's set of parent variables.

[0061] In a traditional Bayesian network, it is assumed that the conditional dependence between variables is immediate, that is, the influence of each variable on other variables occurs at the same time point. However, in the field of sewage treatment and monitoring, the dependence relationship between variables is usually not immediate. For example, there may be a certain time lag in the change of pollutant concentration in water bodies, the process of chemical reactions, and the operation status of sewage treatment facilities. Suppose the ammonia nitrogen concentration and chemical oxygen demand in water are monitored during sewage treatment. When a certain chemical substance is added or the operation parameters of the treatment facility are adjusted, the impact of these changes on water quality will not be immediately reflected, but will only appear after a certain time lag. This lagged dependence relationship will affect subsequent sewage treatment control decisions. In order to more accurately capture this lag effect, time lag information is introduced into the Bayesian network. Exemplarily, if there is a variable representing the measured value of ammonia nitrogen concentration at time t, and another variable representing the measured value of COD concentration at time t, then the influence of ammonia nitrogen concentration on COD concentration can be described by introducing a time lag relationship. The time lag information can be modeled through the maximum information lag point , indicating that the influence of ammonia nitrogen concentration on COD concentration is delayed in time. In this case, a causal model reflecting the actual dynamic behavior of the sewage treatment system is established through time lag constraints, rather than simply assuming that the influence between variables is immediate.

[0062] For variational inference, in the field of sewage, especially when dealing with complex water quality monitoring data, it faces the non-linear dependence relationships among a large number of variables (such as the concentrations of different pollutants, environmental parameters, etc.). Using traditional methods to infer Bayesian networks, the calculation process is usually very complex, especially in the case of high-dimensional data and complex causal structures, which makes the inference process may become infeasible. Therefore, we use the variational Bayesian inference method to improve the inference efficiency. Specifically, variational inference approximates the posterior distribution by introducing a variational distribution. The purpose of variational inference is to extract the most informative part from high-dimensional data and reduce the demand for computing resources. Through the above implementation, the causal relationships among pollutants can be quickly inferred from a large amount of water quality data, and the optimal parameters of each causal path can be obtained.

[0063] Furthermore, in steps S203 - S204, in the update of the dynamic graph structure, the initial residual is used as the optimization driver to inversely adjust the edge weights. As the edge weights are inversely adjusted, the causal path graph will gradually become a dynamic graph, that is, as time progresses, the structure and edge weights of the graph are continuously optimized and adjusted according to the updated data. Specifically, first, the edge weights are initialized. According to the conditional probability of each causal edge, the initial residual is calculated, and the edge weights are adjusted through the backpropagation algorithm and the least squares method. The generated causal path graph will be used as the structural constraint in the graph attention network (GAT).

[0064] Furthermore, in step S203, in the absence of a prior prediction model, the state fitting residual or the baseline difference is used as the initial residual.

[0065] Furthermore, in step S203, the edge weights are specifically set as the following weighting function:

[0066] ;

[0067] where, the represents the initial edge weight between node and node , the , and represent the contributions of the control mutual information to the initial edge weight, the contribution of the control causal score to the initial edge weight, and the contribution of the control initial residual to the initial edge weight respectively. The represents the initial residual, and the represents the control causal score.

[0068] Furthermore, step S3 specifically includes the following sub-steps:

[0069] S301. Based on the weighted dynamic graph structure, use it as the adjacency constraint of the graph neural network, introduce the time series residual vector as the information modulation factor between nodes, and perform weighted modeling on the spatio-temporal dependence relationship between cross-nodes through the graph attention mechanism to form a residual-aware graph convolutional attention network structure;

[0070] S302. At each prediction time step, extract the historical observation values, timestamps, and temporal attributes of weather parameters of the pollutant, construct a multi-dimensional pollution state vector, and map the multi-dimensional pollution state vector to node time feature embeddings through the time window embedding strategy; combine the graph attention encoding of the nodes to jointly represent the pollution state context information under dynamic changes;

[0071] S303. Convert the graph attention output result to the frequency domain, extract the dominant frequency components through the fast Fourier transform, and perform residual offset adjustment on its phase characteristics; construct a multi-scale recursive structure under time windows of multiple scales, perform dynamic feedback and correction on the prediction error, and fuse the residual information at different scales;

[0072] S304. Through the graph attention model optimized by frequency domain correction and residual recursive iteration, output the concentration prediction sequence of the target pollutant in the future continuous time period.

[0073] Further, in step S301, the time series residual vector is a dynamically iteratively updated residual vector. When initially constructing the graph convolutional attention network structure, introduce the historical residual vector as the initial time series residual vector. After obtaining the time series residual vector in step S4, update the initial time series residual vector to the time series residual vector obtained in step S4, and iteratively update the graph structure and attention parameters.

[0074] Further, step S4 specifically includes the following sub-steps:

[0075] S401. According to the concentration prediction sequence, perform multi-scale frequency domain deconstruction on the concentration prediction sequence through wavelet packet decomposition, and calculate the entropy weight of the influence of the residual of each frequency band on the system structure;

[0076] S402. Map the multi-frequency residual signal to the original graph structure and update the edge weights in the original causal graph;

[0077] S403. Use the residual to perform gradient backpropagation adjustment on the graph convolution parameters.

[0078] Specifically, the implementation principle processes of the above-mentioned sub-steps in the embodiment are as follows:

[0079] In steps S401 - S403, the concentration prediction sequence (i.e., the predicted values of a certain target variable over a period of time in the future) is decomposed by wavelet packet decomposition, and the signal is divided into multiple frequency sub - band signals (low - frequency trend + high - frequency oscillation). For each sub - band, its frequency - band residual signal (true value - predicted value) is calculated, and then based on the entropy weight method, the weight of each frequency - band residual for correcting the system causal structure is calculated, that is: , where represents the residual after correcting the initial residual, represents the graph structure adjustment coefficient, represents the entropy weight of frequency band k, represents the mean value of the frequency - band residual. Further, the frequency - band residual entropy weight result is fed back to the original causal graph structure, and the edge weights of each causal edge are readjusted in a frequency - domain weighted manner to form a more dynamic and refined coupling structure. In the actual use process, when the residual of a certain frequency band is prominent at node , it means that the input independent variable at this frequency level is insufficient, and its edge weight needs to be strengthened. Further, the multi - frequency residual signal is used in the training stage of the graph neural network. As part of the backpropagation of the residual loss, the weights of the graph convolutional layer are corrected by gradient to improve the causal prediction ability.

[0080] Further, step S5 specifically includes the following sub - steps:

[0081] S501. Construct a virtual state space that can evolve over time with the concentration prediction sequence of the future pollutant concentration trend, the weighted dynamic graph structure, and the historical state embedding vector.

[0082] S502. In the virtual state space, according to the change trend of the edge weights of the weighted dynamic graph structure, simulate the non - linear transfer path between key variables and establish a multi - dimensional state evolution curve of pollution diffusion.

[0083] S503. By comparing the evolved concentration prediction sequence in the virtual state space with the historical evolution trajectory, identify potential abnormal perturbations, system instability signals, and key threshold change points, and output risk warning labels.

[0084] Further, in step S503, the specific process of identifying potential abnormal perturbations, system instability signals, and key threshold change points includes the following sub - steps:

[0085] Define a perturbation index function and a perturbation threshold, compare the concentration prediction sequence with the historical evolution trajectory, and calculate the residual vector at each moment; perform multi - scale wavelet analysis on the residual sequence. When the perturbation index function is greater than the perturbation threshold, it is identified as a perturbation abnormal point.

[0086] Define the edge weight fluctuation threshold, monitor the temporal change rate of edge weights in the weighted dynamic graph. When the edge weight fluctuation between core variables in the graph structure is greater than the edge weight fluctuation threshold, it is identified as a system instability signal point. And define the distribution entropy fluctuation threshold. Extract the attention matrix at each time step from the graph attention network, calculate the corresponding entropy value, and obtain the attention distribution entropy. When the attention distribution entropy fluctuates and the fluctuation impact is greater than the distribution entropy fluctuation threshold, it indicates a sudden change in the system's focus of attention, that is, potential instability of the system.

[0087] Construct the dynamic upper and lower limit prediction intervals for each type of pollutant or variable. Combine historical extreme values and predicted ranges. When the predicted value continuously crosses the interval boundary, it is a critical threshold breakthrough point.

[0088] Further, in step S503, after outputting the risk warning label, map the virtual state space to the control port of the digital twin, simulate the automatic adjustment response through control instructions. The control instructions include aeration rate adjustment and chemical dosing optimization working condition strategies, and render the dynamic evolution process of the prediction result, disturbance feedback path, and adjustment strategy response in real time in the twin. Use the constructed virtual working condition mirror as the input to the simulation platform.

[0089] Embodiment 2

[0090] As a preferred implementation manner of the above embodiment, a sewage treatment dynamic process simulation prediction system based on digital twin is proposed. This system is implemented based on the digital twin sewage treatment dynamic process simulation prediction method described in any one of the above, and includes:

[0091] A multi-source data acquisition module, used to establish a data matrix related to the original pollution data of the sewage treatment plant through multi-source data acquisition, and perform unified temporal alignment and disturbance suppression on the data matrix according to the non-linear frequency domain disturbance modeling theory.

[0092] A causal path graph construction module, used to construct a variable causal path graph based on the unified temporal alignment and disturbance-suppressed data matrix through time-delay mutual information and Bayesian causal reasoning, and output a weighted dynamic graph structure reflecting the time-varying coupling relationship between sewage treatment process variables in combination with an error-driven edge weight adaptive mechanism.

[0093] A residual-aware graph attention modeling module, used to construct a residual-aware graph attention network based on the weighted dynamic graph structure, use the graph structure as an edge constraint, and combine time series residual vectors to extract the spatio-temporal interaction relationship between variables.

[0094] A frequency spectrum prediction and multi-scale residual recursion module, used to construct phase shift modulation and multi-scale residual recursion in the Fourier frequency spectrum domain to predict the future pollutant concentration trend.

[0095] The dynamic error feedback optimization module compares the historical actual pollutant concentration sequence with the preliminary prediction result according to the error term between the output prediction result and the actual measurement data, obtains the time series residual vector through multi-dimensional residual decomposition mechanism and extraction, and reversely adjusts the edge weights and graph convolution weight parameters of the weighted dynamic graph structure;

[0096] The digital twin virtual working condition mirroring module is used to construct a dynamic virtual working condition mirroring based on the finally output prediction result in combination with digital twin, and conduct a comparison on the time series evolution of the real sewage treatment process.

[0097] Furthermore, the multi-source data includes influent, effluent, biochemical tank, air temperature, water temperature, and aeration volume.

[0098] Furthermore, the digital twin virtual working condition mirroring module specifically further includes:

[0099] The virtual state space construction unit is used to construct a virtual state space that can evolve over time by combining the concentration prediction sequence of the future pollutant concentration trend, the weighted dynamic graph structure, and the historical state embedding vector;

[0100] The multi-dimensional state evolution curve establishment unit is used to simulate the non-linear transfer path between key variables and establish a multi-dimensional state evolution curve of pollution diffusion in the virtual state space according to the change trend of the edge weights of the weighted dynamic graph structure;

[0101] The risk identification and early warning unit is used to compare the evolving concentration prediction sequence in the virtual state space with the historical evolution trajectory, identify potential abnormal disturbances, system instability signals, and key threshold change points, and output risk warning labels.

[0102] Furthermore, in the risk identification and early warning unit, the identification of potential abnormal disturbances, system instability signals, and key threshold change points is specifically implemented through the following sub-units:

[0103] The potential abnormal disturbance identification sub-unit is used to define a disturbance index function and a disturbance threshold, compare the concentration prediction sequence with the historical evolution trajectory, and calculate the residual vector at each moment; conduct multi-scale wavelet analysis on the residual sequence, and when the disturbance index function is greater than the disturbance threshold, identify it as a disturbance abnormal point;

[0104] The system instability signal identification sub-unit is used to define an edge weight fluctuation threshold, monitor the time series change rate of the edge weights in the weighted dynamic graph, and when the edge weight fluctuation between the core variables in the graph structure is greater than the edge weight fluctuation threshold, identify it as a system instability signal point; and define a distribution entropy fluctuation threshold, extract the attention matrix at each time step from the graph attention network, calculate the corresponding entropy value, and obtain the attention distribution entropy. When the attention distribution entropy fluctuates and the fluctuation impact is greater than the distribution entropy fluctuation threshold, it indicates that the focus of system attention has mutated, that is, the system is potentially unstable;

[0105] A key threshold change point recognition subunit, which is used to construct a dynamic upper and lower limit prediction interval for each type of pollutant or variable. Combining historical extreme values and predicted ranges, when the predicted value continuously crosses the interval boundary, it is the key threshold breakthrough point.

[0106] Specifically, the implementation principle process of the above system is as follows:

[0107] First, the multi-source data acquisition module obtains the index information of multiple links in the sewage treatment process, including influent water quality (such as COD, ammonia nitrogen, total nitrogen, etc.), effluent indexes, biochemical pool operation status parameters (such as DO, MLSS, aeration volume), and environmental data (such as temperature, water temperature), and constructs an original pollution data matrix. In order to eliminate the disturbance effects caused by sensor asynchronization, process fluctuations, etc., the system performs unified time series alignment and disturbance suppression on the above data based on the non-linear frequency domain disturbance modeling theory to ensure the consistency and availability of the data.

[0108] Subsequently, the system constructs a variable causal path diagram by means of time-delay mutual information and Bayesian causal inference, extracts the delayed coupling structure between each pollutant and process variable, and constructs an initial dynamic diagram. At the same time, through an error-driven edge weight adaptive mechanism, the prediction residual is fed back into the diagram structure to dynamically correct the edge weight value, so that the diagram structure can dynamically express the change of variable coupling strength in different sewage treatment stages. For example, when the influent is at a high load, the weight update of the path between dissolved oxygen and ammonia nitrogen is strengthened. The residual-aware graph attention modeling module establishes a graph attention network on this dynamic graph structure, embeds the prediction residual as a disturbance signal, and is used to capture the high-order non-linear interaction patterns between variables, especially effective in complex paths such as denitrification jumps or aeration disturbances in biochemical treatment.

[0109] In terms of concentration prediction, the system introduces Fourier spectrum analysis and phase shift modulation, establishes a multi-scale residual recursion mechanism, analyzes the periodic fluctuations of pollutant trends in the frequency domain, and improves the adaptability of the prediction model to short-term mutations and long-term drifts of pollutant concentrations. On this basis, the dynamic error feedback optimization module uses the error between the actual measurement data and the prediction output, performs wavelet packet residual decomposition, and reversely adjusts the edge weights of the dynamic graph structure and the parameters of the graph neural network to keep the system continuous and stable in prediction.

[0110] Based on the predicted concentration sequence, dynamic map, and historical state vector, the system constructs a dynamic virtual operating condition mirror, simulates the diffusion and transfer path of key pollutants and the variable response chain in the process flow in the virtual state space, and establishes a multi-dimensional state evolution curve of pollutants. By analyzing the deviation trend between the predicted sequence and the historical evolution trajectory in the operating condition mirror, the system realizes the automatic identification and risk warning of abnormal disturbances (such as instantaneous overload of influent COD), system instability signals (such as sudden change of edge weights between core variables), and key threshold change points (such as continuous exceeding of effluent TP standard), thereby providing high-frequency, refined, and intervenable intelligent decision-making basis for the sewage treatment plant.

[0111] Embodiment 3

[0112] Based on Embodiment 1, there is a multi-source sewage treatment data application scenario, which adopts the digital twin-based sewage treatment dynamic process simulation and prediction method and system described in the above embodiments, such as Figures 2 - 6 , which simulates the changes of five key pollution indicators, namely COD, BOD, DO, NH4-N, and NO3-N, over 100 time steps. The data incorporates normal disturbances and non-linear frequency fluctuations, reflecting the characteristics of non-linear frequency domain disturbances. The specific implementation method is as follows:

[0113] Through the multi-source data acquisition module, pollutant concentration data is obtained from different monitoring devices and sensors in the sewage treatment plant, and parameters such as influent, effluent, biochemical pool water quality, air temperature, water temperature, and aeration volume are collected. The data collection time is 100 time steps, covering the concentration changes of five key pollutants, namely COD, BOD, DO, NH4-N, and NO3-N. Due to the existence of normal disturbances and non-linear frequency fluctuations in the data collection process, the non-linear frequency domain disturbance modeling theory is used to perform unified time series alignment and disturbance suppression on the data. Since the sampling times and sampling frequencies of the concentrations of different pollutants are different, the data at different time points are aligned in a unified time series to ensure that the data of each variable at each time step corresponds. The non-linear frequency domain disturbance modeling is applied, and through frequency domain filtering and signal denoising techniques, unnecessary high-frequency noise and fluctuations are eliminated to obtain a smoother data matrix.

[0114] Based on the data matrix after perturbation suppression and time series alignment, the time-delay mutual information and Bayesian causal inference techniques are used to construct a causal path diagram between pollutants. In this process, the time-delay mutual information is used to evaluate the lag relationship between different pollutants (such as the time-delay relationship between COD and NH4-N), and the Bayesian causal inference is used to mine the causal dependence relationship between variables. Combining the time-delay characteristics of the data, a causal path diagram reflecting the concentration changes of each pollutant is established. For each pair of variables (such as COD and NH4-N), the time-delay mutual information between them is calculated to obtain the time-delay information between pollutants, which helps to reveal the causal relationship between pollutants. According to the results of the time-delay mutual information, the Bayesian inference algorithm is combined to determine the causal relationship between variables, and a preliminary causal path diagram is constructed. Each node in the diagram represents a variable, each edge represents the causal relationship between two variables, and the weight of the edge represents the coupling strength between variables. An error-driven edge weight adaptive mechanism is adopted to update the edge weights in the diagram by backpropagation and adjusting the edge weights, reflecting the time-varying coupling relationship between variables in the sewage treatment process. For example, when the aeration volume changes, the graph structure will automatically adjust the weight between DO and NH4-N.

[0115] According to the weighted dynamic graph structure, a residual-aware graph attention network is constructed. The graph attention network further strengthens the model's attention to important variables and key time series by applying attention weights to the nodes and edges in the graph, and automatically mines the spatio-temporal interaction relationships between different pollutants. By combining the time series residual vector, the network can learn and capture these complex non-linear interaction patterns, and then predict the future trend of pollutant concentration. The combination of the Fourier frequency domain and phase shift modulation introduces frequency domain feature analysis into the system, which can more effectively extract the periodic change patterns of pollutant concentration. It is used to cope with emergencies (instantaneous changes in the concentration of influent pollutants). Through the multi-scale residual recurrence mechanism, the system makes long-term and cross-time scale predictions of the pollutant concentration trend.

[0116] The error term between the prediction result and the actual measurement data is processed by the multi-dimensional residual decomposition mechanism. The historical pollutant concentration sequence is compared with the preliminary prediction result, the time series residual vector is calculated, and the edge weights and graph convolution weight parameters of the weighted dynamic graph structure are adjusted backward. The core of this process is to dynamically optimize the graph convolution network structure through error feedback, so that the result of each prediction can be closer to the actual pollutant concentration value, enhancing the robustness and accuracy of the system. Through wavelet packet analysis or other signal decomposition methods, the high-frequency noise and low-frequency trend components in the residual are disassembled and adjusted respectively to optimize the prediction accuracy of the model.

[0117] Based on the final prediction result of the system, a dynamic virtual working condition mirror of the sewage treatment plant is constructed through digital twin technology. This virtual mirror can simulate various dynamic changes in the actual sewage treatment process, forming a virtual state space. In this space, combined with the weighted dynamic graph structure, the diffusion path of pollutants and the non-linear transfer relationship between key variables are simulated. The virtual working condition mirror will serve as an important decision-making support tool to help operators monitor the changes of key indicators in the sewage treatment process in real time and identify potential abnormal disturbances or system instability signals. For example, when the concentration of a certain pollutant in the virtual mirror exceeds a predetermined threshold, the system will automatically identify the abnormal disturbance and trigger an alarm. By comparing the historical evolution trajectory with the current prediction result, the system can early warn of possible problems such as pollution diffusion and equipment failures, providing timely decision-making support for the sewage treatment plant.

[0118] Embodiment 4

[0119] Based on Embodiment 1, this embodiment proposes a terminal device for dynamic process simulation and prediction of sewage treatment based on digital twin. The terminal device includes at least one memory, at least one processor, and a bus connecting different platform systems.

[0120] The memory may include a readable medium in the form of volatile memory, such as RAM and / or cache memory, and may further include ROM.

[0121] Among them, the memory also stores a computer program, which can be executed by the processor, so that the processor executes any one of the above-mentioned methods for dynamic process simulation and prediction of sewage treatment based on digital twin in the embodiments of the present application. The specific implementation manner is consistent with the implementation manner and the achieved technical effects recorded in the embodiments of the above methods, and some contents will not be repeated. The memory may also include a program / utilities having a set (at least one) of program modules. Such program modules include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.

[0122] Correspondingly, the processor can execute the above computer program and can also execute the program / utilities.

[0123] The bus may represent one or more of several types of bus structures, including a memory bus or a memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any bus structure in a variety of bus structures.

[0124] The terminal device can also communicate with one or more external devices such as a keyboard, a pointing device, a Bluetooth device, etc., and can also communicate with one or more devices capable of interacting with the terminal device, and / or communicate with any device (such as a router, a modem, etc.) that enables the terminal device to communicate with one or more other computing devices. Such communication can be carried out through the I / O interface. Moreover, the terminal device can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter. The network adapter can communicate with other modules of the terminal device through a bus. It should be understood that although not shown in the figure, other hardware and / or software modules can be used in combination with the terminal device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, etc.

[0125] Embodiment 5

[0126] Based on Embodiment 1, this embodiment proposes a computer-readable storage medium for the dynamic process simulation and prediction of sewage treatment based on digital twin. Instructions are stored on the computer-readable storage medium, and when the instructions are executed by a processor, the above-mentioned dynamic process simulation and prediction method of sewage treatment based on digital twin is realized. Its specific implementation manner is consistent with the implementation manner and the achieved technical effects described in the embodiments of the above method, and some contents will not be elaborated.

[0127] This embodiment provides a program product for implementing the above method. It can adopt a portable compact disc read-only memory (CD-ROM) and includes program code, and can run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited to this. In this embodiment, the readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. The program product can adopt any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0128] A computer-readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, in which the readable program code is carried. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable storage medium may also be any readable medium other than the computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the above. The program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, executed as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device.

[0129] The above are only the preferred embodiments of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein, should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications, and environments, and can be changed through the above teachings within the scope of the concept described herein. And any changes and variations made by those skilled in the art without departing from the spirit and scope of the present invention shall fall within the protection scope of the appended claims of the present invention.

Claims

1. A sewage treatment dynamic process simulation and prediction method based on digital twin, characterized in that, It includes the following steps: S1. Through multi-source data acquisition, establish a data matrix related to the original pollution data of the sewage treatment plant, and according to the non-linear frequency domain perturbation modeling theory, perform unified time series alignment and perturbation suppression on the data matrix; S2. According to the data matrix with unified time series alignment and perturbation suppression, construct a variable causal path graph through time-delay mutual information and Bayesian causal inference, and combine an error-driven edge weight adaptive mechanism to output a weighted dynamic graph structure reflecting the time-varying coupling relationship between sewage treatment process variables; S3. According to the weighted dynamic graph structure, construct a residual-aware graph attention network, use the graph structure as an edge constraint, combine with the time series residual vector to extract the spatio-temporal interaction relationship between variables; and construct phase shift modulation and multi-scale residual recursion based on the Fourier frequency spectrum domain to predict the future pollutant concentration trend; S4. According to the error term between the output prediction result and the actual measurement data, through multi-dimensional residual decomposition mechanism and extraction, compare the historical actual pollutant concentration sequence with the preliminary prediction result to obtain a time series residual vector, and reversely adjust the edge weights of the weighted dynamic graph structure and the graph convolution weight parameters; S5. Based on the finally output prediction result, combine digital twin to construct a dynamic virtual working condition mirror image to compare the time series evolution of the real sewage treatment process.

2. The dynamic process simulation and prediction method for sewage treatment based on digital twin according to claim 1, characterized in that, The specific steps of step S1 include the following sub-steps: S101. Collect multi-dimensional variables including influent, effluent, biochemical pool, air temperature, water temperature and aeration volume from the sewage treatment plant to construct an initial data matrix; S102. Extract spectral features through variational dynamic time warping and short-time Fourier transform, calculate the spectral similarity between variables in the initial data matrix, and perform alignment through the minimum phase error; S103. Through the empirical mode perturbation deconstruction combined with the sparse wavelet transform suppression mechanism, locate the perturbation energy of the time series signal, strip the high-frequency non-steady components, and output a data matrix with unified alignment and suppressed perturbation.

3. The dynamic process simulation and prediction method for sewage treatment based on digital twin according to claim 1, wherein, The specific steps of step S2 include the following sub-steps: S201. Calculate the maximum information lag point between each pair of variables; S202. Perform structure learning through a variational Bayesian network under the constraint of time-delay mutual information to obtain an initial causal graph; S203. Set an initial residual, use the initial residual as the driving force for edge weight optimization, reversely adjust the edge weights of the variable causal path, and form a dynamic graph structure; S204. Construct and output a variable causal path graph as the structural edge constraint in the graph attention network, where the nodes are variables, the edges are causal paths, and the edge weights reflect the coupling strength.

4. The dynamic process simulation and prediction method for sewage treatment based on digital twin according to claim 3, characterized in that In step S203, in the absence of a prior prediction model, the state fitting residual or baseline difference is used as the initial residual.

5. The dynamic process simulation and prediction method for sewage treatment based on digital twin according to claim 3, characterized in that, In step S203, the edge weight is specifically set as the following weighted function: ; Among them, the represents the initial edge weight between nodes and node . The , and respectively represent the contributions of the control time-delay mutual information to the initial edge weight, the contribution of the control causality score to the initial edge weight, and the contribution of the control initial residual to the initial edge weight. The represents the initial residual, and the represents the control causality score.

6. The dynamic process simulation prediction method for sewage treatment based on digital twin according to claim 1, wherein The specific steps of step S3 include the following sub-steps: S301. Based on the weighted dynamic graph structure, use it as the adjacency constraint of the graph neural network, introduce the time series residual vector as the information modulation factor between nodes, and perform weighted modeling on the spatio-temporal dependence relationship between cross-nodes through the graph attention mechanism to form a residual-aware graph convolution attention network structure; S302. At each prediction time step, extract the historical observations, timestamps, and temporal attributes of weather parameters of pollutants, construct a multi-dimensional pollution state vector, and map the multi-dimensional pollution state vector to node temporal feature embeddings through a time window embedding strategy; combine the graph attention encoding of nodes to jointly represent the pollution state context information under dynamic changes; S303. Convert the graph attention output result to the frequency domain, extract the dominant frequency components through the fast Fourier transform, and perform residual offset adjustment on its phase features; Under time windows of multiple scales, construct a multi-scale recursive structure to dynamically feedback and correct the prediction error, and fuse the residual information at different scales; S304. Through the graph attention model optimized by frequency domain correction and residual recursive iteration, output the concentration prediction sequence of the target pollutant in the future continuous time period.

7. The dynamic process simulation and prediction method for sewage treatment based on digital twin according to claim 6, characterized in that, In step S301, the time series residual vector is a dynamically iteratively updated residual vector. When initially constructing the graph convolutional attention network structure, introduce the historical residual vector as the initial time series residual vector. When the time series residual vector is obtained in step S4, update the initial time series residual vector to the time series residual vector obtained in step S4, and iteratively update the graph structure and attention parameters.

8. The dynamic process simulation prediction method for sewage treatment based on digital twin according to claim 1, wherein, Step S4 specifically includes the following sub-steps: S401. According to the concentration prediction sequence, perform multi-scale frequency domain deconstruction on the concentration prediction sequence through wavelet packet decomposition, and calculate the entropy weight of the influence of the residual of each frequency band on the system structure; S402. Map the multi-frequency residual signal to the original graph structure and update the edge weights in the original causal graph; S403. Use the residual to perform gradient backpropagation adjustment on the graph convolutional parameters.

9. The dynamic process simulation and prediction method for sewage treatment based on digital twin according to claim 1, characterized in that Step S5 specifically includes the following sub-steps: S501. Construct a virtual state space that evolves over time with the concentration prediction sequence of the future pollutant concentration trend, the weighted dynamic graph structure, and the historical state embedding vector; S502. In the virtual state space, based on the changing trend of the edge weights of the weighted dynamic graph structure, simulate the non-linear transfer path between key variables, and establish a multi-dimensional state evolution curve of pollution diffusion; S503. Compare the concentration prediction sequence evolving in the virtual state space with the historical evolution trajectory to identify potential abnormal perturbations, system instability signals, and key threshold change points, and output risk warning labels.

10. The dynamic process simulation and prediction method for sewage treatment based on digital twin according to claim 9, characterized in that, In step S503, the specific process of identifying potential abnormal perturbations, system instability signals, and key threshold change points includes the following sub-steps: Define a perturbation index function and a perturbation threshold, compare the concentration prediction sequence with the historical evolution trajectory, and calculate the residual vector at each moment; perform multi-scale wavelet analysis on the residual sequence. When the perturbation index function is greater than the perturbation threshold, identify it as a perturbation abnormal point; Define an edge weight fluctuation threshold, monitor the temporal change rate of the edge weights in the weighted dynamic graph. When the edge weight fluctuation between the core variables in the graph structure is greater than the edge weight fluctuation threshold, identify it as a system instability signal point; Define the distribution entropy fluctuation threshold, extract the attention matrix at each time step from the graph attention network, calculate the corresponding entropy value, and obtain the attention distribution entropy. When the attention distribution entropy fluctuates and the fluctuation impact is greater than the distribution entropy fluctuation threshold, it indicates a sudden change in the system's focus of attention, that is, the system is potentially unstable. Construct the dynamic upper and lower limit prediction intervals for each type of pollutant or variable, and combine the historical extreme values and the predicted range. When the predicted value continuously crosses the interval boundary, it is the critical threshold breakthrough point.

11. The dynamic process simulation prediction method for sewage treatment based on digital twin according to claim 9, characterized in that, In step S503, after the output of the risk warning label, map the virtual state space to the control port of the digital twin, simulate the automatic adjustment response through control instructions, where the control instructions include the adjustment of the aeration rate and the optimization of the chemical dosage working condition strategy, and render the dynamic evolution process of the prediction result, the disturbance feedback path, and the adjustment strategy response in real time in the twin, and use the constructed virtual working condition mirror image as the input of the simulation platform.

12. A sewage treatment dynamic process simulation and prediction system based on digital twins, which is implemented based on the sewage treatment dynamic process simulation and prediction method of digital twins described in any one of claims 1-11, and is characterized in that, Including: The multi-source data acquisition module is used to establish a data matrix related to the original pollution data of the sewage treatment plant through multi-source data acquisition, and perform unified time series alignment and disturbance suppression on the data matrix according to the non-linear frequency domain disturbance modeling theory. The causal path graph construction module is used to construct a variable causal path graph based on the unified time series alignment and disturbance-suppressed data matrix through time-delay mutual information and Bayesian causal inference, and output a weighted dynamic graph structure reflecting the time-varying coupling relationship between the sewage treatment process variables in combination with the error-driven edge weight adaptive mechanism. The residual-aware graph attention modeling module is used to construct a residual-aware graph attention network based on the weighted dynamic graph structure, use the graph structure as an edge constraint, and combine the time series residual vector to extract the spatio-temporal interaction relationship between variables. The spectrum prediction and multi-scale residual recursion module is used to construct phase shift modulation and multi-scale residual recursion in the Fourier spectrum domain to predict the future pollutant concentration trend. The dynamic error feedback optimization module, according to the error term between the output prediction result and the actual measurement data, compares the historical actual pollutant concentration sequence with the preliminary prediction result through the multi-dimensional residual decomposition mechanism and extraction to obtain the time series residual vector, and reversely adjusts the edge weights of the weighted dynamic graph structure and the graph convolution weight parameters. The digital twin virtual working condition mirror image module is used to construct a dynamic virtual working condition mirror image in combination with the digital twin based on the finally output prediction result to compare the time series evolution of the real sewage treatment process.

13. The digital twin-based sewage treatment dynamic process simulation and prediction system according to claim 12, wherein The multi-source data includes influent, effluent, biochemical pool, air temperature, water temperature, and aeration volume.

14. The digital-twin-based sewage treatment dynamic process simulation and prediction system according to claim 12, wherein The digital twin virtual working condition mirror image module specifically further includes: The virtual state space construction unit is used to construct a virtual state space that can evolve over time from the concentration prediction sequence of the future pollutant concentration trend, the weighted dynamic graph structure, and the historical state embedding vector. The multi-dimensional state evolution curve establishment unit is used to simulate the non-linear transfer path between key variables and establish a multi-dimensional state evolution curve of pollution diffusion in the virtual state space according to the change trend of the edge weights of the weighted dynamic graph structure. The risk identification and early warning unit is used to compare the evolving concentration prediction sequence in the virtual state space with the historical evolution trajectory, identify potential abnormal perturbations, system instability signals, and key threshold change points, and output risk warning labels.

15. The digital twin-based sewage treatment dynamic process simulation and prediction system according to claim 14, wherein In the risk identification and early warning unit, the identification of potential abnormal perturbations, system instability signals, and key threshold change points is specifically implemented through the following sub-units: The potential abnormal perturbation identification sub-unit is used to define a perturbation index function and a perturbation threshold, compare the concentration prediction sequence with the historical evolution trajectory, and calculate the residual vector at each moment; perform multi-scale wavelet analysis on the residual sequence, and when the perturbation index function is greater than the perturbation threshold, identify it as a perturbation abnormal point; The system instability signal identification sub-unit is used to define an edge weight fluctuation threshold, monitor the temporal change rate of the edge weights in the weighted dynamic graph, and when the edge weight fluctuation between the core variables in the graph structure is greater than the edge weight fluctuation threshold, identify it as a system instability signal point; And define a distribution entropy fluctuation threshold to extract the attention matrix at each time step from the graph attention network, calculate the corresponding entropy value, and obtain the attention distribution entropy. When the attention distribution entropy fluctuates and the fluctuation impact is greater than the distribution entropy fluctuation threshold, it indicates that the focus of system attention has mutated, that is, the system is potentially unstable; The key threshold change point identification sub-unit is used to construct a dynamic upper and lower limit prediction interval for each type of pollutant or variable, combine the historical extreme value and the predicted range, and when the predicted value continuously crosses the interval boundary, it is the key threshold breakthrough point.

Citation Information

Patent Citations

  • Sewage treatment process abnormal working condition detection method using block principal component analysis

    CN111160776A

  • Quantum, biological, computer vision, and neural network systems for industrial internet of things

    US20230176550A1