CN112884056A - Optimized LSTM neural network-based sewage quality prediction method - Google Patents

Optimized LSTM neural network-based sewage quality prediction method Download PDF

Info

Publication number
CN112884056A
CN112884056A CN202110239984.9A CN202110239984A CN112884056A CN 112884056 A CN112884056 A CN 112884056A CN 202110239984 A CN202110239984 A CN 202110239984A CN 112884056 A CN112884056 A CN 112884056A
Authority
CN
China
Prior art keywords
neural network
lstm
pso
training
att
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202110239984.9A
Other languages
Chinese (zh)
Inventor
刘心
时启明
李文竹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hebei University of Engineering
Original Assignee
Hebei University of Engineering
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hebei University of Engineering filed Critical Hebei University of Engineering
Priority to CN202110239984.9A priority Critical patent/CN112884056A/en
Publication of CN112884056A publication Critical patent/CN112884056A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • G06F18/2135Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on approximation criteria, e.g. principal component analysis
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • G01N33/18Water
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Chemical & Material Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Food Science & Technology (AREA)
  • Medicinal Chemistry (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Activated Sludge Processes (AREA)

Abstract

The invention discloses a sewage quality prediction method of a long-term and short-term memory neural network based on attention mechanism optimization, which reduces the dimensionality of input data by using a principal component analysis method, simplifies the complexity of original data, introduces a PSO algorithm and an attention mechanism to optimize an LSTM, enables the LSTM neural network to be trained with a better network structure, improves the recognition capability of the LSTM on the importance degree of a data local characteristic sequence, achieves the purposes of improving the prediction precision of the LSTM neural network and avoiding falling into local optimization, and can more effectively predict the sewage outlet water quality.

Description

Optimized LSTM neural network-based sewage quality prediction method
Technical Field
The invention relates to a sewage quality prediction method based on an attention mechanism optimization Long Short-Term Memory (LSTM) neural network, and belongs to the technical field of water quality prediction.
Background
At present, the situation of sewage prevention and control in China is still severe, and the problem of water pollution treatment at the present stage is changed from simply improving the water environment quality to organically combining water quality improvement with water resource protection and water ecology protection. In order to prevent further deterioration and pollution of water resources in China, the most effective method is to enhance the capabilities of sewage treatment and water quality detection and monitoring.
The production condition of the sewage treatment process is severe, random interference is serious, and the process has the characteristics of multiple input, multiple output, nonlinearity, strong coupling, time lag and the like, so that the process is extremely complex and difficult to describe by a mathematical model, and the accurate monitoring of the effluent quality of the sewage is a difficult problem. The traditional methods for indicating the water quality of the sewage, such as a dichromate method, a permanganate index and the like, have the problems of complex operation, long consumed time, easy secondary pollution and the like. Therefore, the neural network with strong fitting capability and adaptability is more suitable for being used for sewage quality prediction. Meanwhile, the sewage quality data has the characteristics of strong disturbance, periodicity, small sample amount, high dimensionality and the like, and has obvious time sequence characteristics. The existing sewage quality prediction method mostly ignores the time series characteristics of sewage quality data, and does not pay attention to the important degree of influence of the change of the inlet water quality in different time periods on the outlet water quality prediction result.
Through analysis, the prior art is found to have the following defects:
(1) the selection of auxiliary variables (input data) in the prior art is usually determined only by means of correlation analysis, and although all auxiliary variables can be determined, a part of auxiliary variables contribute less to a prediction result, so that data redundancy is caused, and the training speed of a model is influenced.
(2) In the prior art, when a Long Short-Term Memory neural network (LSTM) is adopted to predict the effluent quality, the setting of the super parameters (such as the number of neurons in a hidden layer and the learning rate) is usually determined by human experience, and the setting of different super parameters has a great influence on the prediction result of the neural network. Therefore, how to set the hyper-parameters more reasonably has important significance for improving the prediction result of the neural network.
(3) The existing sewage quality prediction model mostly ignores time series characteristics of sewage data, and does not or less pay attention to changes of local water quality characteristics to the importance degree of effluent quality prediction in different time periods.
Based on the above, the invention provides a Principal Component Analysis (PCA) method for reducing the dimension of input data, simplifying the complexity of original data, determining the optimal initial value of the super-parameters of the LSTM neural network by using a Particle Swarm Optimization (PSO), improving the identification capability of the LSTM neural network on the important characteristics of a local water quality parameter sequence by using an Attention mechanism (att), and finally establishing a PSO-LSTM neural network (PSO-LSTM-att) based on the Attention mechanism for predicting the effluent quality of the sewage.
Disclosure of Invention
The invention provides a sewage quality prediction method based on an LSTM neural network based on the difference of importance degrees of time series characteristics and local water quality data characteristics of sewage quality data in different time periods, and introduces a PSO algorithm and an attention mechanism to optimize the LSTM, so that the LSTM neural network can be trained with a better network structure, the identification capability of the LSTM on the importance degrees of the local characteristic sequences of the data is improved, the purposes of improving the prediction precision of the LSTM neural network and avoiding the local optimization are achieved, and the sewage quality can be more effectively predicted more accurately.
The invention adopts the following technical scheme:
a sewage quality prediction method based on a long-short term memory neural network optimized by an attention mechanism comprises the following steps: determining a leading variable; selecting an auxiliary variable; establishing a water quality prediction model based on a PSO-LSTM-att neural network; predicting the quality of the sewage treatment water. The auxiliary variables are selected using a principal component analysis method. Before selecting auxiliary variables by adopting a principal component analysis method, preprocessing collected sewage historical data, including removing abnormal values, supplementing missing values and normalizing data.
The structure of the PSO-LSTM-att neural network comprises three parts: a PSO algorithm layer, an LSTM neural network layer and a full connection layer; and optimizing the hyper-parameters of the LSTM neural network by adopting a PSO algorithm, adding a full connection layer behind the LSTM neural network hidden layer, and introducing an attention mechanism.
And further, inputting the training set sample into the LSTM-att neural network through the PSO layer for training, outputting the optimal hyper-parameter of the LSTM-att neural network after the training is finished, and inputting the optimal hyper-parameter into the PSO-LSTM-att neural network to serve as a water quality prediction model.
The method for optimizing the hyper-parameters of the LSTM neural network by adopting the PSO algorithm comprises the following steps:
(1) inputting a training set;
(2) setting a hyper-parameter of a PSO algorithm;
(3) randomly initializing a population, and selecting a training set Mean Square Error (MSE) as a fitness function;
(4) inputting the population parameters into an LSTM-att neural network prediction model for training, calculating the fitness of individuals and the population, and continuously updating a PSO operator;
(5) judging whether the training is finished according to whether a termination condition is reached;
(6) if the training is finished, outputting the LSTM-att optimal hyper-parameter; otherwise, returning to the step (4) to continue training.
The termination condition is that the maximum iteration number is reached or the mean square error is smaller than the set training error. The PSO operator comprises an individual optimal value, a population optimal value, the speed and displacement of particles, inertia weight and a learning factor.
The attention mechanism is to perform weighted summation calculation on the output of the hidden layer, allocate additional weight to each feature, and finally obtain a prediction result of the next time period. The formula for the attention mechanism is as follows:
Figure BDA0002961751110000031
Figure BDA0002961751110000032
αi=a(hi)=σ(Whi+b)
wherein the vector c is the extracted key features, and m is the sum of time steps input into the LSTM neural network; beta is aiIs a vector hiWeight of hiAnd W is a weight matrix of the full connection layer, b is a bias matrix of the full connection layer, and sigma is a sigmoid function.
Drawings
FIG. 1 is a flow chart of a wastewater quality prediction method of the present invention;
FIG. 2 is a flow chart of a PSO algorithm optimizing neural network hyper-parameters; and
FIG. 3 is a diagram of a PSO-LSTM-att neural network architecture.
Detailed Description
A sewage quality prediction method based on a long-short term memory neural network optimized by an attention mechanism comprises the following specific steps:
(1) selection of leading variable and auxiliary variable of key water quality parameter for sewage treatment
The data used by the method is derived from the sewage index data of a certain sewage treatment plant in sunshine city of Shandong province from 1 month and 1 day in 2019 to 31 days in 7 months in 2020, and the data is collected according to the day. Selecting water Chemical Oxygen Demand (COD) as a dominant variable, and preprocessing the collected historical sewage data, including removing abnormal values, supplementing missing values and normalizing the data.
And screening the sewage quality data by adopting a Principal Component Analysis (PCA) method, determining an auxiliary variable required to be selected by taking the effluent COD (chemical oxygen demand) as a dominant variable, and taking the auxiliary variable obtained by screening as an input variable of a sewage quality prediction model.
(2) Establishment of water quality prediction model based on PSO-LSTM-att neural network and prediction of sewage treatment water quality
The method comprises the steps of establishing a sewage quality prediction model by adopting an LSTM neural network suitable for processing time series data, determining initial values such as the number of neurons in a hidden layer of the model and the learning rate by adopting a PSO algorithm through data set preprocessing and data set construction in the process of establishing the LSTM neural network, and learning the importance degree of the local effluent quality characteristics by using an attention mechanism to finally obtain a sewage quality prediction result.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to specific embodiments and the accompanying drawings.
1. Selection of dominant variable and auxiliary variable of sewage treatment effluent quality parameter prediction model
1.1 selection of leading variables of effluent quality parameter prediction model for sewage treatment
When evaluating the quality of treated sewage, the effluent COD, BOD, and,
Figure BDA0002961751110000041
And the like. The indexes are not easy to directly measure, belong to important water quality parameters and are generally used as leading variables of a soft measurement model, namely output variables of the model. COD is a parameter reflecting the content of degradable organic matters in water, is one of key indexes for water quality evaluation, and has important significance for the accurate monitoring of the COD of the effluent on the optimal control of a subsequent sewage treatment system. Therefore, according to the importance and the easy measurement degree of the effluent quality parameters, the effluent COD capable of evaluating whether the effluent quality reaches the standard is selected as a predicted leading variable to verify the feasibility and the effectiveness of the invention.
1.2 Primary selection of auxiliary variables of effluent quality parameter prediction model for wastewater treatment
The selection of the auxiliary variables generally follows the following points:
(1) when the model is established, the method has better generalization capability.
(2) The auxiliary variable must be relatively easy to measure. Such as water temperature, SS, TP, etc.
(3) The auxiliary variables have a certain correlation with the main variable.
In the sewage treatment process, the dimensionality for extracting the auxiliary variable is a key problem, and if the dimensionality of the auxiliary variable is too high, redundant data can be generated, so that the data calculation amount is too large, and the model efficiency is further influenced; if the dimension of the auxiliary variable is small, part of key data can be lost, the accuracy of the model is affected, and the prediction result is inaccurate. Therefore, screening the auxiliary variables is a key step for establishing a sewage quality prediction model. Since COD is an index for measuring the amount of reducing substances in water and thus the organic matter content in water, it is estimated that the initial auxiliary variables are: COD and intake water
Figure BDA0002961751110000051
Water inlet TP, water inlet TN, water inlet SS, water temperature and PH value.
1.3 data preprocessing
(1) Clearing outliers
To eliminate noisy data, the outlier data values are typically cleaned. According to the 3 sigma principle (Laiya principle), assuming that sample data only contains random errors, the standard deviation is calculated according to the following formula, then a variable interval is obtained through probability, and data exceeding the interval is called an abnormal value and is eliminated.
Let n sample data x1,x2,x3,…,xnAverage value of
Figure BDA0002961751110000052
Deviation is as
Figure BDA0002961751110000053
Figure BDA0002961751110000054
The standard deviation formula is as follows:
Figure BDA0002961751110000055
e.g. sample data xiDeviation v ofi(i-1, 2, …, n) satisfying | vi|>3 σ, then xiDeleted as an abnormal value.
(2) Complementing missing values
Because data may encounter various problems during the collection process, partial data values of the data set may be missing, and the missing data may possibly contain important information, which may make the data set unable to provide sufficient data characteristics for the prediction model, and the result of the prediction model may be unstable or unreliable. Therefore, the missing value needs to be filled.
According to the period and time sequence characteristics of the sewage quality data, the method preferably adopts a Lagrange interpolation method to complement the missing data.
(3) Data normalization
As each parameter of the sewage data has different dimensions and dimension units, different parameters can influence each other. In order to eliminate the influence of dimension between parameters, the sewage data needs to be normalized, so that each parameter is in the same magnitude. The formula is as follows:
Figure BDA0002961751110000061
wherein x is*Representing input data x for each dimensioniNormalized value, xminAnd xmaxThe minimum and maximum values in each dimension of data. After the raw data is normalized, the data is mapped to [0,1 ]]In the meantime. After the model training is completed to obtain the result, the data needs to be subjected to inverse normalization processing so as to facilitate the analysis of the result.
1.4 screening auxiliary variables by PCA
PCA can solve the problem of screening auxiliary variables, and the principle is to convert a group of vectors with correlation into a group of linearly uncorrelated vectors through orthogonal transformation, and the converted group of vectors retains the main characteristics of the original vectors and has smaller dimension than the original vectors. The calculation steps are as follows:
there are k sample points, X, in n-dimensional spacei={xi1,xi2,xi3,…,xin}T(i-1, 2, …, k) form a matrix X-X1,X2,X3,…,XkThe mean of the matrix is:
Figure BDA0002961751110000062
performing centering processing on the matrix X to obtain a matrix Y which is as follows:
Figure BDA0002961751110000063
the covariance matrix C of the matrix X is obtained as:
Figure BDA0002961751110000064
calculating the eigenvalue of the covariance matrix C, and calculating the eigenvalue lambdai(i ═ 1,2, …, k) sorted by size, yielding the eigenvector matrix corresponding to the eigenvalues:
V={v1,v2,v3,…,vk}
projecting the original features onto the selected feature vectors to obtain the projection Y of Y in the ith principal component directioni
yi=vi TY
Projecting in the first p (p < n) directions yields γ:
Figure BDA0002961751110000071
if γ is close to 1, it indicates that the dimensionality reduction of the data is achieved.
The dimensionality reduction of auxiliary variables can be realized through the steps, and the COD and the water inflow of the inflow water can be realized
Figure BDA0002961751110000072
And water inlet TP, water inlet TN, water inlet SS, water temperature and PH value are used as input variables of the PCA algorithm. And reducing the dimension of the data by adopting a principal component analysis method, eliminating data noise redundancy in a dimension reduction mode by calculating the accumulated contribution rate of the auxiliary variable, and simplifying the complexity of the original data.
Taking effluent COD as a leading variable, carrying out dimensionality reduction treatment on an auxiliary variable according to the steps of a PCA algorithm, wherein the contribution rate after treatment is shown in the following table:
TABLE 1 auxiliary variable contribution ratio
Figure BDA0002961751110000073
And selecting a variable with the accumulated contribution rate exceeding 85% as an auxiliary variable, and reducing the data from the original seven-dimension to the four-dimension. Finally, when the effluent COD is determined as the leading variable, the COD of the inlet water and the COD of the inlet water are selected
Figure BDA0002961751110000074
The feed water TP and the feed water TN are used as auxiliary variables.
1.5 partitioning training set and data set
In order to train the model better and improve the generalization ability of the model, the data set needs to be processed and divided into a training set and a test set. In this example, the data set is partitioned using a cross-validation method. In the embodiment, a 10-fold cross validation method is adopted, 500 groups of historical sewage data are randomly divided into 10 equal parts, and the data distribution consistency is kept in the dividing process. During training, 9 parts of data are selected as a training set of the model each time, and the rest 1 part is used as a test set. And repeating the training for 10 times, and taking the average value of the evaluation indexes of the 10 times of training.
PSO-LSTM-att neural network
2.1 PSO Algorithm
The PSO algorithm is a random search algorithm based on group coordination developed by simulating foraging behavior of a bird group, and is generally considered to be an intelligent type of cluster. In PSO, the solution to each optimization problem is a bird in the search space, called a "particle". All the particles have an adaptive value determined by an optimized function, the moving direction and distance of the particles are determined by the speed, and then the particles follow the current optimal particles to search in a solution space.
The flow of the PSO algorithm for optimizing the neural network hyper-parameters is shown in fig. 2, and includes the following steps:
(1) a training set is input.
(2) And setting the hyper-parameter of the PSO algorithm.
(3) And (4) randomly initializing the population, and selecting the Mean Square Error (MSE) of the training set as a fitness function.
(4) And inputting the population parameters into an LSTM-att neural network prediction model for training, calculating the fitness of the individual and the population, and continuously updating a PSO operator, namely updating the optimal value and the population optimal value of the iterative individual, the speed and the displacement of the particles, the inertia weight and the learning factor.
(5) And judging whether the training is finished according to whether the termination condition is reached.
(6) And if the training is finished, outputting the optimal hyperparameter of the LSTM-att. Otherwise, returning to the step (4) to continue training.
Preferably, the termination condition is that a maximum number of iterations is reached or that the mean square error is less than a set training error. The mean square error is calculated from the model predicted value (effluent COD) and the actual value, and the upper limit is set. The mean square error can reflect both the change in the fitness function of the PSO algorithm and the loss function of the LSTM neural network.
2.2 attention mechanism
Although the LSTM neural network can store historical information, in the face of huge multidimensional multi-variable data sets, some important timing information in the current time step may be ignored, so an attention mechanism is introduced to optimize the LSTM neural network and learn the importance of the local feature sequence of the data, specifically: the information at different time steps is processed, and extra weight is distributed to parameters (auxiliary variables and output of the previous time step) input into the neural network, so that the neural network can pay attention to the parameters influencing the prediction result in a training process, the interference of the parameters which are not obviously influenced at the current time step on the prediction result is reduced, and the precision of the prediction result is improved. The essence of the attention mechanism is that the human brain is simulated to focus attention on some parts of things when observing a certain thing, the information has a strong guiding effect on the cognition of the same kind of things, and the attention mechanism can be simply understood as a weighted summer which generally acts on a hidden layer of an LSTM neural network. The implementation of the attention mechanism requires adding a full connection layer after the LSTM neural network hidden layer, and setting the softmax function as the activation function. The formula for the attention mechanism is as follows:
αi=a(hi)=σ(Whi+b)
Figure BDA0002961751110000091
Figure BDA0002961751110000092
where W is the weight matrix of the full connection layer, hiThe feature vector is output by the LSTM neural network, b is a full-connection layer bias matrix, and sigma is a sigmoid function; vector c is the extracted key features, m is the sum of the time steps input into the LSTM neural network; beta is aiIs a vector hiThe weight of (2).
2.3 establishing a PSO-LSTM-att neural network water quality prediction model
The structure diagram of the PSO-LSTM-att neural network is shown in fig. 3, and includes three parts, a PSO algorithm layer, an LSTM neural network layer, and a full connection layer (Attention mechanism). The attention mechanism is added into the hidden layer of the LSTM through the full connection layer, the number of neurons of the hidden layer of the LSTM layer and the learning rate are set as population parameters of a PSO algorithm, and a training set sample is input into the LSTM-att neural network through the PSO layer for training. And after training is finished, outputting the optimal hyper-parameter of the LSTM-att neural network, inputting the optimal hyper-parameter into the PSO-LSTM-att neural network, and verifying the prediction effect of the PSO-LSTM-att neural network on the effluent quality through a test set.
The action mode of the Attention mechanism (Attention layer) can be seen from the structural diagram, the fully-connected layer is arranged, the output of the hidden layer is subjected to weighted summation calculation, extra weight is distributed to each feature, and finally the prediction result of the next time interval is obtained. The beneficial effects of the invention are as follows:
(1) and (3) aiming at the effluent COD to be predicted, adopting a Principal Component Analysis (PCA) method, eliminating data noise redundancy in a dimensionality reduction mode by calculating the accumulated contribution rate of the auxiliary variable, simplifying the complexity of the original data, and finally determining the auxiliary variable parameter taking the effluent COD as a dominant variable.
(2) And establishing a PSO-LSTM-att neural network water quality prediction model. Aiming at the problem that the neural network is difficult to select over-parameters, a PSO algorithm is added to obtain better parameters and network structures of the neural network in a mode independent of human experience; in order to improve the ability of the LSTM neural network to identify the importance degree of the data of the current time step, an attention mechanism is added, so that the purpose of accurately grasping which auxiliary variable influences the current time step more greatly can be realized, and the purpose of improving the effluent quality prediction accuracy is realized.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention and are not intended to limit the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A sewage quality prediction method based on a long-short term memory neural network optimized by an attention mechanism comprises the following steps:
(1) determining a leading variable;
(2) selecting an auxiliary variable;
(3) establishing a water quality prediction model based on a PSO-LSTM-att neural network;
(4) predicting the quality of the sewage treatment water.
2. The method of claim 1, wherein the auxiliary variables are selected using a principal component analysis method.
3. The method of claim 2, wherein the collected historical data of the wastewater is preprocessed, including removing outliers, supplementing missing values, and normalizing the data, prior to selecting the auxiliary variable using the principal component analysis method.
4. The method of claim 1, the structure of the PSO-LSTM-att neural network comprising three parts: a PSO algorithm layer, an LSTM neural network layer and a full connection layer; and optimizing the hyper-parameters of the LSTM neural network by adopting a PSO algorithm, adding a full connection layer behind the LSTM neural network hidden layer, and introducing an attention mechanism.
5. The method as claimed in claim 4, inputting the training set sample into the LSTM-att neural network through the PSO layer for training, outputting the optimal hyper-parameter of the LSTM-att neural network after the training is completed, and inputting the optimal hyper-parameter into the PSO-LSTM-att neural network as the water quality prediction model.
6. The method of claim 4, the optimizing the hyper-parameters of the LSTM neural network using the PSO algorithm comprising the steps of:
(1) inputting a training set;
(2) setting a hyper-parameter of a PSO algorithm;
(3) randomly initializing a population, and selecting a training set Mean Square Error (MSE) as a fitness function;
(4) inputting the population parameters into an LSTM-att neural network prediction model for training, calculating the fitness of individuals and the population, and continuously updating a PSO operator;
(5) judging whether the training is finished according to whether a termination condition is reached;
(6) if the training is finished, outputting the LSTM-att optimal hyper-parameter; otherwise, returning to the step (4) to continue training.
7. The method of claim 6, wherein the termination condition is that a maximum number of iterations is reached or a mean square error is less than a set training error.
8. The method of claim 6, the PSO operators being individual and population optima, velocity and displacement of particles, inertial weights, and learning factors.
9. The method of claim 4, wherein the attention mechanism is to perform a weighted summation calculation on the output of the hidden layer, and assign an additional weight to each feature, thereby obtaining a prediction result of the next time interval.
10. The method of claim 9, wherein the attention mechanism is calculated as follows:
Figure FDA0002961751100000021
Figure FDA0002961751100000022
αi=a(hi)=σ(Whi+b)
wherein the vector c is the extracted key features, and m is the sum of time steps input into the LSTM neural network; beta is aiIs a vector hiWeight of hiAnd W is a weight matrix of the full connection layer, b is a bias matrix of the full connection layer, and sigma is a sigmoid function.
CN202110239984.9A 2021-03-04 2021-03-04 Optimized LSTM neural network-based sewage quality prediction method Withdrawn CN112884056A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110239984.9A CN112884056A (en) 2021-03-04 2021-03-04 Optimized LSTM neural network-based sewage quality prediction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110239984.9A CN112884056A (en) 2021-03-04 2021-03-04 Optimized LSTM neural network-based sewage quality prediction method

