A sewage effluent total phosphorus prediction method and system

By integrating mechanistic prediction and data prediction branches, and utilizing future rainfall forecast information and historical data of wastewater treatment processes, the accuracy and stability issues of effluent total phosphorus prediction under rainfall conditions were resolved, achieving efficient prediction of effluent total phosphorus.

CN123179292APending Publication Date: 2026-11-27ANHUI UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611422149.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-14
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing methods for predicting total phosphorus in wastewater effluent show a significant decrease in accuracy and stability under the influence of rainfall, failing to effectively utilize future rainfall forecast information, resulting in inaccurate predictions of total phosphorus in effluent under rainfall conditions.

Method used

By constructing a mechanism prediction branch and a data prediction branch, utilizing existing rainfall forecast information at the prediction time, and combining it with historical data of the wastewater treatment process, a temporal convolutional network and a Transformer fusion network are used to extract nonlinear temporal relationships for effluent total phosphorus prediction. The fusion weights are then used to optimize the mechanism prediction value and the data prediction value.

Benefits of technology

It improves the accuracy, stability, and interpretability of total phosphorus prediction in effluent, enabling early response to changes in inflow, infiltration, and pollution load caused by rainfall, and avoiding feature aliasing and redundant calculations of data with different dimensions and meanings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123179292A_ABST
    Figure CN123179292A_ABST
Patent Text Reader

Abstract

The application discloses a sewage effluent total phosphorus prediction method and system, and belongs to the technical field of sewage treatment. The application comprises the following steps: obtaining historical operation data, historical measured rainfall and future rainfall prediction sequence, retaining physical dimension copies for mechanism prediction after causality alignment and cleaning, and simultaneously constructing a normalized historical feature sequence and an independent future rainfall prior sequence; a mechanism branch outputs a mechanism prediction value based on the total phosphorus mass conservation relationship of the biological aerated filter; only the historical effluent total phosphorus sequence is subjected to multi-scale decomposition; a data branch fuses two types of inputs by using a time series convolution network and a Transformer fusion network, and outputs a data prediction value after normalization; and the two branches are fused by weighting according to the prediction error variance. The application can utilize future rainfall prediction to respond to external disturbance in advance, so that the mechanism prediction and the data prediction are complementary, and the accuracy and stability of the effluent total phosphorus prediction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of water quality prediction technology for wastewater treatment processes. More specifically, it relates to a mechanism-data joint-driven method and system for predicting total phosphorus in wastewater effluent by integrating rainfall information. Background Technology

[0002] Total phosphorus concentration in effluent is a crucial water quality indicator for assessing whether wastewater treatment plants meet discharge standards. It is influenced by a combination of factors, including influent flow rate, influent pollution load, temperature, reagent dosage, and the reaction status of the treatment units. Therefore, it exhibits significant nonlinearity, time-varying characteristics, and time lag. Accurate prediction of total phosphorus concentration in advance is of great importance for ensuring stable and compliant discharge from wastewater treatment plants and for optimizing reagent dosage.

[0003] Rainfall is one of the most significant external disturbances in wastewater treatment. It causes infiltration into the pipe network, dilution of the influent, surface erosion, and pollutant migration, leading to drastic changes in influent flow rate and pollution load within a short period. Furthermore, there is a significant time lag between the occurrence of rainfall, its transmission to the influent, and its impact on effluent total phosphorus; continuous rainfall also has a cumulative effect. Therefore, predicting effluent total phosphorus under rainfall conditions, especially heavy rainfall, is particularly difficult.

[0004] However, most existing methods for predicting total phosphorus in wastewater effluent only use historical process variables within the wastewater treatment plant, or simply use historical rainfall as a general input variable. These methods neither utilize future rainfall forecast information that can be obtained in advance at the time of prediction, nor distinguish between rainfall that has already occurred and rainfall that is about to occur. As a result, they cannot respond in advance before the impact of rainfall has fully been transmitted to the influent, leading to a significant decrease in the accuracy and stability of total phosphorus prediction in effluent under rainfall conditions. Summary of the Invention

