Air quality prediction method based on traffic congestion index and multi-source data fusion

By integrating traffic congestion index and multi-source data, and utilizing GCN and CNN-BiLSTM models combined with an attention mechanism, the problem of accuracy in air quality prediction was solved, enabling precise prediction of air quality and simulation of pollutant distribution, thus improving the scientific nature of urban air quality management.

CN117494034BActive Publication Date: 2026-07-14HEFEI UNIV OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HEFEI UNIV OF TECH
Filing Date
2023-08-11
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately predict air quality, especially in urban environments, where air pollutant concentrations are influenced by a complex array of factors, including meteorological conditions and traffic conditions, making predictions even more difficult.

Method used

We employ a method based on traffic congestion index and multi-source data fusion, utilizing graph convolutional neural networks (GCN) and a hybrid model of convolutional neural networks and bidirectional long short-term memory networks (CNN-BiLSTM), combined with an attention mechanism, to capture the spatiotemporal characteristics of air quality data and the changing trends of traffic-sensitive pollutants, and construct an integrated model for prediction.

Benefits of technology

It improves the accuracy and reliability of air quality forecasting, can identify highly polluted areas and provide early warnings of sudden pollution events, simulates the transmission and diffusion processes of pollutants, and provides scientific evidence for urban air quality management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117494034B_ABST
    Figure CN117494034B_ABST
Patent Text Reader

Abstract

The application discloses an air quality prediction method based on a traffic congestion index and multi-source data fusion, collects, pre-processes relevant influence factors such as atmospheric pollutants, meteorological element data and traffic congestion indexes of urban national control sites and establishes a multi-source heterogeneous data set; a GCN model is constructed, traffic congestion index feature fusion is realized through a grey correlation model; a mapping relationship between the traffic congestion index and traffic-sensitive pollutants and meteorological elements is established; historical air quality conditions, meteorological factors and the traffic congestion index are used to predict the concentration of traffic-sensitive pollutants, and the prediction effect of the integrated model is evaluated; the application combines the traffic congestion index with meteorological data and pollutant data, considers the influence of the traffic congestion on the spatio-temporal distribution of regional pollutant concentration, evaluates the influence of pollution emergencies, solves the problem of large fluctuation of air quality data and the problem of inaccurate prediction effect, and improves the accuracy and reliability of the air quality prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of air quality prediction technology based on deep learning, and in particular to an air quality prediction method based on traffic congestion index and multi-source data fusion. Background Technology

[0002] Air pollution is a significant factor affecting public health, and air quality forecasting is crucial for early warning of air pollution. Therefore, predicting air quality trends has become a hot topic in current scientific research. However, air pollution is a complex phenomenon. The concentration of air pollutants at a specific time and location is influenced by many factors, primarily meteorological conditions, time dependence, and spatial correlation. Natural factors such as temperature, humidity, and wind speed, as well as human factors such as road traffic conditions and pollution source emissions, are major influencing factors. Urban population density, topography, and meteorology are also important factors affecting air quality, further increasing the difficulty of accurate air quality forecasting.

[0003] Urban traffic conditions have a significant impact on air quality. Vehicle emissions are a major source of urban air pollution, and the influence of traffic conditions on air quality is dynamic, influencing factors such as traffic flow, road conditions, and changes in transportation modes. Traffic congestion restricts the dispersion of air pollutants, especially in dense urban areas and narrow streets. Congestion causes pollutants to stagnate, increasing emissions and concentrations, creating localized pollution zones, and significantly negatively impacting urban air quality. Therefore, combining traffic congestion indices with meteorological and pollutant data can improve the accuracy of air quality forecasts and provide a scientific basis for urban air quality management and improvement.

[0004] Ecological and environmental big data is characterized by high dimensionality, high complexity, and uncertainty. Big data technology can effectively process data from multiple sources, of multiple types, and at multiple scales. The integration, consolidation, and analysis of multi-source heterogeneous data is a current challenge in environmental monitoring big data research. Deep learning models exhibit superior performance in big data analysis, with feature extraction and prediction capabilities far exceeding those of traditional algorithms. Therefore, in the context of the big data era, utilizing deep learning models in conjunction with traditional optimization algorithms for air quality prediction has become one of the most promising research directions. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of existing technologies and provide an air quality prediction method based on traffic congestion index and multi-source data fusion. This invention conducts coupled research on urban air quality from multiple aspects and indicators, including spatiotemporal characteristics, traffic congestion, and pollution sources. By fusing traffic congestion index with meteorological and atmospheric pollutant data, it reveals the spatiotemporal distribution characteristics of pollutant concentrations, which can improve the accuracy and reliability of air quality prediction models and enable timely early warning and prediction of environmental pollution events.

[0006] This invention is achieved through the following technical solution:

[0007] An air quality prediction method based on traffic congestion index and multi-source data fusion includes the following steps:

[0008] S1: Collect air pollutant and meteorological data from national monitoring stations in the city, add relevant influencing factors such as traffic congestion index, perform preprocessing, and summarize to generate an air pollutant information sequence with multi-factor expression and multi-type characteristics;

[0009] S2: Construct a graph convolutional neural network model (GCN model for short), extract spatial correlation features of monitoring stations through custom adjacency relationships, analyze the correlation between traffic-sensitive pollutants and meteorological elements between stations, and map the road congestion index within the station coverage area to the pollutant fluctuation trend to achieve traffic congestion index feature fusion.

[0010] S3: The TensorFlow framework is used to build a hybrid model of convolutional neural network and bidirectional long short-term memory network (CNN-BiLSTM model). By capturing the spatiotemporal correlation between various features, the problem of inconsistent feature scales in long time series data is solved, and the trend of air quality change is comprehensively depicted.

[0011] S4: Integrate the GCN model and CNN-BiLSTM model using the attention mechanism to capture pollutant feature information at key time points, refine the features of different dimensions, and optimize and train the integrated model.

[0012] S5: Using the trained ensemble model, meteorological factors, traffic congestion index and air quality status are used to comprehensively predict the concentration of traffic-sensitive pollutants, and error indicators are selected to quantitatively analyze the prediction effect of the ensemble model.

[0013] Step S1 specifically includes the following steps:

