Methods, equipment and computer-readable storage media for predicting pollutant concentrations
Patent Information
- Application Number
- CN202610905243.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-23
- Publication Date
- 2026-08-11
AI Technical Summary
这类模型物理意义明确,但存在计算资源消耗巨大、实时性差,以及对交通状况突变引发的短时、局地性污染事件响应能力不足等缺陷
[0016]通过如上所提供的一种基于多源数据融合的污染物浓度预测方案,本申请实施例通过构建包括频域变换模块、时域卷积模块、频域调制模块以及跨变量注意力模块的用于预测污染物浓度的预测模型,对多变量时间序列输入样本依次进行频域分解、时域动态特征提取、频率维度自适应权重调节以及基于注意力机制的变量间耦合关系计算,能够同时捕捉污染物浓度变化的长期趋势、周期性波动与短期动态,并在不同输入变量之间进行显式的依赖关系建模,从而提高污染物浓度预测的精度和可靠性。
Smart Images

Figure CN122548651A_ABST
Abstract
Description
Technical Field
[0001] This application generally relates to the field of environmental monitoring technology. More specifically, this application relates to a method, apparatus, and computer-readable storage medium for predicting pollutant concentrations. Background Technology
[0002] With rapid urbanization and the increasing number of motor vehicles, vehicle emissions have become a significant source of urban air pollution, directly affecting the concentration levels of major pollutants such as fine particulate matter (PM2.5) and nitrogen dioxide (NO2). Accurately predicting pollutant concentration trends is crucial for environmental quality assessment, pollution prevention and control decisions, and traffic emission management.
[0003] Currently, pollutant concentration prediction technologies are mainly based on deterministic models of physicochemical mechanisms. Deterministic models, such as the Community Multiscale Air Quality (CMAQ) model and the Weather Research and Forecasting model coupled with Chemistry (WRF-Chem), simulate processes by solving a system of partial differential equations describing pollutant emissions, advection diffusion, chemical transformation, and wet and dry deposition. While these models have clear physical meanings, they suffer from significant limitations, including high computational resource consumption, poor real-time performance, and insufficient response to short-term, localized pollution events caused by sudden changes in traffic conditions. Furthermore, these models heavily rely on high-precision, high spatiotemporal resolution emission inventories and meteorological field data, resulting in high data acquisition and preprocessing costs.
[0004] In view of this, there is an urgent need to provide a pollutant concentration prediction scheme in order to improve the accuracy and reliability of pollutant concentration prediction. Summary of the Invention
[0005] In order to at least solve one or more of the technical problems mentioned above, this application proposes a method, device and computer-readable storage medium scheme for predicting pollutant concentration in several aspects.
[0006] In a first aspect, this application provides a pollutant concentration prediction method based on multi-source data fusion, comprising: constructing an input sample containing multivariate time series based on historical pollutant concentration data, meteorological data, and traffic flow data characterizing motor vehicle emission activities in a target area; inputting the input sample into a pre-constructed prediction model for predicting pollutant concentration to perform pollutant concentration prediction; wherein the prediction model comprises: a frequency domain transformation module for performing frequency domain transformation on the time series of each variable in the input sample to obtain a first frequency domain feature; a temporal convolution module for performing temporal convolution processing on the first frequency domain feature to extract temporal dynamic features; a frequency domain modulation module for adaptively adjusting the weights of the temporal dynamic features in the frequency dimension to obtain modulation features; a cross-variable attention module for reorganizing the modulation features according to the variable dimension and calculating the coupling relationship between each variable through an attention mechanism to fuse multi-source information to obtain fused features; and a prediction output module for generating a pollutant concentration prediction result for future periods based on the fused features.
[0007] In some embodiments, constructing an input sample containing a multivariate time series includes: calculating an emission characteristic representing the emission intensity of motor vehicles based on the traffic flow data; and aligning the historical pollutant concentration data, meteorological data, and the emission characteristic by time to construct an input sample containing a multivariate time series.
[0008] In other embodiments, the frequency domain transformation module uses discrete cosine transform to decompose the time series of each variable to separate a first frequency domain feature containing multiple frequency components, wherein the multiple frequency components include at least two of the following: low-frequency components characterizing the long-term trend and background concentration characteristics of pollutants, mid-frequency components characterizing the periodic fluctuations of each variable, and high-frequency components characterizing the short-term fluctuations of each variable.
[0009] In some other embodiments, the temporal convolution module includes a first one-dimensional convolutional layer, a first linear rectified activation layer, a second one-dimensional convolutional layer, and a second linear rectified activation layer connected in series; multiple stacked causal dilated convolutional layers, gating units, and residual connection layers; wherein, the first one-dimensional convolutional layer is used to receive the first frequency domain features and perform local temporal feature extraction; the first linear rectified activation layer performs a nonlinear transformation on the output features of the first one-dimensional convolutional layer to output the first local temporal features; the second one-dimensional convolutional layer is used to perform in-depth feature processing on the first local temporal features; the second linear rectified activation layer performs a nonlinear transformation on the output features of the second one-dimensional convolutional layer to output the temporal dynamic features.
[0010] In some embodiments, the frequency domain modulation module performs adaptive weight adjustment by: projecting the multi-channel temporal dynamic features output by the time domain convolution module through a linear mapping to obtain reconstructed features; introducing a nonlinear response into the reconstructed features using a linear rectified activation function to obtain a second frequency domain feature that enhances local features; generating normalized weights using a Sigmoid activation function, and adaptively weighting each frequency component of the second frequency domain feature to obtain the modulation feature.
[0011] In other embodiments, the transvariate attention module is further configured to: use the complete time series of each input variable corresponding to the modulation feature within a fixed time window as its feature representation; and use a self-attention mechanism to calculate the coupling relationship between each input variable and other input variables in the variable dimension; wherein the input variables include at least one of pollutant concentration, meteorological data, emission characteristics, and time characteristics.
[0012] In some other embodiments, before predicting pollutant concentration, the pollutant concentration prediction method further includes predicting the traffic flow data using a traffic flow prediction model; wherein the traffic flow prediction model includes: an input embedding layer for receiving at least one input data selected from time features, historical traffic flow sequences, and road category features; a multilayer perceptual feature enhancement layer for enhancing the input data to obtain enhanced features; a transformer encoder for encoding the enhanced features using a self-attention mechanism to obtain time-dependent features; and an output prediction layer for making predictions based on the time-dependent features and outputting the predicted traffic flow data.
[0013] In some embodiments, the calculation of emission characteristics characterizing the emission intensity of a motor vehicle is performed according to the following formula: ;in, This represents the hourly emission rate of pollutant p. L represents the traffic flow of vehicle category i during hour h, and L represents the length of the road segment. Let represent the emission factor of pollutant p corresponding to vehicle category i, and n represent the total number of vehicle categories.
[0014] In a second aspect, this application provides an apparatus for predicting pollutant concentrations, comprising: a processor configured to execute program instructions; and a memory configured to store the program instructions, which, when loaded and executed by the processor, cause the processor to perform a pollutant concentration prediction method according to any one of the first aspects of this application.
[0015] In a third aspect, this application provides a computer-readable storage medium storing program instructions that, when loaded and executed by a processor, cause the processor to perform the pollutant concentration prediction method according to any one of the first aspects of this application.
[0016] The pollutant concentration prediction scheme based on multi-source data fusion provided above, in this embodiment, constructs a prediction model for predicting pollutant concentration, including a frequency domain transformation module, a time domain convolution module, a frequency domain modulation module, and a cross-variable attention module. This model sequentially performs frequency domain decomposition, time domain dynamic feature extraction, frequency dimension adaptive weight adjustment, and calculation of inter-variable coupling relationships based on an attention mechanism on multivariable time series input samples. This allows for the simultaneous capture of long-term trends, periodic fluctuations, and short-term dynamics of pollutant concentration changes, and explicit dependency modeling between different input variables, thereby improving the accuracy and reliability of pollutant concentration prediction. Attached Figure Description
[0017] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of this application are illustrated by way of example and not limitation, and the same or corresponding reference numerals denote the same or corresponding parts, wherein:
[0018] Figure 1 An exemplary flowchart of the pollutant concentration prediction method according to an embodiment of this application is shown; Figure 2 An exemplary structural block diagram of a prediction model for predicting pollutant concentrations according to an embodiment of this application is shown.
[0019] Figure 3 Exemplary flowcharts illustrating the use of predictive models to predict pollutant concentrations in other embodiments of this application are shown; Figure 4 Exemplary flowcharts illustrating the use of traffic flow prediction models to predict traffic flow data according to some embodiments of this application are shown; Figure 5 A schematic block diagram of an apparatus for predicting pollutant concentrations according to some embodiments of this application is shown. Detailed Implementation
[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] It should be understood that the terms "comprising" and "including" used in the specification and claims of this application indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0022] It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this specification and claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this specification and claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations.
[0023] As used in this specification and claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0024] The specific embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0025] This application provides a pollutant concentration prediction method based on multi-source data fusion, which can be applied to scenarios such as urban air quality forecasting and traffic emission control assessment. Figure 1 An exemplary flowchart of the pollutant concentration prediction method according to an embodiment of this application is shown. Figure 2 An exemplary structural block diagram of a prediction model for predicting pollutant concentrations, according to an embodiment of this application, is shown. Figure 1 and Figure 2As shown, the pollutant concentration prediction method 100 may include: step S110, constructing an input sample containing multivariate time series based on historical pollutant concentration data, meteorological data, and traffic flow data characterizing motor vehicle emission activities in the target area; step S120, inputting the input sample into a pre-constructed prediction model for predicting pollutant concentration to perform pollutant concentration prediction; wherein, the prediction model 200 may include: a frequency domain transformation module 210, used to perform frequency domain transformation on the time series of each variable in the input sample to obtain a first frequency domain feature; a temporal convolution module 220, used to perform temporal convolution processing on the first frequency domain feature to extract temporal dynamic features; a frequency domain modulation module 230, used to adaptively adjust the weights of the temporal dynamic features in the frequency dimension to obtain modulation features; a cross-variable attention module 240, used to reorganize the modulation features according to the variable dimension and calculate the coupling relationship between each variable through an attention mechanism to fuse multi-source information to obtain fused features; and a prediction output module 250, used to generate pollutant concentration prediction results for future periods based on the fused features.
[0026] Specifically, in step S110, it is necessary to construct an input sample containing multivariate time series data based on historical pollutant concentration data, meteorological data, and traffic flow data characterizing vehicle emission activities in the target area. It should be understood that the target area typically refers to a geographical area covered by multiple air quality monitoring stations and traffic flow monitoring sections. Historical pollutant concentration data refers to the data on major pollutants (such as PM2.5) over a past period. 2.5 NO2, PM 10 Time-series records of measured values for pollutants such as SO2, CO, and O3 are included. Meteorological data constitutes the external conditions for pollutant diffusion and transformation, and can include one or more elements such as temperature, precipitation, relative humidity, wind speed, wind direction, and air pressure. Traffic flow data is key information reflecting the intensity of mobile source emissions activity, and it can cover traffic volume data statistically analyzed over time periods (e.g., by hour) on different road types. By conducting hourly-scale statistical analysis of traffic flow, the temporal variation characteristics of motor vehicle emission intensity can be accurately characterized, providing key traffic emission inputs for prediction models. Furthermore, traffic flow data can be further subdivided according to vehicle type, fuel type, and emission standards. Among them, vehicle type mainly includes passenger cars, medium and heavy-duty trucks, etc.; fuel type includes gasoline, diesel, natural gas, new energy, and hybrid; emission standards cover the National I to National V stages, thus comprehensively reflecting the vehicle structure composition.
[0027] Step S110 aligns and combines these heterogeneous information reflecting different physical processes at the data level according to a unified time step to form a structured multidimensional time series input sample, laying the foundation for subsequent models to conduct a comprehensive assessment from three dimensions: emission sources, diffusion conditions, and pollution status.
[0028] Next, in step S120, method 100 inputs the input sample into a pre-built prediction model 200 for predicting pollutant concentrations to predict pollutant concentrations. The prediction model 200 is not a black box, but consists of multiple modules with clear technical divisions. These modules, through cascading and collaboration, achieve refined modeling of complex pollution evolution processes.
[0029] First, the frequency domain transformation module 210 in the prediction model 200 is used to perform frequency domain transformation on the time series of each variable in the input sample to obtain the first frequency domain features. Since multivariate time series are affected by multiple factors, they usually exhibit strong non-stationarity, with fluctuations of different frequencies superimposed in the time domain. The function of this module is to map the time domain signal to the frequency domain space. This transformation can effectively separate long-term gradual components related to seasonal changes and background concentration trends from short-term rapid components caused by traffic peaks and local meteorological disturbances. After this processing, the first frequency domain features, in the form of structured frequency components, more clearly characterize the change patterns of the original sequence at different time scales.
[0030] Subsequently, the temporal convolution module 220 performs temporal convolution processing on the aforementioned first frequency domain features to extract temporal dynamic features. It should be clarified that while frequency domain transformation is beneficial for decomposition, the dynamic evolution of pollution sequences (such as the onset, enhancement, and decline of a pollution pattern) naturally unfolds in the time dimension. This module, through temporal convolution operations, scans the frequency-enhanced feature sequence (i.e., the first frequency domain features) to extract local temporal features, capturing the rapid fluctuation patterns of pollutant concentration within a local time window.
[0031] Then, the frequency domain modulation module 230 receives the temporal dynamic features output by the temporal domain convolution module 220 and adaptively adjusts their weights in the frequency dimension to obtain the modulation features. It is understandable that after the temporal convolution operation, the feature channels still contain information about different frequency components, but the importance of this information to the current prediction task is not equal. For example, under normal weather conditions, low-frequency background trends may dominate; while during sudden pollution events, high-frequency components become crucial. This module uses learnable weights to adaptively enhance or suppress each frequency component, achieving the focusing of effective signals in the features and the filtering of noise.
[0032] Furthermore, the intervariate attention module 240 is used to reorganize the modulation features according to the variable dimensions and calculate the coupling relationship between the variables through the attention mechanism to fuse multi-source information and obtain fused features. This is one of the key technical aspects of this application. In traditional methods, different physical quantities such as pollutants, meteorology, and emissions are usually simply spliced together or merged through fixed weights. However, this application recognizes that the atmospheric environment is an interconnected system with nonlinear and dynamically changing interactions between variables. This module treats each input variable as an independent entity and directly calculates the degree of dependence between variables using the attention mechanism. For example, when the model finds that the attention weight between the wind speed variable and the pollutant concentration variable has increased significantly, it means that the system is automatically capturing the removal effect of strong winds on pollutants. Finally, the model compresses this deep intervariate interaction information into highly condensed fused features.
[0033] Finally, the prediction output module 250 generates pollutant concentration predictions for future periods based on this fusion feature. This fusion feature integrates comprehensive information on temporal dynamics, frequency domain structure, and multi-source coupling relationships. The prediction output module only needs to perform regression mapping on it to output high-precision pollutant concentration predictions for the next hour or even forty-eight hours.
[0034] Through the organic combination of the above modules, the embodiments of this application have successfully achieved deep fusion of multi-source environmental information. The prediction process not only takes into account the dynamic evolution in the time domain and the local features in the frequency domain, but also achieves explicit modeling of the coupling relationship between different variables at the mechanism level, thereby significantly improving the accuracy and reliability of pollutant concentration prediction.
[0035] Furthermore, the data quality of the input samples containing multivariate time series constructed in step S110 directly determines the predictive performance of the prediction model 200. Therefore, in some embodiments, before using the original collected data to construct the input samples, systematic data preprocessing and feature engineering can be performed on them to eliminate measurement errors, unify dimensions, and enhance feature representation capabilities.
[0036] In some embodiments, data preprocessing first performs an integrity check on the original time series (i.e., the series composed of historical pollutant concentration data, meteorological data, and traffic flow data). For data gaps caused by sensor malfunctions or communication interruptions, a tiered processing strategy is employed. Specifically, for short-duration missing segments, linear interpolation can be used to recover their local trends to maintain the continuity of the series on a short timescale. For longer-duration missing segments or those that cannot be reliably estimated through interpolation, the mean of synchronous observations from spatially adjacent monitoring stations is used to fill in the gaps, thereby ensuring the overall continuity and rationality of the series. Neighboring monitoring stations refer to other stations that are spatially close to the target monitoring station and have similar pollutant concentration change characteristics; their mean synchronous observations can provide a relatively reliable spatial reference for the missing data.
[0037] After handling missing values, outlier detection and correction are further performed. In some embodiments, box plots and the 3σ discriminant principle can be used together to identify outliers in the data. Box plots are used to detect outliers that deviate from the upper or lower quartile range in the data distribution, while the 3σ discriminant principle is used to identify extreme values that significantly deviate from the normal fluctuation range. For occasional anomalies confirmed to be caused by transient noise, neighborhood smoothing or interpolation can be used for correction to preserve the effective information in the data; for extreme values whose rationality cannot be confirmed, they are directly removed to reduce the interference of measurement errors on subsequent model training.
[0038] After data cleaning, feature engineering is performed on the data to improve the model's ability to characterize spatiotemporal variations. In some embodiments, feature engineering may include at least two aspects: temporal feature construction and meteorological feature processing and standardization.
[0039] In terms of constructing temporal features, the original timestamp can be decomposed into multi-scale time dimensions such as year, month, day, and hour, and further time attributes such as weekdays, weekends, and holidays can be introduced. These temporal features can effectively capture the evolution of pollutant concentrations under periodic time patterns such as daily, weekly, and seasonal variations, providing the model with learnable prior temporal structure information. For example, there are significant differences in traffic activity intensity between weekends and weekdays, and vehicle emission patterns also change regularly during holidays. By explicitly introducing such time attributes, the model can better capture the periodic correlation between emission activities and pollutant concentrations.
[0040] In terms of meteorological feature processing and standardization, meteorological variables closely related to pollutant diffusion and formation are extracted from meteorological data, and continuous meteorological features are standardized. Because different meteorological variables have significantly different dimensions and numerical ranges (for example, temperature is usually measured in degrees Celsius, with a range within tens of degrees; while air pressure ranges in the hectopascals), directly inputting them into the model may lead to features with larger numerical magnitudes dominating the training process, affecting model convergence efficiency and stability. By converting each continuous meteorological feature to a uniform scale, the model can fairly learn the contribution of each variable to pollutant concentration.
[0041] Finally, the pollutant concentration data, meteorological data, traffic flow data, and the constructed time features processed as described above are aligned and integrated according to a unified time step to form a structured multidimensional time series dataset, which serves as the input sample containing multivariate time series as described in step S110, providing a consistent and high-quality input foundation for the prediction model 200.
[0042] In other embodiments, the input sample constructed in step S110 can be further optimized to more accurately reflect the contribution of vehicle emissions to pollutant concentrations. Specifically, constructing an input sample containing multivariate time series includes: calculating emission characteristics characterizing the intensity of vehicle emissions based on traffic flow data; and aligning historical pollutant concentration data, meteorological data, and emission characteristics by time to construct an input sample containing multivariate time series.
[0043] It is important to understand that in some embodiments, traffic flow data can be raw observational information reflecting the level of motor vehicle activity, typically expressed as the number of vehicles passing through a road section per unit time. In other embodiments, traffic flow data can be a predicted traffic flow structure. However, different types of vehicles (such as passenger cars and medium- and heavy-duty trucks) have significantly different pollutant emissions, and even vehicles of the same type can have orders of magnitude different emission levels due to differences in fuel type (such as gasoline, diesel, and natural gas) and emission standards (such as China IV, China V, and China VI). Therefore, simply using traffic flow data as an input variable cannot directly convey the intensity of the impact of motor vehicle emissions on air quality. Therefore, this embodiment introduces the concept of "emission characteristics," which is a quantitative indicator that directly characterizes the intensity of motor vehicle emissions after the raw traffic flow data has undergone a physical transformation.
[0044] In one specific implementation, emission characteristics can be calculated based on the principles of constructing a motor vehicle emission inventory. Specifically, traffic flow data is subdivided according to dimensions such as vehicle category, fuel type, and emission standards to obtain the hourly traffic flow for each type of vehicle. Then, by combining the emission factors of the corresponding vehicle type and the length of the road segment, the hourly emission rates of each major pollutant on the target road segment are calculated, such as the hourly emission intensity of carbon monoxide, nitrogen oxides, and fine particulate matter. This emission rate is the emission characteristic that characterizes the emission intensity of motor vehicles, and its dimension is usually grams per hour or grams per kilometer per hour, which has a direct source-sink relationship with the pollutant concentration.
[0045] After obtaining the emission characteristics, they are aligned with historical pollutant concentration data and meteorological data at a unified time step. Time alignment refers to matching these three types of data along the time dimension using the same time index as a benchmark, ensuring that at each time step, the model obtains the observed values or statistics of different variables at the same moment. Through this alignment operation, the constructed input sample becomes a structured multivariate time series, where each variable serves as an independent feature channel, collectively constituting the model's multi-source input.
[0046] Constructing input samples in the above manner can bring at least two beneficial effects: First, emission characteristics, as a physical sublimation of traffic flow data, transform the appearance of traffic activities into the substance of emissions, enabling the model to directly learn the causal relationship between emission source intensity and pollutant concentration, rather than indirectly guessing its impact from traffic flow; Second, joint modeling of emission characteristics with meteorological conditions and historical concentrations after time alignment allows the model to simultaneously consider the dynamic changes of emission sources, the evolution of atmospheric diffusion conditions, and the chemical transformation and accumulation effects of pollutants themselves within the same time frame, thereby significantly improving the ability to characterize the spatiotemporal evolution of pollutant concentrations.
[0047] In some specific embodiments, the emission characteristics characterizing the emission intensity of motor vehicles can be calculated according to the following formula: ; in, This represents the hourly emission rate of pollutant p. L represents the traffic flow of vehicle category i during hour h, and L represents the length of the road segment. Let represent the emission factor of pollutant p corresponding to vehicle category i, and n represent the total number of vehicle categories.
[0048] In the formula, The emission rate of pollutant p, expressed in grams per hour (g / h), is the final output of the formula. It directly represents the total mass rate at which all motor vehicles emit a specific pollutant p into the atmosphere within a target area and a specific hour. This emission rate is the quantitative form of the emission characteristics constructed in the preceding steps, and it directly reflects the contribution of motor vehicle emission activities to the concentration of air pollutants.
[0049] This represents the vehicle flow rate of vehicle category i during hour h, expressed in vehicles per hour (veh / h). Vehicle category i does not refer to all motor vehicles, but rather to a specific vehicle type after being subdivided according to dimensions such as vehicle type, fuel type, and emission standards. For example, vehicle categories can be divided into gasoline passenger cars (China V emission standard), diesel medium and heavy-duty trucks (China IV emission standard), and natural gas buses. Subdividing traffic flow data according to this dimension is a prerequisite for ensuring the accuracy of emission calculations, because the emission levels of different vehicle types vary by orders of magnitude.
[0050] L represents the length of the target road segment, which can be expressed in kilometers (km). This parameter correlates the activity intensity represented by vehicle flow with a specific spatial range, enabling the calculation results to reflect the emission intensity per unit road length.
[0051] This represents the emission factor for pollutant p corresponding to vehicle category i, and its unit can be grams per kilometer per vehicle (g / km / veh). The emission factor is an empirical parameter reflecting the average mass of a certain pollutant emitted by a specific type of vehicle per unit distance traveled. Emission factor values are typically derived from authoritative motor vehicle emission inventory guidelines or laboratory bench test results, and their values vary depending on factors such as vehicle type, fuel type, emission control technology level, driving conditions, and ambient temperature. For example, the nitrogen oxide emission factor of a diesel heavy-duty truck meeting the China III emission standard is usually much higher than that of a gasoline passenger car meeting the China VI emission standard.
[0052] n represents the total number of vehicle categories involved in the calculation. The summation symbol is used... The formula sums up the pollutant emission contributions of all types of vehicles on the target road section to obtain the total emissions of motor vehicles on that section.
[0053] It should be noted that this formula embodies the bottom-up approach to emissions inventory calculation, that is, by finely classifying and calculating the emissions of each type of vehicle activity, a macroscopic emissions intensity is obtained. In practical applications, It can come from real-time traffic flow data collected by traffic monitoring equipment, or from the output results of traffic flow prediction models; The emission factor can be selected or calibrated from the emission factor database based on the characteristics of the motor vehicle composition in the target area and the implementation of local emission standards.
[0054] Figure 3 Exemplary flowcharts illustrating the prediction of pollutant concentrations using predictive models are shown in other embodiments of this application. Figure 3 As shown, firstly, historical data on pollutant concentrations, meteorological data, and traffic flow data are acquired. Based on these different types of data, an input sample 310 containing multivariate time series is constructed. The input sample 310 is visualized as a matrix structure consisting of multiple rows and columns of elements to intuitively represent its mathematical form as a multivariate time series.
[0055] Specifically, the circle matrix shown in the figure corresponds to the input sample 310 constructed in step S110, which is composed of historical pollutant concentration data, meteorological data, and traffic flow data (or the aforementioned emission characteristics) of the target area aligned according to a uniform time step. This matrix has multiple columns in the spatial dimension, each column corresponding to an input variable or a type of input data source. In an exemplary visualization, the three columns of circles can schematically represent air quality-related variables, meteorological-related variables, and mobile source emission-related variables, respectively. It is understood that each column can contain one or more specific variable channels; for example, the air quality-related variable column can cover PM2.5. 2.5 The matrix contains concentration sequences of various pollutants such as NO2 and O3, and meteorological variables including temperature, relative humidity, wind speed, and wind direction. The rows of the matrix correspond to the time dimension, with each row representing all variable values at a given time step. The number of rows corresponds to the length of the selected historical time window; for example, with an hourly step and a 12-hour window, the matrix contains 12 rows. Thus, the input sample 310 mathematically constitutes a structured spatiotemporal feature matrix, simultaneously carrying information on the dynamic changes of multiple environmental variables over continuous time.
[0056] After obtaining the input sample 310, the frequency domain transformation module 210 performs a frequency domain transformation on the time series of each variable in the sample to obtain the first frequency domain features. In one embodiment, this frequency domain transformation is implemented using the Discrete Cosine Transform (DCT). The Discrete Cosine Transform is a mathematical transformation method that maps a time-domain signal to a frequency-domain space. Its characteristic is that it can decompose the signal into a weighted sum of a series of cosine functions with different frequencies, and the transformation result has a strong energy concentration characteristic, that is, the main information of the signal tends to be concentrated on a few low-frequency components.
[0057] In this embodiment, the frequency domain transformation module 210 uses discrete cosine transform to decompose the time series of each variable to separate a first frequency domain feature containing multiple frequency components. The multiple frequency components may include at least two of the following: low-frequency components characterizing the long-term trend and background concentration characteristics of pollutants, mid-frequency components characterizing the periodic fluctuations of each variable, and high-frequency components characterizing the short-term fluctuations of each variable.
[0058] It should be noted that the Discrete Cosine Transform (DCT) was chosen over other frequency domain transformation methods (such as Fourier Transform) because pollutant concentration sequences and their influencing factor sequences are usually highly non-stationary. The DCT can generate frequency coefficients in the real domain when processing such real-valued sequences, avoiding the complexity of complex number operations. Furthermore, its energy compression effect is beneficial for subsequent modules to extract significant features more efficiently.
[0059] The multiple frequency components obtained through discrete cosine transform decomposition each carry different physical meanings. These multiple frequency components include at least two of the following types: First, low-frequency components characterizing the long-term trends and background concentration characteristics of pollutants. These components can stably describe the long-term trends of pollutants, such as seasonal periodic variations, and the regional background concentration level (i.e., background concentration characteristics), reflecting the slow modulation effect of seasonal evolution of meteorological conditions and changes in the macroscopic structure of pollution sources on air quality. Second, mid-frequency components characterizing the periodic fluctuations of various variables. These components correspond to periodic patterns typically represented by diurnal variations, such as the intraday fluctuations of pollutant concentrations associated with morning and evening traffic peaks. Third, high-frequency components characterizing the short-term fluctuations of various variables. These components are associated with rapid changes such as instantaneous changes in vehicle emissions, local meteorological disturbances (such as short-term wind direction changes), and sudden pollution events.
[0060] Through the aforementioned frequency domain decomposition, the overlapping concentration change patterns caused by different time-scale driving factors in the original input sample 310 are effectively separated. The first frequency domain feature is presented in the form of structured frequency components, enabling the downstream temporal convolution module 220 to perform targeted modeling of the temporal evolution of different frequency components, rather than performing uniform feature extraction on a single overlapping signal. This helps the model more clearly identify the influence patterns from different sources, reduces the interference of high-frequency noise on the overall prediction task, and lays a more robust and interpretable feature foundation for subsequent temporal modeling and intervariate dependency analysis.
[0061] After the frequency domain transformation module 210 completes the frequency domain decomposition of the time series of each variable and obtains the first frequency domain feature, the first frequency domain feature is sent to the time domain convolution module 220 to extract its dynamic evolution law in the time dimension. The core function of the time domain convolution module 220 is to further capture the local change pattern of pollutant concentration over time from the frequency domain features that have been separated into different frequency components.
[0062] like Figure 3 As further illustrated, in some embodiments, the temporal convolution module 220 can be composed of two cascaded one-dimensional convolutional structures. First, for each frequency component of the input features, local temporal features are extracted through a first one-dimensional convolutional layer (Conv1D) to capture short-term dynamic changes between adjacent time steps. Subsequently, a nonlinear expressive capability is introduced through a rectified linear activation function (ReLU) to output the first local temporal feature. Next, the first local temporal feature is further input into a second one-dimensional convolutional layer (Conv1D) to deepen the modeling of local temporal patterns, and then undergoes a nonlinear transformation again through a ReLU activation function to obtain multi-channel temporal dynamic features.
[0063] Through the cascaded processing of the two-layer one-dimensional convolution and their corresponding activation functions, the temporal convolution module 220 can effectively extract local variation features in pollutant concentration, traffic emissions and meteorological factors, enhance the model's ability to represent short-term fluctuations and local trends, and thus improve the prediction stability under complex environmental conditions.
[0064] After the temporal convolution module 220 extracts the temporal dynamic features, these features are fed into the frequency domain modulation module 230 for further fine-grained weight adjustment in the frequency dimension. It is important to understand that while the temporal convolution module 220 effectively captures the dynamic evolution of pollutant concentrations over time, the frequency components in its multi-channel temporal dynamic features do not contribute equally to the final prediction task. For example, under stable weather conditions, low-frequency components characterizing background pollutant accumulation may play a dominant role in the prediction results; while in sudden pollution events, high-frequency components characterizing emission mutations and meteorological disturbances may become crucial. The frequency domain modulation module 230 is designed to adaptively identify and enhance the most valuable frequency components for the current prediction task through a learnable mechanism, while suppressing noise and redundant information.
[0065] In some embodiments, the frequency domain modulation module 230 performs adaptive weight adjustment by: projecting the multi-channel temporal dynamic features output by the temporal domain convolution module through a linear mapping to obtain reconstructed features; introducing a nonlinear response into the reconstructed features using a linear rectified activation function to obtain a second frequency domain feature that enhances local features; and generating normalized weights using a Sigmoid activation function to adaptively weight each frequency component of the second frequency domain feature to obtain modulation features.
[0066] The figure schematically illustrates an exemplary structure inside the frequency domain modulation module 230, which includes a linear mapping layer (Linear), a linear rectified activation function (ReLU), a linear mapping layer (Linear), and a sigmoid activation function (Sigmoid) connected in sequence.
[0067] Specifically, firstly, the multi-channel temporal dynamic features output by the temporal convolution module 220 are projected through the first linear mapping layer to obtain reconstructed features. The role of this linear mapping is to recombine and align the features in the channel dimension, enabling the features of each channel, which were originally extracted independently by the temporal convolution, to interact and cross-reference information, thus providing a richer feature representation foundation for subsequent frequency dimension weight learning.
[0068] Subsequently, a nonlinear response is introduced into the reconstructed feature using the Rectified Linear Unit (ReLU) activation function to obtain a second frequency domain feature that enhances local features. The mathematical property of the ReLU activation function is that it maps negative inputs to zero, retaining only positive inputs. This operation effectively highlights significant frequency domain components with large amplitude variations that are closely related to pollutant generation or diffusion processes, while suppressing components with weak amplitudes or irrelevant to the prediction task, thereby achieving sparser representation and local enhancement of the features.
[0069] Next, the second frequency domain features are projected again through a second linear mapping layer, mapping them from the nonlinearly activated feature space to a weight space corresponding one-to-one with each frequency channel. Then, the projection result is processed using the sigmoid activation function to generate normalized weights for each frequency channel. The output range of the sigmoid function is (0, 1), so the generated weights are normalized values between 0 and 1, which can smoothly control the degree of information transmission for each frequency channel.
[0070] Finally, the generated normalized weights are multiplied channel by channel with each frequency channel of the second frequency domain feature, i.e., adaptive weighting is applied to each frequency component to obtain the modulation feature. In this process, the information of frequency components given higher weights by the Sigmoid function is preserved and enhanced; the information of frequency components given lower weights is suppressed or filtered out.
[0071] Through the aforementioned mechanism, the frequency domain modulation module 230 can dynamically adjust its dependence on different frequency components according to the specific characteristics of the input data and the needs of the prediction task. For example, under normal meteorological conditions and stable emission backgrounds, the model can learn to assign higher weights to low-frequency components to make stable predictions based on long-term background trends; while when there are significant traffic peaks or local meteorological disturbances, the model can automatically increase its attention to mid-frequency and high-frequency components to capture concentration fluctuations caused by emission activities and meteorological changes in a timely manner. This data-driven frequency-dimensional adaptive modulation mechanism is one of the important structural supports for building the model's cross-regional generalization ability under different cities, seasons, and pollution scenarios.
[0072] After obtaining the modulation features adaptively weighted by the frequency domain modulation module 230, these features are fed into the intervariate attention module 240 to achieve deep fusion of multi-source information along the variable dimension. The intervariate attention module 240 is designed because various elements in the atmospheric environment do not affect pollutant concentrations in isolation, but rather are coupled through complex physical and chemical processes. For example, changes in wind speed indirectly alter pollutant concentrations by affecting the advection diffusion of pollutants, while emission intensity directly constitutes a primary source of pollutants. Therefore, extracting features only along the time dimension is insufficient to reveal the interaction mechanisms between these different physical variables. The intervariate attention module 240 is specifically designed to explicitly capture these intervariate coupling relationships.
[0073] In other embodiments, the transvariable attention module 240 is further configured to: use the complete time series of each input variable corresponding to the modulation feature within a fixed time window as its feature representation; and use a self-attention mechanism to calculate the coupling relationship between each input variable and other input variables in the variable dimension; wherein the input variables include at least one of pollutant concentration, meteorological data, emission features and time features.
[0074] In one embodiment, the transvariate attention module 240 first reorganizes the modulation features along the variable dimensions. Reorganization along the variable dimensions means reorganizing the feature matrix, originally organized as a multivariate time series, according to the types of its corresponding input variables. Specifically, the modulation features contain feature information from multiple input variables, such as pollutant concentration, meteorological data, emission characteristics, and time characteristics. This module treats the complete time series of each input variable within a fixed time window as a feature representation of a variable token. For example, for PM... 2.5For the variable concentration, all concentration observations over the past 12 hours collectively constitute its feature representation; similarly, for the variable wind speed, all wind speed observations within the same time window collectively constitute its feature representation. This representation method is fundamentally different from the traditional method of slicing along the time step dimension: traditional methods treat each time step as an independent symbol, while this embodiment uses the complete time series as the basic unit of variable granularity, thereby enabling the subsequent attention mechanism to directly model at the variable level.
[0075] After reorganizing the variable dimensions, the cross-variable attention module 240 uses a self-attention mechanism to calculate the coupling relationship between each input variable and other input variables. The self-attention mechanism is essentially a weighted information aggregation operation. It assigns attention weights by calculating the similarity between the query vector and the key vector, and then weights and sums the weights with the value vectors to generate a representation for each variable that incorporates information from other variables. In this embodiment, the feature representation corresponding to each variable token undergoes a trainable linear transformation to generate its corresponding query, key, and value. Subsequently, by calculating the attention score between any two variables, the model can learn the strength of the dependency and the direction of the interaction between variables. For example, a high attention score between the feature representation of the wind speed variable and the feature representation of the pollutant concentration variable indicates that the model is inferring the diffusion and removal effect of wind speed on pollutants; a high attention score between the emission feature and the pollutant concentration reflects that the model is capturing the direct contribution of emission source strength to pollutant concentration.
[0076] It should be noted that the attention weights in the transvariate attention module 240 are not fixed, but dynamically updated through backpropagation during model training. This means that the model can adaptively adjust the coupling relationships between variables based on different meteorological conditions in different cities, pollution characteristics in different seasons, and different emission structures. This adaptability allows the model to automatically strengthen core variables that are more critical to the current prediction task (for example, emissions and boundary layer height may become dominant variables during heavy pollution weather), while weakening the interference of redundant or noisy variables. Through this data-driven variable dependency learning mechanism, the transvariate attention module 240 can generate a variable dependency structure that conforms to atmospheric physics and pollution formation mechanisms, thereby significantly reducing the problems of variable superposition confusion and effect confusion commonly found in traditional multivariate models.
[0077] Finally, the intervariate attention module 240 integrates the attention-weighted aggregated variable features and outputs a fused feature. This fused feature not only carries the temporal evolution information of individual variables, but also contains the global coupling semantics of the interactions between different variables through physical and chemical processes, providing a highly condensed and interpretable input representation for the subsequent prediction output module 250.
[0078] like Figure 3 As further illustrated, the prediction output module 250 is located after the intervariate attention module 240. It receives the fused features output by the aforementioned module and generates a prediction result for pollutant concentration in future time periods based on these fused features. As shown in the figure, the prediction output module 250 can be implemented using a progressively decreasing regression mapping structure, visually represented as multiple stacked columns, each represented by several circles, with the number of circles decreasing layer by layer. It can be understood that each column of circles represents a fully connected layer or a linear projection layer, and the progressively decreasing number of circles vividly illustrates the process of gradually compressing the feature dimension from high to low dimensions.
[0079] Specifically, the first layer of the prediction output module 250 receives high-dimensional fusion features output by the intervariate attention module 240. These fusion features include multi-dimensional information such as the trend signal of pollutant concentration evolution over time, the change pattern driven by meteorology, emission disturbances caused by traffic activities, and coupling effects between different variables. Through stepwise mapping and nonlinear transformation of the first layer and subsequent intermediate layers, the model extracts the essential features most relevant to the prediction target level by level, gradually filtering out redundant information and noise. The final layer outputs a pollutant concentration prediction value that matches the target prediction dimension. This prediction value can correspond to the concentration prediction result of one or more pollutants at a specific future time step. Through this layer-by-layer compressed regression mapping design, the prediction output module 250 can flexibly adapt to different prediction task requirements while maintaining strong prediction performance, such as single-pollutant single-step prediction or single-pollutant multi-step prediction. The adjustable configuration of the prediction head structure can be achieved simply by adjusting the number of nodes in the final output layer.
[0080] For example, in terms of adjusting the prediction period, embodiments of this application provide two typical implementation methods.
[0081] Firstly, this is achieved by adjusting the correspondence between the input time window and the prediction time window. During model training, the construction of training samples determines the time mapping relationship between the input and output learned by the model. For example, if the model is to predict pollutant concentrations for the next 6 hours, then when constructing training samples, a multivariate time series from a historical period is used as input, and the measured pollutant concentration 6 hours after the end of that period is used as the supervision signal for training. By changing the time offset between the output label and the input window in the training samples, model instances adapted to different prediction durations can be trained. In this method, the number of output layer nodes of the prediction output module 250 remains unchanged (e.g., only the pollutant concentration value for one time step is output during single-step prediction). Instead, by changing the training sample set with different time offsets, or by mixing samples with multiple offsets in the same training set, the model learns the ability to adapt to different prediction durations.
[0082] Secondly, this is achieved by adjusting the structure of the output layer in the prediction output module 250, specifically by setting an adjustable prediction head structure in the output layer. In this approach, the fused features output by the transvariable attention module 240 are fed into one or more parallel prediction heads as a shared high-dimensional feature representation. Each prediction head corresponds to a specific prediction task or prediction duration; for example, one prediction head is specifically responsible for +1 hour prediction, and another prediction head is responsible for +24 hour prediction. Each prediction head can internally employ the aforementioned layer-by-layer compressed regression mapping structure, but the number of nodes in the final output layer can be set accordingly based on the prediction step size handled by that prediction head. For example, if a prediction head needs to simultaneously output prediction values for the next 6 hours, 12 hours, and 24 hours, its output layer can be set to 3 nodes. Through this multi-prediction head architecture, a single model can simultaneously support prediction tasks for multiple prediction durations and multiple pollutants without needing to train a separate model instance for each prediction task, thereby improving the model's deployment efficiency and versatility.
[0083] To verify the actual technical effectiveness of the pollutant concentration prediction method provided in this application, the inventors conducted a systematic comparative experiment on a real environmental monitoring dataset. This experiment selected pollutant concentration monitoring data, meteorological observation data, and traffic flow data from several consecutive years within the target area as the basic dataset. Following the aforementioned data preprocessing and feature engineering steps, multivariate time series input samples were constructed, and the dataset was divided into training, validation, and test sets according to a certain ratio. The training set was used for model parameter optimization, the validation set for hyperparameter selection and early shutdown control, and the test set for final performance evaluation.
[0084] In terms of benchmark model selection, this experiment covers a variety of representative pollutant concentration prediction methods for comprehensive performance comparison. Specifically, the benchmark models include: the traditional statistical model ARIMA (Autoregressive Integral Moving Average); typical deep learning models LSTM (Long Short-Term Memory Network), CNN-LSTM (a hybrid architecture of convolutional neural network and long short-term memory network), GRU (Gated Recurrent Unit), and Transformer; in addition, it also includes the PatchTST model (Time-Stage Division Time Series Prediction Model), which has made significant progress in the field of time series prediction in recent years.
[0085] In terms of evaluation metrics, this experiment used Mean Absolute Percentage Error (MAPE), Root Mean Square Error (RMSE), and Coefficient of Determination (R²). 2Three metrics are used to quantitatively evaluate model performance. MAPE measures the average relative deviation between predicted and measured values, reflecting the overall predictive reliability of the model; RMSE, obtained by taking the square root of the mean of the squared prediction errors, assigns a higher penalty weight to large errors and measures the model's sensitivity to scenarios with large errors; R... 2 This indicates the proportion of variance in the target variable that the model explains. The value is usually between 0 and 1. The closer the value is to 1, the better the model fits the data.
[0086] Tables 1-1 and 1-2 show the comparison of the prediction performance of each model for PM2.5 concentrations across different prediction time ranges. The prediction time ranges include five typical scenarios: +1 hour, +6 hours, +12 hours, +24 hours, and +48 hours (the plus sign indicates the future period), corresponding to different application needs from short-term warnings to medium- and long-term forecasts.
[0087] Table 1-1: Prediction results of PM2.5 concentrations for different time periods using different models.
[0088]
[0089] Table 1-2: Prediction results of PM2.5 concentrations for different time periods using different models (Part 2).
[0090]
[0091] Note: RMSE is measured in μg / m³. 3 .
[0092] As shown in Tables 1-1 and 1-2, the prediction model provided in this application embodiment achieves optimal performance in all PM2.5 prediction tasks. In the short-term prediction task (+1 hour), the model achieves the lowest MAPE (0.219) and RMSE (11.524 μg / m³). 3 ), while R 2 The value reached 0.912, indicating that it can accurately depict the real-time dynamic characteristics of pollutant concentration changes, and the deviation between the predicted value and the measured value is extremely small.
[0093] This performance advantage is not only reflected in short-term forecasting; as the forecast duration gradually extends to +12 hours, +24 hours, and even +48 hours, the model in this application maintains a significant lead in all three evaluation metrics. Taking the +48-hour forecasting task as an example, the model in this application achieves a substantial improvement compared to the traditional ARIMA model: MAPE decreased from 0.608 to 0.428, a reduction of approximately 29.6%; RMSE decreased from 43.598 μg / m 3 Decreased to 33.754 μg / m 3 The decrease was approximately 22.6%; R2 The value increased from 0.656 to 0.760, an improvement of approximately 15.9%. These results indicate that the model in this application can more effectively capture the long-term time dependence and intervariate coupling of pollutant concentrations, and has higher fitting ability and generalization performance for complex pollution processes.
[0094] Tables 2-1 and 2-2 further present the comparison results of the predictive performance of each model for NO2 concentration within the same prediction time range. NO2 is one of the important tracers of motor vehicle emissions, and its concentration changes are more directly correlated with traffic emission activities, thus placing higher demands on the model's ability to characterize emission sources.
[0095] Table 2-1: Comparison of NO2 concentration prediction performance of different models.
[0096]
[0097] Table 2-2: Comparison of NO2 concentration prediction performance of different models (Part 2)
[0098]
[0099] Note: RMSE is measured in μg / m³. 3 .
[0100] As shown in Tables 2-1 and 2-2, in the NO2 concentration prediction task, the model in this application also achieved the best or significantly better performance than other benchmark models across the entire prediction time range. In the +1 hour short-term prediction, the MAPE of the model in this application was 0.258, and the RMSE was 14.639 μg / m³. 3 R 2 The MAPE of this application's model was 0.891, ranking first among all three indicators. In the +48-hour long-term forecast, compared to the traditional ARIMA model, the MAPE of this application's model decreased from 0.639 to 0.491, a reduction of approximately 23.2%; the RMSE decreased from 57.948 μg / m 3 Decreased to 35.419 μg / m 3 The decrease was approximately 38.9%; R 2 The value increased from 0.607 to 0.758, an improvement of approximately 24.9%. These results demonstrate that the model in this application possesses particularly outstanding predictive ability for NO2 pollutants closely related to traffic emissions. This is directly related to the introduction of emission characteristics representing the intensity of motor vehicle emissions into the input samples and the refined modeling of multi-scale variation patterns through frequency domain transformation and frequency domain modulation modules.
[0101] Based on the experimental results in Tables 1-1 to 2-2, the pollutant concentration prediction model provided in this application demonstrates significantly better prediction accuracy and robustness than existing technologies in both short-term and long-term prediction tasks. This performance advantage can be explained by several core technical means introduced in this application.
[0102] First, the frequency domain transformation module 210 performs frequency domain decomposition on the time series of each variable using discrete cosine transform. This allows the model to separate frequency components with different physical meanings from the original non-stationary time series data, enabling downstream modules to process low-frequency trends, mid-frequency cycles, and high-frequency fluctuations separately, avoiding aliasing interference between different frequency components in the time domain. Second, the time domain convolution module 220 extracts local variation trends in pollutant concentrations, traffic emissions, and meteorological factors, enhancing the model's ability to represent short-term fluctuations and local trends. Third, the frequency domain modulation module 230 adaptively adjusts the weights of each component along the frequency dimension. This allows the model to dynamically adjust its dependence on different frequency components according to specific pollution scenarios, strengthening the role of low-frequency background trends under stable weather conditions and improving sensitivity to high-frequency fluctuations during sudden pollution events. Finally, the intervariate attention module 240 performs attention interaction calculations on multi-source variables along the variable dimension. This allows the model to explicitly capture the coupling relationship between pollutant concentrations and meteorological conditions and emission characteristics, rather than simply concatenating multi-source variables linearly.
[0103] In summary, the embodiments of this application effectively improve the spatiotemporal feature representation capability of pollutant concentration prediction through the synergistic effect of multiple technical means such as frequency domain enhancement mechanism, temporal convolution extraction structure, frequency dimension adaptive modulation and cross-variable dependency modeling, thereby achieving high-precision prediction of air pollutant concentration.
[0104] It is understandable that the traffic flow data representing motor vehicle emission activities required in the aforementioned pollutant concentration prediction model 200 can be sourced from measured data directly collected by traffic monitoring equipment. However, in actual road networks, not all road sections are equipped with traffic flow monitoring equipment, or some equipment may have missing data due to malfunction or maintenance. To address this issue, this application embodiment further provides a traffic flow prediction model for reliably predicting traffic flow on unmonitored road sections lacking monitoring equipment or with missing data, thereby obtaining complete and continuous traffic flow data.
[0105] Figure 4 Exemplary flowcharts illustrating some embodiments of this application for predicting traffic flow data using a traffic flow prediction model are shown. Figure 4As shown, the traffic flow prediction model 400 can adopt a hybrid architecture that integrates a multilayer perceptron and a converter structure, which mainly includes an input embedding layer 401, a multilayer perceptron feature enhancement layer 402, a converter encoder 403, and an output prediction layer 404.
[0106] Input embedding layer 401 receives at least one of the following input data: time features, historical traffic flow sequences, and road category features. At input embedding layer 401, the figure shows a matrix structure composed of multiple rows and columns of circles. This matrix has multiple columns in the spatial dimension, each column corresponding to a type of input data. In an exemplary visualization, the three columns of circles can schematically represent time features, historical traffic flow sequences, and road category features, respectively. Time features refer to multi-scale time attribute information derived from the original timestamp, such as time dimensions like year, month, day, and hour, as well as marker information like weekdays, weekends, and holidays. These features are used to capture the changing patterns of traffic flow in periodic time patterns such as daily, weekly, and seasonal variations. Historical traffic flow sequences refer to the time-series records of traffic flow on a specific road or road segment within a certain time window in the past, reflecting the inertial trend and recent evolution direction of traffic activity. Road category features refer to the static attribute information of the road itself, such as the classification of road functional levels like expressways, arterial roads, secondary arterial roads, and local roads, used to reflect the differences in traffic flow characteristics of different road levels. The rows of the matrix correspond to the time dimension, and the number of rows represents the length of the selected historical time window. For example, when the window length is 12 hours and the sampling step size is 1 hour, the matrix contains 12 rows. By aligning the above-mentioned multiple types of input data in the time dimension, the input embedding layer 401 integrates them into a unified structured input representation.
[0107] The multilayer perceptron feature enhancement layer 402 is used to enhance the features of the input data to obtain enhanced features. After the input embedding layer 401 completes data integration, its feature representation is fed into the multilayer perceptron feature enhancement layer 402. Please refer to [link to relevant documentation] for further information. Figure 4 In a specific implementation, the multilayer perceptual feature enhancement layer 402 can be implemented through a series of operations. For example... Figure 4As shown, this layer can contain a first linear mapping layer (Linear), a first rectified linear activation function (ReLU), a layer normalization layer (Layer Norm), a second linear mapping layer (Linear), and a second rectified linear activation function (ReLU) connected in sequence. The linear mapping layer performs a trainable linear projection transformation on the input features to recombine and interact information between feature channels; the rectified linear activation function introduces nonlinear transformation capabilities, enabling the model to learn complex high-dimensional nonlinear mapping relationships; and the layer normalization layer standardizes the feature distribution to enhance the stability and convergence speed of model training. Through the combination of these operations, the multilayer perceptual feature enhancement layer 402 can extract enhanced features that are more expressive of traffic flow prediction from the original input data. It should be noted that the five-step concatenated structure shown in the figure is only an exemplary embodiment. In actual deployment, this structure can be stacked in multiple layers according to the task complexity to further improve the depth and breadth of feature enhancement.
[0108] Subsequently, the enhanced features are input to the transformer encoder 403. The transformer encoder 403 encodes the enhanced features using a self-attention mechanism to obtain temporal dependency features. The transformer encoder 403 is a neural network structure entirely based on a self-attention mechanism. Its core advantage lies in its ability to capture the direct dependencies between any two positions in sequential data, without needing to pass information through step-by-step recursion like recurrent neural networks. In traffic flow prediction applications, the transformer encoder 403 uses a self-attention mechanism to encode the enhanced features, automatically learning the correlation strength between information related to traffic activity at different time steps, and generating temporal dependency features containing long-range temporal dependencies. For example, it can automatically capture the correlation between traffic patterns at the same time on the same day of the previous week and the current prediction time, or identify special traffic peak patterns before holidays, thereby providing global contextual information for subsequent predictions.
[0109] Finally, the temporal dependency features are fed into the output prediction layer 404. Output prediction layer 404 is used to make predictions based on the temporal dependency features, outputting the predicted traffic flow data. For example... Figure 4As shown, in some embodiments, the output prediction layer 404 can be implemented using a progressively decreasing regression mapping structure, visually represented as multiple stacked columns, each represented by several circles, with the number of circles decreasing layer by layer. Each column of circles represents a fully connected layer or a linear projection layer, and the progressively decreasing number of circles vividly illustrates the process of gradually compressing the feature dimension from high to low dimensions. The final layer outputs a traffic flow prediction value that matches the target prediction dimension. Through this progressive compression design, the output prediction layer 404 can progressively extract the essential information most relevant to the prediction target from high-dimensional temporal dependent features, outputting traffic flow prediction results for unmonitored road segments or future time periods.
[0110] Through the organic combination of the input embedding layer 401, the multi-layer perceptual feature enhancement layer 402, the transformer encoder 403, and the output prediction layer 404, the traffic flow prediction model 400 can effectively integrate multi-dimensional features such as time periodicity information, traffic flow historical inertia, and road structure differences. It also captures long-term temporal dependencies through a self-attention mechanism, thereby achieving high-precision prediction of traffic flow on unmonitored road sections and providing reliable traffic flow data input for the downstream prediction model 200.
[0111] Furthermore, it is understood that after the structure of the traffic flow prediction model 400 is determined, it needs to be trained to obtain model parameters that can be used for actual prediction. In some embodiments, the training process of the traffic flow prediction model 400 adopts the following configuration.
[0112] Regarding the loss function, Mean Squared Error (MSE) is used. MSE calculates the mean of the squares of the differences between the predicted and measured values. It assigns a higher penalty weight to larger errors, which helps the model focus on the predicted samples with larger deviations during training, thereby improving the overall prediction accuracy.
[0113] Regarding the optimizer, the AdamW optimizer is used for iterative updates of model parameters. The AdamW optimizer is an improved version of the Adaptive Moment Estimator (Adam). It decouples weight decay from gradient updates during parameter updates, which can effectively suppress the overfitting tendency of the model and improve the model's generalization ability on unseen data.
[0114] In terms of training strategy, a rolling prediction strategy is adopted to enhance the model's temporal generalization ability. The rolling prediction strategy refers to the process where, as training epochs progress, the model uses its own predictions generated in previous stages as part of the input for predictions in subsequent time steps. In this way, the model can be exposed to the cumulative effect of its own prediction errors during the training phase, thereby learning robust feature representations that can maintain stable predictions even under error propagation conditions. Furthermore, during training, hyperparameters such as learning rate, number of network layers, and inflation coefficient are dynamically adjusted using a validation set to achieve an optimal balance between model complexity and generalization performance.
[0115] To verify the actual predictive performance of the traffic flow prediction model 400, this application systematically compares it with several representative traditional traffic flow prediction methods. The selected benchmark models include: traditional machine learning models RF (Random Forest) and GBDT (Gradient Boosting Decision Tree), typical deep learning models LSTM (Long Short-Term Memory) and GRU (Gated Recurrent Unit), as well as 3-layer MLP (Multilayer Perceptron) and MLP-Attention (Multilayer Perceptron with Attention Mechanism) for comparison. Evaluation metrics include Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Coefficient of Determination (R²). 2 ), where MAE and RMSE are measured in units of traffic flow, and the lower the value, the smaller the prediction error; R 2 The closer a value is to 1, the higher the proportion of the variance in traffic flow that the model explains. Table 3 shows the performance comparison results of each model on the +1 hour prediction task.
[0116] Table 3: Performance comparison results of each model on the +1 hour prediction task.
[0117]
[0118] As shown in Table 3, the traffic flow prediction model provided in this application embodiment achieved optimal performance across all three evaluation metrics. Specifically, its MAE was 75.264, a decrease of approximately 6.7% compared to the second-best model (MLP-Attention's 80.637); its RMSE was 132.697, a decrease of approximately 7.2% compared to the second-best model (MLP-Attention's 142.973); R 2 The value is 0.837, which is an improvement of about 9.0% compared to the second-best model (0.768 for MLP-Attention).
[0119] By comparing the progressive model structures, we can further analyze the technical contributions of each module. Comparing 3-MLP with traditional machine learning models such as RF and GBDT, it's evident that deep learning structures have a significant advantage in capturing the nonlinear temporal features of traffic flow. Comparing MLP-Attention with 3-MLP, it's clear that introducing an attention mechanism further reduces the model's MAE and RMSE, and improves R². 2 Further improvements demonstrate that the attention mechanism helps capture long-range dependencies in traffic flow sequences. Comparing the model in this application (MLP-Transformer) with MLP-Attention, it can be seen that replacing the attention mechanism with a complete transformer encoder results in the most significant overall performance improvement, indicating that the transformer's self-attention mechanism can more comprehensively and effectively capture the global dependencies between time steps in the traffic flow sequence.
[0120] Based on the above experimental results, the traffic flow prediction model 400 provided in this application embodiment can more effectively capture complex traffic change patterns by extracting high-dimensional nonlinear features from the input data through the multi-layer sensing feature enhancement layer 402 and capturing temporal dependencies through the converter encoder 403 using a self-attention mechanism. This enables high-precision prediction of traffic flow on unmonitored road sections and provides reliable traffic emission input data for the downstream pollutant concentration prediction model 200.
[0121] This application also provides a device for predicting pollutant concentrations. Figure 5 A schematic block diagram of a device for predicting pollutant concentrations according to some embodiments of this application is shown. Figure 5 As shown, device 500 includes: processor 510 configured to execute program instructions; and memory 520 configured to store the program instructions, which, when loaded and executed by processor 510, cause processor 510 to perform the actions described above. Figures 1-4 Any of the described methods for predicting pollutant concentrations.
[0122] Device 500 can be a server, edge computing device, industrial control computer, or any electronic computing device with sufficient computing power. The device includes a processor 510 and memory 520. The processor 510 can be a central processing unit, graphics processing unit, tensor processor, or other type of general-purpose or special-purpose processing chip with program execution capabilities. The memory 520 can be at least one of volatile memory (such as dynamic random access memory) or non-volatile memory (such as solid-state drive, flash memory). It is understood that device 500 can be deployed in environmental monitoring centers, traffic management departments, or cloud servers. By receiving real-time pollutant concentration data, meteorological data, and traffic flow data of the target area, it can predict pollutant concentrations locally or remotely and output the prediction results to display devices, alarm devices, or decision support systems to achieve functions such as air quality forecasting, pollution early warning, or traffic emission control auxiliary decision-making.
[0123] Furthermore, this application also provides a computer-readable storage medium storing program instructions that, when loaded and executed by a processor, cause the processor to perform actions according to the foregoing description. Figures 1-4 Any of the described methods for predicting pollutant concentrations.
[0124] Computer-readable storage media refers to non-transitory storage media capable of persistently storing computer program instructions. These include, but are not limited to, universal serial bus flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks, and other media capable of storing program instructions. By distributing and deploying program instructions in the form of computer-readable storage media, computing devices without real-time network connectivity or environmental monitoring stations requiring offline deployment can still load and run the pollutant concentration prediction method provided in this application, thereby expanding the applicable scenarios and deployment flexibility of the technical solution presented in this application.
[0125] While numerous embodiments of this application have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will arise for those skilled in the art without departing from the spirit and intent of this application. It should be understood that various alternatives to the embodiments of this application described herein may be employed in the practice of this application. The appended claims are intended to define the scope of protection of this application and therefore cover equivalents or alternatives within the scope of these claims.
Claims
1. A method for predicting pollutant concentrations based on multi-source data fusion, characterized in that, include: Based on historical pollutant concentration data, meteorological data, and traffic flow data characterizing motor vehicle emission activities in the target area, an input sample containing multivariate time series is constructed. The input sample is fed into a pre-built prediction model for predicting pollutant concentration to predict pollutant concentration; wherein, the prediction model includes: The frequency domain transformation module is used to perform frequency domain transformation on the time series of each variable in the input sample to obtain the first frequency domain feature; The temporal convolution module is used to perform temporal convolution processing on the first frequency domain features to extract temporal dynamic features; The frequency domain modulation module is used to adaptively adjust the weights of the time-domain dynamic features in the frequency dimension to obtain the modulation features; The cross-variable attention module is used to reorganize the modulation features according to the variable dimensions and calculate the coupling relationship between the variables through the attention mechanism to fuse multi-source information and obtain fused features; The prediction output module is used to generate pollutant concentration prediction results for future time periods based on the fused features.
2. The pollutant concentration prediction method according to claim 1, characterized in that, Constructing input samples containing multivariate time series data includes: Based on the traffic flow data, emission characteristics characterizing the emission intensity of motor vehicles are calculated; and The historical data of pollutant concentrations, meteorological data, and emission characteristics are aligned by time to construct an input sample containing multivariate time series.
3. The pollutant concentration prediction method according to claim 1, characterized in that, The frequency domain transformation module uses discrete cosine transform to decompose the time series of each variable to separate a first frequency domain feature containing multiple frequency components. The multiple frequency components include at least two of the following: low-frequency components characterizing the long-term trend and background concentration characteristics of pollutants, mid-frequency components characterizing the periodic fluctuations of each variable, and high-frequency components characterizing the short-term fluctuations of each variable.
4. The pollutant concentration prediction method according to claim 1, characterized in that, The temporal convolution module includes a first one-dimensional convolutional layer, a first linear rectified activation layer, a second one-dimensional convolutional layer, and a second linear rectified activation layer connected in series; wherein... The first one-dimensional convolutional layer is used to receive the first frequency domain features and perform local temporal feature extraction; The first linear rectified activation layer performs a nonlinear transformation on the output features of the first one-dimensional convolutional layer to output the first local temporal features; The second one-dimensional convolutional layer is used to perform in-depth feature processing on the first local temporal features; The second linear rectified activation layer performs a nonlinear transformation on the output features of the second one-dimensional convolutional layer to output the temporal dynamic features.
5. The pollutant concentration prediction method according to claim 1, characterized in that, The frequency domain modulation module performs adaptive weight adjustment, including: The multi-channel temporal dynamic features output by the temporal convolution module are projected using a linear mapping to obtain reconstructed features; A nonlinear response is introduced into the reconstructed features using a linear rectified activation function to obtain a second frequency domain feature that enhances local features. The modulation feature is obtained by adaptively weighting each frequency component of the second frequency domain feature using a sigmoid activation function to generate normalized weights.
6. The pollutant concentration prediction method according to claim 2, characterized in that, The intervariate attention module is further used for: The complete time series of each input variable corresponding to the modulation feature within a fixed time window is used as its feature representation; The self-attention mechanism is used to calculate the coupling relationship between each input variable and other input variables along the variable dimension; The input variables include at least one of pollutant concentration, meteorological data, emission characteristics, and time characteristics.
7. The pollutant concentration prediction method according to any one of claims 1-6, characterized in that, Before predicting pollutant concentrations, the pollutant concentration prediction method further includes predicting the traffic flow data using a traffic flow prediction model; wherein the traffic flow prediction model includes: An input embedding layer is used to receive at least one type of input data, including time features, historical traffic flow sequences, and road category features. A multi-layer perceptual feature enhancement layer is used to enhance the features of the input data to obtain enhanced features; A transformer encoder is used to encode the enhanced features using a self-attention mechanism to obtain temporally dependent features; The output prediction layer is used to make predictions based on the time-dependent features and output the predicted traffic flow data.
8. The pollutant concentration prediction method according to claim 2, characterized in that, The calculation of emission characteristics characterizing the emission intensity of motor vehicles is performed according to the following formula: ; in, This represents the hourly emission rate of pollutant p. L represents the traffic flow of vehicle category i during hour h, and L represents the length of the road segment. Let represent the emission factor of pollutant p corresponding to vehicle category i, and n represent the total number of vehicle categories.
9. A device for predicting pollutant concentrations, characterized in that, include: A processor, configured to execute program instructions; as well as A memory configured to store the program instructions, which, when loaded and executed by the processor, cause the processor to perform the pollutant concentration prediction method according to any one of claims 1-8.
10. A computer-readable storage medium storing program instructions, characterized in that, When the program instructions are loaded and executed by the processor, the processor performs the pollutant concentration prediction method according to any one of claims 1-8.