Generative interpolation method for abnormal missing of ozone concentration data
By combining the generative interpolation method of the Transformer model and the diffusion model, the ozone concentration data is decomposed in time series and multi-source influencing factors are spliced, the state information of the ozone concentration change is learned and the time series is reconstructed, solving the problem of ozone concentration data in the existing technology. The problem of insufficient interpolation performance for abnormal missing data is achieved, and high-quality data interpolation and monitoring data integrity and accuracy are achieved.
Patent Information
- Application Number
- CN202411930473.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-12-26
AI Technical Summary
The prior art fails to effectively deal with the abnormal missing data during the interpolation process of ozone concentration data, especially in the case of long-term absence of data, which greatly reduces the application reference value of ozone concentration data.
Adopting the generative interpolation method combined with the Transformer model and the diffusion model to decompose the time sequence of ozone concentration data, extract the seasonal weight, trend component, and remaining component, and the stitching with the multi -source influence as the input of the Transformer model to learn the oxygen concentration The state information of the change is then used as the input of the diffusion model, and the time sequence of the oxygen concentration is rebuilt by generating an interpolation.
Significantly improves the interpolation performance for abnormally missing ozone concentration data, ensuring the integrity and accuracy of ozone pollution monitoring data. It combines the sequence processing capability of the Transformer model and the generation capability of the diffusion model to effectively handle changes in multi-source influencing factors. law.
Smart Images

