A sewage treatment process total phosphorus concentration prediction method, electronic equipment and medium
By combining physical information technology and machine learning methods, a physical constraint-based prediction model for total phosphorus concentration in wastewater treatment was established. This model addresses the issues of insufficient interpretability and poor adaptability of deep learning models in wastewater treatment, and achieves efficient and reliable prediction of total phosphorus concentration.
Patent Information
- Application Number
- CN202411445393.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-10-16
AI Technical Summary
Existing deep learning-based wastewater treatment models suffer from insufficient model interpretability, dependence on large amounts of high-quality data, and poor adaptability, making them difficult to apply effectively in complex and ever-changing production environments.
By combining physical information technology and machine learning methods, this study collects various indicator data from the wastewater treatment process, performs data preprocessing and feature screening, establishes a phosphate concentration prediction model based on physical constraints, and constructs a total phosphorus prediction model using a long short-term memory time series network. By combining physical laws and data-driven methods, the model achieves adaptive updates.
It improves the accuracy and reliability of total phosphorus concentration prediction in wastewater treatment, especially under conditions of small sample data or model uncertainty, enhancing the interpretability and adaptability of the model and reducing the computational resource requirements.
Smart Images

Figure CN119560059B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wastewater treatment, and in particular to a method, electronic device, and medium for predicting total phosphorus concentration in wastewater treatment processes. Background Technology
[0002] Wastewater treatment is a crucial measure for protecting water resources, maintaining ecological balance, and ensuring public health. In recent years, the mainstream models used in the field of wastewater treatment are still mathematical models tailored to different process designs. These models provide powerful predictive and optimization capabilities in wastewater treatment.
[0003] With the development of deep learning technology, various methods based on neural network technology have been applied to model wastewater treatment processes, making data-driven prediction and control more accurate and efficient. These models, through training, can automatically identify complex nonlinear patterns in wastewater treatment processes, providing relatively accurate predictions even with new or unseen data. They are particularly adept at handling system problems with high-dimensional features and complex dynamic characteristics, revealing hidden patterns and interactions between variables within the data. The flexibility and adaptability of neural networks allow them to be adjusted according to different wastewater treatment processes and scales to adapt to various application scenarios.
[0004] While deep learning-based neural network models have demonstrated powerful data processing and predictive capabilities in wastewater treatment, they also suffer from several drawbacks, such as dependence on large amounts of high-quality data, insufficient model interpretability, challenges in adapting to dynamic systems, and the need for rapid technological iteration. Specifically, insufficient model interpretability can lead to discrepancies between variables in the data-driven model and fundamental physical laws, potentially misleading control strategies and causing unnecessary economic losses. Furthermore, due to the model's sensitivity to system states, it requires retraining with large amounts of new, high-quality data under different conditions. In conclusion, with the increasing urgency for digitalization and intelligentization in wastewater treatment, neural network models, with their high efficiency in online computation and accurate results, possess significant application potential. However, the complexity of wastewater treatment processes, the difficulty in interpreting algorithm outputs, and the need for further validation of algorithm robustness limit the widespread adoption and use of these methods in certain scenarios. For these models, further integration with physical laws is needed to enhance interpretability and reliability, enabling more efficient deployment in wastewater treatment processes under diverse conditions. Summary of the Invention
[0005] In order to at least partially solve one of the technical problems existing in the prior art, the present invention aims to provide a method, electronic device and medium for predicting total phosphorus concentration in wastewater treatment process based on physical information technology.
[0006] The first technical solution adopted in this invention is:
[0007] A method for predicting total phosphorus concentration in a wastewater treatment process includes the following steps:
[0008] Collect data on various indicators during multiple wastewater treatment processes to obtain a dataset;
[0009] After preprocessing the obtained dataset, the feature variables related to total phosphorus were filtered.
[0010] A corresponding phosphate concentration prediction model based on physical information technology was established for the iron salt delivery process to predict phosphate concentration.
[0011] The predicted phosphate concentration is combined with the screened variables to construct a total phosphorus prediction model;
[0012] The total phosphorus prediction model was trained and then used to predict the total phosphorus concentration in the wastewater treatment process.
[0013] Furthermore, after preprocessing the obtained dataset, the feature variables related to total phosphorus are screened, including:
[0014] Perform data cleaning on the obtained dataset;
[0015] For the cleaned dataset, a support vector machine recursive feature elimination method combined with clustering is used to filter the total phosphorus-related feature variables; the criteria for the support vector machine recursive feature elimination method are as follows:
[0016]
[0017] In the formula, R c (i) is the importance index of the i-th feature in the current iteration step. The feature with the smallest value will be temporarily removed in the current step until the desired number of features are retained; w is the weight of the support vector machine, w (i) Represents the support vector weights after removing the i-th feature, ||| 2 The L2 norm of the support vector weights, "A" is a term referring to an operator that is the difference between the L2 norm of the support vector weights after removing the i-th feature and after removing the i-th feature.
[0018] The features that are expected to be retained are selected and used together with the phosphate concentration as inputs to the total phosphorus prediction model for subsequent construction of the total phosphorus prediction model.
[0019] Furthermore, the data cleaning of the obtained dataset includes:
[0020] The collected data were standardized, and the isolated forest method was used to detect and remove outliers from the continuous high-dimensional data. The removed sequence position data were supplemented using cubic spline interpolation to ensure the integrity of the dataset.
[0021] Furthermore, the establishment of a corresponding phosphate concentration prediction model based on physical information technology for the iron salt delivery process includes:
[0022] Determine the physical constraints of the phosphate concentration prediction model and establish the model optimization conditions, expressed as follows:
[0023]
[0024] In the formula, procFe refers to some intermediate state quantities of the ability of hydrated iron oxide to adsorb or release phosphate, which need to be obtained through prediction; Q in It is the inflow rate of the water; and These represent the phosphate concentration in the influent and the concentration in the reaction tank, respectively; vol is the volume of the reaction tank. It represents the rate of change in phosphate concentration; a1 and a2 are both coefficients.
[0025] A prediction model for procFe was established, with the current phosphate concentration and the concentration of hydrated iron oxide in the corresponding state as inputs.
[0026] A prediction model for hydrated iron oxide is established. For predicting various states of hydrated iron oxide, a multi-input multi-output time series model is used to fit the real system.
[0027] Multiple models are concatenated using fully connected layers, and the total loss function is determined.
[0028] The physical information network parameters are updated using an automatic differentiation method with the goal of minimizing the total loss function.
[0029] Furthermore, the formula for calculating the total loss function is as follows:
[0030] Loss = Loss PDE +Loss XHFO
[0031]
[0032] In the formula, Loss is the total loss of the physical information network. PDE It involves losses related to physical constraints. XHFO It is the predicted loss of hydrated iron oxide state, N p This is the number of samples used for training. This is the predicted value of the change in phosphate concentration for the Jth sample. This is the condition of the differential equation satisfied by the Jth sample. and These are the predicted and actual values of the I-th hydrated iron oxide state under the J-th sample, respectively.
[0033] Furthermore, the step of combining the predicted phosphate concentration with the screened variables to jointly construct a total phosphorus prediction model includes:
[0034] A total phosphorus prediction model was constructed based on a long short-term memory temporal network.
[0035] Using the selected feature variables, after excluding variables that have the same input as the phosphate concentration prediction model, the remaining variables and phosphate concentration are used as additional inputs to the total phosphorus prediction model; after setting the parameters of the long short-term memory time series network, the weights of the network are updated using the automatic differentiation method.
[0036] By combining the debugged long short-term memory temporal network with the physical information network, the overall parameters of the network are fine-tuned using actual industrial data.
[0037] Furthermore, the method for predicting total phosphorus concentration in the wastewater treatment process also includes a step of testing the total phosphorus prediction model:
[0038] The trained total phosphorus prediction model is used to predict the test dataset, and the predicted vectors of phosphate concentration and total phosphorus are obtained. The prediction vectors contain the model's prediction results for each time point.
[0039] After completing the predictions for the test dataset, calculate the mean relative error (MRE) and the coefficient of determination (R²). 2 The root mean square error (RMSE) is used to comprehensively evaluate the overall performance of the model.
[0040] Based on the results analysis, the total phosphorus prediction model was improved and optimized.
[0041] Furthermore, the method for predicting total phosphorus concentration in the wastewater treatment process also includes an adaptive update step for the total phosphorus prediction model:
[0042] Set trigger conditions for model updates. When the trigger conditions are detected, automatically adjust the model parameters to achieve adaptive model updates.
[0043] The second technical solution adopted in this invention is:
[0044] An electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement a method for predicting total phosphorus concentration in a wastewater treatment process as described above.
[0045] The third technical solution adopted in this invention is:
[0046] A computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement a method for predicting total phosphorus concentration in a wastewater treatment process as described above.
[0047] The fourth technical solution adopted in this invention is:
[0048] A computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions to cause the computer device to perform the method described above.
[0049] The beneficial effects of this invention are: This invention innovatively integrates some known scientific laws and empirical formulas in the field of wastewater treatment into a data-driven prediction model, combining the theoretical basis of traditional models with the self-learning ability of machine learning models, thereby improving the prediction accuracy and reliability of the model, especially when dealing with small sample data or facing model uncertainty. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following description is provided with accompanying drawings of the relevant technical solutions in the embodiments of the present invention or the prior art. It should be understood that the accompanying drawings described below are only for the purpose of clearly illustrating some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is a framework diagram of the total phosphorus concentration prediction method for wastewater treatment process based on physical information technology in this embodiment of the invention;
[0052] Figure 2 This is a schematic diagram of the clustering-based SVM-RFE feature selection method in an embodiment of the present invention;
[0053] Figure 3This is a flowchart illustrating the steps of a method for predicting total phosphorus concentration in a wastewater treatment process according to an embodiment of the present invention. Detailed Implementation
[0054] The embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention. The step numbers in the following embodiments are set only for ease of explanation, and there is no limitation on the order between the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
[0055] In the description of this invention, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., are based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.
[0056] In the description of this invention, "several" means one or more, "more than" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.
[0057] In the description of this invention, unless otherwise explicitly defined, terms such as "set up," "install," and "connect" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.
[0058] Terminology Explanation:
[0059] BSM2-P: Abbreviation for Benchmark Simulation Model 2 – Phosphorus, a phosphorus-extended benchmark simulation model 2.
[0060] SVM: Short for Support Vector Machine.
[0061] RFE: an abbreviation for Recursive Feature Elimination.
[0062] LSTM: an abbreviation for Long Short-Term Memory.
[0063] To address the limitations of traditional methods for predicting total phosphorus concentration in wastewater treatment processes, such as poor model adaptability, lack of interpretability, and difficulty in handling complex and changing production environments, this invention proposes a scheme for predicting total phosphorus concentration in wastewater treatment processes based on physical information technology. This scheme not only focuses on naturally occurring biochemical changes during wastewater treatment but also specifically considers the impact of chemical dosing on total phosphorus concentration. This scheme innovatively integrates some known scientific laws and empirical formulas in the field of wastewater treatment into a data-driven prediction model. This hybrid approach combines the theoretical foundation of traditional models with the self-learning capabilities of machine learning models, improving the model's prediction accuracy and reliability, especially when dealing with small sample data or model uncertainties. Furthermore, this scheme includes an adaptive model adjustment mechanism that automatically adjusts model parameters based on the latest measurement data and prediction errors, ensuring optimal model performance amidst the dynamic changes in the wastewater treatment process.
[0064] Example 1
[0065] like Figure 1 and Figure 3 As shown in the figure, this embodiment provides a method for predicting total phosphorus concentration in a wastewater treatment process, including the following steps:
[0066] S1. Collect data on various indicators during multiple wastewater treatment processes to obtain a dataset.
[0067] Specifically, based on the characteristics of the wastewater treatment process, the total phosphorus concentration prediction method is divided into four parts, and the dataset is acquired through sensors.
[0068] In some optional embodiments, step S1 includes the following steps:
[0069] Step 1.1: Obtain simulation data through the BSM2-P baseline SIMULINK model, which will be used for pre-training the model.
[0070] Step 1.2: Use various sensors to acquire data on various indicators during the wastewater treatment process in real time, such as organic phosphorus concentration, inorganic phosphorus concentration, water flow rate, dosage, pH value, and temperature.
[0071] S2. After preprocessing the obtained dataset, the feature variables related to total phosphorus are filtered.
[0072] In this embodiment, after preprocessing the collected data, a support vector machine recursive feature elimination method combined with clustering is used to filter variables related to total phosphorus prediction, such as... Figure 2As shown. Optionally, step S2 specifically includes the following steps:
[0073] Step 2.1: Data cleaning of the actual data from the wastewater treatment plant. First, the collected data is standardized. Then, the isolated forest method is used to detect and remove outliers from the continuous high-dimensional data. Finally, cubic spline interpolation is used to supplement the removed sequence positions to ensure the integrity of the dataset.
[0074] Step 2.2: Apply a support vector machine recursive feature elimination method combined with clustering to the dataset to filter the total phosphorus-related feature variables. The criteria for the support vector machine recursive feature elimination method (SVM-RFE) are as follows:
[0075]
[0076] Where w is the weight of the support vector machine, and R c (i) represents the importance index of the i-th feature in the current iteration step. The feature with the smallest value will be temporarily removed in the current step, and this process continues until the desired number of features are retained. For a continuous process, adding a clustering method can yield the importance index for the new clustered sample {X}. m ,Y m Feature ranking Rank(r1,…,r) v ). Where r i It is the feature that ranks i in importance.
[0077] The SVM-RFE method described is a feature selection method based on Support Vector Machines (SVM). It selects the optimal feature subset by progressively removing the least important features. This method first trains the original features using an SVM to obtain the feature weights. Then, it reduces the size of the feature set by removing features with the lowest weights. After each round of feature removal, the SVM is retrained and the weight of each feature is calculated. This process continues until the desired number of features is selected.
[0078] The advantages of the SVM-RFE algorithm include its ability to automatically select the optimal feature subset, reduce feature dimensionality, and improve the model's generalization ability. It can also handle nonlinear problems by mapping data to a high-dimensional space using kernel tricks. By combining it with clustering methods, this approach can be extended from discrete datasets to applications with continuous industrial process datasets.
[0079] Step 2.3: Select the features to be retained, and use them together with the phosphate concentration as input for the subsequent construction of the total phosphorus prediction model.
[0080] S3. Establish a corresponding phosphate concentration prediction model based on physical information technology for the iron salt delivery process to predict phosphate concentration.
[0081] In this embodiment, a corresponding phosphate concentration prediction model based on physical information technology is established for the iron salt delivery process; wherein some known dosing reaction equations are compiled as additional constraints for the prediction model.
[0082] As an exemplary implementation, step S3 specifically includes the following steps:
[0083] Step 3.1: Determine the physical constraints of the phosphate concentration prediction model and establish the model optimization conditions, expressed as follows:
[0084]
[0085] in,
[0086]
[0087] These are two sets of coefficients. procFe refers to some intermediate state quantities of the ability of hydrated iron oxide to adsorb (or release) phosphate, which need to be obtained through prediction. Q in It is the inflow rate of water. and These represent the phosphate concentration in the influent and the concentration in the reaction tank, respectively, with vol being the volume of the reaction tank. It is the rate of change of phosphate concentration.
[0088] Step 3.2: Establish a prediction model for procFe. The model inputs are the current phosphate concentration and the concentration of hydrated iron oxide in the corresponding state.
[0089] Step 3.3: Establish a prediction model for hydrated iron oxide. Because there is coupling between the changes in the various states of hydrated iron oxide, a multi-input multi-output time series model is used to fit the real system for predicting the various states of hydrated iron oxide. In other implementations, an encoding and decoding structure can be used to replace the prediction process of intermediate hydrated iron oxide, and the prediction of phosphate concentration can be achieved by mining the latent features of the data.
[0090] Step 3.4: Connect multiple models together using fully connected layers. The total loss function is calculated using the following formula:
[0091] Loss = Loss PDE +Loss XHFO
[0092]
[0093] Where Loss is the total loss of the physical information network, LossPDE It involves losses related to physical constraints. XHFO It is the predicted loss of hydrated iron oxide state, N p This is the number of samples used for training. This is the predicted value of the change in phosphate concentration for the Jth sample. It is the differential equation condition satisfied by the Jth sample in step 3.1. and These are the predicted and actual values of the I-th hydrated iron oxide state under the J-th sample, respectively.
[0094] The physical constraints mentioned above mainly use some differential equations as control equations to constrain the output of the neural network, so that the output of the network satisfies certain physical laws. This method can also be used to fit and estimate the parameters of the differential equations that are not fixed.
[0095] Step 3.5: With minimizing the total loss function as the optimization objective, update the physical information network parameters using an automatic differentiation method.
[0096] S4. Combine the predicted phosphate concentration with the screened variables to construct a total phosphorus prediction model.
[0097] In some embodiments, step S4 specifically includes the following steps:
[0098] Step 4.1: Construct a total phosphorus prediction model using a Long Short-Term Memory (LSTM) time series model. The LSTM prediction model is a variant of a recurrent neural network. For time series data, the addition of a storage unit capable of preserving historical data makes it easier to extract various information features. The LSTM network structure employs a special gate mechanism, consisting of neurons, a forget gate, an input gate, and an output gate. Its mathematical expression is:
[0099] f t =σ(W xf ·x t +W hf ·h t-1 +b f )
[0100] i t =σ(W xi ·x t +W hi ·h t-1 +b i )
[0101]
[0102] o t =σ(W xo ·x t+W ho ·h t-1 +b o )
[0103] h t =o t ⊙tanh(c t )
[0104] In the LSTM model representation, f t It is the amount of data information remaining after the previous LSTM neuron passes through the forget gate, i t It is the amount of data input to the current LSTM neuron. It is the candidate state value of the unit, c t σ is the data output of the LSTM neuron, ⊙ is the activation function, and x is the Hadamard product. t W is the current input vector. xf W xi W xc W xo Input the relevant weight vector, h t-1 W is the state vector of the hidden layer of the previous neural unit. hf W hi W hc W ho These are the weights of these state vectors, b f b i b c b o These are the bias vectors of the relevant gates.
[0105] Step 4.2: Using the important variables selected in Step S2, after excluding variables that are the same as the inputs of the phosphate concentration prediction model, the remaining variables and phosphate concentration are used as additional inputs to the total phosphorus prediction model. After setting the parameters such as the number of inputs, the length of the time series, and the number of hidden layers, the network weights are updated using the automatic differentiation method.
[0106] Step 4.3: Combine the debugged LSTM network with the physical information network in step S3, and fine-tune the overall network parameters using limited actual industrial data.
[0107] The aforementioned predictive model construction method embeds physical knowledge, first pre-trains the model with simulation data, and then further fine-tunes the model using a small amount of actual industrial data. This enhances the network's transfer learning ability under limited industrial sample conditions and improves the interpretability and reliability of the output results.
[0108] It should be noted that this embodiment uses an LSTM network to construct the total phosphorus prediction model, but it is not limited to LSTM networks. Other types of time series networks or other generative methods can also be used to train the network to construct the total phosphorus prediction model.
[0109] S5. Train the total phosphorus prediction model and test the trained total phosphorus prediction model.
[0110] As an optional implementation, step S5 specifically includes the following steps:
[0111] Step 5.1: Use the trained model to make predictions on the test dataset to obtain the prediction vectors of phosphate concentration and total phosphorus. The prediction vectors contain the model's prediction results for each time point.
[0112] Step 5.2: After completing the predictions for the test dataset, further employ the Mean Relative Error (MRE) and the Coefficient of Determination (R²) to determine the mean relative error (MRE) and the coefficient of determination (R²). 2 ) and root mean square error (RMSE) to comprehensively evaluate its overall performance:
[0113]
[0114] Where, N t y is the sequence length of the test set data. i It is the actual target value at time i. It is the target prediction value at time i. It is the average of the actual target values.
[0115] Step 5.3: Based on the results analysis, improve and optimize the model. Possible improvement methods include adjusting model parameters, increasing training data, and improving feature engineering. Continuous results analysis and model improvement can continuously enhance the model's performance and generalization ability.
[0116] S6. Set trigger conditions, and automatically adjust parameters to achieve adaptive updates of the model when the trigger conditions are detected.
[0117] As an optional implementation, step S6 specifically includes the following steps:
[0118] Step 6.1: Set the trigger condition for model updates. Determine a minimum acceptable value for a performance metric (such as MRE or RMSE) as the trigger condition for model updates. Alternatively, collect new data and analyze whether it is consistent with the data distribution during model training. If the data distribution has changed, the model may need to be updated.
[0119] Step 6.2: Consider using incremental learning techniques to fine-tune the model on new data, rather than training it entirely from scratch.
[0120] Step 6.3: Continuously monitor and optimize model performance. Record the model update history, including performance changes and parameter adjustments, for further analysis and optimization. Even after a model update, continuously monitor its performance to ensure it meets business requirements and perform further optimization as needed.
[0121] In summary, the method of the present invention has the following advantages and beneficial effects compared with the prior art:
[0122] (1) This invention addresses the prediction method for total phosphorus in effluent under the iron salt phosphorus removal strategy in wastewater treatment processes. In traditional methods, high-precision and real-time mathematical models may require a large amount of computing resources. This invention adopts a neural network model based on artificial intelligence technology and optimizes the simulation of the twin model.
[0123] (2) To address the problems of deep learning-based neural network models' dependence on large amounts of high-quality data and insufficient model interpretability, this invention adopts a neural network model that combines time series data with physical information embedding. This model improves the accuracy and reliability of predictions by integrating time dynamics with physical laws. It automatically learns the physical processes in the data, ensuring that the prediction results meet physical laws, and maintains a certain generalization ability when data is scarce or noisy.
[0124] (3) This invention addresses the issue that the highly dynamic nature of wastewater processes can lead to a decline in model performance by designing an adaptive model update strategy. Based on the model's predicted performance indicators and the distribution of influent data, incremental learning techniques are used when triggering conditions are met, allowing the model to be fine-tuned on new data instead of being trained from scratch. This allows the model to maintain high-accuracy predictions while conserving computational resources.
[0125] Example 2
[0126] This invention also provides an electronic device, which includes a processor and a memory. The memory stores at least one instruction, at least one program, a code set, or an instruction set. The at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to achieve the following: Figure 1 and / or Figure 3 This paper presents a method for predicting total phosphorus concentration in a wastewater treatment process.
[0127] It is understood that the memory may include random access memory (RAM) or read-only memory. Optionally, the memory may include non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the various method embodiments described above, etc.; the stored data area may store data created according to the use of the server, etc.
[0128] A processor may include one or more processing cores. The processor connects to various parts of the server via various interfaces and lines, executing instructions, programs, code sets, or instruction sets stored in memory, and accessing data stored in memory to perform various server functions and process data. Optionally, the processor may be implemented using at least one of the following hardware forms: Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor may integrate one or more of the following: Central Processing Unit (CPU) and Modem. The CPU primarily handles the operating system and applications; the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor.
[0129] Since this electronic device is the electronic device corresponding to the total phosphorus concentration prediction method in the wastewater treatment process of this embodiment of the invention, and the principle of solving the problem by this electronic device is similar to that of this method, the implementation of this electronic device can refer to the implementation process of the above method embodiment, and the repeated parts will not be described again.
[0130] Example 3
[0131] This invention also provides a computer-readable storage medium storing at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to achieve the following: Figure 1 and / or Figure 3 This paper presents a method for predicting total phosphorus concentration in a wastewater treatment process.
[0132] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.
[0133] Since this storage medium is the storage medium corresponding to the total phosphorus concentration prediction method for wastewater treatment process in an embodiment of the present invention, and the principle of the storage medium in solving the problem is similar to that of the method, the implementation of this storage medium can refer to the implementation process of the above method embodiment, and the repeated parts will not be described again.
[0134] Example 4
[0135] In some possible implementations, various aspects of the methods of the embodiments of the present invention can also be implemented as a program product comprising program code that, when run on a computer device, causes the computer device to perform the steps of a method for predicting total phosphorus concentration in a wastewater treatment process according to various exemplary embodiments of this application as described above. The executable computer program code or "code" used to perform the various embodiments can be written in high-level programming languages such as C, C++, C#, Smalltalk, Java, JavaScript, Visual Basic, Structured Query Language (e.g., Transact-SQL), Perl, or in various other programming languages.
[0136] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0137] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0138] The above embodiments are merely illustrative of the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent changes or modifications made based on the essence of the content of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A method for predicting total phosphorus concentration in a wastewater treatment process, characterized in that, Includes the following steps: Collect data on various indicators during multiple wastewater treatment processes to obtain a dataset; After preprocessing the obtained dataset, the feature variables related to total phosphorus were filtered. A corresponding phosphate concentration prediction model based on physical information technology was established for the iron salt delivery process to predict phosphate concentration. The predicted phosphate concentration is combined with the screened variables to construct a total phosphorus prediction model; The total phosphorus prediction model was trained, and the trained total phosphorus prediction model was used to predict the total phosphorus concentration in the wastewater treatment process. The establishment of a corresponding phosphate concentration prediction model based on physical information technology for the iron salt delivery process includes: Determine the physical constraints of the phosphate concentration prediction model and establish the model optimization conditions, expressed as follows: In the formula, procFe refers to some intermediate state quantities of the ability of hydrated iron oxide to adsorb or release phosphate, which need to be obtained through prediction; Q in It is the inflow rate of the water; and These represent the phosphate concentration in the influent and the concentration in the reaction tank, respectively; vol is the volume of the reaction tank. It represents the rate of change in phosphate concentration; a1 and a2 are both coefficients. A prediction model for procFe was established, with the current phosphate concentration and the concentration of hydrated iron oxide in the corresponding state as inputs. A prediction model for hydrated iron oxide was also established, and a multi-input multi-output time series model was used to fit the real system for predicting various states of hydrated iron oxide. Multiple models are concatenated using fully connected layers, and the total loss function is determined. The physical information network parameters are updated using an automatic differentiation method with the goal of minimizing the total loss function. The formula for calculating the total loss function is as follows: Loss=Loss PDE +Loss XHFO In the formula, Loss is the total loss of the physical information network. PDE It involves losses related to physical constraints. XHFO It is the predicted loss of hydrated iron oxide state, N p This is the number of samples used for training. This is the predicted value of the change in phosphate concentration for the Jth sample. This is the condition of the differential equation satisfied by the Jth sample. and These are the predicted and actual values of the i-th hydrated iron oxide state under the j-th sample, respectively; The process of combining the predicted phosphate concentration with the screened variables to construct a total phosphorus prediction model includes: A total phosphorus prediction model was constructed based on a long short-term memory temporal network. Using the selected feature variables, after excluding variables that have the same input as the phosphate concentration prediction model, the remaining variables and phosphate concentration are used as additional inputs to the total phosphorus prediction model; after setting the parameters of the long short-term memory time series network, the weights of the network are updated using the automatic differentiation method. By combining the debugged long short-term memory temporal network with the physical information network, the overall parameters of the network are fine-tuned using actual industrial data.
2. The method for predicting total phosphorus concentration in a wastewater treatment process according to claim 1, characterized in that, After preprocessing the obtained dataset, the feature variables related to total phosphorus are screened, including: Perform data cleaning on the obtained dataset; For the cleaned dataset, a support vector machine recursive feature elimination method combined with clustering is used to filter the total phosphorus-related feature variables; the criteria for the support vector machine recursive feature elimination method are as follows: In the formula, R c (i) is the importance index of the i-th feature in the current iteration step. The feature with the smallest value will be temporarily removed in the current step until the desired number of features are retained; w is the weight of the support vector machine, w (i) Represents the support vector weights after removing the i-th feature, ||| 2 The L2 norm of the support vector weights, "A" is a term referring to an operator that is the difference between the L2 norm of the support vector weights after removing the i-th feature and after removing the i-th feature. The features that are expected to be retained are selected and used together with the phosphate concentration as inputs to the total phosphorus prediction model for subsequent construction of the total phosphorus prediction model.
3. The method for predicting total phosphorus concentration in a wastewater treatment process according to claim 2, characterized in that, The data cleaning process for the obtained dataset includes: The collected data were standardized, and the isolated forest method was used to detect and remove outliers from the continuous high-dimensional data. The removed sequence position data were supplemented using cubic spline interpolation to ensure the integrity of the dataset.
4. The method for predicting total phosphorus concentration in a wastewater treatment process according to claim 1, characterized in that, The method for predicting total phosphorus concentration in the wastewater treatment process also includes a step of testing the total phosphorus prediction model: The trained total phosphorus prediction model is used to predict the test dataset, and the predicted vectors of phosphate concentration and total phosphorus are obtained. The prediction vectors contain the model's prediction results for each time point. After completing the predictions for the test dataset, calculate the mean relative error (MRE) and the coefficient of determination (R²). 2 The root mean square error (RMSE) is used to comprehensively evaluate the overall performance of the model. Based on the results analysis, the total phosphorus prediction model was improved and optimized.
5. The method for predicting total phosphorus concentration in a wastewater treatment process according to claim 1, characterized in that, The method for predicting total phosphorus concentration in wastewater treatment processes also includes an adaptive update step for the total phosphorus prediction model: Set trigger conditions for model updates. When the trigger conditions are detected, automatically adjust the model parameters to achieve adaptive model updates.
6. An electronic device, characterized in that, The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the method as described in any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Event-driven sewage treatment process effluent total phosphorus soft measurement model design method
CN112599205A
Effluent total phosphorus prediction method based on fuzzy neural network, electronic equipment and medium
CN112967763A