Air quality prediction method and device based on multi-modal spatio-temporal fusion, equipment and medium

By employing a multimodal spatiotemporal fusion method, utilizing ground monitoring and satellite remote sensing data, combined with adaptive smoothing filters and multi-window time-frequency analysis, and employing various machine learning techniques for air quality prediction, this approach solves the problems of single data source and insufficient cross-modal fusion in existing technologies, and achieves high-precision air quality prediction.

CN121278686BActive Publication Date: 2026-04-28CENT SOUTH UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CENT SOUTH UNIV
Filing Date
2025-12-09
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing air quality forecasting technologies rely on a single data source, failing to fully leverage the complementary advantages of ground monitoring stations and satellite remote sensing data. Furthermore, they lack cross-modal semantic consistency constraints, making it difficult to achieve high-precision air quality forecasting.

Method used

A multimodal spatiotemporal fusion method is adopted, which acquires ground monitoring text data and satellite remote sensing image data, uses an adaptive smoothing filter for trend and residual decomposition, combines multi-window time-frequency analysis, and uses a gated fusion module, graph neural network, Transformer module and linear regression module for prediction. Finally, the prediction results are optimized through an error correction module.

Benefits of technology

It achieves high-precision, wide-range air quality forecasting, improves the accuracy and reliability of data fusion, and adapts to the differences in spectral characteristics of different sites.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121278686B_ABST
    Figure CN121278686B_ABST
Patent Text Reader

Abstract

The application discloses an air quality prediction method and device based on multi-modal space-time fusion, equipment and medium, relates to the technical field of air quality prediction, and comprises the following steps: fusing ground monitoring and satellite remote sensing data, then adopting an adaptive smoothing filter to dynamically separate trends and residuals from the fused data, capturing multi-scale periodic characteristics through multi-window time-frequency analysis, then predicting the multi-scale periodic characteristics through gated fusion, hybrid geographic / data-driven graph neural network, Transformer time series modeling and error correction to obtain air quality prediction results, realizing multi-source heterogeneous data fusion and adaptive differences in spectral characteristics of different sites, and improving the accuracy and reliability of air quality prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of air quality prediction technology, and in particular to an air quality prediction method, apparatus, equipment and medium based on multimodal spatiotemporal fusion. Background Technology

[0002] Currently, air quality forecasting primarily relies on ground-based monitoring stations and satellite remote sensing technology. Ground-based monitoring stations can provide high-precision PM2.5 concentration measurements, but due to high construction costs, their spatial distribution is extremely sparse, resulting in large monitoring blind spots. While satellite remote sensing technology has a wide coverage area, its spatiotemporal resolution is limited and it is easily affected by cloud interference, failing to provide high-precision local air quality data. Furthermore, existing technologies mostly use a single data source for forecasting, failing to fully leverage the complementary advantages between different modalities. Traditional statistical methods struggle to handle such complex time-varying characteristics, while existing deep learning methods often employ fixed decomposition strategies, lacking the ability to adapt to differences in the spectral characteristics of different stations. In addition, cross-modal fusion technology lags behind; ground and satellite data differ fundamentally in physical meaning and spatiotemporal scale, and simple splicing cannot handle modal heterogeneity. Existing methods lack cross-modal semantic consistency constraints, failing to effectively separate shared and specific information.

[0003] Therefore, there is an urgent need for an air quality forecasting method to achieve high-precision, wide-range air quality forecasting. Summary of the Invention

[0004] The main objective of this application is to provide an air quality prediction method, apparatus, and medium based on multimodal spatiotemporal fusion, aiming to solve the technical problem of how to achieve high-precision and wide-range air quality prediction.

[0005] To achieve the above objectives, this application proposes an air quality prediction method based on multimodal spatiotemporal fusion, comprising:

[0006] Acquire air quality data, wherein the air quality data includes ground monitoring text data and satellite remote sensing image data;

[0007] The air quality data is preprocessed to obtain preprocessed data;

[0008] The preprocessed data is decomposed into trend and residual characteristics using an adaptive smoothing filter to obtain trend and residual characteristics.

[0009] Multi-window time-frequency analysis is performed on the residual characterization to obtain a multi-scale time-frequency characterization;

[0010] The multi-scale time-frequency representation and the trend representation are input into a preset air quality prediction model to obtain air quality prediction results. The preset air quality prediction model includes a gated fusion module, a graph neural network, a Transformer module, a linear regression module, and an error correction module.

[0011] The steps of inputting the multi-scale time-frequency representation and the trend representation into a preset air quality prediction model to obtain air quality prediction results include:

[0012] The multi-scale time-frequency representation and the trend representation are input into the gated fusion module for element-wise weighted fusion to obtain the basic fusion features;

[0013] Based on the aforementioned basic fusion features, spatial dependency modeling is performed using the graph neural network to obtain spatial fusion features;

[0014] The spatial fusion features are input into the Transformer module to capture long-term temporal dependencies through a multi-head self-attention mechanism, thus obtaining spatiotemporal fusion features;

[0015] The spatiotemporal fusion features are input into the linear regression module to obtain the initial prediction results;

[0016] The initial prediction results are corrected and optimized by the error correction module to obtain the air quality prediction results.

[0017] In one embodiment, the step of inputting the multi-scale time-frequency representation and the trend representation into the gated fusion module for element-wise weighted fusion to obtain the basic fusion features includes: the gated fusion module includes a first linear layer, a second linear layer, a Sigmoid activation function layer and a feature fusion layer;

[0018] The multi-scale time-frequency representation is input into the first linear layer and mapped to a preset feature dimension to obtain the time-frequency mapping feature;

[0019] The trend representation is input into the second linear layer and mapped to a preset feature dimension to obtain the trend mapping feature;

[0020] The time-frequency mapping feature and the trend mapping feature are concatenated to obtain the concatenated feature;

[0021] The concatenated features are input into the Sigmoid activation function layer to obtain the fusion gating coefficients;

[0022] Multiply the time-frequency mapping features by the fusion gate coefficients to obtain the weighted time-frequency features;

[0023] The trend gating coefficient is calculated based on the fusion gating coefficient.

[0024] Multiply the trend mapping feature and the trend gating coefficient to obtain the weighted trend feature;

[0025] The weighted time-frequency features and the weighted trend features are added together by the feature fusion layer to obtain the basic fused features.

[0026] In one embodiment, the step of obtaining spatial fusion features by performing spatial dependency modeling through the graph neural network based on the basic fusion features includes:

[0027] Obtain the geographic coordinates of multiple monitoring stations;

[0028] The Euclidean distance between any two stations is calculated based on the geographical coordinates of multiple monitoring stations.

[0029] The Euclidean distance is converted into a geographic adjacency matrix using a radial basis function, wherein the bandwidth of the radial basis function is set to the median of all the Euclidean distances;

[0030] The basic fusion features are subjected to two linear projections to obtain the query matrix and the key matrix, respectively;

[0031] Based on the query matrix and key matrix, a data-driven adjacency matrix is ​​obtained through Softmax processing;

[0032] The geographic adjacency matrix and the data-driven adjacency matrix are weighted and summed according to a preset ratio to obtain a hybrid adjacency matrix;

[0033] The basic fusion features and the hybrid adjacency matrix are input into the graph neural network and calculated using a multi-head attention mechanism to obtain the spatial association weights of the monitoring sites;

[0034] The initial spatial features are obtained by updating the site features using the spatial association weights.

[0035] The initial spatial features are normalized to obtain spatial fusion features.

[0036] In one embodiment, the step of inputting the spatial fusion features into the Transformer module to capture long-term temporal dependencies through a multi-head self-attention mechanism to obtain spatiotemporal fusion features includes:

[0037] Add sine and cosine position codes to the spatial fusion features to obtain spatial features with position information, wherein the sine and cosine position code dimensions are consistent with the feature dimensions of the spatial fusion features, and the period parameter of the position code is set to a preset value.

[0038] The spatial features with location information are input into the encoder of the Transformer module to obtain spatiotemporal fusion features. The encoder includes three cascaded coding layers, each consisting of a multi-head self-attention sub-layer and a feedforward neural network sub-layer.

[0039] The step of inputting the spatial features with location information into the encoder of the Transformer module to obtain spatiotemporal fusion features includes:

[0040] The spatial features with location information are input into the multi-head self-attention sub-layer for linear projection to obtain the query matrix, key matrix and value matrix;

[0041] The original attention score is calculated based on the query matrix and key matrix.

[0042] The original attention scores are masked and normalized using the Softmax function to obtain the attention weights;

[0043] Multiply the attention weights and value matrix to obtain the multi-head attention output;

[0044] The multi-head attention output is input into the feedforward neural network sub-layer to obtain the encoding layer output;

[0045] Global average pooling along the time dimension is performed on the output of the encoding layer to obtain spatiotemporal fusion features.

[0046] In one embodiment, the step of inputting the spatiotemporal fusion features into the linear regression module to obtain initial prediction results includes:

[0047] The spatiotemporal fusion features are input into the feature mapping layer of the linear regression module for linear transformation to obtain an intermediate dimension, wherein the intermediate dimension is a dimension that matches the number of preset prediction indicators.

[0048] The intermediate dimension features are input into the regression calculation layer of the linear regression module for calculation to obtain the original predicted value;

[0049] The original predicted value is physically constrained according to preset requirements to obtain the constrained predicted value;

