CN115951014A - CNN-LSTM-BP multi-mode air pollutant prediction method combining meteorological features - Google Patents

CNN-LSTM-BP multi-mode air pollutant prediction method combining meteorological features Download PDF

Info

Publication number
CN115951014A
CN115951014A CN202211456742.6A CN202211456742A CN115951014A CN 115951014 A CN115951014 A CN 115951014A CN 202211456742 A CN202211456742 A CN 202211456742A CN 115951014 A CN115951014 A CN 115951014A
Authority
CN
China
Prior art keywords
data
meteorological
pollutant
cnn
lstm
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
CN202211456742.6A
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.)
Nantong University
Original Assignee
Nantong University
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 Nantong University filed Critical Nantong University
Priority to CN202211456742.6A priority Critical patent/CN115951014A/en
Publication of CN115951014A publication Critical patent/CN115951014A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a CNN-LSTM-BP multi-mode air pollutant prediction method combining meteorological features, which comprises the following steps: collecting air quality data of a monitoring station, and preprocessing an abnormal value and a missing value; analyzing the data by using the Pearson correlation coefficient, mining the correlation between meteorological factors and different pollutants, and selecting the meteorological factors with high correlation as auxiliary characteristics; constructing a convolution-long-and-short-term memory network (CNN-LSTM) to perform system modeling and feature extraction on time change rules and correlations of various air pollutants, and performing modeling and feature extraction on weather factor time change rules influencing air quality by using the CNN; and fusing and predicting the characteristics of the various pollutants and meteorological factors through a BP network to obtain predicted values of the various pollutants. The invention constructs a multi-mode air pollutant prediction model, fully considers the influence among different pollutants and the change of meteorological conditions, and effectively improves the precision of the air pollutant prediction model.

Description

