Total phosphorus concentration prediction method in sewage treatment process, electronic equipment and medium

By adopting the total phosphorus concentration prediction method of sewage treatment process based on physical information technology in the sewage treatment process, combined with the long and short-term memory timing network, the problem of insufficient data dependence and interpretation of existing models is solved, and more efficient and reliable sewage treatment process prediction is achieved.

CN119560059AActive Publication Date: 2025-03-04SOUTH CHINA UNIV OF TECH

Patent Information

Application Number
CN202411445393.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-03-04
Estimated Expiration
2044-10-16

AI Technical Summary

Technical Problem

The existing neural network-based prediction model of total phosphorus concentration in sewage treatment process has problems such as dependence on a large number of high-quality data, insufficient model interpretation, poor adaptability and robustness that require further verification.

Method used

A method for predicting total phosphorus concentration in sewage treatment process based on physical information technology is adopted. By collecting multiple sewage treatment process index data, pretreatment and feature screening, a phosphate concentration prediction model based on physical information is established, and a total phosphorus prediction model is constructed based on long and short-term memory timing networks. This method combines the theoretical basis of traditional models and the self-learning ability of machine learning models, improving the prediction accuracy and reliability of the model.

Benefits of technology

The accuracy and reliability of the prediction of total phosphorus concentration in wastewater treatment process is improved, especially when processing small sample data or facing model uncertainty, which enhances the adaptability and interpretability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119560059A_ABST
    Figure CN119560059A_ABST
Patent Text Reader

Abstract

The invention discloses a total phosphorus concentration prediction method in a sewage treatment process, electronic equipment and a medium, and belongs to the field of sewage treatment. The method comprises the following steps: collecting various index data in various sewage treatment processes to obtain a data set; after the obtained data set is preprocessed, characteristic variables related to total phosphorus are screened; a corresponding phosphate concentration prediction model based on the physical information technology is established for the ferric salt delivery process and is used for predicting the phosphate concentration; combining the phosphate radical concentration obtained by prediction with the screened variables to jointly construct a total phosphorus prediction model; the total phosphorus prediction model is trained, and the trained total phosphorus prediction model is used for predicting the total phosphorus concentration in the sewage treatment process. According to the method, part of known scientific rules and empirical formulas in the sewage treatment field are creatively integrated into a data-driven prediction model, the theoretical basis of a traditional model and the self-learning ability of a machine learning model are combined, and the prediction accuracy and reliability of the model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of sewage treatment, and in particular to a method, electronic equipment and medium for predicting total phosphorus concentration in a sewage treatment process. Background Art

[0002] Wastewater treatment is a key measure to protect water resources, maintain ecological balance and ensure 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 prediction and optimization capabilities in wastewater treatment.

[0003] With the development of deep learning technology, various methods based on neural network technology are used to model the sewage treatment process, making data-based prediction and control more accurate and efficient. These models can automatically identify complex nonlinear patterns in the sewage treatment process through training, and can provide more accurate predictions even in the face of new or unseen data. They are particularly good at dealing with system problems with high-dimensional features and complex dynamic characteristics, and can reveal the implicit patterns in the data and the interactions between variables. The flexibility and adaptability of neural networks allow them to be adjusted according to different sewage treatment processes and scales to adapt to various application scenarios.

[0004] Although the neural network model based on deep learning technology has shown strong data processing and prediction capabilities in the field of sewage treatment, it also has some technical shortcomings, such as dependence on a large amount of high-quality data, insufficient model interpretability, challenges to dynamic system adaptability, and rapid technology iteration. Among them, the lack of interpretability of the model may lead to the relationship between the variables in the established data-driven model not satisfying the basic physical laws, which will mislead the formulation of the control strategy and cause unnecessary economic losses. On the other hand, due to the sensitivity of the model to the system state, the model under different conditions needs to be retrained with a large amount of high-quality new data. In summary, as the demand for digitalization and intelligence in the field of sewage treatment becomes more and more urgent, the neural network model has the characteristics of efficient online calculation and accurate results, so the neural network model has great application potential. However, due to the complexity of the sewage treatment process, the output results of the algorithm are difficult to interpret, and the robustness of the algorithm needs to be further verified, which limits the promotion and use of these methods in some scenarios. For this type of model, it is necessary to further combine it with physical laws to enhance the interpretability and reliability of the model, so that it can be more efficiently deployed in sewage treatment processes under different conditions. Summary of the invention