[0050] By combining the regional pollution distribution trend in satellite remote sensing image data, the constrained predicted values ​​are fine-tuned for spatial consistency to obtain the initial prediction results;

[0051] The step of correcting and optimizing the initial prediction result using the error correction module to obtain the air quality prediction result includes:

[0052] Obtain historical real-time air quality data;

[0053] The air quality error is obtained by calculating the initial prediction result and the historical real air quality data;

[0054] The air quality error is processed by a preset regression model in the error correction module to obtain the corrected residual;

[0055] The initial prediction result is combined with the corrected residual to calculate the air quality prediction result.

[0056] In one embodiment, the step of using an adaptive smoothing filter to perform trend and residual decomposition on the preprocessed data to obtain trend and residual representations includes:

[0057] Initialize the learnable weight parameter vector of the adaptive smoothing filter, wherein the dimension of the vector is the same as the preset filter kernel length;

[0058] The learnable weight parameter vector is normalized using the Softmax function to generate a normalized filter kernel;

[0059] The preprocessed data is subjected to a one-dimensional convolution operation using the normalized filter kernel to obtain a trend representation.

[0060] The difference is calculated by combining the preprocessed data and the trend representation.

[0061] The difference is used as a residual representation.

[0062] In one embodiment, the step of performing multi-window time-frequency analysis on the residual characterization to obtain a multi-scale time-frequency characterization includes:

[0063] Select multiple window functions of different lengths, each window function corresponding to a preset time window length;

[0064] The residual representation is subjected to short-time Fourier transform with multiple window functions to obtain the time-frequency amplitude spectrum corresponding to each time window;

[0065] Energy statistics are performed on each of the time-frequency amplitude spectra to obtain the energy values ​​of the corresponding frequency components;

[0066] The energy values ​​are weighted according to the corresponding frequencies using a soft attention mechanism to obtain multiple frequency weights;

[0067] Multiply the time-frequency amplitude spectrum by the corresponding frequency weight to obtain the weighted time-frequency feature;

[0068] All the weighted time-frequency features are concatenated to obtain a multi-scale time-frequency representation.

[0069] Furthermore, to achieve the above objectives, this application also proposes an air quality prediction device based on multimodal spatiotemporal fusion, wherein the air quality prediction device based on multimodal spatiotemporal fusion includes:

[0070] The acquisition module is used to acquire air quality data, wherein the air quality data includes ground monitoring text data and satellite remote sensing image data;

[0071] The preprocessing module is used to preprocess the air quality data to obtain preprocessed data;

[0072] The decomposition module is used to perform trend and residual decomposition on the preprocessed data using an adaptive smoothing filter to obtain trend representation and residual representation.

[0073] The module is used to perform multi-window time-frequency analysis on the residual characterization to obtain multi-scale time-frequency characterization;

[0074] The results module is used to input the multi-scale time-frequency representation and the trend representation into a preset air quality prediction model to obtain air quality prediction results. The preset air quality prediction model includes a gated fusion module, a graph neural network, a Transformer module, a linear regression module, and an error correction module. It is also used to input the multi-scale time-frequency representation and the trend representation into the gated fusion module for element-wise weighted fusion to obtain basic fusion features; based on the basic fusion features, perform spatial dependency modeling through the graph neural network to obtain spatial fusion features; input the spatial fusion features into the Transformer module to capture long-term time dependencies through a multi-head self-attention mechanism to obtain spatiotemporal fusion features; input the spatiotemporal fusion features into the linear regression module to obtain initial prediction results; and correct and optimize the initial prediction results through the error correction module to obtain the final air quality prediction results.

[0075] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the air quality prediction method based on multimodal spatiotemporal fusion as described above.

[0076] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the air quality prediction method based on multimodal spatiotemporal fusion as described above.

[0077] This application integrates ground monitoring and satellite remote sensing data, then uses an adaptive smoothing filter to dynamically separate trends and residuals from the integrated data. Multi-window time-frequency analysis captures multi-scale periodic features, and then uses gated fusion, hybrid geographic / data-driven graph neural networks, Transformer time-series modeling, and error correction to predict air quality. This achieves multi-source heterogeneous data fusion and adapts to the differences in spectral characteristics of different stations, thus improving the accuracy and reliability of air quality prediction. Attached Figure Description

[0078] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0079] Figure 1 This is a flowchart illustrating the first embodiment of the air quality prediction method based on multimodal spatiotemporal fusion of this application;

[0080] Figure 2 This is a block diagram of the preset air quality prediction model structure of the first embodiment of the air quality prediction method based on multimodal spatiotemporal fusion in this application;

[0081] Figure 3 This is a flowchart illustrating the second embodiment of the air quality prediction method based on multimodal spatiotemporal fusion in this application;

[0082] Figure 4 This is a schematic diagram of the module structure of the air quality prediction device based on multimodal spatiotemporal fusion in this application;

[0083] Figure 5 This is a schematic diagram of the hardware operating environment of the air quality prediction method based on multimodal spatiotemporal fusion in the embodiments of this application.

[0084] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0085] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0086] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0087] Currently, air quality forecasting primarily relies on ground-based monitoring stations and satellite remote sensing technology. Ground-based monitoring stations can provide high-precision PM2.5 concentration measurements, but due to high construction costs, their spatial distribution is extremely sparse, resulting in large monitoring blind spots. While satellite remote sensing technology has a wide coverage area, its spatiotemporal resolution is limited and it is easily affected by cloud interference, failing to provide high-precision local air quality data. Furthermore, existing technologies mostly use a single data source for forecasting, failing to fully leverage the complementary advantages between different modalities. Traditional statistical methods struggle to handle such complex time-varying characteristics, while existing deep learning methods often employ fixed decomposition strategies, lacking the ability to adapt to differences in the spectral characteristics of different stations. In addition, cross-modal fusion technology lags behind; ground and satellite data differ fundamentally in physical meaning and spatiotemporal scale, and simple splicing cannot handle modal heterogeneity. Existing methods lack cross-modal semantic consistency constraints, failing to effectively separate shared and specific information.

[0088] Therefore, this application proposes an air quality prediction method based on multimodal spatiotemporal fusion to solve the above-mentioned problems. The main solution of this application embodiment is as follows: acquiring air quality data, wherein the air quality data includes ground monitoring text data and satellite remote sensing image data; preprocessing the air quality data to obtain preprocessed data; using an adaptive smoothing filter to perform trend and residual decomposition on the preprocessed data to obtain trend representation and residual representation; performing multi-window time-frequency analysis on the residual representation to obtain multi-scale time-frequency representation; inputting the multi-scale time-frequency representation and the trend representation into the preset air quality prediction model to obtain the air quality prediction result, wherein the preset air quality prediction model includes a gated fusion module, a graph neural network, a Transformer module, a linear regression module, and an error correction module.

[0089] Based on the above, this application also provides an air quality prediction method based on multimodal spatiotemporal fusion, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the air quality prediction method based on multimodal spatiotemporal fusion according to this application. In this embodiment, the air quality prediction method based on multimodal spatiotemporal fusion includes steps S10 to S50:

[0090] Step S10: Obtain air quality data.

[0091] It should be noted that the acquired air quality data includes both ground-based monitoring text data and satellite remote sensing image data. The ground-based monitoring data originates from fixed stations of the National Ambient Air Quality Monitoring Network, collecting PM2.5 data. 2.5 PM 10Hourly concentrations of pollutants such as SO2, NO2, CO, and O3 are collected to form a spatiotemporal matrix, typically from approximately 20-50 sites. Satellite remote sensing data utilizes MODIS / Terra and Sentinel-5P aerosol optical thickness products, and after cloud detection and quality screening, regional image sequences with a resolution of 1km × 1km are acquired. The two types of data are complementary in terms of spatiotemporal scale; ground data provides high-precision point measurements but has sparse coverage, while satellite data provides continuous area coverage but is affected by cloud interference and fluctuates in inversion accuracy. Meteorological auxiliary information (temperature, humidity, wind speed and direction) and geospatial coordinates are recorded simultaneously during data acquisition, providing a basic input for subsequent adaptive time-frequency decomposition and cross-modal fusion. The data sampling frequency is uniformly at the hourly level, and the time range covers at least one year to capture seasonal patterns.

[0092] Step S20: Preprocess the air quality data to obtain preprocessed data.

[0093] It should be noted that the acquired air quality data undergoes systematic preprocessing to ensure data quality consistency with model input. Specifically, firstly, outlier truncation is performed. The 3σ principle is applied to the historical sequences of each monitoring station, i.e., a threshold constant of 3 is set, truncating outlier observations exceeding the mean ± 3 times the standard deviation to the boundary, effectively eliminating outliers caused by sensor malfunctions or extreme events. Secondly, missing value imputation is implemented. For a small number of missing data, linear interpolation or monotonic spline interpolation in the time dimension is used. For long-term continuous missing data, spatiotemporal interpolation is performed by combining data from adjacent stations or periodic filling is performed using the periodic characteristics of pollutants to ensure the integrity of the time series. Finally, Z-score standardization is performed. The mean and standard deviation of the training set are calculated for each station and satellite channel, converting the raw data into a standardized form with a mean of 0 and a standard deviation of 1, eliminating dimensional differences between different pollutants and sensors. This preprocessing scheme specifically considers the heterogeneous characteristics of ground monitoring data and satellite remote sensing data, implementing channel-level independent standardization for satellite multispectral channels to preserve the physical characteristics of each band. The preprocessed data exhibits statistical consistency, low noise, and uniform scale, laying a data foundation for subsequent adaptive time-frequency decomposition and cross-modal fusion, while avoiding model training instability caused by differences in dimensionality.

