Search

CN-122020036-A - Multi-element air quality prediction method based on ST-PatchTST network

CN122020036ACN 122020036 ACN122020036 ACN 122020036ACN-122020036-A

Abstract

The invention discloses a multi-element air quality prediction method based on an ST-PatchTST network. The method comprises the steps of calculating comprehensive correlation coefficients of multi-element features between a target site and other sites, screening key associated sites according to a threshold value to form an input feature set, carrying out feature fusion and channel transformation of space dimensions on multi-site input by using a 1X 1 convolution layer, compressing high-dimensional space information into a two-dimensional feature sequence, regarding the fused multi-variable sequence as a plurality of independent single-variable time sequences, respectively carrying out time blocking processing to form a time block sequence, adopting a channel independent strategy, inputting all the single-variable time block sequences into a transform encoder sharing weights, extracting time sequence features by using an attention mechanism, and outputting predicted values of all air quality indexes in future time periods in parallel. The method effectively integrates the space-time double dependence of the air quality data, has long sequence modeling capability and high calculation efficiency, and remarkably improves the accuracy and practicality of multi-element air quality prediction.

Inventors

  • Ling Yongfa
  • JIANG HONGXING
  • JIAN BIJIAN

Assignees

  • 桂林电子科技大学

Dates

Publication Date
20260512
Application Date
20260123

Claims (9)

  1. 1. A multi-element air quality prediction method based on an ST-PatchTST network is characterized by comprising the following steps of S1, site screening: The method comprises the steps of obtaining multi-element historical air quality data of a target site and other monitoring sites, respectively calculating comprehensive correlation coefficients between the target site and other sites, setting a correlation threshold value, taking site data with the comprehensive correlation coefficients larger than the threshold value as an input feature set, and fusing spatial features, wherein the S2 is as follows: The method comprises the steps of carrying out convolution fusion and channel transformation of space dimension on an input feature set, wherein the convolution fusion is realized through at least two layers of 1 multiplied by 1 convolutions, and comprises primary channel expansion and primary channel compression, outputting a fused two-dimensional feature sequence, and S3, carrying out time blocking treatment: The method comprises the steps of (1) regarding the fused characteristic sequences as a plurality of independent univariate time sequences, performing time blocking operation on each univariate time sequence, dividing each univariate time sequence into continuous time block sequences, and carrying out independent prediction on channels, wherein the step (S4) comprises the steps of: And respectively inputting each univariate time block sequence into a transducer encoder, wherein all channels share the same group of transducer model parameters, extracting time sequence characteristics through an attention mechanism, and outputting predicted values of the characteristics in future time periods.
  2. 2. The method for predicting multi-element air quality based on ST-PatchTST network as set forth in claim 1, wherein in S1, the calculation of the comprehensive correlation coefficient includes the sub-steps of S1-1, single-feature time series correlation calculation: For the target site and each other site, on each air quality characteristic dimension, respectively calculating the correlation between the corresponding characteristic time sequences, and describing the degree of the correlation between the target site and the kth site on the ith characteristic by adopting a pearson correlation coefficient S1-2, multi-feature correlation weighted fusion: correlation coefficients of the target site and other sites in each single characteristic dimension are calculated according to preset characteristic weights Weighting and fusing to obtain comprehensive correlation coefficient between target site and other sites S1-3, screening relevant sites: by setting a correlation threshold To screen out site data having relatively high influence on the target site As the input feature set.
  3. 3. The ST-PatchTST network-based multi-element air quality prediction method according to claim 1, wherein in S2, the spatial feature fusion is specifically: for input features containing multiple site data The method comprises the steps of firstly regarding a first characteristic value of the multi-channel data at a first time step as multi-channel data, wherein the number of channels is equal to the number of screened stations, performing channel expansion on the multi-channel data by using a plurality of 1X 1 convolution checks, performing channel compression on the expanded data by using a 1X 1 convolution check, and finally aggregating multi-site input data into a two-dimensional characteristic vector so as to adapt to the input of a subsequent PatchTST network.
  4. 4. The ST-PatchTST network-based multi-element air quality prediction method according to claim 1, wherein in S3, the time slicing operation is specifically: for each sequence of univariates considered independent Setting a time block length P and a step length S, and partitioning the sequence to generate a time block sequence Where N is the number of time blocks.
  5. 5. The ST-PatchTST network-based multi-element air quality prediction method according to claim 1 or 4, wherein in S3, before the time-slicing operation, further comprising the step of filling S last values at the end of the univariate time-series to ensure that the sliced sequence contains all sequence information.
  6. 6. The method for predicting multi-element air quality based on ST-PatchTST network as set forth in claim 1, wherein in S4, the channel independent prediction specifically includes the following substeps S4-1, linear projection and position coding: By a trainable linear projection matrix Sequence time blocks Projection into hidden space of dimension D and application of a learnable additive position code To monitor the time sequence of the time blocks to obtain the input of the transducer encoder Wherein S4-2, multi-head attention calculation: the transducer encoder uses a multi-head attention mechanism, each head in the multi-head attention Will input Projected as a query matrix Key matrix Sum matrix Wherein the parameter matrix , And finally, calculating the attention output through the scaling dot product, and S4-3, outputting prediction: After the output of the transducer encoder is processed by a normalization and feedforward network, a single variable prediction result of T time steps in the future is obtained through a flattened layer with a linear head 。
  7. 7. The ST-PatchTST network-based multivariate air quality prediction method of claim 6, wherein the transducer encoder comprises a multi-head attention layer, a BatchNorm normalization layer, and a feed forward network with residual connections.
  8. 8. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when executed by a processor, implements the ST-PatchTST network-based multivariate air quality prediction method according to any one of claims 1 to 7.
  9. 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the ST-PatchTST network-based multi-air quality prediction method of any one of claims 1 to 7 when the program is executed by the processor.