[0014] S11: Acquire historical data on conventional pollutants, meteorological elements, and traffic congestion index from urban air quality monitoring stations, and collect information on atmospheric pollution transmission and emergencies to form a multi-source heterogeneous dataset;

[0015] S12: Based on logic and causal relationships, split and filter multi-source datasets to reduce the number of data features and optimize the combination of feature indicators;

[0016] Multi-source heterogeneous datasets are divided into two types based on their feature attributes: original features and explanatory supplementary datasets. The original feature datasets contain the temporal variation features of pollutants and meteorological factors, while the explanatory supplementary datasets consist of various pollution events and are used to explain the reasons for the abnormal peaks in the feature datasets. The data is classified and encoded according to the scope size, and the textual data is converted into numerical embeddings in the dataset.

[0017] The scope of action characterizes the contribution of pollutant peak concentration fluctuations, and the purpose of classification coding is to establish weights and priorities, and to use pollution events as environmental impact correction factors.

[0018] S13: Compare and analyze the changing trends of various types of air pollutants, and select the types of pollutants that fluctuate significantly due to traffic congestion as traffic-sensitive pollutants;

[0019] S14: Preprocess the initially screened data, including missing value imputation and outlier handling, and then perform max-min normalization, with the normalization interval specified as 0 to 1. The max-min normalization formula is as follows:

[0020]

[0021] In the formula, The final result after normalization The original value, The minimum value of the original data. This represents the maximum value of the original data.

[0022] Step S14 describes the missing value processing of the data, which specifically includes filling missing data with the mean, using box plots to statistically analyze and display the data, and removing outliers that significantly deviate from the majority of the data.

[0023] Step S2 specifically includes the following steps:

[0024] S21: Based on the geographical location and coverage radius of the collected sites, spatial association rules are established using graph convolutional networks to extract the spatiotemporal association information between the monitoring data of each site and to explain the pollution diffusion and convergence phenomenon among the monitoring sites.

[0025] S22: Use Pearson correlation coefficient to conduct spatial and temporal correlation analysis on traffic-sensitive pollutants at the station, understand the correlation characteristics between pollutant concentration and meteorological factor data, and set correlation coefficient thresholds.

[0026] The formula for calculating the Pearson correlation coefficient is:

[0027]

[0028] In the formula, It is a feature and Covariance between , Features and The standard deviation.

[0029] The graph convolutional network in step S21 specifically includes a feature matrix that describes the topology between monitoring stations and generates information about the corresponding stations.

[0030] Based on the geographical location information of each station, a topology map G of the environmental monitoring stations in the city where the target station is located is constructed, and the correlation between each pair of stations is calculated and stored in the adjacency matrix A.

[0031] Topology diagram : It can be used to describe the topology between multiple city monitoring stations. Each node in the diagram represents an environmental monitoring station. Represents the set of all stations in the city. , It is represented as a set of edges between monitoring stations. This represents the total number of monitoring stations.

[0032] The degree of association is represented by the reciprocal of the distance between two stations, and this value is stored in the adjacency matrix A as the edge weight of the corresponding station. .

[0033] A feature matrix was constructed based on air quality data from urban environmental monitoring stations at different times. ,in It represents the quantity of node attributes, and the feature matrix stores the information of each node in the topology graph.

[0034] Perform a Laplace transform on the adjacency matrix A to generate a matrix. .

[0035] in It is a self-connected adjacency matrix. It is the identity matrix. It is a degree matrix.

[0036] By aggregating and transforming the features of related nodes through custom association rules, the optimal combination of features of adjacent nodes can be obtained, that is, the spatial relationship between sites can be extracted.

[0037] S23: Based on the latitude and longitude coordinates of the monitoring stations, mark the locations of the selected monitoring stations on the map. By matching the distance between the stations and surrounding roads, the collected traffic congestion index data can be distributed to the urban road network, realizing the fusion of traffic congestion index with meteorological data and traffic-sensitive pollutant data.

[0038] The grey relational model was used to analyze the similarity between the concentration of traffic-sensitive pollutants at the station and the traffic congestion of nearby roads. A spatiotemporal correlation and multi-feature fusion air quality dataset was established for predictive modeling and training.

[0039] The original data in the dataset is initialized and the dimensions are eliminated. Then, the absolute difference, minimum difference, and maximum difference between the traffic-sensitive pollutant series and the traffic congestion index series at each time point are calculated.

[0040]

[0041] Let be the initial value of the i-th pollutant at the target station at time k. This represents the numerical value of the original data of the i-th pollutant at the target station at time k.

[0042] Traffic congestion index sequences at different monitoring stations correlate with pollutant sequences. Correlation coefficient at time:

[0043]

[0044] In the formula, This represents the correlation coefficient at time k, where k takes the value of... , The resolution coefficient is in the range of (0,1) and is often set to 0.5. This represents the initial value of the traffic congestion index for roads near the target station. This indicates finding the minimum difference between the two levels of data in two columns. This indicates finding the maximum difference between the two levels of two columns of data.

[0045] The correlation coefficients obtained at all times were used to calculate the correlation between various traffic-sensitive pollutants and the traffic congestion index. The closer the value is to 1, the higher the degree of correlation.

[0046]

[0047] Values This indicates the types of traffic-sensitive pollutants. This represents the correlation coefficient between the i-th pollutant at time n at the target station and the traffic congestion index.

[0048] Step S3 specifically includes the following steps:

[0049] S31: Determine the structure of each layer of the CNN neural network, and compress and extract important features of the input data;

[0050] The essential characteristics of CNNs are local perception and parameter sharing. They consist of convolutional layers, pooling layers, and fully connected layers. They extract spatial features from the original input data, realize high-dimensional feature representation of the original data, and reduce the number of parameters in the neural network computation process.

[0051] The convolutional layer uses one-dimensional convolution, and the number of convolutional kernels is... Size set The convolution kernel performs convolution only along a single temporal direction, with a stride of [value missing]. For each Each time step sequence vector is used for feature extraction to obtain a feature map. After a convolutional kernel extracts all the sequence data of a sample, a feature map will be obtained. Feature diagram of the shape.

[0052] The CNN convolutional layers have a total of There are 10 convolutional kernels, so the final result will be 10 ... Each feature map is processed by convolution followed by max pooling. A flattening layer expands all feature maps into one-dimensional vectors of the same number of elements. These vectors are then decoded by a fully connected layer to obtain the transformed feature values.

