A method and apparatus for dynamic optimization of basic parameters of a water quality model based on neural networks.
By constructing a water quality model based on neural networks, combining mechanistic models and high-weight parameter screening, and dynamically adjusting water quality parameters, the accuracy and optimization difficulties of existing wastewater treatment simulation methods are solved, achieving more efficient wastewater treatment and prediction.
Patent Information
- Application Number
- CN202410171554.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-07
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-02-07
AI Technical Summary
Among existing wastewater treatment simulation methods, machine learning algorithms have poor accuracy and are difficult to optimize. The influent water quality design data of the mechanistic model differs greatly from the actual data, resulting in inaccurate simulation results.
A water quality model based on neural networks was constructed. By acquiring historical data from wastewater treatment plants, a mechanistic model and a high-weight parameter screening model were built. The high-weight parameters were trained using neural networks, and the water quality parameters were dynamically adjusted. High-weight factors were screened using Pearson correlation, Granger causality detection, and NSGAⅢ algorithm, and the model was further optimized by incorporating weather and seasonal factors.
It improves the accuracy and speed of wastewater treatment simulation, enables real-time monitoring and prediction of changes in water quality parameters, provides timely response measures, and enhances the overall efficiency and quality of wastewater treatment.
Smart Images

Figure CN118183886B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent control equipment technology for wastewater treatment plants, and in particular to a method, device, storage medium and equipment for dynamic optimization of basic parameters of a water quality model based on neural networks. Background Technology
[0002] In recent years, with the continuous development of the economy and society, the urban population has gradually increased. At the same time, the demand for and quality of urban water resources have also increased. As the last link in the urban water resource cycle, sewage treatment not only plays a vital role in the safety of water for residents' production and life, but is also crucial for protecting the urban water environment and reducing pollution.
[0003] To improve wastewater treatment, it is necessary to simulate the wastewater treatment process, predict future process data and effluent data, and take timely action when abnormal data is predicted to ensure that the effluent data meets the requirements.
[0004] Current simulations of wastewater treatment mainly fall into two categories: one is to directly use machine learning algorithms, taking the monitorable influent data as the model input and the effluent data as the model output, and obtaining the prediction results by optimizing the algorithm. However, this method can generally only be applied to one or a few effluent water qualities or intermediate process water qualities. Each type of data requires a separate model for prediction. In addition, the accuracy of this method is poor and the optimization is difficult.
[0005] Another approach is to use mechanistic models, such as the ASM model, to simulate the data. This simulation typically uses the designed influent water quality, real-time influent water volume, and monitorable influent water quality to simulate intermediate process parameters and effluent parameters. However, these designed influent water quality data usually differ greatly from the actual data. In addition, the influent characteristics are constantly changing due to factors such as weather conditions and seasons, making it even more difficult for the designed data to match the real data, resulting in unsatisfactory simulation results.
[0006] Therefore, by taking all factors into consideration under the above circumstances, combining the mechanistic model, and adjusting the designed influent water quality, i.e., these unmonitorable basic water quality parameters, it is possible to improve both the accuracy and simulation speed. Summary of the Invention
[0007] The purpose of this invention is to provide a method, apparatus, storage medium, and device for dynamic optimization of basic parameters of a water quality model based on a neural network, in order to solve the technical problems mentioned in the background art.
[0008] To achieve the above objectives, the technical solutions of the present invention are as follows:
[0009] As a first aspect of this application, a method for dynamic optimization of basic parameters of a water quality model based on a neural network includes the following steps:
[0010] S1. Obtain historical data from the wastewater treatment plant, including historical influent volume data, historical influent water quality data, historical effluent volume data from the secondary sedimentation tank, historical effluent water quality data from the secondary sedimentation tank, and data on related influencing factors.
[0011] S2. Construct a mechanism model, and obtain the effluent volume and water quality data of the secondary sedimentation tank by fitting the mechanism model with historical data.
[0012] S21. Construct a single-factor high-weight parameter screening model. In the single-factor high-weight parameter screening model, combine the fitted secondary sedimentation tank effluent volume data and secondary sedimentation tank effluent water quality data to obtain the first parameter screening result. Based on the first parameter screening result, obtain a high-weight factor set, in which the high-weight factor set is associated with water quality parameter data.
[0013] S22. Construct an overall high-weight parameter screening model. In the overall high-weight parameter screening model, combine the fitted secondary sedimentation tank effluent volume data and secondary sedimentation tank effluent water quality data to obtain the second parameter screening result. Based on the second parameter screening, obtain the overall high-weight factor. The overall high-weight factor is associated with relevant influencing factor data.
[0014] S3. Obtain high-weight parameters by training based on the high-weight factor set and the overall high-weight factors;
[0015] S4. Obtain the water quality parameter adjustment results based on the high-weight parameters.
[0016] Furthermore, the relevant influencing factor data includes one or more of temperature data, humidity data, and rainfall data.
[0017] Furthermore, step S21 specifically includes:
[0018] S211. Read the historical data of the wastewater treatment plant and the corresponding basic water quality parameters in each historical data entry;
[0019] S212. Adjust each basic water quality parameter according to the set adjustment step size to obtain multiple adjustment data results;
[0020] S213. Determine the correlation and causal relationship between the multiple adjustment data results corresponding to each basic water quality parameter and the fitted secondary sedimentation tank effluent data;
[0021] S214. If the correlation is strong, that is, the basic water quality parameter is a high-weight factor;
[0022] S215. Repeat steps S212 to S214 above to obtain a set of high-weight factors by statistically analyzing all the high-weight factors.
[0023] Furthermore, the correlation judgment is either a Pearson correlation analysis judgment or a sensitivity analysis judgment;
[0024] The causal detection is either Granger causality detection or Bayesian causality detection.
[0025] Furthermore, step S22 specifically includes:
[0026] Construct a multi-objective optimization model, and in the multi-objective optimization model, set the water quality parameters corresponding to each historical data point to not exceed the set range;
[0027] The water quality data of the secondary sedimentation tank effluent was obtained by combining the current water quality baseline parameters in the gene with historical data and fitting the mechanistic model, and fitness was judged by combining the actual effluent data.
[0028] The water quality baseline parameter is determined by judging the value of the fitness result to determine whether it is an overall high-weight gene. The overall high-weight factor is obtained by statistically analyzing multiple high-weight genes. The overall high-weight factor corresponds to multiple water quality baseline parameters.
[0029] Furthermore, step S3 specifically includes:
[0030] The first neural network model is constructed, with relevant influencing factor data, historical influent volume data, and historical influent water quality data as inputs to the neural network. The probability of the water quality basic parameter being a high-weight factor is the output of the neural network. The set of high-weight factors and the overall high-weight factors are used as correction objects, and the loss function is calculated.
[0031] High-weight parameters are obtained by training based on the loss function.
[0032] Furthermore, step S4 specifically includes:
[0033] A second neural network model was constructed, with historical inflow volume and historical inflow water quality data as inputs to the neural network and the parameter tuning results as outputs.
[0034] The data on the effluent volume and water quality of the secondary sedimentation tank fitted by the mechanism model were compared with the actual effluent volume data of the secondary sedimentation tank as corrections, and the loss function was calculated.
[0035] The water quality parameter adjustment results are obtained by training based on the calculated loss function.
[0036] As a second aspect of this application, a device for dynamically optimizing water quality parameters in a wastewater treatment plant is provided, comprising:
[0037] The data acquisition unit is used to acquire historical data of the wastewater treatment plant, including historical influent volume data, historical influent water quality data, historical effluent volume data of the secondary sedimentation tank, historical effluent water quality data of the secondary sedimentation tank, and related influencing factor data.
[0038] Mechanism model construction unit: The mechanism model construction unit is used to construct the mechanism model. Based on the mechanism model and historical data fitting, the effluent volume data and effluent quality data of the secondary sedimentation tank are obtained.
[0039] A single-factor high-weight parameter screening construction subunit is used to construct a single-factor high-weight parameter screening model. In the single-factor high-weight parameter screening model, the fitted secondary sedimentation tank effluent volume data and secondary sedimentation tank effluent water quality data are combined to obtain the first parameter screening result, and a high-weight factor set is obtained based on the first parameter screening result, wherein the high-weight factor set is associated with water quality parameter data.
[0040] The overall high-weight parameter screening subunit is used to construct an overall high-weight parameter screening model. In the overall high-weight parameter screening model, the fitted secondary sedimentation tank effluent volume data and secondary sedimentation tank effluent water quality data are combined to obtain the second parameter screening result. The overall high-weight factor is obtained based on the second parameter screening and is associated with relevant influencing factor data.
[0041] A high-weight parameter calculation unit is used to obtain high-weight parameters based on the high-weight factor set and the overall high-weight factors during training.
[0042] A water quality parameter adjustment unit is used to obtain water quality parameter adjustment results based on high-weight parameters.
[0043] As a third aspect of this application, a storage medium is provided, wherein at least one instruction is stored in the storage medium, the at least one instruction being loaded and executed by a processor to implement the dynamic optimization method for basic parameters of the water quality model as described above.
[0044] As a fourth aspect of this application, a computer device is provided, characterized in that the computer device includes a processor and a memory, the memory storing at least one instruction, the at least one instruction being loaded and executed by the processor to implement the dynamic optimization method for basic parameters of the water quality model as described above.
[0045] To better understand and implement this invention, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description
[0046] Figure 1This is a flowchart of the wastewater treatment process in the water quality model basic parameter dynamic optimization method based on neural networks in this embodiment;
[0047] Figure 2 This is a flowchart of the method for dynamically adjusting the basic parameters of a water quality model based on a neural network in this embodiment;
[0048] Figure 3 This is a schematic diagram illustrating the selection of high-weight parameters for single-factor analysis in the dynamic optimization method for basic parameters of a water quality model based on neural networks in this embodiment.
[0049] Figure 4 This is a schematic diagram illustrating the selection of high-weight parameters in the dynamic optimization method for basic parameters of a water quality model based on neural networks in this embodiment.
[0050] Figure 5 This is a structural block diagram of the dynamic adjustment device for influent water quality parameters of the sewage treatment plant in this embodiment;
[0051] Figure 6 This is a structural block diagram of the indicator mechanism model construction unit in the dynamic optimization device for influent water quality parameters of the wastewater treatment plant in this embodiment. Detailed Implementation
[0052] To better illustrate the present invention, the invention will now be described in further detail with reference to the accompanying drawings.
[0053] It should be understood that the described embodiments are merely some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of the embodiments of this application.
[0054] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the embodiments of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0055] In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims. In the description of this application, it should be understood that the terms "first," "second," "third," etc., are used only to distinguish similar objects and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0056] Furthermore, in the description of this application, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0057] Firstly, as Figure 1 As shown, Figure 1 The diagram shows a flowchart of the wastewater treatment process at a wastewater treatment plant. After being treated according to set water quality parameters, the wastewater enters the primary sedimentation tank from the inlet, and then sequentially enters the anoxic tank, anaerobic tank, and aerobic tank for further treatment before entering the secondary sedimentation tank for disinfection and effluent treatment.
[0058] based on Figure 1 The wastewater treatment process yielded the following data, including influent volume data, influent water quality data, secondary sedimentation tank effluent volume data, and secondary sedimentation tank effluent water quality data, as well as corresponding influent and effluent water quality data. All of the above data can be obtained through statistics and collection, and serve as the data basis for achieving dynamic optimization of influent water quality parameters in this application.
[0059] As is known from the prior art, basic water quality parameters include COD, total phosphorus, total nitrogen, and pH value. The influent water quality parameters that cannot be collected as indicated in this application are parameter data that are set by humans and are not collected, and are therefore influent water quality parameters that cannot be collected.
[0060] Based on the above, a preferred embodiment will be used for specific description. In this embodiment, as shown... Figure 2 As shown, as a first aspect of this application, a method for dynamically optimizing the basic parameters of a water quality model based on a neural network includes the following steps:
[0061] First, step S1: Obtain historical data of the wastewater treatment plant, including historical influent volume data, historical influent water quality data, historical effluent volume data of the secondary sedimentation tank, historical effluent water quality data of the secondary sedimentation tank, and data on related influencing factors.
[0062] Historical data mainly includes historical influent volume data, historical influent water quality data, historical effluent volume data of the secondary sedimentation tank, historical effluent water quality data of the secondary sedimentation tank, and historical data on relevant influencing factors. These relevant influencing factors include variables such as temperature data, humidity data, and rainfall data that may affect the influent and effluent volume and water quality.
[0063] Step S2: Construct a mechanism model, and obtain the effluent volume and water quality data of the secondary sedimentation tank by fitting the mechanism model with historical data.
[0064] Step S2 includes two steps, as follows:
[0065] Step S21: Construct a single-factor high-weight parameter screening model. In the single-factor high-weight parameter screening model, combine the fitted secondary sedimentation tank effluent volume data and secondary sedimentation tank effluent water quality data to obtain the first parameter screening result. Based on the first parameter screening result, obtain the high-weight factor set, where the high-weight factor set is associated with the water quality parameter data.
[0066] Specifically, it includes the following steps:
[0067] Step S211: Read the historical data of the wastewater treatment plant and the corresponding basic water quality parameters in each historical data entry;
[0068] Step S212: Adjust each basic water quality parameter according to the set adjustment step size to obtain multiple adjustment data results;
[0069] Step S213: Determine the correlation and causal relationship between the multiple adjustment data results corresponding to each basic water quality parameter and the fitted secondary sedimentation tank effluent data;
[0070] Step S214: If the correlation is strong, that is, the basic water quality parameter is a high-weight factor;
[0071] Step S215: Repeat steps S212 to S214 above to obtain a set of high-weight factors by statistically analyzing all the high-weight factors.
[0072] Taking a historical data point from a sewage treatment plant as an example, such as Figure 3 As shown, multiple basic water quality parameters corresponding to this historical data are read, and each basic water quality parameter is adjusted. The adjustment compensation is one-thousandth of the data range, and 1000 result data for each basic water quality parameter can be obtained. If there are m basic water quality parameters, 1000*m data can be obtained.
[0073] Each data point corresponding to each basic water quality parameter in this historical data is input into the mechanistic model. The mechanistic model is generally a mathematical model established based on the treatment process of the wastewater treatment plant for water quality control, resulting in the fitted data of the secondary sedimentation tank effluent volume and water quality. In other words, the obtained data corresponds to each basic water quality parameter in this historical data: 1000 adjusted data points for basic water quality parameters and 1000 fitted effluent data points, where the fitted effluent data includes fitted secondary sedimentation tank effluent volume and fitted secondary sedimentation tank effluent water quality data.
[0074] Correlation analysis and causal detection are performed on the water quality basic parameter adjustment data and fitted effluent data corresponding to each water quality basic parameter to determine whether the water quality basic parameter has a strong correlation or a strong lagged correlation with the effluent data. If the correlation is strong or the lagged correlation is strong, it is a high-weight factor.
[0075] Specifically, correlation analysis can be performed using Pearson correlation analysis, sensitivity analysis, etc., and causality detection can be performed using Granger causality detection. The corresponding Granger causality detection is used to determine whether the water quality data and the fitted effluent data are lagging correlated.
[0076] All high-weight factors are statistically assigned to the high-weight factor set corresponding to the historical data.
[0077] After obtaining a set of high-weight factors, repeat the steps to obtain the set of high-weight factors corresponding to all historical data. If there are n historical data, then there are n sets of high-weight factors corresponding to the n historical data, and each set of high-weight factors corresponds to several high-weight factors.
[0078] In addition, specifically, the above Pearson correlation analysis results include the correlation coefficient r and the significance level p, wherein the formula for calculating the correlation coefficient r is as follows:
[0079]
[0080] Among them, X i Y is used to represent basic water quality parameter data. i The values are used to represent the fitted effluent data. X represents the mean of the basic water quality parameters, Y represents the mean of the fitted effluent data, and the correlation coefficient r represents the following: 0.8 < r ≤ 1.0: extremely strong correlation; 0.6 < r ≤ 0.8: strong correlation; 0.4 < r ≤ 0.6: moderate correlation; 0.2 < r ≤ 0.4: weak correlation; 0 ≤ r ≤ 0.2: extremely weak correlation or no correlation.
[0081] The null hypothesis H0 for the significance level p is R=0, which means there is no linear relationship between the two variables. The results represent: p<0.05: the two data are significantly related; p≥0.05: the two data are not related.
[0082] Furthermore, sensitivity analysis typically involves calculating the sensitivity:
[0083]
[0084] Where, x i For basic water quality parameters, y i The sensitivity determination principle for fitting effluent data is: S i,j <0.25, parameters that have no significant impact on the model output; 0.25≤S i,j <1, parameters that affect the model output; 1≤S i,j <2, parameters that have a significant impact on the model output;
[0085] Furthermore, the Granger causality test described above incorporates all information about the predictions for each variable in the fitted effluent data y and water quality data x into the time series of these variables, and tests the following regression estimate:
[0086]
[0087]
[0088] Among them, white noise u 1t and u 2t The above two equations assume that the values are uncorrelated, and both assume that the current value is related to itself and other past values, thus obtaining the lagged correlation between the two.
[0089] Secondly, in step S22, construct an overall high-weight parameter screening model. In the overall high-weight parameter screening model, combine the fitted secondary sedimentation tank effluent volume data and secondary sedimentation tank effluent water quality data to obtain the second parameter screening result. Based on the second parameter screening, obtain the overall high-weight factor. The overall high-weight factor is associated with relevant influencing factor data.
[0090] Specifically, step S22 includes:
[0091] Construct a multi-objective optimization model, and in the multi-objective optimization model, set the water quality parameters corresponding to each historical data point to not exceed the set range;
[0092] The water quality data of the secondary sedimentation tank effluent was obtained by combining the current water quality baseline parameters in the gene with historical data and fitting the mechanistic model, and fitness was judged by combining the actual effluent data.
[0093] The water quality baseline parameter is determined by judging the value of the fitness result to determine whether it is an overall high-weight gene. The overall high-weight factor is obtained by statistically analyzing multiple high-weight genes. The overall high-weight factor corresponds to multiple water quality baseline parameters.
[0094] The overall high-weighting screening combines multiple basic water quality parameters into a whole and analyzes whether the interactions of these parameters constitute high-weighting parameters. It's important to note that after combining multiple basic water quality parameters into a whole, the determination of whether a parameter is a high-weighting parameter is influenced by a single factor. Therefore, the influence of relevant data factors should be considered in the overall high-weighting screening, namely, variables such as temperature, humidity, and rainfall data that may affect the influent and effluent water flow and quality. Based on the above, the process is as follows: Figure 4 As shown.
[0095] This screening method uses NSGAⅢ (Multi-Objective Optimization) to filter out the overall high-weight parameters for each historical data point;
[0096] Specifically, the genes of NSGAⅢ are whether the current water quality baseline parameters are high-weight parameters and the values of the current water quality baseline parameter data; when initializing the population, it is necessary to ensure that each water quality baseline parameter has a certain possibility of becoming a high-weight parameter; the constraint condition is that each water quality baseline parameter cannot exceed the data range; when calculating fitness, it is necessary to obtain the difference between the fitted effluent data and the actual effluent data, and the variance can be used as the fitness result.
[0097] When calculating fitness, the current water quality baseline parameter values and historical data in the gene are used, and a mechanistic model is employed to fit the secondary sedimentation tank effluent volume and water quality data as the fitted effluent data. The gene with the highest fitness is obtained at the end of the NSGAⅢ algorithm, which corresponds to the overall high-weight factor of that historical data. If there are n historical data points, then there are n overall high-weight factors corresponding to these n historical data points, and each overall high-weight factor corresponds to several water quality baseline parameters.
[0098] Step S3: Obtain high-weight parameters by training based on the high-weight factor set and the overall high-weight factors;
[0099] Specifically, a first neural network model is constructed, with relevant influencing factor data, historical inflow data, and historical inflow water quality data as inputs to the neural network. The probability of the water quality basic parameter being a high-weight factor is the output of the neural network. The set of high-weight factors and the overall high-weight factors are used as correction objects, and the loss function is calculated.
[0100] High-weight parameters are obtained by training based on the loss function.
[0101] The single-factor high-weight parameter screening described above can obtain the high-weight factor set corresponding to each historical data. Similarly, the overall high-weight parameter screening can obtain the overall high-weight factor corresponding to each historical data. The above two types of high-weight factors are integrated into a high-weight factor set, that is, each historical data corresponds to a high-weight factor set. At the same time, each historical data corresponds to different related influencing factor data, such as weather data such as temperature, humidity and rainfall.
[0102] The neural network is input with relevant influencing factor data, historical influent volume data, and historical influent water quality data. The output of the neural network is the probability that all basic water quality parameters are high-weight factors. The dataset is divided into training and testing sets according to a set ratio to train its parameters. The aforementioned high-weight factor set is used as a calibration to calculate its loss function. Specifically, the neural network model can use LSTM as the base model.
[0103] After training is complete, in subsequent real-time use, only the filtering model needs to be used to filter out the high-weight parameters.
[0104] Step S4: Obtain the water quality parameter adjustment results based on the high-weight parameters.
[0105] Specifically, by constructing a second neural network model, historical inflow volume and historical inflow water quality data are used as inputs to the neural network, and the parameter tuning results are used as the output of the neural network;
[0106] The data on the effluent volume and water quality of the secondary sedimentation tank fitted by the mechanism model were compared with the actual effluent volume data of the secondary sedimentation tank as corrections, and the loss function was calculated.
[0107] The water quality parameter adjustment results are obtained by training based on the calculated loss function.
[0108] The parameter tuning module primarily optimizes the parameters obtained from the high-weight screening module. Historical influent volume and water quality data are used as input to the neural network, and the tuning results are output. The parameters are trained, and a mechanistic model is used to fit the secondary sedimentation tank effluent volume and water quality data. This data is then compared with actual secondary sedimentation tank effluent volume data for correction, and the loss function is calculated. Specifically, this parameter tuning model can be implemented using LTM-ATTENTION-SVR.
[0109] In summary, in this embodiment, firstly, the method provided by the invention can be used to filter high-weight factors in real time and adjust the parameters of high-weight factors. The results of parameter adjustment can be stored in real time to dynamically monitor the parameter adjustment data and perceive the changes and trends of parameters that cannot be monitored.
[0110] Second, the screening of high weights is not limited to single-factor analysis, but uses a combination of single-factor and multi-factor analysis. At the same time, genetic algorithms and neural networks are used to form a high-weight parameter screening model, which makes the weight screening more comprehensive and improves the accuracy of the simulation.
[0111] Third, the high-weighting screening is not only based on historical data, but also incorporates factors such as weather conditions, season and water volume as relevant influencing factors to obtain more accurate parameter tuning results.
[0112] Fourth, when tuning parameters of high-weight factors, use neural networks to improve the accuracy of the tuning results;
[0113] Fifth, when using the method provided by this invention, the algorithm model is first obtained with the help of historical data, such as the high-weight parameter screening model and the parameter tuning model. In subsequent use, it can be directly based on real-time data to perform dynamic optimization.
[0114] Sixth, the influent flow rate and influent water quality data are predicted by the influent flow rate prediction model and the influent water quality prediction model. At the same time, by combining the high-weight parameter screening model and the parameter adjustment model, the future parameter adjustment results can be predicted. Based on the parameter adjustment results, the future effluent situation can be predicted. Based on the prediction data, it can be determined whether there may be any abnormal situations in the future, so as to propose countermeasures in a timely manner and adjust the process section, etc.
[0115] Furthermore, this embodiment also involves the prediction of future parameters. The data used for parameter optimization in this embodiment is historical data. The influent water quality data in the historical data is mostly set manually when the method of this embodiment is not used. Therefore, when people participate in the adjustment of influent water quality data, the prediction of future influent water quality parameter adjustments can be realized.
[0116] For example, obtain water inflow data from the raw data acquisition module;
[0117] The raw water inflow data is preprocessed to supplement missing data and eliminate extreme and noisy data.
[0118] Data on influencing factors were obtained, and correlation analysis and causal detection were performed on the data and the pre-treated influent data. Data with strong correlations were included in the exogenous variables.
[0119] The processed influent data and exogenous variable data were used together as input to train the neural network, and the predicted influent data were used as output. The input dataset was divided into training set, validation set and test set in a ratio of 8:1:1.
[0120] Predict future water consumption data based on the training results of a neural network.
[0121] Specifically, the influencing factor data includes weather factor data, holiday factor data, and special event factor data. The weather factor data includes temperature, humidity, and precipitation data, while the holiday factor data includes data to determine whether it is a workday, a rest day, or a major holiday. The ANFIS-ATTENTION-SVR model is used as the base model.
[0122] As a second aspect of this application, a device 100 for dynamically adjusting water quality parameters in a wastewater treatment plant is provided, such as... Figure 5 As shown, it includes:
[0123] Data acquisition unit 10 is used to acquire historical data of the wastewater treatment plant, including historical influent volume data, historical influent water quality data, historical effluent volume data of the secondary sedimentation tank, historical effluent water quality data of the secondary sedimentation tank, and related influencing factor data.
[0124] Mechanism model construction unit 11 is used to construct the mechanism model. Based on the mechanism model and historical data fitting, the effluent volume data and effluent quality data of the secondary sedimentation tank are obtained.
[0125] A single-factor high-weight parameter screening construction subunit 111 is used to construct a single-factor high-weight parameter screening model. In the single-factor high-weight parameter screening model, the fitted secondary sedimentation tank effluent volume data and secondary sedimentation tank effluent water quality data are combined to obtain the first parameter screening result, and a high-weight factor set is obtained based on the first parameter screening result, wherein the high-weight factor set is associated with water quality parameter data.
[0126] The overall high-weight parameter screening subunit 112 is used to construct an overall high-weight parameter screening model. In the overall high-weight parameter screening model, the fitted secondary sedimentation tank effluent volume data and secondary sedimentation tank effluent water quality data are combined to obtain the second parameter screening result. The overall high-weight factor is obtained based on the second parameter screening. The overall high-weight factor is associated with relevant influencing factor data.
[0127] High-weight parameter calculation unit 12, which is used to obtain high-weight parameters based on the high-weight factor set and the overall high-weight factors;
[0128] Water quality parameter adjustment unit 13, which is used to obtain water quality parameter adjustment results based on high-weight parameters.
[0129] As a third aspect of this application, a storage medium is provided, wherein at least one instruction is stored in the storage medium, the at least one instruction being loaded and executed by a processor to implement the dynamic optimization method for basic parameters of the water quality model as described above.
[0130] As a fourth aspect of this application, a computer device is provided, characterized in that the computer device includes a processor and a memory, the memory storing at least one instruction, the at least one instruction being loaded and executed by the processor to implement the dynamic optimization method for basic parameters of the water quality model as described above.
[0131] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0132] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0133] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0134] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0135] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0136] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0137] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0138] Based on the disclosure and teachings of the foregoing specification, those skilled in the art can make changes and modifications to the above embodiments. Therefore, the present invention is not limited to the specific embodiments disclosed and described above, and some modifications and changes to the present invention should also fall within the protection scope of the claims of the present invention. Furthermore, although some specific terms are used in this specification, these terms are only for convenience of explanation and do not constitute any limitation on the present invention.
Claims
1. A method for dynamically optimizing the basic parameters of a water quality model based on a neural network, characterized in that, Includes the following steps: S1. Obtain historical data from the wastewater treatment plant, including historical influent volume data, historical influent water quality data, historical effluent volume data from the secondary sedimentation tank, historical effluent water quality data from the secondary sedimentation tank, and data on related influencing factors. S2. Construct a mechanism model, and obtain the effluent volume and water quality data of the secondary sedimentation tank by fitting the mechanism model with historical data. S21. Construct a single-factor high-weight parameter screening model. In the single-factor high-weight parameter screening model, combine the fitted secondary sedimentation tank effluent volume data and secondary sedimentation tank effluent water quality data to obtain the first parameter screening result. Based on the first parameter screening result, obtain a high-weight factor set, in which the high-weight factor set is associated with water quality parameter data. Step S21 specifically includes: S211. Read the historical data of the wastewater treatment plant and the corresponding basic water quality parameters in each historical data entry; S212. Adjust each basic water quality parameter according to the set adjustment step size to obtain multiple adjustment data results; S213. Determine the correlation and causal relationship between the multiple adjustment data results corresponding to each basic water quality parameter and the fitted secondary sedimentation tank effluent data; S214. If the correlation is strong, that is, the basic water quality parameter is a high-weight factor; S215. Repeat steps S212 to S214 above to obtain a set of high-weight factors by statistically analyzing all the obtained high-weight factors. S22. Construct an overall high-weight parameter screening model. In the overall high-weight parameter screening model, combine the fitted secondary sedimentation tank effluent volume data and secondary sedimentation tank effluent water quality data to obtain the second parameter screening result. Based on the second parameter screening, obtain the overall high-weight factor. The overall high-weight factor is associated with relevant influencing factor data. Step S22 specifically includes: Construct a multi-objective optimization model, and in the multi-objective optimization model, set the water quality parameters corresponding to each historical data point to not exceed the set range; The water quality data of the secondary sedimentation tank effluent was obtained by combining the current water quality baseline parameters in the gene with historical data and fitting the mechanistic model, and fitness was judged by combining the actual effluent data. The value of the fitness result is used to determine whether the water quality basic parameter is a high-weight gene. The high-weight factor is obtained by statistically analyzing multiple high-weight genes. The high-weight factor corresponds to multiple water quality basic parameters. S3. Obtain high-weight parameters by training based on the high-weight factor set and the overall high-weight factors; Step S3 specifically includes: The first neural network model is constructed, with relevant influencing factor data, historical influent volume data, and historical influent water quality data as inputs to the neural network. The probability of the water quality basic parameter being a high-weight factor is the output of the neural network. The set of high-weight factors and the overall high-weight factors are used as correction objects, and the loss function is calculated. High-weight parameters are obtained by training based on the loss function; S4. Obtain water quality parameter adjustment results based on high-weight parameters; Step S4 specifically includes: A second neural network model was constructed, with historical inflow volume and historical inflow water quality data as inputs to the neural network and the parameter tuning results as outputs. The data on the effluent volume and water quality of the secondary sedimentation tank fitted by the mechanism model were compared with the actual effluent volume data of the secondary sedimentation tank as corrections, and the loss function was calculated. The water quality parameter adjustment results are obtained by training based on the calculated loss function.
2. The method for dynamic optimization of basic parameters of a water quality model according to claim 1, characterized in that: The relevant influencing factors data include one or more of the following: temperature data, humidity data, and rainfall data.
3. The method for dynamic optimization of basic parameters of a water quality model according to claim 1, characterized in that: The correlation judgment is either a Pearson correlation analysis judgment or a sensitivity analysis judgment; The causal detection is either Granger causality detection or Bayesian causality detection.
4. The method for dynamic optimization of basic parameters of a water quality model according to any one of claims 1 to 3, characterized in that, It is applicable to water quality parameter dynamic adjustment devices, wherein the water quality parameter dynamic adjustment device includes: The data acquisition unit is used to acquire historical data of the wastewater treatment plant, including historical influent volume data, historical influent water quality data, historical effluent volume data of the secondary sedimentation tank, historical effluent water quality data of the secondary sedimentation tank, and related influencing factor data. Mechanism model construction unit: The mechanism model construction unit is used to construct the mechanism model. Based on the mechanism model and historical data fitting, the effluent volume data and effluent quality data of the secondary sedimentation tank are obtained. A single-factor high-weight parameter screening construction subunit is used to construct a single-factor high-weight parameter screening model. In the single-factor high-weight parameter screening model, the fitted secondary sedimentation tank effluent volume data and secondary sedimentation tank effluent water quality data are combined to obtain the first parameter screening result, and a high-weight factor set is obtained based on the first parameter screening result, wherein the high-weight factor set is associated with water quality parameter data. The overall high-weight parameter screening subunit is used to construct an overall high-weight parameter screening model. In the overall high-weight parameter screening model, the fitted secondary sedimentation tank effluent volume data and secondary sedimentation tank effluent water quality data are combined to obtain the second parameter screening result. The overall high-weight factor is obtained based on the second parameter screening and is associated with relevant influencing factor data. A high-weight parameter calculation unit is used to obtain high-weight parameters based on the high-weight factor set and the overall high-weight factors during training. A water quality parameter adjustment unit is used to obtain water quality parameter adjustment results based on high-weight parameters.
5. A storage medium, characterized in that, The storage medium stores at least one instruction, which is loaded and executed by a processor to implement the dynamic optimization method for basic parameters of the water quality model as described in any one of claims 1 to 3.
6. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one instruction, which is loaded and executed by the processor to implement the dynamic optimization method for basic parameters of the water quality model as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Recursive RBF neural network-based effluent quality prediction method in sewage treatment process
CN117493803A