CNN-LSTM-BP multi-mode air pollutant prediction method combining meteorological features
Technical Field
The invention belongs to the field of environmental monitoring and deep learning, and particularly relates to a CNN-LSTM-BP multi-mode air pollutant prediction method combining meteorological features.
Technical Field
The problem of air pollution has become more serious in recent years, and the harm of the air pollution is spread all over the world. The main effects of atmospheric pollution are: ozone layer depletion, acid rain and global warming. The destruction of the ozone layer can cause the increase of the incidence rate of eye diseases and skin cancer of human beings; acid rain can cause soil acidification and corrosion of buildings, and affect the normal development of plants and the service life of buildings. Global warming is a major hidden danger which jeopardizes human survival and development, sea level rise, forest fire, extreme weather and the like are the most serious challenges which are initiated by the environment to human beings, and the health of human bodies can be seriously affected when the air pollution reaches sufficient concentration and duration, so that the environmental management problem is concerned by more and more countries, and the solution of the air pollution problem is urgent.
Practice shows that the air quality prediction model can predict the possible pollution and take control measures, and can effectively reduce the harm of atmospheric pollution to human beings and the environment, so that the establishment of reasonable pollution prevention and treatment measures is more and more emphasized by countries and related departments. The WRF-CMAQ is a commonly used air quality forecasting model at present and consists of a WRF (mesoscale numerical weather forecasting system) for providing meteorological field data and a CMAQ (three-dimensional Euler atmospheric chemistry and transmission simulation system) for obtaining a forecasting result by simulating a pollutant change process. However, due to uncertainty in factors such as simulated meteorological fields, emission lists, and pollutant generation mechanisms, the existing prediction results based on physical models are not ideal.
Disclosure of Invention
The purpose of the invention is as follows: aiming at the problems, the invention introduces a CNN-LSTM-BP multi-mode air pollutant prediction method combined with meteorological characteristics, aiming at the problem that the prediction effect of the existing physical prediction model is not ideal, and an air pollutant prediction model based on a CNN-LSTM-BP network is established on the basis of data driving. Firstly, performing relevance analysis on preprocessed data by using a Pearson correlation coefficient method, mining the relevance between meteorological factors and different pollutants, and selecting the meteorological factors with high relevance as model external features for input. Then, constructing a CNN-LSTM-based air pollutant feature extraction network to express the day-by-day and hour-by-hour change rule and the mutual influence relationship of the historical measured data of each pollutant; constructing a CNN meteorological feature extraction network to represent a day-by-day and hour-by-hour change rule of high-correlation meteorological data; and splicing the time sequence characteristics of each pollutant with the meteorological auxiliary characteristics through a BP network, and predicting to obtain the predicted value of each pollutant.
The invention effectively utilizes machine learning and deep learning methods to accurately model and extract the time change rules and the mutual influence relationship of the historical data of various air pollutants and the time change rules of highly-associated meteorological data, and establishes a data-driven pollutant-meteorological multi-mode air quality prediction model, thereby accurately predicting the concentration of harmful pollutants in the air.
The technical scheme is as follows: a CNN-LSTM-BP multi-mode air pollutant prediction method combining meteorological features comprises the following steps:
step 1) acquiring air quality data of an environment monitoring station, transmitting the data to a background server in real time, and preprocessing abnormal values and missing values in original data to reduce data redundancy;
step 2) performing relevance analysis on the preprocessed data by using a Pearson correlation coefficient method, mining the relevance between meteorological factors and different pollutants, and selecting the meteorological factors with high relevance as the external features of the model for input;
step 3) constructing a CNN-LSTM-based air pollutant feature extraction network, and learning the change rule and the mutual influence relationship of the measured historical data of various pollutants day by day and hour by hour; a weather factor auxiliary feature extraction network based on CNN is constructed, and the change rule of each weather data day by day and hour by hour is learned; fusing the time sequence characteristics of each pollutant and the meteorological auxiliary characteristics through a BP network, and predicting to obtain prediction output of each pollutant;
and 4) training the constructed CNN-LSTM-BP-based air pollutant prediction network, and predicting a future air pollutant concentration value by using the trained model.
Further, in the step 1, air quality data of the environment monitoring station is collected, the data is transmitted to the background server in real time, abnormal values in original data are subjected to data elimination, missing values are subjected to data filling, data preprocessing is performed according to the data elimination, and data redundancy is reduced, and the method specifically comprises the following steps:
1-1: data elimination, comprising the following steps:
1-1-1: rejecting the data violating the objective facts, rejecting a numerical value with the pollutant monitoring concentration being less than 0, rejecting a numerical value with the humidity being more than 100%, rejecting a numerical value with the wind speed being less than 0, rejecting a numerical value with the wind direction being less than 0 degrees and being more than 360 degrees;
1-1-2: and eliminating the data deviating from the normal distribution. Using a distance-based outlier detection algorithm to detect data that deviates from the normal distribution, first 5 consecutive points { x } are calculated p-2 ,x p-1 ,x p ,x p+1 ,x p+2 Mean value of x pEve As shown in formula (1):
x pEve =EVERAGE(x p-2 ,x p-1 ,x p ,x p+1 ,x p+2 )#(1)
where x represents various parameters such as SO2 monitoring concentration, etc., and p represents the position of the value in the parameter sequence. Then, the absolute value of the difference between 5 points and the mean is calculated, as shown in equation (2):
x iErr =|x pEve -x i |,i∈[p-2,p+2]#(2)
finally, note off x p The other error is x pErr If x pErr X greater than three times pErrEve X is then p The judgment condition for abnormal data is shown in formula (3):
x pErrEve =EVERAGE(x p-2E r,x p-1E ,x p+1Err ,x p+2Err )#(3)
wherein x is pErr >3*x pErrEve
1-2: the data filling steps are as follows:
1-2-1: since the degree of data loss has a large difference in the accuracy of the repair scheme, mean filling missing data is used to fill up when the continuously lost data is less than three frames. The method is to fill the corresponding attribute mean value of the existing data into the missing value, and the formula definition is shown in formula (4):
x miss =EVERAGE(x before ,x after )#(4)
in the formula x miss For missing data, x before Data preceding the missing data, x after The latter data of the data missing.
1-2-2: and when the continuously lost data is more than three frames, EM filling is adopted, the missing value is calculated by the filling method through maximum likelihood estimation, and the global optimal solution can be found through the self-stable iterative process. First, let observation data x = (x) (1) ,x (2) ,…x (m) ) Missing data z = (z) (1) ,z (2) ,…z (m) ) Joint distribution p (x, z | θ), conditional distribution p (z | x, θ), maximum number of iterations J. And (3) performing EM algorithm iteration from the value of J to J from 1: firstly, calculating the conditional probability expectation of the joint distribution, wherein the formula is shown in formulas (5) and (6):
Q i (z (i) )=P(z (i) |x (i) ,θ (j) )#(5)
Figure SMS_1
re-maximization of L (theta ) j ) To obtain theta j+1 The formula is shown in formula (7):
Figure SMS_2
if theta is greater than theta j+1 And if the convergence is achieved, the algorithm is ended, otherwise, the E-step iteration is continued. And finally, outputting a model parameter theta, and filling missing data according to a result output by the model.
Further, in the step 2, correlation analysis is performed on the preprocessed data by using a pearson correlation coefficient method, correlations between meteorological factors and different pollutants are mined, and meteorological factors with high correlations are selected as model external features for input. The pearson correlation coefficient is a parameter widely used to measure the degree of correlation between two sequences, and is expressed by the formula (8):
Figure SMS_3
wherein X and Y represent two different sequences,
Figure SMS_4
r is the average of the two sequences and represents the correlation coefficient of the two sequences, the value of r is between-1 and 1, and the larger the absolute value of r is, the higher the correlation is.
Sorting according to the correlation value according to the result of the Pearson correlation coefficient analysis, and screening to obtain the meteorological factors of K before correlation { weather } 1 ,weather 2 ,...,weather x }。
Further, in the step 3), an air pollutant feature extraction network based on CNN-LSTM is constructed, the change rule of each pollutant historical measured data day by day and hour by hour and the influence relationship among each pollutant are learned through a Convolutional Neural Network (CNN) and a long-term memory network (LSTM) component, and the time sequence feature of each pollutant is obtained through Reshape operation; and (5) performing feature extraction on the high-correlation meteorological data by using the CNN, and performing Reshape operation to obtain meteorological auxiliary features. And then, splicing time sequence characteristics of each pollutant and meteorological auxiliary characteristics in a BP network as network input, and predicting to obtain prediction output of each pollutant, wherein the method comprises the following specific steps:
3-1: the method comprises the following steps of establishing a CNN-STM air pollutant feature extraction network based on CNN and LSTM frameworks, representing hourly change and daily change of each pollution concentration and mutual influence relationship thereof, and specifically comprising the following steps:
3-1-1: converting the pollutant data processed in the step 1 into a matrix X (M multiplied by M matrix), wherein X is i Represents the i-th contaminant type, X i The columns and rows of (a) represent the recorded pollution per day and per hour, respectivelyObject data, i.e. X i ={x i (h,d)},h∈[1,M];d∈[1,M]。
3-1-2: and extracting the day-by-day and hour-by-hour time characteristics of the pollutant data by adopting a CNN model. The key step is the convolutional layer, where the filter is moved in each input element by a convolution operation between the filter and the input element (M × M matrix). Using omega f Representing a filter, where F represents the index of the filter, F ∈ {1,2, \8230;, F }, the filter size is L × (L is a super parameter), the filter will be sliding convolved on M × M input elements, so the convolutional layer output has a size of (M-L + 1) 2 The convolution formula is shown in formula (9):
Figure SMS_5
3-1-3: after convolution, a max pooling operation is performed to generate the maximum value of the selected block (kxk, K-superparameter, representing the pooled filter size), which is similar to the convolutional layer, and the filter moves by K units without filtering the overlapping part of the input matrix, as shown in equation (10):
Figure SMS_6
3-1-4: and performing Reshape operation after pooling of the pollutant data, and converting the matrix into a one-dimensional vector. In order to extract the time correlation among pollutants, inputting the features after Reshape into an LSTM to obtain the time sequence features of the relation fusion among the pollutants, wherein the calculation mode of the LSTM is as follows:
Figure SMS_7
i t =σ(Y i ·[h t-1 ,X t ]+a i )#(12)
f t =σ(Y f ·[h t-1 ,X t ]+a f )#(13)
U t =σ(Y o ·[h t-1 ,X t ]+a o )#(14)
Figure SMS_8
O(t)=tanh(H t )*U t #(16)
wherein
Figure SMS_9
Representing the cell state of the system, i t 、f t 、U t Input, hidden, output gates representing the system H t Representing the current state of the system, O (t) representing the output of the system at the current time, Y C 、Y i 、Y f 、Y o A parameter matrix of LSTM with initial values in the range of-0.1, 0.1]Random matrix of a C 、a i 、a f 、a o Is the bias of LSTM, whose initial value is zero vector, which represents the Hadamard product, i t 、f t 、U t The input gate, the forgetting gate and the output gate of the LSTM respectively output the number of 0-1 through a Sigmoid function so as to control the opening and closing degree of the gates, thereby realizing the control of the input quantity of the system state H, the maintenance of the original state and the control of the output quantity;
3-2: the method comprises the following steps of establishing a CNN-based meteorological feature extraction network, representing the hourly change and daily change rules of high-correlation meteorological data, and specifically comprising the following steps:
3-2-1: converting the weather data processed in the step 2 into a matrix W (M multiplied by M matrix), wherein W is i Represents the ith weather type, W i The columns and rows of (A) represent the daily and hourly recorded weather data, i.e., W, respectively i ={w i (h,d)},h∈[1,M];d∈[1,M]。
3-2-2: stacking various high-correlation meteorological data into a multi-channel matrix, extracting features through convolution and pooling according to the steps described in 3-1-2, and converting the features into one-dimensional vectors through Reshape operation to be used as meteorological auxiliary features;
3-3: splicing the pollutant fusion time sequence characteristics and the meteorological auxiliary characteristics to serve as input of a BP network, performing characteristic fusion by using the BP network, and outputting a predicted value of the pollutant after fusion. The connection mode of the BP network is shown in formula (17):
Y pol (n)=f BP (X pol (n)||X weafuse) #(17)
wherein, Y pol (n) represents the predicted output of the nth pollutant, X pol (n) represents the fusion time series characteristic of the nth contaminant, X weafuse Representing a meteorological fusion feature, f BP Represents a full join operation, | | represents a series operation;
3-4: establishing a model objective function, which comprises the following specific steps:
3-4-1: establishing an objective function 1 to ensure that the maximum relative error of a model prediction result is as small as possible;
the objective function 1 is expressed by equation (18):
Figure SMS_10
in the formula, E MRE (i) Is the maximum relative error of the predicted value of the ith node,
Figure SMS_11
and &>
Figure SMS_12
Respectively predicting a predicted value and a true value of the predicted value of the ith node;
3-4-2: establishing an objective function 2 to ensure that the pollutant prediction accuracy is as high as possible;
in order to make the pollutant prediction accuracy as high as possible, root Mean Square Error (RMSE) is used as an evaluation index, and the formula of RMSE is shown in formula (19):
Figure SMS_13
wherein, c p And
Figure SMS_14
the actual contamination concentration and the predicted concentration of the contaminant p, respectively, thus obtaining the targetThe formula of function 2 is shown in equation (20):
Figure SMS_15
further, in the step 4), the CNN-LSTM-BP based multi-modal air pollutant prediction network constructed in the step 3) is trained, and a trained model is used to predict a future air pollutant concentration value, specifically comprising the following steps:
4-1: initializing a model structure, and determining network convolution kernel dimensions, initial weights, training step lengths, activation functions, the number of hidden layers and iteration times;
4-2: testing the prediction accuracy of the model by using the prediction set, and obtaining the prediction accuracy of the model by using RMSE as an evaluation index;
4-3: the same training set and test set were used to train the conventional LSTM for model comparison.
Has the advantages that: aiming at the problem that the prediction result is not ideal due to the uncertainty of factors such as a simulated meteorological field, an emission list, a pollutant generation mechanism and the like of the conventional prediction model, the air pollutant prediction method establishes the air pollutant prediction model based on the CNN-LSTM-BP network on the basis of data driving, fully considers the influence among different pollutants and the change of meteorological conditions, and effectively improves the precision of the air pollutant prediction model.
The invention introduces a CNN-LSTM-BP multi-mode air pollutant prediction method combined with meteorological characteristics, aiming at the problem that the prediction effect of the existing prediction model is not ideal, and an air pollutant prediction model based on a CNN-LSTM-BP network is established on the basis of data driving. Firstly, performing relevance analysis on preprocessed data by using a Pearson correlation coefficient method, mining the relevance between meteorological factors and different pollutants, and selecting the meteorological factors with high relevance as model external features for input. Then, constructing a CNN-LSTM-based air pollutant feature extraction network to express the day-by-day and hour-by-hour change rule and the mutual influence relationship of the historical measured data of each pollutant; constructing a CNN meteorological feature extraction network representation highly-associated meteorological data day-to-day and hour-to-hour change rule; and splicing the time sequence characteristics of each pollutant with the meteorological auxiliary characteristics through a BP network, and predicting to obtain the predicted value of each pollutant.
Drawings
FIG. 1 is a schematic diagram of steps of a CNN-LSTM-BP multi-modal air pollutant prediction method in combination with meteorological features according to the present invention;
FIG. 2 is a thermodynamic diagram of meteorological data and pollutant correlation coefficient (taking Nantong city data as an example) of a CNN-LSTM-BP multi-modal air pollutant prediction method combining meteorological features of the invention;
FIG. 3 is a model structure diagram of a CNN-LSTM-BP multi-modal air pollutant prediction method in combination with meteorological features according to the present invention;
FIG. 4 is a model training iteration diagram of a CNN-LSTM-BP multi-modal air pollutant prediction method in combination with meteorological features according to the present invention;
FIG. 5 is a comparison graph of real data and predicted data of a CNN-LSTM-BP multi-modal air pollutant prediction method in combination with meteorological features according to the present invention;
detailed description of the preferred embodiment
The technical method of the present invention will be further described in detail with reference to the accompanying drawings.
As shown in FIG. 1, a CNN-LSTM-BP multi-modal air pollutant prediction method combining meteorological features comprises the following steps:
step 1) acquiring air quality data of an environment monitoring station, transmitting the data to a background server in real time, and preprocessing abnormal values and missing values in original data to reduce data redundancy;
in the step 1, air quality data of the environment monitoring station is collected and transmitted to a background server in real time, abnormal values in original data are removed, missing values are filled with data, data preprocessing is performed, and data redundancy is reduced, and the method specifically comprises the following steps:
1-1: data elimination, comprising the following steps:
1-1-1: rejecting the data violating the objective facts, rejecting a numerical value with the pollutant monitoring concentration being less than 0, rejecting a numerical value with the humidity being more than 100%, rejecting a numerical value with the wind speed being less than 0, rejecting a numerical value with the wind direction being less than 0 degrees and being more than 360 degrees;
1-1-2: and eliminating the data deviating from the normal distribution. Using a distance-based outlier detection algorithm to detect data that deviates from the normal distribution, a series of 5 points { x ] are first calculated p-2 ,x p-1 ,x p ,x p+1 ,x p+2 Mean value x of } pEve As shown in formula (1):
x pEve =EVERAGE(x p-2 ,x p-1 ,x p ,x p+1 ,x p+2 )#(1)
where x represents various parameters such as SO2 monitoring concentration, etc., and p represents the position of the value in the parameter sequence. Then, the absolute value of the difference between 5 points and the mean is calculated, as shown in equation (2):
x iErr =|x pEve -x i |,i∈[p-2,p+2]#(2)
finally, note off x p The other error is x pErrEve If x is pErr X greater than three times pErrE Then x p The judgment condition for abnormal data is shown in formula (3):
x pErrEve =EVERAGE(x p-2Er ,x p-1Er ,x p+1Er ,x p+2Er )#(3)
wherein x is pErr >3*x pErrEve
1-2: the data filling steps are as follows:
1-2-1: since the degree of data loss has a large difference in the accuracy of the repair scheme, mean filling missing data is used to fill up when the continuously lost data is less than three frames. The method is to fill the corresponding attribute mean value of the existing data into the missing value, and the formula definition is shown in formula (4):
x miss =EVERAGE(x before ,x after )#(4)
in the formula x miss For missing data, x before Data preceding the missing data, x aft The latter data of the data missing.
1-2-2: and when the continuously lost data is more than three frames, EM filling is adopted, the missing value is calculated by the filling method through maximum likelihood estimation, and the global optimal solution can be found through the self-stable iterative process. First, let observation data x = (x) (1) ,x (2) ,…x (m) ) Missing data z = (z) (1) ,z (2) ,…z (m) ) Joint distribution p (x, z | θ), conditional distribution p (z | x, θ), maximum number of iterations J. And (3) carrying out EM algorithm iteration on J from 1 to J: firstly, calculating the conditional probability expectation of the joint distribution, wherein the formula is shown in formulas (5) and (6):
Q i (z (i) )=P(z (i) |x (i) ,θ (j) )#(5)
Figure SMS_16
re-maximization of L (theta ) j ) To obtain theta j+1 The formula is shown in formula (7):
Figure SMS_17
if theta is greater than theta j+1 And if the convergence is achieved, the algorithm is ended, otherwise, the E-step iteration is continued. And finally, outputting a model parameter theta, and filling missing data according to a result output by the model.
Step 2) performing relevance analysis on the preprocessed data by using a Pearson correlation coefficient method, mining the relevance between meteorological factors and different pollutants, and selecting the meteorological factors with high relevance as the external features of the model for input;
in the step 2, correlation analysis is performed on the preprocessed data by using a Pearson correlation coefficient method, the correlation between meteorological factors and different pollutants is mined, and the meteorological factors with high correlation are selected as the external features of the model to be input. The pearson correlation coefficient is a parameter widely used to measure the degree of correlation between two sequences, and is expressed by the formula (8):
Figure SMS_18
wherein X and Y represent two different sequences,
Figure SMS_19
r is the average of the two sequences and represents the correlation coefficient of the two sequences, the value is between-1 and 1, and the larger the absolute value is, the higher the correlation is.
Sorting according to the correlation value according to the result of the Pearson correlation coefficient analysis, and screening to obtain the meteorological factors of K before correlation { weather } 1 ,weather 2 ,…,weather x }. Taking collected data of air pollutants in southeast city as an example, a thermodynamic diagram of correlation coefficients of 0 point, 6 points, 12 points and 18 points every day in the southeast city is shown in fig. 2, data in blocks in the diagram are specific correlation values, a red block is positive correlation, a blue block is negative correlation, white is irrelevant, and the deeper the color is, the higher the correlation degree of the sequence is.
Step 3) constructing a CNN-LSTM-based air pollutant feature extraction network, and learning the change rule and the mutual influence relationship of the measured historical data of various pollutants day by day and hour by hour; a CNN-based meteorological factor auxiliary feature extraction network is constructed, and the change rule of each meteorological data day by day and hour by hour is learned; fusing the time sequence characteristics of each pollutant and the meteorological auxiliary characteristics through a BP network, and predicting to obtain prediction output of each pollutant;
in the step 3), an air pollutant feature extraction network based on CNN-LSTM is constructed, and the whole network structure is shown in FIG. 3. Learning the change rule of the historical measured data of each pollutant day by day and hour by hour and the influence relation among the pollutants through a Convolutional Neural Network (CNN) and a long-term memory network (LSTM) component, and obtaining the time sequence characteristics of each pollutant through Reshape operation; and (4) performing feature extraction on the high-correlation meteorological data by using the CNN, and obtaining meteorological auxiliary features through Reshape operation. And then, splicing the time sequence characteristics of each pollutant and the meteorological auxiliary characteristics in the BP network as network input, and predicting to obtain prediction output of each pollutant, wherein the method specifically comprises the following steps:
3-1: establishing a CNN-STM air pollutant feature extraction network based on CNN and LSTM frameworks, representing hourly change and daily change of each pollution concentration and mutual influence relationship thereof, and specifically comprising the following steps:
3-1-1: converting the pollutant data processed in the step 1 into a matrix X (M multiplied by M matrix), wherein X is i Represents the ith contaminant type, X i The columns and rows of (A) represent the recorded contaminant data, i.e., X, per day and per hour, respectively i ={x i (h,d)},h∈[1,M];d∈[1,M]。
3-1-2: and extracting the day-by-day and hour-by-hour time characteristics of the pollutant data by adopting a CNN model. The key step is the convolutional layer, where the filter is moved in each input element by a convolution operation between the filter and the input element (M × M matrix). Using omega f Representing a filter, where F represents the index of the filter, F ∈ {1,2, \8230;, F }, the filter size is L × (L is a super parameter), the filter will be sliding convolved on M × M input elements, so the convolutional layer output has a size of (M-L + 1) 2 The convolution formula is shown in formula (9):
Figure SMS_20
3-1-3: after convolution, a max pooling operation is performed to generate the maximum value of the selected block (kxk, K-superparameter, representing the pooled filter size), which is similar to the convolutional layer, and the filter moves by K units without filtering the overlapping part of the input matrix, as shown in equation (10):
Figure SMS_21
3-1-4: and performing Reshape operation after pooling of each pollutant data, and converting the matrix into a one-dimensional vector. In order to extract the time correlation among pollutants, inputting the features after Reshape into an LSTM to obtain the time sequence features of the relation fusion among the pollutants, wherein the calculation mode of the LSTM is as follows:
Figure SMS_22
i t =σ(Y i ·[h t-1 ,X t ]+a i )#(12)
f t =σ(Y f ·[h t-1 ,X t ]+a f )#(13)
U t =σ(Y o ·[h t-1 ,X t ]+a o )#(14)
Figure SMS_23
O(t)=tanh(H t )*U t #(16)
wherein
Figure SMS_24
Representing the cell state of the system, i t 、f t 、U t Input, hidden, output gates representing the system H t Representing the current state of the system, O (t) representing the output of the system at the current time, Y C 、Y i 、Y f 、Y o A parameter matrix of LSTM with initial values in the range of-0.1, 0.1]Random matrix of a c 、a i 、a f 、a o Is the bias of LSTM, whose initial value is zero vector, which represents the Hadamard product, i t 、f t 、U t The input gate, the forgetting gate and the output gate of the LSTM respectively output the number of 0-1 through a Sigmoid function so as to control the opening and closing degree of the gates, thereby realizing the control of the input quantity of the system state H, the maintenance of the original state and the control of the output quantity;
3-2: the method comprises the following steps of establishing a CNN-based meteorological feature extraction network, representing hourly change and daily change rules of high-correlation meteorological data, and specifically comprising the following steps of:
3-2-1: converting the weather data processed in the step 2 into a matrix W (M multiplied by M matrix), wherein W is i Represents the ith weather type, W i The columns and rows of (A) represent each day and eachWeather data recorded in hours, i.e. W i ={w i (h,d)},h∈[1,M];d∈[1,M]。
3-2-2: stacking various high-correlation meteorological data into a multi-channel matrix, extracting features through convolution and pooling according to the steps described in 3-1-2, and converting the features into one-dimensional vectors through Reshape operation to be used as meteorological auxiliary features;
3-3: splicing the pollutant fusion time sequence characteristics and the meteorological auxiliary characteristics as the input of a BP network, performing characteristic fusion by using the BP network, and outputting the predicted value of the pollutant after fusion. The connection mode of the BP network is shown in formula (17):
Y pol (n)=f BP (X pol (n)||X weafuse )#(17)
wherein, Y pol (n) represents the predicted output of the nth pollutant, X pol (n) represents the fusion time series characteristic of the nth contaminant, X weafuse Representing a meteorological fusion feature, f BP Represents a full join operation, | | represents a series operation;
3-4: establishing a model objective function, which comprises the following specific steps:
3-4-1: establishing an objective function 1 to ensure that the maximum relative error of a model prediction result is as small as possible;
the objective function 1 is expressed by equation (18):
Figure SMS_25
in the formula, E MRE (i) Is the maximum relative error of the predicted value of the ith node,
Figure SMS_26
and &>
Figure SMS_27
Respectively predicting values and real values of predicted values of the ith node;
3-4-2: establishing an objective function 2 to ensure that the pollutant prediction accuracy is as high as possible;
in order to ensure that the pollutant prediction accuracy is as high as possible, root Mean Square Error (RMSE) is used as an evaluation index, and the formula of RMSE is shown as formula (19):
Figure SMS_28
wherein, c p And
Figure SMS_29
the real pollution concentration and the predicted concentration of the pollutant p are respectively, so that the formula for obtaining the objective function 2 is shown as the formula (20):
Figure SMS_30
and 4) training the constructed CNN-LSTM-BP-based air pollutant prediction network, and predicting a future air pollutant concentration value by using the trained model.
In the step 4), the CNN-LSTM-BP based multi-modal air pollutant prediction network constructed in the step 3) is trained, and an iteration graph is trained as shown in FIG. 4. And predicting a future air pollutant concentration value by using the trained model, wherein the method comprises the following specific steps of:
4-1: initializing a model structure, and determining network convolution kernel dimensions, initial weights, training step lengths, activation functions, the number of hidden layers and iteration times;
4-2: testing the prediction accuracy of the model by using the prediction set, and obtaining the prediction accuracy of the model by using RMSE as an evaluation index;
4-3: the same training set and test set were used to train conventional LSTM for model comparison, the comparison results are shown in fig. 5.
Aiming at the problem that the prediction effect of the existing physical prediction model is not ideal, the method establishes an air pollutant prediction model based on the CNN-LSTM-BP network on the basis of data driving. Firstly, performing relevance analysis on preprocessed data by using a Pearson correlation coefficient method, mining the relevance between meteorological factors and different pollutants, and selecting the meteorological factors with high relevance as model external features for input. Then, constructing a CNN-LSTM-based air pollutant feature extraction network to express the day-by-day and hour-by-hour change rule and the mutual influence relationship of the historical measured data of each pollutant; constructing a CNN meteorological feature extraction network to represent a day-by-day and hour-by-hour change rule of high-correlation meteorological data; and splicing the time sequence characteristics of each pollutant with the meteorological auxiliary characteristics through a BP network, and predicting to obtain the predicted value of each pollutant. The invention effectively utilizes machine learning and deep learning methods to accurately model and extract the time change rules of the historical data of various air pollutants, the mutual influence relationship of the time change rules and the time change rules of highly-associated meteorological data, and establishes a data-driven pollutant-meteorological multi-mode air quality prediction model, thereby accurately predicting the concentration of harmful pollutants in the air, reminding relevant departments to take control measures in time, and effectively reducing the harm of atmospheric pollution to human beings and the environment.
The above description is only a preferred embodiment of the present invention in the Chongchuang district air quality data set of Nantong city, and the scope of the present invention is not limited to the above embodiment, but equivalent modifications and other modifications made by those skilled in the art according to the disclosure of the present invention should be included in the scope of the claims.