[0005] The purpose of this invention is to overcome the problem that the accuracy and stability of effluent total phosphorus prediction are significantly reduced under the influence of rainfall in the prior art. It provides a method and system for predicting effluent total phosphorus, which uses rainfall forecast information that is already available at the prediction time to characterize external disturbances in advance, and makes the mechanism prediction results reflecting the law of mass conservation complementary with the data prediction results reflecting complex nonlinear relationships, thereby improving the accuracy, stability and interpretability of effluent total phosphorus prediction.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: In a first aspect, the present invention provides a method for predicting total phosphorus in wastewater effluent, comprising the following steps: S1. Obtain historical operating data of the wastewater treatment process, historical measured rainfall corresponding to the operating time of the wastewater treatment process, and future rainfall forecast sequences that have been released at the prediction time. Preprocess the data and construct a causal prediction sample with physical dimensions after preprocessing. The historical operating data includes influent flow rate, temperature, PAC dosage, influent total phosphorus concentration, and effluent total phosphorus concentration. S2. Based on the mass conservation relationship of total phosphorus in the aerated biological filter, the historical operating data after step S1 is used as the mechanism variable to obtain the mechanism prediction value of total phosphorus concentration in the effluent under the dimension of total phosphorus concentration. S3. The historical effluent total phosphorus sequence processed in step S1 and maintaining physical dimensions is decomposed into multiple scales within a causal historical time window. After the decomposition is completed, each decomposition component is normalized to obtain the multi-scale decomposition features of effluent total phosphorus, so as to complete the extraction of the multi-scale features of historical effluent total phosphorus. S4. Construct a historical feature sequence using partial historical data and historical measured rainfall, and construct a future rainfall prior sequence using the future rainfall forecast sequence that has been released at the prediction time. Use the constructed historical feature sequence and the future rainfall prior sequence as two independent inputs. Extract the nonlinear temporal relationship between the process operation status, rainfall disturbance and the change of total phosphorus in the effluent by a temporal convolutional network and a Transformer fusion network. Output the data prediction value and inversely normalize the data prediction value to the dimension of total phosphorus concentration in the effluent. S5. After both the mechanism prediction value and the data prediction value are within the dimension of total phosphorus concentration in the effluent, the fusion weight is determined based on the prediction error variance of the two branches on the verification sample. The mechanism prediction value and the data prediction value are then weighted and fused to obtain the fused prediction value of total phosphorus in the effluent.

[0007] As a possible implementation of the first aspect of the present invention, in step S4, the method for constructing the historical feature sequence includes: Historical rainfall disturbance characteristics were constructed using historical measured rainfall data; Normalized partial historical data, multi-scale decomposition characteristics of total phosphorus in effluent, and historical rainfall disturbance characteristics; the partial historical data includes influent flow rate, temperature, PAC dosage, and influent total phosphorus concentration; The normalized influent flow rate, temperature, PAC dosage, influent total phosphorus concentration, and historical rainfall disturbance characteristics were combined with the normalized effluent total phosphorus multi-scale decomposition characteristics to form a historical characteristic sequence. The method for constructing the future rainfall prior sequence is as follows: normalize the future rainfall forecast sequence to form the future rainfall prior sequence.

[0008] As one possible implementation of the first aspect of the present invention, the historical rainfall disturbance features include the current measured rainfall and the cumulative measured rainfall over at least two different cumulative periods up to the current moment.

[0009] As one possible implementation of the first aspect of the present invention, in step S5, the fusion weight is determined based on the inverse normalization of the variance of the two branch prediction errors, and the prediction branch with the smaller error variance obtains a larger fusion weight.

