A method for predicting ozone concentration based on STL-Transformer

The STL-Transformer method is used to decompose ozone concentration data into seasonal and trend components, and splice it with multi-source data for prediction. This solves the problems of low ozone concentration prediction accuracy and insufficient interpretability in the existing technology, and achieves higher quality. ozone concentration prediction.

CN118248244BActive Publication Date: 2024-09-17QINGDAO UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410242852.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-04
Publication Date
2024-09-17
Estimated Expiration
2044-03-04

AI Technical Summary

Technical Problem

Existing ozone concentration prediction methods have low accuracy and lack of interpretability of prediction results, especially in long-term predictions.

Method used

The method based on STL-Transformer is used to decompose the ozone concentration data into seasonal components, trend components and residual components, and splice them with the ambient air quality index, air quality evaluation parameters, and meteorological parameters, and use them as input sequences of the Transformer model for prediction.

Benefits of technology

It significantly improves the accuracy and interpretability of ozone concentration prediction, can more accurately capture the prior information of ozone changes and the global information of multi-source data, and supports the formulation of refined prevention and control measures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118248244B
    Figure CN118248244B
Patent Text Reader

Abstract

The present invention discloses an ozone concentration prediction method based on STL-Transformer, which belongs to the field of air quality detection technology, including: using the time series decomposition algorithm STL to decompose the measured ozone concentration sequence into a seasonal component, a trend component and a residual component; splicing the three decomposed components with the ambient air quality index, air quality evaluation parameters and meteorological parameters as the input sequence of the Transformer model; using the Transformer model to predict the ozone concentration in different time periods in the future, and outputting the predicted value of the ozone concentration. The ozone concentration prediction method designed based on the STL algorithm and the Transformer model of the present invention can fully capture the prior information of ozone changes, and by extracting the global information of multi-source data, it can significantly improve the prediction quality of ozone concentration and the interpretability of the prediction results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of air quality detection, and in particular, relates to a method for predicting ozone concentration in the atmosphere. Background Art

[0002] Tropospheric ozone does not come from direct pollution emissions, but is the product of photochemical reactions between volatile organic compounds (VOCs) and nitrogen oxides (NOx) under sunlight. It is a typical secondary pollutant and one of the important factors causing regional atmospheric complex pollution in my country. In particular, when near-ground ozone exceeds the natural level, it will have a significant impact on human health, ecosystems, climate change, etc. For example: 1. Instantaneous or long-term high-concentration ozone exposure can cause premature death, respiratory diseases such as asthma and respiratory tract infections, cardiovascular diseases such as stroke and arrhythmia, and neurological diseases such as autism and Alzheimer's disease in children; 2. Ozone can enter the plant body through the stomata of plant leaves and produce highly active oxidants, reduce the content and activity of various photosynthetic catalytic enzymes, inhibit the synthesis of photosynthetic pigments, and induce chloroplast mutations in plant cells; 3. Tropospheric ozone is the third largest greenhouse gas that has caused an increase in global radiative forcing since the Industrial Revolution, accounting for about 3% to 7% of the overall greenhouse effect.

[0003] In recent years, my country has achieved remarkable results in air pollution prevention and control. The concentration of fine particulate matter (PM2.5) has continued to decline, but ozone pollution has shown a rapid increase and spread. Ozone pollution has become a bottleneck problem that restricts further improvement of my country's air quality, so it is urgent to carry out ozone pollution prevention and control. The formation mechanism of ozone is complex and there are many influencing factors. Ozone pollution prevention and control is a long-term and complex system project. High-quality and accurate prediction is the prerequisite for formulating refined ozone prevention and control measures.

[0004] Ozone pollution has obvious trends and seasonality, and is closely related to multiple factors such as meteorology and climate. Existing ozone concentration prediction methods do not model and extract prior information on ozone pollution, and some are still single-variable predictions, resulting in low quality ozone predictions or lack of interpretability of prediction results, especially long-term predictions. Summary of the invention

[0005] The purpose of the present invention is to provide an ozone concentration prediction method based on STL-Transformer to solve the problems of low ozone concentration prediction accuracy or lack of interpretability of prediction results in the prior art.