Claims (5)

1. A CNN-LSTM-BP multi-mode air pollutant prediction method combined with meteorological features is characterized by comprising the following steps: the method comprises the following steps:
step 1) acquiring air quality data of an environment monitoring station, transmitting the data to a background server in real time, and preprocessing abnormal values and missing values in original data to reduce data redundancy;
step 2) performing relevance analysis on the preprocessed data by using a Pearson correlation coefficient method, mining the relevance between meteorological factors and different pollutants, and selecting the meteorological factors with high relevance as meteorological auxiliary characteristic input;
step 3) constructing a CNN-LSTM-based air pollutant feature extraction network, and learning the change rule and the mutual influence relationship of the measured historical data of various pollutants day by day and hour by hour; a CNN-based meteorological factor auxiliary feature extraction network is constructed, and the change rule of each meteorological data day by day and hour by hour is learned; fusing the time sequence characteristics of each pollutant and the meteorological auxiliary characteristics through a BP network, and predicting to obtain prediction output of each pollutant;
and 4) training the constructed CNN-LSTM-BP-based air pollutant prediction network, and predicting a future air pollutant concentration value by using the trained model.
2. The CNN-LSTM-BP multi-modal air pollutant prediction method in combination with meteorological features as defined in claim 1, wherein: in the step 1), air quality data of the environment monitoring station is collected, the data are transmitted to a background server in real time, abnormal values in original data are subjected to data elimination, missing values are subjected to data filling, data preprocessing is performed according to the data elimination, and data redundancy is reduced, and the method specifically comprises the following steps:
1-1: and (3) data elimination, which comprises the following steps:
1-1-1: rejecting the data violating the objective facts, rejecting a numerical value with the pollutant monitoring concentration being less than 0, rejecting a numerical value with the humidity being more than 100%, rejecting a numerical value with the wind speed being less than 0, rejecting a numerical value with the wind direction being less than 0 degrees and being more than 360 degrees;
1-1-2: eliminating the data deviating from the normal distribution, detecting the data deviating from the normal distribution by using an abnormal value detection algorithm based on distance, and firstly calculating 5 continuous points { x } p-2 ,x p-1 ,x p ,x p+1 ,x p+2 Mean value x of } pEve As shown in formula (1):
x pEv =EVERAGE(x p-2 ,x p-1 ,x p ,x p+1 ,x p+2 )#(1)
wherein x represents different parameters such as SO2 monitoring concentration and the like, p represents the position of a numerical value in a parameter sequence, and then, the absolute value of the difference between 5 points and the mean value is calculated, as shown in formula (2):
x iErr =|x pEve -x i |,i∈[p-2,p+2]#(2)
finally, note off x p The other error is x pErrEve If x is pErr Greater than threeX of times pErrEve X is then p The judgment condition for abnormal data is shown in formula (3):
x pErrE =EVERAGE(x p-2Err ,x p-1Err ,x p+1Err ,x p+2Err )#(3)
wherein x is pEr >3*x pErrEve
1-2: the data filling steps are as follows:
1-2-1: because the accuracy difference of the data missing degree to the repair scheme is large, when the continuously missing data is less than three frames, the mean filling missing data is adopted for filling; the method is to fill the corresponding attribute mean value of the existing data into the missing value, and the formula definition is shown in formula (4):
x miss =EVERAGE(x before ,x after )#(4)
in the formula x miss For missing data, x before Data preceding the missing data, x after The next data that is missing;
1-2-2: EM filling is adopted when the continuously lost data is more than three frames, the missing value is calculated through maximum likelihood estimation in the method, and the global optimal solution can be found through the self-stable iterative process; first, let observation data x = (x) (1) ,x (2) ,…x (m) ) Missing data z = (z) (1) ,z (2) ,…z (m) ) Joint distribution p (x, z | theta), conditional distribution p (z | x, theta), maximum number of iterations J; and (3) carrying out EM algorithm iteration on J from 1 to J: firstly, calculating the conditional probability expectation of the joint distribution, wherein the formula is shown in formulas (5) and (6):
Q i (z (i) )=P(z (i) |x (i) ,θ (j) )#(5)
Figure FDA0003953282610000021
re-maximization of L (theta ) j ) To obtain theta j+1 The formula is shown in formula (7):
Figure FDA0003953282610000022
if theta is greater than theta j+1 If the convergence is achieved, the algorithm is ended, otherwise, the E-step iteration is continued; and finally, outputting a model parameter theta, and filling missing data according to a result output by the model.
3. The CNN-LSTM-BP multi-modal air pollutant prediction method in combination with meteorological features as defined in claim 1, wherein: in the step 2), correlation analysis is performed on the preprocessed data by using a pearson correlation coefficient method, correlation between meteorological factors and different pollutants is mined, meteorological factors with high correlation are selected as external characteristic input of a model, the pearson correlation coefficient is a parameter widely used for measuring the correlation degree between two sequences, and a formula is shown as a formula (8):
Figure FDA0003953282610000031
wherein X and Y represent two different sequences,
Figure FDA0003953282610000032
r is the average of the two sequences, represents the correlation coefficient of the two sequences, the value of the correlation coefficient is between-1 and 1, and the larger the absolute value of the correlation coefficient is, the higher the correlation coefficient is;
sorting according to the correlation value according to the result of the Pearson correlation coefficient analysis, and screening to obtain the meteorological factors of K before correlation { weather } 1 ,weather 2 ,…,weather K }。
4. The CNN-LSTM-BP multi-modal air pollutant prediction method in combination with meteorological features as defined in claim 1, wherein: in the step 3), an air pollutant feature extraction network based on CNN-LSTM is constructed, the change rule of the historical measured data of each pollutant day by day and hour by hour and the influence relation among each pollutant are learned through a Convolutional Neural Network (CNN) and a long-term memory network (LSTM) component, and the time sequence feature of each pollutant is obtained through Reshape operation; the method comprises the following steps of utilizing CNN to extract features of high-correlation meteorological data, obtaining meteorological auxiliary features through Reshape operation, splicing time sequence features of pollutants and the meteorological auxiliary features in a BP network to serve as network input, and predicting to obtain prediction output of the pollutants, wherein the method specifically comprises the following steps:
3-1: establishing a CNN-STM air pollutant feature extraction network based on CNN and LSTM frameworks, representing hourly change and daily change of each pollution concentration and mutual influence relationship thereof, and specifically comprising the following steps:
3-1-1: converting the pollutant data processed in the step 1 into a matrix X (M multiplied by M matrix), wherein X is i Represents the i-th contaminant type, X i The columns and rows of (A) represent the recorded daily and hourly pollutant data, i.e., X, respectively i ={x i (h,d)},h∈[1,M];d∈[1,M];
3-1-2: extracting the day-by-day and hour-by-hour time characteristics of pollutant data by adopting a CNN model; the key step is convolutional layers, where the filter is moved in each input element by a convolution operation between the filter and the input element (M × M matrix); using omega f Representing a filter, where F represents the index of the filter, F ∈ {1,2, \8230;, F }, the filter size is L × (L is a super parameter), the filter will be sliding convolved on M × M input elements, so the convolutional layer output has a size of (M-L + 1) 2 The convolution formula is shown in formula (9):
Figure FDA0003953282610000033
3-1-3: after convolution, a max pooling operation is performed to generate the maximum value of the selected block (kxk, K-superparameter, representing the pooled filter size), which is similar to the convolutional layer, and the filter moves by K units without filtering the overlapping part of the input matrix, as shown in equation (10):
Figure FDA0003953282610000041
3-1-4: performing Reshape operation after pooling of each pollutant data, and converting the matrix into a one-dimensional vector; in order to extract the time correlation among pollutants, inputting the features after Reshape into an LSTM to obtain the time sequence features of the relation fusion among the pollutants, wherein the calculation mode of the LSTM is as follows:
Figure FDA0003953282610000042
i t =σ(Y i ·[h t-1 ,X t ]+a i )#(12)
f t =σ(Y f ·[h t-1 ,X t ]+a f )#(13)
U t =σ(Y o ·[h t-1 ,X t ]+a o )#(14)
Figure FDA0003953282610000043
O(t)=tanh(H t )*U t #(16)
wherein
Figure FDA0003953282610000044
Representing the cell state of the system, i t 、f t 、U t Input, hidden, output gates representing the system H t Representing the current state of the system, O (t) representing the output of the system at the current time, Y C 、Y i 、Y f 、Y o A parameter matrix of LSTM with initial values in the range of-0.1, 0.1]Random matrix of a C 、a i 、a f 、a o Is the bias of LSTM, whose initial value is zero vector, which represents the Hadamard product, i t 、f t 、U t Respectively an input gate, a forgetting gate, an output gate and 3 gates of the LSTM pass through a Sigmoid functionOutputting the number of 0-1 to control the opening and closing degree of the gate so as to realize the control of the input quantity of the system state H, the maintenance of the original state and the control of the output quantity;
3-2: the method comprises the following steps of establishing a CNN-based meteorological feature extraction network, representing hourly change and daily change rules of high-correlation meteorological data, and specifically comprising the following steps of:
3-2-1: converting the weather data processed in the step 2 into a matrix W (M multiplied by M matrix), wherein W is i Represents the ith weather type, W i The columns and rows of (A) represent the recorded weather data, i.e., W, per day and per hour, respectively i ={w i (h,d)},h∈[1,M];d∈[1,M];
3-2-2: stacking various high-correlation meteorological data into a multi-channel matrix, extracting features through convolution and pooling according to the steps described in 3-1-2, and converting the features into one-dimensional vectors through Reshape operation to be used as meteorological auxiliary features;
3-3: splicing the pollutant fusion time sequence characteristics and the meteorological auxiliary characteristics as input of a BP network, performing characteristic fusion by using the BP network, and outputting a predicted value of the pollutant after fusion; the connection mode of the BP network is shown in formula (17):
Y pol (n)=f BP (X pol (n)||X weafuse )#(17)
wherein, Y pol (n) represents the predicted output of the nth pollutant, X pol (n) represents the fusion time series characteristic of the nth contaminant, X weafuse Representing a meteorological fusion feature, f BP Represents a full join operation, | | represents a series operation;
3-4: establishing a model objective function, which comprises the following specific steps:
3-4-1: establishing an objective function 1 to ensure that the maximum relative error of a model prediction result is as small as possible;
the objective function 1 is expressed by equation (18):
Figure FDA0003953282610000051
in the formula, E MRE (i) Is a predicted value of the ith nodeThe maximum relative error is the relative error of the maximum,
Figure FDA0003953282610000052
and &>
Figure FDA0003953282610000053
Respectively predicting values and real values of predicted values of the ith node;
3-4-2: establishing an objective function 2 to ensure that the pollutant prediction accuracy is as high as possible;
in order to ensure that the pollutant prediction accuracy is as high as possible, root Mean Square Error (RMSE) is used as an evaluation index, and the formula of RMSE is shown as formula (19):
Figure FDA0003953282610000054
wherein, c p And
Figure FDA0003953282610000055
the real pollution concentration and the predicted concentration of the pollutant p are respectively, so that the formula for obtaining the objective function 2 is shown as the formula (20):
Figure FDA0003953282610000056
5. the CNN-LSTM-BP multi-modal air pollutant prediction method in combination with meteorological features of claim 1, characterized in that: in the step 4), the CNN-LSTM-BP based multi-modal air pollutant prediction network constructed in the step 3) is trained, and a trained model is used for predicting a future air pollutant concentration value, and the method comprises the following specific steps:
4-1: initializing a model structure, and determining network convolution kernel dimensions, initial weights, training step lengths, activation functions, the number of hidden layers and iteration times;
4-2: testing the prediction accuracy of the model by using the prediction set, and obtaining the prediction accuracy of the model by using RMSE as an evaluation index;
4-3: the same training set and test set were used to train the conventional LSTM for model comparison.
CN202211456742.6A 2022-11-21 2022-11-21 CNN-LSTM-BP multi-mode air pollutant prediction method combining meteorological features Withdrawn CN115951014A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211456742.6A CN115951014A (en) 2022-11-21 2022-11-21 CNN-LSTM-BP multi-mode air pollutant prediction method combining meteorological features

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211456742.6A CN115951014A (en) 2022-11-21 2022-11-21 CNN-LSTM-BP multi-mode air pollutant prediction method combining meteorological features