[0010] As a possible implementation of the first aspect of the present invention, in step S3, the multi-scale decomposition is a complexity-gated decomposition, which includes: performing an initial decomposition on the historical effluent total phosphorus sequence to obtain multiple modal components and decomposition residuals; dividing high-complexity components and low-complexity components according to the permutation entropy of each modal component and a preset complexity threshold; retaining the low-complexity components and performing a secondary decomposition on the high-complexity components; and normalizing all components obtained from the initial decomposition and the secondary decomposition.

[0011] As one possible implementation of the first aspect of the present invention, the initial decomposition employs adaptive variational mode decomposition, and the secondary decomposition employs joint mode decomposition.

[0012] As a possible implementation of the first aspect of the present invention, in step S2, in the mechanism prediction branch, the aerated biological filter is equivalent to a reaction unit, a discrete total phosphorus mass conservation relationship is established, the discrete total phosphorus mass conservation relationship is recursively calculated and parameters are identified to obtain the mechanism prediction value.

[0013] As a possible implementation of the first aspect of the present invention, in step S1, the preprocessing of the data includes: performing causal time alignment on the historical operational data, historical measured rainfall and future rainfall forecast sequence, wherein the causal time alignment is constrained by the actual release time of the rainfall forecast, so that the sample at each moment only uses the information obtained at that moment and before; performing outlier processing and missing value processing on the time-aligned data; and retaining the cleaned historical operational data as a physical dimension copy.

[0014] As one possible implementation of the first aspect of the present invention, prior to the causal time alignment, the historical operating data, historical measured rainfall and future rainfall forecast sequence are resampled at a uniform sampling interval.

[0015] As one possible implementation of the first aspect of the present invention, in step S1, the outlier processing is outlier truncation, and the missing value processing is linear interpolation.

[0016] In a second aspect, the present invention provides a prediction system for performing the above-described prediction method, comprising the following functional modules: a data acquisition and preprocessing module, a mechanism prediction module, a multi-scale feature extraction module, a data prediction module, and a fusion prediction module.

[0017] The data acquisition and preprocessing module is used to acquire historical operating data of wastewater treatment processes, historical measured rainfall, and future rainfall forecast sequences that have been released at the prediction time. It also performs resampling, causal time alignment, outlier handling, and missing value handling on the acquired data, while retaining physical dimension copies of the cleaned historical operating data.

[0018] The mechanism prediction module is used to perform recursive calculations and parameter identification on historical operating data in the physical dimension copy based on the total phosphorus mass conservation relationship of the aerated biological filter, so as to obtain the mechanism prediction value of total phosphorus in the effluent.

[0019] The multi-scale feature extraction module is used to perform multi-scale decomposition on the historical total phosphorus sequence of effluent within the causal historical time window, and normalize the obtained decomposition components to obtain the multi-scale decomposition features of total phosphorus in effluent.

[0020] The data prediction module is used to construct a historical feature sequence based on normalized process operation variables, multi-scale decomposition characteristics of total phosphorus in effluent, and historical rainfall disturbance characteristics, and to construct a future rainfall prior sequence based on the future rainfall forecast sequence. The historical feature sequence and the future rainfall prior sequence are input into a fusion network composed of a temporal convolutional network and a Transformer, and the output is denormalized to obtain the data prediction value of total phosphorus in effluent.

[0021] The fusion prediction module is used to determine the fusion weight based on the prediction error variance of the mechanism prediction branch and the data prediction branch on the validation sample, and to perform weighted fusion of the mechanism prediction value and the data prediction value to obtain the final fusion prediction value of total phosphorus in the effluent.

[0022] A third aspect of the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements the above-described method for predicting total phosphorus in wastewater effluent.

[0023] A fourth aspect of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device enables the above-described prediction of total phosphorus in wastewater effluent.

