Sewage effluent quality prediction method and system

By using sparse deep belief network and adaptive decomposition multi-objective particle swarm optimization algorithm in the prediction of sewage effluent water quality, and using L2,1 core limit learning machine to replace the BP neural network, the problem of deep neural network overfitting is solved, and the prediction accuracy and robustness are improved.

CN119808553APending Publication Date: 2025-04-11HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411868054.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In the existing sewage effluent water quality prediction methods, deep neural networks are prone to overfitting, resulting in poor generalization capabilities, reduced reliability, and difficult to integrate into portable monitoring devices.

Method used

The parameters of sparse deep belief network (SDBN) combined with the adaptive decomposition multi-objective particle swarm optimization algorithm (AMOPSO-DA) are optimized, and the L2,1 core limit learning machine (KELM) is used to replace the traditional BP neural network to improve prediction accuracy and robustness.

Benefits of technology

It effectively improves the accuracy and robustness of the prediction of wastewater effluent water quality, reduces overfitting, improves the reliability of the model, and accelerates the prediction speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808553A_ABST
    Figure CN119808553A_ABST
Patent Text Reader

Abstract

The invention discloses a sewage effluent quality prediction method and system, and the method comprises the steps: firstly obtaining a feature value related to a to-be-predicted water quality parameter, then inputting the feature value into a deep belief network prediction model, and obtaining a prediction result of the to-be-predicted water quality parameter; the deep belief network prediction model is a sparse deep belief network, parameters of a sparse restricted Boltzmann machine are optimized by using an adaptive decomposition type multi-target particle swarm optimization algorithm, and an L2, 1 kernel extreme learning machine is used for replacing a BP neural network in the deep belief network as an output item, so that the prediction precision and robustness can be effectively improved, and the prediction accuracy is improved. And over-fitting is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a water quality prediction method, in particular to a sewage effluent water quality prediction method and system. Background Art

[0002] Urban domestic sewage and industrial water contain ammonia nitrogen, phosphorus, chemical oxygen demand, biological oxygen demand and other substances. The discharge of these excessive substances not only causes water resource pollution, but also endangers human health and destroys the balance of the ecological environment. Effluent water quality is not only an important parameter for detecting water quality, but also a core indicator in water treatment. At present, neural network models are mostly used in intelligent modeling and prediction of sewage treatment, such as BP neural network model, radial basis function artificial neural network, etc.; there are also some prediction methods to establish deep neural network models. Although neural networks, especially some deep neural networks, can effectively predict the quality of sewage effluent, deep neural networks are prone to overfitting, resulting in poor generalization ability of the model, reduced reliability, and waste of resources and increased decision-making risks; the complexity of deep neural networks makes it difficult to integrate the model into a single-chip microcomputer to make a portable monitoring device, so the existing methods need to be further optimized. Summary of the invention

[0003] Purpose of the invention: The purpose of the present invention is to provide a method and system for predicting sewage effluent water quality to improve the accuracy and robustness of the prediction.

[0004] Technical solution: The method for predicting the sewage effluent quality of the present invention comprises the following steps:

[0005] Acquire characteristic values ​​related to the water quality parameter to be predicted; input the characteristic values ​​into the deep belief network prediction model to obtain the prediction result of the water quality parameter to be predicted;

[0006] The deep belief network prediction model is a sparse deep belief network, in which the parameters of the sparse restricted Boltzmann machine are optimized using an adaptive decomposition multi-objective particle swarm optimization algorithm.

[0007] Furthermore, the objective function of optimizing the parameters of the sparse restricted Boltzmann machine using the adaptive decomposition multi-objective particle swarm optimization algorithm is:

[0008]

[0009] Among them, S(θ i ) is to minimize the fitting error, λ is the regularization parameter, T is the number of layers, l = 1, 2, ..., T, h and v are the hidden layer and visible layer of the sparse restricted Boltzmann machine, respectively.