Figure CN119361007A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of air quality detection, and in particular, relates to a generative interpolation method for abnormal missing ozone concentration data. Background Art
[0002] The bad monitoring environment and equipment failures have caused abnormal ozone concentration data loss. The large amount of missing data has seriously affected the accuracy and value of air quality monitoring and forecasting, making it difficult to provide effective data support for environmental governance. In existing studies, the preprocessing process of environmental monitoring data has not paid enough attention to the problem of abnormal missing data, or the traditional prediction model has been used to interpolate missing data without taking into account the prior information of ozone pollution. The prediction model has poor interpolation performance for long-term missing data, which will weaken the reference value of ozone concentration data in later applications. Summary of the invention
[0003] The purpose of the present invention is to provide a generative interpolation method for abnormal missing ozone concentration data, combining the sequence processing capability of the Transformer model and the generative capability of the diffusion model to achieve high-quality interpolation of abnormal missing ozone concentration data.
[0004] The present invention is implemented by the following technical solutions:
[0005] A generative interpolation method for abnormal missing ozone concentration data is proposed, including:
[0006] S1, decomposing the time series of ozone concentration data to obtain component data; wherein the component data includes seasonal component, trend component and residual component;
[0007] S2, concatenates the component data and multi-source influencing factors into the input sequence of the Transformer model;
[0008] S3, using the Transformer model to extract the state information of ozone concentration changes;
[0009] S4, taking the state information and the ozone concentration data as inputs of the diffusion model, and using the diffusion model to perform generative interpolation operations on the ozone concentration data.
[0010] In some embodiments of the present invention, step S2 includes the step of dynamically intercepting the ozone sequence fragment, including:
[0011] Configure the decomposition window size to ,make The seasonal component, trend component and residual component of the moment are The ozone sequence in the time period is obtained by STL decomposition; among them, is the seasonal cycle parameter;
[0012] As time goes by, the decomposition window slides backward to obtain the input sequence at each moment ,in, It is the measured data of multi-source influencing factors; It is the dimension of multi-source influencing factors; They are seasonal component, trend component and residual component respectively.
[0013] In some embodiments of the present invention, step S2 includes the step of constructing a Transformer model input data sequence, including:
[0014] The input sequence of the Transformer model Set to data before and after missing:
[0015] ;
[0016] in, Indicates the length of data intercepted before and after the missing sequence. for Multi-source measured data at each moment and the splicing characteristic sequence of the three components.
[0017] In some embodiments of the present invention, in step S3:
[0018] The input sequence Perform vector representation;
[0019] Use sine and cosine functions of different frequencies to encode position information;
[0020] The positional encoding is added to the sequence vector as input to the encoder of the Transformer model.
[0021] In some embodiments of the present invention, the diffusion process of step S4 adopts:
[0022] conduct;
[0023] State information extracted for the Transformer model; , , is the number of iteration steps; For the The variance of the step; The noise added in the rth step of the forward process obeys the standard Gaussian distribution; Output the result for step r;
[0024] The generation process uses:
[0025] conduct;
[0026] The noise added to the forward process follows a standard Gaussian distribution; ; During the generation process Predict using a neural network: , is the noise predicted by the neural network, as input to the generation process; Output the result for step r-1.
[0027] In some embodiments of the present invention, the method further comprises:
[0028] The Transformer model and the diffusion model are integrated in a Bayesian framework. The output of the Transformer model As part of the diffusion model input, the optimization of parameters during the gradient propagation during the training process is based on the overall loss function Joint optimization, the parameters of the Transformer model are based on the loss function To optimize, the generation process of the diffusion model uses a neural network in the training process. get , the training of the neural network is based on the loss function conduct:
[0029] ;
[0030] in represents the loss function of the Transformer model, represents the loss function of the diffusion model.
[0031] Compared with the prior art, the advantages and positive effects of the present invention are as follows: in the generative interpolation method for abnormal missing ozone concentration data proposed by the present invention, the ozone data is first decomposed into a time series, and the decomposed seasonal component, trend component and residual component are slid and spliced with multi-source influencing factors such as air quality index, other five indicators of air pollutants, and meteorological measured data in the time dimension as the input sequence of the Transformer, and the state sequence that causes the change of ozone concentration is learned by the Transformer. On this basis, the state sequence is used as part of the input sequence of the diffusion model. The diffusion model reconstructs the ozone concentration time series from the noise by learning the random process of adding and removing noise, and achieves high-quality interpolation of abnormal missing ozone concentration data by improving the learning ability of the denoising process, thereby ensuring the integrity and accuracy of the ozone pollution monitoring data. The present invention integrates the Transformer model and the diffusion model in a Bayesian framework, adopts a joint optimization strategy, and uses the state information extracted by the Transformer model as prior information. The diffusion model can more effectively focus on the estimation of the generated data, combines the sequence processing ability of the Transformer model and the generation ability of the diffusion model, and can significantly improve the interpolation performance of missing data.
[0032] 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
[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0034] Figure 1 The steps of the generative interpolation method for abnormal missing ozone concentration data proposed by the present invention are shown in FIG.
[0035] Figure 2 This is a schematic diagram of the generative interpolation process for abnormal missing ozone concentration data proposed by the present invention;
[0036] Figure 3 Schematic diagram of the composition of the input data sequence in the method of the present invention;
[0037] Figure 4 This is a comparison of the method of the present invention and other models in the embodiments of the present invention on the four indicators of MAPE / R2 / MAE / RMSE. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] In the description of the present invention, it should be understood that the terms "center", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0040] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0041] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "plurality" means two or more.
[0042] The generative interpolation method for abnormal missing ozone concentration data proposed in this paper is a generative interpolation method that combines Transformer and diffusion model, including three parts: time series decomposition of ozone concentration data, state information learning of ozone concentration changes, and generative interpolation of missing data:
[0043] (1) Commonly used time series decomposition algorithms include STL, X11, SEATS, etc. In this invention, STL is used as an example to illustrate the decomposition process of ozone concentration series data. STL is a time series decomposition algorithm based on Loess smoothing, which consists of two internal and external loop mechanisms. The inner loop fits the seasonal component through local weighted regression and low-pass filtering algorithm to obtain the trend component; the outer loop is used to obtain the residual component and calculate the robustness weight in each loop to reduce the impact of outliers on the inner loop. 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 medium- and long-term trend patterns of the time series to a large extent.
[0044] (2) The extraction of ozone concentration state information adopts the Transformer model, which consists of a multi-layer encoder and decoder, and each layer includes a multi-head attention and a feedforward neural network sublayer. The input of the encoder is a sequence of the three decomposed components and multiple sources of influencing factors such as the air quality index (AQI), five other indicators of air pollutants, and meteorological measured data. The output is a state sequence that represents the change of ozone concentration.
[0045] (3) Diffusion Models include diffusion process and generation process. The diffusion process converts the input sequence The conversion to a standard Gaussian distribution can be understood as a process of gradually adding noise; the generation process is to reversely convert the samples in the standard Gaussian distribution into The samples in the image are then analyzed, which is a process of gradually removing noise using a neural network to achieve generative interpolation of ozone loss data.
[0046] Based on the above, in order to extract the prior information contained in the ozone time series, the present invention first uses the STL time series decomposition algorithm to decompose the measured ozone concentration series into a seasonal component, a trend component and a residual component; the three decomposed components and the splicing sequence of multi-source influencing factors such as the air quality index (AQI), other five indicators of air pollutants, and meteorological measured data are used as the input of the Transformer model, and the global information of the input sequence is extracted through the Transformer model to learn the state sequence that causes the change in ozone concentration; on this basis, with the state sequence as part of the input, the diffusion model learns the random process of adding and removing noise, and reconstructs the ozone concentration time series from the noise.
[0047] The present invention integrates the Transformer model and the diffusion model in a Bayesian framework, adopts a joint optimization strategy, and uses the state information extracted by the Transformer model as prior information. The diffusion model can more effectively focus on the estimation of generated data. It combines the sequence processing capability of the Transformer model and the generation capability of the diffusion model to achieve high-quality interpolation of abnormal missing ozone concentration data, thereby ensuring the integrity and accuracy of ozone pollution monitoring data.
[0048] Specifically, Figure 1 As shown, the following steps are included:
[0049] S1: Decompose the time series of ozone concentration data to obtain component data; the component data include seasonal component, trend component and residual component.
[0050] Affected by many factors, ozone pollution often shows obvious seasonal characteristics and medium- and long-term trends. High temperatures and strong light in summer are conducive to the formation of ozone pollution, and the concentration is generally high, while the 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 analysis of the empirical laws of ozone concentration changes, the present invention decomposes the ozone concentration data into time series, extracts the seasonal periodicity and medium- and long-term trend patterns of the ozone series, and provides effective prior information for the interpolation of missing ozone concentration data.
[0051] Commonly used time series decomposition algorithms include STL, X11, SEATS, etc. In the present invention, STL is taken as an example to illustrate the decomposition process of ozone concentration series data.
[0052] The STL algorithm decomposes ozone concentration data into seasonal component, trend component and residual component through local weighted regression (Loess). The specific decomposition result can be expressed as:
[0053] ;
[0054] in, represents the measured series of ozone concentration, seasonal component Represents the periodic fluctuation of data on different time scales, trend component Indicates the long-term trend of data, the residual component represents random noise excluding seasonal and trend components.
[0055] The STL decomposition consists of two loops, the inner loop is nested inside the outer loop, and the seasonal component is fitted by local weighted regression and low-pass filtering algorithm. , find the trend component ; The outer loop is used to obtain the remaining components , and calculate the robustness weight in each loop to reduce the impact of outliers on the inner loop.
[0056] Specifically, , are the seasonal component and the trend component. The results of the iterations are as follows:
[0057] (1) Detrending the original series.
[0058] The trend component of the measured ozone concentration series is removed to obtain the detrended series .
[0059] (2) Periodic subsequences of smoothed detrended series.
[0060] The periodic subsequence of the detrended sequence calculated by (1) is smoothed by Loess, and the robustness weight is , 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 , indicating a time point The corresponding robustness weight, robustness weight The size of affects the decomposed seasonal component.
[0061] (3) Perform a low-pass filter on the result of (2).
[0062] right Perform low-pass filtering, and the output sequence is recorded as , the filter includes moving average and Loess regression.
[0063] Moving Average (MA) is a tool used in technical analysis to analyze time series. Common moving averages include Simple Moving Average (SMA), Weighted Moving Average (WMA), Exponential Moving Average (EMA), etc. Loess regression is a non-parametric method for local regression analysis. It mainly divides samples into small intervals, performs polynomial fitting on the samples in the intervals, and repeats this process to obtain weighted regression curves in different intervals, and then connects the centers of these regression curves together to synthesize a complete regression curve.
[0064] (4) Detrend the results of (2).
[0065] The time series in (2) Remove the trend term and get the seasonal component, which is recorded as:
[0066] .
[0067] (5) The seasonal component is obtained by removing S4 from the measured ozone concentration series.
[0068] That is, calculate the seasonal series .
[0069] (6) Perform trend smoothing on the deseasonal series.
[0070] The deseasonalized sequence obtained from (5) Perform Loess smoothing and get Iterated trend component .
[0071] After one inner cycle, the seasonal component and trend component are , , from which the remaining component can be calculated for:
[0072] .
[0073] (7) Calculate the remaining component.
[0074] .
[0075] (8) The outer loop introduces robust weights To evaluate robustness.
[0076] The calculation formula is: ;
[0077] in, ; is the bisquare weight function, For time point The corresponding robust weights.
[0078] S2: Concatenate the component data and multi-source influencing factors into the input sequence of the Transformer model.
[0079] The interpolation operation of ozone concentration data needs to comprehensively consider the changing patterns of multiple influencing factors such as ozone concentration data, air quality index (AQI), other five indicators of air pollutants, and meteorological measured data, so as to extract the state information contained therein that causes the changes in the ozone sequence and provide a basis for data interpolation.
[0080] In the present invention, the source of the pre-extracted state information is the data in a period of time before and after the ozone sequence is missing, that is, the future state information is added to the interpolation task.
[0081] The state information is extracted using the Transformer model. The input data sequence of the Transformer model, i.e., the data used to extract the state information, includes the three components obtained in step S1 (seasonal component, trend component, and residual component), the air quality index AQI, five other indicators of air pollutants, and meteorological data, among which the air quality index, five other indicators of air pollutants, and meteorological data are measured sequences.
[0082] The preprocessing of the input data sequence includes: (a) Dynamic interception of ozone sequence fragments: When decomposing the STL, the seasonal cycle parameters are taken For N, The seasonal component, trend component and residual component of the moment are The ozone sequence in the time period is obtained by STL decomposition, and for The three components of time are The STL decomposition results of the ozone sequence within the time period. As the state information extraction time passes, the decomposition window also slides backward, and the window size is set to The characteristic sequence at each moment is the concatenation of multi-source measured data and three components, namely ( is the dimension of multi-source measured data). (b) Construction of Transformer model input data sequence: In order to extract more comprehensive state information, the input sequence of the Transformer model is Set to data before and after missing:
[0083] ;
[0084] in, Indicates the length of data intercepted before and after the missing sequence; for The splicing characteristic sequence of multi-source measured data and three components at each moment, the output is the state information representing the change of ozone concentration That is, when interpolating missing data, not only the information contained in the past series and the relevant information of the missing period are used, but also the future information within a period of time after the missing is considered.
[0085] In order to illustrate the generative interpolation performance of the method of the present invention for time series data, data missing processing is performed on the input of the model during method verification, that is, the data is masked at a variety of different proportions for the complete time series to form different degrees of data missing, and then the model is verified based on different missing rates, and the interpolation evaluation indicators under different missing conditions are compared.
[0086] S3: Use the Transformer model to extract the state information of ozone concentration changes.
[0087] The method proposed in the present invention adopts the Transformer model to extract the state information of the ozone concentration change as the prior information for missing data interpolation.
[0088] Transformer consists of an encoder and decoder with a multi-layer structure, and each layer includes a multi-head attention and a feedforward neural network sublayer. The input of the encoder is the concatenated multi-source data. Embedding and position encoding are two key components in the Transformer model. The input sequence is represented by a vector, and the correlation of sequence data in space is considered. Position encoding is added to the embedded input, and sine and cosine functions of different frequencies are used to encode the position information:
[0089] ;
[0090] ;
[0091] in, , position encoding , the positional encoding is added to the sequence vector as the input of the encoder.
[0092] The multi-head self-attention mechanism splits a single self-attention mechanism into multiple subspaces, and performs self-attention on each subspace to learn different attention weights, so as to better capture features at different levels and fuse them in the representation space. The self-attention mechanism is described as:
[0093] ;
[0094] in , and Represents query, key, and value respectively.
[0095] Multi-head self-attention concatenates the vector representations formed by each head combined with the context representation and multiplies them by the weight matrix To aggregate the information on different heads and form the final vector representation combined with the context:
[0096] ;
[0097] ;
[0098] in , Indicates the number of attention heads; , , are the weight matrices for query, key, and value, respectively. A weight matrix representing a linear transformation.
[0099] In the present invention, the input of the decoder uses the data before and after the missing data, and the output of the decoder is set as a multidimensional feature vector as needed, denoted as , to characterize the intermediate state information that causes the change in ozone concentration. The input takes into account the data before and after the missing data, providing the interpolation task with information about the change in ozone concentration caused by the past-present-future based on the missing moment. Unlike a simple prediction task, which can only consider historical data before the prediction moment, the interpolation task completed by this method can take into account the sequence data within a period of time after the missing data. Because the sequence data within a period of time after the data is missing is used as part of the model input in the present invention, the Transformer architecture does not use a masked attention mechanism.
[0100] S4: The state information is used as a part of the diffusion model input, together with the ozone concentration monitoring data as the diffusion model input, and the diffusion model performs generative interpolation operations on the ozone concentration data.
[0101] The interpolation of abnormal missing ozone concentration data in the present invention is generative interpolation using a diffusion model, and the state sequence extracted by Transformer is used as part of the model input to provide more state information causing the change of ozone concentration for the forward and reverse processes.
[0102] The diffusion model includes the diffusion process and the generation process:
[0103] (a) Diffusion process: The model input without adding state sequence The distribution is recorded as The standard diffusion process is to add noise to the input so that it gradually conforms to the Gaussian distribution, which can be described by the formula:
[0104] ;
[0105] The above formula can also be written as: ;
[0106] During the diffusion process, is the number of iteration steps, is the known quantity, i.e. the input of the forward process, and the process is displayed. represents a Gaussian distribution, For the The variance of the step, For the initial data The identity matrix of the same dimension. Let , ,according to and The relationship between Derived :
[0107] ;
[0108] in, Obey the standard Gaussian distribution. According to the above formula can be calculated directly without iteration, which can improve the computational efficiency of the diffusion process. The continuous increase of the diffusion process It can be approximated as Gaussian noise to complete the forward diffusion process.
[0109] In this invention, in order to improve the interpolation performance of missing data, the state sequence learned by the Transformer model is As part of the diffusion model input sequence, the diffusion model is provided with prior information on the change of ozone concentration. The formula is optimized to:
[0110] .
[0111] (b) Generation process: Inversely transform the samples in the standard Gaussian distribution into The samples in the image are taken from the image, which is the process of gradually removing noise using a neural network.
[0112] ;
[0113] in, It obeys the standard Gaussian distribution. ; When R is large enough, It can be regarded as a sample from a standard Gaussian distribution. Unknown, can be predicted using neural network:
[0114] ;
[0115] As input to the generation process, the number of iteration steps r is positionally encoded. is the noise predicted by the neural network. In the proposed method, the state sequence extracted by the Transformer model As part of the neural network input, it provides prior state information for noise prediction.
[0116] In this invention, the Transformer model and the diffusion model are integrated into a Bayesian framework. The output of the Transformer model As part of the diffusion model input, the optimization of parameters during the gradient propagation during the training process is based on the overall loss function Jointly optimized, the parameters of the Transformer model are based on the loss function The generation process of the diffusion model is optimized by using the neural network in the training process. get , the training of the neural network is based on the loss function The goal of optimizing the parameters of the two models is to make the total loss function The common goal is to make the predicted noise in each step closer to the noise superimposed in the generation process, so that What you get Closer to the actual input of the diffusion process.
[0117] The loss function of the model in the data interpolation framework consists of two parts, namely the Transformer model loss and the diffusion model loss. The total loss function can be expressed as:
[0118] ;
[0119] in represents the loss function of the Transformer model, represents the loss function of the diffusion model.
[0120] The state information extracted by the Transformer model is used as prior information and used together with the ozone sequence as the input of the diffusion model. The Transformer model learns the sequence features of multi-source measured data and STL decomposition components in advance, and extracts the time series features that cause the change of ozone concentration contained in the sequence as the state information input of the diffusion model, so that the diffusion model can focus more effectively on the estimation of generated data, thereby improving the performance of data generation. The proposed method combines the sequence processing capability of the Transformer model and the generation capability of the diffusion model. In the experimental verification based on real monitoring data, the proposed method can greatly improve the interpolation performance of missing data.
[0121] The following is a detailed description of the application process of the generative interpolation method for abnormal missing ozone concentration data proposed by the present invention using a specific embodiment.
[0122] (1) Data source: A city, from May 13, 2014 to July 31, 2023, a total of 80,808 records, each record includes the air quality index (AQI), six indicators of air pollutants ( 3 ,CO,NO 2 , SO 2 , PM 2.5 and PM 10 ) and meteorological parameters (temperature, dew point temperature, wind speed, wind direction, air pressure). The data from May 13, 2014 to October 15, 2020 is used as the training dataset; the data from October 16, 2020 to September 12, 2021 is used as the validation dataset; and the data from September 13, 2021 to July 31, 2023 is used as the test dataset.
[0123] (2) Time series decomposition: According to steps S1-S7, the ozone series is decomposed into seasonal components, trend components, and residual components. The seasonal cycle of data interpolation with different missing rates is verified by experiments. The best value of .
[0124] (3) Learning the state information of ozone concentration changes: First, dynamically intercept the ozone sequence in the time dimension and perform STL decomposition to obtain the seasonal component , Trend Component and the remaining amount Secondly, the three components were compared with the air quality index (AQI), five other indicators of air pollutants (CO, NO 2 、SO 2 、PM 2.5 、PM 10 ), meteorological measured data (temperature, dew point temperature, wind speed, wind direction, air pressure) are spliced as the input sequence of the Transformer model, that is, ; Secondly, different proportions of random masking (i.e. 10%, 50%, 90%) are used on the input sequence; finally, the Transformer model is used to extract the state information of ozone concentration changes. The Transformer model can extract the global state information of ozone concentration changes from ozone sequence components and multi-source data as prior information for data interpolation, thereby improving the performance of data interpolation.
[0125] (4) Generative interpolation of ozone concentration data: A diffusion model is used to perform generative interpolation on missing data of ozone concentration anomalies. The state sequence extracted by Transformer is used as part of the model input and as prior information for the diffusion process and the generative process.
[0126] (a) When comparing the data interpolation results, the following four evaluation indicators are first used: mean absolute percentage error (MAPE), mean square error (R 2 ), mean absolute error (MAE) and root mean square error (RMSE). The interpolation performance of the proposed method and other models in terms of MAPE / R2 / MAE / RMSE is compared in Figure 4 When the coverage rate (i.e., missing rate) is 10%, 50%, and 90%, the R 2 The values are 0.9939, 0.9848 and 0.9658 respectively, which are better than other comparison models, especially when the missing rate is 90%, R 2 The value can still reach 0.9658. The proposed method is better than other comparison models in terms of R2 / MAE / RMSE under three random missing conditions, and the MAPE index is only slightly inferior to the CSDI model when the missing rate is 90%. By comparing with other models on the four indicators, it is shown that the proposed method has better performance in the interpolation task of abnormal missing ozone concentration data.
[0127] (b) To further verify the interpolation performance of the proposed method, the prediction interval coverage probability (PICP) index of each model for data interpolation is compared in this example, and the comparison results are shown in Table 1. The PICP of the proposed method is better than that of other comparison models under different random missing rates, which further shows that the proposed method has a better interpolation effect on abnormal missing data.
[0128] Table 1 Comparison of PICP indicators between this example and other models
[0129] There are many implementation methods of the present invention, and all technical solutions formed by equivalent transformation or equivalent transformation fall within the protection scope of the present invention.
[0130] It should be pointed out that the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by ordinary technicians in this technical field within the essential scope of the present invention should also fall within the protection scope of the present invention.
Claims
1. A generative interpolation method for abnormal missing ozone concentration data, characterized in that: include: S1, decomposing the time series of ozone concentration data to obtain component data; wherein the component data includes seasonal component, trend component and residual component; S2, concatenates the component data and multi-source influencing factors into the input sequence of the Transformer model; S3, using the Transformer model to extract the state information of ozone concentration changes; S4, taking the state information and the ozone concentration data as inputs of the diffusion model, and using the diffusion model to perform generative interpolation operations on the ozone concentration data.
2. The generative interpolation method for abnormal missing ozone concentration data according to claim 1 is characterized in that: Step S2 includes the step of dynamically intercepting the ozone sequence fragment, including: Configure the decomposition window size to ,make The seasonal component, trend component and residual component of the moment are The ozone sequence in the time period is obtained by STL decomposition; among them, is the seasonal cycle parameter; As time goes by, the decomposition window slides backward to obtain the input sequence at each moment ,in, It is the measured data of multi-source influencing factors; It is the dimension of multi-source influencing factors; They are seasonal component, trend component and residual component respectively.
3. The generative interpolation method for abnormal missing ozone concentration data according to claim 2 is characterized in that: Step S2 includes the steps of constructing the Transformer model input data sequence, including: The input sequence of the Transformer model Set to data before and after missing: ; in, Indicates the length of data intercepted before and after the missing sequence. for Multi-source measured data at each moment and the splicing characteristic sequence of the three components.
4. The generative interpolation method for abnormal missing ozone concentration data according to claim 1, characterized in that: In step S3: The input sequence Perform vector representation; Use sine and cosine functions of different frequencies to encode position information; The positional encoding is added to the sequence vector as input to the encoder of the Transformer model.
5. The generative interpolation method for abnormal missing ozone concentration data according to claim 1, characterized in that: The diffusion process of step S4 adopts; conduct; State information extracted for the Transformer model; , , is the number of iteration steps; For the The variance of the step; The noise added in the rth step of the forward process obeys the standard Gaussian distribution; Output the result for step r; The generation process uses: conduct; The noise added to the forward process follows a standard Gaussian distribution; ; During the generation process Predict using a neural network: , As input to the generation process, The noise predicted by the neural network; Output the result for step r-1.
6. The generative interpolation method for abnormal missing ozone concentration data according to claim 1, characterized in that: The method further comprises: The Transformer model and the diffusion model are integrated in a Bayesian framework. The output of the Transformer model As part of the diffusion model input, the optimization of parameters during the gradient propagation during the training process is based on the total loss function Joint optimization, the parameters of the Transformer model are based on the loss function To optimize, the generation process of the diffusion model uses a neural network in the training process. get , the training of the neural network is based on the loss function conduct: ; in represents the loss function of the Transformer model, represents the loss function of the diffusion model.
Citation Information
Patent Citations
KPIs missing value interpolation method based on improved Transform and masking training
CN115658672A
Hierarchical atmospheric ozone concentration prediction method based on missing data filling
CN116384565A
Conditional diffusion model-based time series data prediction method and system
CN117076931A
STL-Transformer-based ozone concentration prediction method
CN118248244A
Industrial park short-term load prediction method and system based on Diffusion-Transform-AR model
CN119154249A