[0005] In order to solve at least one of the technical problems existing in the prior art to a certain extent, the purpose of the present invention is to provide a method, electronic equipment and medium for predicting total phosphorus concentration in a sewage treatment process based on physical information technology.

[0006] The first technical solution adopted by the present invention is:

[0007] A method for predicting total phosphorus concentration in a sewage treatment process comprises the following steps:

[0008] Collect various indicator data in various sewage treatment processes to obtain data sets;

[0009] After preprocessing the obtained data set, the characteristic variables related to total phosphorus were screened;

[0010] A corresponding phosphate concentration prediction model based on physical information technology is established for the iron salt delivery process to predict the phosphate concentration;

[0011] The predicted phosphate concentration was combined with the screened variables to construct a total phosphorus prediction model.

[0012] The total phosphorus prediction model is trained and used to predict the total phosphorus concentration in the sewage treatment process.

[0013] Furthermore, after preprocessing the obtained data set, the characteristic variables related to total phosphorus are screened, including:

[0014] Perform data cleaning on the obtained data set;

[0015] For the cleaned data set, the support vector machine recursive feature elimination method combined with clustering was used to screen the characteristic variables related to total phosphorus; the criteria of 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 eliminated in the current step until the number of features expected to be retained is reached; w is the weight of the support vector machine, w (i) represents the support vector weight after removing the i-th feature, ‖‖ 2 is the bi-norm of the support vector weight, It is a reference to an operator, which refers to the difference between the weighted norm of the support vector before and after the i-th feature is removed;

[0018] The features that are expected to be retained are selected and used together with the phosphate concentration as the input of the total phosphorus prediction model for the subsequent construction of the total phosphorus prediction model.

[0019] Furthermore, the data cleaning of the obtained data set includes:

[0020] The collected data were standardized, and the isolation forest method was used to detect and remove outliers from continuous high-dimensional data. The removed sequence position data were supplemented using the cubic spline interpolation method to ensure the integrity of the data set.

[0021] Furthermore, the method of establishing 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. The expression is:

[0023]

[0024] Where procFe refers to some intermediate state quantity of the ability of hydrated iron oxide to adsorb or release phosphate, which needs to be obtained through prediction; Q in is the flow rate of water inflow; and are the concentration of phosphate in the water and the concentration in the reaction tank respectively; vol is the volume of the reaction tank, is the rate of change of phosphate concentration; a1 and a2 are coefficients;

[0025] A prediction model of procFe was established, and the model inputs were the current phosphate concentration and the concentration of hydrated iron oxide in the corresponding state;

[0026] A prediction model for hydrated iron oxide was established, and a multi-input and multi-output time series model was used to fit the real system for predicting various states of hydrated iron oxide.

[0027] Use the fully connected layer to connect multiple models in series and determine the total loss function;

[0028] Taking minimizing the total loss function as the optimization objective, the parameters of the physical information network are updated through automatic differentiation method.

[0029] Furthermore, the calculation formula of the total loss function is as follows:

[0030] Loss=Loss PDE +Loss XHFO

[0031]

[0032] Where Loss is the total loss of the physical information network, Loss PDE is the loss involving physical constraints, Loss XHFO is the predicted loss of the hydrous iron oxide state, N p is the number of samples used for training, is the predicted value of the change in phosphate concentration of the Jth sample, is the differential equation condition satisfied by the Jth sample, and are the predicted value and true value of the I-th hydrated iron oxide state under the J-th sample, respectively.

[0033] Furthermore, the predicted phosphate concentration is combined with the screened variables to jointly construct a total phosphorus prediction model, including:

[0034] Construct a total phosphorus prediction model based on long short-term memory temporal network;