Publications (1)

Publication Number Publication Date
CN115951014A true CN115951014A (en) 2023-04-11

Family

ID=87296200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211456742.6A Withdrawn CN115951014A (en) 2022-11-21 2022-11-21 CNN-LSTM-BP multi-mode air pollutant prediction method combining meteorological features

Country Status (1)

Country Link
CN (1) CN115951014A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116147712A (en) * 2023-04-18 2023-05-23 石家庄铁道大学 Space-time restriction-free three-dimensional construction environment monitoring device and prediction method
CN116165353A (en) * 2023-04-26 2023-05-26 江西拓荒者科技有限公司 Industrial pollutant monitoring data processing method and system
CN116227748A (en) * 2023-05-08 2023-06-06 石家庄铁道大学 Training method and prediction method of ecological environment PM2.5 concentration prediction model
CN116522166A (en) * 2023-06-28 2023-08-01 湖南佳蓝检测技术有限公司 Air pollution monitoring system based on big data
CN117349777A (en) * 2023-12-04 2024-01-05 安徽新宇环保科技股份有限公司 Intelligent identification system and method for online monitoring data of water environment
CN117689278A (en) * 2024-02-04 2024-03-12 新疆盛诚工程建设有限责任公司 Construction quality intelligent management system and method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116147712A (en) * 2023-04-18 2023-05-23 石家庄铁道大学 Space-time restriction-free three-dimensional construction environment monitoring device and prediction method
CN116165353A (en) * 2023-04-26 2023-05-26 江西拓荒者科技有限公司 Industrial pollutant monitoring data processing method and system
CN116227748A (en) * 2023-05-08 2023-06-06 石家庄铁道大学 Training method and prediction method of ecological environment PM2.5 concentration prediction model
CN116522166A (en) * 2023-06-28 2023-08-01 湖南佳蓝检测技术有限公司 Air pollution monitoring system based on big data
CN116522166B (en) * 2023-06-28 2023-09-15 湖南佳蓝检测技术有限公司 Air pollution monitoring system based on big data
CN117349777A (en) * 2023-12-04 2024-01-05 安徽新宇环保科技股份有限公司 Intelligent identification system and method for online monitoring data of water environment
CN117349777B (en) * 2023-12-04 2024-02-23 安徽新宇环保科技股份有限公司 Intelligent identification system and method for online monitoring data of water environment
CN117689278A (en) * 2024-02-04 2024-03-12 新疆盛诚工程建设有限责任公司 Construction quality intelligent management system and method