[0094] Step S30: Use an adaptive smoothing filter to perform trend and residual decomposition on the preprocessed data to obtain trend representation and residual representation.

[0095] It should be noted that this embodiment uses a learnable adaptive smoothing filter (ASF) to achieve accurate separation of trend and residual.

[0096] Further, step S30 includes: first, initializing the learnable weight parameter vector of the adaptive smoothing filter, wherein the dimension of the vector is the same as the length of the preset filter kernel. Specifically, initializing a vector with a dimension of... Learnable weight parameter vector ,in The preset filter kernel length (typically 9-25) is usually chosen to be an odd number (such as 9, 13 or 25) in order to provide more weight at the center of the time series. The initial value can be a small random value or a central Gaussian distribution to emphasize the central weight.

[0097] Next, the learnable weight parameter vector is normalized using the Softmax function to generate a normalized filter kernel. Specifically, the learnable weight parameter vector is normalized using the Softmax function. Perform normalization processing to generate a normalized filter kernel. The Softmax function ensures that the weights of the filter kernel are non-negative and sum to 1, allowing it to be used as a weighted average filter. Specifically, it is expressed as follows:

[0098]

[0099] in, It is the base of the natural logarithm. The function of the Softmax function is to convert the weights into a probability distribution form, ensuring that the sum of the weights of the filter kernel is 1.

[0100] Next, a one-dimensional convolution operation is performed on the preprocessed data using a normalized filter kernel to obtain a trend representation. Specifically, it is expressed as:

[0101]

[0102] in, This represents the preprocessed data, with the following shape: ,in It's the batch size. It is the length of the time series. It refers to the number of monitoring stations. This represents a one-dimensional convolution operation. Reflection padding is used for boundary handling to prevent boundary deviation.

[0103] Then, the preprocessed data and trend representation are calculated to obtain the difference. Finally, the difference is used as the residual representation. Specifically, it is expressed as:

[0104]

[0105] The residual representation incorporates short-term fluctuations and seasonal variations in the data, which are crucial for subsequent time-frequency analysis and forecasting. To ensure the physical validity of the trend curve, a second-order smoothing regularization term is introduced. This regularization term encourages the second derivative of the trend curve to approach zero, effectively suppressing excessive fluctuations. Specifically, it is expressed as follows:

[0106]

[0107] in, This indicates a summation operation performed over all batches b, all time points t, and all monitoring stations n. The second-order difference operation is defined as follows: , This represents the square of the second-order difference of the trend representation at time point t in the b-th batch, used to calculate the smoothness of trend changes. By adding this regularization term to the total loss function, the learnable weight parameter vector can be optimized, thereby further improving the smoothness of the trend representation. Compared with traditional STL or EMD decomposition methods, the method adopted in this embodiment breaks through the limitations of fixed filtering strategies and can adapt to the pollution evolution characteristics of different regions: in areas with drastic fluctuations such as industrial areas, the filter kernel automatically narrows to retain abrupt changes; in stable areas such as background stations, the filter kernel automatically widens to extract long-term trends. This adaptive mechanism significantly improves the accuracy of trend-residual decomposition, laying a solid foundation for subsequent multi-scale time-frequency analysis, while avoiding the subjectivity and incompatibility problems of manually setting parameters.

[0108] Step S40: Perform multi-window time-frequency analysis on the residual characterization to obtain multi-scale time-frequency characterization.

[0109] It should be noted that the residual representation includes short-term fluctuation information of air quality data (such as intraday concentration changes, sudden pollution disturbances, etc.), and these fluctuations often have multi-timescale characteristics (such as 8-hour, 12-hour, and 24-hour cycles). In order to comprehensively capture the frequency characteristics at different scales, this embodiment achieves refined representation through multi-window time-frequency analysis.

[0110] Further, step S40 includes: First, selecting multiple window functions of different lengths, each window function corresponding to a preset time window length. Specifically, for the multi-scale periodicity of the residual representation, J window functions of different lengths are selected. Window functions are used to weight data at different time points. Common window functions include the Hanning window and the Hamming window, each corresponding to a specific time window length. ,like (Short-term fluctuations) (Time fluctuations) (Daily cycle fluctuation).

[0111] Next, the residual representation is subjected to short-time Fourier transform with multiple window functions to obtain the time-frequency amplitude spectrum corresponding to each time window. Specifically, the residual representation... By performing short-time Fourier transforms with multiple window functions, the time-frequency amplitude spectrum corresponding to each time window is obtained. The specific formula is as follows:

[0112]

[0113] in, Indicates the first The window function at the first The first batch, the first The frequency, the first The first time frame and the first The time-frequency amplitude spectrum of each monitoring station This is the time offset. Indicates the first The first batch, the first The frequency, the first The first time frame and the first Residual characterization of each monitoring station, Indicates the first The window function at time offset The value at that location, Represents the imaginary unit. Represents a complex exponential function. Indicates the range from 0 to Sum all time points within the window. This means taking the absolute value to obtain the time-frequency amplitude spectrum, which is the amplitude of each frequency component in the frequency domain.

[0114] Next, energy statistics are performed on each time-frequency amplitude spectrum to obtain the energy values ​​of the corresponding frequency components. Specifically, it is expressed as:

[0115]

[0116] in, Indicates the first The window function at the first The frequency and the first One monitoring station, Indicates the first The number of time frames for each window function.

[0117] Then, using a soft attention mechanism, weights are assigned to the corresponding frequencies based on the energy values, resulting in multiple frequency weights, specifically represented as follows:

[0118]

[0119] in, The temperature parameter is used to control the sparsity of the soft attention weights; a smaller value indicates a lower sparsity. Values ​​that result in a more concentrated weight distribution will lead to a larger weight distribution. The value will make the weight distribution more even. Represents an exponential function. A variable representing frequency, used to iterate through all frequencies during the summation process.

[0120] Next, multiply the time-frequency amplitude spectrum by the corresponding frequency weights to obtain the weighted time-frequency characteristics. The specific calculation formula is as follows:

[0121]

[0122] in, Indicates the first The total number of frequency bins corresponding to each window function is determined by the specific time window length. Decide, Indicates the first The window function at the first The first batch, the first The first time frame and the first The weighted time-frequency characteristics of each monitoring station.

[0123] Finally, all weighted time-frequency features are concatenated to obtain a multi-scale time-frequency representation. The specific calculation formula is as follows:

[0124]

[0125] in, This indicates a splicing operation. This multi-scale time-frequency representation integrates key time-frequency information from different time windows, comprehensively reflecting the multi-scale fluctuation patterns in the residual representation and providing rich feature inputs for subsequent spatiotemporal fusion modeling. Through the above process, key frequency features related to air quality prediction in the residual are accurately captured, improving the model's adaptability to complex fluctuation patterns.

[0126] Step S50: Input the multi-scale time-frequency characterization and trend characterization into the preset air quality prediction model to obtain the air quality prediction results.

[0127] It should be noted that, as Figure 2The diagram shows the framework of a pre-defined air quality prediction model. This model includes a gating fusion module, a graph neural network, a Transformer module, a linear regression module, and an error correction module. It improves the accuracy of air quality prediction by combining multi-scale time-frequency representations and trend representations. The model's design fully considers the complexity and variability of air quality data, integrating various advanced data processing and machine learning techniques to achieve accurate air quality predictions.

[0128] Specifically, first, the model receives multi-scale time-frequency representations and trend representations as input. These representations are obtained through preliminary data processing steps, including multi-window time-frequency analysis and adaptive smoothing filter processing, which can effectively capture periodic variations and long-term trends in air quality data.

[0129] Next, the gating fusion module in the model fuses these representations. This module uses a gating mechanism to adaptively adjust the weights of different features, ensuring that the model can dynamically select the most important information based on the characteristics of the data. This step is crucial for integrating features from different sources and time scales, helping to improve the model's ability to understand and process complex data.

[0130] The fused features are then fed into a graph neural network module. Graph neural networks can handle the spatial relationships between monitoring stations, representing their mutual influences through a graph structure. This is crucial for understanding the propagation and variation patterns of air quality in different regions, especially in urban environments where air quality is influenced by a variety of spatial factors.

[0131] The Transformer module then processes the time-series data to capture long-term temporal dependencies. Through a self-attention mechanism, the model can identify and utilize key patterns in the time series, which is of great significance for predicting future changes in air quality.

[0132] Following time series analysis, the linear regression module generates preliminary forecasts. Based on the fused features and time series analysis results, this module provides a simple yet effective forecasting framework for quickly estimating the changing trends of air quality indicators.

[0133] Finally, the error correction module evaluates and corrects the preliminary prediction results. By comparing the prediction results with historical data, this module can identify and correct biases in the predictions, ensuring the accuracy and reliability of the model output.

[0134] In summary, the preset air quality prediction model of this invention, by integrating multiple advanced data processing and machine learning technologies, can handle complex spatiotemporal data and provide accurate air quality predictions. This modular design not only improves the model's predictive performance but also enhances its scalability and flexibility, enabling it to adapt to different application scenarios and needs.