[0010] Furthermore, the sparse deep belief network includes a plurality of sequentially stacked sparse restricted Boltzmann machines and a kernel extreme learning machine, and the kernel extreme learning machine is the last layer of the sparse deep belief network.

[0011] Furthermore, the kernel extreme learning machine uses L 2,1 norm, the output of the kernel extreme learning machine is:

[0012]

[0013] Among them, N is the number of samples input to the kernel extreme learning machine, L is the number of hidden layer nodes, H is the output matrix of the hidden layer nodes, C is the regularization parameter, K(x i ,x N ) is the kernel function.

[0014] Furthermore, the obtaining of the characteristic value related to the water quality parameter to be predicted includes: selecting, from among several effluent water quality parameters, an effluent water quality parameter related to the water quality parameter to be predicted as its characteristic value using the Spearman correlation coefficient.

[0015] Furthermore, before using the Spearman correlation coefficient to select the effluent water quality parameter related to the water quality parameter to be predicted, the method also includes removing noise from the original data of the effluent water quality parameter using a wavelet threshold denoising method.

[0016] The sewage effluent water quality prediction system of the present invention comprises:

[0017] A feature extraction unit, used to obtain feature values ​​related to the water quality parameter to be predicted;

[0018] The water quality prediction unit is used to input the characteristic value into the deep belief network prediction model to obtain the prediction result of the water quality parameter to be predicted; the deep belief network prediction model is a sparse deep belief network, in which the parameters of the sparse restricted Boltzmann machine are optimized using a multi-objective particle swarm optimization algorithm.

[0019] Furthermore, in the feature extraction unit, the original data of the effluent water quality parameter is de-noised using the wavelet threshold denoising method, and the effluent water quality parameter related to the water quality parameter to be predicted is selected as its feature value using the Spearman correlation coefficient;

[0020] In the water quality prediction unit, the sparse deep belief network includes a plurality of sequentially stacked sparse restricted Boltzmann machines and a kernel extreme learning machine, and the kernel extreme learning machine is the last layer of the sparse deep belief network;

[0021] The objective function of optimizing the parameters of the sparse restricted Boltzmann machine using the adaptive decomposition multi-objective particle swarm optimization algorithm is:

[0022]

[0023] Among them, S(θ i ) is to minimize the fitting error, λ is the regularization parameter, T is the number of layers, l = 1, 2, ..., T, h and v are the hidden layer and visible layer of the sparse restricted Boltzmann machine respectively;

[0024] The kernel extreme learning machine uses L 2,1 norm, the output of the kernel extreme learning machine is:

[0025]

[0026] Among them, N is the number of samples input to the kernel extreme learning machine, L is the number of hidden layer nodes, H is the output matrix of the hidden layer nodes, C is the regularization parameter, K(x i ,x N ) is the kernel function.

[0027] The electronic device described in the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the method for predicting the sewage effluent water quality is implemented.

[0028] The computer-readable storage medium of the present invention stores a computer program, and when the computer program is executed by a processor, the method for predicting the sewage effluent water quality is implemented.

[0029] Beneficial effects: Compared with the prior art, the advantages of the present invention are: (1) The present invention uses the L1 norm as the sparse penalty term of the deep belief network, and takes the L1 norm and minimizing the fitting error as the objective function, and uses the adaptive decomposition multi-objective particle swarm algorithm to optimize the sparse penalty term. Finally, the L 2,1 The kernel extreme learning machine replaces the BP neural network in the deep belief network as the output item, which can effectively improve the prediction accuracy and robustness and reduce overfitting; (2) The present invention uses wavelet threshold denoising and Spearman correlation analysis method to preprocess the data, which can improve the prediction speed without affecting the prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 A structural diagram of a BSM1 according to an embodiment of the present invention;

[0031] Figure 2 Schematic diagram of original data containing noise in an embodiment of the present invention;

[0032] Figure 3 Schematic diagram of data after denoising in an embodiment of the present invention;

[0033] Figure 4Schematic diagram of the Spearman correlation coefficient of each water quality parameter in an embodiment of the present invention;