[0024] Based on the technical solution provided by this invention, compared with existing prediction methods, it has the following significant effects: (1) This invention constructs historical rainfall disturbance characteristics and future rainfall prior information from historical measured rainfall information and future rainfall forecast information published up to the prediction time, respectively, and introduces them into the data prediction branch. Historical measured rainfall information can characterize the immediate and cumulative effects of rainfall that has already occurred, while future rainfall forecast information can provide external disturbance information before the rainfall impact is fully reflected in the influent flow and total phosphorus concentration. Therefore, it is beneficial to improve the model's ability to respond in advance to changes in inflow infiltration, dilution and pollution load caused by rainfall.

[0025] (2) This invention only performs multi-scale decomposition on the historical effluent total phosphorus sequence that maintains physical dimensions within the causal historical time window, and normalizes each decomposed component after the decomposition is completed; influent flow rate, temperature, PAC dosage, influent total phosphorus concentration, historical rainfall characteristics, and future rainfall forecast information are not included in the multi-scale decomposition. This processing method can extract the variation characteristics of the effluent total phosphorus sequence at different time scales, and can also retain the physical meaning, sudden characteristics, and forecast lead time information of the process variables and rainfall information, avoiding feature aliasing and redundant calculations caused by the joint decomposition of data with different dimensions and meanings.

[0026] (3) This invention integrates normalized process variables, multi-scale decomposition characteristics of total phosphorus in effluent, historical rainfall disturbance characteristics and prior information of future rainfall through a data prediction branch to extract the nonlinear time series relationship between process operation status, rainfall disturbance and changes in total phosphorus in effluent; at the same time, it uses a mechanism prediction branch that does not contain rainfall information to provide prediction results that conform to the total phosphorus mass conservation relationship, so that the data prediction results and mechanism prediction results complement each other in terms of prediction mechanism and information source. Attached Figure Description

[0027] Figure 1 This is a schematic diagram of the overall process of the wastewater effluent total phosphorus prediction method of the present invention; Detailed Implementation To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0028] Combination Figure 1 This invention provides a method for predicting total phosphorus in wastewater effluent, comprising the following steps: Step S1: Obtain historical operating data of the wastewater treatment process, historical measured rainfall corresponding to the operating time of the wastewater treatment process, and future rainfall forecast data already released at the prediction time. After preprocessing, construct a causal prediction sample for rainfall enhancement.

[0029] In this step, historical data of the wastewater treatment process is first collected. This historical operational data includes influent flow rate, temperature, PAC dosage, influent total phosphorus concentration, and effluent total phosphorus concentration. At time t, with... The influent flow rate is expressed as... The temperature is indicated by The amount of PAC added is indicated by The total phosphorus concentration in the influent and the concentration in water expressed as... The total phosphorus concentration in the effluent is expressed as follows: This represents a vector of historical operating variables that maintains physical dimensions.

[0030] The historical measured rainfall and future rainfall forecast data mentioned above, Represents the historical measured rainfall at time t, in terms of The unique representation of the rainfall forecast value issued at time t, corresponding to the future time t+j, where j=1,2,…,h; the available future rainfall forecast sequence at time t is represented by the following formula:

[0031] The historical process operation data, historical measured rainfall, and future rainfall forecast sequences were resampled according to a uniform sampling interval Δt.

[0032] Furthermore, to represent the immediate impact of past rainfall and its historical cumulative impact, historical rainfall disturbances are constructed. as follows:

[0033] In the formula, the instantaneous quantity This refers to the current measured rainfall; historical cumulative rainfall. and The cumulative measured rainfall amounts are calculated over 3 and 6 sampling intervals up to time t, respectively. The two cumulative periods can be adjusted according to the pipeline confluence time.

[0034] The above instantaneous quantity Historical cumulative amount , and future rainfall forecast sequence Together they serve the data prediction branch, used to characterize real-time, cumulative, and advance disturbance information of rainfall.