[0053] S32: The sequence after feature extraction is passed down to the BiLSTM layer and input into two LSTM neural networks in forward and reverse order respectively to fully extract the correlation between the features before and after.

[0054] Bidirectional Long Short-Term Memory (LSTM) networks process sequential data forward and backward using two independent LSTM networks. The forward LSTM processes the sequence from beginning to end, while the backward LSTM processes the sequence from beginning to end. The outputs of the two networks are then concatenated to produce the final prediction.

[0055]

[0056]

[0057] in, This represents the input at time t. This represents the state value of the cell at time t.

[0058] Finally, output the combined output of the stacked results of the forward and backward network layers.

[0059]

[0060] The LSTM unit mainly consists of memory cells, input gates, output gates, and forget gates. The activation function is used to adjust the numerical value, and the output range is between -1 and 1. The input gate is used to control the input information of the neural unit at the current time. The forget gate is used to control the historical information stored in the neural unit at the previous time. The output gate is used to control the output information of the neural unit at the current time.

[0061] The CNN-BiLSTM network model is constructed by setting the hyperparameters of the input layer, the number of neurons and layers in the hidden layer, and the hyperparameters of the output layer. The pollutant concentration data at a certain moment is used as the input of the model, and the output of the model is the predicted value of the input data at the next moment.

[0062] The specific steps of S4 are as follows:

[0063] S41: The outputs of the two models are linearly concatenated to obtain the correlation matrix, and a conditional correlation matrix is ​​generated, ultimately forming a spatiotemporal information matrix of multi-site and multi-feature fusion.

[0064] S42: The correlation matrix between the two models is weighted for each input feature through the attention mechanism to obtain a new output result, and finally the attention weight coefficients corresponding to the hidden layers of the two sub-models are obtained.

[0065] S43: Combine the obtained weights with the final outputs of each model to obtain the joint expression, which yields the attention vector matrix of the ensemble model;

[0066] The model attention weight calculation in step S42:

[0067] The data from the association matrices of the two models are used to calculate the attention vector of the data at different time points to the predicted value through an attention mechanism. The importance of the data at different time points to the predicted value is determined, and the SoftMax function is used to normalize the data to obtain the weight coefficient matrix of each hidden layer vector.

[0068]

[0069] in, for Time of the first Hidden layer vectors, , The first The hidden layer vectors are in and Time-state value, For activation function, , , It is a weight matrix. It is a bias term;

[0070]

[0071] for Time of the first The weight coefficient matrix of each hidden layer vector. Represents the last time step The state values ​​of the hidden layer vectors;

[0072] The target value depends on the sequence at each time step. Attention vector:

[0073]

[0074] Softmax() indicates that the normalization operation is performed using the softmax function.

[0075] Multiplying the output values ​​of the two models by their respective attention vectors will yield the weight coefficient distribution matrix of the ensemble model.

[0076] S5 specifically includes the following steps:

[0077] S51: Train two models. The latitude and longitude coordinate distribution information matrix of all stations is used as the input of the GCN model. Traffic-sensitive pollutant data and meteorological factor sequences, as well as the traffic congestion index of the corresponding area, are used as the input of the CNN-BiLSTM model to obtain the output of the two models.

[0078] S52: The outputs of the two models are learned through an attention mechanism, and the prediction value for the next time step is obtained by ensemble training based on the weight distribution characteristics between the spatiotemporal features of multiple sites.

[0079] S53: By continuously adjusting the integrated model parameters and calculating the loss function, the optimal network structure is finally determined, using MAE and RMSE. As an indicator for evaluating ensemble models.

[0080] Step S53: Calculation and evaluation of the loss function of the integrated model.

[0081] The goal of ensemble model training is to minimize the loss function so that the model can fit the training data more accurately. The loss function is used to calculate the deviation between the prediction results of the ensemble model and the label results, and then used in the backpropagation process to update the gradient. By continuously training and optimizing the parameters of the ensemble model, the errors output by the two sub-models are combined for learning iteration, with the aim of minimizing the loss function and finally learning the optimal ensemble model structure.

[0082] In the backpropagation of the ensemble model, the loss function used for training is MSE, and the total error is expressed as:

[0083]

[0084] in, This represents the predicted value of the ensemble model at time t. This represents the true value at time t.

[0085] MAE characterizes model accuracy by calculating the average of the absolute errors between the true and predicted values, as shown in the following formula:

[0086]

[0087] RSME measures the degree of deviation between predicted and actual values ​​by calculating the square root of the mean of the sum of the squares of the differences between the actual and predicted values. The calculation formula is as follows:

[0088]

[0089] The correlation coefficient is used to calculate the degree of correlation between predicted and actual values. The formula is as follows:

[0090]

[0091] in, It is the mean value predicted by the ensemble model at time t. It is the mean at time t.

[0092] The advantages of this invention are:

[0093] I. This invention introduces the traffic congestion index as a new feature of the air quality prediction model, accurately understands urban traffic congestion information and the intensity and distribution of vehicle exhaust emissions, can identify congested areas and high pollution source areas, and helps to predict pollutant concentrations in different areas of the city. By combining traffic congestion information with meteorological data and pollution source data, the accuracy of air pollutant prediction is effectively improved.

[0094] Second, this invention constructs a multi-source heterogeneous dataset, providing data at different spatial and temporal scales, including air quality influencing factors such as meteorological factors, traffic congestion, industrial emissions, and pollution emergencies. It reveals the degree of contribution of different factors to air quality data fluctuations, which helps to verify and improve the accuracy and reliability of air quality prediction models, identify and track relevant pollution sources, and simulate and predict the transmission and diffusion processes of pollutants in cities and regions. This helps to predict the concentration distribution of pollutants, the formation process of high-pollution areas, and provide early warning of the occurrence of sudden pollution events.

