Air quality prediction method considering time-varying correlation between air quality data

Through the maximum overlap discrete wavelet transformation and multi-scale time series module combined with the dual attention mechanism, the non-stationarity and seasonality of air quality data are solved, and higher precision air quality prediction is achieved.

CN120355067AActive Publication Date: 2025-07-22ZHEJIANG GONGSHANG UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510281422.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-07-22
Estimated Expiration
2045-03-11

AI Technical Summary

Technical Problem

The difficulty in effectively handling the nonstationarity and seasonality of air pollutant data in air quality prediction leads to insufficient prediction accuracy and efficiency, especially in long-term trend prediction.

Method used

The maximum overlap discrete wavelet transform is used to characterize the air quality data, a multi-scale time series module is built, and time-varying correlation is captured through the dual attention mechanism, and the maximum overlap wavelet inverse transformation, multi-layer perceptron and inverse normalization processing is used for prediction.

Benefits of technology

It improves the accuracy and efficiency of air quality prediction, can more comprehensively capture the changing laws and relationships of data under different time scales, and improves the accuracy of long-term trend prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120355067A_ABST
    Figure CN120355067A_ABST
Patent Text Reader

Abstract

The invention discloses an air quality prediction method considering time-varying correlation between air quality data. The method comprises the following steps: carrying out normalization processing on input original data; on the basis of maximum overlapping discrete wavelet transform, feature decomposition is carried out on the data after normalization processing, and the data are decomposed into a plurality of unrelated detail series and smooth series; inputting the decomposed data into a multi-scale time sequence module, copying data copies with the same number of time blocks, performing time block decomposition on each piece of data, capturing time-varying correlation information between time points in the time blocks and between the time blocks through a layer of time block double attention mechanism, and performing time-varying correlation on the time-varying correlation information; aggregating the dimensions of all the data after the time-varying information is captured into the data dimensions after the original data is decomposed; and sequentially carrying out one-layer maximum overlapping wavelet inverse transformation processing, multi-layer perceptron processing and inverse normalization processing, and outputting an air quality prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of time series prediction, and particularly relates to an air quality prediction method considering the time-varying correlation between air quality data. Background Art

[0002] Air pollution poses a threat to human health. With the digitization and intelligentization of meteorological services, it is of great practical significance to use advanced deep learning technologies to predict air quality. However, although extensive research has been conducted on air quality prediction tasks, there are still many challenges and room for expansion. Many models attempt to comprehensively consider various air pollution factors, but the high computational complexity limits their prediction accuracy and practicality. Although statistical methods are widely used in short-term prediction due to their simplicity, they are difficult to meet the needs of long-term trend prediction. The rise of deep learning methods, especially models represented by LSTM, GRU, TCN, etc., and the Transformer model with unique advantages, have improved the accuracy of air quality prediction to a certain extent, especially in dealing with long-term dependencies. However, these models still face difficulties in dealing with the complex correlations of quality characteristics in air quality prediction. Summary of the Invention

[0003] In order to solve the deficiencies of the prior art and achieve the purpose of effectively extracting the long-term trends and periodic characteristics of air quality data and improving the accuracy and efficiency of air quality prediction, the present invention adopts the following technical solutions:

[0004] An air quality prediction method considering the time-varying correlation between air quality data, comprising the following steps:

[0005] Step S1: Obtain air quality data and perform normalization processing on it. Based on the maximum overlap discrete wavelet transform, the normalized data is decomposed into multiple uncorrelated detail series and smooth series; thereby effectively dealing with the non-stationarity and seasonality of air pollutant data, that is, long-term trends and periodic characteristics, and mining deeper feature information of the data to provide a better data basis for the follow-up;

[0006] Step S2: Construct a multi-scale time series module, divide the decomposed data to obtain time blocks of different sizes, and different time block sizes provide different time resolution views for subsequent multi-scale modeling to capture the time-varying correlation between data from the divided data;