[0034] Figure 5 A structural diagram of a restricted Boltzmann machine in an embodiment of the present invention;

[0035] Figure 6 This is a structural diagram of a deep belief network in an embodiment of the present invention;

[0036] Figure 7 This is the prediction result of the DBN test set in the embodiment of the present invention;

[0037] Figure 8 This is the SDBN test set prediction result in the embodiment of the present invention;

[0038] Fig. 9 This is the SDBN-MOP test set prediction result in the embodiment of the present invention;

[0039] Fig.10 SDBN-MOP-L in the embodiment of the present invention 2,1 KELM test set prediction results. DETAILED DESCRIPTION

[0040] The technical solution of the present invention is further described below in conjunction with the accompanying drawings. The sewage effluent water quality prediction method of the present invention comprises the following steps:

[0041] Step 1, data collection.

[0042] The experimental data of this embodiment is generated by the activated sludge benchmark simulation model No. 1 (BSM1) launched by the International Water Quality Association. In BSM1, the biochemical reaction tank consists of five units, 2 anaerobic tanks and 3 aerobic tanks, of which the anaerobic tanks are mainly responsible for nitrification and the aerobic tanks are mainly responsible for denitrification. The specific engineering layout of BSM1 is as follows: Figure 1 shown.

[0043] The key variables of sewage are shown in Table 1 below.

[0044] Table 1 Key variables of sewage

[0045] variable meaning <![CDATA[S I ]]> Soluble inert organic matter <![CDATA[S S ]]> Readily biodegradable substrate <![CDATA[X I ]]> Granular inert organic matter <![CDATA[X S ]]> Slowly biodegradable substrates <![CDATA[X BH ]]> Active heterotrophic biomass <![CDATA[X BA ]]> Active autotrophic biomass <![CDATA[X P ]]> Particle products from biomass decay <![CDATA[S O ]]> Dissolved oxygen <![CDATA[S NO ]]> Nitrates and Nitrites <![CDATA[S NH ]]> Ammonium and ammonia <![CDATA[S ND ]]> Soluble biodegradable organic nitrogen <![CDATA[X ND ]]> Granular biodegradable organic nitrogen <![CDATA[S ALK ]]> Alkalinity BOD Chemical oxygen demand COD Biochemical oxygen demand

[0046] Step 2: data preprocessing.

[0047] In the real environment, water quality monitoring stations are monitoring equipment directly exposed to the outdoors and will be interfered by various factors. Whether it is the system error of the equipment, aging of parts or improper manual operation, it may bring abnormal values ​​and noise to the monitoring data. In order to better restore the data information of the real state, random noise is added to the original data and then the noise is removed.

[0048] Step 2-1, first use the wavelet fixed threshold denoising method to remove the noise of the noisy signal. The following takes a one-dimensional noisy signal as an example to illustrate the process of wavelet threshold denoising.

[0049] Assuming that a one-dimensional noisy signal model can be expressed as follows, the noisy original data of this embodiment is as follows Figure 2 As shown:

[0050] s(t)=f(t)+ε·e(t), t=0,...,n-1;

[0051] Among them, f(t) is a clean useful signal, e(t) is a signal that obeys N(0,δ 2 ) is the Gaussian white noise distributed by , and s(t) is the signal contaminated by the noise. The so-called denoising is to remove e(t) to the greatest extent while retaining f(t) as much as possible.

[0052] Wavelet denoising is divided into the following three steps:

[0053] 1) Select a suitable wavelet basis and wavelet decomposition layer number N to perform wavelet decomposition on the noisy signal s(t) to obtain the wavelet coefficients of the N layer;

[0054] 2) Select appropriate thresholds and threshold functions, perform threshold processing on the high-frequency coefficients obtained by decomposition, and obtain the processed high-frequency wavelet coefficients; the threshold calculation formula of the fixed threshold method is as follows:

[0055]

[0056] In the formula, λ s is the threshold determined by the fixed threshold method, L is the signal length, and σ is the variance of the noise;