[0095] Third, the integrated model proposed in this invention utilizes the GCN model to extract spatial correlation features between stations, considering the impact of pollution transmission and diffusion between adjacent urban stations. To address the issues of instability and gradient vanishing caused by excessively long sequences, a CNN-BiLSTM hybrid network model is proposed to learn the constantly fluctuating traffic-sensitive pollutants. This model can effectively capture the temporal dependence between features and comprehensively characterize the changing trends of key nodes of traffic-sensitive pollutants. Furthermore, an attention mechanism is proposed to integrate GCN and CNN-BiLSTM. The final integrated model fuses and correlates the features of multiple factors affecting air quality in a spatiotemporal manner, extracting significant fine-grained features to achieve more comprehensive, accurate, and integrated analysis and prediction. Attached Figure Description

[0096] Figure 1 This is a schematic diagram of the main steps of the method of the present invention;

[0097] Figure 2 This is a schematic diagram of the graph convolutional neural network structure constructed in this invention;

[0098] Figure 3 This is a structural diagram of the CNN-BiLSTM hybrid network model constructed in this invention;

[0099] Figure 4 This is a schematic diagram of the overall structure of the predictive ensemble model constructed in this invention. Detailed Implementation

[0100] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments. The present invention can also be implemented or applied through other different specific embodiments, and the various technical details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention.

[0101] like Figure 1 As shown, an air quality prediction method based on traffic congestion index and multi-source data fusion includes the following steps:

[0102] S1: Collect air pollutant and meteorological data from national monitoring stations in the city, add relevant influencing factors such as traffic congestion index, perform preprocessing, and summarize to generate an air pollutant information sequence with multi-factor expression and multi-type characteristics;

[0103] S11: Acquire historical data on conventional pollutants, meteorological elements, and traffic congestion index from urban air quality monitoring stations, and collect information on atmospheric pollution transmission and emergencies to form a multi-source heterogeneous dataset;

[0104] The dataset is sourced from publicly available sources, spanning the periods of 2017 and 2018, and specifically includes:

[0105] The air pollutant concentration data comes from the National Urban Air Quality Real-Time Release Platform of the China National Environmental Monitoring Centre, while the meteorological background information for the same period comes from the China Meteorological Administration. The traffic congestion index comes from the Shanghai Municipal Transportation Network. The air pollutant mass concentration includes... , , , , , The hourly data includes meteorological observation data such as temperature, humidity, precipitation, and pollutant concentration. Influencing factors include traffic congestion index, urban meteorological early warning information, pollution transmission, and emergencies.

[0106] The Traffic Congestion Index (also known as the Road Traffic Index) is a quantitative method to express the degree of road traffic congestion. It is a digital representation of road traffic conditions, similar to using temperature to express the degree of hot or cold weather. The Road Traffic Index reflects the volume of traffic on roads within a certain area. Road Traffic Index values ​​are expressed between 0 and 100; the higher the value, the more congested the road traffic, and the lower the value, the smoother the traffic flow.

[0107] S12: Based on logic and causal relationships, split and filter multi-source datasets to reduce the number of data features and optimize the combination of feature indicators;

[0108] Multi-source heterogeneous datasets are divided into two types based on their feature attributes: original features and explanatory supplementary datasets. The original feature datasets contain the temporal variation features of pollutants and meteorological factors, while the explanatory supplementary datasets consist of various pollution events and are used to explain the reasons for the abnormal peaks in the feature datasets. The data is classified and encoded according to the scope size, and the textual data is converted into numerical embeddings in the dataset.

[0109] The scope of influence characterizes the magnitude of the contribution to the fluctuation of pollutant peak concentration. The purpose of classification coding is to establish weights and priorities, and to use pollution events as environmental impact correction factors.

[0110] The original feature dataset includes , , , , , The dataset includes ten indicators: temperature, humidity, precipitation, and traffic congestion index. The supplementary dataset also includes factors such as urban meteorological early warning information, pollution transmission, and sudden environmental pollution events.

[0111] Meteorological factors and air pollution events are used to describe the climate background, characterize the rate of pollutant diffusion, and analyze the correlations between data from different stations. Large-scale pollution transport events (such as dust storms and typhoons) are considered risk events and are designated as global and high-priority events.

[0112] By using Python's timestamp function and plotting functions, abnormal peaks in the dataset are located, the event types that describe and explain the occurrence of peaks at corresponding time points are identified, and then the peak contribution method is used to convert them into correction factors to represent the effect of a certain sudden event on the peak.

[0113] Peak contribution method formula:

[0114]

[0115] in It is a correction factor.

[0116] S13: Compare and analyze the changing trends of various types of air pollutants, and select the types of pollutants that fluctuate significantly due to traffic congestion as traffic-sensitive pollutants;

[0117] By using charts to analyze and compare the changing trends of air pollutants during periods of smooth traffic and traffic congestion, the impact of traffic congestion on the concentration of individual pollutants is assessed, and pollutant types with significant fluctuations before and after traffic congestion are identified as traffic-sensitive pollutants.

[0118] Traffic-sensitive pollutants include , , , Four types can reflect the impact of traffic congestion on the spatiotemporal distribution characteristics of pollutants in urban areas.

[0119] S14: Preprocess the initially screened data, including missing value imputation and outlier handling, and then perform max-min normalization, with the normalization interval specified as 0 to 1. The max-min normalization formula is as follows:

[0120]

[0121] In the formula, The final result after normalization The original value, The minimum value of the original data. This represents the maximum value of the original data.

[0122] Step S14 describes the missing value processing of the data, which specifically includes filling missing data with the mean. The monitoring data of each air quality monitoring station has different degrees of missing data. For each missing pollutant monitoring data, the short-term missing value is replaced by the average value of the past 7 hours, and the long-term missing value is replaced by the average value of the past 20 hours.

[0123] The missing data is filled using linear interpolation, and the calculation formula is as follows:

[0124]

[0125] In the formula, The value for the missing part. for The previously known values, for The values ​​that are known later.

[0126] The outlier processing specifically includes: using box plots to statistically analyze the data, and using box plots to visualize the data by displaying the maximum, minimum, median, and upper and lower quartiles of a set of data, thereby quickly removing outliers that deviate significantly from the majority of the data.

[0127] Finally, 80% of the preprocessed data is selected as the training set to build the model and estimate the model parameters, and the remaining 20% ​​is selected as the test set to compare the final prediction results. In the training set, another 10% is selected as the validation set to select model parameters and prevent the model from overfitting.