[0007] Step S3: Based on the time-varying correlation between data, reconstruct the air quality data through the inverse maximum overlap wavelet transform, and then use a multi-layer perceptron for processing and inverse normalization as a predictor to predict air quality.

[0008] Further, the step S1 includes the following steps:

[0009] Step S1.1: Select a set of wavelet filters, including a high-pass filter and a low-pass filter, and determine the decomposition level according to the length of the obtained air quality data. The level determines how many uncorrelated detail series and smooth series the original signal is decomposed into;

[0010] Step S1.2: Decompose the normalized air quality data based on the selected wavelet filters. During each layer of decomposition, perform a circular convolution operation on the filtering result of the low-pass filter of the previous layer through the high-pass filter to obtain the detail coefficients of this layer, which reflect the local fluctuations and high-frequency information of the data at this frequency level. Perform a circular convolution on the filtering result of the low-pass filter of the previous layer through the low-pass filter to obtain the approximation coefficients, which contain the low-frequency trend information of the data, and use them as the input data for the next layer of decomposition. The detail coefficients of each layer constitute multiple uncorrelated detail series, and the approximation coefficients of each layer constitute a smooth series.

[0011] Further, for the detail coefficients in the step S1.2, at each time point t, use the normalized high-pass filter h t to perform a circular convolution operation on the low-pass filtering result v j-1 of the previous layer to obtain the detail coefficients D j,k of this layer:

[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] For the approximation coefficients, use the normalized low-pass filter g t to perform a circular convolution on the low-pass filtering result v j-1 of the previous layer to obtain the approximation coefficients S j,t that contain the low-frequency trend information of the data. The formula is as follows:

[0015]

[0016] Use the approximation coefficients S j,t as the input data v j for the next layer of decomposition, i.e., v j,t = S.

[0017] Further, in the step S3, first, obtain and normalize the high-pass filter coefficients h t and the low-pass filter coefficients g t based on the wavelet basis function;

[0018] Then, start reconstructing from the approximation coefficients of the lowest frequency. Denote vj = S K,t , j = K - 1, K - 2, …, 1, S K,t represents the approximation coefficient of the last layer, and the formula is as follows:

[0019]

[0020] where D j represents the detail coefficient of the j-th layer.

[0021] Furthermore, in the step S1.2, in each decomposition, the pyramid algorithm is used to process the data based on the specific wavelet p m and the scaling q m filters, and the filters satisfy 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, thereby ensuring that the decomposed series has good properties.

[0024] Furthermore, the step S2 includes the following steps:

[0025] Step 2.1: Divide the decomposed data based on time blocks of various sizes to obtain time blocks of different sizes and form views of different scales;

[0026] Step 2.2: Apply the dual attention mechanism to all the data after time block division to capture the time-varying correlations between time points within the time blocks and between the time blocks;

[0027] Step S2.3: Aggregate the time-varying correlation information to make its dimension consistent with the dimension of the decomposed data.

[0028] Furthermore, in the step 2.1, for the defined set of time block sizes, obtain the same number of data portions as the number of time blocks from the decomposed data, and decompose each portion of data based on different time block sizes in the set.

[0029] Furthermore, the dual attention mechanism in the step 2.2 includes intra-time-block attention. The intra-time-block attention embeds each time block X i along the feature dimension d to obtain the feature dimension, and the embedded feature dimension is d m , and the feature is then subjected to a trainable linear transformation to obtain the key and value in the attention operation. At the same time, a trainable query matrix is adopted Merge the time block context and calculate the trainable query matrix Cross-attention with the key to capture local details within the time block. The cross-attention calculation formula is as follows:

[0030]

