An air quality analysis and prediction method based on deep learning and Bayesian model
Through the air quality analysis method combined with deep learning and Bayesian model, the problem of atmospheric pollutant concentration prediction error in the existing technology is solved, more accurate air quality prediction and pollution source identification are achieved, and effective prevention and control suggestions are provided.
Patent Information
- Application Number
- CN202110282474.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-16
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2041-03-16
AI Technical Summary
The existing atmospheric pollutant concentration prediction methods have large errors, especially the prediction effect based on atmospheric chemical coupling mode is not ideal, making it difficult to accurately predict air quality and pollution sources.
Using air quality analysis and prediction methods based on deep learning and Bayesian models, the deep learning convolutional network model, recurrent neural network model and Bayesian dynamic linear model are constructed by obtaining AQI data for preprocessing and normalization, and combined with The MEO data is subject to correlation analysis and potential source contribution analysis to generate comprehensive improvement suggestions.
It improves the accuracy of air quality prediction and pollution source identification capabilities, provides more effective air pollution prevention and control suggestions, and reduces prediction errors.
Smart Images

Figure CN112884243B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for predicting atmospheric pollutant concentration, and more specifically, to an air quality analysis and prediction method based on deep learning and Bayesian model. Background Art
[0002] The quality of air has been a topic of concern in recent years. my country has added a large number of air quality monitoring stations to monitor local air quality and meteorological data. The air quality data that the monitoring station can monitor is composed of six factors, namely: particulate matter (PM2.5 and PM10) and gaseous substances (NO2, CO, O3 and SO2), which are collectively referred to as AQI data; in addition, the monitoring point can also obtain the meteorological data of the area, namely weather, temperature, pressure, humidity, wind direction and wind speed, which are collectively referred to as MEO data.
[0003] Due to the complexity of meteorological and environmental factors, the prediction of atmospheric pollutant concentration indicators has always been a relatively complex problem. At present, the commonly used prediction methods are the mechanism prediction method based on the atmospheric chemical transport model and the statistical prediction method based on the machine learning model. The former has been widely used in practical engineering. However, since the atmosphere is a very complex system, it is difficult to run a complete quantification in theory, so the mechanism prediction method has a large error.
[0004] At present, the domestic meteorological bureau uses the atmospheric chemistry coupling model (WRF-Chem) to calculate the weather conditions and concentrations of various pollutants. Due to the different degrees of errors in the numerical model calculations and emission source inventory data, the model's prediction effect on pollutant concentrations is not ideal. Summary of the invention
[0005] In view of the shortcomings of the prior art, the purpose of the present invention is to provide an air quality analysis and prediction method based on deep learning and Bayesian model, which can analyze and predict air quality, evaluate the improvement of the atmosphere, identify the source of pollution, and put forward suggestions for air pollution prevention and control.
[0006] To achieve the above object, the present invention provides the following technical solution: an air quality analysis and prediction method based on deep learning and Bayesian model, comprising:
[0007] Step S1: Obtain AQI data of the target monitoring point;
[0008] Step S2: Preprocess the AQI data, determine and remove outliers in the data sequence according to the Laida criterion, and use linear interpolation to complete the missing data at a certain moment;
[0009] Step S3: normalizing the AQI data;
[0010] Step S4: constructing a deep learning convolutional network model, a recurrent neural network model and a Ye-Bas dynamic linear model respectively;
[0011] Step S5: input the normalized AQI data into the deep learning convolutional network model and the Ye Bei Si dynamic linear model respectively, and the deep learning convolutional network model converts the long input sequence into a short sequence composed of high-level features after running, and the Ye Bei Si dynamic linear model outputs the first predicted AQI data after running;
[0012] Step S6: inputting the sequence composed of features extracted by the deep learning convolutional network model into the recurrent neural network model, and the recurrent neural network model outputs the second predicted AQI data after running;
[0013] Step S7: construct a hybrid model, input the first predicted AQI data and the second predicted AQI data into the hybrid model, and output the final predicted AQI data after the hybrid model is run.
[0014] The present invention is further configured as follows: the normalization processing described in step S3 is to place the value range of the data within a relatively small fluctuation range, reduce the impact of different orders of magnitude or different dimensions on the data, set the feature distribution to a normal distribution, and map the feature to a standard normal distribution through variance and mean, and the calculation formula is:
[0015]
[0016] where y mean is the mean of all sample data, y std is the standard deviation of all sample data.
[0017] The present invention is further configured as follows: the step S4 specifically includes:
[0018] Step S41, for the constructed model, selecting training data and test data from the AQI data, and completing the initialization of the deep learning convolutional network model, the recurrent neural network model, and the Ye-Bas dynamic linear model;
[0019] Step S42, using the training data to train the deep learning convolutional network model, the recurrent neural network model and the Ye-Bas dynamic linear model;
[0020] Step S43, using the trained deep learning convolutional network model, recurrent neural network model and Ye Bei Si dynamic linear model to obtain the test prediction results according to the test data;
[0021] Step S44, using the trained deep learning convolutional network model, recurrent neural network model and Ye Beisi dynamic linear model for prediction.
[0022] The present invention is further configured as follows: the Bayesian dynamic linear model in step S5 includes: an observation equation, a state equation and initial information, the predicted distribution is regarded as a conditional general distribution, the predicted distribution is obtained based on prior information, the posterior information is obtained using the Bayesian formula, and the prior information is corrected to obtain the predicted value.
[0023] The present invention is further configured as follows: for the recurrent neural network model, the loss function of the training phase is as follows:
[0024]
[0025] Where a is the predicted value and y is the sample value.
[0026] The present invention is further configured as follows: the recurrent neural network model also includes an Adam algorithm and a Dropout algorithm;
[0027] The Adam algorithm is used to calculate the first-order moment estimate and the second-order moment estimate of the gradient and design independent adaptive learning rates for different parameters;
[0028] The Dropout algorithm is used to reduce the dependency between features and reduce the probability of overfitting.
[0029] The present invention is further configured to: further include step S8, obtaining MEO data;
[0030] Step S9, performing correlation analysis based on MEO data and AQI data;
[0031] Step S10, performing backward trajectory and potential source contribution analysis based on MEO data and AQI data;
[0032] Step S11, importing the correlation analysis results, backward trajectory and potential source contribution analysis results into the final predicted AQI data to obtain comprehensive improvement suggestions.
[0033] The present invention is further configured as follows: the correlation analysis in step S9 specifically includes: taking PM2.5 and PM10 as first variables respectively, and taking weather, temperature, air pressure, humidity, wind speed and wind direction as second variables into the following formula:
[0034]
[0035] where x i With y i To compare the correlation between two variables, is the variable x iThe mean of is the variable y i When two variables are completely monotonically correlated, r is +1 or -1, and when the two variables are uncorrelated, r is 0.
[0036] The present invention is further configured as follows: the backward trajectory and potential source contribution analysis in step S10 specifically includes: dividing the study area into i×j grids according to longitude and latitude, and the PSCF calculation formula is:
[0037]
[0038] where n ij is the number of all airflow trajectories passing through a certain grid (i, j), m ij is the number of contaminated trajectories passing through grid (i, j).
[0039] In summary, the present invention has the following beneficial effects: obtaining historical monitoring data of air quality data AQI (PM2.5, PM10, NO2, CO, O3, SO2), taking into account the time series characteristics of air quality data, using the Laida criterion to judge and remove outliers in the data sequence, and using linear interpolation to complete the missing data at a certain moment. Before data modeling, different feature data need to be mapped to the same scale, the feature data need to be normalized, and then a deep learning convolutional network model, a recurrent neural network model, and a Yebaes dynamic linear model are constructed.
[0040] Deep learning convolutional neural network (CNN) is used for feature extraction: Air quality data has many dimensions and feature extraction is difficult. Deep learning convolutional neural network (CNN) extracts features locally through convolution kernels and shares weights, which solves the shortcoming of too many parameters in artificial neural networks. It has a good effect on feature extraction and has powerful feature extraction capabilities. It can convert long input sequences into short sequences composed of high-level features, and use the extracted feature sequences as input to the recurrent neural network - long short-term memory neural network LSTM (Long Short Term Memory).
[0041] Recurrent neural network model (Long Short-Term Memory Neural Network LSTM) as a prediction model: Since the concentration of air pollutants is highly correlated with time, the use of long short-term memory neural network LSTM can handle this memory-related problem well. LSTM is improved and optimized based on RNN to solve the gradient disappearance problem during training. Its model structure contains a group of memory modules, which are associated with each other to replace the memory units in ordinary RNN. LSTM is easier to train than ordinary RNN. At present, it has achieved good research results in many fields.
[0042] The LSTM input is an hourly feature, i.e., the AQI and six major pollutant indicators at a certain moment, and the output is a neuron used to predict the AQL.
[0043] Bayesian Dynamic Linear Model DLM: Bayesian prediction is a prediction method developed to predict emergencies. It not only relies on historical measurement data and makes predictions based on the knowledge of the model, but also includes the experience information and subjective judgment of experts to make predictions, which is particularly useful for predicting emergencies.
[0044] The basic idea of Bayesian prediction is to establish a dynamic model, regard the prediction distribution as a conditional generalization distribution, find the prediction distribution based on the prior information, use the Bayesian formula to find the posterior information, and correct the prior information to find the predicted value. The Bayesian dynamic linear model consists of three parts: observation equation, state equation and initial information.
[0045] Hybrid model: After building the model framework, construct a hybrid model of long short-term memory neural network LSTM + Bayesian dynamic linear model DLM. The input of the LSTM model is historical AQI data and six major pollutant indicators, and the output is predicted AQI; the input of the Bayesian dynamic linear model is historical AQI data and empirical information, and the output is predicted AQI. The AQI outputs of the two prediction models are fused to obtain a new prediction result, making the model feature diversified, with stronger learning ability and higher prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 This is the principle block diagram of the air quality analysis and prediction method. DETAILED DESCRIPTION
[0047] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. The same parts are represented by the same reference numerals. It should be noted that the words "front", "rear", "left", "right", "upper" and "lower" used in the following description refer to directions in the accompanying drawings, and the words "bottom surface" and "top surface", "inner" and "outer" refer to directions toward or away from the geometric center of a specific component, respectively.
[0048] Example 1: Reference Figure 1 As shown, to achieve the above purpose, the present invention provides the following technical solutions: an air quality analysis and prediction method based on deep learning and Bayesian model, comprising:
[0049] Step S1: Obtain AQI data of the target monitoring point;
[0050] Step S2: Preprocess the AQI data, determine and remove outliers in the data sequence according to the Laida criterion, and use linear interpolation to complete the missing data at a certain moment;
[0051] Step S3: normalizing the AQI data;
[0052] Step S4: constructing a deep learning convolutional network model, a recurrent neural network model and a Ye-Bas dynamic linear model respectively;
[0053] Step S5: input the normalized AQI data into the deep learning convolutional network model and the Ye Bei Si dynamic linear model respectively. After the deep learning convolutional network model is run, the long input sequence is converted into a short sequence composed of high-level features. After the Ye Bei Si dynamic linear model is run, the first predicted AQI data is output;
[0054] Step S6: inputting the sequence composed of features extracted by the deep learning convolutional network model into the recurrent neural network model, and outputting the second predicted AQI data after the recurrent neural network model runs;
[0055] Step S7: construct a hybrid model, input the first predicted AQI data and the second predicted AQI data into the hybrid model, and output the final predicted AQI data after the hybrid model runs.
[0056] The design of the present invention is as follows: historical monitoring data of air quality data AQI (PM2.5, PM10, NO2, CO, O3, SO2) is obtained, and considering the time series characteristics of air quality data, the Laida criterion is used to judge and remove outliers in the data sequence, and for data missing at a certain moment, a linear interpolation method is used to complete it. Before data modeling, different feature data need to be mapped to the same scale, the feature data need to be normalized, and then a deep learning convolutional network model, a recurrent neural network model and a Yebaes dynamic linear model are constructed.
[0057] Deep learning convolutional neural network (CNN) is used for feature extraction: Air quality data has many dimensions and feature extraction is difficult. Deep learning convolutional neural network (CNN) extracts features locally through convolution kernels and shares weights, which solves the shortcoming of too many parameters in artificial neural networks. It has a good effect on feature extraction and has powerful feature extraction capabilities. It can convert long input sequences into short sequences composed of high-level features, and use the extracted feature sequences as input to the recurrent neural network - long short-term memory neural network LSTM (Long Short Term Memory).
[0058] Recurrent neural network model (Long Short-Term Memory Neural Network LSTM) as a prediction model: Since the concentration of air pollutants is highly correlated with time, the use of long short-term memory neural network LSTM can handle this memory-related problem well. LSTM is improved and optimized based on RNN to solve the gradient disappearance problem during training. Its model structure contains a group of memory modules, which are associated with each other to replace the memory units in ordinary RNN. LSTM is easier to train than ordinary RNN. At present, it has achieved good research results in many fields.
[0059] The LSTM input is an hourly feature, i.e., the AQI and six major pollutant indicators at a certain moment, and the output is a neuron used to predict the AQL.
[0060] Bayesian Dynamic Linear Model DLM: Bayesian prediction is a prediction method developed to predict emergencies. It not only relies on historical measurement data and makes predictions based on the knowledge of the model, but also includes the experience information and subjective judgment of experts to make predictions, which is particularly useful for predicting emergencies.
[0061] The basic idea of Bayesian prediction is to establish a dynamic model, regard the prediction distribution as a conditional generalization distribution, find the prediction distribution based on the prior information, use the Bayesian formula to find the posterior information, and correct the prior information to find the predicted value. The Bayesian dynamic linear model consists of three parts: observation equation, state equation and initial information.
[0062] Hybrid model: After building the model framework, construct a hybrid model of long short-term memory neural network LSTM + Bayesian dynamic linear model DLM. The input of the LSTM model is historical AQI data and six major pollutant indicators, and the output is predicted AQI; the input of the Bayesian dynamic linear model is historical AQI data and empirical information, and the output is predicted AQI. The AQI outputs of the two prediction models are fused to obtain a new prediction result, making the model feature diversified, with stronger learning ability and higher prediction accuracy.
[0063] The normalization process in step S3 is to keep the value range of the data within a relatively small fluctuation range, reduce the impact of different orders of magnitude or different dimensions on the data, set the feature distribution to normal distribution, and map the feature to the standard normal distribution through variance and mean. The calculation formula is:
[0064]
[0065] where y mean is the mean of all sample data, y std is the standard deviation of all sample data.
[0066] Step S4 specifically includes:
[0067] Step S41, for the constructed model, selecting training data and test data from the AQI data, and completing the initialization of the deep learning convolutional network model, the recurrent neural network model, and the Ye-Bas dynamic linear model;
[0068] Step S42, using the training data to train the deep learning convolutional network model, the recurrent neural network model and the Ye-Bas dynamic linear model;
[0069] Step S43, using the trained deep learning convolutional network model, recurrent neural network model and Ye Bei Si dynamic linear model to obtain the test prediction results according to the test data;
[0070] Step S44, using the trained deep learning convolutional network model, recurrent neural network model and Ye Beisi dynamic linear model for prediction.
[0071] In step S5, the Bayesian dynamic linear model includes: observation equation, state equation and initial information. The predicted distribution is regarded as the conditional general distribution, the predicted distribution is obtained according to the prior information, the posterior information is obtained using the Bayesian formula, and the prior information is corrected to obtain the predicted value.
[0072] The effect and optimization goal of the LSTM neural network model are defined by the loss function, which estimates the inconsistency between the predicted value and the true value of the network model. The optimization problem aims to minimize the loss function, optimize the network parameters according to the proximity between the predicted value and the true value, and obtain the optimal model. The air quality prediction problem is a regression problem, and the mean square error loss function is used, which is defined as follows:
[0073]
[0074] Where a is the predicted value and y is the sample value.
[0075] The recurrent neural network model also includes the Adam algorithm and the Dropout algorithm;
[0076] The Adam algorithm is used to calculate the first-order moment estimate and the second-order moment estimate of the gradient and design independent adaptive learning rates for different parameters;
[0077] Adam designs independent adaptive learning rates for different parameters by calculating the first-order moment estimate and the second-order moment estimate of the gradient. The Adam algorithm obtains the advantages of both the adaptive gradient algorithm (AdaGrad) and the root mean square propagation (RMSProp) algorithm. Adam not only calculates the adaptive parameter learning rate based on the first-order moment mean like the RMSProp algorithm, but also makes full use of the second-order moment mean of the gradient. The Adam algorithm can adapt to harsh conditions such as sparse parameters, non-stationary targets, and noise, and has fast calculation speed and self-adjusting parameters, which can be applied to most occasions.
[0078] The Dropout algorithm is used to reduce the dependency between features and reduce the probability of overfitting.
[0079] The Dropout algorithm can effectively alleviate the occurrence of overfitting and improve the accuracy of prediction. When a complex feedforward neural network has few training samples, the trained model is prone to overfitting. In the process of training the neural network, the Dropout algorithm is used to randomly discard a part of the neural network units, temporarily remove the training process, and during forward propagation, the activation value of a certain neuron stops working with a certain probability p, making the model more generalizable and reducing the training load, thereby increasing the training speed.
[0080] Once the data is prepared and the model and various parameters are set, deep learning will perform multiple training and verifications until a model that best fits the target and expectations is generated.
[0081] The step S8 is also included, obtaining MEO data;
[0082] Step S9, perform correlation analysis based on MEO data and AQI data; use the Spearman correlation coefficient to perform correlation analysis between monitored meteorological data and air quality data. Meteorological conditions are one of the important factors that restrict air quality, affecting the generation, diffusion and transportation of air pollutants. The Spearman correlation coefficient method is used to analyze the relationship between AQI, six air pollutants and meteorological factors. The Spearman correlation coefficient uses a monotonic equation to evaluate the correlation between two statistical variables. When the two variables are completely monotonically correlated, the Spearman correlation coefficient is +1 or -1. If the coefficient is 0, it means that the two variables are unrelated.
[0083] Step S10, perform backward trajectory and potential source contribution analysis based on MEO data and AQI data; analyze the potential source areas that affect pollutant concentrations and the contribution of different source areas to pollutant concentrations. Backward trajectory is a model that analyzes the diffusion and movement paths of pollutants based on meteorological parameters such as temperature, air pressure, and wind direction. It is widely used in the study of loose paths of pollutants. The potential source contribution factor PSCF analysis method uses backward trajectory and pollutant concentration to analyze the potential source and distribution of specific pollutants. This method divides the study area into i×j grids according to longitude and latitude, and records the number of all airflow trajectories passing through a grid (i, j) as n. ij , the number of contaminated trajectories passing through grid (i, j) is recorded as m ij .
[0084] Step S11, importing the correlation analysis results, backward trajectory and potential source contribution analysis results into the final predicted AQI data to obtain comprehensive improvement suggestions.
[0085] The correlation analysis in step S9 specifically includes: taking PM2.5 and PM10 as first variables respectively, and taking weather, temperature, air pressure, humidity, wind speed and wind direction as second variables into the following formula:
[0086]
[0087] where x i With y i To compare the correlation between two variables, is the variable x i The mean of is the variable y i When two variables are completely monotonically correlated, r is +1 or -1, and when the two variables are uncorrelated, r is 0.
[0088] The backward trajectory and potential source contribution analysis in step S10 specifically includes: dividing the study area into i×j grids according to longitude and latitude, and the PSCF calculation formula is:
[0089]
[0090] where n ij is the number of all airflow trajectories passing through a certain grid (i, j), m ij is the number of contaminated trajectories passing through grid (i, j).
[0091] Embodiment 2:
[0092] The spatial correlation between air pollutants is studied, and a spatial conversion method is proposed. The area around the target monitoring station is divided through airspace division, airspace aggregation and airspace difference, so that each area can obtain air quality data and meteorological data in the same format, and finally the spatially sparse air quality data is converted into a unified consistent input to extract the features between airspace data.
[0093] By collecting historical air quality observation data and meteorological data, we can obtain the set of central monitoring stations in the target area and monitoring stations in the adjacent areas S = {S1, S2, S3, ...S n}, historical air quality monitoring data of each monitoring station And historical meteorological monitoring data of each monitoring station The three of them are used as inputs of the deep learning model to obtain the air quality data of the central monitoring point in the target area for a period of time in the future.
[0094] Since atmospheric pollutants float in a vast geographical space and are in a mobile and diffuse state at any time due to the influence of time and terrain, it is necessary to consider not only the historical atmospheric quality index of a target area in detail, but also the historical atmospheric quality index of the target area in detail. Historical meteorological monitoring data It is also necessary to convert the surrounding area S = {S1, S2, S3, ... S n} are taken into account together and their spatial correlation is considered comprehensively.
[0095] 1) Diffusion of air pollution. Because air pollutants are scattered in different locations and will diffuse and transfer over time due to the constraints of regional geographical environment, we can further predict more information by using data from the neighborhood space.
[0096] 2) Spatial correlation. Airspace partitioning merges scattered air quality data into a certain target area, with closer areas having finer granularity and farther areas having coarser granularity. In addition, areas at different distances show different effects due to distance changes.
[0097] 3) Scalability. It reduces complexity compared to traditional spatial aggregation methods by determining the upper limit of the input (number of regions). In addition, the spatial interpolation method overcomes spatial sparsity by filling in missing values in the divided regions and generating consistent inputs for all monitoring stations, which enables us to train the model together using data from different stations, increasing the accuracy of the model to a certain extent.
[0098] The process of the spatial conversion method is to first select a target air quality monitoring station that needs to be predicted as the center of the circle, and generate an inner monitoring area with a first radius of 5 kilometers; generate an outer ring with a second radius of 20 kilometers, and use the area outside the inner monitoring area and within the outer ring as the outer monitoring area; connect all monitoring stations in the inner monitoring area with the target monitoring point, obtain the inner monitoring angle between the two adjacent monitoring stations and the target monitoring point, take the angular bisector of the inner monitoring angle with the smallest angle among all the inner monitoring angles as the starting axis, and divide it into 8 inner sector areas with every 45°; connect all monitoring stations in the outer monitoring area with the target monitoring point, obtain the outer monitoring angle between the two adjacent monitoring stations and the target monitoring point, take the angular bisector of the outer monitoring angle with the smallest angle among all the outer monitoring angles as the starting axis, and divide it into 8 inner sector areas with every 45°.
[0099] This will increase the number of monitoring stations in each sector area as much as possible, reduce the use of virtual monitoring stations and improve accuracy.
[0100] Then, each sector area is judged. If there is one or more monitoring stations in an area, weights are assigned to the recorded data of each monitoring station in the area according to the distance from these monitoring stations to the target monitoring station, and regression operations are performed to obtain the average monitoring data of the area; if there is no monitoring station in the area, a virtual monitoring station will be generated in the center of these areas, and the classic spatial interpolation method, inverse distance weighted IDW (Inverse Distance Weighted) will be used to interpolate the data of the virtual monitoring station.
[0101] The key point of this method is to designate one feature as the primary feature and the other features as auxiliary features. The primary feature refers to the historical air quality index of the target monitoring site. Historical meteorological monitoring data Its data and predicted target data are from the same monitoring site, and the auxiliary features and It comes from monitoring stations in 16 surrounding sector areas.
[0102] Airspace aggregation algorithm: When dividing the airspace, due to the uneven distribution of monitoring sites in terms of geographical factors and other restrictions, there may be multiple detection sites in some areas, too much data, and increased redundancy. Weights are assigned to the recorded data of each monitoring station in the area for regression operations to obtain the average monitoring data of the area. The following formula is proposed for calculation:
[0103]
[0104] Where y is the average monitoring data of the area, W is a different weight, and the size of W is determined according to the distance between each monitoring point in the area and the target monitoring point.
[0105] Airspace difference algorithm: When dividing the airspace, there are some areas where there are no monitoring stations in the areas divided by some remote target monitoring stations. A virtual monitoring station is generated in this area to fill the missing values in the area, and the data of the virtual monitoring station in the area is generated by using the captured data of the monitoring stations in the surrounding areas. The inverse distance weighted method is proposed, which uses a linear weighted combination of the available values at the known points to calculate the specified value of the unknown point, calculated using the following formula:
[0106]
[0107] Among them, Z(x, y) is the difference prediction output, (x, y) is the difference point coordinate, (x i ,y i ) is the coordinate of the discrete point, w i is the weight of the discrete point.
[0108] The above are only preferred embodiments of the present invention. The protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. An air quality analysis and prediction method based on deep learning and Bayesian model, characterized by Included are: Step S1: Obtain AQI data of the target monitoring point; Step S2: Preprocess the AQI data, determine and remove outliers in the data sequence according to the Laida criterion, and use linear interpolation to complete the missing data at a certain moment; Step S3: normalizing the AQI data; Step S4: constructing a deep learning convolutional network model, a recurrent neural network model, and a Bayesian dynamic linear model respectively; Step S5: inputting the normalized AQI data into the deep learning convolutional network model and the Bayesian dynamic linear model respectively, wherein the deep learning convolutional network model converts the long input sequence into a short sequence composed of high-level features after running, and the Bayesian dynamic linear model outputs the first predicted AQI data after running; Step S6: inputting the sequence composed of features extracted by the deep learning convolutional network model into the recurrent neural network model, and the recurrent neural network model outputs the second predicted AQI data after running; Step S7: constructing a hybrid model, inputting the first predicted AQI data and the second predicted AQI data into the hybrid model, and outputting final predicted AQI data after the hybrid model runs; The step S4 specifically includes: Step S41, for the constructed model, selecting training data and test data from the AQI data, and completing the initialization of the deep learning convolutional network model, the recurrent neural network model, and the Bayesian dynamic linear model; Step S42, using the training data to train the deep learning convolutional network model, the recurrent neural network model, and the Bayesian dynamic linear model; Step S43, using the trained deep learning convolutional network model, recurrent neural network model and Bayesian dynamic linear model to obtain the test prediction results according to the test data; Step S44, using the trained deep learning convolutional network model, recurrent neural network model and Bayesian dynamic linear model to make predictions; The Bayesian dynamic linear model in step S5 includes: observation equation, state equation and initial information. The predicted distribution is regarded as a conditional general distribution, the predicted distribution is obtained based on the prior information, the posterior information is obtained using the Bayesian formula, and the prior information is corrected to obtain the predicted value.
2. The air quality analysis and prediction method based on deep learning and Bayesian model according to claim 1 is characterized in that: The normalization process described in step S3 is to place the value range of the data within a relatively small fluctuation range, reduce the impact of different orders of magnitude or different dimensions on the data, set the feature distribution to a normal distribution, and map the feature to a standard normal distribution through variance and mean. The calculation formula is: where y mean is the mean of all sample data, y std is the standard deviation of all sample data.
3. The air quality analysis and prediction method based on deep learning and Bayesian model according to claim 1 is characterized in that: For the recurrent neural network model, the loss function during the training phase is as follows: Where a is the predicted value and y is the sample value.
4. The air quality analysis and prediction method based on deep learning and Bayesian model according to claim 1 is characterized in that: The recurrent neural network model also includes the Adam algorithm and the Dropout algorithm; The Adam algorithm is used to calculate the first-order moment estimate and the second-order moment estimate of the gradient and design independent adaptive learning rates for different parameters; The Dropout algorithm is used to reduce the dependency between features and reduce the probability of overfitting.
5. The air quality analysis and prediction method based on deep learning and Bayesian model according to claim 1 is characterized by: The step S8 is also included, obtaining MEO data; Step S9, performing correlation analysis based on MEO data and AQI data; Step S10, performing backward trajectory and potential source contribution analysis based on MEO data and AQI data; Step S11, importing the correlation analysis results, backward trajectory and potential source contribution analysis results into the final predicted AQI data to obtain comprehensive improvement suggestions.
6. The air quality analysis and prediction method based on deep learning and Bayesian model according to claim 5 is characterized by: The correlation analysis in step S9 specifically includes: taking PM2.5 and PM10 as first variables respectively, and taking weather, temperature, air pressure, humidity, wind speed and wind direction as second variables into the following formula: where x i With y i To compare the correlation between two variables, is the variable x i The mean of is the variable y i When two variables are completely monotonically correlated, r is +1 or -1, and when the two variables are uncorrelated, r is 0.
7. The air quality analysis and prediction method based on deep learning and Bayesian model according to claim 5 is characterized by: The backward trajectory and potential source contribution analysis in step S10 specifically includes: dividing the study area into i×j grids according to longitude and latitude, and the PSCF calculation formula is: Where n ij is the number of all airflow trajectories passing through a certain grid (i, j), m ij is the number of contaminated trajectories passing through grid (i, j).
Citation Information
Patent Citations
Deep-structure recurrent neural network-based PM2.5 prediction method
CN107909206A