A method and device for predicting key indicators of a sewage treatment process
By constructing a domain adaptive network based on uncertainty modeling, the problem of difficulty in real-time measurement of key indicators in the wastewater treatment process is solved, and high-precision and rapid prediction of key wastewater treatment indicators, especially accurate prediction of BOD5, is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2026-03-20
AI Technical Summary
Existing technologies struggle to measure key indicators in the wastewater treatment process in real time and effectively, often relying on human experience for prediction.
A domain adaptive network based on uncertainty modeling is adopted, and a soft measurement model is constructed through feature extraction and predictor modules. Normalization, random sampling and uncertainty modeling are used to optimize feature extraction and predictor, and a high-accuracy and fast-response method for predicting key indicators of wastewater treatment process is established.
It improves the prediction accuracy and real-time performance of BOD5, a key indicator in wastewater treatment, and solves the problems of insufficient data and diverse working conditions, thus achieving rapid and accurate prediction of key wastewater treatment indicators.
Smart Images

Figure CN115270966B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of sewage treatment, and more particularly to a sewage treatment process key indicator BOD5 prediction method based on a domain adaptive network of uncertain modeling. BACKGROUND
[0002] Sewage is mostly a kind of pollution produced by human beings in the production process, and the water pollution caused by industry is the most serious. In industry, the factors causing water pollution include not only direct discharge of wastewater into water bodies, but also solid waste and waste gas.
[0003] The generation of sewage will cause great pollution, so the treatment of sewage becomes very critical. In the process of sewage treatment, it is very important to check whether the treated sewage meets the treatment standard and whether it can be reused after treatment
[0004] However, the existing technology cannot effectively measure the key indicators in the sewage treatment process in real time, and often relies on manual experience to predict the sewage data.
[0005] Therefore, there is an urgent need for a sewage treatment process key indicator prediction method to effectively predict the key indicators of sewage in the sewage treatment process in real time. SUMMARY
[0006] The purpose of the present application is to provide a sewage treatment process key indicator prediction method and device, which solves the problem that the existing technology cannot effectively measure the key indicators in the sewage treatment process in real time.
[0007] In order to achieve the above purpose, the present application provides a sewage treatment process key indicator prediction method, comprising the following steps:
[0008] Step S1, according to the key indicator to be predicted, combining the sewage treatment process to determine the process data to be collected, taking the process data as the target domain, collecting the similar working condition data of the sewage treatment process as the source domain, taking the process data in the target domain and the source domain as input variables, and taking the key indicator to be predicted as output variables;
[0009] Step S2, normalizing the process data in the target domain and the source domain;
[0010] Step S3, setting a feature extractor and a predictor module, constructing a domain adaptive network, and initializing model parameters;
[0011] Step S4, randomly sampling the process data in the source domain and the target domain obtained in step S2 after normalization, and extracting sample features through the feature extractor of step S3;
[0012] Step S5, based on the sample features in the source domain and the target domain obtained in step S4, a domain loss function is set based on the maximum mean discrepancy distance to measure the difference between the source domain and the target domain, and the feature extractor is optimized;
[0013] Step S6, based on the sample features in the source domain and the target domain obtained in step S4, the feature difference of the domain distribution is quantified based on the manifold distance, and the adaptive feature is constructed by modeling the uncertainty of the difference, and the constructed adaptive feature is used to optimize the predictor;
[0014] Step S7, repeating steps S4 to S6, training the feature extractor and the predictor until the set convergence condition is met, and obtaining a soft measurement model of the domain adaptation network based on uncertainty modeling;
[0015] Step S8, the wastewater data to be predicted is normalized and input into the soft measurement model obtained in step S7 to predict the key indicators, and the predicted value of the key indicators in the wastewater treatment process is obtained.
[0016] In an embodiment, the wastewater treatment process data obtained in step S1 includes:
[0017] Dissolved oxygen concentration, dissolved nitrogen concentration, alkalinity, inert inorganic suspended solids, total suspended solids concentration, volatile suspended solids concentration, total inorganic suspended solids concentration, chemical oxygen demand, biological oxygen demand, ammonia nitrogen concentration, nitrate nitrogen concentration, total Kjeldahl nitrogen, nitrogen concentration, active heterotrophic bacteria concentration and active autotrophic bacteria concentration.
[0018] In an embodiment, the normalization method in step S2 includes a 0-mean normalization method.
[0019] The formula of 0-mean normalization is:
[0020] z=(x-μ) / σ;
[0021] In the formula, z is the normalized data, x is the original data, μ is the expectation of the original data, and σ is the variance of the original data.
[0022] In an embodiment, the step S3 of constructing the domain adaptation network further includes:
[0023] Step S31, extracting the features of the source domain and the target domain through the feature extractor, and calculating the domain difference loss function
[0024] Step S32, according to the features of the source domain, obtaining the predicted value of the key indicators through the predictor, and constructing the prediction loss function according to the difference between the predicted value and the true value
[0025] Step S33, weighting the domain difference loss function of step S31 and the prediction loss function of step S32 to obtain a total loss function of the domain adaptive network in the construction process, and adjusting the parameters of the domain adaptive network through iteration of the domain adaptive network to make the total loss function decrease.
[0026] In an embodiment, the step S5 of optimizing the feature extractor further comprises:
[0027] The gradient descent optimization algorithm is used to optimize the feature extractor, and the corresponding expression is:
[0028]
[0029]
[0030] In the formula, χ s is the source domain data, n s is the number of source domain data, χ t is the target domain data, n t is the number of target domain data, f is the feature extractor, and λ is the difference loss importance penalty parameter.
[0031] In an embodiment, the step S6 of quantifying the feature difference of the domain distribution based on the manifold distance and modeling the uncertainty of the difference to construct adaptive features, and using the constructed adaptive features to optimize the predictor, further comprises the following steps:
[0032] Step S61, using the manifold distance to define the feature difference of the target domain sample to the source domain distribution, and the corresponding expression is:
[0033]
[0034] Step S62, quantifying the difference between the features of each target domain and source domain, and the corresponding expression is:
[0035]
[0036]
[0037] Step S63, constructing adaptive features in the training stage according to the quantified difference through uncertainty modeling, and the corresponding expression is:
[0038] U(f,x,e)=f(x)+d f ;
[0039]
[0040] Step S64, determining the loss function of the predictor:
[0041]
[0042] s.t.a(x)=f(x)+d f ;
[0043]
[0044]
[0045]
[0046] wherein: z t,q is the target domain feature, z s,i is the source domain feature, is the distribution of the source domain feature, d f is the value of the difference between the two domains, a is the adaptive feature extractor, k s is the scaling factor of the estimated difference value and the actual difference value in the training.
[0047] In an embodiment, the training process of step S7 further comprises the following steps:
[0048] setting the scaling factor k s of the estimated difference value and the actual difference value in the training, the optimizer opt s of the source domain, the optimizer opt t of the target domain and the stopping criterion value;
[0049] repeating the steps S4 to S6, iteratively adjusting the parameters of the constructed system model according to the iterative algorithm, so that the total loss decreases until the set number of iterations is met.
[0050] In an embodiment, the key indicator is BOD5.
[0051] The step S8 further comprises: inputting the sewage data to be predicted into the soft measurement model obtained in step S7, and predicting the key indicator BOD5 of the sewage treatment process through the soft measurement model.
[0052] To achieve the above purpose, the present application provides a sewage treatment process key indicator prediction device, comprising:
[0053] a memory for storing instructions executable by the processor;
[0054] a processor for executing the instructions to implement the method as claimed in any one of the above.
[0055] To achieve the above purpose, the present application provides a computer readable medium having computer instructions stored thereon, wherein when the computer instructions are executed by the processor, the method as claimed in any one of the above is executed.
[0056] The application provides a sewage treatment process key index prediction method and device, and adopts a soft measurement model based on a domain adaptive network of uncertain modeling to solve problems such as insufficient data quantity and diversity of working condition changes, the model has the characteristics of high precision and fast response speed, and greatly improves the accuracy and real-time performance of the key index BOD5 prediction of sewage in the sewage treatment process. BRIEF DESCRIPTION OF DRAWINGS
[0057] The above and other features, aspects and advantages of the present application will become more apparent by reference to the following Description and accompanying drawings wherein like reference numerals refer to like features throughout the several views, and wherein:
[0058] Figure 1 A flow chart of a sewage treatment process key index prediction method according to an embodiment of the application is disclosed;
[0059] Figure 2 A principle diagram of a domain adaptive framework with uncertain modeling according to an embodiment of the application is disclosed;
[0060] Figure 3 A variation diagram of a loss function in an iteration process according to an embodiment of the application is disclosed;
[0061] Figure 4a A comparison diagram of predicted values and real values of source domain test samples using a DANUM method is disclosed;
[0062] Figure 4b A comparison diagram of predicted values and real values of source domain test samples using a NN method is disclosed;
[0063] Figure 5a A comparison diagram of predicted values and real values of target domain test samples using a DANUM method is disclosed;
[0064] Figure 5b A comparison diagram of predicted values and real values of target domain test samples using a NN method is disclosed;
[0065] Figure 6 A principle block diagram of a sewage treatment process key index prediction device according to an embodiment of the application is disclosed. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical scheme and advantages of the present application more clear, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0067] Soft measurement is an effective technology for solving the prediction of key indicators of sewage. In the prediction process of key indicators of sewage, soft measurement can predict the key indicators of sewage which are difficult to measure in real time in the sewage treatment process through the process of sewage treatment and process data of sewage, thereby reducing the prediction of sewage data relying on manual experience, and having important significance for data prediction of the sewage treatment process.
[0068] Figure 1 A flow chart of a key indicator prediction method for a sewage treatment process according to an embodiment of the present application is disclosed, as shown in Figure 1 The key indicator prediction method for the sewage treatment process based on the domain adaptive network of uncertain modeling provided by the present application comprises the following steps:
[0069] Step S1, according to the key indicators to be predicted, combining the sewage treatment process to determine the process data to be collected, taking the process data as the target domain, collecting the similar working condition data of the sewage treatment process as the source domain, taking the process data in the target domain and the source domain as the input variable, and taking the key indicators to be predicted as the output variable;
[0070] Step S2, normalizing the process data in the target domain and the source domain;
[0071] Step S3, setting a feature extractor and a predictor module, constructing a domain adaptive network, and initializing model parameters;
[0072] Step S4, respectively randomly sampling the process data in the source domain and the target domain obtained in step S2 after normalization, and extracting sample features through the feature extractor in step S3;
[0073] Step S5, based on the sample features in the source domain and the target domain obtained in step S4, setting a domain loss function based on the maximum mean difference distance, measuring the difference between the source domain and the target domain, and optimizing the feature extractor;
[0074] Step S6, based on the sample features in the source domain and the target domain obtained in step S4, quantifying the feature difference of domain distribution based on the manifold distance, and modeling the difference to construct adaptive features, and using the constructed adaptive features to optimize the predictor;
[0075] Step S7, repeating steps S4 to S6 to train the feature extractor and the predictor until the set convergence condition is met, to obtain a soft measurement model based on the domain adaptive network of uncertain modeling;
[0076] Step S8, inputting the normalized sewage data to be predicted into the soft measurement model obtained in step S7 to predict the key indicators, and obtaining the predicted value of the key indicators in the sewage treatment process.
[0077] The key index prediction method of the sewage treatment process can construct adaptive characteristics according to the to-be-measured sample, the soft measurement model has the characteristics of high precision and fast response speed, and can predict the key index BOD5 of sewage, and can also predict the key index such as chemical oxygen demand (COD) of other sewage in the treatment process.
[0078] Figure 2 The field adaptation framework schematic diagram with uncertainty modeling according to an embodiment of the present application is disclosed, as shown in Figure 1 and Figure 2 The above steps of the present application will be described in detail taking BOD5 as an example. It should be understood that the above technical features of the present application and the technical features specifically described below (such as the embodiments) can be combined with each other and related to each other within the scope of the present application, thereby forming a preferred technical solution.
[0079] Step S1, according to the to-be-predicted key index, combining the sewage treatment process to determine the process data to be collected, taking the process data as the target domain, collecting the similar working condition data of the sewage treatment process as the source domain, taking the process data in the target domain and the source domain as the input variable, and taking the to-be-predicted key index as the output variable;
[0080] Step S1 is the collection of sewage treatment process data. According to the to-be-predicted key index BOD5, combining the prior knowledge of the sewage treatment process to determine the process data to be collected, which is taken as the target domain.
[0081] Further, in step S1, the obtained sewage treatment process data includes but is not limited to dissolved oxygen concentration, dissolved nitrogen concentration, alkalinity, inert inorganic suspended solids, total suspended solids concentration, volatile suspended solids concentration, total inorganic suspended solids concentration, chemical oxygen demand, biological oxygen demand, ammonia nitrogen concentration, nitrate nitrogen concentration, total Kjeldahl nitrogen TKN, nitrogen concentration, active heterotrophic bacteria concentration, and active autotrophic bacteria concentration.
[0082] It should be noted that the similar working condition of the sewage treatment process refers to the working state similar to the related preset parameters of the to-be-predicted key index, and the related preset parameters include the temperature, flow, bacteria species, biochemical reaction of the sewage treatment, and the process used for the sewage treatment.
[0083] Step S2, normalizing the process data in the target domain and the source domain.
[0084] Step S2 is to normalize all data. The normalization method is used to eliminate the influence of the dimension of the variable on the relationship between the variables and eliminate the difference between the characteristics.
[0085] The normalization method includes but is not limited to 0-mean standardization and the like.
[0086] The formula of the mean value normalization is:
[0087] z = (x - μ) / σ;
[0088] In the formula, z is the normalized data, x is the original data, μ is the expectation of the original data, and σ is the variance of the original data.
[0089] Step S3, setting a feature extractor and a predictor module, constructing a domain adaptation network, and initializing model parameters.
[0090] Step S3 is to construct a domain adaptation network, initialize model parameters, and set a suitable batch-size.
[0091] Model parameters: number of training times (epoch), input variable dimension (xdim), output variable dimension (ydim), hidden variable dimension (zdim), number of hidden layers (hidden), data amount of each batch input (batch_size), and variable scaling value (scale).
[0092] Further, the system model constructed based on the domain adaptation network in step S3 has the following construction process:
[0093] Step S31, extracting features of the source domain and the target domain through a neural network or other feature extractor, and calculating a domain difference loss function
[0094] Step S32, obtaining predicted values of key indicators through a predictor according to the features of the source domain, and constructing a prediction loss function according to the difference between the predicted values and real values
[0095] Step S33, weighting the two losses to obtain a total loss function of the domain adaptation network in the construction process, adjusting parameters of the domain adaptation network through iteration of the domain adaptation network, and reducing the total loss function;
[0096] In the formula, χ s is the source domain data; χ t is the target domain data; f is the feature extractor; y s is the label of the source domain data; and g is the predictor.
[0097] Step S4, respectively randomly sampling the process data in the source domain and the target domain obtained in step S2 after normalization processing, and extracting sample features through the feature extractor in step S3.
[0098] The data in the source domain and the target domain obtained in step S2 after normalization are respectively randomly sampled, and features thereof are extracted through the feature extractor.
[0099] Step S5, based on the sample features in the source domain and the target domain obtained in step S4, set the domain loss function based on the maximum mean difference distance, measure the difference between the source domain and the target domain, and optimize the feature extractor.
[0100] Step S5 is to optimize the feature extractor. Set the difference between the sample features of the source domain and the target domain based on the maximum mean difference MMD distance, set the domain loss function, measure the difference between the source domain and the target domain, and optimize the feature extractor.
[0101] Further, in step S5, the feature extractor can be optimized using optimization algorithms including but not limited to gradient descent method during model training based on MMD distance, and the corresponding expression is:
[0102]
[0103]
[0104] In the formula, χ s is the source domain data, n s is the number of source domain data, χ t is the target domain data, n t is the number of target domain data, f is the feature extractor, and λ is the difference loss importance penalty parameter.
[0105] Step S6, based on the sample features in the source domain and the target domain obtained in step S4, quantify the feature difference of the domain distribution based on the manifold distance, and model the uncertainty of the difference to construct adaptive features, and use the constructed adaptive features to optimize the predictor.
[0106] Step S6 is the optimization predictor step. Further, in step S6, based on the manifold distance to quantify the feature difference of the domain distribution, and model the uncertainty of the difference to construct adaptive features, and use the constructed adaptive features to optimize the predictor, further comprising the following steps:
[0107] Step S61, the manifold distance is used to define the feature difference of the target domain sample to the source domain distribution, and the corresponding expression is:
[0108]
[0109] Step S62, assuming that using the features of the source domain will not cause the model performance to decrease, and using the features of other domains will cause the model performance to decrease, the difference between the source domain and the target domain is measured by the manifold distance, which quantifies the difference between the features of each target domain and the source domain, and the corresponding expression is:
[0110]
[0111]
[0112] Step S63, according to the quantified difference, an adaptive feature is constructed in the training stage by uncertainty modeling, and the corresponding expression is:
[0113] U(f, x, e) = f(x) + d f ;
[0114]
[0115] Step S64, the loss function of the predictor is determined:
[0116]
[0117] s.t.a(x) = f(x) + d f ;
[0118]
[0119]
[0120]
[0121] In the formula: z t,q is the target domain feature, z s,i is the source domain feature, is the distribution of the source domain feature, d f is the value of the difference between the two domains, a is the adaptive feature extractor, k s is the proportion factor of the estimated difference value and the actual difference value in the training.
[0122] Step S7, steps S4 to S6 are repeated to train the feature extractor and the predictor until the set convergence condition is met, and a soft measurement model of the domain adaptive network based on uncertainty modeling is obtained to predict the key indicators of the wastewater treatment process.
[0123] The soft measurement model of the domain adaptive network (DANUM) based on uncertainty modeling in step S7 is composed of the feature extractor in step S5 and the predictor and uncertainty modeling module in step S6.
[0124] The training process of step S7 further includes the following steps:
[0125] The proportion factor (k s ) of the estimated difference value and the actual difference value in the training, the optimizer (opt s ) of the source domain, the optimizer (opt t ) of the target domain and the stop criterion value are set;
[0126] The steps S4 to S6 are repeated, and the constructed system model is iterated according to an iterative algorithm, and the parameters of the system model are adjusted to reduce the total loss until the set iteration number is met and the process is stopped.
[0127] In combination with the process of steps S4-S6, the training process of step S7 is as follows:
[0128] Step S71, according to prior knowledge, set the proportion factor (k s ) of the estimated difference and the actual difference in training, the optimizer (opt s ) of the source domain, the optimizer (opt t ) of the target domain and the stopping criterion value.
[0129] Step S72, sample data x s ,x t , and use the feature extractor to extract the corresponding features z s ,z t .
[0130] Step S73, based on the MMD distance, measure the difference of the domain distribution:
[0131]
[0132]
[0133] Step S74, based on the manifold distance to quantify the feature difference:
[0134]
[0135] Step S75, use uncertainty modeling to construct adaptive features:
[0136] U(f,x,e)=f(x)+d f ;
[0137]
[0138] Step S76, get the total loss function:
[0139]
[0140] s.t.a(x)=f(x)+d f ;
[0141]
[0142]
[0143]
[0144] Step S77: Iterate the constructed system model according to the iterative algorithm, adjust the parameters of the system model, and reduce the total loss.
[0145] Step S78: Repeat steps S72 to S77 until the set number of iterations is met.
[0146] Step S8: After standardizing the wastewater data to be predicted, input it into the soft measurement model obtained in step S7 to predict key indicators and obtain the predicted values of key indicators in the wastewater treatment process.
[0147] The soft measurement model based on the domain adaptive network obtained in step S7 can be used to predict the key indicator BOD5 in the wastewater treatment process.
[0148] The data of the wastewater treatment process to be predicted is normalized, and then the data is input into the soft measurement model of the domain adaptive network based on uncertainty modeling trained in step S7. The model is used to predict the key indicator BOD5 of the wastewater treatment process, and the predicted value of the key indicator BOD5 of the wastewater treatment process is obtained.
[0149] The present invention will now be described in detail through embodiments. It should be noted that the following embodiments are only used to further illustrate the present invention and should not be construed as limiting the scope of protection of the present invention. Some non-essential improvements and adjustments made by those skilled in the art based on the content of the present invention still fall within the scope of protection of the present invention.
[0150] Example 1
[0151] The following example, using the prediction of BOD5, a key indicator in wastewater treatment, illustrates the specific steps of this invention:
[0152] Step S1: Using the data of the BSM1 model under rainy conditions as the target domain, select the data of the BSM1 model under sunny conditions as the source domain.
[0153] The temperature of the wastewater to be predicted and the wastewater sampled was set to 20℃. The training data included 800 sets of source domain samples and 200 sets of target domain samples.
[0154] The test data includes 1355 source domain samples and 1355 target domain samples. The collected variables are shown in Table 1.
[0155] Table 1: Wastewater Treatment Related Data
[0156]
[0157]
[0158] Step S2: Normalize the data using a normalization method.
[0159] Step S3, constructing a domain adaptive network, initializing model training parameters: training times (epoch), input variable dimension (xdim), output variable dimension (ydim), hidden variable dimension (zdim), number of hidden layers (hidden), data amount of each batch input (batch_size), and variable scaling value (scale).
[0160] Setting a loss function Loss_MSE and an optimizer optimizer.
[0161] Step S4, respectively randomly sampling the process data in the source domain and the target domain obtained in step S2 after normalization processing, and extracting sample features through the feature extractor in step S3.
[0162] Steps S5-S6, training the constructed DANUM model. The loss function transformation is as shown in Figure 3 where the x-axis represents the number of iterations, and the y-axis represents the value of the loss function.
[0163] Step S7, after training, obtaining a soft measurer based on the DANUM model.
[0164] Step S8, after inputting the data of the wastewater to be predicted in the source domain and the target domain into the soft measurer of the DANUM, the key indicators of the wastewater treatment process are obtained.
[0165] In this embodiment, the predicted key indicators of the wastewater treatment process are BOD5.
[0166] Figure 4a A comparison diagram of the predicted value and the true value of the source domain test sample using the DANUM method is disclosed, Figure 4b A comparison diagram of the predicted value and the true value of the source domain test sample using the NN method is disclosed, and the comparison of the predicted value and the actual value using the DANUM method in the source domain is as shown in Figure 4a A comparison diagram of the predicted value and the true value using the artificial neural network (NN) method in the source domain is as shown in Figure 4b The evaluation index is as shown in Table 2.
[0167] Figure 5a A comparison diagram of the predicted value and the true value of the target domain test sample using the DANUM method is disclosed, Figure 5b A comparison diagram of the predicted value and the true value of the target domain test sample using the NN method is disclosed, and the comparison of the predicted value and the actual value using the DANUM method in the target domain is as shown in Figure 5a A comparison diagram of the predicted value and the true value using the artificial neural network (NN) method in the target domain is as shown in Figure 5b The evaluation index is as shown in Table 3.
[0168] The evaluation index used is the determination coefficient R 2 and the root mean square error RMSE:
[0169]
[0170]
[0171] where y i is the actual value of the key indicator BOD5 of the wastewater treatment process at the i-th sample point, is the predicted value of the key indicator BOD5 of the wastewater treatment process at the i-th sample point, is the average value of the true values of the key indicator BOD5 of the wastewater treatment process of all selected sample points.
[0172] The experimental results show that the method can achieve better prediction accuracy on the target domain, which proves the effectiveness of the method.
[0173] Table 2: Evaluation index in the source domain using the DANUM method and the NN method
[0174] R^2 RMSE DANUM 0.999302 2.562027 NN 0.998969 3.114426
[0175] Table 3: Evaluation index in the target domain using the DANUM method and using the NN method
[0176]
[0177]
[0178] Figure 6 Fig. 1 shows a schematic diagram of a wastewater treatment process key indicator prediction device according to an embodiment of the present application. The wastewater treatment process key indicator prediction device can comprise an internal communication bus 601, a processor 602, a read-only memory (ROM) 603, a random access memory (RAM) 604, a communication port 605, and a hard disk 607. The internal communication bus 601 can enable data communication between the components of the wastewater treatment process key indicator prediction device. The processor 602 can make judgments and issue prompts. In some embodiments, the processor 602 can be composed of one or more processors.
[0179] The communication port 605 can realize data transmission and communication between the sewage treatment process key indicator prediction device and external input / output devices. In some embodiments, the sewage treatment process key indicator prediction device can send and receive information and data from the network through the communication port 605. In some embodiments, the sewage treatment process key indicator prediction device can realize data transmission and communication between the external input / output devices in the form of wired through the input / output port 606.
[0180] The sewage treatment process key indicator prediction device can also include different forms of program storage units and data storage units, such as hard disk 607, read-only memory (ROM) 603 and random access memory (RAM) 604, which can store various data files used by computer processing and / or communication, and possible program instructions executed by the processor 602. The processor 602 executes these instructions to implement the main part of the method. The results processed by the processor 602 are transmitted to the external output device through the communication port 605 and displayed on the user interface of the output device.
[0181] For example, the implementation process file of the sewage treatment process key indicator prediction device described above can be a computer program stored in the hard disk 607 and executed by the processor 602 to implement the method of the present application.
[0182] When the implementation process file of the sewage treatment process key indicator prediction method is a computer program, it can also be stored in a computer readable storage medium as an article of manufacture. For example, the computer readable storage medium can include but is not limited to magnetic storage devices (such as hard disks, floppy disks, magnetic strips), optical disks (such as compact disks (CD), digital versatile disks (DVD)), smart cards and flash memory devices (such as electrically erasable programmable read-only memory (EPROM), cards, sticks, key drives). In addition, the various storage media described herein can represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" can include but is not limited to wireless channels and various other media (and / or storage media) that can store, include and / or carry code and / or instructions and / or data.
[0183] The present application provides a sewage treatment process key indicator prediction method and device, which has the following advantages:
[0184] 1) The prediction is more accurate and fast, which solves the problem of predicting the key indicator BOD5 in the sewage treatment process, and has important significance;
[0185] 2) Compared with the traditional soft measurement method, the soft measurement based on DANUM solves the problems of insufficient data quantity, diversity of working conditions and the like, and greatly improves the accuracy of predicting the key indicator BOD5 of sewage in the sewage treatment process;
[0186] 3) For other sewage, the method also has certain prediction function for key indexes such as chemical oxygen demand (COD) in the treatment process;
[0187] 4) The characteristic value can also be changed adaptively, which improves the adaptive performance of the model and meets the real-time detection needs in time.
[0188] Although the above methods are illustrated and described as a series of acts, it will be appreciated that the methods are not limited by the order of acts, as some acts can, in accordance with one or more embodiments, occur simultaneously or in different orders than shown and described herein. In addition, not all illustrated steps can be required to implement the methods described herein.
[0189] As shown in the present application and claims, unless the context clearly indicates otherwise, the words "a", "an", "one", and / or "the" do not mean only singular, but also include plural. Generally, the terms "comprise" and "include" only indicate the inclusion of the steps and elements explicitly identified, and these steps and elements do not constitute an exclusive list, and the method or device can also include other steps or elements.
[0190] The above embodiments are provided to those skilled in the art to implement or use the present application, and those skilled in the art can make various modifications or changes to the above embodiments without departing from the inventive concept of the present application, so the protection scope of the present application should not be limited by the above embodiments, but should be the maximum scope of the innovative features mentioned in the claims.
Claims
1. A method for predicting key indicators in a wastewater treatment process, characterized in that, Includes the following steps: Step S1: Based on the key indicators to be predicted, determine the process data to be collected in conjunction with the wastewater treatment process. Use this process data as the target domain, collect data on similar operating conditions to the wastewater treatment process as the source domain, and use the process data in the target domain and the source domain as input variables, and the key indicators to be predicted as output variables. Step S2: Normalize the process data in the target domain and the source domain; Step S3: Set up the feature extractor and predictor modules, build the domain adaptive network, and initialize the model parameters; Step S4: Randomly sample the process data in the source domain and target domain obtained in step S2 after normalization, and extract sample features through the feature extractor in step S3. Step S5: Based on the sample features in the source and target domains obtained in Step S4, set the domain loss function based on the maximum mean difference distance to measure the difference between the source and target domains and optimize the feature extractor. Step S6: Based on the sample features obtained in the source and target domains in Step S4, quantify the feature differences of the domain distribution based on the manifold distance, and perform uncertainty modeling on the differences to construct adaptive features. Optimize the predictor using the constructed adaptive features. Step S7: Repeat steps S4 to S6 to train the feature extractor and predictor until the set convergence condition is met, and obtain the soft measurement model of the domain adaptive network based on uncertainty modeling. Step S8: After standardizing the wastewater data to be predicted, input it into the soft measurement model obtained in step S7 to predict key indicators and obtain the predicted values of key indicators in the wastewater treatment process. In step S6, the characteristic differences of the domain distribution are quantified based on manifold distance, and the uncertainty of the differences is modeled to construct adaptive features. The predictor is then optimized using the constructed adaptive features. This step further includes the following steps: Step S61: Use manifold distance to define the feature difference of the target domain samples with respect to the source domain distribution. The corresponding expression is: Step S62: Quantify the differences between the features of each target domain and the source domain, with the corresponding expression being: Step S63: Based on the quantization difference, construct adaptive features during the training phase through uncertainty modeling. The corresponding expression is: Step S64: Determine the loss function of the predictor: In the formula: For target domain features, Features of the source domain The distribution of source domain features, To quantify the difference between two domains, For adaptive feature extractors, This is the scaling factor between the estimated difference and the actual difference during training.
2. The method for predicting key indicators in wastewater treatment processes according to claim 1, characterized in that, The wastewater treatment process data obtained in step S1 includes: Dissolved oxygen concentration, dissolved nitrogen concentration, alkalinity, inert inorganic suspended solids, total suspended solids concentration, volatile suspended solids concentration, total inorganic suspended solids concentration, chemical oxygen demand, biological oxygen demand, ammonia nitrogen concentration, nitrate nitrogen concentration, total Kjeldahl nitrogen, nitrogen concentration, active heterotrophic bacteria concentration, and active autotrophic bacteria concentration.
3. The method for predicting key indicators in the wastewater treatment process according to claim 1, characterized in that, The normalization method in step S2 includes the zero-mean normalization method; The formula for zero-mean standardization is: ; In the formula, z represents the standardized data, x represents the original data, μ represents the expected value of the original data, and σ represents the variance of the original data.
4. The method for predicting key indicators in wastewater treatment processes according to claim 1, characterized in that, The construction of the domain adaptive network in step S3 further includes: Step S31: Extract features from the source and target domains using a feature extractor, and calculate the domain difference loss function. ; Step S32: Based on the characteristics of the source domain, obtain the predicted values of key indicators through the predictor, and construct a prediction loss function based on the difference between the predicted values and the true values. ; Step S33: The domain difference loss function from step S31 and the prediction loss function from step S32 are weighted to obtain the total loss function of the domain adaptive network during the construction process. By iterating the domain adaptive network, the parameters of the domain adaptive network are adjusted to reduce the total loss function. in, For source domain data, For target domain data, For feature extractors, Labels for source domain data, g For predictors.
5. The method for predicting key indicators in wastewater treatment processes according to claim 4, characterized in that, In step S5, optimizing the feature extractor further includes: The feature extractor is optimized using the gradient descent optimization algorithm, and the corresponding expression is: In the formula, For source domain data, The number of data in the source domain. For target domain data, The number of data in the target domain. For feature extractors, This is the parameter for penalizing the importance of difference loss.
6. The method for predicting key indicators in wastewater treatment processes according to claim 1, characterized in that, The training process in step S7 further includes the following steps: Set the scaling factor between the estimated difference and the actual difference during training. Optimizer of the source domain Optimizer for the target domain and stopping criterion values; Repeat steps S4 to S6, iterating the constructed system model according to the iterative algorithm, adjusting the parameters of the system model to reduce the total loss, until the set number of iterations is met and then stopping.
7. The method for predicting key indicators in wastewater treatment processes according to claim 1, characterized in that, The key indicator is BOD5. Step S8 further includes: inputting the wastewater data to be predicted into the soft sensor model obtained in step S7, and using the soft sensor model to predict the key indicator BOD5 of the wastewater treatment process.
8. A device for predicting key indicators in a wastewater treatment process, comprising: Memory is used to store instructions that can be executed by the processor; A processor for executing the instructions to implement the method as described in any one of claims 1-7.
9. A computer-readable medium having stored thereon computer instructions, wherein when the computer instructions are executed by a processor, the method as described in any one of claims 1-7 is performed.
Citation Information
Patent Citations
Method for predicting residual life of rotating machinery under multiple working conditions based on dynamic domain adaptation network
CN112765890A
Sewage treatment intelligent prediction method based on fusion neural network
CN113837356A