[0031] Concatenate the attention results within all time blocks to obtain Attn intra , which is used to represent the local details of adjacent time steps in the 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, first embed it from d along the feature dimension to obtain to, and the embedded feature is d m , then rearrange the data to merge the number of time blocks and the embedded feature d ′ m so that the time steps within the same time block are merged; perform a linear mapping on to obtain the query key and value Calculate the attention Establish the inter-time-block relationship and capture the global correlation of the time series. The attention calculation formula is as follows:

[0033]

[0034] Among them, the embedded feature d ′ m represents the time block size multiplied by the embedded feature dimension d m .

[0035] Furthermore, step S3 includes the following steps:

[0036] Step S3.1: According to the wavelet filter type, obtain the corresponding high-pass filter coefficients and low-pass filter coefficients, and calculate the number of layers of the feature decomposition coefficient array; starting from the highest decomposition layer, perform reconstruction layer by layer downward to obtain the data after the maximum overlap inverse wavelet transform;

[0037] Step S3.2: Pass the data after the maximum overlap inverse wavelet transform through a multi-layer perceptron, and finally perform inverse normalization to complete the air quality prediction task.

[0038] The advantages and beneficial effects of the present invention are as follows:

[0039] ​The present invention uses the maximum overlap discrete wavelet transform to decompose air pollutant data into multiple uncorrelated detail series and smooth series. Since air pollutant data often has non-stationary and seasonal characteristics, the decomposition method of the maximum overlap discrete wavelet transform can effectively process such complex characteristic data; by defining various time block sizes to form views at different scales, the time-varying correlations between data features are captured from multiple resolution levels, and the variation laws and interrelationships of air quality data at different time scales are more comprehensively characterized; through the dual attention mechanism within and between time blocks, the correlations of data features are mined from both local and global perspectives. The attention within the time block focuses on the detailed relationships between time steps within each time block, which helps to accurately capture local subtle changes; the attention between time blocks focuses on the relationships between time blocks, integrates different local information, and thus captures global correlations, providing a new framework for a deeper and more detailed understanding of the interaction of air quality data features. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is a flowchart of the method according to an embodiment of the present invention.

[0041] Figure 2 is a schematic structural diagram of a multi-scale time series module in an embodiment of the present invention.

[0042] Figure 3 is a structural change diagram of data flow in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0043] The following detailed description of the specific embodiments of the present invention is provided in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only for the purpose of illustration and explanation of the present invention, and are not intended to limit the present invention.

[0044] Regarding the problem of difficultly accurately capturing the dynamic changes of air pollution factors, such as Figure 1 shown, the present invention proposes an air quality prediction method considering the time-varying correlations between air quality data to perform air quality prediction tasks, which involves using the maximum overlap discrete wavelet transform to decompose the input data features; designing a method for capturing the time-varying correlations between data, proposing a multi-scale time series module, which can be applied to the model to enable the model to learn the time-varying correlations between the input data; finally, through the inverse maximum overlap wavelet transform, multi-layer perceptron and inverse normalization processing in sequence, the final air quality prediction result is output, which specifically includes the following steps:

[0045] Step S1: Obtain air quality data and perform normalization processing on it, and perform feature decomposition on the normalized data based on the maximum overlap discrete wavelet transform, decomposing it into multiple uncorrelated detail series and smooth series.

[0046] Specifically, first normalize the original data, and then decompose the normalized data using the maximally decimated discrete wavelet transform. With the maximally decimated discrete wavelet transform, the normalized air pollutant data is decomposed into multiple uncorrelated detail series and a smooth series using a specific filter (such as Haar), and the decomposition level helps to extract signals, handle non-stationarity and seasonality, that is, long-term trends and periodicity, providing a better data basis for subsequent methods. The specific steps are as follows:

[0047] Step S1.1: Initialize based on the filter and set the decomposition level.

[0048] Select a suitable wavelet filter according to actual needs, such as Haar, Daubechies series, etc. Different filters have different characteristics and will affect the transformation results. For example, the Haar filter is simple and intuitive with relatively less computational complexity; while the Daubechies series filters have better localization characteristics in time series processing.