[0035] Next, the preprocessing of the historical operational data, historical measured rainfall, and future rainfall forecast sequences includes: time alignment and data cleaning operations. The time alignment is used to perform causal time alignment of the historical operational data, historical measured rainfall, and future rainfall forecast sequences. Time alignment is constrained by the actual release time of the rainfall forecast; samples at the current moment can only use information obtained at or before the current moment, and the use of forecast data released after the current moment is prohibited to avoid future information leakage. The data cleaning is used to perform outlier truncation and linear interpolation of missing values ​​on the time-aligned data. After data cleaning, the resulting data is processed according to the following paths: Path 1: Directly retain historical running data The physical dimension copies are used for mechanism prediction in step S2 and for historical effluent total phosphorus sequence decomposition in step S3. Path 2: Intake flow rate ,temperature PAC dosage Total phosphorus concentration in influent and historical rainfall disturbances Normalization was performed, and the results were compared with the historical total phosphorus decomposition characteristics of the effluent after normalization treatment. Composition of historical feature sequence H t :

[0036] Path 3: Future rainfall forecast sequence Normalization was performed to construct the future rainfall prior sequence P t .

[0037] Step S2: Based on the total phosphorus mass conservation relationship of the aerated biological filter, establish a mechanism prediction branch. Use the influent flow rate, temperature, PAC dosage, influent total phosphorus concentration and historical effluent total phosphorus concentration in the physical dimension copy as mechanism variables to obtain the mechanism prediction value under the dimension of effluent total phosphorus concentration.

[0038] This step treats the biological aerated filter (BAF) as an equivalent reaction unit, with V representing the equivalent reaction volume, Δt representing the sampling interval, and ρt representing the total phosphorus removal rate per unit volume, establishing a discrete total phosphorus mass conservation equation:

[0039] The left side of the above formula represents the rate of change in total phosphorus stock in the aerated biological filter within a sampling interval, and the right side represents the difference between the total phosphorus mass flow rate of the influent and effluent and the comprehensive removal rate per unit volume. V, , , , , and All maintain the corresponding physical units.

[0040] The historical operational data of physical dimensions saved in step S1, path one. By inputting the above discrete mass conservation equation into the recursive equation and identifying the parameters, the mechanistic prediction value of the total phosphorus concentration in the effluent is obtained. .

[0041] Step S3: Extract multi-scale characteristics of total phosphorus in historical effluent; By performing an initial adaptive variational mode decomposition (SVMD) on the historical total phosphorus effluent sequence, multiple modal components and decomposition residuals ε were obtained. s (τ), where τ∈[t] L+1,t].

[0042] Based on the permutation entropy of each modal component and a preset complexity threshold, high-complexity components and low-complexity components are divided. Low-complexity components are retained, and only high-complexity components undergo secondary decomposition using Joint Mode Decomposition (JMD). After secondary decomposition, all obtained components are normalized, and the output result is denoted as the multi-scale decomposition feature. τ .

[0043] Influent flow rate, temperature, PAC dosage, total phosphorus concentration in the influent, historical rainfall disturbance characteristics, and future rainfall forecast sequences are not included in the multi-scale decomposition described in this step.

[0044] Step S4: Establish a data prediction branch for enhanced rainfall; This step will normalize the influent flow rate. ,temperature PAC dosage and total phosphorus concentration in influent Normalized multi-scale decomposition features τ and historical rainfall disturbance characteristics τ According to τ=t L+1,…,t form the historical feature sequence H t The rainfall forecast values ​​that have already been published at time t, arranged in order of future steps 1 to h and normalized respectively. Composing the prior sequence P of future rainfall t .

[0045] H t The input temporal convolutional network (TCN) module extracts the multi-scale characteristics of influent flow rate, temperature, PAC dosage, influent total phosphorus concentration, effluent total phosphorus, and local temporal relationships of historical rainfall disturbances; P tThe encoding is used to represent future rainfall disturbances; the Transformer module integrates historical time series representations and future rainfall disturbance representations to extract lag relationships across variables and channels.

