An air quality prediction method considering time-varying correlation between air quality data
By combining maximum overlap discrete wavelet transform and multi-scale time series modules with a dual attention mechanism, the problem of capturing data non-stationarity and seasonality features in air quality forecasting is solved, achieving higher accuracy and efficiency in air quality forecasting.
Patent Information
- Application Number
- CN202510281422.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-03-11
AI Technical Summary
Existing air quality prediction models suffer from computational complexity, adaptability, and long-term accuracy and efficiency issues when dealing with the complex correlations of air pollution factors. In particular, they struggle to accurately capture the non-stationarity and seasonality of air quality data in long-term trend prediction.
Maximum overlap discrete wavelet transform is used to decompose the features of air quality data, a multi-scale time series module is constructed, a dual attention mechanism is used to capture the time-varying correlation of the data, and a multilayer perceptron is used for prediction.
It improves the accuracy and efficiency of air quality forecasting, and can more comprehensively depict the changing patterns and interrelationships of air quality data at different time scales, providing a framework for a deeper understanding of the interactions of air quality data characteristics.
Smart Images

Figure CN120355067B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of time series forecasting technology, specifically relating to an air quality forecasting method that considers the time-varying correlation between air quality data. Background Technology
[0002] Air pollution poses a threat to human health. With the digitalization and intelligentization of meteorological services, the use of cutting-edge deep learning technology to predict air quality has significant practical implications. However, despite extensive research on air quality forecasting, numerous challenges and areas for expansion remain. Many models attempt to comprehensively consider multiple air pollution factors, but their high computational complexity limits their prediction accuracy and practicality. Statistical methods, while widely used in short-term forecasting due to their ease of computation, struggle to meet the demands of long-term trend prediction. The rise of deep learning methods, especially models such as LSTM, GRU, and TCN, as well as the uniquely advantageous Transformer model, has improved the accuracy of air quality forecasting to some extent, particularly excelling in handling long-term dependencies. However, these models still face challenges in dealing with the complex correlations of air quality characteristics in air quality forecasting. Summary of the Invention
[0003] To address the shortcomings of existing technologies and effectively extract long-term trends and periodic characteristics of air quality data, thereby improving the accuracy and efficiency of air quality forecasting, this invention adopts the following technical solution:
[0004] An air quality prediction method that considers the time-varying correlation between air quality data includes the following steps:
[0005] Step S1: Acquire air quality data and normalize it. Based on the maximum overlap discrete wavelet transform, perform feature decomposition on the normalized data, decomposing it into multiple unrelated detail series and smooth series. This effectively handles the non-stationarity and seasonality of air pollutant data, i.e., long-term trend and periodic characteristics, and mines deeper feature information of the data, providing a better data foundation for subsequent steps.
[0006] Step S2: Construct a multi-scale time series module to divide the decomposed data into time blocks of different sizes. Different time block sizes provide different time resolution views for subsequent multi-scale modeling, capturing the time-varying correlation between data from the divided data.
[0007] Step S3: Based on the time-varying correlation between data, the air quality data is reconstructed by the maximum overlap wavelet inverse transform, and then the air quality is predicted by using multilayer perceptron processing and inverse normalization as a predictor.
[0008] Further, step S1 includes the following steps:
[0009] Step S1.1: Select a set of wavelet filters, including high-pass and low-pass filters, and determine the number of decomposition layers based on the length of the acquired air quality data. The number of layers determines how many uncorrelated detail series and smooth series the original signal will be decomposed into.
[0010] Step S1.2: Decompose the normalized air quality data based on the selected wavelet filter. During each decomposition, the filtering result of the previous low-pass filter is cyclically convolved with the high-pass filter to obtain the detail coefficients of that layer, which reflect the local fluctuations and high-frequency information of the data at that frequency level. The filtering result of the previous low-pass filter is cyclically convolved with the low-pass filter to obtain approximation coefficients, which contain the low-frequency trend information of the data and are used as the input data for the next decomposition. The detail coefficients of each layer constitute multiple uncorrelated detail series, and the approximation coefficients of each layer constitute a smooth series.
[0011] Furthermore, the detail coefficients in step S1.2 are obtained by applying a normalized high-pass filter h at each time point t. t The low-pass filter result v of the previous layer j-1 Perform a recurrent convolution operation to obtain the detail coefficients D of this layer. j,k :
[0012]
[0013] Where M represents the filter length, m∈M represents the index of the high-pass filter length, and N represents the data length;
[0014] The approximation coefficients are used with a normalized low-pass filter g. t The low-pass filter result v of the previous layer j-1 Performing circular convolution yields approximation coefficients S. j,t It includes low-frequency trend information from the data, and the formula is as follows:
[0015]
[0016] The approximation coefficient S j,t v, as input data for the next level of decomposition j =S j,t .
[0017] Furthermore, in step S3, firstly, the high-pass filter coefficients h are obtained and normalized based on the wavelet basis function. t and low-pass filter coefficients g t ;
[0018] Then, reconstruct the data starting from the lowest frequency approximation coefficients, denoted as v.j =S K,t j = K-1, K-2, ..., 1, S K,t The approximation coefficient for the last layer is expressed by the following formula:
[0019]
[0020] Among them, D j This represents the detail coefficient of the j-th layer.
[0021] Furthermore, in step S1.2, in each decomposition, the pyramid algorithm is used based on a specific wavelet p. m and scaling q m The filter processes the data, and the filter satisfies the even-length scaling assumption:
[0022]
[0023] Where m = 0, 1, ..., M-1, M represents the filter length, and n represents any non-zero integer, thus ensuring that the decomposed series has good properties.
[0024] Further, step S2 includes the following steps:
[0025] Step 2.1: Divide the decomposed data into time blocks of various sizes to obtain time blocks of different sizes, forming views at different scales;
[0026] Step 2.2: Perform a dual attention mechanism operation on all the data after time block division to capture the time-varying correlation between time points within time blocks and between time blocks;
[0027] Step S2.3: Aggregate time-varying correlation information to make its dimensions consistent with the dimensions of the decomposed data.
[0028] Furthermore, in step 2.1, the defined time block size set is used to obtain the number of data pieces with the same number of time blocks from the decomposed data, and each data piece is decomposed based on the different time block sizes in the set.
[0029] Furthermore, the dual attention mechanism in step 2.2 includes intra-time block attention, where intra-time block attention applies to each time block X after time block division. i The feature dimension is obtained by embedding along the feature dimension d, and the embedded feature dimension is d. m ,feature Then, regarding the features Perform a trainable linear transformation to obtain the key in the attention operation. Sum Simultaneously employing a trainable query matrix Merge time block contexts and compute trainable query matrix AND key Cross attention To capture local details within a time block, the cross-attention calculation formula is as follows:
[0030]
[0031] Attn is obtained by concatenating the attention results within all time blocks. intra , is used to represent local details of adjacent time steps in a time series.
[0032] Furthermore, the dual attention mechanism in step 2.2 includes inter-time block attention. For the time series after time block division, the inter-time block attention first obtains the attention from the feature dimension via d-embedding. The embedded feature is d m Then rearrange the number of data merging time blocks and the embedded features d. ′ m To merge time steps within the same time block; Perform a linear mapping to obtain the query key Sum Computational attention To establish relationships between time blocks and capture global correlations in time series, the attention calculation formula is as follows:
[0033]
[0034] Wherein, the embedded feature d ′ m This represents the time block size multiplied by the embedded feature dimension d. m .
[0035] Further, step S3 includes the following steps:
[0036] Step S3.1: Based on the wavelet filter type, obtain the corresponding high-pass filter coefficients and low-pass filter coefficients, and calculate the number of layers in the eigenvalue decomposition coefficient array; starting from the highest decomposition layer, reconstruct the data layer by layer downwards to obtain the data after the maximum overlap wavelet inverse transform;
[0037] Step S3.2: Pass the data after the maximum overlap wavelet inverse transform through a multilayer perceptron, and finally perform inverse normalization to complete the air quality prediction task.
[0038] The advantages and beneficial effects of this invention are as follows:
[0039] This invention utilizes maximum overlap discrete wavelet transform to decompose air pollutant data into multiple uncorrelated detail series and smooth series. Since air pollutant data often exhibits non-stationarity and seasonality, the maximum overlap discrete wavelet transform decomposition method can effectively handle such complex data. By defining multiple time block sizes to form views at different scales, it captures the time-varying correlations between data features from multiple resolution levels, more comprehensively depicting the changing patterns and interrelationships of air quality data at different time scales. Through a dual attention mechanism within and between time blocks, it mines the correlations of data features from both local and global perspectives. Intra-block attention focuses on the detailed relationships between time steps within each time block, helping to accurately capture subtle local changes; inter-block attention focuses on the relationships between time blocks, integrating different local information to capture global correlations, providing a new framework for a deeper and more detailed understanding of the interactions of air quality data features. Attached Figure Description
[0040] Figure 1 This is a flowchart of a method according to an embodiment of the present invention.
[0041] Figure 2 This is a schematic diagram of the structure of the multi-scale time series module in an embodiment of the present invention.
[0042] Figure 3 This is a diagram showing the structural changes in data flow in an embodiment of the present invention. Detailed Implementation
[0043] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0044] To address the difficulty in accurately capturing the dynamic changes of air pollution factors, such as Figure 1 As shown, this invention proposes an air quality prediction method that considers the time-varying correlation between air quality data to perform air quality prediction tasks. This involves decomposing the features of the input data using maximum overlap discrete wavelet transform; designing a method to capture the time-varying correlation between data; proposing a multi-scale time series module that can be applied to the model, enabling the model to learn the time-varying correlation between the input data; finally, after sequential processing through maximum overlap wavelet inverse transform, multilayer perceptron, and inverse normalization, the final air quality prediction result is output. Specifically, the method includes the following steps:
[0045] Step S1: Acquire air quality data and normalize it. Perform feature decomposition on the normalized data based on maximum overlap discrete wavelet transform, decomposing it into multiple unrelated detail series and smooth series.
[0046] Specifically, the original data is first normalized, and then the normalized data is decomposed using the maximum overlap discrete wavelet transform. The maximum overlap discrete wavelet transform, with a specific filter (such as Haar), decomposes the normalized air pollutant data into multiple uncorrelated detail series and smooth series. The number of decomposition levels helps extract signals and handle non-stationarity and seasonality, i.e., long-term trends and periodicity, providing a better data foundation for subsequent methods. The specific steps include the following:
[0047] Step S1.1: Initialize based on the filter and set the number of decomposition layers.
[0048] Choose the appropriate wavelet filter based on the actual needs, such as the Haar or Daubechies series. Different filters have different characteristics, which will affect the transformation results. For example, the Haar filter is simple and intuitive, with relatively low computational cost; while the Daubechies series filters have better localization characteristics in time series processing.
[0049] The number of decomposition levels K is determined based on the input data length N. This number of levels determines how many uncorrelated detail series and smooth series the original signal is decomposed into, and the formula is as follows:
[0050] K = log e N
[0051] Step S1.2: In each decomposition step, the pyramid algorithm is used to decompose the normalized data based on the selected wavelet filter. After applying the filter, wavelets and scaling coefficients are obtained, decomposing the normalized data into multiple uncorrelated detail series and smooth series.
[0052] Original time series data Y t During the decomposition at layer j, the detail coefficients D are calculated using the circular convolution formula. j,k :
[0053]
[0054] Where M represents the filter length (M = 2 for Haar wavelets), m ∈ M represents the index of the filter length, and N represents the data length. This formula represents the data length at each time point t, using a normalized high-pass filter h. t The low-pass filter result v of the previous layer j-1 By performing a recurrent convolution operation, the detail coefficients of the layer are obtained, which reflect the local fluctuations and high-frequency information of the data at that frequency level.
[0055] Meanwhile, the approximation coefficient S is calculated using another circular convolution formula. j,t :
[0056]
[0057] The approximation coefficients are calculated using a normalized low-pass filter g. t The low-pass filter result v of the previous layer j-1 Performing circular convolution yields approximation coefficients S. j,t It contains low-frequency trend information of the data and serves as input data v for the next level of decomposition. j =S j,t .
[0058] Through the above two steps, the maximum overlap discrete wavelet transform algorithm is initialized using the selected filter, and the decomposition level K is set to log0. e N, where N is the length of the input data, for the normalized air pollutant data. The data is decomposed. Through a series of filtering operations, the normalized data is decomposed into K uncorrelated detail series D. k,t (k = 1, 2, ..., K) and a smooth series S K,t .
[0059] Furthermore, in each decomposition step, the pyramid algorithm is used, based on a specific wavelet p. m and scaling q m Filters (m = 0, 1, ..., M-1) process the data. These filters satisfy the even-length scaling assumption.
[0060] (for any non-zero integer n)
[0061] This ensures that the series after decomposition has good properties.
[0062] After applying these filters, the resulting wavelets and scaling coefficients represent information from different frequency components, thus decomposing the original data into subsequences of different resolutions. Higher-level decompositions (smaller k values) correspond to higher-frequency detail series, capable of capturing short-term fluctuations and rapid changes in the data; while lower-level decompositions (k values close to K) yield smoother series that reflect long-term trends and low-frequency information in the data.
[0063] By employing maximum overlap discrete wavelet transform, air pollutant data is decomposed into multiple uncorrelated detail series and smooth series, breaking through the limitations of traditional analysis that focuses solely on the raw data. It analyzes the data from both the time and frequency domains, helping to uncover hidden information such as the characteristics of different frequency components, including short-term fluctuations and long-term trends. This provides a new perspective for a more accurate understanding and grasp of the intrinsic structure of air quality-related data.
[0064] Air pollutant data often exhibits non-stationarity and seasonality. The maximum overlap discrete wavelet transform decomposition method can effectively handle such complex data, laying the foundation for further development of methods that conform to data characteristics. It also provides a reference feature extraction approach for other fields to process similar complex data.
[0065] Step 2: Construct a multi-scale time series module, divide the decomposed data into time blocks of different sizes, and capture the time-varying correlation between data through a dual attention mechanism.
[0066] To address the problem of time-varying correlations between features caused by unpredictable and complex chemical reactions in the air, a multi-scale time series module is designed. Through unique time block partitioning and a dual attention mechanism, it captures both local details and global correlations within time series data, as well as time-varying correlations between features. The general steps of the invented multi-scale time series module are as follows: Figure 2 As shown, the specific steps include the following:
[0067] Step 2.1: Define a set of time block sizes S, and copy the data to the same number of times the time block size (the data here is the data after the maximum overlap discrete wavelet transform). Decompose each data based on the different time block sizes in set S.
[0068] This multi-scale time series module is designed primarily to capture the time-varying correlations between input data. First, time blocks are partitioned, defining a set S of time block sizes, with each block size corresponding to a partitioning operation. For the input time series X∈R... H*d (H is the sequence length, d is the feature dimension, and X is the data after maximum overlap discrete wavelet transform decomposition). The data is divided into P = H / S time blocks using a specific time block size S. Different time block sizes provide different temporal resolution views for subsequent multi-scale modeling.
[0069] Step 2.2: Apply a dual attention mechanism to all data after time block partitioning to capture time-varying correlations between data points. The time block dual attention mechanism is designed as follows:
[0070] 1) Attention within time blocks
[0071] For a set of time blocks X divided by time block size S (here X represents the data after time block division, which is different from the data represented by X in the first step, and is only for ease of expression and understanding), first process each time block X... i Embedded along feature dimension d to obtain (For the embedding dimension). Perform a trainable linear transformation to obtain the key in the attention operation Sum Simultaneously employing a trainable query matrix Merge time block contexts and compute and Cross attention Capture local details within time blocks. The attention results from all time blocks are then stitched together. This represents local details at adjacent time steps in the time series. The cross-attention calculation formula is as follows:
[0072]
[0073] When computing the intra-time-block attention mechanism, the data dimension is three-dimensional (number of time blocks, time block size, feature dimension d). After performing the embedding operation along the feature dimension, the last dimension becomes d. m That is, (number of time blocks, size of time blocks, and feature dimension d after embedding) m ).
[0074] 2) Inter-block attention
[0075] For the time series X∈R after time block partitioning P*S*d (Here, X represents the data after time block partitioning, which is different from the data represented by X in the first step; this is only for ease of expression and understanding.) First, embed along the feature dimension from d to d. m Then rearrange the number of data merging time blocks and the embedded features d. ′ m ,get This merges time steps within the same time block. Perform a linear mapping to obtain the query key Sum Computational attention Establish relationships between time blocks to capture global correlations in time series. The formula for calculating the attention mechanism is as follows:
[0076]
[0077] When calculating the attention mechanism between time blocks, the latter two dimensions need to be merged, and the data becomes two-dimensional (number of time blocks, time block size * embedding feature dimension d). m That is, (the new time block size d) ′ m ).
[0078] Step 2.3: Aggregate the data processed by the dual attention mechanism through a linear layer.
[0079] By designing a multi-scale time series module, various time block sizes are defined for the input time series, forming a set S of time block sizes. Data is divided based on time blocks, and a dual attention mechanism is used to process data features and capture time-varying correlations between features. Intra-block attention establishes relationships between time points within each block through specific operations, capturing local details; inter-block attention captures global correlations. The two are then fused for final aggregated output.
[0080] The final aggregated data dimension is the same as the data dimension after the maximum overlap discrete wavelet transform decomposition.
[0081] By defining multiple time block sizes to create views at different scales, conditions are created for multi-scale modeling. This breaks with the conventional practice of analyzing time series data at a single scale, enabling the capture of time-varying correlations between data features at multiple resolution levels, and more comprehensively depicting the changing patterns and interrelationships of air quality data at different time scales.
[0082] The invented dual attention mechanism, namely intra-time-block attention and inter-time-block attention, mines the correlation of data features from both local and global perspectives. Intra-time-block attention focuses on the detailed relationships between time steps within each time block, helping to accurately capture subtle local changes; inter-time-block attention, on the other hand, focuses on the relationships between time blocks, integrating different local information to capture global correlations. This theoretical design, which combines local and global perspectives, provides a new theoretical framework for a deeper and more detailed understanding of the interactions of air quality data features.
[0083] Step S3: After passing through the multi-scale time series module, the maximum overlap discrete wavelet inverse transform is performed, followed by multilayer perceptron processing and inverse normalization processing to finally output the final air quality prediction result.
[0084] Step S3.1: Based on the specified wavelet filter type, obtain the corresponding high-pass filter coefficients and low-pass filter coefficients; calculate the number of layers in the eigenvalue decomposition coefficient array; starting from the highest decomposition layer, reconstruct layer by layer downwards; repeat the layer-by-layer reconstruction steps until all layers are completed, and obtain the data after the maximum overlap wavelet inverse transform.
[0085] First, prepare the filter coefficients (similar to the maximum overlap discrete wavelet transform): Similarly, obtain and normalize the high-pass filter coefficients h based on the selected wavelet basis functions. t and low-pass filter coefficients g t .
[0086] Then, the formula is reconstructed, and the coefficients after the maximum overlap discrete wavelet transform decomposition are denoted as D. j,t (j = 1, 2, ..., K) and S K,tD j,t S is the detail coefficient of the j-th layer. K,t It is the approximation coefficient of the last layer (the Kth layer).
[0087] From the lowest frequency approximation coefficient S K,t Start refactoring, note v j =S K,t .
[0088] For j = K-1, K-2, ..., 1, the formula is used...
[0089]
[0090] Perform layer-by-layer reconstruction. N is the data length, and this formula represents the approximation coefficient v from the previous layer at each time point t. j and the detail factor D of the current layer j By using a low-pass filter g j and high-pass filter h j The recurrent convolution operation gradually restores the approximate coefficients v of the previous layer. j-1 Until the y-dimensional data of the original time series data is reconstructed, the process continues. t (When j = 0, v0 = y) t ).
[0091] These formulas and calculation steps constitute the core operation process of the maximum overlap discrete wavelet inverse transform. In practical applications, these mathematical operations are used to reconstruct the data after the maximum overlap discrete wavelet transform decomposition.
[0092] Step S3.2: Then, transform the data y after the maximum overlap discrete wavelet inverse transform. t The data is processed by a perceptron and then inversely normalized to generate the final result.
[0093] like Figure 3As shown, the original data dimension is 2-dimensional. After normalization, the data dimension remains unchanged. After the maximum overlap discrete wavelet transform, the data is decomposed, and the data dimension increases to 3-dimensional. Then, according to the time block size set S, a corresponding number of maximum overlap discrete wavelet transform data are copied, and these data are further decomposed according to different time block sizes (each individual decomposition step here is similar to the patch decomposition in the classic time series model patchTST). At this time, the data dimension becomes 4-dimensional, but the internal dimension of each 4-dimensional data is different. A dual attention mechanism is applied to each of them, and then the dimension generated by the time block decomposition is expanded, and the data is reduced to 3-dimensional. All the data after dual attention is aggregated through a linear layer (acting as an aggregator), and the data dimension is consistent with the data dimension after the maximum linear discrete wavelet transform. After the maximum overlap discrete wavelet inverse transform, the data dimension is consistent with the original data dimension. Finally, a multilayer perceptron and inverse normalization are used as predictors to complete the final air quality prediction.
[0094] This invention can comprehensively consider the time dependence of air quality data and the complex time-varying correlation of the data itself, thereby significantly improving the accuracy and reliability of air quality prediction.
[0095] 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 the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An air quality prediction method considering time-varying correlation among air quality data, characterized in that The method comprises the following steps: Step S1: obtaining air quality data and normalizing the data, decomposing the normalized data into a plurality of irrelevant detail series and a smooth series based on maximum overlap discrete wavelet transform; Step S2: constructing a multi-scale time series module, dividing the decomposed data to obtain time blocks of different sizes, and capturing time-varying correlation between data from the divided data; Step S3: reconstructing the air quality data based on the time-varying correlation between the data by maximum overlap wavelet inverse transform, and using multi-layer perception processing and inverse normalization as a predictor to predict air quality. 2.The air quality prediction method considering time-varying correlation between air quality data according to claim 1, characterized in that The step S1 comprises the following steps: Step S1.1: selecting a set of wavelet filters, including high-pass filters and low-pass filters, and determining the number of decomposition layers according to the length of the obtained air quality data; Step S1.2: decomposing the normalized air quality data based on the selected wavelet filters, at each layer of decomposition, performing a cyclic convolution operation on the filtering result of the high-pass filter of the previous layer to obtain the detail coefficient of the layer, and performing a cyclic convolution operation on the filtering result of the low-pass filter of the previous layer to obtain the approximation coefficient and use it as the input data for the next layer of decomposition, the detail coefficients of each layer constitute a plurality of irrelevant detail series, and the approximation coefficients of each layer constitute a smooth series. 3.The air quality prediction method of claim 2, wherein: The detail coefficients in the step S1.2 are obtained by convolving the normalized high-pass filter h t the low-pass filtered result v j-1 of the previous layer at each time point t j,k : Wherein, M represents the filter length, m represents the index of the high-pass filter length, and N represents the data length; The approximation coefficients, with a normalized low-pass filter g t The low-pass filter result v of the previous layer j-1 The approximation coefficients S obtained by the cyclic convolution j,t The formula is as follows: approximation coefficients S j,t input data v for the next layer decomposition j = S j,t .
4. The air quality prediction method considering time-varying correlation between air quality data according to claim 3, characterized in that: In the step S3, firstly, the high-pass filter coefficient h t and the low-pass filter coefficient g t are obtained and normalized based on the wavelet base function Then, the approximation coefficients are reconstructed from the lowest frequency approximation coefficients, denoted v j = S K,t , j = K - 1, K - 2,..., 1, S K,t denotes the approximation coefficients of the last layer, and is given by the following formula: where D j denotes the detail coefficient of the jth layer.
5. The air quality prediction method considering time-varying correlation between air quality data according to claim 2, characterized in that: In said step S1.2, in each decomposition, a pyramid algorithm is used based on a specific wavelet p m and a scaling q m The filters process the data, the filters satisfying the even-length scaling hypothesis: Wherein, m=0,1,…,M-1, M represents the filter length, and n represents any non-zero integer.
6. The air quality prediction method considering time-varying correlation among air quality data according to claim 1, wherein: The step S2 comprises the following steps: Step 2.1: dividing the decomposed data based on time blocks of various sizes to obtain time blocks of different sizes; Step 2.2: capturing the time-varying correlation between time points within the time block and between time blocks by performing a double attention mechanism operation on all data divided by the time block; Step S2.3: aggregating time-varying correlation information to make its dimension consistent with the dimension of the decomposed data.
7. The air quality prediction method considering time-varying correlation between air quality data according to claim 6, characterized in that: In the step 2.1, a set of defined time block sizes is used to obtain data portions with the same number of time blocks from the decomposed data, and each data portion is decomposed based on different time block sizes in the set.
8. The air quality prediction method considering time-varying correlation among air quality data according to claim 6, characterized in that: The double attention mechanism in step 2.2 includes intra-time block attention, which is attention on each time block X divided by time blocks i Embedding along the feature dimension d to obtain the feature The embedded feature dimension is d m , and then performing a trainable linear transformation on the feature to obtain the key in the attention operation and the value Meanwhile, a trainable query matrix Q is used Merge the time block context to calculate the trainable query matrix Q Cross attention with the key The cross attention calculation formula is as follows: Attn is obtained by concatenating the attention results within all time blocks intra to represent local details of adjacent time steps in the time series.
9. The air quality prediction method considering time-varying correlation among air quality data according to claim 6, wherein: The double attention mechanism in step 2.2 includes inter-time block attention, which, for a time series divided into time blocks, first performs embedding operation along the feature dimension, from feature dimension d to feature dimension d m , and then rearranges the data to combine the number of time blocks and the embedded feature d ′ m , to obtain Linear mapping is performed on to obtain query key and value Attention is calculated Inter-time block relationship is established to capture the global correlation of the time series, and the attention calculation formula is as follows: where the embedding feature d ′ m denotes the time block size times the dimension of the embedded feature d m .
10. The air quality prediction method considering time-varying correlation among air quality data according to claim 1, wherein: The step S3 comprises the following steps: Step S3.1: according to the type of wavelet filter, obtaining the corresponding high-pass filter coefficient and low-pass filter coefficient, calculating the number of layers of the feature decomposition coefficient array, and starting from the highest decomposition layer, reconstructing layer by layer downward to obtain the data after maximum overlap wavelet inverse transform; Step S3.2: performing inverse normalization on the data after maximum overlap wavelet inverse transform by multi-layer perception to complete the air quality prediction task.
Citation Information
Patent Citations
Slight fault detection method for transformer winding based on MODWT
CN109828181A
Air quality prediction method and system based on potential feature extraction
CN118036817A