[0057] 3) Reconstruct the decomposed low-frequency wavelet coefficients and the processed high-frequency wavelet coefficients to obtain the denoised signal.

[0058] The signal-to-noise ratio (SNR) of a signal is a common standard for evaluating the effect of noise reduction. The larger the SNR, the better the noise reduction effect. In this embodiment, the db5 wavelet function is used for wavelet denoising, and the number of decomposition layers is set to 3. The effect after denoising is shown in the figure below. Figure 3 shown.

[0059] Step 2-1: Since there are too many input eigenvalues ​​of water quality data, it is necessary to select the eigenvalues. The eigenvalues ​​with small correlation or irrelevant can be eliminated to optimize the prediction speed and accuracy. This embodiment uses the Spearman correlation coefficient for feature selection. For the variable X = [x1, x2, L, x m ] T and Y = [y1,y2,L,ym ] T , the calculation formula of Spearman correlation coefficient is as follows:

[0060]

[0061] Where R(x i ) is x i The ranking of data set X, R(y i ) is y i The ranking position in the dataset Y.

[0062] are the average ranks of the two sets of data, i∈1,2,...,m.

[0063] The value range of the correlation coefficient ρ is [-1,1], that is, |ρ|≤1. The closer |ρ| is to 1, the closer x i and i If ρ=-1, it means x i and i There is a completely negative linear correlation between them; if ρ = 1, it means that x i and i There is a completely positive linear correlation between them; if ρ = 0, it means that x i and i There is no linear correlation between them. That is, the larger the absolute value of ρ, the higher the correlation between variable X and variable Y; the smaller the absolute value of ρ, the lower the correlation between variable X and variable Y; the standard for evaluating the Spearman correlation coefficient is shown in Table 2.

[0064] Table 2 Correlation degree of Spearman correlation coefficient

[0065] Range of ρ Degree of relevance 0.0≤|ρ|<0.2 Very weak or no correlation 0.2≤|ρ|<0.4 Weak correlation 0.4≤|ρ|<0.6 Moderately related 0.6≤|ρ|<0.8 Strong correlation 0.8≤|ρ|<1.0 Very strong correlation

[0066] After using the Spearman correlation coefficient to select features of the data, the correlation between the various parameters is as follows Figure 4 As shown:

[0067] Taking the correlation of dissolved oxygen as an example, Figure 4 From the coefficient, it can be seen that the effluent COD is strongly correlated with QR, TSS, and BOD, strongly correlated with SDO, and weakly correlated with TOT. Therefore, QR, TSS, BOD, SDO, and TOT are selected when performing feature selection.

[0068] In this embodiment, the data before and after the Spearman correlation coefficient processing is trained in the deep belief network DBN, and the result parameter comparison is shown in Table 3. As can be seen from Table 3, the time consumption can be reduced without substantially affecting the mean absolute error MAE and the mean square root error RMSE.

[0069] Table 3 Comparison of algorithm performance after correlation processing and original data

[0070] data DBN algorithm time consumption RMSE MAE Raw data 48.8 0.247 0.169 After correlation coefficient method 45.1 0.257 0.192

[0071] Step 3: Construction of deep belief network prediction model.

[0072] Basic concept explanation:

[0073] ① Restricted Boltzmann Machine

[0074] Restricted Boltzmann Machine (RBM) is the basic structure of Deep Belief Network (DBN). Figure 5 As shown in the figure, RBM consists of two layers of neurons, namely the visible layer v and the hidden layer h. The visible layer consists of σ random variables, and the hidden layer consists of μ hidden random variables, which can be expressed as v=() and h=() respectively.

[0075] ②Deep Belief Network

[0076] The main network structure of the deep belief network (DBN) is composed of multiple RBMs stacked in sequence and combined through a classification layer with discriminative function. First, multiple RBMs are stacked in sequence to realize layer-by-layer feature extraction of input sample data. The last layer is composed of BP neural network, which is usually implemented by softmax function. The schematic diagram of DBN structure is shown in the figure. Figure 6 shown.