Description

Multi-element air quality prediction method based on ST-PatchTST network Technical Field The invention relates to the field of air quality prediction and the field of machine learning, relates to multi-element air quality prediction, and in particular relates to a multi-element air quality prediction method based on an ST-PatchTST network. Background With the acceleration of the urbanization process and the continued expansion of industrial activities, air pollution has become a global environmental and public health problem. The concentration of PM2.5, PM10, SO 2、NO2、O3 and other pollutants in the atmosphere directly affects the health of human beings, the ecological environment quality and the socioeconomic operation, SO that the accurate and efficient air quality prediction technology has important significance for pollution early warning, policy making, public protection and environmental protection. At present, the main air quality prediction methods include a numerical prediction method, a statistical prediction method, a machine learning method and the like. The numerical forecasting method has extremely high dependence on pollution source data and meteorological input, and huge consumption of calculation resources, and the statistical forecasting method is difficult to process the highly nonlinear relation in the pollution process, so that the machine learning method with the advantages of high forecasting precision, capability of processing multi-source heterogeneous data, high anti-interference capability and the like is attracting more and more attention. In the field of machine learning, traditional machine learning models such as linear regression, random forest, support vector machines (Support Vector Machine, abbreviated SVM) and decision trees have been widely used for air quality index prediction. These models have the advantages of simplicity, interpretability and computational efficiency, but their limitations in modeling time and nonlinear dynamics make them less suitable for high-resolution air quality index prediction tasks. Air pollution prediction is a typical multivariate time series analysis problem, deep learning models can find potentially complex nonlinear structures in high-dimensional data, and are therefore increasingly used for air quality index prediction tasks, such as cyclic neural networks (Recurrent Neural Network, RNN) and variants thereof, such as long-term memory networks (LSTM), gate-controlled cyclic units (GRU) are applied to time series prediction for a long time period, and transducer transformers and variants thereof are also receiving increasing attention, such as block time series transducers (PATCH TIME SERIES transformers, patchTST) for long-term time series prediction, through channel independent strategies and partitioning of time series data into "time blocks" (patches) of fixed length to extract local semantic information, achieving better performance than cyclic neural networks (RNN) and Convolutional Neural Networks (CNN) and standard transformers, but directly inputting all sites as independent channels can result in models failing to capture spatial correlations between air quality monitoring sites. In recent years, the transducer structure and its variants have made significant progress in timing predictions. The block time sequence Transformer (PatchTST) is obtained by dividing the time sequence into local time blocks (Patches) as input Token, and processing the multi-variable sequence under a Channel independent (Channel-INDEPENDENCE) strategy, so that the computational complexity is remarkably reduced, and the long-range time sequence modeling capability is improved. However, in the existing PatchTST method, the site data of each monitoring site are generally regarded as independent channel input, so that the actual space geographic association and pollutant transmission effect between sites are ignored, the information of the model in the space dimension is underutilized, and the overall accuracy and the robustness of prediction are affected. Therefore, how to effectively integrate space-time double dependence in air quality data based on the existing time sequence prediction model and construct a prediction framework capable of capturing long-range time sequence trend and modeling multi-site space correlation becomes a technical problem to be solved in the current field. The invention aims at solving the problems and provides an air quality prediction method integrating space convolution and time block transform so as to improve the accuracy and practicability of multi-element air quality prediction. Disclosure of Invention Aiming at the problems of insufficient space-time information fusion, limited long-sequence modeling capability, higher computational complexity and the like of the air quality prediction method in the prior art, the invention provides a multi-element air quality prediction method based on a ST-PatchTST (Spatio-Temporal PAT