[0035] Using the selected characteristic variables, after excluding the variables with the same input as the phosphate concentration prediction model, the remaining variables and phosphate concentration are used as additional inputs of the total phosphorus prediction model; after setting the parameters of the long short-term memory temporal network, the automatic differentiation method is used to update the weights of the network;

[0036] Combine the debugged long short-term memory timing network with the physical information network, and use actual industrial data to fine-tune the overall parameters of the network.

[0037] Furthermore, the method for predicting total phosphorus concentration in a sewage treatment process also includes the step of testing a total phosphorus prediction model:

[0038] Use the trained total phosphorus prediction model to predict the test data set and obtain the phosphate concentration and total phosphorus prediction result vector. The prediction result vector contains the prediction result of the model for each time node.

[0039] After completing the prediction of the test data set, calculate the mean relative error MRE and the coefficient of determination R 2 and root mean square error RMSE to comprehensively evaluate the overall performance of the model;

[0040] According to the analysis results, the total phosphorus prediction model was improved and optimized.

[0041] Furthermore, the method for predicting total phosphorus concentration in a sewage treatment process further includes the step of adaptively updating the total phosphorus prediction model:

[0042] Set the trigger conditions for model update, and automatically adjust the model parameters when the trigger conditions are detected to achieve adaptive update of the model.

[0043] The second technical solution adopted by the present invention is:

[0044] An electronic device comprises 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, at least one program, the code set or the instruction set are loaded and executed by the processor to implement a method for predicting total phosphorus concentration in a sewage treatment process as described above.

[0045] The third technical solution adopted by the present invention is:

[0046] A computer-readable storage medium, wherein at least one instruction, at least one program, code set or instruction set is stored in the storage medium, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement a method for predicting total phosphorus concentration in a sewage treatment process as described above.

[0047] The fourth technical solution adopted by the present invention is:

[0048] A computer program product or a 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 the processor executes the computer instructions, so that the computer device executes the above method.

[0049] The beneficial effects of the present invention are as follows: the present invention innovatively integrates some known scientific laws and empirical formulas in the field of sewage treatment into a data-driven prediction model, combines the theoretical basis of the traditional model with the self-learning ability of the machine learning model, and improves the prediction accuracy and reliability of the model, especially when dealing with small sample data or facing model uncertainty. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the embodiments of the present invention or the drawings of related technical solutions in the prior art are introduced below. It should be understood that the drawings introduced below are only for the convenience of clearly describing 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 work.

[0051] Figure 1 It is a framework diagram of a method for predicting total phosphorus concentration in a sewage treatment process based on physical information technology in an embodiment of the present invention;

[0052] Figure 2 Schematic diagram of a clustering-based SVM-RFE feature selection method in an embodiment of the present invention;

[0053] Figure 3It is a flow chart of the steps of a method for predicting total phosphorus concentration in a sewage treatment process in an embodiment of the present invention. DETAILED DESCRIPTION

[0054] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limitations of the present invention. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0055] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0056] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0057] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.

[0058] Terminology explanation:

[0059] BSM2-P: Benchmark Simulation Model 2–Phosphorus, Benchmark Simulation Model 2 with Phosphorus extension.

[0060] SVM: abbreviation of Support Vector Machine.

[0061] RFE: abbreviation of Recursive Feature Elimination, recursive feature elimination.

[0062] LSTM: abbreviation of Long Short-Term Memory, long short-term memory.

[0063] In order to solve the problem that the traditional total phosphorus concentration prediction method of the sewage treatment process may be limited by the poor adaptability of the model, lack of interpretability, and difficulty in coping with the complex and changeable production environment, the present invention proposes a total phosphorus concentration prediction scheme for the sewage treatment process based on physical information technology. This scheme not only focuses on the biochemical changes that occur naturally in the sewage treatment process, but also specially considers the impact of the chemical dosing process on the total phosphorus concentration. This scheme innovatively integrates some known scientific laws and empirical formulas in the field of sewage treatment into a data-driven prediction model. This hybrid method combines the theoretical basis of the traditional model with the self-learning ability of the machine learning model, which improves the prediction accuracy and reliability of the model, especially when dealing with small sample data or facing model uncertainty. In addition, the scheme also includes an adaptive model adjustment mechanism, which can automatically adjust the model parameters according to the latest measurement data and prediction errors to ensure that the model maintains optimal performance in the dynamic changes of the sewage treatment process.