Similar Documents

Publication Publication Date Title
CN115951014A (en) CNN-LSTM-BP multi-mode air pollutant prediction method combining meteorological features
CN107909206B (en) PM2.5 prediction method based on deep structure recurrent neural network
CN109492830B (en) Mobile pollution source emission concentration prediction method based on time-space deep learning
CN109308522B (en) GIS fault prediction method based on recurrent neural network
CN111310968A (en) LSTM neural network circulation hydrological forecasting method based on mutual information
CN108009674A (en) Air PM2.5 concentration prediction methods based on CNN and LSTM fused neural networks
CN111639787A (en) Spatio-temporal data prediction method based on graph convolution network
CN114802296A (en) Vehicle track prediction method based on dynamic interaction graph convolution
CN110401978B (en) Indoor positioning method based on neural network and particle filter multi-source fusion
CN110533239B (en) Smart city air quality high-precision measurement method
CN110413838A (en) A kind of unsupervised video frequency abstract model and its method for building up
CN110866631A (en) Method for predicting atmospheric pollution condition based on integrated gate recursion unit neural network GRU
CN112149887A (en) PM2.5 concentration prediction method based on data space-time characteristics
CN115775085B (en) Digital twinning-based smart city management method and system
CN110991776A (en) Method and system for realizing water level prediction based on GRU network
CN114662791A (en) Long time sequence pm2.5 prediction method and system based on space-time attention
CN116052254A (en) Visual continuous emotion recognition method based on extended Kalman filtering neural network
CN113988210A (en) Method and device for restoring distorted data of structure monitoring sensor network and storage medium
CN116976227B (en) Storm water increasing forecasting method and system based on LSTM machine learning
CN114330120A (en) 24-hour PM prediction based on deep neural network2.5Method of concentration
CN113642255A (en) Photovoltaic power generation power prediction method based on multi-scale convolution cyclic neural network
CN117390962A (en) Air quality prediction method based on second-order cyclic neural network
CN113761806B (en) Atmospheric visibility prediction method based on neural network
CN115034159A (en) Power prediction method, device, storage medium and system for offshore wind farm
CN114970743A (en) Multi-source remote sensing rainfall data fusion method based on multi-modal deep learning

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20230411