Air quality prediction method and device based on time-space fusion graph
By constructing a spatiotemporal fusion graph and performing matrix multiplication operations in a spatiotemporal fusion convolution network, the problem of limited air quality prediction accuracy in the prior art is solved, and more efficient spatiotemporal feature capture and air quality prediction are achieved.
Patent Information
- Application Number
- CN202210052599.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-18
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2042-01-18
AI Technical Summary
Existing air quality prediction methods cannot effectively capture the complex space-time dependence of air quality, resulting in limited prediction accuracy.
The prediction method based on the space-time fusion graph is adopted, and the space-time fusion graph is constructed, combined with historical air quality and meteorological data, and the space-time fusion feature extraction is used to use matrix multiplication, and convolution operations are performed in the space-time fusion convolution network to capture the space-time features.
Improves the accuracy and reliability of air quality prediction, which can better handle complex evolution of air quality, simplify operations and save time.
Smart Images

Figure CN114462572B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of air quality prediction, and in particular to an air quality prediction method and device based on a spatiotemporal fusion graph. The present invention is data-driven and uses historical air quality, meteorological data and spatial data to predict future air quality. A new spatiotemporal fusion graph neural network (STFGNN) framework is used to capture local and global complex spatiotemporal dependencies. Background Art
[0002] In recent years, people have paid more and more attention to air quality due to health problems caused by serious air pollution. Many monitoring stations have been set up in cities to inform people of air pollution, such as PM2s, PM1o, and SO. But real-time information cannot meet people's needs. Just like weather forecasts, people also desire air quality forecasts to plan their activities in advance and take protective measures.
[0003] The goal of air quality prediction is to predict the future air quality conditions at a specified location based on existing data, such as historical air quality and meteorological data. Many methods have been proposed to predict air quality: in previous studies, some people first built prediction models based on empirical assumptions, such as the diffusion model of air pollution; then, some people applied machine learning methods such as linear regression and neural networks based on big data. But all these prediction models are one-sided. None of them incorporates the statistical relationship of the diffusion characteristics of atmospheric pollution. Therefore, they cannot handle the complex evolution of air quality and have limited prediction accuracy. Summary of the invention
[0004] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide an air quality prediction method and device based on a spatiotemporal fusion graph, which uses spatial data, historical air quality and weather data to predict future air quality, finds sites with the most similar data patterns to construct a time subgraph, and constructs a spatial subgraph and a time connection subgraph with reference to the geographical location relationship and temporal autocorrelation between the sites. Multiple subgraphs are arranged in a specific spatiotemporal fusion graph, and convolution operations are performed on the subgraph to achieve the purpose of capturing spatiotemporal features. The operation is simple and time-saving.
[0005] The purpose of the present invention can be achieved by the following technical solutions:
[0006] An air quality prediction method based on a spatiotemporal fusion graph comprises the following steps:
[0007] S1. Obtain the latitude and longitude information of the test point and surrounding sites, obtain the historical time series data of the test point and surrounding sites, the historical time series data includes air quality data and weather data, and construct a training set;
[0008] S2. Construct a prediction model, which includes a gated convolutional network, a spatiotemporal fusion convolutional network and a temporal convolutional network. The prediction model is trained using a training set. In the spatiotemporal fusion convolutional network, matrix multiplication is used instead of a regular spectral filter to extract spatiotemporal fusion features, specifically:
[0009] A spatial graph is constructed based on the spatial distance between each station, a time graph is constructed based on the similarity of the meteorological data of each station, a unit matrix is constructed as a time connection graph, and the time graph, the spatial graph and the time connection graph are spliced to obtain a spatiotemporal fusion graph. The four vertex positions of the spatiotemporal fusion graph are the time graph, the diagonal position is the spatial graph, and the remaining positions are the time connection graph. The input data sent to the spatiotemporal fusion convolutional network is calculated with the spatiotemporal fusion graph to obtain the spatiotemporal fusion features;
[0010] S3. Predict the air quality of the test point using the trained prediction model.
[0011] The structures of the gated convolutional network, the spatiotemporal fusion convolutional network and the temporal convolutional network are all existing deep learning network structures. In the present invention, the three are integrated to predict air quality based on time and space characteristics. Moreover, in general designs, the spatiotemporal fusion convolutional network uses regular spectral filters such as Laplace to convolve in the graph. The present invention uses matrix multiplication to perform spatiotemporal fusion, which is simpler to operate and saves more time.
[0012] Furthermore, the total number of the test point and the surrounding stations is N, and an N×N all-zero matrix is initialized as the first time matrix A dtw and the second time matrix A cor , the time graph is constructed as follows:
[0013] According to the historical time series data of the test point and surrounding sites, the fast-dtw algorithm is used to calculate the similarity between each site and the remaining N-1 sites. For each site, the k1 sites with the highest similarity are selected as the similar sites of the site, and the site is associated with its similar sites. The first time matrix A dtw The corresponding element value in is updated to 1, and k1 is the preset first time association threshold;
[0014] According to the historical time series data of the test point and the surrounding stations, the correlation between each station and the remaining N-1 stations is calculated using the Pearson correlation coefficient method. For each station, the k2 stations with the highest correlation are selected as the related stations of the station, and the station is associated with its related stations. The second time matrix A cor The corresponding element value in is updated to 1, and k2 is a preset second time association threshold;
[0015] First time matrix A dtwWith the second time matrix A cor Logical addition to get time diagram A TG , time map A TG The element value in is A dtw and A cor The result is obtained by performing an OR operation on the corresponding elements in .
[0016] Furthermore, the total number of the test points and surrounding sites is N, and an N×N all-zero matrix is initialized as the spatial matrix. The spatial graph is constructed as follows:
[0017] The distance between each station and the remaining N-1 stations is calculated based on the longitude and latitude information. For each station, the k3 stations closest to it are selected as the neighboring stations of the station. The station and its neighboring stations are associated together, and the corresponding element value in the spatial matrix is updated to 1, and the spatial map A is obtained. SG , where k3 is the preset spatial correlation threshold.
[0018] Furthermore, the total number of the test points and surrounding stations is N, the spatiotemporal fusion graph is a level l fusion graph, and an Nl×Nl all-zero matrix A is initialized. STFG , divide the all-zero matrix into l×l units, each unit is of size N×N, fill the 4 units at the top position with the time map, fill the l-2 units at the diagonal position with the spatial map, and fill the l×l-6 units at the remaining positions with the time connection map.
[0019] Furthermore, in step S1, the longitude and latitude information of the point to be measured is obtained based on the city / county granularity and the geographical location, and the cities / counties in the province where the point to be measured is located and its neighboring provinces are used as surrounding stations to obtain the longitude and latitude information of each surrounding station.
[0020] Furthermore, in step S1, historical time series data of the point to be measured and surrounding sites within a continuous period are obtained, and the time series data are collected at an hourly granularity.
[0021] Furthermore, the training set is constructed as follows: the time series data of the test point and each surrounding station for p1 consecutive hours in the time period [a~b] is used as the sample, and the time series data of the test point for p2 consecutive hours in the time period [b~c] is used as the predicted value corresponding to the sample, and p2 is much smaller than p1.
[0022] Furthermore, the prediction model includes a first fully connected layer FCL, a second fully connected layer FCL, a third fully connected layer FCL, a gated convolutional network Gated-CNN, a spatiotemporal fusion convolutional network STFGN and a temporal convolutional network TCN; the input data is sent to the first fully connected layer FCL, and the output of the first fully connected layer FCL is sent to the gated convolutional network Gated-CNN, the spatiotemporal fusion convolutional network STFGN and the temporal convolutional network TCN in three ways, the outputs of the gated convolutional network Gated-CNN and the spatiotemporal fusion convolutional network STFGN are sent to the second fully connected layer FCL after performing a matrix bitwise addition operation, the output of the temporal convolutional network TCN and the output of the second fully connected layer FCL are sent to the third fully connected layer FCL together, and the output of the third fully connected layer FCL is the predicted value of the air quality of the point to be measured.
[0023] Furthermore, there are multiple spatiotemporal fusion convolutional networks (STFGNs).
[0024] An air quality prediction device based on spatiotemporal synchronous graph convolution includes a memory and a processor and a program executed by the processor. When the processor executes the program, the air quality prediction method based on the spatiotemporal fusion graph is implemented.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] (1) A data-driven adaptive spatiotemporal graph construction method is proposed. This method is mainly based on the historical time series data of each site. The Fast-DTW algorithm and Pearson correlation coefficient are used to find the site with the most similar data pattern to construct a time subgraph. At the same time, the geographical location relationship and temporal autocorrelation between sites are also referred to to construct a spatial subgraph and a temporal connection subgraph. Multiple subgraphs are arranged in a specific manner to form a spatiotemporal fusion graph, which retains the hidden spatiotemporal dependencies. The convolutional network (STFGN) is used to perform convolution operations on the subgraph to achieve the purpose of capturing spatiotemporal features.
[0027] (2) A prediction model of a hybrid gated convolutional network, a spatiotemporal fusion convolutional network, and a temporal convolutional network is proposed. The introduction of the spatiotemporal fusion convolutional network (STFGN) enables the prediction model to well extract the hidden spatiotemporal correlations in the matrix. At the same time, the introduction of the gated convolutional network (Gated-CNN) can better capture the spatiotemporal dependencies between long-distance nodes. The TCN network is introduced to improve the air quality prediction accuracy of edge stations in the absence of spatial features.
[0028] (3) By constructing the spatiotemporal fusion graph, matrix multiplication is used in the spatiotemporal fusion convolutional network to perform spatiotemporal fusion, which makes the operation simpler and saves more time. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is a flow chart of the present invention;
[0030] Figure 2 It is the structural diagram of the prediction model;
[0031] Figure 3 It is a combined schematic diagram of the space-time fusion diagram;
[0032] Figure 4 Schematic diagram of experimental evaluation of the present invention. DETAILED DESCRIPTION
[0033] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0034] In the drawings, components with the same structure are indicated by the same numerical labels, and components with similar structures or functions are indicated by similar numerical labels. The size and thickness of each component shown in the drawings are arbitrarily shown, and the present invention does not limit the size and thickness of each component. In order to make the illustration clearer, some parts in the drawings are appropriately exaggerated.
[0035] Embodiment 1:
[0036] An air quality prediction method based on spatiotemporal fusion graph, such as Figure 1 As shown, the following steps are included:
[0037] S1. Obtain the latitude and longitude information of the test point and surrounding stations, obtain the historical time series data of the test point and surrounding stations, the historical time series data includes air quality data and weather data, and construct a training set;
[0038] Specifically, with the city / county as the granularity and the geographic location, the latitude and longitude information of the point to be tested is obtained, and the cities / counties in the province where the point to be tested is located and its neighboring provinces are used as surrounding stations to obtain the latitude and longitude information of each surrounding station. The historical time series data of the point to be tested and the surrounding stations in the continuous period are obtained, and the time series data is collected with the hourly granularity; the training set is constructed, and the time series data of the point to be tested and the surrounding stations in the time period [a~b] for p1 consecutive hours is used as the sample, and the time series data of the point to be tested in the time period [b~c] for p2 consecutive hours is used as the sample corresponding to the predicted value, and p2 is much smaller than p1.
[0039] In this embodiment, taking Huanggang City, Hubei Province as an example, 683 county / city names and their longitude and latitude information of Hubei Province and surrounding Anhui Province, Shaanxi Province, Jiangxi Province, Hunan Province, and Henan Province are extracted according to the map of China, and the longitude and latitude information set GE = {g1, g2, ..., g G},in lon is the actual geographical longitude, lat is the actual geographical latitude;
[0040] The JSOUP crawler technology is used to crawl the historical air quality and weather data of 683 required geographical locations on the weather website at an hourly granularity. p1 is set to 31×24=744, and p2 is set to 24. That is, the historical time series data of 683 locations for one consecutive month is used to predict the 24-hour air quality in Huanggang.
[0041] S2. Construct a prediction model, which includes a gated convolutional network, a spatiotemporal fusion convolutional network, and a temporal convolutional network. Use the training set to train the prediction model. In the spatiotemporal fusion convolutional network, matrix multiplication is used instead of the regular spectral filter to extract spatiotemporal fusion features. Specifically:
[0042] (1) Figure 2 As shown in the figure, the prediction model includes the first fully connected layer FCL, the second fully connected layer FCL, the third fully connected layer FCL, the gated convolution network Gated-CNN, the spatiotemporal fusion convolution network STFGN and the temporal convolution network TCN; the input data is sent to the first fully connected layer FCL, the output of the first fully connected layer FCL is sent to the gated convolution network Gated-CNN, the spatiotemporal fusion convolution network STFGN and the temporal convolution network TCN in three ways, the output of the gated convolution network Gated-CNN and the spatiotemporal fusion convolution network STFGN is sent to the second fully connected layer FCL after performing the matrix bitwise addition operation, the output of the temporal convolution network TCN and the output of the second fully connected layer FCL are sent to the third fully connected layer FCL together, and the output of the third fully connected layer FCL is the air quality prediction value of the test point. There are multiple spatiotemporal fusion convolution networks STFGN, so that the aggregation area is expanded by stacking multiple graph convolution operations.
[0043] The structures of the gated convolutional network, the spatiotemporal fusion convolutional network and the temporal convolutional network are all existing deep learning network structures. In the present invention, the three are integrated to predict air quality based on time and space characteristics. Moreover, in general designs, the spatiotemporal fusion convolutional network uses regular spectral filters such as Laplace to convolve in the graph. The present invention uses matrix multiplication to perform convolution operations to achieve spatiotemporal fusion, which is simpler to operate and saves more time.
[0044] (2) A spatial graph is constructed based on the spatial distance between each station, and a temporal graph is constructed based on the similarity of the meteorological data of each station. A unit matrix is constructed as a temporal connection graph, and the temporal graph, spatial graph, and temporal connection graph are concatenated to obtain a spatiotemporal fusion graph. The four vertices of the spatiotemporal fusion graph are the temporal graph, the diagonal position is the spatial graph, and the remaining positions are the temporal connection graph. The input data sent to the spatiotemporal fusion convolutional network is calculated with the spatiotemporal fusion graph to obtain the spatiotemporal fusion features. Specifically:
[0045] 21) The total number of the test point and the surrounding stations is N. In this embodiment, N is 683. A 683×683 all-zero matrix is initialized as the first time matrix A. dtw and the second time matrix A cor , the time graph is constructed as follows:
[0046] According to the historical time series data of the test point and surrounding sites, the fast-dtw algorithm is used to calculate the similarity between each site and the remaining 682 sites. For each site, the k1 sites with the highest similarity are selected as the similar sites of the site, and the site is associated with its similar sites. The first time matrix A dtw The corresponding element value in is updated to 1, k1 is the preset first time correlation threshold, and the value of k1 can be determined through repeated trials and debugging, such as 10, 15, etc.; according to the historical time series data of the test point and the surrounding stations, the Pearson correlation coefficient method is used to calculate the correlation between each station and the remaining 682 stations. For each station, the k2 stations with the highest correlation are selected as the related stations of the station, and the station is associated with its related stations. The second time matrix A cor The corresponding element value in is updated to 1, k2 is the preset second time correlation threshold, and the value of k2 can be determined through repeated trials and debugging, such as 16, 18, etc.; the first time matrix A dtw With the second time matrix A cor Logical addition to get time diagram A TG , time map A TG The element value in is A dtw and A cor The result is obtained by performing an OR operation on the corresponding elements in .
[0047] Taking the site Xinyang as an example, the similarity between Xinyang and the remaining 682 sites is calculated, and the 18 sites with the highest similarity are selected as similar sites of Xinyang. Xinyang is associated with these 18 sites. After completing the similarity calculation and association of all sites, A is obtained. dtw Similarly, the correlation between Xinyang and the remaining 682 sites is calculated, and the 21 sites with the highest correlation are selected as the related sites of Xinyang. Xinyang is associated with these 21 sites. After the correlation calculation and association of all sites are completed, A is obtained. cor Finally, just add A dtw and A cor The corresponding elements of A can be obtained by bitwise OR operation. dtw and A cor Generate time graph A TG .
[0048] 22) The total number of the test point and the surrounding sites is N. In this embodiment, N is 683. A 683×683 all-zero matrix is initialized as the space matrix. The space map is constructed as follows:
[0049] The distance between each station and the other 682 stations is calculated based on the longitude and latitude information. For each station, the k3 stations closest to it are selected as the neighboring stations of the station. The station and its neighboring stations are associated together, and the corresponding element value in the spatial matrix is updated to 1, and the spatial map A is obtained. SG , where k3 is a preset spatial correlation threshold, and the value of k3 can be determined through repeated trials and debugging, such as 20, 21, etc.
[0050] Taking the site Hefei as an example, the distance between Hefei and the other 682 sites (the actual spatial distance calculated by longitude and latitude) is calculated, and the nearest 20 sites are selected as the adjacent sites of Hefei. Hefei is associated with these 20 sites. After completing the distance calculation and association of all sites, the spatial map A is obtained. SG .
[0051] 23) Construct the identity matrix as the time connection graph A TC .
[0052] Essentially, the time graph A TG 、Space diagram A SG 、Time connection diagram A TC Both are 683×683 matrices. The elements in the matrix represent the correlation between two sites. Time map A TG 、Space diagram A SG The value of an element in the graph is 1, which means that the two sites corresponding to the element are associated. TC The diagonal elements are 1, which indicates their own correlation.
[0053] 24) The total number of the test points and surrounding stations is N, N is 683, the spatiotemporal fusion map is a level l fusion map, l can be 3, 4, 5..., initialize an Nl×Nl all-zero matrix A STFG , divide the all-zero matrix into l×l units, each unit is of size N×N, fill the 4 units at the top position with the time map, fill the l-2 units at the diagonal position with the spatial map, and fill the l×l-6 units at the remaining positions with the time connection map.
[0054] In this embodiment, l is 4, and the splicing time map A TG 、Space diagram A SG 、Time connection diagram A TC The obtained spatiotemporal fusion map A STFG like Figure 3 shown.
[0055] The data-driven adaptive spatiotemporal fusion graph starts from the historical data of the site, constructs a time graph by calculating the Peason correlation coefficient and Fast-DTW similarity between the sites, constructs a spatial graph and a temporal connection graph according to the geographical location relationship and temporal autocorrelation between the sites, and splices and combines them into a spatiotemporal fusion graph according to specific combination rules, so as to achieve the purpose of simultaneously capturing the temporal and spatial characteristics between the data.
[0056] Space-time fusion map A STFG It is essentially a matrix, which contains temporal features, spatial features and its own features. The essence of a picture is a pixel matrix. The input data to the prediction model is a sample, which is in the format of a 683×744 matrix. The element size in the matrix is H, where H is the dimension of air quality and weather data. This application uses the graph convolution method to combine the input data with the spatiotemporal fusion graph A. STFG To perform operations, we introduce the spatiotemporal fusion convolutional network (STFGN) to perform multiple matrix multiplications, residual connections, and maximum pooling operations on the matrix, so that the prediction model can well extract the hidden spatiotemporal correlations in the matrix. At the same time, in order to better capture the spatiotemporal dependencies between long-distance nodes, we introduce the gated convolutional network (Gated-CNN), which can simultaneously capture local and global associations, and long-term spatiotemporal dependencies can also be extracted through stacking.
[0057] The traditional spatiotemporal graph convolutional network is used to predict air quality on the collected data set. Through the analysis of the prediction results, it is found that the traditional spatiotemporal graph convolutional network relies heavily on the spatiotemporal characteristics between sites in the prediction of spatiotemporal data. For sites that have insufficient spatial features in the data set, the performance of the spatiotemporal graph convolutional network is even worse than the traditional time series prediction convolutional network. Therefore, considering the insufficient prediction ability of the spatiotemporal graph convolutional network at edge sites, this application proposes a hybrid model STSGNN-TCN based on the spatiotemporal fusion graph convolutional network and the time series convolutional network, and introduces the time series convolutional network TCN. This model can focus on the time features captured by the TCN network to predict air quality at the edge site, expand the receptive domain, and can simultaneously learn local spatiotemporal heterogeneity and global spatiotemporal homogeneity, thereby greatly improving the prediction accuracy of the model for edge sites.
[0058] S3. The air quality of the test point is predicted by the trained prediction model. In this embodiment, the air quality of 24 hours is predicted with the historical time series data of one month. Therefore, the air quality of Huanggang in the next 24 hours can be obtained by inputting the historical time series data of 683 places in the past 31 days into the prediction model.
[0059] This application experiments the STFGNN-TCN model with the traditional spatiotemporal graph models LSTM-FC, STSGCN, and STFGNN on the data set. The experiment proves that the prediction model STFGNN-TCN of this application achieves higher accuracy in the task of air quality prediction. Figure 4 As shown, in the experimental evaluation part, this application selects several of the most widely used spatiotemporal graph prediction models LSTM-FC, STSGCN, STFGNN and the model of this application STFGNN-TCN to conduct experiments on the same data set. The experimental results show that the STFGNN-TCN model has higher accuracy. In the air quality prediction task within 6 hours, the mean absolute error is reduced by at least 0.65, and the root mean square error is reduced by at least 1.17. In the air quality prediction task within 24 hours, the mean absolute error is reduced by at least 2.23, and the root mean square error is reduced by at least 3.09.
[0060] The present application also protects an air quality prediction device based on spatiotemporal synchronous graph convolution, including a memory and a processor and a program executed by the processor. When the processor executes the program, the above-mentioned air quality prediction method based on spatiotemporal fusion graph is implemented.
[0061] In the present invention, the inventors have taken into account that the spatial characteristics of air quality cannot simply be based on the geographical location between sites as a reference. Similar terrain environments and meteorological conditions will also make the air quality performance patterns of two sites that are far apart in geographical location more similar. Therefore, this application proposes a data-driven adaptive spatiotemporal graph construction method, which is mainly based on the historical time series data (air quality and weather) of each site. The method uses the Fast-DTW algorithm and the Pearson correlation coefficient to find the site with the most similar data pattern to construct a time subgraph. At the same time, it also refers to the geographical location relationship and time autocorrelation between sites to construct a spatial subgraph and a time connection subgraph. Multiple subgraphs are arranged in a specific spatiotemporal fusion graph, which retains the hidden spatiotemporal dependencies. The graph convolution module is used to perform convolution operations on the subgraph to achieve the purpose of capturing spatiotemporal features.
[0062] In the present invention, the inventors took into account the problem of insufficient prediction ability of edge nodes and proposed a hybrid model STSGNN-TCN based on spatiotemporal fusion graph convolutional network and temporal convolutional network, and introduced the temporal convolutional network TCN. This model can focus on predicting air quality at edge sites by using the time features captured by the TCN network, thereby greatly improving the prediction accuracy of the model for edge sites.
[0063] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. An air quality prediction method based on spatiotemporal fusion graph, characterized in that: The following steps are involved: S1. Obtain the latitude and longitude information of the test point and surrounding sites, obtain the historical time series data of the test point and surrounding sites, the historical time series data includes air quality data and weather data, and construct a training set; S2. Construct a prediction model, which includes a gated convolutional network, a spatiotemporal fusion convolutional network and a temporal convolutional network. The prediction model is trained using a training set. In the spatiotemporal fusion convolutional network, matrix multiplication is used instead of a regular spectral filter to extract spatiotemporal fusion features, specifically: A spatial graph is constructed based on the spatial distance between each station, a time graph is constructed based on the similarity of the meteorological data of each station, a unit matrix is constructed as a time connection graph, and the time graph, the spatial graph and the time connection graph are spliced to obtain a spatiotemporal fusion graph. The four vertex positions of the spatiotemporal fusion graph are the time graph, the diagonal position is the spatial graph, and the remaining positions are the time connection graph. The input data sent to the spatiotemporal fusion convolutional network is calculated with the spatiotemporal fusion graph to obtain the spatiotemporal fusion features; S3, predicting the air quality of the test point through the trained prediction model; The total number of the test point and surrounding stations is N, and the N×N all-zero matrix is initialized as the first time matrix A dtw and the second time matrix A cor , the time graph is constructed as follows: According to the historical time series data of the test point and surrounding sites, the fast-dtw algorithm is used to calculate the similarity between each site and the remaining N-1 sites. For each site, the k1 sites with the highest similarity are selected as the similar sites of the site, and the site is associated with its similar sites. The first time matrix A dtw The corresponding element value in is updated to 1, and k1 is the preset first time association threshold; According to the historical time series data of the test point and the surrounding stations, the correlation between each station and the remaining N-1 stations is calculated using the Pearson correlation coefficient method. For each station, the k2 stations with the highest correlation are selected as the related stations of the station, and the station is associated with its related stations. The second time matrix A cor The corresponding element value in is updated to 1, and k2 is a preset second time association threshold; First time matrix A dtw With the second time matrix A cor Logical addition to get time diagram A TG , time map A TG The element value in is A dtw and A cor The corresponding elements in are obtained by OR operation; The total number of the test points and surrounding stations is N. The N×N all-zero matrix is initialized as the spatial matrix. The spatial map is constructed as follows: The distance between each station and the remaining N-1 stations is calculated based on the longitude and latitude information. For each station, the k3 stations closest to it are selected as the neighboring stations of the station. The station and its neighboring stations are associated together, and the corresponding element value in the spatial matrix is updated to 1, and the spatial map A is obtained. SG , where k3 is the preset spatial correlation threshold.
2. The air quality prediction method based on the spatiotemporal fusion graph according to claim 1 is characterized in that: The total number of the test points and surrounding stations is N, the spatiotemporal fusion graph is a level l fusion graph, and an Nl×Nl all-zero matrix A is initialized. STFG , divide the all-zero matrix into l×l units, each unit is of size N×N, fill the 4 units at the top position with the time map, fill the l-2 units at the diagonal position with the spatial map, and fill the l×l-6 units at the remaining positions with the time connection map.
3. The air quality prediction method based on the spatiotemporal fusion graph according to claim 1 is characterized in that: In step S1, the latitude and longitude information of the test point is obtained based on the city / county granularity and the geographical location, and the latitude and longitude information of each surrounding station is obtained based on the city / county in the province where the test point is located and the cities / counties in the neighboring provinces.
4. The air quality prediction method based on spatiotemporal fusion graph according to claim 1 is characterized in that: In step S1, historical time series data of the test point and surrounding sites within a continuous period are obtained, and the time series data are collected at an hourly granularity.
5. The air quality prediction method based on spatiotemporal fusion graph according to claim 1 is characterized in that: The specific steps of constructing the training set are as follows: the time series data of the test point and its surrounding stations for p1 consecutive hours in the time period [a~b] are used as samples, and the time series data of the test point for p2 consecutive hours in the time period [b~c] are used as the predicted values corresponding to the samples, and p2 is much smaller than p1.
6. The air quality prediction method based on spatiotemporal fusion graph according to claim 1, characterized in that: The prediction model includes a first fully connected layer FCL, a second fully connected layer FCL, a third fully connected layer FCL, a gated convolutional network Gated-CNN, a spatiotemporal fusion convolutional network STFGN and a temporal convolutional network TCN; input data is sent to the first fully connected layer FCL, and the output of the first fully connected layer FCL is sent to the gated convolutional network Gated-CNN, the spatiotemporal fusion convolutional network STFGN and the temporal convolutional network TCN in three ways; the outputs of the gated convolutional network Gated-CNN and the spatiotemporal fusion convolutional network STFGN are sent to the second fully connected layer FCL after performing a matrix bitwise addition operation; the output of the temporal convolutional network TCN and the output of the second fully connected layer FCL are sent to the third fully connected layer FCL together; the output of the third fully connected layer FCL is the air quality prediction value of the point to be measured.
7. The air quality prediction method based on spatiotemporal fusion graph according to claim 6 is characterized in that: The number of the spatiotemporal fusion convolutional networks STFGN is multiple.
8. An air quality prediction device based on a spatiotemporal fusion graph, comprising a memory and a processor and a program executed by the processor, characterized in that: When the processor executes the program, the air quality prediction method based on the spatiotemporal fusion graph as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Air quality prediction method based on depth space-time similarity
CN113077097A