[0049] Determine the decomposition level K according to the length N of the input data. This level determines how many uncorrelated detail series and a smooth series the original signal will be decomposed into. The formula is as follows:

[0050] K = log e N

[0051] Step S1.2: Use the pyramid algorithm in each decomposition step to decompose the normalized data based on the selected wavelet filter. After applying the filter, wavelet and scaling coefficients are obtained, and the normalized data is decomposed into multiple uncorrelated detail series and a smooth series.

[0052] Original time series data Y t At the j-th level of decomposition, calculate the detail coefficient D through the circular convolution formula j,k :

[0053]

[0054] where M represents the filter length (for Haar wavelet M = 2), m ∈ M represents the index of the filter length, and N represents the data length. This formula means that at each time point t, the normalized high-pass filter h t is used to perform a circular convolution operation on the low-pass filtering result v j-1 of the previous layer to obtain the detail coefficient of this layer, which reflects the local fluctuations and high-frequency information of the data at this frequency level.

[0055] At the same time, calculate the approximation coefficient S through another circular convolution formula j,t :

[0056]

[0057] Calculate the approximation coefficient using the normalized low-pass filter g t Perform circular convolution on the low-pass filtering result v of the previous layer j-1 to obtain the approximation coefficient S j,t which contains the low-frequency trend information of the data and serves as the input data v for the next-level decomposition j = S j,t .

[0058] Through the above two steps, the maximum overlap discrete wavelet transform algorithm is initialized with the selected filter, and the decomposition level K = log e N, where N is the length of the input data, and the normalized air pollutant 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 to process the data based on the specific wavelet p m and scaling q m filters (m = 0, 1,..., M - 1). These filters satisfy the even-length scaling assumption:

[0060] (for any non-zero integer n)

[0061] thus ensuring that the decomposed series have good properties

[0062] After applying these filters, the resulting wavelet and scaling coefficients represent the information of different frequency components, thereby decomposing the original data into subsequences of different resolutions. Higher-level decompositions (smaller k values) correspond to higher-frequency detail series that can capture short-term fluctuations and rapid changes in the data; while the smooth series obtained from lower-level decompositions (k values close to K) reflect the long-term trends and low-frequency information of the data

[0063] Using the maximum overlap discrete wavelet transform to decompose the air pollutant data into multiple uncorrelated detail series and smooth series breaks the limitation of traditional analysis only from the original data level. It analyzes the data from two dimensions of time domain and frequency domain, which can help to deeply excavate the hidden information in the data, such as the characteristics contained in different frequency components like short-term fluctuations and long-term trends, providing a new perspective for more accurately understanding and grasping the internal structure of air quality-related data

[0064] Air pollutant data often has non-stationary and seasonal characteristics. The maximum overlap discrete wavelet transform can effectively process this type of complex data, laying a foundation for further method inventions that conform to the data characteristics and providing a reference for feature extraction ideas for processing similar complex data in other fields.

[0065] Step 2: Construct a multi-scale time series module, partition the decomposed data to obtain 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 correlation between features caused by unforeseen 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 can capture both the local details and global correlation within the time series data and the time-varying correlation between features. The general steps of the invented multi-scale time series module are as Figure 2 shown and specifically include the following steps:

[0067] Step 2.1: Define a set S of time block sizes, copy the same number of data copies as the number of time block sizes (the data here is the data after the maximum overlap discrete wavelet transform), and decompose each data copy based on different time block sizes in set S.

[0068] This multi-scale time series module is mainly designed to capture the time-varying correlation between input data. First, perform time block partitioning, define a set S of a series of time block size values, and each time block size corresponds to a partitioning operation. For the input time series X ∈ R H*d , (H is the sequence length, d is the feature dimension, and here X is the data after the maximum overlap discrete wavelet transform decomposition), partition it with a specific time block size S to obtain P = H / S time blocks. Different time block sizes provide different time resolution views for subsequent multi-scale modeling.