[0128] Historical concentrations of various pollutants are generated based on time and the data collection sites. At that moment Corresponding time series data for each monitoring station Meteorological factors and traffic congestion index are used as multi-source data. including At that moment The data includes meteorological factors and traffic congestion index within the coverage area of ​​each station, as well as descriptions of pollution generation. One influencing factor;

[0129] S2: Construct a GCN model, extract spatial correlation features of monitoring stations through custom adjacency relationships, analyze the correlation between traffic-sensitive pollutants and meteorological elements among stations, and map the traffic congestion index within the station coverage area to the pollutant fluctuation trend to achieve traffic congestion index feature fusion.

[0130] S21: Based on the geographical location and coverage radius of the collected sites, spatial association rules are established using graph convolutional networks to extract the spatiotemporal association information between the monitoring data of each site and to explain the pollution diffusion and convergence phenomenon among the monitoring sites.

[0131] The graph convolutional network construction in step S21 is as follows: Figure 2 As shown, it specifically includes a feature matrix that describes the topology between monitoring stations and generates corresponding station information.

[0132] Based on the geographical location information of each station, a topology map G of the environmental monitoring stations in the city where the target station is located is constructed, and the correlation between each pair of stations is calculated and stored in the adjacency matrix A.

[0133] Topology diagram : It can be used to describe the topology between multiple city monitoring stations. Each node in the diagram represents an environmental monitoring station. Represents the set of all stations in the city. , It is represented as a set of edges between monitoring stations. This represents the total number of monitoring stations.

[0134] The degree of association is represented by the reciprocal of the distance between two stations, and this value is stored in the adjacency matrix A as the edge weight of the corresponding station. .

[0135] The distance between any two stations in the city is calculated based on L; the larger the distance value, the weaker the correlation.

[0136]

[0137] Where a and c represent the latitude information of the two stations, b and d represent the longitude information of the two stations, and UA represents the city area.

[0138] A feature matrix was constructed based on air quality data from urban environmental monitoring stations at different times. ,in It represents the quantity of node attributes, and the feature matrix stores the information of each node in the topology graph.

[0139] Perform a Laplace transform on the adjacency matrix A to generate a matrix. .

[0140] in It is a self-connected adjacency matrix. It is the identity matrix. It is a degree matrix.

[0141] By aggregating and transforming the features of related nodes through custom association rules, the optimal combination of features of adjacent nodes can be obtained, that is, the spatial relationship between sites can be extracted.

[0142] The specific association rules are as follows:

[0143]

[0144] in It is a non-linear activation function. For the first Layer weight matrix, For the first The activation value of the layer, and .

[0145] S22: Use Pearson correlation coefficient to conduct spatial and temporal correlation analysis on traffic-sensitive pollutants at the station, understand the correlation characteristics between pollutant concentration and meteorological factor data, and set correlation coefficient thresholds.

[0146] The formula for calculating the Pearson correlation coefficient is:

[0147]

[0148] In the formula, It is a feature and Covariance between , Features and The standard deviation.

[0149] Based on the Pearson correlation coefficient analysis results, the pollutants were sorted according to their correlation values. A correlation coefficient threshold of 0.8 was set, and combinations of strongly correlated traffic-sensitive pollutants at stations with values ​​higher than the threshold were selected.

[0150] S23: Based on the latitude and longitude coordinates of the monitoring stations, mark the locations of the selected monitoring stations on the map. By matching the distance between the stations and surrounding roads, the collected traffic congestion index data can be distributed to the urban road network, realizing the fusion of traffic congestion index with meteorological data and traffic-sensitive pollutant data.

[0151] Based on the latitude and longitude coordinates of the stations, the selected station locations are marked on the map. By spatially matching the stations with roads, the collected traffic congestion index data is distributed to the urban road network. Using ArcGIS software, the stations are spatially connected to the Shanghai road network and matched with their nearest neighboring roads. The pollution monitoring range of the stations is used as the basis for the traffic congestion index of the matched roads. The road congestion status of major roads within the station coverage area is represented by the road congestion index. A grey relational model is used to analyze the similarity between the concentration of traffic-sensitive pollutants at the stations and the traffic congestion status of neighboring roads. The specific method is as follows:

[0152] The concentrations of traffic-sensitive pollutants at each monitoring station and the traffic congestion index of roads within the coverage area. Five sequences can be obtained: , , , and the congestion index of adjacent roads , respectively , , , As the parent series, the original data in the dataset is initialized and the dimensions are eliminated. Then, the absolute difference, the minimum difference and the maximum difference at each time point between the station pollutant series and the traffic congestion index series are calculated.

[0153] ,

[0154] Let be the initial value of the i-th pollutant at the target station at time k. This represents the numerical value of the original data of the i-th pollutant at the target station at time k.

[0155] The correlation coefficients between traffic congestion index sequences from different monitoring stations and pollutant sequences at time k:

[0156] ,

[0157] In the formula, This represents the correlation coefficient at time k, where k takes the value of... , The resolution coefficient is in the range of (0,1) and is often set to 0.5. This represents the initial value of the traffic congestion index for roads near the target station. This indicates finding the minimum difference between the two levels of data in two columns. This indicates finding the maximum difference between the two levels of two columns of data.

[0158] The correlation coefficients obtained at all times were used to calculate the correlation between various traffic-sensitive pollutants and the traffic congestion index. The closer the value is to 1, the higher the degree of correlation.

[0159] ,

[0160] Values This indicates the types of traffic-sensitive pollutants. This represents the correlation coefficient between the i-th pollutant at time n at the target station and the traffic congestion index.

[0161] The spatiotemporal features of single features at multiple stations are extracted by multiplying the information in the column containing the target station in the Laplacian matrix with the air quality input matrix. , , , Meteorological factors, road congestion index, etc. These characteristics, put the above These features are then subjected to the same operations described above, and then linearly concatenated and fused to obtain a spatiotemporal sequence. Ultimately, a spatiotemporal feature matrix fused from multiple sites and features is formed. .

[0162] like Figure 3 As shown, S3: The CNN-BiLSTM hybrid network model is built using the TensorFlow framework. By capturing the spatiotemporal correlation between various features, the problem of inconsistent feature scales in long-term data is solved, and the trend of air quality change is comprehensively depicted.