[0135] This embodiment integrates ground monitoring and satellite remote sensing data, then uses an adaptive smoothing filter to dynamically separate trends and residuals from the fused data. Multi-window time-frequency analysis captures multi-scale periodic features, and then uses gated fusion, hybrid geographic / data-driven graph neural networks, Transformer time-series modeling, and error correction to predict the multi-scale periodic features, thus obtaining air quality prediction results. This achieves multi-source heterogeneous data fusion and adapts to the differences in spectral characteristics of different stations, improving the accuracy and reliability of air quality prediction.

[0136] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 The air quality prediction method based on multimodal spatiotemporal fusion further includes steps S201 to S205 in step S50:

[0137] Step S201: Input the multi-scale time-frequency representation and trend representation into the gated fusion module for element-wise weighted fusion to obtain the basic fusion features.

[0138] It should be noted that the multi-scale time-frequency representation provides rich temporal and frequency information by capturing the periodic and non-periodic components in the data. This information is crucial for understanding the dynamic changes in air quality because it reveals patterns of change in air quality indicators across different time scales. On the other hand, the trend representation, extracted through an adaptive smoothing filter, reveals long-term trends and seasonal variations in the data, which are equally important for predicting future air quality. The gated fusion module comprises a first linear layer, a second linear layer, a sigmoid activation function layer, and a feature fusion layer. This module is responsible for effectively integrating the multi-scale time-frequency representation and the trend representation to generate the basic fused features. This process is achieved through element-wise weighted fusion, where the weight of each element is dynamically determined by the gating mechanism, ensuring that the model adaptively highlights important features and suppresses unimportant or noisy features.

[0139] Further, step S201 includes: firstly, mapping the multi-scale time-frequency representation input to the first linear layer to a preset feature dimension to obtain time-frequency mapped features; and secondly, mapping the trend representation input to the second linear layer to a preset feature dimension to obtain trend mapped features. Specifically, these two linear layers are referred to as the first linear layer and the second linear layer, respectively. Their purpose is to map the input features to a preset feature dimension, which is predetermined based on the model's design requirements and the characteristics of the data. In this way, the time-frequency representation is transformed into time-frequency mapped features, and the trend representation is transformed into trend mapped features. These two mapped features contain the key information of the original representation and are adjusted to the same dimension for subsequent fusion operations.

[0140] Next, the time-frequency mapping features and trend mapping features are concatenated to obtain the concatenated features. Specifically, after dimensional mapping, the time-frequency mapping features and trend mapping features are in the same dimensional space, but still maintain their individual feature independence. To enable the model to integrate the global information of both types of features to generate reasonable fusion weights, they need to be concatenated. Specifically, the time-frequency mapping features and trend mapping features are concatenated according to the feature channel dimension (i.e., the attribute dimension of the feature), forming the concatenated features. The essence of the concatenation process is information aggregation. For example, if both the time-frequency mapping features and trend mapping features are 256-dimensional, the concatenation will form a 512-dimensional feature vector, where the first 256 dimensions retain time-frequency fluctuation information, and the last 256 dimensions retain trend pattern information. This integration method does not lose the original information of either type of feature and allows subsequent modules to simultaneously observe the global distribution of both types of features, providing a complete basis for the calculation of dynamic weights.

[0141] Next, the concatenated features are input into a Sigmoid activation function layer to obtain fusion gating coefficients. Specifically, to further control the contributions of time-frequency features and trend features in the fusion process, the model employs a gating mechanism. The concatenated feature vector is input into a Sigmoid activation function layer, which outputs fusion gating coefficients. These coefficients determine the relative importance of time-frequency features and trend features in the final fused features. The output of the Sigmoid function ranges from 0 to 1, allowing the gating coefficients to act as weights, automatically adjusting the contribution of different features. The closer the coefficient value of each element of the fusion gating coefficient (at each time point in the time series, each monitoring station, and each feature dimension) is to 1, the more significant the impact of the time-frequency mapping feature on the prediction result at that location; the closer it is to 0, the more significant the impact of the trend mapping feature. For example, during peak industrial emission periods, dimensions in the time-frequency features related to short-term pollution fluctuations will be assigned higher gating coefficients; while during the stable period of seasonal transitions, the coefficients of dimensions in the trend features related to long-term trends will be closer to 1. This dynamic adjustment capability is the core advantage of the gating mechanism, far exceeding simple fusion methods with fixed weights.

[0142] Subsequently, the time-frequency mapping features and the fusion gating coefficients are multiplied to obtain the weighted time-frequency features. Specifically, the time-frequency mapping features are multiplied element-wise by the fusion gating coefficients, meaning each feature element is multiplied by its corresponding gating coefficient, ultimately yielding the weighted time-frequency features. This process achieves dynamic filtering of the time-frequency features: feature components with high gating coefficients (such as high-frequency fluctuations in sudden pollution events) are amplified, while components with low coefficients (such as noise fluctuations unrelated to prediction) are weakened. For example, when short-term dust is detected around a monitoring station, the dimensions of the time-frequency features related to 1-2 hour fluctuations are amplified by the gating coefficients, thus highlighting this sudden information in subsequent modeling; under normal weather conditions, the weights of these high-frequency components are automatically reduced to avoid interfering with the capture of the overall trend.

[0143] Then, based on the fusion gating coefficient, the trend gating coefficient is calculated. Specifically, to ensure a reasonable balance between the total weights of time-frequency features and trend features, the trend gating coefficient is obtained through complementary operations of the fusion gating coefficient: the trend gating coefficient at each position equals 1 minus the fusion gating coefficient at that position. The advantage of this complementary design is that the weights of the two types of features always exhibit an inverse relationship, preventing one type of feature from being completely ignored. For example, if the fusion gating coefficient is 0.7 on a certain feature dimension (time-frequency features dominate), then the trend gating coefficient is automatically 0.3 (trend features assist); if the fusion gating coefficient is 0.2 (trend features dominate), then the trend gating coefficient is 0.8 (trend features dominate). This mechanism ensures the flexibility and stability of feature fusion, adapting to complex and ever-changing pollution scenarios while avoiding extreme weight allocation.

[0144] Then, the trend mapping feature and the trend gating coefficient are multiplied to obtain the weighted trend feature. Specifically, similar to obtaining the time-frequency feature above, the trend mapping feature and the trend gating coefficient are multiplied element-wise to obtain the weighted trend feature. This operation also uses dynamic weights to filter trend features, highlighting long-term patterns more relevant to the current prediction scenario. For example, during the winter heating season, dimensions related to the monthly pollution increase trend in the trend feature are strengthened by the trend gating coefficient, thus emphasizing the reflection of seasonal pollution patterns in the prediction; while during the summer non-heating season, the weights of these dimensions are reduced, allowing the model to pay more attention to fluctuations caused by short-term meteorological conditions. In this way, the trend feature is no longer a static long-term mean, but an adaptive trend that can be dynamically adjusted according to the characteristics of real-time data.

[0145] Finally, the weighted time-frequency features and weighted trend features are added together through a feature fusion layer to obtain the basic fused features. Specifically, the addition operation is not a simple information superposition, but an organic combination under the control of a gating mechanism. That is, the short-term fluctuations of the time-frequency features and the long-term patterns of the trend features are automatically weighted according to data characteristics, forming a comprehensive feature that takes into account different time scales. For example, during heavy pollution weather emergency responses, the basic fused features will primarily use weighted time-frequency features (highlighting hourly concentration changes), supplemented by a small amount of weighted trend features (providing background concentration reference); while during normal stable periods, the features will primarily use weighted trend features (reflecting the overall pollution level), with time-frequency features only supplementing slight fluctuation information. This dynamic balancing ability allows the basic fused features to accurately adapt to different pollution scenarios, providing high-quality input for subsequent graph neural networks to capture spatial correlations and the Transformer module to mine time dependencies, ultimately improving the overall accuracy of the air quality prediction model.

[0146] Step S202: Based on the basic fusion features, spatial dependency modeling is performed using a graph neural network to obtain spatial fusion features.

[0147] It should be noted that the basic fusion features are modeled for spatial dependencies using a graph neural network (GNN) to capture spatial correlations in air quality data. A graph neural network is a type of neural network specifically designed for processing graph-structured data; it can learn complex relationships between nodes to extract spatial features.

[0148] Further, step S202 includes: First, acquiring the geographic coordinates of multiple monitoring stations. Specifically, the latitude and longitude information of all monitoring stations (e.g., 39°N, 116°E) is collected. These geographic coordinates are the basic data for calculating the spatial distance between stations. The geographic coordinates need to be accurate to six decimal places to ensure the accuracy of subsequent distance calculations, especially for adjacent stations within a city (only a few kilometers apart). Even slight coordinate errors can affect distance judgment and thus interfere with the accuracy of spatial correlation modeling.

[0149] Next, the Euclidean distance between any two stations is calculated based on the geographic coordinates of multiple monitoring stations. Specifically, the Euclidean distance is the straight-line distance between two points in space. During calculation, latitude and longitude must first be converted to planar coordinates (e.g., using Mercator projection) before being substituted into the distance formula. For example, the Euclidean distance between station A (x1, y1) and station B (x2, y2) is the straight-line length between the two points in a planar coordinate system. The distance matrix obtained in this step completely records the spatial relationships between all stations, providing a quantitative basis for the subsequent construction of the geographic adjacency matrix.