[0046] The data prediction branch is trained using normalized future effluent total phosphorus labels and outputs the corresponding normalized prediction values. Inverse normalization is then performed on the data model output to obtain the predicted values ​​in terms of effluent total phosphorus concentration. Then proceed to step S5.

[0047] Step S5: Combine the predicted values ​​based on the mechanism and the predicted values ​​based on the data; On the validation sample, the prediction error was calculated using both the mechanistic prediction value and the denormalized data prediction value in the dimensionless total phosphorus concentration of the effluent, and the error variance was obtained. and After ensuring the dimensions of the two branch predictions are consistent, the fusion weights are determined by normalizing the values ​​according to the reciprocal of the error variance.

[0048] In the above formula, For mechanism fusion weights, For data fusion weights, and + =1; and These are the variances of the prediction error based on the mechanism and the variance of the prediction error based on the data. The prediction branch with the smaller variance receives a larger weight, thus complementing the consistency between the mechanism and the data fitting ability.

[0049] The final predicted total phosphorus value in the effluent after fusion is expressed as follows:

[0050] In the above formula, These are mechanistic predictions obtained using process data with physical dimensions. These are predicted values ​​of data that have been reverse-normalized to the dimensions of total phosphorus concentration in the effluent. These are the fused prediction values. Since the two branches have already been standardized in terms of units before fusion, no further unification is performed after fusion.

[0051] The present invention and its embodiments have been described above illustratively. This description is not restrictive, and the figures shown are only one embodiment of the present invention; the actual structure is not limited thereto. Therefore, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the present invention, such designs should fall within the protection scope of the present invention.

Claims

1. A method for predicting total phosphorus in wastewater effluent, characterized in that, Includes the following steps: S1. Obtain historical operating data of the wastewater treatment process, historical measured rainfall corresponding to the operating time of the wastewater treatment process, and future rainfall forecast sequences that have been released at the prediction time. Preprocess the data and construct a causal prediction sample with physical dimensions after preprocessing. The historical operating data includes influent flow rate, temperature, PAC dosage, influent total phosphorus concentration, and effluent total phosphorus concentration. S2. Based on the mass conservation relationship of total phosphorus in the aerated biological filter, the historical operating data after step S1 is used as the mechanism variable to obtain the mechanism prediction value of total phosphorus concentration in the effluent under the dimension of total phosphorus concentration. S3. The historical effluent total phosphorus sequence processed in step S1 and maintaining physical dimensions is decomposed into multiple scales within a causal historical time window. After the decomposition is completed, each decomposition component is normalized to obtain the multi-scale decomposition features of effluent total phosphorus, so as to complete the extraction of the multi-scale features of historical effluent total phosphorus. S4. Construct a historical feature sequence using partial historical data, multi-scale decomposition characteristics of total phosphorus in effluent, and historical measured rainfall. Construct a future rainfall prior sequence using the future rainfall forecast sequence already released at the prediction time. Use the constructed historical feature sequence and the future rainfall prior sequence as two inputs. Extract the nonlinear temporal relationship between process operation status, rainfall disturbance, and changes in total phosphorus in effluent using a temporal convolutional network and a Transformer fusion network. Output the data prediction value and inversely normalize the data prediction value to the dimension of total phosphorus concentration in effluent. S5. After both the mechanism prediction value and the data prediction value are within the dimension of total phosphorus concentration in the effluent, the fusion weight is determined based on the prediction error variance of the two branches on the verification sample. The mechanism prediction value and the data prediction value are then weighted and fused to obtain the fused prediction value of total phosphorus in the effluent.