[0163] Based on the characteristic pollutant data and meteorological factors collected from different monitoring stations, time series data for each station are generated in chronological order. and the traffic congestion index of the corresponding area. .

[0164] ,

[0165] in Representing the Real-time pollutant and meteorological data from all stations. Representing the Traffic congestion index of roads near all stations at any given time.

[0166] ,

[0167] in Representing the monitoring stations Real-time pollutant and meteorological data, Representing the monitoring stations Traffic congestion index at any given time.

[0168] S31: Determine the structure of each layer of the CNN neural network, and compress and extract important features of the input data;

[0169] The essential characteristics of CNNs are local perception and parameter sharing. They consist of convolutional layers, pooling layers, and fully connected layers. They extract spatial features from the original input data, realize high-dimensional feature representation of the original data, and reduce the number of parameters in the neural network computation process.

[0170] Pollutant and meteorological data are transformed into two-dimensional matrices. Each row of the matrix contains traffic-sensitive pollutant information, meteorological information, and traffic congestion index for a station, while each column contains information on a specific pollutant or specific meteorological information. The transformed two-dimensional matrix is ​​input into a CNN, and spatial features of each feature are extracted through convolutional layers. The resulting multiple feature maps are used as input to pooling layers, which output the same number of scaled-down feature maps.

[0171] The CNN convolutional neural network uses one-dimensional convolution and one-dimensional pooling layers. The filter size of the convolutional layer is set to 96, and the activation function is set to ReLU. The convolution operation process is as follows:

[0172] ,

[0173] in, This represents the current training layer number. Represents eigenvalues, For convolution operations, For each layer of convolution kernels, , All are eigenvalue subscripts. This is a bias term.

[0174] The convolutional layer uses one-dimensional convolution, and the number of convolutional kernels is... Size set The convolution kernel performs convolution only along a single temporal direction, with a stride of [value missing]. For each Each time step sequence vector is used for feature extraction to obtain a feature map. After a convolutional kernel extracts all the sequence data of a sample, a feature map will be obtained. Feature diagram of the shape.

[0175] The CNN convolutional layers have a total of There are 10 convolutional kernels, so the final result will be 10 ... Each feature map is processed by convolution followed by max pooling. A flattening layer expands all feature maps into one-dimensional vectors of the same number of elements. These vectors are then decoded by a fully connected layer to obtain the transformed feature values.

[0176] The pooling layer operation process is as follows:

[0177] ,

[0178] in, and These are used as multiplicative and additive biases for the output value, respectively, and down represents the downsampling function;

[0179] Since the data after the pooling layer is two-dimensional and cannot be directly output, a flattening layer is used to flatten the data, expanding all feature maps into the same number of one-dimensional vectors. Then, after decoding by a fully connected layer, the transformed feature values ​​are obtained.

[0180] S32: The sequence after feature extraction is passed down to the BiLSTM layer and input into two LSTM neural networks in forward and reverse order respectively to fully extract the correlation between the features before and after.

[0181] The LSTM unit mainly consists of memory cells, input gates, output gates, and forget gates. The activation function is used to adjust the numerical value, and the output range is between -1 and 1. The input gate is used to control the input information of the neural unit at the current time. The forget gate is used to control the historical information stored in the neural unit at the previous time. The output gate is used to control the output information of the neural unit at the current time.

[0182] The three gates of LSTM are represented as follows:

[0183] ,

[0184] In the formula, For the present Input value at time, , The LSTM layer is respectively and Output at any moment Represents the Gate of Oblivion Indicates the input gate. Indicates the output gate. Represents a memory unit. It is the weight matrix of the gate. It is the gate offset, which can be used to obtain the current... Output of state value at time With updated cell state .

[0185] Bidirectional Long Short-Term Memory (LSTM) networks process sequential data forward and backward using two independent LSTM networks. The forward LSTM processes the sequence from beginning to end, while the backward LSTM processes the sequence from beginning to end. The outputs of the two networks are then concatenated to produce the final prediction.

[0186] ,

[0187] ,

[0188] in, This represents the input at time t. This represents the state value of the cell at time t.

[0189] Finally, output the combined output of the stacked results of the forward and backward network layers.

[0190] ,

[0191] The CNN-BiLSTM network model is constructed by setting the hyperparameters of the input layer, the number of neurons and layers in the hidden layer, and the hyperparameters of the output layer. As input to the model, the model output is the predicted value of the input data at the next time step, denoted as . The calculation formula is as follows:

[0192] ,

[0193] ,

[0194] in, yes The predicted air quality value at a specific station at a given time. Represents the initial memory state and hidden state.

[0195] The settings for the CNN-BiLSTM hybrid model include: 1 convolutional layer, 64 kernels, 128 batch sizes, 100 epochs, and ReLU activation function for the CNN neural network; 128 batch sizes, 100 epochs, 0.5 Dropout, Adam optimization algorithm, and 100 hidden layers for the BiLSTM model; all other parameters are default values.

[0196] S4: Integrate the GCN model and CNN-BiLSTM model using the attention mechanism to capture traffic-sensitive pollutant feature information at key time points, refine the features of different dimensions, and optimize and train the integrated model.

[0197] S41: The outputs of the two models are linearly concatenated to obtain the correlation matrix, and a conditional correlation matrix is ​​generated, ultimately forming a spatiotemporal information matrix of multi-site and multi-feature fusion.

[0198] Conditional association matrix ,in Represents matrix addition.

[0199] Add a joint incidence matrix module to the conditional incidence matrix. , Specific calculation rules:

[0200] ,

[0201] in, Represents matrix multiplication. Indicates that both rows and columns are The identity matrix, the shape of which is determined by the number of features in the input data. Indicates that both rows and columns are The identity matrix, the shape of which is determined by the number of prediction times of the input data.

[0202] like Figure 4 As shown, S42: The correlation matrix between the two models is weighted for each input feature through the attention mechanism to obtain a new output result, and finally the attention weight coefficients corresponding to the hidden layers of the two sub-models are obtained.

[0203] The data from the association matrices of the two models are used to calculate the attention vector of the data at different time points to the predicted value through an attention mechanism. The importance of the data at different time points to the predicted value is determined, and the SoftMax function is used to normalize the data to obtain the weight coefficient matrix of each hidden layer vector.

[0204] The weight training process is as follows:

[0205] ,

[0206] in, for Time of the first Hidden layer vectors, , The first The hidden layer vectors are in and Time-state value, For activation function, , , It is a weight matrix. It is a bias term;

[0207] ,

[0208] for Time of the first The weight coefficient matrix of each hidden layer vector. Represents the last time step The state values ​​of the hidden layer vector.

[0209] The target value depends on the sequence at each time step. Attention vector:

[0210] .

[0211] Softmax() indicates that the normalization operation is performed using the softmax function.

[0212] Multiplying the output values ​​of the two models by their respective attention vectors will yield the weight coefficient distribution matrix of the ensemble model.

[0213] The formulas for calculating the attention weight coefficients of the two models are as follows:

[0214] ,

[0215] ,

[0216] in, , These are the attention weight coefficients for the CNN-BiLSTM hybrid model and the GCN model.

[0217] S43: Combine the obtained weights with the final outputs of each model to obtain the joint expression, which yields the attention vector matrix of the ensemble model;

[0218] The obtained attention weight coefficients are combined with the final outputs of each model to obtain the output expression of the joint ensemble model:

[0219] ,

[0220] in, , This represents the final joint representation obtained by multiplying each model by the attention weight coefficient.

[0221] S5: Using the trained ensemble model, meteorological factors, traffic congestion index and air quality status are used to make a comprehensive prediction of the concentration of characteristic pollutants, and error index is selected to quantitatively analyze the prediction effect of the ensemble model.

[0222] S51: Train two models. The latitude and longitude coordinate distribution information matrix of all stations is used as the input of the GCN model. The characteristic pollutant data and meteorological factor sequence, as well as the traffic congestion index of the corresponding area, are used as the input of the CNN-BiLSTM model to obtain the output of the two models.

[0223] A feature matrix integrating geographical location information of all monitoring stations and historical data of traffic-sensitive pollutants. The output is trained using a graph convolutional neural network. Based on historical data of traffic-sensitive pollutants, meteorological factors, and corresponding traffic congestion index data. The output of the CNN-BiLSTM hybrid neural network model is .

[0224] ,

[0225] S52: The outputs of the two models are learned through an attention mechanism, and the prediction value for the next time step is obtained by ensemble training based on the weight distribution characteristics between the spatiotemporal features of multiple sites.

[0226] Ensemble model training results Predicted value at time .

[0227] ,

[0228] in, Represents the entire ensemble training model. This represents the weight allocation operation.

[0229] S53: By continuously adjusting the integrated model parameters and calculating the loss function, the optimal network structure is finally determined, using MAE and RMSE. As an indicator for evaluating integrated models;

[0230] The goal of ensemble model training is to minimize the loss function so that the model can fit the training data more accurately. The loss function is used to calculate the deviation between the prediction results of the ensemble model and the label results, and then used in the backpropagation process to update the gradient. By continuously training and optimizing the parameters of the ensemble model, the errors output by the two sub-models are combined for learning iteration, with the aim of minimizing the loss function and finally learning the optimal ensemble model structure.

[0231] The characteristic pollutant concentration of each monitoring station was selected as the expected output. Finally, backpropagation was used to update the parameters of both models. The loss function was MSE, the optimizer was Adam, the maximum number of training iterations was set to 2000, and MAE and RMSE were used. This serves as an indicator for model evaluation. Through continuous parameter adjustments, the parameters with the lowest error are ultimately selected as the network parameters for the prediction model.

[0232] In the backpropagation of the ensemble model, the loss function used for training is MSE, and the total error is expressed as:

[0233] ,

[0234] in, This represents the predicted value of the ensemble model at time t. This represents the true value at time t.

[0235] MAE characterizes model accuracy by calculating the average of the absolute errors between the true and predicted values, as shown in the following formula:

[0236] ,

[0237] RSME measures the degree of deviation between predicted and actual values ​​by calculating the square root of the mean of the sum of the squares of the differences between the actual and predicted values. The calculation formula is as follows:

[0238] ,

[0239] The correlation coefficient is used to calculate the degree of correlation between predicted and actual values. The formula is as follows:

[0240] ,

[0241] in, It is the mean value predicted by the ensemble model at time t. It is the mean at time t.

[0242] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. An air quality prediction method based on traffic congestion index and multi-source data fusion, characterized in that: Specifically, the following steps are included: S1: Collect air pollutant and meteorological data from national monitoring stations in the city, add traffic congestion index-related influencing factors, perform preprocessing, and summarize to generate air pollutant information sequences with multi-factor expression and multi-type characteristics; S2: Construct a GCN model, extract spatial correlation features of monitoring stations through custom adjacency relationships, analyze the correlation between traffic-sensitive pollutants and meteorological elements among stations, and map the traffic congestion index within the station coverage area to the pollutant fluctuation trend to achieve traffic congestion index feature fusion. S3: Utilize the TensorFlow framework to build a CNN-BiLSTM hybrid model, which captures the spatiotemporal correlation between various features, solves the problem of inconsistent feature scales in long-term data, and comprehensively depicts the trend of air quality changes. S4: Integrate the GCN model and CNN-BiLSTM model using the attention mechanism to capture pollutant feature information at key time points, refine the features of different dimensions, and optimize and train the integrated model. S5: Using the trained ensemble model, the concentration of characteristic pollutants is comprehensively predicted by meteorological data, traffic congestion index and air quality status, and error index is selected to quantitatively analyze the prediction effect of the ensemble model. Step S2 includes the following steps: S21: Construct a GCN model to extract spatial correlation features of monitoring stations, explore the implicit spatiotemporal relationships between pollutant concentrations at multiple stations, and explain the pollution diffusion and convergence phenomena among monitoring stations; S22: Use Pearson correlation coefficient to perform correlation analysis on traffic-sensitive pollutant and meteorological element data for multiple stations and single stations, and determine the correlation threshold; S23: By matching the coverage of stations with surrounding roads, the traffic congestion index is integrated into the urban road network to quantitatively describe the contribution of traffic congestion events to changes in pollutant concentration. The matching and integration of the traffic congestion index includes using a grey relational model to integrate the traffic congestion index into the pollutant data. Step S4 includes the following steps: S41: Linearly concatenate the outputs of the two models to obtain the correlation matrix, and generate the conditional correlation matrix according to the rules; S42: The correlation matrix uses an attention mechanism to weight all input features one by one to obtain a new output result, and finally obtains the attention weights corresponding to the hidden layers of the two sub-models; S43: Combine the obtained weights with the final output of each model to form the attention vector matrix of the ensemble model.