[0150] Next, the Euclidean distance is converted into a geographic adjacency matrix using radial basis functions (RBF). Specifically, to convert the Euclidean distance into weights reflecting the strength of spatial association, a RBF is used to generate the geographic adjacency matrix. The core principle of the RBF is that the closer the distance, the higher the weight. This means that the closer two sites are, the stronger their mutual influence on pollutant diffusion, and therefore the larger their weights; the farther apart they are, the smaller their weights (approaching zero). The bandwidth of the RBF is set to the median of all Euclidean distances. This value balances the site density in different regions: in densely populated areas (such as city centers), the median distance is smaller, making the function more sensitive to the weighting of nearby sites; in sparsely populated areas (such as suburbs), the median distance is larger, preventing excessive suppression of the weights of distant sites. Through this process, the geographic adjacency matrix reflects both the geographical pattern of stronger weights for nearby sites and adapts to the site distribution characteristics of different regions.

[0151] Then, the basic fusion features are subjected to two linear projections to obtain the query matrix and the key matrix, respectively. Specifically, to mine site associations at the feature level (rather than relying solely on geographical distance), data-driven adjacency relationships need to be constructed based on the basic fusion features. First, the basic fusion features are subjected to two independent linear projections: the first projection transforms the features into a query matrix, and the second projection transforms them into a key matrix. These two matrices have the same dimensions (e.g., both 256-dimensional), but their projection parameters are independent. The query matrix focuses on extracting the query attributes of the site features, while the key matrix focuses on extracting the queried attributes. The interaction between the two is used to calculate the feature similarity between sites. For example, if the basic fusion features of two sites are similar in the dimension of industrial pollution emissions, the match between the query and the key will be higher, and the subsequent association weights will be greater.

[0152] The query matrix and key matrix are then processed using Softmax to obtain a data-driven adjacency matrix. Specifically, the query matrix and key matrix are multiplied to obtain raw association scores reflecting the similarity of site features. The scores in each row are then normalized using the Softmax function to generate the data-driven adjacency matrix. The normalization operation for each row ensures that the sum of the association weights of each site to other sites is 1, facilitating subsequent feature aggregation. The advantage of the data-driven adjacency matrix lies in overcoming geographical limitations: even if two sites are far apart, if their pollution characteristics (such as concentration change trends and meteorological influence patterns) are highly similar (e.g., both are located in industrial areas), they will be assigned higher association weights. This feature-based association complements the shortcomings of geographical adjacency and is particularly suitable for scenarios involving cross-regional transport of pollutants (such as long-distance diffusion with prevailing winds).

[0153] Subsequently, the geographic adjacency matrix and the data-driven adjacency matrix are weighted and summed according to a preset ratio to obtain a hybrid adjacency matrix. Specifically, to balance geographic proximity and feature correlation, the geographic adjacency matrix and the data-driven adjacency matrix are weighted and summed according to a preset ratio (e.g., 6:4) to obtain the hybrid adjacency matrix. The ratio setting can be adjusted according to regional characteristics: in areas with complex terrain and strong geographical constraints on pollutant diffusion (e.g., mountainous areas), the weight of the geographic adjacency matrix can be increased (e.g., 7:3); in open plains areas, the weight of the data-driven adjacency matrix can be increased (e.g., 5:5). The hybrid adjacency matrix integrates both physical distance and feature similarity information. For example, if two adjacent sites in the city center (high geographic weight) are simultaneously affected by the same pollution source (high feature weight), their hybrid weight will be significantly higher than the result calculated by a single factor, which better reflects the actual pollution diffusion pattern.

[0154] Next, the basic fused features and the hybrid adjacency matrix are input into the graph neural network using a multi-head attention mechanism to calculate the spatial correlation weights between monitoring stations. Specifically, the basic fused features and the hybrid adjacency matrix are input into the graph neural network, and the dynamic correlation weights between stations are calculated using a multi-head attention mechanism. The multi-head attention mechanism divides the features into multiple subspaces (e.g., four heads), each subspace independently calculates the correlation weights, and then the results are concatenated and fused. The advantage of this mechanism is that it captures multi-dimensional spatial correlations: for example, one head may focus on capturing the transmission relationship of industrial pollution, while another head may focus on capturing the diffusion correlation caused by meteorological factors (such as wind speed and direction). Through multi-head parallel computation, the model can more comprehensively explore the complex dependencies between stations and avoid missing information from a single perspective.

[0155] The site features are then updated using spatial correlation weights to obtain initial spatial features. Specifically, based on the calculated spatial correlation weights, the features of each site are updated: the site's basic fused features are weighted and summed with the features of all other sites according to their correlation weights to obtain initial spatial features that incorporate the influence of surrounding sites. For example, high concentration features from upstream sites will be weighted and passed on to downstream sites, reflecting the spatial diffusion effect of pollutants. The update process is essentially information aggregation: the features of each site are no longer isolated but integrate information from related sites within the region. For sites located at the source of pollution, their features are assigned higher weights and passed on to their surroundings; for sites located at the end of diffusion, their corresponding features are more influenced by upstream sites.

[0156] Finally, the initial spatial features are normalized to obtain spatial fusion features. Specifically, to avoid feature values ​​that are too large or too small affecting subsequent model training, the initial spatial features are layer-normalized: the features of each station are standardized by dimension (mean 0, variance 1), ensuring that features from different stations and different dimensions are of the same magnitude. The final output spatial fusion features retain the basic feature information of individual stations while encoding spatial dependencies with surrounding stations. For example, the features of urban industrial area stations incorporate the diffusion effects of surrounding residential areas, and the features of suburban ecological areas reflect the transmission associations with urban areas.

[0157] Step S203: Input the spatial fusion features into the Transformer module to capture long-term temporal dependencies through a multi-head self-attention mechanism to obtain spatiotemporal fusion features.

[0158] It should be noted that the spatial fusion features obtained after graph neural network processing contain rich spatial dependency information. These features are then input into the Transformer module to further capture long-term dependencies in time series data. The Transformer module is known for its powerful ability to process sequence data, especially long sequences, where it can effectively capture the dependencies between any two positions in the sequence through its self-attention mechanism.

[0159] Further, step S203 includes: First, adding sine and cosine positional encoding to the spatial fusion features to obtain spatial features with positional information. Specifically, before modeling the spatial fusion features in the time dimension, time positional information needs to be introduced to clarify the chronological order of features in the time series. Based on the chronological order of time steps, each time step's feature is assigned a corresponding sine or cosine encoding value, and the sine and cosine positional encoding dimension is consistent with the feature dimension of the spatial fusion features. For example, if the spatial fusion features are 256-dimensional, then the positional encoding is also 256-dimensional, ensuring that the two can be directly superimposed. The period parameter of the positional encoding is set to a preset value (e.g., 10000). Different frequency sine and cosine functions are used to distinguish positional information at different time scales; low-frequency components correspond to long-term time positions (e.g., days, weeks), and high-frequency components correspond to short-term time positions (e.g., hours), enabling the model to identify the chronological relationship and periodic patterns of the time series, thus obtaining spatial features with positional information.

[0160] The spatial features with location information are then input into the encoder of the Transformer module to obtain spatiotemporal fusion features. The encoder consists of three cascaded coding layers, each composed of a multi-head self-attention sub-layer and a feedforward neural network sub-layer. The multi-head self-attention sub-layer divides the features into multiple subspaces (e.g., four heads), and each subspace independently calculates the dependencies between different time steps (e.g., the correlation between the current time and the previous 24 hours). The results from each subspace are then concatenated to capture multi-dimensional temporal dependencies. The feedforward neural network sub-layer enhances the non-linear expressive power of the sub-layer output features through two linear transformations and non-linear activations (e.g., ReLU) while maintaining the feature dimensionality. Specifically, the spatial features with location information are input into the multi-head self-attention sub-layer for linear projection to obtain the query matrix, key matrix, and value matrix. In other words, after inputting the spatial features with location information into the multi-head self-attention sub-layer, three independent linear projections are first performed to generate the query matrix, key matrix, and value matrix, respectively. These three matrices have the same dimensions as the input features but serve different functions: the query matrix actively queries for correlation information at other time steps, the key matrix passively responds to queries to calculate the matching degree, and the value matrix stores the feature content to be aggregated. Through projection, the features are transformed into a form suitable for attention calculation, laying the foundation for mining time dependencies. Next, the raw attention score is calculated based on the query matrix and the key matrix. The score reflects the correlation strength of features at different time steps. For example, a high matching degree between the query at the current time step and the keys of the previous 24 hours indicates a daily cycle correlation, resulting in a higher raw score; a low matching degree with irrelevant time steps results in a lower score. This step quantifies the dependency relationship between any two moments in the time series through matrix interaction, breaking through the local dependency limitation of traditional time series models. Following this, a masking mechanism is applied to the raw attention score, and it is normalized using the Softmax function to obtain the attention weights. Specifically, a masking mechanism is applied to the raw attention score: the scores corresponding to all time steps after the current time step are forced to be set to a minimum value (such as negative infinity), ensuring that the model calculates dependencies only based on historical and current information. The processed scores are then normalized using the Softmax function to obtain attention weights. The sum of the weights of each time step to other time steps is 1; a higher weight indicates that the information at that time step is more important to the current moment. The attention weights are then multiplied by the value matrix to obtain the multi-head attention output. Specifically, multiplying the attention weights by the value matrix achieves weighted aggregation of features, with high-weight time steps' features being prioritized and low-weight features being weakened. For example, features from the 6 hours prior to a heavy pollution event have higher weights, and their precursory pollution information is incorporated into the current features. Finally, the outputs of multiple attention heads are concatenated along the channel dimension to obtain the multi-head attention output. This approach captures temporal dependencies from multiple perspectives, avoiding the bias of a single attention head.The multi-head attention output is input into a feedforward neural network sublayer to obtain the encoding layer output. Specifically, the feedforward neural network sublayer contains two linear transformations and one non-linear activation (such as GELU): the first transformation expands the feature dimension (e.g., from 256 dimensions to 1024 dimensions), capturing complex patterns through richer parameters; the non-linear activation introduces non-linear expressive power to adapt to the non-linear changes in pollutant concentration; the second transformation restores the dimension to the original dimension (256 dimensions), ensuring feature dimension consistency. The feedforward neural network strengthens the key information output by the attention mechanism through local feature transformations, improving the discriminative ability of the features. Finally, global average pooling is performed on the encoding layer output in the time dimension to obtain spatiotemporal fusion features. Specifically, after the above processing, the encoding layer output is obtained and then globally averaged in the time dimension: for each monitoring station and each feature dimension, the average value of all time steps is calculated, compressing the time dimension while retaining global time information. For example, if the input contains 48 hours of features, the pooled features of each station will integrate the overall trend and key fluctuations of these 48 hours. The resulting spatiotemporal fusion features include both the spatial relationships captured by the graph neural network and the long-term temporal dependencies mined by the Transformer, providing comprehensive spatiotemporal feature support for subsequent prediction modules.