2. The method for predicting total phosphorus in wastewater effluent according to claim 1, characterized in that, In step S4, the method for constructing the historical feature sequence includes: Historical rainfall disturbance characteristics were constructed using historical measured rainfall data; Normalized partial historical data, multi-scale decomposition characteristics of total phosphorus in effluent, and historical rainfall disturbance characteristics; the partial historical data includes influent flow rate, temperature, PAC dosage, and influent total phosphorus concentration; The normalized influent flow rate, temperature, PAC dosage, influent total phosphorus concentration, and historical rainfall disturbance characteristics were combined with the normalized effluent total phosphorus multi-scale decomposition characteristics to form a historical characteristic sequence. The method for constructing the future rainfall prior sequence is as follows: normalize the future rainfall forecast sequence to form the future rainfall prior sequence.

3. The method for predicting total phosphorus in wastewater effluent according to claim 2, characterized in that, The historical rainfall disturbance characteristics include the current measured rainfall and the cumulative measured rainfall over at least two different cumulative periods up to the current moment.

4. The method for predicting total phosphorus in wastewater effluent according to any one of claims 1-3, characterized in that, In step S5, the fusion weight is determined based on the inverse normalization of the variance of the prediction errors of the two branches, and the prediction branch with the smaller variance of the error receives a larger fusion weight.

5. The method for predicting total phosphorus in wastewater effluent according to any one of claims 1-3, characterized in that, In step S3, the multi-scale decomposition is a complexity-gated decomposition, which includes: performing an initial decomposition on the historical effluent total phosphorus sequence to obtain multiple modal components and decomposition residuals; dividing high-complexity components and low-complexity components according to the permutation entropy of each modal component and a preset complexity threshold; retaining the low-complexity components and performing a secondary decomposition on the high-complexity components; and normalizing all components obtained from the initial and secondary decompositions.

6. The method for predicting total phosphorus in wastewater effluent according to claim 5, characterized in that, The initial decomposition employs adaptive variational mode decomposition, and the secondary decomposition employs joint mode decomposition.

7. The method for predicting total phosphorus in wastewater effluent according to any one of claims 1-3, characterized in that, In step S1, the data preprocessing includes: performing causal time alignment on the historical operational data, historical measured rainfall, and future rainfall forecast sequence, wherein the causal time alignment is constrained by the actual release time of the rainfall forecast, so that the sample at each moment only uses the information obtained at that moment and before; performing outlier and missing value processing on the time-aligned data; and retaining the cleaned historical operational data as a physical dimension copy.

8. A system for performing the method for predicting total phosphorus in wastewater effluent as described in any one of claims 1-7, characterized in that: Includes the following modules: The data acquisition and preprocessing module is used to acquire historical operating data of the wastewater treatment process, historical measured rainfall corresponding to the historical operating data, and future rainfall forecast sequences that have been released at the prediction time. It performs preprocessing and causal time alignment on the historical operating data, historical measured rainfall, and future rainfall forecast sequences, and retains a physical dimension copy of the preprocessed historical operating data. The mechanism prediction module is used to predict the mechanism of total phosphorus in the effluent based on the mass conservation relationship of total phosphorus in the aerated biological filter and using historical operating data in the physical dimension copy. The multi-scale feature extraction module is used to perform multi-scale decomposition on the historical total phosphorus sequence of effluent within the causal historical time window up to the prediction time, and normalize the obtained decomposed components to obtain the multi-scale decomposition features of total phosphorus in effluent. The data prediction module is used to construct a historical feature sequence based on historical operational data, historical measured rainfall, and the multi-scale decomposition characteristics of total phosphorus in the effluent; construct a future rainfall prior sequence based on the future rainfall forecast sequence already released at the prediction time; and process the historical feature sequence and the future rainfall prior sequence using a fusion network composed of a temporal convolutional network and a Transformer to obtain and inverse normalize the output data prediction value. The fusion prediction module is used to determine the fusion weight based on the prediction error variance of the mechanism prediction value and the data prediction value on the validation sample, and to perform weighted fusion of the mechanism prediction value and the data prediction value to obtain the fusion prediction value of total phosphorus in the effluent.

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

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program that, when run on a computer, causes the computer to perform the prediction method as described in any one of claims 1-7.