[0069] Step 2.2: Apply the dual attention mechanism to all the data after time block partitioning to capture the time-varying correlation between data. The time block dual attention mechanism is designed as follows:

[0070] 1) Intra-time-block attention

[0071] For the set of time blocks X partitioned by the time block size S (here X is the data after time block partitioning, different from the data represented by X in the first step, only for convenient expression and understanding), first embed each time block X i along the feature dimension d to obtain is the embedding dimension). For perform a trainable linear transformation to obtain the key and value At the same time, a trainable query matrix is adopted Merge the time block context and calculate with cross-attention to capture local details within the time block. The attention results within all time blocks are concatenated to obtain representing the local details of adjacent time steps in the time series. Among them, the cross-attention calculation formula is as follows:

[0072]

[0073] When calculating the attention mechanism within the time block, the data dimension is three-dimensional (number of time blocks, time block size, feature dimension d), and after performing the embedding operation along the feature dimension, the last dimension becomes d m , that is, (number of time blocks, time block size, embedded feature dimension d m ).

[0074] 2) Inter-time-block attention

[0075] For the time series X ∈ R P*S*d (here X is the data after time block division, which is different from the data represented by X in the first step, only for convenient expression and understanding), first embed from d to d along the feature dimension m , and then rearrange the data to merge the number of time blocks and the embedded feature d ′ m , to obtain to merge the time steps within the same time block. Perform a linear mapping on to obtain the query the key and the value Calculate the attention to establish the inter-time-block relationship and capture the global correlation of the time series. The calculation formula of the attention mechanism is as follows:

[0076]