[0161] Step S204: Input the spatiotemporal fusion features into the linear regression module to obtain the initial prediction results.

[0162] It should be noted that the linear regression module is responsible for mapping complex spatiotemporal features to specific air quality indicators. Linear regression models are favored for their simplicity and interpretability; they make predictions by learning the linear relationship between features and the target variable. In this model, the linear regression module utilizes the correlation between spatiotemporally fused features and historical air quality data to estimate future air quality indicators.

[0163] Further, step S204 includes: First, the spatiotemporal fusion features are input into the feature mapping layer of the linear regression module for linear transformation to obtain an intermediate dimension. Specifically, the core function of the feature mapping layer is to convert high-dimensional spatiotemporal fusion features (such as 256 dimensions) into an intermediate dimension, which is a dimension that matches the number of preset prediction indicators. For example, if it is necessary to predict... , , The concentrations of the three types of pollutants are represented by a three-dimensional intermediate dimension. This transformation is achieved through a learnable weight matrix, the parameters of which are continuously optimized during training to ensure that the mapped intermediate dimension features accurately correspond to the prediction targets of each pollutant, providing targeted input for subsequent regression calculations.

[0164] Next, the intermediate dimension features are input into the regression calculation layer of the linear regression module for calculation, obtaining the original predicted values. Specifically, the regression calculation layer generates the original predicted values ​​through linear operations. The essence of linear operations is to assign dynamic weights to each prediction indicator: for example, for For concentration prediction, the intralayer parameters focus on extracting components related to fine particulate matter diffusion from the spatiotemporal fusion features (such as the interaction features of industrial source emissions and meteorological conditions), and output specific values ​​through weighted summation. Unlike traditional linear regression with fixed coefficients, the weights here are adaptively learned through model training, which can automatically adapt to the pollution characteristics of different regions and time periods, so that the original predicted values ​​initially reflect the changing trends of pollutant concentrations.

[0165] Then, the original predicted values ​​are physically constrained according to preset requirements to obtain constrained predicted values. Specifically, because the original predicted values ​​may contain unreasonable values ​​(such as negative numbers or excessively high values ​​far exceeding the actual environmental capacity) due to characteristic noise or extreme samples, physical range constraints are necessary. The constraint rules are set based on the physical properties of air quality indicators: for example, The reasonable concentration range is 0-1000. If the original predicted value is -5 If it is 1200, it will be corrected to 0; if it is 1200, it will be corrected to 0. It is then truncated to 1000 This step ensures that the prediction results conform to the physical meaning of the real-world scenario, avoiding interference from outliers in the subsequent correction process.

