A prediction method for air pollutant index based on information entropy and back propagation neural network
By introducing information entropy and backpropagation neural networks in the prediction of atmospheric pollutants, the problems of complexity of meteorological data processing and low prediction accuracy in the prior art are solved, and more efficient and accurate prediction of pollutant concentrations are achieved.
Patent Information
- Application Number
- CN202210559826.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-21
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2042-05-21
AI Technical Summary
When predicting the concentration of atmospheric pollutants, it is difficult to effectively process complex meteorological data, resulting in high time and space complexity and increasing algorithm complexity.
The atmospheric pollutant index prediction method based on information entropy and backpropagation neural network is adopted. By calculating the information entropy of each meteorological factor, the meteorological factor with the largest information entropy is selected to correlate it with atmospheric pollutants. The backpropagation neural network training model is used to predict the future atmospheric pollutant concentration value.
This method not only reduces time complexity and spatial complexity, but also improves the accuracy of prediction of atmospheric pollutant concentrations.
Smart Images

Figure CN114971006B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of air pollution index analysis, and in particular relates to an air pollutant index prediction method based on information entropy and back propagation neural network. Background Art
[0002] Air pollution seriously affects people's living environment. The higher the concentration of air pollutants, the greater the threat to people's health. The forecast results of air pollutant concentrations can intuitively reflect the changing trend of pollutant concentrations in the next few days. People can formulate relevant response measures and make reasonable travel plans based on this.
[0003] Meteorological data is complex and diverse, and there are many types of meteorological factors. Taking all meteorological factors as input data will not only increase the time and space complexity, but also increase the complexity of the algorithm. To address this problem, a prediction method for atmospheric pollutant index based on information entropy and back propagation neural network is proposed. The correlation between each meteorological factor and all atmospheric pollutants is established, and the similarity between each atmospheric pollutant concentration and all meteorological factors is calculated with time gradient. Then, the time series similarity is regarded as the degree to which the meteorological factor affects the atmospheric pollutant concentration. The information entropy of each meteorological factor is calculated. The larger the information entropy, the more atmospheric pollutant information can be stored. Finally, the meteorological factor with the largest information entropy and the atmospheric pollutant are selected to use the back propagation neural network training model and predict the future atmospheric pollutant concentration value. Experiments show that this method can not only reduce the time complexity and space complexity, but also improve the accuracy. Summary of the invention
[0004] Purpose of the invention: In view of the problems raised in the background technology, the present invention proposes an atmospheric pollutant index prediction based on information entropy and back propagation neural network, establishes a correlation between each meteorological factor and all atmospheric pollutants, and calculates the similarity between each atmospheric pollutant concentration and all meteorological factors with a time gradient, then regards the time series similarity as the degree to which the meteorological factor affects the atmospheric pollutant concentration, calculates the information entropy of each meteorological factor, and the larger the information entropy, the more atmospheric pollutant information can be stored, and finally selects the meteorological factor with the largest information entropy and the atmospheric pollutant to use the back propagation neural network training model, and predicts the future atmospheric pollutant concentration value. This method can not only reduce the time complexity and space complexity, but also improve the accuracy.
[0005] Technical solution: The present invention discloses a method for predicting air pollutant index based on information entropy and back propagation neural network, and the specific steps are as follows:
[0006] Step 1: Data preprocessing: Associate the air pollutant data with the meteorological data one by one, and normalize each column of data to obtain the air pollutant data for day t we want. and weather data
[0007] Step 2: Correlation coefficient calculation: Calculate the correlation coefficient of the atmospheric pollutant data and meteorological data on day t to obtain the correlation coefficient set
[0008] Step 3: Information entropy calculation: according to the correlation coefficient set Calculate the information entropy H of each meteorological data about all atmospheric pollutant data j , select the first k meteorological data with the smallest feature information entropy;
[0009] Step 4: Air pollutant data prediction: Use BP neural network to train the selected k characteristic meteorological data, and use the data from the previous t days to predict the air pollutant data from day t+1 to day t+c.
[0010] Furthermore, the specific steps of data preprocessing in step 1 are as follows: firstly, the original air pollutant data B and meteorological data A are obtained, and time series are divided and matched one by one;
[0011] (1.1) Air pollutant data Weather data Combined to form a new matrix S, as shown below:
[0012]
[0013]
[0014]
[0015] in, represents the concentration of the jth atmospheric pollutant element at time t, represents the concentration of the i-th meteorological data at time t;
[0016] (1.2) Normalize the data and use deviation standardization to linearly change the original data.
[0017] Furthermore, the specific steps of calculating the correlation coefficient in step 2 are as follows:
[0018] (2.1) First calculate the covariance of these two data, the formula is as follows:
[0019]
[0020] Among them, Cov represents ai and b j The covariance correlation coefficient of two data items. The larger the value of Cov is, the stronger the a i and b j Develop in one direction, that is, i and b j The degree of correlation is high;
[0021] (2.2) Calculate the correlation between each atmospheric pollutant data and meteorological data, and calculate the correlation coefficient r i j The formula is as follows:
[0022]
[0023] Among them, r i j represents the correlation between the i-th atmospheric pollutant and the j-th meteorological factor, δ a , δ b represents the variance of air pollutant a and meteorological data b in time period t; calculate the correlation between meteorological data and each air pollutant data, and normalize them to obtain the correlation probability between all air pollutant data and each meteorological data gather.
[0024] Furthermore, the specific steps of information entropy in step 3 are as follows:
[0025] According to the correlation degree between each meteorological data and atmospheric pollutants, i j , calculate the information entropy of each meteorological data, the formula is as follows:
[0026] H j =-∑r i log2r i
[0027] The smaller the information entropy is, the smaller the space required to store all atmospheric pollutant data is, that is, the clearer the meteorological data is expressed, and finally we select the k characteristic meteorological data we need.
[0028] Furthermore, the specific steps of air pollutant data prediction in step 4 are as follows:
[0029] Using the meteorological data of the previous t days obtained in step 4 as the input set and the corresponding atmospheric pollutant data of the previous t days as the output set, BP neural network training is performed on different atmospheric pollutants respectively;
[0030] The input set was divided into 70% training set, 15% validation set and 15% test set ratios, 10 layers were selected as the number of hidden layers, and training was performed to obtain the trained BP neural network model;
[0031] The t-day data of the selected k characteristic meteorological features are used as input parameters and input into the trained network model to predict the concentration data of each atmospheric pollutant on day t+1 and day t+c.
[0032] Beneficial effects:
[0033] The present invention is based on the atmospheric pollutant index prediction method of information entropy and back propagation neural network, which applies information entropy in physics to the prediction of atmospheric pollutants, and the method is novel. Selecting information entropy for feature extraction greatly reduces the influence of different parameters on the prediction results, reduces the complexity of the prediction algorithm, and also saves running space. The information entropy is combined with the back propagation (BP) neural network, and the experimental results show that the effect is better than the traditional BP, principal component analysis (PCA) + BP, and singular value decomposition (SVD) + BP. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is the overall flow chart of the present invention;
[0035] Figure 2 for Figure 1 The correlation between different meteorological factors;
[0036] Figure 3 for Figure 1 Calculation of information entropy in ;
[0037] Figure 4 The result graph is a graph showing the change of atmospheric pollutant concentration within 180 days predicted by the method of the present invention and compared with the actual value;
[0038] Figure 5 To draw the prediction effect diagram, the predicted data was divided into 60 days per group to calculate the MSE and MAPE values, and the error values of three groups of predictions in different time periods were obtained to determine the time interval in which the method has the best effect;
[0039] Figure 6 This is a comparison chart of the prediction effects of the algorithm of the present invention and other different algorithms. DETAILED DESCRIPTION
[0040] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0041] like Figure 1-3 The present invention comprises the following steps:
[0042] Step (1) preprocesses meteorological data and air pollutant data. The specific steps are as follows:
[0043] The original air pollutant data B and meteorological data A downloaded from the data center of the Ministry of Ecology and Environment of the People's Republic of China are divided into time series and corresponded one to one.
[0044] (1.1) Air pollutant data As shown below, Represents the concentration of the jth atmospheric pollutant element at time t.
[0045]
[0046] (1.2) Meteorological data As shown below, Represents the concentration of the i-th meteorological data at time t.
[0047]
[0048] (1.3) Combine meteorological data and atmospheric pollutant data to form a new matrix S, as shown below:
[0049]
[0050] Secondly, in terms of time dimension, the atmospheric pollutant data and meteorological data of the previous t days are selected to predict the value of the t+1 day. Different weights are assigned to the previous t days according to the proximity of time. The closer the time distance, the greater the reference significance of the previous day for the current day, and the more weights are assigned.
[0051] (1.4) Since different data have different units, the evaluation criteria of the data must also be changed. Direct data calculation will lead to inaccurate data, so we also need to normalize the data. In order to make the result within the range of [0,1], we use deviation normalization to linearly change the original data. The calculation function is as follows:
[0052]
[0053] Among them, max represents the maximum value in the sample data, and min represents the minimum value in the sample data.
[0054] Step (2): Calculate the correlation between meteorological data and air pollutant data. The specific method is as follows:
[0055] (2.1) Each atmospheric pollutant data and meteorological data are inextricably linked, but the degree of correlation is different. For example, the lower the air visibility, the higher the concentration of inhalable particulate matter (PM10, PM2.5) in the air. For this phenomenon, we introduce the calculation of correlation coefficients. To calculate the correlation coefficient of a certain atmospheric pollutant data and meteorological data, we need to first calculate the covariance of the two data. If the change trends of the two variables are consistent, that is, if one is greater than its expected value and the other is also greater than its expected value, then the covariance between the two variables is positive; if the change trends of the two variables are opposite, that is, when one variable is greater than its expected value and the other is less than its expected value, then the covariance between the two variables is negative. The formula is as follows:
[0056]
[0057] Among them, Cov represents a i and b j The covariance correlation coefficient of two data items. The larger the value of Cov is, the stronger the a i and b j Develop in one direction, that is, i and b j The degree of correlation is high.
[0058] (2.2) Calculate the correlation between each atmospheric pollutant data and meteorological data, and calculate the correlation coefficient r i j The formula is as follows:
[0059]
[0060] Among them, r i j represents the correlation between the i-th atmospheric pollutant and the j-th meteorological factor, δ a , δ b Represents the variance of air pollutant a and meteorological data b in time period t. Calculate the correlation between meteorological data and each air pollutant data, and normalize them to obtain the correlation probability between the six air pollutant data and each meteorological data. gather.
[0061] Step (3): Calculate the information entropy of each meteorological factor. The specific steps are as follows:
[0062] Through the above steps, the correlation degree r between each meteorological factor and atmospheric pollutants is obtained. i j , calculate the information entropy of each meteorological factor, the formula is as follows:
[0063] H j =-∑r i log2r i
[0064] The smaller the information entropy is, the smaller the space required to store all atmospheric pollutant data is, that is, the clearer the meteorological data is expressed, and finally we select the k characteristic meteorological data we need.
[0065] Step (4): Combine BP neural network to predict air pollutant data. The specific method is as follows:
[0066] Using the meteorological data of the previous t days obtained in step (3) as the input set and the corresponding atmospheric pollutant data of the previous t days as the output set, BP neural network training is performed for different atmospheric pollutants. Set the ratio of 70% training set, 15% validation set and 15% test set, select 10 layers as the number of hidden layers, and perform training to obtain the trained BP neural network model. The t-day data of the k characteristic meteorological data selected in step 3 above are used as input parameters and input into the trained network model to predict the concentration data of each atmospheric pollutant on day t+1 and day t+c.
[0067] The present invention uses the reduced-dimensional meteorological data as input parameters and inputs them into the trained BP neural network model. It predicts the atmospheric pollutants respectively and predicts the changes in the concentration of atmospheric pollutants within 180 days and compares them with the actual values. The results are as follows Figure 4 shown.
[0068] The predicted data is divided into 60-day groups to calculate the MSE and MAPE values, and the error values of three groups of predictions in different time periods are obtained to determine the time interval in which the method has the best effect, such as Figure 5 shown.
[0069] like Figure 5 As shown in the figure, the prediction method based on information entropy and BP neural network has the best effect on CO and NO2, and the prediction effect on PM10 and O3 is average. For the prediction of CO with better effect, the effect from the 1st day to the 75th day is excellent, and it shows a trend of getting better and better, and the MSE error value is the smallest from 76 to 100 days; PM10 and SO2 also have the same trend, with small errors in the early stage, but as time goes by, the accuracy of the prediction is getting lower and lower. For the prediction of NO2, except for the relatively average effect in the middle, the effect of the first 50 days and the last 100 days is good. PM2.5 is the opposite, with the best effect in the middle of the prediction from 50 to 100 days. For the prediction of O3, the error value of the MSE in the early prediction is large, but as time goes by, the effect is getting better and better in the later prediction.
[0070] The algorithm EIF+BP of the present invention is compared with PCA+BP, SVD+BP, and BP. The original BP neural network is to directly model and predict without processing the data; PCA and SVD both use the original meteorological data as an array to normalize and reduce the weight of the data, and then train the model on the reduced weight data. The prediction link also reduces the weight of the meteorological data before inputting it to predict the MAPE values of the above six groups of dimensions for one month for comparison. The effect is as follows: Figure 6 shown.
[0071] In the early prediction results, the EIF+BP algorithm of the present invention has better prediction results for CO, NO2 and SO2.
[0072] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent transformation or modification made according to the spirit of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for predicting air pollutant index based on information entropy and back propagation neural network, the specific steps are as follows: Step 1: Data preprocessing: Associate the air pollutant data with the meteorological data one by one, and normalize each column of data to obtain the air pollutant data for day t we want. and weather data Atmospheric pollutant data include CO concentration, SO2 concentration, NO2 concentration, PM2.5 concentration, PM10 concentration and O3 concentration; meteorological data include perceived temperature, precipitation, horizontal visibility, relative humidity, wind speed, wind force, wind direction, temperature and air pressure; The specific steps of data preprocessing in step 1 are as follows: first, obtain the original atmospheric pollutant data B and meteorological data A, divide them into time series, and make one-to-one correspondence; (1.1) Air pollutant data Weather data Combined to form a new matrix S, as shown below: in, represents the concentration of the jth atmospheric pollutant element at time t, represents the concentration of the i-th meteorological data at time t; (1.2) Normalize the data and use deviation standardization to linearly change the original data; Step 2: Correlation coefficient calculation: Calculate the correlation coefficient of the atmospheric pollutant data and meteorological data on day t to obtain the correlation coefficient set The specific steps of calculating the correlation coefficient in step 2 are as follows: (2.1) First calculate the covariance of these two data, the formula is as follows: Among them, Cov represents a i and b j The covariance correlation coefficient of two data items. The larger the value of Cov is, the stronger the a i and b j Develop in one direction, that is, i and b j The degree of correlation is high; (2.2) Calculate the correlation between each atmospheric pollutant data and meteorological data, and calculate the correlation coefficient r i j The formula is as follows: Among them, r i j represents the correlation between the i-th meteorological factor and the j-th atmospheric pollutant, δ a , δ b represents the variance of air pollutant a and meteorological data b in time period t; calculate the correlation between meteorological data and each air pollutant data, and normalize them to obtain the correlation coefficient set of all air pollutant data and each meteorological data Step 3: Information entropy calculation: according to the correlation coefficient set Calculate the information entropy H of each meteorological data about all atmospheric pollutant data i , select the first k meteorological data with the smallest feature information entropy; Step 4: Air pollutant data prediction: Use BP neural network to train the selected k characteristic meteorological data, and use the data from the previous t days to predict the air pollutant data from day t+1 to day t+c.
2. The method for predicting air pollutant index based on information entropy and back propagation neural network according to claim 1 is characterized in that: The specific steps of information entropy in step 3 are as follows: According to the correlation degree between each meteorological data and atmospheric pollutants, i j , calculate the information entropy of each meteorological data, the formula is as follows: H i =-∑r i j log2r i j The smaller the information entropy is, the smaller the space required to store all atmospheric pollutant data is, that is, the clearer the meteorological data is expressed, and finally we select the k characteristic meteorological data we need.
3. The method for predicting air pollutant index based on information entropy and back propagation neural network according to claim 1 is characterized in that: The specific steps of air pollutant data prediction in step 4 are as follows: Using the meteorological data of the previous t days obtained in step 4 as the input set and the corresponding atmospheric pollutant data of the previous t days as the output set, BP neural network training is performed on different atmospheric pollutants respectively; The input set was divided into 70% training set, 15% validation set and 15% test set ratios, 10 layers were selected as the number of hidden layers, and training was performed to obtain the trained BP neural network model; The t-day data of the selected k characteristic meteorological features are used as input parameters and input into the trained network model to predict the concentration data of each atmospheric pollutant on day t+1 and day t+c.