A production model and control method based on big data technology for wastewater treatment
By establishing a DNN and an improved LSTM model based on big data from wastewater treatment, the problem of low operating efficiency in wastewater treatment plants was solved, and efficient and stable water quality control and production optimization were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-28
- Publication Date
- 2026-04-03
AI Technical Summary
Existing wastewater treatment plants operate inefficiently, have broad treatment indicators, lack theoretical guidance, and produce unstable effluent quality and precision. Existing artificial intelligence models lack data processing and detailed rules for overall model building, making them difficult to apply to production.
A production model based on wastewater treatment big data is established. A DNN data model and an improved LSTM model are adopted. Through data collection, preprocessing, correlation and sensitivity analysis, high-impact factor data are extracted, a supervised learning model is established, and data prediction and production control are carried out.
It improved the overall operating efficiency and effluent quality of the wastewater treatment plant, optimized production efficiency and made efficient use of input materials, achieving the goal of low cost and high efficiency.
Smart Images

Figure CN116151458B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing and artificial intelligence-assisted decision-making, specifically to a production model and control method based on wastewater treatment big data technology. Background Technology
[0002] The key to solving pollution problems caused by wastewater discharge is wastewater treatment. As a crucial part of the water cycle, wastewater treatment is primarily implemented through the development and construction of wastewater treatment plants. Currently, wastewater treatment plants in my country have achieved basic nationwide coverage. However, the operational status of these plants is not optimistic. Most plants employ a rather extensive approach to wastewater treatment, with their treatment indicators only related to wastewater flow rate. This results in low input-output ratios and overall low operational efficiency. Only a small number of wastewater treatment plants achieve refined treatment, but this relies solely on empirical models and lacks theoretical guidance, leading to inconsistent effluent quality and precision.
[0003] In recent years, artificial intelligence technology based on big data has demonstrated powerful learning and nonlinear approximation capabilities, providing a new approach for predicting various indicators and making decisions regarding production behavior in wastewater treatment plants. Key research areas in this field include:
[0004] Chinese patent document with publication number CN106168759A discloses a coagulation dosing control method and system based on artificial neural network algorithm. By collecting coagulation dosing sample data and preprocessing it, a neural network is established. The collected data is used for training, and the weights of the neural network are updated according to the error of the neural network to complete the training. This realizes the full automation of the coagulation dosing process and the online monitoring of production operation parameters.
[0005] Chinese patent document CN113705898A discloses a method and system for predicting the dosage of coagulant in tap water. It uses a deep learning algorithm to establish a calculation model for the dosage of coagulant, inputs the influencing factors of the dosage of coagulant in tap water into the calculation model, and predicts the dosage of coagulant. This provides a method for calculating the dosage of coagulant in tap water treatment process for optimizing the control of the coagulant dosing system.
[0006] Chinese patent document CN110824923A discloses a wastewater treatment control method and system based on deep learning and cloud computing. The method collects dosing parameters and influent and effluent parameters of the wastewater treatment plant, sends each parameter to a cloud server, and uses a deep learning algorithm to obtain a dosing prediction model. The model is then installed in an algorithm controller located at the wastewater treatment site, so that the algorithm controller can calculate the wastewater treatment agents and their dosages based on the influent and effluent parameters, and control the dosing execution device to complete the dosing based on the calculation results.
[0007] Chinese patent document CN110490409B discloses a method for setting a benchmark value for low-voltage transformer area line loss rate based on DNN. Based on actual operating data, it extracts key factors affecting the line loss rate and uses DNN to establish a calculation model for the benchmark value of low-voltage transformer area line loss rate. This method can provide a benchmark value for the line loss rate of low-voltage transformer areas, providing a "benchmark" for line loss in various types of transformer areas and clarifying the direction for loss reduction.
[0008] The solutions disclosed in the aforementioned patent documents all involve establishing artificial intelligence models, training them on collected data, and refining the models' parameters. Within their respective fields, these solutions have all contributed to improving production efficiency to some extent. However, the following shortcomings still exist:
[0009] 1) The technical solution disclosed in the Chinese patent document with publication number CN106168759A is merely a simple application of the deep neural network model, without involving data processing and the construction of the overall model.
[0010] 2) Chinese patent documents with publication numbers CN113705898A and CN110824923A both propose an architecture, but they do not involve data processing and specific model building schemes, nor do they have executable implementation details, and are not operable for production.
[0011] 3) The technical solution disclosed in Chinese patent document CN110490409B is applied to the field of power system and solves the technical problem of lacking benchmark value indicators for transformer area line loss rate in the prior art. It is not applicable to the field of sewage treatment. Summary of the Invention
[0012] In order to improve and balance the overall operating efficiency of wastewater treatment plants as well as the quality and precision of effluent, this invention provides a production model and control method based on wastewater treatment big data technology.
[0013] The technical solution adopted in this invention is:
[0014] A production model based on wastewater treatment big data technology is characterized by including a DNN data model and an improved LSTM model with periodic characteristics.
[0015] The DNN data model is established according to the following steps:
[0016] Step A1: Data Acquisition and Preprocessing
[0017] Collect influent data before wastewater treatment, production data during treatment, and effluent data after treatment, and perform data cleaning and normalization in sequence.
[0018] Step A2: Obtain the impact factor indicators of the full data
[0019] A2.1 Obtain correlation indicators between different parameters within the same data group and between different data groups, wherein the correlation indicators include linear and nonlinear correlations;
[0020] A2.2 Conduct sensitivity analysis on key indicators affecting wastewater treatment objectives and establish sensitivity measurement indicators for these key indicators;
[0021] A2.3 Based on the aforementioned correlation and sensitivity metrics, an impact factor index for the entire dataset is formed;
[0022] Step A3: Extract high impact factor data
[0023] Using the sensitivity metric in step A2.2, obtain the key parameters that affect the key indicators. Based on the influence factor index obtained in step A2.3, extract the top N high influence factor data that have a greater impact on the key parameters from the influent data set / full data set; N≥3;
[0024] Step A4: Establish the DNN data model
[0025] DNN data models are established and trained for the key parameters respectively until their loss function converges to meet the set requirements. The DNN data models use the top N high-impact factor data as model features and the key parameters as model labels.
[0026] The improved LSTM model with periodic characteristics is established according to the following steps:
[0027] B1: Perform ADF stability assessment on the historical data of the N high-impact factor data extracted in step A3, and adjust the stability of the historical data according to the assessment results;
[0028] B2: Test the stability-adjusted data from step B1 using autocorrelation function (ACF) and autocorrelation function (PACF), and extract the periodic characteristics of the data based on the test results;
[0029] B3: Establish an LSTM model based on RNN, and apply the periodic features to the LSTM model to obtain an improved LSTM model with periodic features;
[0030] The current values of the N high-impact factor data are input into the improved LSTM model with periodic characteristics to obtain the predicted value at any future time. The predicted value is then input into the DNN data model to obtain the predicted value of the key parameters of the key indicators affecting the wastewater treatment target at the corresponding time. The predicted value of the key parameters is the basis for wastewater treatment production control.
[0031] Furthermore, in step A1:
[0032] The data in the influent data set for wastewater treatment includes raw water turbidity, raw water conductivity, raw water dissolved oxygen, raw water COD, raw water ammonia nitrogen, influent turbidity, influent pH, influent flow rate, and influent temperature.
[0033] The production data set in the wastewater treatment process includes sludge level, return flow rate, sludge discharge flow rate, coagulant dosage, and polymer dosage.
[0034] The data in the wastewater post-treatment effluent data set includes effluent pH and residual chlorine.
[0035] Furthermore, in step A2.1:
[0036] The linear and nonlinear correlations between different parameters belonging to the same data set are calculated according to the following formula:
[0037] Linear correlation:
[0038]
[0039] Nonlinear correlation:
[0040]
[0041] In the formula:
[0042] x a,i This represents the i-th data point in dataset a;
[0043] r a,b (o a ,o b ) represents o a with o b Linear correlation between them;
[0044] s a,b (o a ,o b ) represents o a with o bNonlinear correlation between them;
[0045] o a This represents all values collected from data 'a'.
[0046] o b This represents all values collected from data b;
[0047] o a ,o b ∈{o 原水浊度 ,o 原水导电率 ,o 原水溶解氧 ,o 原水COD ,o 原水氨氮 ,o 进水浊度 ,o 进水PH ,o 进水流量 ,o 进水温度 ,o 泥位 ,o 回流流量 ,o 排泥流量 ,o 混凝剂投加量 ,o 聚合物投加量 ,o 出口PH ,o 余氯};
[0048] m represents the amount of data collected for a certain parameter, and the amount of data m for all parameters is equal;
[0049] and Let a and b represent the expected values, respectively.
[0050] The linear and nonlinear correlations between different data groups are calculated according to the following formula:
[0051] Linear correlation:
[0052]
[0053] Nonlinear correlation:
[0054]
[0055] In the formula:
[0056] g p,q (τ p ,τ q ) represents τ p With τ q Linear correlation between them;
[0057] h p,q (τ p ,τ q ) represents τ p With τ q Nonlinear correlation between them;
[0058] τ p ,τ q ∈{τ 污水处理前进水数据群 ,τ 处理过程中生产数据群 ,τ 污水处理后排水数据群},
[0059] τ 污水处理前进水数据群 ={o 原水浊度 ,o 原水导电率 ,o 原水溶解氧 ,o 原水COD ,o 原水氨氮 ,o 进水浊度 ,o 进水PH ,o 进水流量 ,o 进水温度},
[0060] τ 处理过程中生产数据群 ={o 回流流量 ,o 排泥流量 ,o 混凝剂投加量 ,o 聚合物投加量};
[0061] τ 污水处理后排水数据群 ={o 出口PH ,o 余氯};
[0062]
[0063] Furthermore, the sensitivity metric in step A2.2 is calculated according to the following formula:
[0064]
[0065] in:
[0066] v a,b Let b be the sensitivity of a;
[0067] i∈{1,2,…,m-1};
[0068] E is the expectation of the entire set.
[0069] Furthermore, the impact factor index in step A2.3 is calculated according to the following formula:
[0070]
[0071] in:
[0072] λ1+λ2+λ3+λ4+λ5=1;
[0073] ρ α,b This represents the influence factor value between data b and data α;
[0074] r α,bThis indicates the linear correlation between α and b;
[0075] s a,b This indicates the nonlinear correlation between α and b;
[0076] This indicates the linear correlation between data group p, where data α is located, and data group q, where data b is located.
[0077] This represents the nonlinear correlation between data group p containing data α and data group q containing data b.
[0078] Furthermore, step 4 specifically involves:
[0079] A4.1 Using the top N high-impact factor data obtained in step A3 as feature vectors and the key parameters as labels, establish training and testing sets;
[0080] A4.2 Establish a DNN data model with no hidden layers or fewer than 2 hidden layers, select a loss function for testing, if the test result is greater than or equal to 0.1, proceed to step A4.3, if the test result is less than 0.1, the DNN data model is established and trained.
[0081] A4.3 Increase the size of the neural network of the DNN data model and perform the loss function test again. If the test result is greater than or equal to 0.1, proceed to step A4.4. If the test result is less than 0.1, the DNN data model is established and trained.
[0082] A4.4 Based on the impact factor index obtained in step A2.3, increase or decrease the number of high impact factor data extracted in step A3, and then proceed to step A4.2.
[0083] Furthermore, step B3 specifically involves:
[0084] B3.1 Establish a general LSTM model;
[0085] B3.2 Based on the general LSTM model, periodic memory is added to obtain an improved LSTM model with periodic characteristics;
[0086] The improved part of the LSTM model is shown in the following formula:
[0087]
[0088]
[0089]
[0090] h t =o t*tanh(m t )
[0091] in:
[0092] n represents the position of the nth number in the model's feature data.
[0093] Q represents the period segmentation precision;
[0094] Tn represents the period segment in which the nth number is located;
[0095] m t The cellular state representing the periodic memory at time t;
[0096] m t-Q Cellular state representing periodic memory at time tQ
[0097] Represents the candidate states of periodic memory at time t;
[0098] W xmTn The parameter matrix representing the candidate states of the periodic segment Tn;
[0099] b xmTn This represents the bias term for the candidate states of the Tn periodic segment.
[0100] This invention also provides a production control method based on wastewater treatment big data technology, which is unique in that:
[0101] Step 1: Establish the production model described above;
[0102] Step 2: Input the current values of high-impact factor data into the improved LSTM model with periodic characteristics in the production model established in Step 1 to obtain the predicted value at any future time. Input the predicted value into the DNN data model in the production control model to obtain the predicted value of the key parameters of the key indicators affecting the wastewater treatment target at the corresponding time. Control the production based on the obtained predicted value of the key parameters.
[0103] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable thereon; its special feature is that the computer program implements the production control method described above when it runs.
[0104] The present invention also provides a non-volatile computer-readable storage medium having a computer program stored thereon; its special feature is that the computer program implements the production control method described above when it is executed.
[0105] Compared with the prior art, the advantages of the present invention are:
[0106] This invention is based on comprehensive data covering the entire wastewater treatment process. It defines three data clusters: influent data before treatment, production data during treatment, and effluent data after treatment. Correlation and sensitivity analyses are applied to the data processing of these clusters. This method comprehensively forms influence factors, which, compared to traditional single linear or nonlinear correlation methods, more clearly reveals the mutual influence between data. Finally, based on the magnitude of the influence factor coefficients, high-influence factor data is extracted and processed, improving data usability while reducing the computational burden of subsequent data models.
[0107] This invention uses an improved LSTM for data prediction, which enables pre-processing in production, thereby further improving the utilization rate of materials used in production and increasing production efficiency.
[0108] This invention integrates wastewater discharge data and wastewater influent data from wastewater treatment to establish a DNN data model, further optimizing the production data during the treatment process and achieving optimal production efficiency.
[0109] In summary, based on the method of this invention, after systematically collecting various data on the operation of a wastewater treatment plant in batches, artificial intelligence is used to perform data analysis, modeling and prediction, and analysis of major influencing components, thereby establishing a production model. Through correlation analysis of target data, the production model is optimized. Finally, wastewater treatment enterprises can achieve predetermined wastewater treatment goals, such as achieving low cost and high efficiency, by using the control model to guide production. Attached Figure Description
[0110] Figure 1 This is the overall flowchart of the method of the present invention.
[0111] Figure 2 This refers to data cluster modeling in this invention.
[0112] Figure 3 This is a comparison of the influence factors obtained using the comprehensive analysis (linear correlation, nonlinear correlation, inter-group linear correlation, inter-group nonlinear correlation, sensitivity analysis) and those obtained without using the comprehensive analysis in this invention. (a) Figure shows the influence factors obtained without using the comprehensive analysis, and (b) Figure shows the influence factors obtained using the comprehensive analysis.
[0113] Figure 4 This data has a high impact factor on key cost data.
[0114] Figure 5 This is the DNN model used in this invention.
[0115] Figure 6 This is the improved LSTM model used in this invention.
[0116] Figure 7 This is a comparison of the prediction results of the improved LSTM model used in this invention with the prediction results of the LSTM model before the improvement. (a) Figure shows the prediction results before the improvement, and (b) Figure shows the prediction results after the improvement.
[0117] Figure 8 Figure 1 shows the comparison between the predicted and actual values of coagulant and polymer dosage using the improved LSTM model in this invention. (a) Figure 2 shows the comparison between the predicted and actual values of coagulant dosage, and (b) Figure 3 shows the comparison between the predicted and actual values of polymer dosage. Detailed Implementation
[0118] The present invention will now be described in further detail with reference to the embodiments and accompanying drawings.
[0119] This invention is based on actual data from wastewater treatment plants, covering the main parts of the entire wastewater treatment process, including influent screens, grit chambers, wastewater tanks, high-density sedimentation tanks, and post-coagulation tanks. The data spans years, and the time resolution of data acquisition is accurate to the second.
[0120] The overall detailed data obtained mainly includes: raw water data (including turbidity, conductivity, dissolved oxygen, COD, and ammonia nitrogen), common data of influent to the high-density tank (including turbidity, pH, flow rate, and temperature), high-density tank data (sludge level, return flow rate, sludge discharge flow rate, coagulant dosage, and polymer dosage), and post-coagulation tank data (including inlet pH value, outlet pH value, residual chlorine, and coagulant dosage).
[0121] Based on the data obtained above, the following steps will be taken to implement intelligent production control:
[0122] First, the correlation of data is derived from a large amount of known data through an improved correlation analysis method. For example, the correlation of data related to enterprise cost expenditures, including coagulant dosage, polymer dosage and sludge discharge flow rate.
[0123] Secondly, by quantifying the degree of correlation, a sequence related to key indicators of wastewater treatment objectives (such as enterprise cost expenditures) is established from high to low according to the influencing factor indicators. Data that have a greater impact on key indicators of wastewater treatment objectives (such as enterprise cost expenditures) are extracted. For example, the amount of coagulant added may be highly correlated with the influent flow rate and turbidity of wastewater.
[0124] Secondly, a supervised DNN data model is used for learning, with data with high impact factor indices (it is recommended to take the top N data in the impact factor indices, generally the top three data) as learning features to predict the company's drug dosing behavior, thereby achieving the function of automated dosing.
[0125] Finally, an improved LSTM prediction algorithm with periodic reinforcement is used for the highly relevant data used in the DNN data model learning. The output of the LSTM is used as the output of the DNN data model established in the previous step, and the predicted values of key parameters are finally obtained and applied to the production control of the enterprise.
[0126] Reference Figure 1 , 2 The specific implementation steps of the production control method based on wastewater treatment big data technology of the present invention are as follows:
[0127] Step 1: Data Acquisition and Preprocessing
[0128] A data acquisition and preprocessing submodule is established, employing a data acquisition mode that combines real-time and historical data. This involves the following steps:
[0129] Step 1.1: Using smart instrument sensors or manual sampling, establish a data sampling mechanism with the highest possible sampling frequency to obtain three major data groups covering the entire wastewater treatment process: influent data before wastewater treatment, production data during wastewater treatment, and effluent data after wastewater treatment.
[0130] The influent data set for wastewater treatment mainly involves raw water indicators, including raw water turbidity, raw water conductivity, raw water dissolved oxygen, raw water COD, raw water ammonia nitrogen, influent turbidity, influent pH, influent flow rate, and influent temperature;
[0131] The production data in the wastewater treatment process includes sludge level, return flow rate, sludge discharge flow rate, coagulant dosage, and polymer dosage.
[0132] The data in the wastewater post-treatment effluent data set includes effluent pH and residual chlorine.
[0133] Step 1.2: Perform data preprocessing on the data set collected in Step 1.1, including sequential data cleaning to remove outliers generated during data acquisition, and data normalization in preparation for impact factor analysis.
[0134] Step 2: Obtain the impact factor indicators of the full data
[0135] Step 2.1: Establish the correlation of the entire dataset;
[0136] The correlation of the entire dataset includes the correlation between data groups and the correlation between different data groups. This correlation includes linear and non-linear correlations, which are implemented flexibly according to actual needs. Specifically, it includes the following steps:
[0137] Step 2.1.1: Establish intra-group data correlation, that is, the correlation within each data group;
[0138] The correlations within each data cluster include the linear and nonlinear correlations between pairs of parameters within the wastewater pretreatment water data cluster, the linear and nonlinear correlations between pairs of parameters within the wastewater treatment production data cluster, and the linear and nonlinear correlations between pairs of parameters within the wastewater posttreatment effluent data cluster. Among these, establishing the correlations between pairs of parameters within the wastewater pretreatment water data cluster helps reduce the amount of data and can reduce the computational load of the subsequently established DNN data model.
[0139] Specifically, the correlation of data within the group is established using the following method:
[0140] ① Linear correlation is calculated using the following formula:
[0141]
[0142] ②Nonlinear correlation is calculated according to the following formula:
[0143]
[0144] In the formula:
[0145] x a,i This represents the i-th data point in dataset a;
[0146] r a,b (o a ,o b ) represents o a with o b Linear correlation between them;
[0147] s a,b (o a ,o b ) represents o a with o b Nonlinear correlation between them;
[0148] o a This represents all values collected from data 'a'.
[0149] o b This represents all values collected from data b;
[0150] o a ,o b ∈{o 原水浊度 ,o 原水导电率 ,o 原水溶解氧 ,o 原水COD ,o 原水氨氮 ,o 进水浊度 ,o 进水PH ,o进水流量 ,o 进水温度 ,o 泥位 ,o 回流流量 ,o 排泥流量 ,o 混凝剂投加量 ,o 聚合物投加量 ,o 出口PH ,o 余氯};
[0151] m represents the amount of data collected for a certain parameter, and the amount of data m for all parameters is equal;
[0152] and Let a and b represent the expected values, respectively.
[0153] d is the difference in rank between columns a and b.
[0154] Step 2.1.2: Establish inter-group correlations, i.e., the correlations between different data groups;
[0155] The correlations between different data groups include linear and nonlinear correlations between the wastewater influent data group before treatment and the production data group during treatment, linear and nonlinear correlations between the wastewater influent data group before treatment and the wastewater discharge data group after treatment, and linear and nonlinear correlations between the production data group during treatment and the wastewater discharge data group after treatment. Among these, the correlation between the wastewater influent data group before treatment and the production data group during treatment can reveal the production behavior patterns of the wastewater treatment plant, providing initial data for the next step of predicting the addition of chemicals during the production process.
[0156] Specifically, inter-group correlations are established using the following method:
[0157] ① Linear correlation is calculated using the following formula:
[0158]
[0159] ②Nonlinear correlation is calculated according to the following formula:
[0160]
[0161] in:
[0162] g p,q (τ p ,τ q ) represents τ p With τ q Linear correlation between them;
[0163] h p,q (τ p ,τ q ) represents τp With τ q Nonlinear correlation between them;
[0164] τ p ,τ q ∈{τ 污水处理前进水数据群 ,τ 处理过程中生产数据群 ,τ 污水处理后排水数据群},
[0165] τ 污水处理前进水数据群 ={o 原水浊度 ,o 原水导电率 ,o 原水溶解氧 ,o 原水COD ,o 原水氨氮 ,o 进水浊度 ,o 进水PH ,o 进水流量 ,o 进水温度},
[0166] τ 处理过程中生产数据群 ={o 回流流量 ,o 排泥流量 ,o 泥位 ,o 混凝剂投加量 ,o 聚合物投加量};
[0167] τ 污水处理后排水数据群 ={o 出口PH ,o 余氯};
[0168]
[0169] Step 2.2: Establish sensitivity metrics for key data;
[0170] This step primarily involves sensitivity analysis of key indicators within the wastewater treatment objectives, establishing sensitivity metrics for these key indicators. Based on these sensitivity metrics, key parameters influencing the values of these indicators can be extracted from the wastewater pretreatment data set. This process is illustrated below:
[0171]
[0172] in:
[0173] v a,b Let b be the sensitivity of a;
[0174] i∈{1,2,…,m-1};
[0175] E is the expectation of the entire set.
[0176] Step 2.3: Based on the correlation index established in Step 2.1 and the sensitivity measurement index established in Step 2.2, the influence factor index is formed. This process is represented as follows:
[0177]
[0178] in,
[0179] λ1+λ2+λ3+λ4+λ5=1;
[0180] ρ α,b This represents the influence factor value between data b and data α;
[0181] Indicates r α,b This indicates the linear correlation between α and b;
[0182] s α,b This indicates the nonlinear correlation between α and b;
[0183] This indicates the linear correlation between data group p, where data α is located, and data group q, where data b is located.
[0184] This represents the nonlinear correlation between data group p containing data α and data group q containing data b.
[0185] like Figure 3 As shown, the comparison between the heatmap of influencing factors established using the data processing method in step 2 and the heatmap established without step 2 better highlights the correlation between data.
[0186] Step 3: Based on the influencing factor indicators obtained in Step 2, extract the top N key data that have a significant impact on the key parameters of production cost expenditure (one of the key indicators) in the wastewater treatment target;
[0187] Step 3.1 Select key parameters for production cost expenditure based on actual production needs.
[0188] Using the sensitivity metrics from step 2.2, it can be seen that production cost expenditure is mainly related to three parameters in the production data set during the wastewater treatment process: sludge discharge flow rate, coagulant dosage, and polymer dosage. Therefore, these three parameters are considered as key parameters affecting production cost expenditure.
[0189] Step 3.2 Extract the data P that has a significant impact on the key parameter. α
[0190] Based on the impact factors obtained in step 2.3, high impact factor data P, which has a significant impact on the key parameters of production expenditure obtained in step 2.4.1, is extracted from the influent data group according to the following formula. α :
[0191]
[0192] P α This indicates data with a high α-influence factor.
[0193] N represents the selectivity threshold, N≥3; it is necessary to select the top N data with the largest influencing factors. The number of data selected directly affects the computational complexity of subsequent operations. Generally, it is sufficient to select the top 3 data indicators initially. If more data indicators are used, it may increase the amount of computation in subsequent steps, while the improvement in computational accuracy is negligible.
[0194] The data indicators with high influence factors on key parameters extracted in the embodiments of this invention are as follows: Figure 4 As shown, high-impact factor data were mainly extracted from the influent data set. Establishing the impact factors for the entire dataset ensures the completeness and accuracy of the overall impact factor calculation. Furthermore, if the selection of key parameters changes, such as optimizing energy consumption or equipment loss, high-impact factor data can be extracted from the overall dataset as needed.
[0195] Step 4: Refer to Figure 5 A DNN data model is established as a supervised learning submodule. This DNN data model uses the high impact factor data P extracted in step 3. α For the DNN model features, key parameters of production cost expenditure in the wastewater treatment process (coagulant dosage, polymer dosage, and sludge discharge flow rate) are used as model labels. The specific steps include:
[0196] Step 4.1: Using the high impact factor data P extracted in Step 3 α Using key parameters of production cost expenditure as labels, the training and test sets of the DNN data model are established as feature vectors.
[0197] Step 4.2: Build a DNN data model with no hidden layers or fewer than 2 hidden layers, and test it using the loss function. If the test result is less than 0.1, it indicates good performance, and proceed to step 4.5. If the test result is greater than or equal to 0.1, it indicates poor performance, and proceed to step 4.3.
[0198] The process of building the DNN data model in this step is represented as follows:
[0199] ①DNN data models were established for the key parameters affecting production cost expenditures, namely sludge discharge flow rate, coagulant dosage and polymer dosage;
[0200] ② A single DNN data model consists of three layers (in other embodiments, the number of layers in the DNN model can be increased as needed, but increasing the number of layers requires more computing power): an input layer, a hidden layer, and an output layer. The output layer represents the target indicator for production cost expenditure, and the input layer represents data with high influence factors on key parameters of production cost expenditure, belonging to the P obtained in step 3. α gather;
[0201] ③ The number of neurons in the hidden layer is selected as M (in other embodiments, the number of neurons in the hidden layer can be adjusted as needed. Increasing the number of neurons can improve accuracy, but requires more computing power and may also lead to overfitting).
[0202] ④ The specific DNN data model established is shown below:
[0203]
[0204]
[0205] in:
[0206] σ is a non-linear activation function; in this example, the sigmoid function is used.
[0207] x i It is the i-th vector in the feature set of the DNN data model;
[0208] It is the prediction of the i-th data label generated by the DNN data model;
[0209] y is the actual model data label;
[0210] y∈o α ,o α ∈{sludge discharge flow rate, coagulant dosage, polymer dosage};
[0211] loss is a loss function; in this example, the MSE function is chosen.
[0212] w,b are the hyperparameters of the DNN data model;
[0213] n is the length of the data in the feature set and data labels;
[0214] y is the actual value of the data label;
[0215] It is the predicted value of the data label.
[0216] Step 4.3: Increase the number of hidden layers and neurons in the DNN data model, and test the loss function again. If the test result is less than 0.1, it indicates a good effect, and proceed to step 4.5. If the test result is greater than or equal to 0.1, it indicates a poor effect, and proceed to step 4.4.
[0217] Step 4.4: Based on the high-to-low sequence of impact factor indicators formed in Step 2, appropriately increase or decrease the amount of high impact factor data extracted in Step 3 (increasing the data can improve the model accuracy, while decreasing the data can reduce the computational power), and then proceed to Step 4.2.
[0218] Step 4.5: The DNN data model for the transition from the main data of the wastewater pretreatment data set to the main data of the wastewater treatment process data set is established and trained. This DNN data model is then directly applied to actual production. Figure 4 The top three data points of the selected impact factor indicators will be... Figure 4 By inputting the data values of these high-impact factor indicators into the trained DNN data model, data related to production cost expenditures (sludge discharge flow rate, coagulant dosage, polymer dosage) can be automatically generated, thus automating the production dosage and generating sludge treatment strategies.
[0219] Step 5: Establish an improved LSTM model with periodic characteristics as a prediction submodule for high-impact factor data (refer to...). Figure 6 );
[0220] Step 5.1: Extract historical data (at least six months of historical data, preferably at least one year of historical data) from the high impact factor data obtained in Step 3 and perform a general ADF stability assessment. Adjust the stability of the extracted historical data based on the assessment results, mainly by supplementing missing values and modifying outliers. The stability adjustment methods used here are all general and conventional methods in data processing.
[0221] Step 5.2: Test the stability-adjusted data from Step 5.1 using autocorrelation (ACF) and autocorrelation function (PACF), and extract the periodic features of the data based on the test results.
[0222] Step 5.3: Establish an RNN-based LSTM model and apply the periodic features extracted in Step 5.2 to the LSTM model to form an improved LSTM model with periodic features.
[0223] The process of forming a periodic LSTM model in this step is as follows:
[0224] ① Obtain the periodic eigenvalue q of a certain data a based on autocorrelation ACF and PACF. a .
[0225] ② Establish a general LSTM model:
[0226] i t =σ(W i ·[h t-1 ·x t ]+b i )
[0227] f t =σ(W f ·[h t-1 ,x t ]+b f )
[0228] o t =σ(W o ·[h t-1 ,x t ]+b o )
[0229]
[0230]
[0231] h t =o t *tanh(C t )
[0232] in:
[0233] i t This represents the input gate at time t;
[0234] f t Represents the forget gate at time t;
[0235] o t Indicates the output gate at time t;
[0236] Indicates the candidate state at time t;
[0237] C t Indicates the cell state at time t;
[0238] C t-1 This represents the cell state at time t-1;
[0239] h t Represents the memory at time t;
[0240] h t-1 Represents the memory at time t-1;
[0241] x t This represents the input features at time t;
[0242] bi Indicates the input gate bias term;
[0243] b f Indicates the forget gate bias term;
[0244] b o Indicates the output gate bias term;
[0245] b c Represents the candidate state bias term;
[0246] W i Represents the input gate parameter matrix;
[0247] W f Represents the forget gate parameter matrix;
[0248] W o This represents the output gate parameter matrix;
[0249] W c This represents the candidate state parameter matrix.
[0250] ③ Based on the general LSTM model, a 24-hour periodic memory is added (in other embodiments, a 7-day period can also be used; in this example, hours are used for precision, so a 24-hour period is used), resulting in an LSTM model with periodic characteristics:
[0251]
[0252]
[0253]
[0254] h t =o t *tanh(m t )
[0255] in:
[0256] n represents the position of the nth number in the feature data of the LSTM model;
[0257] Q represents the precision of the period segmentation, that is, the 24-hour period is divided into Q segments, Q∈{24,12,6}, and it is recommended that Q be 12;
[0258] Tn represents the period segment in which the nth number is located;
[0259] m t The cellular state representing the periodic memory at time t;
[0260] m t-Q The cellular state representing the periodic memory at time tQ;
[0261] Represents the candidate states of periodic memory at time t;
[0262] W xmTn The parameter matrix representing the candidate states of the periodic segment Tn;
[0263] b xmTn The bias term represents the candidate state of the periodic segment Tn;
[0264] Step 6: Forecast key parameters of production cost expenditures
[0265] Step 6.1 Input the high impact factor data values of the current time / period into the improved LSTM model with periodic characteristics established in Step 5. The LSTM model outputs the predicted values of high impact factor data for a future period of time (e.g., the next 24 hours, the next two days, or the next week; the longer the time, the lower the accuracy).
[0266] like Figure 7 As shown, the prediction error of the improved LSTM model of this invention is reduced by 28.79% compared with the general LSTM model before the improvement.
[0267] Step 6.2 uses the predicted values of the high-impact factor data obtained in Step 6.1 as feature parameters and inputs them into the DNN data model learned in Step 4 to finally generate predicted values of coagulant dosage, polymer dosage and sludge discharge for a certain time / period in the future (e.g., the next 1 hour, the next 2 hours, or the next 1 day).
[0268] The predictive effect of the present invention is as follows Figure 8 As shown, the dosage values of coagulant and polymer are selected as key production data. The method of this invention is used for prediction, and the predicted values and dosage values of three days are randomly extracted and compared. The MSE error value of the predicted coagulant dosage is 0.0401, and the MSE error value of the predicted polymer dosage is 0.0385, which can meet the production control requirements.
[0269] The above description only uses the optimization control method of production cost expenditure, one of the key indicators in the wastewater treatment target, as an example. The optimization control of other key indicators in the wastewater treatment target follows the same principle and will not be repeated here.
[0270] Furthermore, this invention provides a production model, including a DNN data model and an improved LSTM model with periodic characteristics. The DNN data model is established using steps 1-4 of the aforementioned method, and the improved LSTM model with periodic characteristics is established using step 5 of the aforementioned method. High-impact factor data extracted from real-time influent data collected before wastewater treatment is input into the LSTM model in the production control model. The output of the LSTM model is used as the input to the DNN data model, ultimately obtaining predicted data for key parameters of the wastewater treatment target at a future time / period (in this embodiment, predicted data for coagulant dosage, polymer dosage, and sludge discharge flow rate). Production can be controlled based on the obtained predicted data for key parameters. If the LSTM model is not used for prediction, and only the DNN model is used to process the current influent data, the results cannot be applied to production control in time, resulting in a production control lag and causing wastewater treatment to fail to meet the corresponding targets.
[0271] On the other hand, the present invention also provides an electronic device, which may include a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the processor may call logical instructions in the memory to execute the above-mentioned production control method.
[0272] In another aspect, the present invention also provides a non-volatile computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, enables the production control method of the present invention to be implemented.
Claims
1. A production model based on wastewater treatment big data technology, characterized in that, This includes DNN data models and improved LSTM models with periodic characteristics; The DNN data model is established according to the following steps: Step A1: Data Acquisition and Preprocessing Collect influent data before wastewater treatment, production data during treatment, and effluent data after treatment, and perform data cleaning and normalization in sequence. Step A2: Obtain the impact factor indicators of the full data A2.1 Obtain correlation indicators between different parameters within the same data group and between different data groups, wherein the correlation indicators include linear and nonlinear correlations; A2.2 Conduct sensitivity analysis on key indicators affecting wastewater treatment objectives and establish sensitivity measurement indicators for these key indicators; A2.3 Based on the aforementioned correlation and sensitivity metrics, an impact factor index for the entire dataset is formed; Step A3: Extract high impact factor data Use the sensitivity measurement index in step A2.2 to obtain the key parameters that affect the key index; Based on the impact factor index obtained in step A2.3, extract the top N high impact factor data that have a significant impact on the key parameter from the influent data set, or extract the top N high impact factor data that have a significant impact on the key parameter from the entire data set; N≥3; Step A4: Establish a DNN data model DNN data models are established and trained for the key parameters respectively until their loss function converges to meet the set requirements. The DNN data models use the top N high-impact factor data as model features and the key parameters as model labels. The improved LSTM model with periodic characteristics is established according to the following steps: B1: Perform ADF stability assessment on the historical data of the N high-impact factor data extracted in step A3, and adjust the stability of the historical data according to the assessment results; B2: Test the stability-adjusted data from step B1 using autocorrelation function (ACF) and autocorrelation function (PACF), and extract the periodic characteristics of the data based on the test results; B3: Establish an LSTM model based on RNN, and apply the periodic features to the LSTM model to obtain an improved LSTM model with periodic features; The current values of the N high-impact factor data are input into the improved LSTM model with periodic characteristics to obtain the predicted value at any future time. The predicted value is then input into the DNN data model to obtain the predicted value of the key parameters of the key indicators affecting the wastewater treatment target at the corresponding time. The predicted value of the key parameters is the basis for wastewater treatment production control.
2. The production model based on wastewater treatment big data technology according to claim 1, characterized in that, In step A1: The data in the influent data set for wastewater treatment includes raw water turbidity, raw water conductivity, raw water dissolved oxygen, raw water COD, raw water ammonia nitrogen, influent turbidity, influent pH, influent flow rate, and influent temperature. The production data set in the wastewater treatment process includes sludge level, return flow rate, sludge discharge flow rate, coagulant dosage, and polymer dosage. The data in the wastewater post-treatment effluent data set includes effluent pH and residual chlorine.
3. The production model based on wastewater treatment big data technology according to claim 2, characterized in that: In step A2.1: The linear and nonlinear correlations between different parameters belonging to the same data set are calculated according to the following formula: Linear correlation: Nonlinear correlation: In the formula: express The first in the dataset One data point; express and Linear correlation between them; express and Nonlinear correlation between them; express All values collected from the data; express All values collected from the data; ; This indicates the amount of data collected for a specific parameter, or the total amount of data collected for all parameters. They are all equal; and They represent Data and Data expectations; for The difference in rank between the two columns; The linear and nonlinear correlations between different data groups are calculated according to the following formula: Linear correlation: Nonlinear correlation: In the formula: express and Linear correlation between them; express and Nonlinear correlation between them; , , ; ; 。 4. The production model based on wastewater treatment big data technology according to claim 3, characterized in that: The sensitivity metric in step A2.2 is calculated using the following formula: in: for right Sensitivity; ; It is the expectation of the entire set.
5. The production model based on wastewater treatment big data technology according to claim 4, characterized in that: The impact factor index in step A2.3 is calculated according to the following formula: in: ; Representing data With data Influence factor values between; express and Linear correlation between them; express and Nonlinear correlation between them; Representing data Data group With data Data group Linear correlation between them; Representing data Data group With data Data group The nonlinear correlation between them.
6. The production model based on wastewater treatment big data technology according to claim 5, characterized in that, Step 4 is as follows: A4.1 Using the top N high-impact factor data obtained in step A3 as feature vectors and the key parameters as labels, establish training and testing sets; A4.2 Establish a DNN data model with no hidden layers or fewer than 2 hidden layers, select a loss function for testing, if the test result is greater than or equal to 0.1, proceed to step A4.3, if the test result is less than 0.1, the DNN data model is established and trained. A4.3 Increase the size of the neural network of the DNN data model and perform the loss function test again. If the test result is greater than or equal to 0.1, proceed to step A4.
4. If the test result is less than 0.1, the DNN data model is established and trained. A4.4 Based on the impact factor index obtained in step A2.3, increase or decrease the number of high impact factor data extracted in step A3, and then proceed to step A4.
2.
7. The production model based on wastewater treatment big data technology according to claim 6, characterized in that, Step B3 specifically involves: B3.1 Establish a general LSTM model; B3.2 Based on the general LSTM model, periodic memory is added to obtain an improved LSTM model with periodic characteristics; The improved part of the LSTM model is shown in the following formula: in: The first in the model feature data The position of the number Indicates the precision of period segmentation; Indicates the first The period in which the number of positions are located; express Cellular state of periodic memory; express Cellular state of periodic memory express Candidate states for periodic memory; express The parameter matrix of the candidate states in the periodic segment; express Bias term for candidate states in a periodic segment.
8. A production control method based on wastewater treatment big data technology, characterized in that: Step 1: Establish the production model as described in any one of claims 1-7; Step 2: Input the current values of high-impact factor data into the improved LSTM model with periodic characteristics in the production model established in Step 1 to obtain the predicted value at any future time. Input the predicted value into the DNN data model in the production control model to obtain the predicted value of the key parameters of the key indicators affecting the wastewater treatment target at the corresponding time. Control the production based on the obtained predicted value of the key parameters.
9. An electronic device comprising a memory, a processor, and a computer program stored in and executable thereon; characterized in that: The computer program implements the production control method as described in claim 8 when it runs.
10. A non-volatile computer-readable storage medium having a computer program stored thereon; characterized in that: The computer program implements the production control method as described in claim 8 when it runs.
Citation Information
Patent Citations
Coagulation dispensing control method and system based on artificial neural network algorithm
CN106168759A
A DNN-based method for setting benchmark values for line loss rate in low-voltage distribution areas
CN110490409B
Sewage treatment control method and system based on deep learning and cloud computing
CN110824923A
Method and system for predicting dosage of tap water coagulant
CN113705898A
Parameter prediction of wastewater treatment effluent based on principal component analysis and long-term and short-term memory network
CN109508811A