Publications (1)

Publication Number Publication Date
CN112884056A true CN112884056A (en) 2021-06-01

Family

ID=76055438

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110239984.9A Withdrawn CN112884056A (en) 2021-03-04 2021-03-04 Optimized LSTM neural network-based sewage quality prediction method

Country Status (1)

Country Link
CN (1) CN112884056A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113705922A (en) * 2021-09-06 2021-11-26 内蒙古科技大学 Improved ultra-short-term wind power prediction algorithm and model establishment method
CN113836813A (en) * 2021-09-29 2021-12-24 深圳市桐栎智能科技有限公司 Blast furnace tuyere water leakage detection method based on data analysis
CN114113516A (en) * 2021-10-27 2022-03-01 内蒙古工业大学 Water quality abnormal data detection method based on GAN
CN114386693A (en) * 2022-01-11 2022-04-22 福建中锐网络股份有限公司 Reservoir water level prediction early warning method based on PSO-LSTM-Attention model
CN114420220A (en) * 2022-01-25 2022-04-29 湖南株冶有色金属有限公司 Method for predicting pH value in neutral leaching process of zinc hydrometallurgy
CN114492604A (en) * 2022-01-11 2022-05-13 电子科技大学 Radiation source individual identification method under small sample scene
CN114595631A (en) * 2022-03-07 2022-06-07 中电万维信息技术有限责任公司 Water quality prediction method based on EFDC model and machine learning algorithm
CN115028301A (en) * 2022-05-31 2022-09-09 河北工程大学 Intelligent purified swimming pool water recycling system and method
CN115376614A (en) * 2022-04-14 2022-11-22 齐鲁工业大学 Key path identification method based on combination of convolutional neural network and attention mechanism
CN115828758A (en) * 2022-12-13 2023-03-21 广东海洋大学 Seawater three-dimensional prediction method and system based on improved firework algorithm optimization network
CN116522086A (en) * 2023-04-25 2023-08-01 中国长江三峡集团有限公司 Data recovery and water quality detection method and device based on variation self-encoder
CN117059201A (en) * 2023-07-26 2023-11-14 佛山市南舟智能科技有限公司 Method, device, equipment and storage medium for predicting chemical oxygen demand of sewage
CN117192063A (en) * 2023-11-06 2023-12-08 山东大学 Water quality prediction method and system based on coupled Kalman filtering data assimilation

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113705922A (en) * 2021-09-06 2021-11-26 内蒙古科技大学 Improved ultra-short-term wind power prediction algorithm and model establishment method
CN113705922B (en) * 2021-09-06 2023-09-12 内蒙古科技大学 Improved ultra-short-term wind power prediction algorithm and model building method
CN113836813A (en) * 2021-09-29 2021-12-24 深圳市桐栎智能科技有限公司 Blast furnace tuyere water leakage detection method based on data analysis
CN113836813B (en) * 2021-09-29 2024-01-30 深圳市桐栎智能科技有限公司 Blast furnace tuyere water leakage detection method based on data analysis
CN114113516A (en) * 2021-10-27 2022-03-01 内蒙古工业大学 Water quality abnormal data detection method based on GAN
CN114492604A (en) * 2022-01-11 2022-05-13 电子科技大学 Radiation source individual identification method under small sample scene
CN114386693B (en) * 2022-01-11 2024-10-18 福建中锐网络股份有限公司 Reservoir water level prediction and early warning method based on PSO-LSTM-Attention model
CN114386693A (en) * 2022-01-11 2022-04-22 福建中锐网络股份有限公司 Reservoir water level prediction early warning method based on PSO-LSTM-Attention model
CN114420220A (en) * 2022-01-25 2022-04-29 湖南株冶有色金属有限公司 Method for predicting pH value in neutral leaching process of zinc hydrometallurgy
CN114420220B (en) * 2022-01-25 2024-09-24 湖南株冶有色金属有限公司 Method for predicting pH value in neutral leaching process of zinc hydrometallurgy
CN114595631B (en) * 2022-03-07 2024-04-19 中电万维信息技术有限责任公司 Water quality prediction method based on EFDC model and machine learning algorithm
CN114595631A (en) * 2022-03-07 2022-06-07 中电万维信息技术有限责任公司 Water quality prediction method based on EFDC model and machine learning algorithm
CN115376614A (en) * 2022-04-14 2022-11-22 齐鲁工业大学 Key path identification method based on combination of convolutional neural network and attention mechanism
CN115028301A (en) * 2022-05-31 2022-09-09 河北工程大学 Intelligent purified swimming pool water recycling system and method
CN115028301B (en) * 2022-05-31 2024-04-26 河北工程大学 Intelligent purifying swimming pool water recycling system and method
CN115828758A (en) * 2022-12-13 2023-03-21 广东海洋大学 Seawater three-dimensional prediction method and system based on improved firework algorithm optimization network
CN115828758B (en) * 2022-12-13 2023-08-25 广东海洋大学 Seawater three-dimensional prediction method and system based on improved firework algorithm optimization network
CN116522086A (en) * 2023-04-25 2023-08-01 中国长江三峡集团有限公司 Data recovery and water quality detection method and device based on variation self-encoder
CN117059201B (en) * 2023-07-26 2024-06-11 佛山市南舟智能科技有限公司 Method, device, equipment and storage medium for predicting chemical oxygen demand of sewage
CN117059201A (en) * 2023-07-26 2023-11-14 佛山市南舟智能科技有限公司 Method, device, equipment and storage medium for predicting chemical oxygen demand of sewage
CN117192063B (en) * 2023-11-06 2024-03-15 山东大学 Water quality prediction method and system based on coupled Kalman filtering data assimilation
CN117192063A (en) * 2023-11-06 2023-12-08 山东大学 Water quality prediction method and system based on coupled Kalman filtering data assimilation