[0077] The learning process of DBN consists of two stages: unsupervised pre-training and supervised reverse fine-tuning. The basic principle process is as follows:

[0078] Supervised pre-training stage: DBN model learning first uses a greedy layer-by-layer unsupervised learning algorithm to pre-train the network. The basic principle of the greedy layer-by-layer unsupervised learning algorithm is to start training the first RBM from the first layer. The first RBM has an input unit and the first hidden layer h1. The corresponding weight parameters and bias vectors can be obtained through training. Then h1 is used as the visible layer of the second RBM, and h2 is the hidden layer of the second RBM. Continue to train in the same way as the first RBM until all RBMs are trained.

[0079] Supervised reverse fine-tuning stage: In the unsupervised pre-training stage, although the weight matrix obtained through training can reflect the structural information of the data to a certain extent, it does not achieve the best results. In order to obtain more accurate classification or regression parameters, it is necessary to use the BP algorithm to fine-tune the DBN parameters. This process is a global training process. The parameters obtained after unsupervised pre-training are used as the initialization parameters of the network, and then effective training is carried out with the help of the BP neural network training method.

[0080] ③Sparse Deep Belief Network

[0081] The features learned by RBM may be redundant. In order to obtain a more robust RBM, it is necessary to weaken the dense representation to achieve sparse representation. The purpose of penalizing the opening probability of RBM units can be achieved by introducing sparse regularization terms to obtain SRBM, and then obtain a sparse deep belief network SDBN.

[0082] ④ The adaptive decomposition multi-objective particle swarm optimization algorithm (AMOPSO-DA) is mainly improved around the external archive update strategy and the speed parameter update strategy. The external archive update strategy combines the target space decomposition method with the Pareto strategy to achieve effective selection of external archive optimization solutions and improve the algorithm's spatial search capability; the speed parameter update strategy mainly uses the particle evolution direction information to achieve adaptive adjustment of parameters and balance the algorithm's global exploration capability and local development capability.

[0083] Step 3-1, optimize the sparse deep belief network through a multi-objective optimization algorithm.

[0084] The calculation process of the adaptive decomposition multi-objective particle swarm optimization algorithm (AMOPSO-DA) is as follows:

[0085] 1) Randomly initialize the speed, position, inertia weight, learning factor and of each particle in the particle swarm, and set the initial position of each particle to the current historical optimal position.

[0086] 2) Calculate the fitness value of each particle, calculate the direction vector of the optimization solution, the angle between the optimization solution and the given direction vector, and determine the region to which the optimization solution belongs.

[0087] 3) According to the external archive update strategy, select the appropriate optimization solution for the subspace solution set to update the external archive.

[0088] 4) Randomly select the optimal solution from the external archive as the population gbest and update the pbest point of each particle.

[0089] 5) Calculate the evolutionary harmonic coefficient according to the evolutionary direction of each particle guide point, and adaptively adjust the particle flight parameters.

[0090] 6) Update the particle's position and velocity.

[0091] 7) Determine whether the algorithm has reached the termination condition. If so, exit the loop and output the final optimized solution set; otherwise, return to 2).

[0092] Most SRBMs achieve good performance by adding sparse penalty terms to control the sparsity of hidden units, but the sparse penalty terms are different. Some sparse penalty terms are a norm or a squared error term or a quotient of a norm and a two-norm as a regularization term. Therefore, the training algorithm for SRBM is the same framework. This embodiment uses the method of minimizing the fitting error to reflect the performance of the neural network, and uses a norm to obtain a sparse representation of the hidden unit.

[0093] Minimize the fitting error: According to the approximation-based optimization, the performance S observed at the jth data sample j (θ i ) can be described as:

[0094]

[0095] in, are the target output and the actual output respectively, n d is the number of data samples, the actual performance S(θ i ) can be approximated by an infinite number of trials, namely:

[0096]