[0166] Finally, the constrained predicted values ​​are spatially consistent with the regional pollution distribution trends in satellite remote sensing image data to obtain the initial prediction results. Specifically, although the constrained predicted values ​​meet the basic requirements for reasonableness, there are inconsistencies between local stations and the overall regional trend (e.g., a station's predicted value is much higher than its surroundings, but there is no clear pollution source to support it). Therefore, spatial consistency fine-tuning is necessary using satellite remote sensing image data. Satellite remote sensing data provides a wide-area pollution distribution trend (e.g., regional pollution bands inverted through aerosol optical thickness). During fine-tuning, the deviation between the station's predicted value and the remote sensing trend of its region is calculated, and stations with excessive deviations are smoothed out: for example, if remote sensing shows that pollution in a certain area decreases from southeast to northwest, but the predicted value of a station located in the northwest is abnormally high, the predicted value of that station is appropriately reduced by referring to the correspondence between surrounding stations and the remote sensing trend. The fine-tuning process is not simply covering local predictions, but is achieved through weighted fusion. The weight of the station's own prediction (e.g., 0.7) and the weight of the remote sensing regional trend (e.g., 0.3) are dynamically balanced, preserving the local accuracy of ground monitoring data while ensuring consistency with the overall regional pollution pattern. The final initial prediction results take into account the in-depth mining of spatiotemporal features, the constraints of physical rules, and the synergy of multi-source data, providing high-quality basic prediction values ​​for the subsequent error correction module.

[0167] Step S205: The initial prediction results are corrected and optimized by the error correction module to obtain the air quality prediction results.

[0168] It should be noted that the error correction module aims to improve the accuracy and reliability of the prediction results. This module is used to identify and correct biases and errors in the initial prediction results generated by the linear regression module.

[0169] Further, step S205 includes: First, acquiring historical real air quality data. Specifically, collecting historical data from all monitoring stations within the target area for prediction, covering different pollution scenarios (e.g., heavily polluted days, lightly polluted days, and days with good air quality), and ensuring the time granularity matches the prediction step size (e.g., if predicting hourly concentrations over 24 hours, then historical data should also be recorded hourly). After collection, the data is cleaned to remove outliers caused by sensor malfunctions (e.g., concentration fluctuations exceeding 1000). (And data without corresponding meteorological events) were used to fill in a small number of missing values ​​through linear interpolation, and the data were classified and archived by season and time period (such as morning peak and night) to provide high-quality benchmark data for subsequent error analysis.

[0170] Next, the initial forecast results and historical real air quality data are used to calculate the air quality error. Specifically, for each monitoring station and each forecast time, the initial forecast value is subtracted from the historical real value for the same period to obtain the corresponding error value, forming a residual sequence arranged in chronological order. A time matching mechanism is introduced during the calculation process. If the predicted concentration is for 9:00 AM the next day, it is matched with historical real data for the same period (e.g., 9:00 AM on the same day of the past 30 days under similar weather conditions) to ensure that the error reflects the prediction deviation pattern under similar scenarios. For example, if the initial forecast value for a station during the morning rush hour is consistently low, the residual sequence will show a stable negative bias, providing a clear direction for subsequent corrections.

[0171] Then, the air quality error is processed by a preset regression model in the error correction module to obtain the corrected residual. Specifically, the preset regression model uses support vector regression (with a radial basis function as the kernel function). This model has a stronger ability to fit nonlinear error patterns and can effectively capture complex patterns in the residual (such as the difference in deviation under different pollution levels). During the model training phase, historical residual sequences are used as input, and auxiliary data such as meteorological and pollution source data at the corresponding time are used as features to learn the mapping relationship between residuals and influencing factors. During the inference phase, the residuals and auxiliary features of the current prediction scenario are input into the model, and the corrected residual is output, which is the estimated value of the current initial prediction deviation. For example, if the model learns that when the wind speed is below 2 m / s, the initial prediction value is generally 10%-15% higher, then under the same meteorological conditions, a negative corrected residual of the corresponding magnitude will be output.

[0172] Finally, the initial prediction results are combined with the corrected residuals to calculate the air quality prediction result. Specifically, if the corrected residual is positive, it indicates that the initial prediction value is too low, and the residual value needs to be added to improve the prediction result; if the corrected residual is negative, it indicates that the initial prediction value is too high, and the result is adjusted downward after addition. A second reasonableness check is also required after fusion: if the corrected prediction value exceeds the physical range (e.g., ... Concentration less than 0 or greater than 1000 If the difference between adjacent sites is not found, then the physical boundary value is used instead; at the same time, the differences after correction are checked to see if they conform to the geographical diffusion pattern, so as to ensure spatial consistency.

[0173] This embodiment uses a gating fusion module to fuse multi-scale time-frequency and trend representations to obtain basic fusion features, a graph neural network to model spatial dependencies to obtain spatial fusion features, a Transformer to capture long-term time dependencies to obtain spatiotemporal fusion features, a linear regression module to generate initial predictions, and finally an error correction module to optimize the final results. This approach can accurately capture the spatiotemporal characteristics of air quality data, improve the accuracy and reliability of predictions, and provide strong support for environmental monitoring and decision-making.

[0174] Based on the first embodiment of this application, this application also provides an air quality prediction device based on multimodal spatiotemporal fusion, please refer to... Figure 4 The device includes:

[0175] The acquisition module 10 is used to acquire air quality data, which includes ground monitoring text data and satellite remote sensing image data.

[0176] The preprocessing module 20 is used to preprocess the air quality data to obtain preprocessed data.

[0177] The decomposition module 30 is used to perform trend and residual decomposition on the preprocessed data using an adaptive smoothing filter to obtain trend representation and residual representation.

[0178] Module 40 is used to perform multi-window time-frequency analysis on the residual characterization to obtain multi-scale time-frequency characterization.

[0179] The result module 50 is used to input the multi-scale time-frequency representation and the trend representation into a preset air quality prediction model to obtain the air quality prediction result. The preset air quality prediction model includes a gated fusion module, a graph neural network, a Transformer module, a linear regression module, and an error correction module. It is also used to input the multi-scale time-frequency representation and trend representation into the gated fusion module for element-wise weighted fusion to obtain basic fusion features; based on the basic fusion features, spatial dependency modeling is performed using a graph neural network to obtain spatial fusion features; the spatial fusion features are input into the Transformer module to capture long-term time dependencies through a multi-head self-attention mechanism to obtain spatiotemporal fusion features; the spatiotemporal fusion features are input into the linear regression module to obtain the initial prediction result; and the initial prediction result is corrected and optimized by the error correction module to obtain the air quality prediction result.

[0180] The air quality prediction device based on multimodal spatiotemporal fusion provided in this application, employing the air quality prediction method based on multimodal spatiotemporal fusion in the above embodiments, can solve the technical problem of how to achieve high-precision, wide-range air quality prediction. Compared with the prior art, the beneficial effects of the air quality prediction device based on multimodal spatiotemporal fusion provided in this application are the same as those of the air quality prediction method based on multimodal spatiotemporal fusion provided in the above embodiments, and other technical features in the air quality prediction device based on multimodal spatiotemporal fusion are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0181] In one embodiment, the result module 50 is further configured to: input the multi-scale time-frequency representation into the first linear layer and map it to a preset feature dimension to obtain a time-frequency mapped feature; input the trend representation into the second linear layer and map it to a preset feature dimension to obtain a trend mapped feature; concatenate the time-frequency mapped feature with the trend mapped feature to obtain a concatenated feature; input the concatenated feature into the Sigmoid activation function layer to obtain a fusion gating coefficient; multiply the time-frequency mapped feature with the fusion gating coefficient to obtain a weighted time-frequency feature; calculate a trend gating coefficient based on the fusion gating coefficient; multiply the trend mapped feature with the trend gating coefficient to obtain a weighted trend feature; and add the weighted time-frequency feature and the weighted trend feature through the feature fusion layer to obtain a basic fusion feature.

[0182] In one embodiment, the result module 50 is further configured to: acquire the geographic coordinates of multiple monitoring stations; calculate the Euclidean distance between any two stations based on the geographic coordinates of the multiple monitoring stations; convert the Euclidean distance into a geographic adjacency matrix using a radial basis function, wherein the bandwidth of the radial basis function is set to the median of all the Euclidean distances; perform two linear projections on the basic fusion features to obtain a query matrix and a key matrix respectively; process the query matrix and the key matrix using Softmax to obtain a data-driven adjacency matrix; weight and sum the geographic adjacency matrix and the data-driven adjacency matrix according to a preset ratio to obtain a hybrid adjacency matrix; input the basic fusion features and the hybrid adjacency matrix into a graph neural network and calculate using a multi-head attention mechanism to obtain spatial association weights for the monitoring stations; update the station features using the spatial association weights to obtain initial spatial features; and normalize the initial spatial features to obtain spatial fusion features.

[0183] In one embodiment, the result module 50 is further configured to add sine and cosine position encoding to the spatial fusion features to obtain spatial features with position information, wherein the dimension of the sine and cosine position encoding is consistent with the feature dimension of the spatial fusion features, and the period parameter of the position encoding is set to a preset value; the spatial features with position information are input into the encoder of the Transformer module to obtain spatiotemporal fusion features, wherein the encoder includes three cascaded encoding layers, each encoding layer consisting of a multi-head self-attention sublayer and a feedforward neural network sublayer; the step of inputting the spatial features with position information into the encoder of the Transformer module... The steps for obtaining spatiotemporal fusion features include: inputting the spatial features with location information into the multi-head self-attention sub-layer for linear projection to obtain a query matrix, a key matrix, and a value matrix; calculating the original attention score based on the query matrix and the key matrix; applying a masking mechanism to the original attention score and normalizing it using the Softmax function to obtain attention weights; multiplying the attention weights and the value matrix to obtain the multi-head attention output; inputting the multi-head attention output into a feedforward neural network sub-layer to obtain the encoding layer output; and performing global average pooling in the time dimension on the encoding layer output to obtain the spatiotemporal fusion features.

[0184] In one embodiment, the result module 50 is further configured to: input the spatiotemporal fusion features into the feature mapping layer of the linear regression module for linear transformation to obtain an intermediate dimension, wherein the intermediate dimension is a dimension matching the number of preset prediction indicators; input the intermediate dimension features into the regression calculation layer of the linear regression module for calculation to obtain an original predicted value; subject the original predicted value to physical range constraints according to preset requirements to obtain a constrained predicted value; perform spatial consistency fine-tuning on the constrained predicted value in conjunction with the regional pollution distribution trend in satellite remote sensing image data to obtain an initial prediction result; and acquire historical real air quality data; calculate the air quality error by combining the initial prediction result and the historical real air quality data; process the air quality error through a preset regression model in the error correction module to obtain a corrected residual; and calculate the air quality prediction result by combining the initial prediction result with the corrected residual.

[0185] In one embodiment, the decomposition module 30 is further configured to initialize a learnable weight parameter vector for an adaptive smoothing filter, wherein the dimension of the vector is the same as the length of a preset filter kernel; normalize the learnable weight parameter vector using a Softmax function to generate a normalized filter kernel; perform a one-dimensional convolution operation on the preprocessed data using the normalized filter kernel to obtain a trend representation; calculate the difference between the preprocessed data and the trend representation; and use the difference as a residual representation.

[0186] In one embodiment, the construction module 40 is further configured to select multiple window functions of different lengths, each window function corresponding to a preset time window length; perform short-time Fourier transform on the residual representation with the multiple window functions respectively to obtain the time-frequency amplitude spectrum corresponding to each time window; perform energy statistics on each time-frequency amplitude spectrum to obtain the energy value of the corresponding frequency component; use a soft attention mechanism to assign weights to the corresponding frequencies based on the energy values ​​to obtain multiple frequency weights; multiply the time-frequency amplitude spectrum and the corresponding frequency weights to obtain weighted time-frequency features; and concatenate all the weighted time-frequency features to obtain a multi-scale time-frequency representation.

[0187] This application provides an air quality prediction device based on multimodal spatiotemporal fusion. The air quality prediction device based on multimodal spatiotemporal fusion includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the air quality prediction method based on multimodal spatiotemporal fusion in the above embodiment 1.

[0188] The following is for reference. Figure 5 The diagram illustrates a structural schematic of an air quality prediction device based on multimodal spatiotemporal fusion suitable for implementing embodiments of this application. The air quality prediction device based on multimodal spatiotemporal fusion in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5 The air quality prediction device based on multimodal spatiotemporal fusion shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0189] like Figure 5As shown, the air quality forecasting device based on multimodal spatiotemporal fusion may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the air quality forecasting device based on multimodal spatiotemporal fusion. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the multimodal spatiotemporal fusion-based air quality prediction device to wirelessly or wiredly communicate with other devices to exchange data. Although various multimodal spatiotemporal fusion-based air quality prediction devices are shown in the figures, it should be understood that implementation or possession of all of them is not required. More or fewer of these devices may be implemented alternatively.

[0190] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0191] The air quality prediction device based on multimodal spatiotemporal fusion provided in this application, employing the air quality prediction method based on multimodal spatiotemporal fusion in the above embodiments, can solve the technical problem of how to achieve high-precision, wide-range air quality prediction. Compared with the prior art, the beneficial effects of the air quality prediction device based on multimodal spatiotemporal fusion provided in this application are the same as those of the air quality prediction method based on multimodal spatiotemporal fusion provided in the above embodiments, and other technical features in this air quality prediction device based on multimodal spatiotemporal fusion are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0192] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0193] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0194] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the air quality prediction method based on multimodal spatiotemporal fusion in the above embodiments.

[0195] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible storage medium containing or storing a program that can be executed by instructions, used by a device, or used in conjunction with it. The program code contained on the computer-readable storage medium may be transmitted using any suitable storage medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0196] The aforementioned computer-readable storage medium may be included in an air quality prediction device based on multimodal spatiotemporal fusion; or it may exist independently and not assembled into an air quality prediction device based on multimodal spatiotemporal fusion.

[0197] The aforementioned computer-readable storage medium carries one or more programs that, when executed by the multimodal spatiotemporal fusion-based air quality prediction device, enable the multimodal spatiotemporal fusion-based air quality prediction device to write computer program code for performing the operations of this application in one or more programming languages ​​or a combination thereof. These programming languages ​​include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0198] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using dedicated hardware-based implementations that perform the specified functions or operations, or can be implemented using a combination of dedicated hardware and computer instructions.

[0199] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0200] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described air quality prediction method based on multimodal spatiotemporal fusion, thereby solving the technical problem of how to achieve high-precision, wide-range air quality prediction. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the air quality prediction method based on multimodal spatiotemporal fusion provided in the above embodiments, and will not be repeated here.

[0201] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the air quality prediction method based on multimodal spatiotemporal fusion as described above.