[0077] When calculating the inter-time-block attention mechanism, the last two dimensions need to be merged, and the data becomes two-dimensional (number of time blocks, time block size * embedded feature dimension d m ), that is, (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, for the input time series, multiple time block sizes are defined to form a set S of time block sizes. Based on the time blocks, the data is partitioned, and a dual attention mechanism is used to process the data features to capture the time-varying correlations between the features. The intra-time-block attention establishes the relationships between the time points within each time block through specific operations to capture local details; the inter-time-block attention captures global correlations, and by fusing the two, the final aggregation output is performed.

[0080] It is designed that the dimension of the finally aggregated data is the same as that of the data after the maximum overlap discrete wavelet transform decomposition.

[0081] By defining multiple time block sizes to form views of different scales, conditions are created for multi-scale modeling. This breaks the conventional practice of analyzing time series data at a single scale in the past, and can capture the time-varying correlations between data features from multiple resolution levels, and more comprehensively depict the variation laws 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, respectively explores the correlations of data features from local and global perspectives. Intra-time-block attention focuses on the detailed relationships between time steps within each time block, which helps to accurately capture local subtle changes; inter-time-block attention focuses on the relationships between time blocks and integrates different local information to capture global correlations. This theoretical design that combines local and global 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, perform the inverse maximum overlap discrete wavelet transform, and then process through a multi-layer perceptron and inverse normalization processing, and finally output the final air quality prediction result.

[0084] Step S3.1: According to the specified wavelet filter type, obtain the corresponding high-pass filter coefficients and low-pass filter coefficients; calculate the number of layers of the feature decomposition coefficient array; start from the highest decomposition layer and reconstruct layer by layer downward; repeat the layer-by-layer reconstruction step until all layers of operations are completed to obtain the data after the inverse maximum overlap wavelet transform.

[0085] First, perform filter coefficient preparation (the same as the maximum overlap discrete wavelet transform): Also obtain and normalize the high-pass filter coefficient h t and the low-pass filter coefficient g t .

[0086] Then, for the reconstruction formula, let the coefficients after the maximum overlap discrete wavelet transform decomposition be D j,t (j = 1, 2, …, K) and S K,t, where D j,t is the detail coefficient of the j-th layer, and S K,t is the approximation coefficient of the last layer (the K-th layer).

[0087] Starting from the approximation coefficient S K,t with the lowest frequency for reconstruction, let v j = S K,t .

[0088] For j = K - 1, K - 2, …, 1, through the formula

[0089]

[0090] perform layer-by-layer reconstruction. N is the data length. This formula means that at each time point t, using the approximation coefficient v j of the previous layer and the detail coefficient D j of the current layer, through the circular convolution operation with the low-pass filter g j and the high-pass filter h j , gradually restore the approximation coefficient v j-1 of the previous layer until reconstructing y t with the same dimension as the original time series data (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, through these mathematical operations, the data decomposed by the maximum overlap discrete wavelet transform is reconstructed.

[0092] Step S3.2: Then, the data y t after the maximum overlap discrete wavelet inverse transform is sorted through a layer of perceptron and then inverse-normalized to generate the final result.

[0093] Such as Figure 3As shown, the original data dimension is 2D. After normalization, the data dimension remains unchanged. After the maximum overlap discrete wavelet transform, the data is decomposed, and at this time the data dimension increases to 3D. Then, according to the set S of time block sizes, the corresponding number of copies of the data after the maximum overlap discrete wavelet transform is copied, and these data are further decomposed respectively according to different time block sizes (each individual decomposition step here is similar to the patch decomposition of patchTST in the classical time series model). At this time, the data dimension becomes 4D, but the internal dimensions of each four-dimensional data are different. A dual attention mechanism is applied to each of them, and then the dimension generated by the time block decomposition is unfolded. At this time, the data dimension is reduced to 3D. All the data after the dual attention is aggregated through a linear layer (acting as an aggregator). At this time, the data dimension is the same as that of the data after the maximum linear discrete wavelet transform. After the inverse maximum overlap discrete wavelet transform, the data dimension is the same as the original data dimension at this time. Then, a multi-layer perceptron and inverse normalization are used as predictors to complete the final air quality prediction.

[0094] The present invention can comprehensively consider the time dependence in 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 them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements 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 the time-varying correlation between air quality data, characterized in that It includes the following steps: Step S1: Obtain air quality data and perform normalization processing on it. Based on the maximum overlap discrete wavelet transform, perform feature decomposition on the normalized data, and decompose it into multiple uncorrelated detail series and a smooth series; Step S2: Construct a multi-scale time series module, divide the decomposed data to obtain time blocks of different sizes, and capture the time-varying correlation between data from the divided data; Step S3: Based on the time-varying correlation between data, reconstruct the air quality data through the inverse maximum overlap wavelet transform, and then use a multi-layer perceptron for processing and inverse normalization as a predictor to predict the air quality.

2. The air quality prediction method considering the time-varying correlation between air quality data according to claim 1, characterized in that The step S1 includes the following steps: Step S1.1: Select a set of wavelet filters, including a high-pass filter and a low-pass filter, and determine the decomposition level according to the length of the obtained air quality data; Step S1.2: Based on the selected wavelet filters, decompose the normalized air quality data. During each layer of decomposition, perform a circular convolution operation on the filtering result of the low-pass filter of the previous layer through the high-pass filter to obtain the detail coefficients of this layer. Perform a circular convolution on the filtering result of the low-pass filter of the previous layer through the low-pass filter to obtain the approximation coefficients and use them as the input data for the next layer of decomposition. The detail coefficients of each layer constitute multiple uncorrelated detail series, and the approximation coefficients of each layer constitute a smooth series.

3. The air quality prediction method considering the time-varying correlation between air quality data according to claim 2, wherein: The detail coefficients in the step S1.2 are obtained by, at each time point t, using a normalized high-pass filter h t to perform a circular convolution operation on the low-pass filtering result v j-1 of the previous layer, so as to obtain the detail coefficients D j,k : Among them, M represents the filter length, m∈M represents the index of the high-pass filter length, and N represents the data length; The approximation coefficient is obtained by using a normalized low-pass filter g t to perform circular convolution on the low-pass filtering result v of the previous layer j-1 to obtain the approximation coefficient S j,t , and the formula is as follows: Use the approximation coefficient S j,t as the input data v for the next-level decomposition j = S j,t .

4. The air quality prediction method considering the time-varying correlation between air quality data according to claim 3, wherein: In the step S3, first, obtain and normalize the high-pass filter coefficients h t and the low-pass filter coefficients g t ; Then, starting from the lowest-frequency approximation coefficients, denote v j = S K,t , j = K - 1, K - 2, …, 1, where S K,t represents the approximation coefficients of the last layer, and the formula is as follows: Among them, D j represents the detail coefficient of the j-th layer.

5. The air quality prediction method considering the time-varying correlation between air quality data according to claim 2, characterized in that: In the step S1.2, in each decomposition, the pyramid algorithm is used to process the data based on a specific wavelet p m and a scaling q m filter, and the filter satisfies the even-length scaling assumption: Among them, m = 0, 1, …, M - 1, M represents the filter length, and n represents any non-zero integer.

6. The air quality prediction method considering the time-varying correlation between air quality data according to claim 1, wherein: The step S2 includes the following steps: Step 2.1: Divide the decomposed data based on time blocks of various sizes to obtain time blocks of different sizes; Step 2.2: Pass all the data after time block division through a dual attention mechanism operation to capture the time-varying correlation between time points within the time blocks and between the time blocks; Step S2.3: Aggregate the time-varying correlation information to make its dimension consistent with the dimension of the decomposed data.

7. The air quality prediction method considering the time-varying correlation between air quality data according to claim 6, wherein: In the step 2.1, define a set of time block sizes, obtain the same number of data copies of time blocks from the decomposed data, and decompose each copy of data based on different time block sizes in the set.

8. The air quality prediction method considering the time-varying correlation between air quality data according to claim 6, characterized in that: The dual attention mechanism in step 2.2 includes intra-time-block attention, and the intra-time-block attention is applied to each time block X after time block division i embedded along the feature dimension d to obtain features The dimension of the embedded features is d m , and then the features are subjected to a trainable linear transformation to obtain the key in the attention operation and the value At the same time, a trainable query matrix is used to merge the time block context, and the cross-attention between the trainable query matrix and the key is calculated The cross-attention calculation formula is as follows: Concatenate the attention results within all time blocks to obtain Attn intra , which is used to represent the local details of adjacent time steps in the time series.

9. The air quality prediction method considering the time-varying correlation between air quality data according to claim 6, characterized in that: The dual attention mechanism in the step 2.2 includes inter-temporal-block attention. For the time series after temporal block division, first perform an embedding operation along the feature dimension, embedding from the feature dimension d to the feature dimension d m , then rearrange the data to merge the number of temporal blocks and the embedded feature d ′ m , to obtain For , perform a linear mapping to obtain the query the key and the value Calculate the attention Establish the relationship between temporal blocks to capture the global correlation of the time series. The attention calculation formula is as follows: Among them, the embedded feature d ′ m represents the time block size multiplied by the dimension d of the embedded feature m .

10. A method for predicting air quality considering the time-varying correlation between air quality data according to claim 1, characterized in that: The step S3 includes the following steps: Step S3.1: According to the type of wavelet filter, obtain the corresponding high-pass filter coefficients and low-pass filter coefficients, calculate the number of layers of the feature decomposition coefficient array; start from the highest decomposition layer and reconstruct layer by layer downward to obtain the data after the inverse maximum overlap wavelet transform; Step S3.2: Pass the data after the inverse maximum overlap wavelet transform through a multi-layer perceptron, and finally perform inverse normalization 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

  • Method and system for forecasting non-stationary time-series

    US20230108916A1