[0097] Among them, τ j is a random variable, are independent and normally distributed.

[0098] The L1 norm of the hidden layer unit is:

[0099]

[0100] Since minimizing the fitting error and the regularization term are in conflict in SDBN, minimizing the fitting error and the L1 norm of the hidden layer unit is selected as the objective function. Therefore, the objective function of this multi-objective optimization is:

[0101]

[0102] In the formula, T is the number of layers, λ is the regularization parameter, and the gradient of the one-norm can be directly calculated, so the gradient descent algorithm is used to update the SRBM parameters. The one-norm is derived from the SRBM parameters to obtain the following formula:

[0103]

[0104] The degree to which the hidden unit is activated is directly controlled by its bias, so when the gradient descent algorithm is used to calculate the gradient of a norm to update the parameters, only the bias of the hidden unit will be updated, so the SRBM-MOP training algorithm steps become:

[0105] 1) Initialize the SRBM structure parameters and the maximum training cycle, and the state v1 of the visual layer is the input training sample;

[0106] 2) Update the parameters using the CD contrast algorithm. The specific update rule becomes:

[0107]

[0108] a i =αa i +η(v i -v′ i );

[0109] 3) Using adaptive decomposition multi-objective particle swarm optimization to optimize the structural parameters of SRBM and then update the parameters;

[0110] 4) Repeat the above two steps until convergence.

[0111] Step 3-2, optimize the sparse deep belief network through the kernel extreme learning machine.

[0112] In order to further improve the generalization ability and learning speed of the deep belief network, as well as improve the overall robustness of the network, this embodiment uses the kernel extreme learning machine (KELM) to replace the BP neural network in the traditional deep belief network structure. Compared with the ordinary extreme learning machine, the learning speed, generalization ability and robustness of the kernel extreme learning machine are improved, and L 2,1 The norm is used to improve KELM, which makes KELM have certain sparse characteristics and further enhances its robustness.

[0113] Assume that there is an arbitrary data matrix Z∈R n×m , its L 2,1 The norm can be defined as:

[0114]

[0115] The ordinary extreme learning machine (ELM) is a three-layer feedforward neural network, including an input layer, a hidden layer and an output layer. The output function of ELM is expressed as:

[0116] f(x i )=h(x i )β,i=1,...,N;

[0117] in is the input of ELM, β is the output weight matrix, f(xi ) is the actual output of the neural network, N represents the number of samples, h(x i ) is the output of the i-th hidden node, and can be expressed in matrix form as:

[0118]

[0119] where, w i and b i are the parameters of the hidden layer nodes, L is the number of hidden layer neurons, and g(x) is the activation function.

[0120] The goal of ELM is to achieve better generalization ability by simultaneously minimizing the training error and the minimum norm of the output weights. The expression is as follows:

[0121]

[0122] where, C is a regularization parameter, ξ i is the error vector of the i-th sample, T = {t1, t2,... t N ,} T represents the label matrix of the samples. By calculating the partial derivative of β with respect to the above formula and setting it to 0, the solution of β is obtained as:

[0123]

[0124] It is applicable when N > L. When N < L, β can be expressed as:

[0125]

[0126] According to the Mercer condition, the kernel matrix of ELM is defined as:

[0127] Ω ELM (i, j) = HH T = h(x i ) · h(x j ) = K(x i , x j );

[0128] Finally, the output decision function expression of KELM is obtained as:

[0129]

[0130] Usually, the RBF kernel function can be selected as the kernel function, that is:

[0131]

[0132] Suppose there is a data set where X = {x1,..., x N} T Represents a data matrix with N samples, Y = {y1,...,y N} T represents the label matrix of the sample. In this embodiment, L 2,1 The norm is introduced into the KELM method, and the objective function is as follows:

[0133]

[0134] The matrix form of the original equation can be expressed as:

[0135]

[0136] in,

[0137]

[0138] According to the above two formulas, the gradient of β is calculated as follows:

[0139]

[0140] Let it be equal to 0, and we can get the two solutions of β as follows:

[0141]

[0142] Selecting the number of hidden nodes L to be greater than the number of samples N gives the final output function:

[0143]

[0144] In this embodiment, it is assumed that an SDBN contains q hidden layers. First, the first q-1 hidden layers are initialized and trained by greedy training, and the bias and weight from the q-1th hidden layer to the qth hidden layer and from the qth hidden layer to the output layer are determined by KELM. Let p be the data of the neurons in the qth hidden layer, and l be the data of the neurons in the q-1th hidden layer. Then this network can be expressed as:

[0145]

[0146] The optimal prediction result is the minimum output error, and further:

[0147]

[0148] Through the above formula, the following formula is established, that is:

[0149]

[0150] O q β=H,where O qIt represents the output from the q-1th layer to the qth layer, which is specifically expressed as follows:

[0151]

[0152]

[0153] After training, the following formula is established:

[0154]

[0155] Here, the last hidden layer of SDBN is regarded as a single hidden layer neural network, and the KELM algorithm is used to train it. The output weight of the model is solved according to the following formula:

[0156]

[0157] Through the above steps, we can finally obtain a SDBN-MOP-L2,1KELM network, which is a deep belief network prediction model.

[0158] Step 4: Use the deep belief network prediction model to obtain the water quality prediction results.

[0159] Taking dissolved oxygen as an example, the prediction results of effluent COD are obtained by inputting five parameters: QR, TSS, BOD, SDO and TOT.

[0160] Step 5: Evaluate the prediction results.

[0161] The model performance is evaluated using three performance indicators: root mean square error (RMSE), mean absolute error (MAE), and correlation coefficient (R). The smaller the RMSE and MAE, the better, indicating that the model has a small error, good performance, strong stability, and is not prone to overfitting. The closer the R indicator is to 1, the better, indicating that the model has a high degree of fit. The calculation formulas for the three indicators are as follows:

[0162]

[0163] where y i is the actual value, is the predicted value, are the averages of the two, and z is the sample size.

[0164] In this embodiment, 2000 data samples are taken during training and testing, including 1800 training sets and 200 test sets, and the DBN structure is selected as 6-40-40-1.

[0165] Figure 7 and Figure 8 They are the prediction results of DBN and SDBN respectively. Fig. 9 and Fig.10For SDBN-MOP and SDBN-MOP-L 2, The prediction results of 1KELM show that the RMSE has decreased significantly, and the error between the predicted value and the actual value has become smaller. From Table 4, it can be seen that as the RMSE and MAE of the improved model performance gradually decrease, the R value gradually increases, indicating that the performance, robustness and fit of the model are all getting higher, and it is not easy to produce overfitting.

[0166] Table 4 Performance comparison between improved DBN and original DBN models

[0167] method RMSE MAE R-Value DBN 0.2273 0.152 0.9878 SDBN 0.1431 0.107 0.9935 SDBN-MOP 0.1196 0.084 0.9978 <![CDATA[SDBN-MOP-L 2,1 CRIME]]> 0.0759 0.043 0.9998

[0168] The sewage effluent water quality prediction system of the present invention comprises:

[0169] A feature extraction unit, used to obtain feature values ​​related to the water quality parameter to be predicted;

[0170] The water quality prediction unit is used to input the characteristic value into the deep belief network prediction model to obtain the prediction result of the water quality parameter to be predicted; the deep belief network prediction model is a sparse deep belief network, in which the parameters of the sparse restricted Boltzmann machine are optimized using a multi-objective particle swarm optimization algorithm.

[0171] The electronic device described in the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the method for predicting the sewage effluent water quality is implemented.

[0172] The computer-readable storage medium of the present invention stores a computer program, and when the computer program is executed by a processor, the method for predicting the sewage effluent water quality is implemented.

[0173] The computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and that can be accessed by a computer.

[0174] The processor is used to execute the computer program stored in the memory to implement each step of the method involved in the above embodiment.

Claims