[0064] Example 1

[0065] like Figure 1 and Figure 3 As shown, this embodiment provides a method for predicting total phosphorus concentration in a sewage treatment process, comprising the following steps:

[0066] S1. Collect various indicator data in various sewage treatment processes to obtain data sets.

[0067] Specifically, based on the characteristics of the sewage treatment process, the total phosphorus concentration prediction method is divided into four parts, and the data set 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 benchmark SIMULINK model, which will be used to pre-train the model later.

[0070] Step 1.2: Through various sensors, various indicator data in the sewage treatment process are obtained in real time as a data set, such as organic phosphorus concentration, inorganic phosphorus concentration, water flow, dosage, pH value, temperature, etc.

[0071] S2. After preprocessing the obtained data set, the characteristic variables related to total phosphorus were screened.

[0072] In this embodiment, after preprocessing the collected data, the support vector machine recursive feature elimination method combined with clustering is used to screen the total phosphorus prediction related variables, such as Figure 2Optionally, step S2 specifically includes the following steps:

[0073] Step 2.1: Clean the actual data of the sewage treatment plant. First, the collected data is standardized, then the isolation forest method is used to detect and remove outliers from continuous high-dimensional data, and finally the cubic spline interpolation method is used to supplement the removed sequence position data to ensure the integrity of the data set.

[0074] Step 2.2: The data set was screened for feature variables related to total phosphorus using the support vector machine recursive feature elimination method combined with clustering. The criteria for the support vector machine recursive feature elimination method (SVM-RFE) are as follows:

[0075]

[0076] Among them, w is the weight of the support vector machine, 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, and this process will be repeated until the desired number of features is retained. For the continuous process, after adding the clustering method, the new sample {X m ,Y m} feature ranking Rank(r1,…,r v ). i It is the feature ranked i in terms of importance.

[0077] The SVM-RFE method is a feature selection method based on support vector machine (SVM), which selects the best feature subset by gradually removing the least important features. This method first uses SVM to train the original features and obtains the weight coefficients of the features. Then, the size of the feature set is reduced by removing the 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 required number of features is selected.

[0078] The advantages of the SVM-RFE algorithm include the ability to automatically select the best feature subset, reduce feature dimensions, and improve the generalization ability of the model. It can also handle nonlinear problems and map data to high-dimensional space through kernel techniques. By combining clustering methods, this method can be extended from discrete data sets to continuous industrial process data sets.

[0079] Step 2.3: Select the features you want to retain and use them as input together with the phosphate concentration for the subsequent total phosphorus prediction model construction.

[0080] S3. Establish a corresponding phosphate concentration prediction model based on physical information technology for the iron salt delivery process to predict the 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 drug administration reaction equations are sorted out as additional constraints of 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, which are expressed as follows:

[0084]

[0085] in,

[0086]

[0087] There 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. in is the inflow rate, and are the concentration of phosphate in the water and the concentration in the reaction tank, vol is the volume of the reaction tank, is the rate of change of phosphate concentration.

[0088] Step 3.2: Establish a prediction model for procFe, where 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 various states of hydrated iron oxide, a multi-input and multi-output time series model is used to fit the real system for predicting various states of hydrated iron oxide. In other embodiments, the prediction process of intermediate hydrated iron oxide can be replaced by a coding and decoding structure, and the prediction of phosphate concentration can be achieved by exploring the potential characteristics of the data.

[0090] Step 3.4: Use the fully connected layer to connect multiple models in series, and the total loss function is calculated by the following formula:

[0091] Loss=Loss PDE +Loss XHFO

[0092]