2. The air quality prediction method based on traffic congestion index and multi-source data fusion according to claim 1, characterized in that: Step S1 includes the following steps: S11: Acquire data on conventional pollutants and meteorological elements from urban air quality monitoring stations, as well as historical data on traffic congestion indices, and collect information on pollution transmission and emergencies to form a multi-source heterogeneous dataset; S12: Based on logical and causal rules, multi-source heterogeneous datasets are split and filtered. Multi-source heterogeneous datasets are divided into two types according to feature attributes and sources: original features and explanations / supplements. S13: Compare and analyze the changing trends of various types of air pollutants, and select the types of pollutants that fluctuate significantly due to traffic congestion as traffic-sensitive pollutants; S14: Preprocess the initially screened data, including missing value imputation, outlier removal, and normalization.

3. The air quality prediction method based on traffic congestion index and multi-source data fusion according to claim 2, characterized in that: Step S14, which involves preprocessing the initially screened data, specifically includes: All missing data are filled with the average value of the corresponding feature. The data is statistically analyzed using a box plot to remove outliers that deviate significantly from the majority of the data. Max-min normalization is then applied, with the normalization range specified as 0 to 1.

4. The air quality prediction method based on traffic congestion index and multi-source data fusion according to claim 1, characterized in that: Step S21, which involves constructing the GCN model, includes describing the topology between monitoring stations and generating a feature matrix containing information about the corresponding stations, as detailed below: Based on the geographical location information of each station, construct a topology graph G of the environmental monitoring stations in the city where the target station is located, calculate the correlation degree between all stations, and store it in the adjacency matrix A; Topology diagram : This diagram describes the topology between multiple city monitoring stations; each node represents an environmental monitoring station. Represents the set of all stations in the city. , It is represented as a set of edges between monitoring stations. This represents the total number of monitoring stations; The weight of the edge connecting the nodes is represented by the reciprocal of the distance between the two stations and stored in the adjacency matrix A; A feature matrix was constructed based on air quality data from urban environmental monitoring stations at different times. ,in It represents the quantity of node attributes, and the feature matrix stores the information of each node in the topology graph; By aggregating and transforming the features of all adjacent nodes through custom association rules, the optimal combination of features of adjacent nodes can be obtained, that is, the spatial relationship between sites can be extracted.

5. The air quality prediction method based on traffic congestion index and multi-source data fusion according to claim 4, characterized in that: The matching and fusion of traffic congestion indices in step S23 includes using a grey relational model to fuse the traffic congestion indices into the pollutant data, as detailed below: The original data in the dataset is initialized and the dimensions are eliminated. Then, the absolute difference, the minimum difference and the maximum difference between the station pollutant series and the traffic congestion index series at each time point are calculated. , Let be the initial value of the i-th pollutant at the target station at time k. This represents the numerical value of the raw data of the i-th pollutant at the target station at time k; The correlation coefficients between traffic congestion index sequences from different monitoring stations and pollutant sequences at time k: , In the formula, This represents the correlation coefficient at time k, where k takes the value of... , The resolution coefficient is in the range (0,1). This represents the initial value of the traffic congestion index for roads near the target station. This indicates finding the minimum difference between the two levels of data in two columns. This indicates finding the maximum difference between the two levels of data in two columns; The correlation coefficients obtained at all times were used to calculate the correlation between various pollutants and the traffic congestion index. : , Values This indicates the types of traffic-sensitive pollutants. This represents the correlation coefficient between the i-th pollutant at time n at the target station and the traffic congestion index.

6. The air quality prediction method based on traffic congestion index and multi-source data fusion according to claim 4, characterized in that: Step S3 includes the following steps: S31: Determine the structure of each layer of the CNN neural network, and compress and extract important features of the input data; CNN convolutional layers use one-dimensional convolution for feature extraction, followed by max pooling, and then decoding through fully connected layers to output the transformed feature values. S32: The sequence after feature extraction is passed down to the BiLSTM layer, and then input into two LSTM neural networks in forward and reverse order respectively to fully extract the correlation between the features.

7. The air quality prediction method based on traffic congestion index and multi-source data fusion according to claim 1, characterized in that: The model attention weight calculation in step S42: The data from the association matrices of the two models are used to calculate the attention vector of the data at different time points to the predicted value through an attention mechanism, determining the importance of the data at different time points to the predicted value. The SoftMax function is then used to normalize the data to obtain the weight coefficient matrix of each hidden layer vector. , in, for Time of the first Hidden layer vectors, , The first The hidden layer vectors are in and Time-state value, For activation function, , , It is a weight matrix. It is a bias term; , for Time of the first The weight coefficient matrix of each hidden layer vector. Represents the last time step The state values ​​of the hidden layer vectors; The target value depends on the sequence at each time step. Attention vector: , Softmax() indicates that the normalization operation is performed using the softmax function.

8. The air quality prediction method based on traffic congestion index and multi-source data fusion according to claim 7, characterized in that: Step S5 includes the following steps: S51: Train two models. Use the multi-site geographic location distribution information matrix as the input of the GCN model, and use the traffic-sensitive pollutant data, meteorological factor sequence, and regional traffic congestion index as the input of the CNN-BiLSTM model to obtain the output of the two models. S52: The outputs of the two models are learned through an attention mechanism, and the prediction value for the next time step is obtained by integrating and training based on the weight distribution characteristics between the spatiotemporal features of multiple sites. S53: By continuously adjusting the integrated model parameters and calculating the loss function, the optimal network structure is finally determined, using MAE, RMSE, and other metrics. As an indicator for evaluating integrated models; The characteristic pollutant concentration of each monitoring station was selected as the expected output. Finally, backpropagation was used to update the parameters of both models. RMSE was used as the loss function, Adam as the optimizer, and the maximum number of training iterations was set to 2000. MAE and RMSE were used. As an indicator for model evaluation, the parameters with the lowest error are ultimately selected as the network parameters of the prediction model through continuous parameter adjustments.