[0202] The computer program product provided in this application can solve the technical problem of how to achieve high-precision, wide-range air quality forecasting. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the air quality forecasting method based on multimodal spatiotemporal fusion provided in the above embodiments, and will not be repeated here.

[0203] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. An air quality prediction method based on multimodal spatiotemporal fusion, characterized in that, The method includes: Acquire air quality data, wherein the air quality data includes ground monitoring text data and satellite remote sensing image data; The air quality data is preprocessed to obtain preprocessed data; The preprocessed data is decomposed into trend and residual characteristics using an adaptive smoothing filter to obtain trend and residual characteristics. Multi-window time-frequency analysis is performed on the residual characterization to obtain a multi-scale time-frequency characterization; The multi-scale time-frequency representation and the trend representation are input into a preset air quality prediction model to obtain air quality prediction results. The preset air quality prediction model includes a gated fusion module, a graph neural network, a Transformer module, a linear regression module, and an error correction module. The steps of inputting the multi-scale time-frequency representation and the trend representation into a preset air quality prediction model to obtain air quality prediction results include: The multi-scale time-frequency representation and the trend representation are input into the gated fusion module for element-wise weighted fusion to obtain the basic fusion features; Based on the aforementioned basic fusion features, spatial dependency modeling is performed using the graph neural network to obtain spatial fusion features; The spatial fusion features are input into the Transformer module to capture long-term temporal dependencies through a multi-head self-attention mechanism, thus obtaining spatiotemporal fusion features; The spatiotemporal fusion features are input into the linear regression module to obtain the initial prediction results; The initial prediction results are corrected and optimized by the error correction module to obtain the air quality prediction results.

2. The method as described in claim 1, characterized in that, The step of inputting the multi-scale time-frequency representation and the trend representation into the gated fusion module for element-wise weighted fusion to obtain the basic fusion features includes: the gated fusion module includes a first linear layer, a second linear layer, a Sigmoid activation function layer and a feature fusion layer; The multi-scale time-frequency representation is input into the first linear layer and mapped to a preset feature dimension to obtain the time-frequency mapping feature; The trend representation is input into the second linear layer and mapped to a preset feature dimension to obtain the trend mapping feature; The time-frequency mapping feature and the trend mapping feature are concatenated to obtain the concatenated feature; The concatenated features are input into the Sigmoid activation function layer to obtain the fusion gating coefficients; Multiply the time-frequency mapping features by the fusion gate coefficients to obtain the weighted time-frequency features; The trend gating coefficient is calculated based on the fusion gating coefficient. Multiply the trend mapping feature and the trend gating coefficient to obtain the weighted trend feature; The weighted time-frequency features and the weighted trend features are added together by the feature fusion layer to obtain the basic fused features.

3. The method as described in claim 1, characterized in that, The step of obtaining spatial fusion features by performing spatial dependency modeling through the graph neural network based on the basic fusion features includes: Obtain the geographic coordinates of multiple monitoring stations; The Euclidean distance between any two stations is calculated based on the geographical coordinates of multiple monitoring stations. The Euclidean distance is converted into a geographic adjacency matrix using a radial basis function, wherein the bandwidth of the radial basis function is set to the median of all the Euclidean distances; The basic fusion features are subjected to two linear projections to obtain the query matrix and the key matrix, respectively; Based on the query matrix and key matrix, a data-driven adjacency matrix is ​​obtained through Softmax processing; The geographic adjacency matrix and the data-driven adjacency matrix are weighted and summed according to a preset ratio to obtain a hybrid adjacency matrix; The basic fusion features and the hybrid adjacency matrix are input into the graph neural network and calculated using a multi-head attention mechanism to obtain the spatial association weights of the monitoring sites; The initial spatial features are obtained by updating the site features using the spatial association weights. The initial spatial features are normalized to obtain spatial fusion features.

4. The method as described in claim 1, characterized in that, The step of inputting the spatial fusion features into the Transformer module to capture long-term temporal dependencies through a multi-head self-attention mechanism to obtain spatiotemporal fusion features includes: Add sine and cosine position codes to the spatial fusion features to obtain spatial features with position information, wherein the sine and cosine position code dimensions are consistent with the feature dimensions of the spatial fusion features, and the period parameter of the position code is set to a preset value. The spatial features with location information are input into the encoder of the Transformer module to obtain spatiotemporal fusion features. The encoder includes three cascaded coding layers, each consisting of a multi-head self-attention sublayer and a feedforward neural network sublayer. The step of inputting the spatial features with location information into the encoder of the Transformer module to obtain spatiotemporal fusion features includes: The spatial features with location information are input into the multi-head self-attention sub-layer for linear projection to obtain the query matrix, key matrix and value matrix; The original attention score is calculated based on the query matrix and key matrix. The original attention scores are masked and normalized using the Softmax function to obtain the attention weights; Multiply the attention weights and value matrix to obtain the multi-head attention output; The multi-head attention output is input into the feedforward neural network sub-layer to obtain the encoding layer output; Global average pooling along the time dimension is performed on the output of the encoding layer to obtain spatiotemporal fusion features.

5. The method as described in claim 1, characterized in that, The step of inputting the spatiotemporal fusion features into the linear regression module to obtain the initial prediction result includes: The spatiotemporal fusion features are input into the feature mapping layer of the linear regression module for linear transformation to obtain an intermediate dimension, wherein the intermediate dimension is a dimension that matches the number of preset prediction indicators. The intermediate dimension features are input into the regression calculation layer of the linear regression module for calculation to obtain the original predicted value; The original predicted value is physically constrained according to preset requirements to obtain the constrained predicted value; By combining the regional pollution distribution trend in satellite remote sensing image data, the constrained predicted values ​​are fine-tuned for spatial consistency to obtain the initial prediction results; The step of correcting and optimizing the initial prediction result using the error correction module to obtain the air quality prediction result includes: Obtain historical real-time air quality data; The air quality error is obtained by calculating the initial prediction result and the historical real air quality data; The air quality error is processed by a preset regression model in the error correction module to obtain the corrected residual; The initial prediction result is combined with the corrected residual to calculate the air quality prediction result.

6. The method as described in claim 1, characterized in that, The step of using an adaptive smoothing filter to perform trend and residual decomposition on the preprocessed data to obtain trend and residual representations includes: Initialize the learnable weight parameter vector of the adaptive smoothing filter, wherein the dimension of the vector is the same as the preset filter kernel length; The learnable weight parameter vector is normalized using the Softmax function to generate a normalized filter kernel; The preprocessed data is subjected to a one-dimensional convolution operation using the normalized filter kernel to obtain a trend representation. The difference is calculated by combining the preprocessed data and the trend representation. The difference is used as a residual representation.

7. The method as described in claim 1, characterized in that, The step of performing multi-window time-frequency analysis on the residual representation to obtain a multi-scale time-frequency representation includes: Select multiple window functions of different lengths, each window function corresponding to a preset time window length; The residual representation is subjected to short-time Fourier transform with multiple window functions to obtain the time-frequency amplitude spectrum corresponding to each time window; Energy statistics are performed on each of the time-frequency amplitude spectra to obtain the energy values ​​of the corresponding frequency components; The energy values ​​are weighted according to the corresponding frequencies using a soft attention mechanism to obtain multiple frequency weights; Multiply the time-frequency amplitude spectrum by the corresponding frequency weight to obtain the weighted time-frequency feature; All the weighted time-frequency features are concatenated to obtain a multi-scale time-frequency representation.

8. An air quality prediction device based on multimodal spatiotemporal fusion, characterized in that, The device includes: The acquisition module is used to acquire air quality data, wherein the air quality data includes ground monitoring text data and satellite remote sensing image data; The preprocessing module is used to preprocess the air quality data to obtain preprocessed data; The decomposition module is used to perform trend and residual decomposition on the preprocessed data using an adaptive smoothing filter to obtain trend representation and residual representation. The module is used to perform multi-window time-frequency analysis on the residual characterization to obtain multi-scale time-frequency characterization; The results module is used to input the multi-scale time-frequency representation and the trend representation into a preset air quality prediction model to obtain air quality prediction results. The preset air quality prediction model includes a gated fusion module, a graph neural network, a Transformer module, a linear regression module, and an error correction module. It is also used to input the multi-scale time-frequency representation and the trend representation into the gated fusion module for element-wise weighted fusion to obtain basic fusion features; based on the basic fusion features, perform spatial dependency modeling through the graph neural network to obtain spatial fusion features; input the spatial fusion features into the Transformer module to capture long-term time dependencies through a multi-head self-attention mechanism to obtain spatiotemporal fusion features; input the spatiotemporal fusion features into the linear regression module to obtain initial prediction results; and correct and optimize the initial prediction results through the error correction module to obtain the final air quality prediction results.

9. An air quality prediction device based on multimodal spatiotemporal fusion, characterized in that, The device includes: a memory, a processor, and an air quality prediction program based on multimodal spatiotemporal fusion stored in the memory and running on the processor, the air quality prediction program based on multimodal spatiotemporal fusion being configured to implement the steps of the air quality prediction method based on multimodal spatiotemporal fusion as described in any one of claims 1-7.

10. A storage medium, characterized in that, The storage medium stores an air quality prediction program based on multimodal spatiotemporal fusion, which, when executed by a processor, implements the steps of the air quality prediction method based on multimodal spatiotemporal fusion as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Air quality prediction method based on seasonal recurrent neural network

    CN113240170A

  • Time sequence prediction method and device based on period embedding and multi-scale features

    CN119622319A