[0093] Among them, Loss is the total loss of the physical information network, LossPDE is the loss involving physical constraints, Loss XHFO is the predicted loss of the hydrous iron oxide state, N p is the number of samples used for training, is the predicted value of the change in phosphate concentration of the Jth sample, is the differential equation condition satisfied by the Jth sample in step 3.1, and are the predicted value and true value 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 results of the neural network, so that the output of the network satisfies certain physical laws. This method can also be used to achieve fitting estimation of the indeterminate parameters of the differential equations.

[0095] Step 3.5: Taking minimizing the above total loss function as the optimization goal, update the physical information network parameters through automatic differentiation method.

[0096] S4. Combine the predicted phosphate concentration with the screened variables to jointly construct a total phosphorus prediction model.

[0097] In some embodiments, step S4 specifically includes the following steps:

[0098] Step 4.1: Use the long short-term memory (LSTM) time series model to build a total phosphorus prediction model. The LSTM prediction model is a variant of the recurrent neural network. For time series data, since a storage unit that can store historical data is added, it is more convenient to extract various information features. The LSTM network structure uses a special gate mechanism, which consists of neurons, forget gates, input gates, and output gates. 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 expression, f t is the amount of data information remaining after the previous LSTM neuron passes through the forget gate, i t is the data information input of the current LSTM neuron, is the candidate state value of the unit, c t is the data information output of the LSTM neuron, σ is the activation function, ⊙ is the Hadamard product, x t is the current input vector, W xf , W xi , W xc , W xo Input the associated weight vector, h t-1 is the state vector of the previous neural unit hidden layer, W hf , W hi , W hc , W ho are the weights of these state vectors, b f 、b i 、b c 、b o are the bias vectors of the relevant gates respectively.

[0105] Step 4.2: Using the important variables selected in step S2, after excluding the variables with the same input as the phosphate concentration prediction model, the remaining variables and phosphate concentration are used as additional inputs for the total phosphorus prediction model. After setting the number of inputs, the length of the time series, the number of hidden layers and other parameters, the automatic differentiation method is used to update the weights of the network.

[0106] Step 4.3: Combine the debugged LSTM network with the physical information network in step S3, and use limited actual industrial data to fine-tune the overall parameters of the network.

[0107] The prediction 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, thereby enhancing the network's transfer learning ability under limited industrial sample conditions and improving the interpretability and reliability of the output results.

[0108] It should be noted that this embodiment uses an LSTM network to construct a total phosphorus prediction model, but is not limited to the LSTM network. Other types of time series networks or other generative methods can also be used to train the network to construct a 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 predict the test data set and obtain the phosphate concentration and total phosphorus prediction result vector. The prediction result vector contains the model's prediction results for each time node.

[0112] Step 5.2: After completing the prediction of the test data set, further use the mean relative error (MRE), determination coefficient (R 2 ) and root mean square error (RMSE) to fully evaluate its overall performance:

[0113]

[0114] Among them, N t is the sequence length of the test set data, y i is the target actual value at the i-th moment, is the target prediction value at the i-th moment, is the average of the target actual values.

[0115] Step 5.3: Improve and optimize the model based on the results analysis. Possible improvement methods include adjusting model parameters, increasing training data, improving feature engineering, etc. Continuous result analysis and model improvement can continuously improve the performance and generalization ability of the model.

[0116] S6. Setting trigger conditions, and automatically adjusting parameters to achieve adaptive updating of the model when it is detected that the trigger conditions are met.

[0117] As an optional implementation, step S6 specifically includes the following steps:

[0118] Step 6.1: Set the trigger condition for model update. Determine the minimum acceptable value of a performance indicator (such as MRE or RMSE) as the trigger condition for model update. Or collect new data and analyze whether it is consistent with the data distribution when the model was trained. If the data distribution changes, the model may need to be updated.

[0119] Step 6.2: Consider using incremental learning techniques to fine-tune the model on new data instead of training it completely from scratch.

[0120] Step 6.3: Continuously monitor and optimize model performance. Record the history of model updates, including performance changes and parameter adjustments, for further analysis and optimization. Even after the model is updated, continue to monitor model performance to ensure it meets business needs 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 solutions:

[0122] (1) The present invention is aimed at predicting the total phosphorus in the effluent under the iron salt phosphorus removal strategy in the sewage treatment process. In the traditional method, the high-precision and real-time mathematical model may require a large amount of computing resources. The present invention adopts a neural network model based on artificial intelligence technology to optimize the simulation of the twin model.

[0123] (2) In order to solve the problems of neural network models based on deep learning technology relying on large amounts of high-quality data and insufficient interpretability of the models, the present invention adopts a neural network model that combines time series 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, ensures that the prediction results meet the laws of physics, and maintains a certain generalization ability when data is scarce or noisy.

[0124] (3) The present invention designs a model adaptive update strategy to address the problem that the sewage process is extremely dynamic, which may lead to a decline in model performance. The model predicts performance indicators and the distribution of water inflow data as the basis for judgment. When the trigger conditions are met, the incremental learning technology is used to fine-tune the model on the new data instead of training from scratch. This allows the model to save more computing resources while maintaining high-precision predictions.

[0125] Example 2

[0126] An embodiment of the present invention further provides an electronic device, the electronic device comprising a processor and a memory, the memory storing 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 being loaded and executed by the processor to implement the following Figure 1 and / or Figure 3 A method for predicting total phosphorus concentration in a sewage treatment process is shown.

[0127] It is understood that the memory may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory includes a non-transitory computer-readable storage medium. The memory may be used to store instructions, programs, codes, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data created according to the use of the server, etc.

[0128] The processor may include one or more processing cores. The processor uses various interfaces and lines to connect the various parts of the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory. Optionally, the processor can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor can integrate one or a combination of a central processing unit (CPU) and a modem. Among them, the CPU mainly processes the operating system and application programs; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor, but implemented separately through a chip.

[0129] Since the electronic device is an electronic device corresponding to a method for predicting total phosphorus concentration in a sewage treatment process in an embodiment of the present invention, and the principle of solving the problem by the electronic device is similar to that of the method, the implementation of the electronic device can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.

[0130] Example 3

[0131] The embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, the at least one program, the code set or instruction set is loaded and executed by a processor to implement the following Figure 1 and / or Figure 3 A method for predicting total phosphorus concentration in a sewage treatment process is shown.

[0132] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0133] Since the storage medium is the storage medium corresponding to a method for predicting total phosphorus concentration in a sewage treatment process in an embodiment of the present invention, and the principle of solving the problem by the storage medium is similar to that of the method, the implementation of the storage medium can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.

[0134] Example 4

[0135] In some possible implementations, various aspects of the method of the embodiment of the present invention can also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of a method for predicting total phosphorus concentration in a sewage treatment process according to various exemplary embodiments of the present application described above in this specification. Among them, the executable computer program code or "code" for executing each embodiment can be written in a high-level programming language 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 the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0137] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0138] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable ordinary technicians in the field to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made based on the essence of the content of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for predicting total phosphorus concentration in a sewage treatment process, characterized in that: The following steps are involved: Collect various indicator data in various sewage treatment processes to obtain data sets; After preprocessing the obtained data set, the characteristic variables related to total phosphorus were screened; A corresponding phosphate concentration prediction model based on physical information technology is established for the iron salt delivery process to predict the phosphate concentration; The predicted phosphate concentration was combined with the screened variables to construct a total phosphorus prediction model. The total phosphorus prediction model is trained and used to predict the total phosphorus concentration in the sewage treatment process.

2. A method for predicting total phosphorus concentration in a sewage treatment process according to claim 1, characterized in that: After the obtained data set is preprocessed, characteristic variables related to total phosphorus are screened, including: Perform data cleaning on the obtained data set; For the cleaned data set, the support vector machine recursive feature elimination method combined with clustering was used to screen the characteristic variables related to total phosphorus; the criteria of 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 eliminated in the current step until the number of features expected to be retained is reached; w is the weight of the support vector machine, w (i) represents the support vector weight after removing the i-th feature, ‖‖ 2 is the bi-norm of the support vector weight, It is a reference to an operator, which refers to the difference between the weighted norm of the support vector before and after the i-th feature is removed; The features that are expected to be retained are selected and used together with the phosphate concentration as the input of the total phosphorus prediction model for the subsequent construction of the total phosphorus prediction model.