1. A method for predicting sewage effluent quality, characterized in that: The steps include: Acquire characteristic values ​​related to the water quality parameter to be predicted; input the characteristic values ​​into the deep belief network prediction model to obtain the prediction result of the water quality parameter to be predicted; The deep belief network prediction model is a sparse deep belief network, in which the parameters of the sparse restricted Boltzmann machine are optimized using an adaptive decomposition multi-objective particle swarm optimization algorithm.

2. The method for predicting sewage effluent quality according to claim 1, characterized in that: The objective function of optimizing the parameters of the sparse restricted Boltzmann machine using the adaptive decomposition multi-objective particle swarm optimization algorithm is: Among them, S(θ i ) is to minimize the fitting error, λ is the regularization parameter, T is the number of layers, l = 1, 2, ..., T, h and v are the hidden layer and visible layer of the sparse restricted Boltzmann machine, respectively.

3. The method for predicting sewage effluent quality according to claim 1, characterized in that: The sparse deep belief network includes a plurality of sequentially stacked sparse restricted Boltzmann machines and a kernel extreme learning machine, wherein the kernel extreme learning machine is the last layer of the sparse deep belief network.

4. The method for predicting sewage effluent quality according to claim 3, characterized in that: The kernel extreme learning machine uses L 2,1 norm, the output of the kernel extreme learning machine is: Among them, N is the number of samples input to the kernel extreme learning machine, L is the number of hidden layer nodes, H is the output matrix of the hidden layer nodes, C is the regularization parameter, K(x i ,x N ) is the kernel function.

5. The method for predicting sewage effluent quality according to claim 1, characterized in that: The obtaining of the characteristic value related to the water quality parameter to be predicted includes: selecting, from among several effluent water quality parameters, an effluent water quality parameter related to the water quality parameter to be predicted as its characteristic value using the Spearman correlation coefficient.

6. The method for predicting sewage effluent quality according to claim 5, characterized in that: Before using the Spearman correlation coefficient to select the effluent water quality parameter related to the water quality parameter to be predicted, the method also includes removing noise from the original data of the effluent water quality parameter using a wavelet threshold denoising method.

7. A sewage effluent water quality prediction system, characterized in that: include: A feature extraction unit, used to obtain feature values ​​related to the water quality parameter to be predicted; The water quality prediction unit is used to input the characteristic value into the deep belief network prediction model to obtain the prediction result of the water quality parameter to be predicted; the deep belief network prediction model is a sparse deep belief network, in which the parameters of the sparse restricted Boltzmann machine are optimized using a multi-objective particle swarm optimization algorithm.

8. The sewage effluent water quality prediction system according to claim 7, characterized in that: In the feature extraction unit, the original data of the effluent water quality parameters are de-noised using the wavelet threshold denoising method, and the effluent water quality parameters related to the water quality parameters to be predicted are selected as their feature values ​​using the Spearman correlation coefficient; In the water quality prediction unit, the sparse deep belief network includes a plurality of sequentially stacked sparse restricted Boltzmann machines and a kernel extreme learning machine, and the kernel extreme learning machine is the last layer of the sparse deep belief network; The objective function of optimizing the parameters of the sparse restricted Boltzmann machine using the adaptive decomposition multi-objective particle swarm optimization algorithm is: Among them, S(θ i ) is to minimize the fitting error, λ is the regularization parameter, T is the number of layers, l = 1, 2, ..., T, h and v are the hidden layer and visible layer of the sparse restricted Boltzmann machine respectively; The kernel extreme learning machine uses L 2,1 norm, the output of the kernel extreme learning machine is: Among them, N is the number of samples input to the kernel extreme learning machine, L is the number of hidden layer nodes, H is the output matrix of the hidden layer nodes, C is the regularization parameter, K(x i ,x N ) is the kernel function.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is loaded into a processor, the method for predicting wastewater effluent quality according to any one of claims 1 to 6 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for predicting wastewater effluent quality according to any one of claims 1 to 6 is implemented.