Similar Documents

Publication Publication Date Title
CN112884056A (en) Optimized LSTM neural network-based sewage quality prediction method
CN111291937A (en) Method for predicting quality of treated sewage based on combination of support vector classification and GRU neural network
CN111860982A (en) Wind power plant short-term wind power prediction method based on VMD-FCM-GRU
CN110443417A (en) Multi-model integrated load prediction method based on wavelet transformation
CN110542748B (en) Knowledge-based robust effluent ammonia nitrogen soft measurement method
CN110320335B (en) Multi-element robust soft measurement method for effluent quality index of sewage treatment
CN109143408B (en) Dynamic region combined short-time rainfall forecasting method based on MLP
CN116721537A (en) Urban short-time traffic flow prediction method based on GCN-IPSO-LSTM combination model
AU2021106540A4 (en) Prediction method and system for river algal blooms
CN116542382A (en) Sewage treatment dissolved oxygen concentration prediction method based on mixed optimization algorithm
CN117291069A (en) LSTM sewage water quality prediction method based on improved DE and attention mechanism
CN111506868B (en) Ultra-short-term wind speed prediction method based on HHT weight optimization
CN116187835A (en) Data-driven-based method and system for estimating theoretical line loss interval of transformer area
CN112765902A (en) RBF neural network soft measurement modeling method based on TentFWA-GD and application thereof
CN115982141A (en) Characteristic optimization method for time series data prediction
CN109408896B (en) Multi-element intelligent real-time monitoring method for anaerobic sewage treatment gas production
CN113762591A (en) Short-term electric quantity prediction method and system based on GRU and multi-core SVM counterstudy
CN109359741A (en) A kind of wastewater treatment influent quality timing variations intelligent Forecasting
CN116880201A (en) Water network channel state control system based on fuzzy neural network
CN111863153A (en) Method for predicting total amount of suspended solids in wastewater based on data mining
CN111310974A (en) Short-term water demand prediction method based on GA-ELM
CN116842358A (en) Soft measurement modeling method based on multi-scale convolution and self-adaptive feature fusion
CN116565850A (en) Wind power ultra-short-term prediction method based on QR-BLSTM
Xu et al. Prediction of the Wastewater's pH Based on Deep Learning Incorporating Sliding Windows.
CN116306803A (en) Method for predicting BOD concentration of outlet water of ILSTM (biological information collection flow) neural network based on WSFA-AFE

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20210601

WW01 Invention patent application withdrawn after publication