3. A method for predicting total phosphorus concentration in a sewage treatment process according to claim 2, characterized in that: The step of performing data cleaning on the obtained data set includes: The collected data were standardized, and the isolation forest method was used to detect and remove outliers from continuous high-dimensional data. The removed sequence position data were supplemented using the cubic spline interpolation method to ensure the integrity of the data set.

4. A method for predicting total phosphorus concentration in a sewage treatment process according to claim 1, characterized in that: The method of establishing 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. The expression is: Where procFe refers to some intermediate state quantity of the ability of hydrated iron oxide to adsorb or release phosphate, which needs to be obtained through prediction; Q in is the flow rate of water inflow; and S po4state are the concentration of phosphate in the water and the concentration in the reaction tank respectively; vol is the volume of the reaction tank, is the rate of change of phosphate concentration; a1 and a2 are coefficients; A prediction model of procFe was established, and the model inputs were the current phosphate concentration and the concentration of hydrated iron oxide in the corresponding state; A prediction model for hydrated iron oxide was established, and a multi-input and multi-output time series model was used to fit the real system for predicting various states of hydrated iron oxide. Use the fully connected layer to connect multiple models in series and determine the total loss function; Taking minimizing the total loss function as the optimization objective, the parameters of the physical information network are updated through automatic differentiation method.

5. A method for predicting total phosphorus concentration in a sewage treatment process according to claim 4, characterized in that: The calculation formula of the total loss function is as follows: Loss=Loss PDE +Loss XHFO Where Loss is the total loss of the physical information network, Loss PDE is the loss involving physical constraints, Loss XHFO is the predicted loss of the hydrous iron oxide state, N p is the number of samples used for training, is the predicted value of the change in phosphate concentration of the Jth sample, is the differential equation condition satisfied by the Jth sample, and are the predicted value and true value of the I-th hydrated iron oxide state under the J-th sample, respectively.

6. A method for predicting total phosphorus concentration in a sewage treatment process according to claim 1, characterized in that: The predicted phosphate concentration is combined with the screened variables to jointly construct a total phosphorus prediction model, including: Construct a total phosphorus prediction model based on long short-term memory temporal network; Using the selected characteristic variables, after excluding the variables with the same input as the phosphate concentration prediction model, the remaining variables and phosphate concentration are used as additional inputs of the total phosphorus prediction model; after setting the parameters of the long short-term memory temporal network, the automatic differentiation method is used to update the weights of the network; Combine the debugged long short-term memory timing network with the physical information network, and use actual industrial data to fine-tune the overall parameters of the network.

7. A method for predicting total phosphorus concentration in a sewage treatment process according to claim 1, characterized in that: The method for predicting total phosphorus concentration in a sewage treatment process also includes the step of testing a total phosphorus prediction model: Use the trained total phosphorus prediction model to predict the test data set and obtain the phosphate concentration and total phosphorus prediction result vector. The prediction result vector contains the prediction result of the model for each time node. After completing the prediction of the test data set, calculate the mean relative error MRE and the coefficient of determination Q 2 and root mean square error RMSE to comprehensively evaluate the overall performance of the model; According to the analysis results, the total phosphorus prediction model was improved and optimized.

8. A method for predicting total phosphorus concentration in a sewage treatment process according to claim 1, characterized in that: The method for predicting total phosphorus concentration in a sewage treatment process further comprises the step of adaptively updating the total phosphorus prediction model: Set the trigger conditions for model update, and automatically adjust the model parameters when the trigger conditions are detected to achieve adaptive update of the model.

9. 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 described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The storage medium 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 according to any one of claims 1 to 8.

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

  • Methods and apparatus for machine learning enhanced infrared spectroscopy and analysis

    US20230197207A1

Cited By

  • River total phosphorus concentration prediction method based on XGBOOST model

    CN120220856A