[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions to achieve the above problems:

[0007] A method for predicting ozone concentration based on STL-Transformer, comprising:

[0008] Collect ozone concentration data for a period of time to form an ozone concentration measurement sequence;

[0009] The time series decomposition algorithm STL is used to decompose the measured ozone concentration series into seasonal component, trend component and residual component, forming three components of the ozone series;

[0010] The three decomposed components are concatenated with the ambient air quality index, air quality evaluation parameters, and meteorological parameters as the input sequence of the Transformer model;

[0011] The Transformer model is used to predict the ozone concentration at different time periods in the future, and the output result of the Transformer model is the predicted value of ozone concentration.

[0012] In some embodiments of the present application, the time series decomposition algorithm STL includes an inner loop and an outer loop, wherein the local weighted regression and low-pass filtering algorithm of the inner loop can be used to fit the seasonal component S v , and then use the seasonal component S v Find the trend component T v ; Afterwards, use the outer loop to obtain the remaining component R v , and the robustness weights are calculated in each cycle and applied to the next inner cycle to affect the decomposed seasonal components.

[0013] In some embodiments of the present application, the process of decomposing the measured ozone concentration sequence using the STL algorithm may specifically include the following steps:

[0014] The measured ozone concentration series Y v The decomposition result is expressed as:

[0015] Y v =S v +T v +R v ;

[0016] Among them, S v represents seasonal component; T v represents the trend component; R v Indicates the remaining quantity;

[0017] Assumptions Represents the seasonal component S v and trend component T v The k-th iteration result of , the decomposition process is as follows:

[0018] S1, remove ozone concentration real sequencing Y v The trend component in , that is, calculate the detrended series

[0019] S2. for the detrended sequence The periodic subsequence is Loess smoothed, and the robustness weight is ρ v , the result is recorded as

[0020] S3, yes Perform low-pass filtering, and the output sequence is recorded as

[0021] S4. Removal The trend term in gets the seasonal component

[0022] S5. From the measured ozone concentration sequence Y v Remove seasonal components That is, calculate the deseasonal series

[0023] S6. Seasonal sequence Perform Loess smoothing to obtain the trend component of k+1 iterations

[0024] S7. Calculate the remaining components

[0025] S8: According to the remaining component R v The robustness of the next cycle is calculated by v , and its calculation formula is:

[0026]

[0027] in,

[0028]

[0029] B(u) is the bisquare weight function; the midean function is used to return the median of a set of data; || means taking the absolute value of the data.

[0030] In some embodiments of the present application, the low-pass filtering algorithm may include two analysis processes: moving average and Loess regression.

[0031] In some embodiments of the present application, when performing STL decomposition on the measured ozone concentration sequence, in order to improve the accuracy of the ozone concentration prediction result, the seasonal cycle parameter P can be configured according to different prediction periods. e That is, the seasonal component, trend component, and residual component at time t should be the P before time t. e time periods {t-1, t-2, ... tP e} is obtained by STL decomposition of the ozone sequence composed of the measured ozone concentration values ​​within.

[0032] In some embodiments of the present application, a sliding splicing method of multi-source data can be used to form an input sequence X of the prediction model = {x 1 ,x 2 ,…,x M ,S v ,T v ,R v}; where {x 1 ,x 2 ,…,x M} is the multi-source measured data, that is, the ambient air quality index, air quality evaluation parameters and meteorological parameters measured at time t; M is the dimension of the multi-source measured data; S v ,T v ,R v are the three components of the ozone sequence at time t.

[0033] In some embodiments of the present application, the ambient air quality index is AQI; the air quality evaluation parameters may include but are not limited to CO, NO 2 , SO 2 , PM2.5, PM10, etc.; the meteorological parameters may include but are not limited to temperature, dew point temperature, wind speed, wind direction, air pressure, etc.

[0034] Compared with the prior art, the advantages and positive effects of the present invention are as follows: the present invention first uses the STL time series decomposition algorithm to decompose the ozone sequence into three components: seasonal component, trend component, and residual component to extract prior information on ozone pollution; then, the three decomposed components are spliced ​​together with the ambient air quality index, air quality evaluation parameters, and meteorological parameters as the input sequence of the Transformer model, and the Transformer model is used to extract the global information of multi-source data to predict the ozone concentration, thereby improving the accuracy and interpretability of the ozone concentration prediction results, which is of great significance to improving the quality of ozone prediction and formulating refined prevention and control measures.

[0035] Other features and advantages of the present invention will become more apparent after reading the detailed description of the embodiments of the present invention in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is an overall flow chart of an embodiment of the ozone concentration prediction method based on STL-Transformer proposed by the present invention;

[0037] Figure 2 It is a schematic diagram of sliding splicing of multi-source data of input sequences at different times. DETAILED DESCRIPTION

[0038] The specific implementation modes of the present invention are described in detail below with reference to the accompanying drawings.

[0039] Ozone is a product of photochemical reactions. The concentration of ozone is affected by factors such as temperature, humidity, radiation, and boundary layer height. High temperature, low humidity, and sufficient sunlight are conducive to the formation of ozone pollution. Ozone concentration has obvious daily, seasonal, and interannual variations, and is closely related to multiple factors such as the ambient air quality index, air quality evaluation parameters, meteorological conditions, and climate conditions. Among them, climate change and extreme weather (climate) also affect ozone concentration by changing meteorological conditions.

[0040] Since ozone pollution has obvious trends and seasonality, and is closely related to multiple factors such as meteorology and climate, in order to extract the trends and seasonal patterns contained in the ozone sequence, this embodiment uses the time series decomposition algorithm STL to decompose the measured ozone concentration sequence into seasonal components, trend components, and residual components. The three decomposed components are spliced ​​with the ambient air quality index, air quality evaluation parameters, and meteorological parameters as the input sequence of the ozone concentration prediction model, and the ozone concentration prediction method based on the Transformer model is used to predict the ozone concentration in different time periods in the future through the multi-attention mechanism and the characteristics of extracting global features.

[0041] The ozone concentration prediction method designed in this embodiment based on the STL algorithm and the Transformer model can fully capture the prior information of ozone changes and significantly improve the prediction quality of ozone concentration and the interpretability of prediction results by extracting global information of multi-source data.

[0042] Specifically, the ozone concentration prediction method based on STL-Transformer in this embodiment mainly includes three steps: STL decomposition of the measured ozone concentration sequence, sliding splicing of multi-source input sequences, and ozone concentration prediction based on the Transformer model.

[0043] Combine the following Figure 1 , the specific implementation methods of the three steps of the ozone concentration prediction method are explained in detail.

[0044] (1) STL decomposition of ozone concentration measurement series

[0045] Affected by many factors, ozone pollution often shows obvious seasonal characteristics and medium- and long-term trends. High temperatures and strong sunlight in summer are conducive to the formation of ozone pollution, and the concentration is generally high, while the ozone concentration is relatively low in winter. Industrial activities, prevention and control measures, pollution source structure, etc. make ozone pollution show certain medium- and long-term trends. In addition, due to some extreme weather or special events, ozone concentration will fluctuate in the short term. Based on the above empirical analysis of ozone concentration changes, the STL algorithm is used to decompose the measured ozone concentration data into time series, and the seasonal periodicity and medium- and long-term trend patterns of the ozone series are extracted, which can provide effective prior information for ozone concentration prediction modeling.

[0046] The STL algorithm is a time series decomposition algorithm based on Loess smoothing. Through local weighted regression (Loess regression), the measured ozone concentration series can be decomposed into seasonal components, trend components and residual components. The specific decomposition results can be expressed as:

[0047] Y v =S v +T v +R v

[0048] Among them, Y v represents the measured ozone concentration series; seasonal component S v Represents the periodic fluctuation of data on different time scales; trend component T v Represents the long-term trend of data; the residual component R v represents random noise excluding seasonal and trend components.

[0049] The STL decomposition consists of two loops, the inner and outer loops. The inner loop is nested inside the outer loop, and the seasonal component S is fitted by local weighted regression and low-pass filtering algorithm. v , find the trend component T v ; The outer loop is used to obtain the remaining component R v , and calculate the robustness weight in each loop to reduce the impact of outliers on the inner loop.

[0050] Specifically, are the k-th iteration results of the seasonal component and the trend component respectively. The specific steps are as follows:

[0051] S1: original series detrended

[0052] Remove the trend component in the real sequence of ozone concentration, that is, calculate the detrended sequence

[0053] S2: Smoothed periodic subsequence

[0054] That is, the detrended sequence calculated in step S1 The periodic subsequence of is Loess smoothed, and the result is recorded as Among them, the Loess smoothing algorithm is a point-by-point weighted regression smoothing algorithm, and its robustness weight can be recorded as ρ v , represents the robust weight corresponding to the time point v. Robustness weight ρ v The size of affects the decomposed seasonal component.

[0055] S3: Yes Low pass filtering

[0056] That is, After low-pass filtering, the output sequence is recorded as In this embodiment, the low-pass filtering algorithm includes moving average and Loess regression.

[0057] Among them, Moving Average (MA) is a tool used to analyze time series in technical analysis. Common moving averages include Simple Moving Average (SMA), Weighted Moving Average (WMA), Exponential Moving Average (EMA), etc.

[0058] Loess regression is a non-parametric method for local regression analysis. It mainly divides the samples into small intervals, performs polynomial fitting on the samples in the intervals, repeats this process to obtain weighted regression curves in different intervals, and finally connects the centers of these regression curves together to synthesize a complete regression curve.

[0059] S4: Detrending

[0060] That is, the time series in step S2 The trend term is removed to obtain the seasonal component, which is specifically expressed as:

[0061]

[0062] S5: Deseasonalization

[0063] Remove the seasonal component from the measured ozone concentration series, that is, calculate the deseasonalized series

[0064] S6: Trend Smoothing

[0065] That is, the deseasonalized sequence calculated in step S5 Perform Loess smoothing to obtain the trend component of k+1 iterations

[0066] S7: External loop calculates the remaining components

[0067] After one inner cycle, the seasonal component and trend component are From this, the remaining component can be calculated for:

[0068]

[0069] S8: Evaluating the robustness of the residual components

[0070] In the outer loop, by introducing the robustness weight ρ v To evaluate the residual component R v The robustness is calculated as:

[0071]

[0072] in,

[0073]

[0074] B(u) is the bisquare weight function; the midean function is used to return the median of a set of data; || means taking the absolute value of the data.

[0075] In an embodiment, the residual component R v The more robust, ρ v The larger the calculated robustness weight ρ v It is applied in the inner loop of the next iteration process, i.e., step S2, to affect the decomposed seasonal component.

[0076] The number of inner and outer loops of STL decomposition is preset. When the number is reached, the above STL decomposition steps automatically exit.

[0077] The STL algorithm decomposes the time series into three subsequence components: seasonal component, trend component and residual component, which can capture the seasonal periodicity and long-term trend pattern of the time series to a large extent. When predicting the ozone concentration, the STL algorithm is first used to decompose the measured ozone concentration sequence, which can capture the trend and seasonal prior information of the ozone concentration change.

[0078] (2) Sliding splicing of multi-source input sequences

[0079] When predicting ozone concentrations at different time periods in the future, in order to improve the accuracy of the prediction results, the input of the prediction model configured in this embodiment includes not only the three components of the ozone sequence, but also the ambient air quality index, air quality evaluation parameters and meteorological parameters. Among them, the three components of the ozone sequence are the seasonal component, trend component and residual component obtained by decomposing the measured sequence of ozone concentration by the STL algorithm; the ambient air quality index, air quality evaluation parameters and meteorological parameters are measured sequences.

[0080] like Figure 2 As shown, assuming that the current moment is moment t, in the input sequence of the prediction model, the three components of the ozone sequence are the results obtained by STL decomposition of the measured sequence of ozone concentration over a period of time in the past.

[0081] When decomposing in STL, configure the seasonal cycle parameter P e The seasonal component, trend component and residual component at time t are obtained by STL decomposition of the ozone sequence in the N time periods before time t, that is, {t-1, t-2, ... tN} time periods. For the seasonal component, trend component and residual component at time t+1, they are obtained by STL decomposition of the ozone sequence in the N time periods before time t+1, that is, {t, t-1, ... t-(N-1)} time periods. As the prediction time goes by, the decomposition window also slides backward, and the window size is set to P e .

[0082] Therefore, the input sequence at time t is the concatenation of multi-source measured data and the decomposition components of the ozone sequence, that is, the input sequence X of the prediction model is:

[0083] X={x 1 ,x 2 ,…,x M ,S v ,T v ,R v};

[0084] Among them, {x 1 ,x 2 ,…,x M} is the multi-source measured data, that is, the ambient air quality index, air quality evaluation parameters and meteorological parameters measured at time t; M is the dimension of the multi-source measured data.

[0085] (3) Ozone concentration prediction based on Transformer model

[0086] This embodiment uses the Transformer architecture to predict ozone concentration. The Transformer model is a deep learning model based on the self-attention mechanism, which captures the relationship between different positions in the input sequence through the self-attention mechanism to process sequence data. The Transformer model consists of an encoder and a decoder with a multi-layer structure, and each layer includes a multi-head attention sublayer and a feedforward neural network sublayer. In this embodiment, the input of the Transformer model is the concatenated multi-source input sequence X. Embedding and position encoding are two key components in the Transformer model, which realize the vector representation of sequence data and consider the correlation of sequence data in space. Position encoding is added to the embedded input, and sine and cosine functions of different frequencies are used to encode the position information:

[0087] PE (pos,2s) =sin(pos / 10000 2s / d );

[0088] PE (pos,2s+1) =cos(pos / 10000 2s / d );

[0089] Among them, pos represents the position of the data in the input sequence; 2s represents an even dimension, 2s+1 represents an odd dimension, and 1≤2s≤d; position encoding T represents the length of the input sequence, and d represents the dimension of the sequence vector. The input embedding of the model includes the position encoding and the sequence embedding vector, which are added together as the input of the encoder.

[0090] The multi-head self-attention mechanism splits a single self-attention mechanism into multiple subspaces, and performs self-attention mechanism on each subspace to learn different attention weights, so as to better capture features at different levels and fuse them in the representation space.

[0091] The self-attention mechanism can be described as:

[0092]

[0093] in, Represents query, key, and value respectively.

[0094] The multi-head self-attention mechanism concatenates the vector representations of each head combined with the previous and next data representations, and then multiplies them by the weight matrix W o To aggregate the information on different heads, forming the final vector representation of the combined data before and after:

[0095] MultiHead(Q,K,V)=Concat(head 1 ,head2 ,…,head h )W O ;

[0096] head i =Attention(QWi i Q ,KW i K ,VW i V );

[0097] Where i = 1, 2, ..., h; h represents the number of attention heads; W i Q ,W i K ,W i V Denote the weight matrices of query, key and value respectively, W O A weight matrix representing a linear transformation.

[0098] By encoding the embedding and position information of the ozone sequence, the decoder outputs the predicted value of the ozone concentration.

[0099] The following describes in detail the application process of the ozone concentration prediction method based on STL-Transformer in this embodiment through a specific example.

[0100] (1) Multi-source data:

[0101] The air data of Beijing from May 13, 2014 to July 31, 2023 were collected, with a total of 80,808 records, each of which included ozone concentration, ambient air quality index (AQI), air quality evaluation parameters (CO, NO 2 , SO 2 , PM2.5 and PM10) and meteorological parameters (temperature, dew point temperature, wind speed, wind direction, air pressure). A total of 56,350 records from May 13, 2014 to October 15, 2020 were used as the training data set; a total of 7,963 data from October 16, 2020 to September 12, 2021 were used as the validation data set; a total of 16,042 records from September 13, 2021 to July 31, 2023 were used as the test data set.

[0102] (2) STL decomposition:

[0103] According to steps S1-S8, the ozone series is decomposed in time series to obtain seasonal component, trend component and residual component. Through experiments, it is found that under different forecast periods, the seasonal cycle parameter P of STL decomposition eThe value of has a great influence on the prediction results. When predicting the ozone concentration in the next hour, it is verified by experiments that P e The model's evaluation indicators performed best when the value was 7. The ozone concentrations predicted for the next 8 hours, 24 hours, 48 ​​hours, 72 hours, 96 hours, 120 hours, 144 hours and 168 hours were verified in turn. e The best value of seasonal cycle parameter P is obtained e .

[0104] (3) Sliding splicing of multi-source input sequences:

[0105] Assuming that the current time is time t, when predicting the ozone concentration in different time periods in the future, for the input sequence of the prediction model, the three components of the ozone sequence are the past P e The time series decomposition results of the ozone series for a period of time. Taking the prediction of ozone concentration in the next hour as an example, when STL decomposition is performed, the seasonal cycle P e Set to 7. At time t, the 7 ozone records in the past {t-1, t-2, ... t-7} time period are decomposed by STL to obtain the seasonal component, trend component and residual component. In the input sequence of the prediction model, the ambient air quality index, air quality evaluation parameters and meteorological parameters are the measured sequences of the time period at time t.

[0106] Therefore, the input sequence at each prediction moment is the ambient air quality index (AQI), air quality evaluation parameters (CO, NO 2 、SO 2 , PM2.5, PM10), meteorological parameters (temperature, dew point temperature, wind speed, wind direction, air pressure) and three components of the ozone sequence (S v , T v , R v ), that is, the input sequence X = {x 1 ,x 2 ,…,x 11 ,S v ,R v ,R v}.

[0107] (4) Ozone concentration prediction:

[0108] The input sequence X is input into the Transformer model, global information is extracted from the input embedding, and the decoder outputs the predicted value of ozone concentration.

[0109] This embodiment firstly decomposes the measured ozone concentration sequence into time series using the STL algorithm, which can capture the trend and seasonal prior information of the ozone concentration change; then, the Transformer model is used to extract the global information of multi-source data, which is a multivariate prediction with physical interpretability.

[0110] When comparing the model prediction results, four evaluation indicators can be used: mean square error (R 2 ), mean absolute error (MAE), root mean square error (RMSE) and mean absolute percentage error (MAPE). The prediction results and analysis are as follows:

[0111] 1. Comparison with a single Transformer model:

[0112] The ozone concentration is predicted by using the STL-Transformer prediction method of this embodiment and a single Transformer model: the ozone concentration in the next 1 hour, 8 hours, 24 hours, 48 ​​hours, 72 hours, 96 hours, 120 hours, 144 hours and 168 hours is predicted by using two methods, and the four evaluation indicators R are calculated respectively. 2 , MAE, RMSE and MAPE.

[0113] The comparison results are shown in Table 1 below. Using the prediction method of this embodiment, R 2 The improvement was 0.61% to 39.6%. When predicting the ozone concentration in the next 72 hours, the improvement was the largest, close to 40%. When predicting the ozone concentration in the next 8 hours and 24 hours, the improvement of MAE, RMSE and MAPE was the largest, all greater than 60%. The improvement of MAE, RMSE and MAPE indicators in all prediction time periods was greater than 15%. The experimental results well verified that adding prior information on ozone concentration changes through STL decomposition can significantly improve the prediction accuracy of ozone concentration in future periods.

[0114] Table 1 Comparison of prediction results between STL-Transformer and Transformer

[0115]

[0116]

[0117] 2. Comparison with other models:

[0118] The STL-Transformer prediction method of this embodiment is used with the CNN, LSTM, BiLSTM, and GRU models to predict the ozone concentration: the maximum 8-hour average concentration of ozone (MDA8) is a commonly used indicator for evaluating ozone pollution and management. Therefore, the prediction results of the ozone concentration in the next 8 hours can be used to evaluate the prediction performance of each model.

[0119] The prediction results of the prediction method of this embodiment and other models are shown in Table 2: Four evaluation indicators R of the ozone concentration prediction results obtained by the prediction method proposed in this embodiment 2 , MAE, RMSE and MAPE are 0.9927, 2.9271, 3.9768 and 0.0801 respectively. Among the five models of CNN, LSTM, BiLSTM, GRU and Transformer, the GRU model performs better, with a prediction result of R 2 , MAE, RMSE and MAPE indicators are 0.9553, 6.6494, 9.6181 and 0.1386 respectively, which are worse than the method of this embodiment, especially MAE and RMSE indicators. Compared with the five models of CNN, LSTM, BiLSTM, GRU and Transformer, the prediction results obtained by the prediction method of this embodiment are R 2 All indicators have increased by 3.9%-8%, and the three indicators of MAE, RMSE and MAPE have also increased significantly.

[0120] Table 2. Comparison of prediction results of STL-Transformer and other models

[0121]

[0122] 3. Comparison with univariate prediction:

[0123] For similar time series prediction problems, if univariate prediction is used, that is, the predicted time series is decomposed by STL, and then prediction is made only based on the three variables after the ozone series decomposition.

[0124] In the experiment, the prediction performance (R 2 :0.9966,MAE:1.9651μg / m 3 , RMSE: 2.646 μg / m 3 , MAPE: 0.0485) and univariate prediction performance (R 2 :0.9927,MAE:2.9271μg / m 3 , RMSE: 3.9768 μg / m 3, MAPE: 0.0801) is not much different. However, univariate prediction relies on imitating patterns and trends that have occurred in the past; in contrast, multivariate prediction can effectively capture the complex relationships and dependencies between multiple variables. Under stable conditions, univariate prediction can achieve good prediction results, while under extreme conditions, the multivariate prediction model is more sensitive to the dynamic influence of other factors and can accurately capture changes in ozone concentration, thereby achieving better prediction results, which is consistent with the understanding of ozone pollution. Therefore, the multivariate prediction method of this embodiment has strong interpretability and good robustness, can be used for actual prediction of ozone concentration, and provide a data basis for environmental governance.

[0125] Of course, the above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for predicting ozone concentration based on STL-Transformer, characterized in that: include: Collect ozone concentration data in the air over a period of time to form an ozone concentration measurement sequence; The time series decomposition algorithm STL is used to decompose the measured ozone concentration series into seasonal component, trend component and residual component to form three components of the ozone series. The process includes: Configure seasonal cycle parameters P according to different forecast periods e The seasonal component, trend component and residual component at time t are the P before time t. e time periods {t-1, t-2, ... tP e } is obtained by performing STL decomposition on the ozone sequence composed of the measured values ​​of the ozone concentration in}; the STL decomposition process includes: The measured ozone concentration series Y v The decomposition result is expressed as: Y v =S v +T v +R v ; Among them, the seasonal component S v Represents the periodic fluctuation of data on different time scales; trend component T v Represents the long-term trend of data; the residual component R v represents random noise other than seasonal and trend components; Assumptions Represents the seasonal component S v and trend component T v The k-th iteration result of , the decomposition process is as follows: S1, remove ozone concentration real sequencing Y v The trend component in , calculate the detrended series S2. for the detrended sequence The periodic subsequence is Loess smoothed, and the robustness weight is ρ v , the result is recorded as S3, yes Perform low-pass filtering algorithm processing, and the output sequence is recorded as S4. Removal The trend term in gets the seasonal component S5. From the measured ozone concentration sequence Y v Remove seasonal components Calculate the deseasonal series S6. Seasonal sequence Perform Loess smoothing to obtain the trend component of k+1 iterations S7. Calculate the remaining components S8: According to the remaining component R v The robustness of the next cycle is calculated by v : Among them, the midean function is used to return the median of a set of data; || means taking the absolute value of the data; B(u) is the bisquare weight function: The three decomposed components are concatenated with the ambient air quality index, air quality evaluation parameters, and meteorological parameters as the input sequence of the Transformer model; The Transformer model is used to predict the ozone concentration at different time periods in the future, and the output result of the Transformer model is the predicted value of ozone concentration.

2. The ozone concentration prediction method based on STL-Transformer according to claim 1 is characterized in that: The low-pass filtering algorithms include moving average and Loess regression.

3. The ozone concentration prediction method based on STL-Transformer according to claim 1 or 2, characterized in that: The input sequence X is: X={x1,x2,…,x M ,S v ,T v ,R v }; Among them, {x1,x2,…,x M } is the ambient air quality index, air quality evaluation parameters and meteorological parameters measured at time t; M is the dimension of multi-source measured data; S v ,T v ,R v are the three components of the ozone sequence at time t.

4. The ozone concentration prediction method based on STL-Transformer according to claim 3 is characterized in that: The air quality evaluation parameters include CO, NO2, SO2, PM2.5 and PM10; The meteorological parameters include temperature, dew point temperature, wind speed, wind direction, and air pressure.