Exhaust emission concentration prediction method and system based on time series prediction model
By using the Informer model to predict exhaust gas emission concentrations, combined with multi-feature rules and unsupervised clustering, the problems of response lag and high energy consumption in industrial exhaust gas treatment systems are solved, achieving accurate prediction and intelligent management, and improving the system's energy-saving effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG UNIV
- Filing Date
- 2025-12-31
- Publication Date
- 2026-06-12
AI Technical Summary
Existing industrial waste gas treatment systems suffer from problems such as slow response, high energy consumption, and lack of intelligent prediction capabilities, making it difficult to achieve precise control of emission concentrations and energy-saving management.
A time series prediction method based on the Informer model is adopted. By combining multi-feature rules and unsupervised clustering for working condition classification, a multivariate vector sequence is constructed. The probabilistic sparse multi-head attention mechanism is used to predict exhaust gas emission concentration. By combining sliding window prediction and edge computing, real-time rolling prediction is achieved.
It improved the accuracy of exhaust gas emission concentration prediction and the system's intelligence level, optimized the energy consumption structure, and enhanced the system's energy-saving operation capability.
Smart Images

Figure CN121436320B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of waste gas emission prediction technology, and in particular relates to a method and system for predicting waste gas emission concentration based on a time series prediction model. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] In industrial waste gas treatment, dynamic prediction of key process variables such as emission concentration and equipment load can provide a basis for control system adjustment, helping the waste gas treatment system to allocate energy consumption and respond quickly, thereby enabling intelligent and energy-saving management. However, current industrial waste gas treatment processes still face many challenges and shortcomings. First, traditional waste gas treatment systems often use setpoint control or simple PID feedback control, which can easily lead to situations where the regulating equipment is only activated after the pollutant concentration exceeds the standard. This significant response lag makes it difficult to respond to emission fluctuations in a timely manner, easily causing instantaneous exceedances of emission standards.
[0004] Secondly, current waste gas treatment equipment, such as fans and heating devices, cannot operate for extended periods based on whether emission concentrations meet standards, leading to high system energy consumption and increased operating costs. Even though some waste gas treatment systems use models to predict future emission concentrations, industrial waste gas is affected by various factors such as process fluctuations, equipment status, and raw material changes. Therefore, there is a significant nonlinearity and non-stationarity between emission concentrations and components, which poses considerable challenges to traditional model building and control strategy design, making accurate prediction and control difficult.
[0005] Finally, most current waste gas treatment systems do not integrate advanced data analysis and prediction mechanisms. The systems only rely on real-time monitoring data to react, lacking the ability to predict future emission trends of waste gas, resulting in passive control and regulation, and making it difficult to achieve intelligence. Summary of the Invention
[0006] To overcome the shortcomings of the existing technologies, this invention proposes a method and system for predicting exhaust gas emission concentration based on a time series prediction model. This system is used for predicting the content of emissions and dynamic energy-saving control during industrial exhaust gas treatment. By introducing the Informer model, an intelligent control method oriented towards emission trends is proposed. This improves prediction accuracy, optimizes energy consumption structure, significantly enhances the system's intelligence level and energy-saving operation capability, solves many problems existing in the prior art, and has broad application value and huge market prospects.
[0007] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:
[0008] In a first aspect, the present invention discloses a method for predicting exhaust gas emission concentration based on a time series prediction model, comprising:
[0009] Collect historical exhaust gas emission monitoring data;
[0010] The monitoring data was subjected to a combination of multi-feature rule-based and unsupervised clustering methods to classify the operating conditions, resulting in a preliminary dataset and operating condition classification results.
[0011] The preliminary dataset is preprocessed and a multivariate time series modeling mechanism is introduced to construct a multivariate vector sequence. Based on the working condition classification results and the multivariate vector sequence, feature importance analysis is performed to obtain time series structured data.
[0012] A time series prediction model based on a probabilistic sparse multi-head attention mechanism is constructed, and the time series prediction model is trained using the time series structured data to obtain a waste gas emission concentration prediction model.
[0013] The exhaust gas emission concentration prediction model is used to predict the future exhaust gas emission concentration of the dataset to be predicted.
[0014] Secondly, this invention discloses a waste gas emission concentration prediction system based on a time series prediction model, comprising:
[0015] The data acquisition module is configured to collect historical exhaust gas emission monitoring data.
[0016] The data processing module is configured to: classify the monitoring data into working conditions using a method combining multi-feature rules and unsupervised clustering to obtain a preliminary dataset and working condition classification results;
[0017] The feature construction model is configured to: preprocess the preliminary dataset and introduce a multivariate time series modeling mechanism to construct a multivariate vector sequence; and perform feature importance analysis based on the working condition classification results and the multivariate vector sequence to obtain time series structured data.
[0018] The model building module is configured to: build a time series prediction model based on a probabilistic sparse multi-head attention mechanism, and train the time series prediction model using the time series structure data to obtain a waste gas emission concentration prediction model.
[0019] The concentration prediction module is configured to predict the future emission concentration of exhaust gas based on the exhaust gas emission concentration prediction model for the dataset to be predicted.
[0020] Thirdly, the present invention discloses an electronic device, including a memory and a processor, and computer instructions stored in the memory and running on the processor, wherein the computer instructions, when run by the processor, complete the steps of the above-mentioned method for predicting exhaust gas emission concentration based on a time series prediction model.
[0021] Fourthly, the present invention discloses a computer-readable storage medium for storing computer instructions, which, when executed by a processor, complete the steps of the above-mentioned method for predicting exhaust gas emission concentration based on a time series prediction model.
[0022] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0023] This invention provides a method and system for predicting exhaust gas emission concentrations based on the Informer model. This method introduces the Informer time series prediction model into the industrial exhaust gas treatment process, utilizing its deep time series modeling mechanism based on probabilistic sparse attention. This simultaneously improves prediction stability and accuracy under long-term and complex fluctuation backgrounds. By introducing operating condition classification before data preprocessing, the model's prediction accuracy can be effectively improved, providing support for the smooth implementation of subsequent control strategies.
[0024] This invention utilizes multi-source sensor data and emission concentrations for multivariate joint modeling. The Informer model can effectively capture the dynamic correlation structure between variables, thereby improving the overall predictive robustness and generalization ability of the system.
[0025] This invention enables real-time rolling prediction by designing a sliding window prediction and sliding update strategy. At the same time, by supporting the deployment of the Informer model on edge computing platforms, it enables the deep learning model to be implemented in industrial online systems, breaking through the bottleneck of traditional offline prediction.
[0026] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0027] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0028] Figure 1 This is a flowchart of the waste gas emission concentration prediction method based on a time series prediction model as described in Embodiment 1 of the present invention.
[0029] Figure 2 This is a framework diagram of the waste gas emission concentration prediction method based on a time series prediction model as described in Embodiment 1 of the present invention.
[0030] Figure 3 This is an overall flowchart of the working condition classification described in Embodiment 1 of the present invention.
[0031] Figure 4 This is a flowchart of the auxiliary classification process described in Embodiment 1 of the present invention.
[0032] Figure 5 This is a diagram of the Informer model architecture described in Embodiment 1 of the present invention.
[0033] Figure 6 This is a trend chart showing the changes in training loss and validation error of the Informer model described in Embodiment 1 of the present invention.
[0034] Figure 7 This is a comparison chart of the predicted and actual values of the Informer model described in Embodiment 1 of the present invention. Detailed Implementation
[0035] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0036] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.
[0037] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0038] Example 1
[0039] In one or more embodiments, a method for predicting exhaust gas emission concentration based on a time series prediction model is disclosed, such as... Figures 1-2 As shown, it includes the following steps:
[0040] Step S1: Collect historical exhaust gas emission monitoring data.
[0041] Historical exhaust emission monitoring data are collected by sensors, including rotor inlet and outlet flow rates, RTO inlet and outlet flow rates, RTO fan frequency, cooling heat exchange fan frequency, adsorption fan frequency, desorption fan frequency, rotor frequency, rotor current speed, and the content of key quality indicators (non-methane total hydrocarbons (dry) (mg / m^3)) in the emissions, to establish an original dataset.
[0042] This embodiment collected five months of historical data from an industrial waste gas treatment workshop of Company A.
[0043] Step S2, as follows Figure 3 As shown, the monitoring data is classified into preliminary datasets and classification results by using a method combining multi-feature rules and unsupervised clustering.
[0044] Step S2-1: Perform preliminary classification on the original dataset based on multi-feature rules to obtain preliminary classification results and boundary samples whose working condition labels cannot be determined.
[0045] During the exhaust gas treatment process, the equipment will be in various operating conditions such as normal operation, shutdown / maintenance, calibration, and backflushing. The data in the initial dataset is stored in a mixed manner. If these data are used directly without classification, irrelevant noise will be introduced during model training, the prediction accuracy will decrease, and subsequent control strategies will become abnormal.
[0046] Specifically, the typical characteristics of the data when the equipment is under different operating conditions are shown in Table 1:
[0047] Table 1 Typical characteristics of data under different working conditions
[0048]
[0049] For the original dataset, operating condition discrimination rules are first established based on parameters such as fan speed, flow rate, and concentration of non-methane total hydrocarbons in the emissions to achieve preliminary classification of operating conditions such as normal operation, shutdown / maintenance, calibration, and backflushing. The operating condition discrimination rules are shown in Table 2.
[0050] Table 2 Operating Condition Judgment Rules
[0051]
[0052] Based on existing data, a reasonable range for normal operating emission concentrations can be set to 0-50. Preliminary classification results and some boundary samples for which operating condition labels cannot be determined are obtained through the above discrimination rules.
[0053] Step S2-2: Perform auxiliary classification on boundary samples for which the working condition label cannot be determined to obtain a preliminary dataset and working condition classification results.
[0054] In the initial classification, problems may arise such as unclear feature rules and frequent changes in operating conditions. At this time, it is often difficult to accurately distinguish boundary samples at the switching critical point of different operating conditions using multi-feature rules. Therefore, the KMeans clustering algorithm is introduced to assist in classification.
[0055] Auxiliary classification includes key steps such as feature selection, data cleaning, and KMeans clustering modeling, such as... Figure 4 As shown, the specific process is as follows:
[0056] Step S2-2-1: Perform feature selection and cleaning on the boundary sample data, selecting key feature variables that contribute significantly to distinguishing working conditions. The specific feature selection results are shown in Table 3.
[0057] Table 3 Feature Selection Table
[0058]
[0059] It should be understood that the above features were selected for the following reasons:
[0060] 1. Gas flow rate in the pipeline contributes the most. Flow rate is a core indicator reflecting whether equipment is "operating" and its "operating mode." Flow rate differences under different operating conditions are absolutely distinguishable. Specifically:
[0061] Shutdown / Maintenance Condition: The equipment is stopped, there is no gas flow in the pipeline, and the flow rate is basically 0.
[0062] Backflushing operation: To clean the pipeline, the blower needs to operate at high intensity, at which time the flow rate... Normal upper limit;
[0063] Normal operating conditions: The flow rate is stable within the preset threshold range, but there are some fluctuations.
[0064] Calibration conditions: To ensure calibration accuracy, the flow rate must be fixed at a certain value for a certain period of time without fluctuation.
[0065] Therefore, the contribution of traffic volume in the range of "0 value, normal range, and above the upper limit" can directly distinguish the four core operating conditions, and there are no other features that can replace it. Therefore, it has the highest contribution and is the core feature that must be selected.
[0066] 2. Non-methane total hydrocarbon emission concentration has the second highest contribution. Effective emission concentration is a key indicator reflecting "whether waste gas is emitted" and "whether emissions are normal." Differences in its values directly provide crucial evidence for distinguishing operating conditions. Specifically:
[0067] Shutdown / maintenance, backflushing conditions: No effective exhaust gas emissions, concentration is basically 0;
[0068] Calibration conditions: High concentration of standard gas needs to be manually injected, at which point the concentration is significantly higher (generally above 100 mg / m³).
[0069] Under normal operating conditions, the concentration remains stable within the emission standards (0-50 mg / m³), with slight fluctuations depending on the treatment efficiency.
[0070] Therefore, the contribution rate can directly distinguish between two major operating conditions (normal and calibration) and (shutdown and backflushing), and can further distinguish between "normal emissions" and "high calibration values". The distinction is weaker only in the "shutdown / backflushing" operating conditions (both values are 0).
[0071] 3. Desorption fan speed: Medium to high contribution. The desorption fan is the core equipment for waste gas adsorption-desorption treatment. Its speed difference is strongly correlated with different operating conditions. Specifically:
[0072] Shutdown / Maintenance Condition: The fan stops running, and the speed is 0.
[0073] Normal operating conditions: Continuous desorption of exhaust gas is required, and the rotation speed is stable within the operating range (e.g., 1500-2000 RPM).
[0074] Backflushing and calibration conditions: Desorption process is paused, speed = 0 (backflushing focuses on pipeline cleaning, while calibration focuses on concentration detection; neither requires desorption).
[0075] Therefore, the contribution rate judgment speed can effectively distinguish between "normal operation (speed > 0)" and "other three types of operating conditions (speed = 0)", but it cannot distinguish between "shutdown / backflush / calibration" (all three have a speed of 0). In this case, it needs to be combined with other features to classify the operating conditions.
[0076] 4. Combustion engine valve opening: Medium to high contribution. Combustion engines (such as heating devices in RTO systems) are used to burn and decompose organic matter in waste gas. Their valve opening reflects whether combustion treatment has started. Differences in opening under different operating conditions are related to the treatment status. Specifically:
[0077] Shutdown / Maintenance, Backflushing Conditions: Burner is off, valve opening = 0;
[0078] Normal operating conditions: Continuous combustion is required, and the valve opening is stable within the operating range (e.g., 20%-30%).
[0079] Calibration conditions: Burner paused (to avoid high temperature affecting calibration accuracy), valve opening = 0.
[0080] Therefore, similar to the desorption fan speed, the valve opening can distinguish between "normal operation (opening > 0)" and "other three types of operating conditions (opening = 0)", but it cannot distinguish between "shutdown / backflushing / calibration". It needs to be used in conjunction with pipeline gas flow and effective emission concentration to classify the operating conditions.
[0081] Because zero values may appear when equipment is shut down or under maintenance, null values may appear when cleaning pipelines, and abnormally high data may appear during equipment calibration, the dataset contains missing values and outliers. Therefore, data cleaning is required to improve data quality and reliability and reduce model errors and biases.
[0082] Step S2-2-2: Clean the data of the feature selection results, including the following process: missing value detection and imputation, outlier detection and removal, duplicate value deletion, and timestamp alignment, to obtain the cleaned data, i.e., the preliminary dataset.
[0083] Missing value detection and imputation: For short-term data gaps in the initial dataset, linear interpolation is used: first, the time-series data is traversed to find consecutive missing intervals, and then the preceding valid point of the missing segment is found. and the next valid point The interval [t1, t2] is divided equally, and linear interpolation is used to calculate the result at each missing time point. The specific interpolation formula is as follows:
[0084] =
[0085] In the formula, It is the intermediate point that needs to be interpolated and estimated; , These are the valid data points before and after the missing segment.
[0086] For data missing over a long period, it is marked as an outlier and the entire sample segment is removed.
[0087] Outlier Detection and Removal: In the acquisition of exhaust gas emission concentration data, anomalies may occur due to sensor errors, equipment calibration, and other factors. To address this, an outlier detection module is implemented, employing a combination of the Z-Score standard deviation method and the IQR quartile method to identify potential abrupt changes, extreme points, and other data that do not conform to physical laws within the exhaust gas emission concentration sequence. After outlier identification, the system automatically repairs the data using sliding window mean or bidirectional interpolation. If the outlier persists for an extended period, it is deleted, thereby ensuring the continuity and stability of the time-series data and improving the accuracy and robustness of model predictions.
[0088] Duplicate value removal: When there are multiple data records with the same timestamp, select to keep the latest updated data.
[0089] Timestamp alignment: All variables are unified to a fixed time frequency (once per minute) to facilitate subsequent sliding window processing.
[0090] Step S2-2-3: After data cleaning, since there are a total of 5 working conditions that need to be distinguished, the number of clusters is selected as 5. Then, cluster modeling is performed. The clustering results are then visualized after PCA dimensionality reduction to obtain auxiliary classification results, and finally the working condition classification is completed.
[0091] Step S3: Preprocess the preliminary dataset and introduce a multivariate time series modeling mechanism to construct a multivariate vector sequence. Based on the working condition classification results and the multivariate vector sequence, perform feature importance analysis to obtain time series structured data.
[0092] After data cleaning, the data structure in the dataset becomes cleaner, but the data is still relatively raw and cannot be directly input into the model for training and prediction. Data preprocessing is required to transform it into a time series structure that the Informer model can directly learn.
[0093] Step S3-1: Perform standardization and sliding window sample construction preprocessing on the cleaned data (i.e., the initial dataset). Specifically:
[0094] Step S3-1-1, Feature standardization processing:
[0095] Before model training, a standardization module is set up, and Z-score standardization is used to perform a uniform numerical transformation on all input variables. During the prediction process, this process is performed separately for each multivariate sequence, and the parameters calculated from the training set are used uniformly for transformation. The specific standardization formula is as follows:
[0096]
[0097] Where x is the initial value of the variable, It is the sample mean of the variable. It is the sample standard deviation of the variable. It is a standardized value that conforms to a distribution with a mean of 0 and a standard deviation of 1.
[0098] Feature standardization is a process that maps variables with different physical dimensions and value ranges to the same distribution range through linear transformation. Even after cleaning, the data remains a multi-dimensional time series. For example, variables such as exhaust gas concentration, adsorption fan frequency, desorption fan frequency, temperature, and wind speed all have different dimensions and value ranges. Due to the significant differences in the magnitudes of these variables, without standardization, the gradient during model training can easily shift to variables with larger values, leading to skewed learning, slow convergence, or even non-convergence. Feature standardization performs a uniform numerical transformation on all input variables, ensuring the model's generalization performance and predictive stability.
[0099] Step S3-1-2, the specific steps for constructing the input and output samples of the Informer model using the sliding window mechanism, include: extracting samples of length [missing information] from the continuous post-cleaning exhaust gas emission concentration sequence. The time window is used as the input sequence, and the target is the immediately following time window. The concentration values at each time point are used. A sliding window traverses the entire dataset with a step size of 1, generating a large number of input / output sample pairs for model training; during the model inference phase, the latest... Using data from a given moment as input, the prediction model outputs future... The predicted emission concentration for the step.
[0100] Its mathematical description is as follows: Let the original data sequence be... The input window length is The predicted step size is The training sample set is then constructed using a sliding window method, and the i-th training sample set is shown below:
[0101]
[0102] in, It is the input of the i-th sample. It is the label of the i-th sample. .
[0103] The Informer model is a deep time series prediction model with a sequence-to-sequence (Seq2Seq) structure. Its input is a fixed-length time series sample segment (i.e., a time window), and its output is the predicted values for the next several steps. This construction method effectively enhances the model's ability to perceive time series structure and is suitable for multivariate collaborative prediction scenarios.
[0104] Step S3-2: The constructed sliding window samples are subjected to multivariate time-series modeling mechanisms to combine and expand the dimensions of multiple variables, specifically:
[0105] Multiple key process variables involved in the exhaust gas emission process (including sliding window sample data of non-methane total hydrocarbons in emissions, fan frequency, RTO inlet and outlet flow rates, and rotor speed) are aligned with a unified timestamp and constructed into a multivariate vector sequence. Data at each time point is represented as an n-dimensional vector and combined using a sliding window approach. The input tensor. Through multivariate modeling, the potential dependencies between variables can be revealed, improving prediction accuracy.
[0106] The combination of multiple variables and dimensional expansion yields the following multivariate variables:
[0107]
[0108] Where n represents the number of input variables, , ... This represents a series of time-series data collected by the sensor, and its quantity indicates the length of the input window.
[0109] Step S3-3: Based on the working condition classification results, perform feature importance analysis on the multivariate vector sequence to obtain time series structure data.
[0110] Before establishing the Informer model to predict exhaust gas emission concentration, this invention introduces a feature importance analysis module to screen out the key variables that have the greatest influence on the change of target pollutant concentration (non-methane total hydrocarbons (dry) (mg / m^3)). Then, the features with higher importance are reconstructed to obtain a new dataset. The dataset is then divided into a training dataset, a validation dataset, and a dataset to be predicted, in preparation for subsequent model training and prediction.
[0111] Specifically, the multivariate vector sequence with the working condition classification result as normal working condition is input into the Random Forest regression model for training. The Random Forest model is composed of multiple decision trees. During the model training phase, each tree randomly extracts the feature dimensions of the multivariate vector sequence and independently generates classification or regression results based on these dimensions.
[0112] To assess the impact of features on the prediction target, this method uses Gini Importance as a metric. This metric is a weighted average of the reduction in impurity resulting from each feature acting as a splitting condition in each tree. Impurity, typically measured by the Gini coefficient, describes the uniformity of sample distribution within a node. The feature importance score reflects its contribution to improving node purity. The specific calculation formula is as follows:
[0113]
[0114]
[0115] Where T is the total number of trees in the random forest model, X is the feature whose importance needs to be evaluated, t represents the split node of the decision tree, Samples(t) is the number of samples falling into the node, Gini(t) is the Gini index of the t-th tree, C is the number of features, and P(i|t) represents the probability distribution of the i-th class of target in node t.
[0116] After calculating the importance scores of all features, the importance matrix G = { is obtained for all features in the dataset. , ,... Then, the selection formula for the i-th feature is as follows:
[0117]
[0118] in, G represents the Gini importance score corresponding to the i-th feature. max This represents the feature with the highest Gini importance score among all features. The function F(x) is the feature selection function, which compares two input parameter values and selects whether to retain the current feature based on the result. The parameter k is the feature selection threshold, ranging from [0, 1], used to set the sensitivity of feature selection; the specific value is determined by the results of the model training phase.
[0119] This invention selects the Top-N features based on a feature selection formula to form time-series structured data for subsequent Informer model input, while other low-scoring features are directly discarded. Through the above feature importance analysis steps, operational variables highly correlated with the predicted pollutant emission concentration can be effectively extracted, such as desorption fan frequency, RTO fan frequency, rotor speed, and the valve size controlling the natural gas input in the combustion chamber, making the subsequent Informer model input more representative and predictive.
[0120] Step S4: Construct a time series prediction model (Informer model) based on a probabilistic sparse multi-head attention mechanism, and train the time series prediction model using the time series structure data to obtain a waste gas emission concentration prediction model.
[0121] Step S4-1: This invention employs an Informer model based on the ProbSparse Attention mechanism and programming techniques to construct a long-sequence emission concentration trend prediction model. After cleaning and preprocessing the multivariate exhaust gas emission data, a fixed-length input sequence (time-series structured data) is constructed using a sliding window approach, and positional encoding is introduced to enhance time-series awareness. Then, model components such as the attention mechanism, encoder, and decoder are constructed. The encoder uses a sparse attention mechanism for feature compression and extraction, while the decoder directly performs multi-step concentration prediction based on the encoded features and historical label information. Finally, the initial model parameters are set to obtain a preliminary prediction model.
[0122] The Informer model consists of a concatenated positional encoder, encoder, and decoder. The specific steps for building the model are as follows:
[0123] Step S4-1-1: Construct location encoding;
[0124] The Informer model employs a positional encoding method based on a sine-cosine function at its input to provide sequence order information. Specifically, a fixed-pattern positional information matrix is generated by mapping the position and feature dimension of each time step in the sequence using a function. This matrix is then added element-wise to the input features to enable the model to perceive the temporal order.
[0125] The specific location coding formula is as follows:
[0126]
[0127] Where pos represents the time step position (e.g., 1, 2, 3...), i represents the feature dimension index, d represents the model dimension (i.e., the number of features), and even-numbered dimensions use sine and odd-numbered dimensions use cosine.
[0128] After constructing the positional encoding, add it to the input features:
[0129]
[0130] Where, X∈ These are input features, PE∈ It is a positional encoding, and the two are added element by element.
[0131] Step S4-1-2: Construct the encoder of the Informer model, which includes two hierarchical units. Each hierarchical unit includes three core layers connected in sequence: a probabilistic sparse multi-head attention layer, a self-attention distillation layer, and a feedforward neural network layer (FFN). After each core layer, there are residual connections and layer normalization layers to improve training stability.
[0132] Among them, the probabilistic sparse multi-head attention layer replaces the traditional full self-attention layer. It reduces the computational cost for long sequences through probabilistic sparse sampling, captures the global dependencies of temporal features, and outputs a feature map V. Self-attention distillation layers compress features from the output of probabilistic sparse attention, preserving the dominant features and reducing redundant information. Self-attention distillation layers include one-dimensional convolution, ELU activation, and max pooling. Feedforward neural network layers (FFNs) perform non-linear transformations on the distilled features to enhance the model's fitting ability. These typically include linear transformation layers, activation function layers, and linear transformation layers.
[0133] The output of each core layer (attention layer, distillation layer, FFN layer) is summed with the residual of the input after layer normalization, as shown in the formula:
[0134] =LayerNorm( + ))
[0135] in, As the input to the core layer, The output of the core layer is LayerNorm, which is used for layer normalization. This is the output after the residual.
[0136] In this embodiment, the probabilistic sparse attention mechanism specifically adopts a probabilistic sparse multi-head attention mechanism (Multi-head ProbSparse Self-attention) to capture the dependencies between different positions in the sequence.
[0137] The structure of multi-head probabilistic sparse self-attention is divided into three key modules: (1) Feature projection module: mapping input features to query, key, and value; (2) Probabilistic sparse sampling module: sparsely sampling the key and retaining only the part that is highly related to the query to reduce the amount of computation; (3) Multi-head parallel computing module: dividing the features into multiple "heads" to independently compute attention and then splicing the results.
[0138] Specifically, let the input of the j-th layer be... Where L is the length of the current time dimension. Given the hidden layer dimension, the computation steps for so head probabilistic sparse self-attention are as follows:
[0139] 1. The projections are Q, K, and V.
[0140] Input The query is mapped to a key Q, a value K, and a value V through three linear layers, and then sorted by the number of heads. Split: Q= K= V= ;
[0141] Q=Split(Q, )∈
[0142] K=Split(K, )∈
[0143] V=Split(V, )∈
[0144] in, , , ∈ Let be the projection matrix. = = / For a single-head dimension, Split() is a tensor dimension splitting function. Its function is to evenly divide the feature dimension of the input tensor into multiple attention heads. Each attention head independently calculates the attention weight in the subspace, thereby realizing multi-head parallel modeling.
[0145] 2. Probabilistic sparse sampling key.
[0146] Calculate the dot product similarity between the query and the key, and select the c×logL keys with the highest similarity (c is a constant, usually 5). Only keep the K′ and V′ corresponding to these keys:
[0147]
[0148]
[0149]
[0150] in, For sparse selection, this means selecting the c × log(L) keys with the highest similarity from the Sim matrix for each query, thus retaining only the most important key information in the attention; This is the similarity matrix between Q and K; The subset of keys extracted from the original K based on the positions with the highest similarity is called the "selected key". This is a subset of the values corresponding to the retained keys.
[0151] 3. Calculate single-head sparse attention.
[0152] Calculate the attention weights and output for the sampled Q, K′, V′:
[0153] Attn(Q,K′,V′)=Softmax(Sim(Q,K′) / )·V′
[0154] 4. Multi-head splicing and output
[0155] The attention outputs of all heads are concatenated, and then passed through a linear layer to obtain the final result:
[0156]
[0157] in, ∈ To output the projection matrix, [ For the output of the attention block, Let the weight of the i-th attention head be... .
[0158] This embodiment sets the parameters of the attention mechanism as shown in Table 4, including whether to use a mask, the sampling factor, the scaling factor, and the dropout ratio in the attention mechanism. Whether to use a mask determines whether the temporal order of the sequence data needs to be considered. The sampling factor controls the dilution degree of the sparse attention mechanism, while the scaling factor controls the range of the output. Adjusting the scale helps the model learn appropriate attention weights better. The dropout ratio controls the dropout rate when calculating attention weights to reduce overfitting.
[0159] Table 4 Attention Mechanism Parameter Table
[0160]
[0161] In its encoder design, the Informer model utilizes self-attention distillation to halve the number of features at a single layer over time, thereby improving the encoder's efficiency when processing long input sequences. However, the feature maps output by probabilistically sparse self-attention can contain redundant combinations of the value matrix V, leading to the model learning repetitive information. Therefore, distillation is used to assign higher weights to dominant attentional features, generating focused self-attention feature maps in the next layer. The self-attention distillation process from layer j to j+1 is as follows:
[0162]
[0163] in, This represents the attention block, which contains multi-head probabilistic sparse self-attention and basic operations (including residual connections and layer normalization). `Convld()` performs a one-dimensional convolution on the time dimension and uses the ELU activation function. After stacking one layer, a max-pooling layer `MaxPool()` is added, and... Downsampling to half of the image reduces overall memory usage, and the outputs of all stacks are connected to obtain the encoder's feature map.
[0164] Step S4-1-3: Construct the decoder for the Informer model, such as... Figure 5 As shown, the input sequence is input into the encoder, and a connected feature map is generated as the hidden representation of the encoder through a probabilistically sparse multi-head attention module and a self-attention distillation module. This feature map, along with a long sequence with zero placeholders for the target sequence, is then input into the decoder part, and finally, the prediction result is generated.
[0165] The Informer model employs batch generative prediction in its decoder design, directly outputting multi-step prediction results through a single forward computation. The decoder's input vector consists of two parts and depends on the encoder's output. Specifically, the basic input for constructing the decoder is as follows:
[0166] First, concatenate the starting marker sequence. and target sequence placeholders get:
[0167]
[0168] in, It is the starting marker. It is a placeholder for the target sequence (setting the scalar to 0).
[0169] Then to Perform the same linear transformation and positional encoding as the encoder to obtain the basic input of the decoder. .
[0170] After obtaining the basic input to the decoder, it also needs to receive the hidden layer representation from the encoder. .
[0171] Sample a sequence of length from the input sequence. sequence As a starting marker, this sequence ( The slice preceding the output sequence is concatenated with placeholders in the target sequence to obtain the basic input to the decoder. Simultaneously, the encoder's hidden layer representation H is introduced into the decoder. enc Using these as the Key and Value of the cross-attention layer in the decoder, the input sequence of the decoder is conditionally constrained, thus obtaining the final input of the decoder. The target sequence placeholder consists of a sequence of zero vectors corresponding to the prediction step size, used to identify the time step to be predicted during the decoding stage and to avoid introducing future real information.
[0172] The decoder has two layers. The first layer performs masked multi-head probabilities sparse self-attention on the input vector. Masked multi-head attention sets the mask dot product to... To prevent each position from focusing on subsequent positions, autoregression can be avoided. The second layer performs another multi-head attention calculation on the result calculated in the first layer and the feature map output by the decoder. Finally, a fully connected layer is used to obtain the final output.
[0173] Specifically, the Informer decoder's masked multi-head probabilistic sparse self-attention is a combination of "masking mechanism + multi-head probabilistic sparse self-attention," where "masking" is to prevent autoregression from leaking future information, and "probabilistic sparsity" is to reduce computational cost. The core structure of the masked multi-head probabilistic sparse self-attention consists of three parts:
[0174] (1) Masking module: uses a “lower triangular mask matrix” to mask information about the future location;
[0175] (2) Probabilistic sparse self-attention module: Sparse sampling of the key reduces the computational complexity of long sequences;
[0176] (3) Multi-head parallel computing module: split the feature into multiple heads for independent computing, and then splice the results.
[0177] Specifically, let the input of the first layer of the decoder be... ∈ ( The starting mark length, To predict the step size, the calculation steps are as follows:
[0178] 1. Feature projection and multi-head splitting;
[0179] Input The query is mapped to a key Q, a value K, and a value V through three linear layers, and then sorted by the number of heads. Split:
[0180]
[0181]
[0182]
[0183]
[0184]
[0185]
[0186] in, , , Let be the projection matrix. = = / It is a single-head dimension.
[0187] 2. Add a lower triangle mask;
[0188] Construct the lower triangular mask matrix M∈ (Only retain information about the current and previous locations; future locations will be set to...) (∞), mask the similarity matrix:
[0189] =0 (j≤i)
[0190] = ∞ (j > i)
[0191]
[0192] Where M is the lower triangular mask matrix, i is the row index, j is the column index, and T is the transpose.
[0193] 3. Probabilistic sparse sampling key;
[0194] For the masked similarity matrix, select the one with the highest relevance to the query. ) keys (c is a constant, usually 5), retain the corresponding K′ and V′:
[0195] K′=TopK(Sim, c×log( ))·K,
[0196] V′=TopK(Sim,c×log( ))·V
[0197] 4. Calculate attention and multi-head splicing
[0198] Calculate attention weights for the sampled Q, K′, V′, and then concatenate the multi-head results and project them as output:
[0199] =Softmax(Sim(Q,K′) / )·V′
[0200]
[0201] in, To output the projection matrix; This is the output of the first layer of the decoder; This is the output result for single-head attention; d k This indicates the dimension of a single attention head; Softmax() indicates that a softmax operation is performed on each row.
[0202] The Informer time series forecasting model is a deep learning architecture optimized based on a self-attention mechanism, specifically designed for forecasting long sequences and multiple variables. Since its inception, this model has been widely used in intelligent manufacturing and industrial control due to its advantages such as efficient modeling of long-term time-series dependencies, multi-dimensional input processing capabilities, and high prediction accuracy. By extracting deep features from historical time-series data, the model can achieve accurate predictions of future system states. In industrial waste gas treatment, the introduction of the Informer model helps to dynamically predict key process variables such as emission concentration and equipment load, providing a basis for control system adjustments. This enables intelligent and energy-saving management of the waste gas treatment process by optimizing energy consumption allocation and improving response rates.
[0203] Step S4-1-4: Set the initial parameters of the model. The specific parameter settings in this embodiment are shown in Table 5, resulting in the initial model:
[0204] Table 5 Initial Parameter Table
[0205]
[0206] Step S4-2: Input the training dataset into the preliminary model, select parameters for comparative experiments, optimize the model's prediction performance, and obtain the relatively best prediction model.
[0207] This embodiment considers that in actual waste gas treatment sites, due to the complexity of the treatment process, industrial waste gas needs to undergo multiple treatment procedures such as filtration, adsorption, cooling, desorption, and combustion before it can be discharged into the atmosphere in accordance with emission standards. Therefore, after the controller issues a control command, the actuators such as fans need a certain amount of time to execute the command. In the industrial site where the data was collected, this delay time is 5 minutes. Therefore, when using the Informer model for prediction, it is necessary to predict the waste gas emission concentration in the minute between the 5th and 6th minute in the future, that is, to use a delayed single-step prediction method, predicting one step every 5 minutes. Furthermore, in the collected data, the time interval between each data point is 1 minute. Therefore, a training dataset with a 1-minute time granularity is needed to predict the waste gas emission concentration in the minute 5 minutes in the future. Thus, the length of the prediction sequence needs to be set to 6. The strategy for adjusting the model hyperparameters is as follows:
[0208] First, adjust the hyperparameters related to model capacity and complexity: the hidden layer dimension, the number of heads in the multi-head attention mechanism, the number of encoder layers, the number of decoder layers, and the dimension of the feedforward neural network. Increasing these parameters can increase the model's capacity and expressive power, but may also increase the risk of overfitting. Therefore, appropriate values are selected using the mean squared error (MSE) prediction metric on the experimental test set. The specific values of the selected parameters are shown in Table 6.
[0209] Table 6 Model Capacity and Complexity Parameters
[0210]
[0211] Next, the length of the encoder's input sequence and the length of the decoder's start-label sequence need to be adjusted. A longer input sequence can capture longer-term time dependencies, but this may increase computation and memory requirements. A longer start-label sequence provides more contextual information, which helps the decoder better understand the input sequence and generate accurate prediction sequences, but this also leads to increased computation and memory requirements. Therefore, appropriate parameter values need to be selected by balancing the mean squared error (MSE) of predictions on the experimental test set with the time consumed by the prediction task. Specific values for the selected parameters are shown in Table 7.
[0212] Table 7 Encoder / Decoder Parameter Table
[0213]
[0214] Finally, the model's learning rate is adjusted. Since the choice of learning rate is influenced by other hyperparameters, an exponentially decaying adaptive learning rate approach is chosen. This controls the model's learning speed by reducing the learning rate after each epoch of training. The learning rate (lr) is calculated as follows:
[0215]
[0216] in, is the initial learning rate of the model, decay_factor is the decay factor, and t is the current epoch (iteration).
[0217] The appropriate decay factor is selected by observing the model's performance on the training and validation sets. If the model overfits on the training set, the decay factor can be appropriately reduced; if the model's performance on the training and validation sets does not change significantly, the decay factor can be appropriately increased. Specific values for the relevant parameters are shown in Table 8.
[0218] Table 8 Learning Rate Parameter Table
[0219]
[0220] Step S5: Based on the exhaust gas emission concentration prediction model, predict the future exhaust gas emission concentration of the dataset to be predicted.
[0221] As an example, after completing model training and parameter optimization, in order to verify the performance of the Informer model constructed in this invention in the task of predicting exhaust gas emission concentration, an index evaluation system based on the training set and validation set was designed, and the prediction accuracy, convergence ability and generalization performance of the model were systematically tested.
[0222] The model evaluation uses mean squared error (MSE) and root mean squared error (RMSE) as the main evaluation metrics.
[0223] Simultaneously, a loss function descent trend graph was used to observe the model's convergence characteristics. The validation set consisted of unseen samples under "normal operating conditions," simulating actual concentration change trends during operation. During model training, the average loss and validation error for each training round were recorded, and training curves were plotted, as shown below. Figure 6 As shown.
[0224] The results show that the model can quickly reduce the loss value in the early stage of training, and the validation error remains stable within a reasonable range in the later stage of training, indicating that the model has good fitting ability and generalization performance.
[0225] The dataset to be predicted is then input into the optimized relative-optimal model to predict the concentration of non-methane total hydrocarbons (dry) in the exhaust gas within the next 6 minutes. Specifically, this is achieved by plotting the comparison between the actual and predicted values of the model over 1000 consecutive time steps on the validation set, as shown in the figure. Figure 7 As shown, this is to further verify the predictive ability of the Informer model.
[0226] Depend on Figure 6 The model generally fits the changing trend of non-methane total hydrocarbon concentration quite well, especially during the stable or slowly changing concentration phases, where the predicted values highly overlap with the actual values with minimal error. The model also responds promptly to trend changes during the rising and plateau phases, demonstrating good time modeling capabilities. Overall, the prediction results show that the Informer model not only possesses good short-time fitting capabilities but can also track nonlinear fluctuation trends to a certain extent, demonstrating feasibility and stability for practical application in industrial waste gas concentration prediction tasks.
[0227] Example 2
[0228] In one or more embodiments, a waste gas emission concentration prediction system based on a time series prediction model is disclosed, specifically including:
[0229] The data acquisition module is configured to collect historical exhaust gas emission monitoring data.
[0230] The data processing module is configured to: classify the monitoring data into working conditions using a method combining multi-feature rules and unsupervised clustering to obtain a preliminary dataset and working condition classification results;
[0231] The feature construction model is configured to: preprocess the preliminary dataset and introduce a multivariate time series modeling mechanism to construct a multivariate vector sequence; and perform feature importance analysis based on the working condition classification results and the multivariate vector sequence to obtain time series structured data.
[0232] The model building module is configured to: build a time series prediction model based on a probabilistic sparse multi-head attention mechanism, and train the time series prediction model using the time series structure data to obtain a waste gas emission concentration prediction model.
[0233] The concentration prediction module is configured to predict the future emission concentration of exhaust gas based on the exhaust gas emission concentration prediction model for the dataset to be predicted.
[0234] Example 3
[0235] This embodiment provides an electronic device, including a memory and a processor, as well as computer instructions stored in the memory and running on the processor. When the computer instructions are executed by the processor, they complete the steps of the above-described method for predicting exhaust gas emission concentration based on a time series prediction model.
[0236] Example 4
[0237] This embodiment provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, complete the steps of the above-described method for predicting exhaust gas emission concentration based on a time series prediction model.
[0238] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0239] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1The function specified in one or more boxes.
[0240] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment, whereby a series of operational steps are performed to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0241] The descriptions of each embodiment in the above embodiments have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0242] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for predicting exhaust gas emission concentration based on a time series prediction model, characterized in that, include: Collect historical exhaust gas emission monitoring data; The monitoring data was subjected to a combination of multi-feature rule-based and unsupervised clustering methods to classify the operating conditions, resulting in a preliminary dataset and operating condition classification results. The preliminary dataset is preprocessed and a multivariate time series modeling mechanism is introduced to construct a multivariate vector sequence. Based on the working condition classification results and the multivariate vector sequence, feature importance analysis is performed to obtain time series structured data. A time series prediction model based on a probabilistic sparse multi-head attention mechanism is constructed, and the time series prediction model is trained using the time series structured data to obtain a waste gas emission concentration prediction model. Based on the aforementioned exhaust gas emission concentration prediction model, the future exhaust gas emission concentration is predicted from the dataset to be predicted. The initial dataset is preprocessed and a multivariate time series modeling mechanism is introduced to construct a multivariate vector sequence, specifically as follows: The initial dataset undergoes standardization and preprocessing for constructing sliding window samples; The constructed sliding window samples are subjected to multivariate time series modeling to combine and expand the dimensions of multiple variables. Specifically, the preprocessed sliding window sample data is aligned with unified timestamps and constructed into a multivariate vector sequence. The data at each time point is represented in n-dimensional vector form, and then combined using a sliding window approach. The input tensor; The construction of the time series prediction model based on the probabilistic sparse multi-head attention mechanism includes: A positional encoding method based on sine-cosine functions is used at the input end to provide sequence order information; after the positional encoding is constructed, it is added to the input features to obtain the input sequence. The input sequence is fed into the encoder, and a connected feature map is generated by a probabilistically sparse multi-head attention module and a self-attention distillation module as the hidden representation of the encoder. This map, along with a long sequence with zero placeholders from the target sequence, is then fed into the decoder. The decoder has two layers. The first layer performs masked multi-head probabilistic sparse self-attention calculation on the input of the decoder. The masked multi-head attention sets the mask dot product to negative infinity. The second layer performs another multi-head attention calculation on the result of the first layer and the feature map output by the decoder. Finally, the final output is obtained through a fully connected layer.
2. The method for predicting exhaust gas emission concentration based on a time series prediction model as described in claim 1, characterized in that, The method for classifying working conditions using a combination of multi-feature rules and unsupervised clustering is as follows: A preliminary classification based on multi-feature rules is performed on the collected historical exhaust gas emission monitoring data; The preliminary classification results are then subjected to auxiliary classification, which includes feature selection, data cleaning, and KMeans clustering of the data after preliminary classification. The preliminary dataset is obtained after data cleaning, and the working condition classification results are obtained after clustering.
3. The method for predicting exhaust gas emission concentration based on a time series prediction model as described in claim 1, characterized in that, The multivariate representation is as follows: Where n represents the number of input variables, , ... It represents a series of time-series data collected by the sensor.
4. The method for predicting exhaust gas emission concentration based on a time series prediction model as described in claim 1, characterized in that, Based on the work condition classification results and multivariate vector sequences, feature importance analysis is performed to obtain time series structured data. Specifically, the multivariate vector sequences classified as normal work conditions are input into a random forest regression model for training. The random forest model is composed of multiple decision trees. During the model training phase, each tree randomly extracts feature dimensions from the multivariate vector sequences and independently generates classification or regression results based on these dimensions. After calculating the importance scores of all features using Gini importance, the feature importance matrix is obtained; Time series structured data are obtained by filtering features based on the importance matrix.
5. The method for predicting exhaust gas emission concentration based on a time series prediction model as described in claim 4, characterized in that, The feature selection based on the importance matrix is specifically as follows: in, G represents the Gini importance score corresponding to the i-th feature. max The feature with the highest Gini importance score among all features is represented by F(x), where F(x) is the feature selection function and k is the feature selection threshold.
6. A waste gas emission concentration prediction system based on a time series prediction model, characterized in that, include: The data acquisition module is configured to collect historical exhaust gas emission monitoring data. The data processing module is configured to: classify the monitoring data into working conditions using a method combining multi-feature rules and unsupervised clustering to obtain a preliminary dataset and working condition classification results; The feature construction model is configured to: preprocess the preliminary dataset and introduce a multivariate time series modeling mechanism to construct a multivariate vector sequence; and perform feature importance analysis based on the working condition classification results and the multivariate vector sequence to obtain time series structured data. The model building module is configured to: build a time series prediction model based on a probabilistic sparse multi-head attention mechanism, and train the time series prediction model using the time series structure data to obtain a waste gas emission concentration prediction model. The concentration prediction module is configured to predict the future emission concentration of exhaust gas based on the exhaust gas emission concentration prediction model for the dataset to be predicted. The initial dataset is preprocessed and a multivariate time series modeling mechanism is introduced to construct a multivariate vector sequence, specifically as follows: The initial dataset undergoes standardization and preprocessing for constructing sliding window samples; The constructed sliding window samples are subjected to multivariate time series modeling to combine and expand the dimensions of multiple variables. Specifically, the preprocessed sliding window sample data is aligned with unified timestamps and constructed into a multivariate vector sequence. The data at each time point is represented in n-dimensional vector form, and then combined using a sliding window approach. The input tensor; The construction of the time series prediction model based on the probabilistic sparse multi-head attention mechanism includes: A positional encoding method based on sine-cosine functions is used at the input end to provide sequence order information; after the positional encoding is constructed, it is added to the input features to obtain the input sequence. The input sequence is fed into the encoder, and a connected feature map is generated by a probabilistically sparse multi-head attention module and a self-attention distillation module as the hidden representation of the encoder. This map, along with a long sequence with zero placeholders from the target sequence, is then fed into the decoder. The decoder has two layers. The first layer performs masked multi-head probabilistic sparse self-attention calculation on the input of the decoder. The masked multi-head attention sets the mask dot product to negative infinity. The second layer performs another multi-head attention calculation on the result of the first layer and the feature map output by the decoder. Finally, the final output is obtained through a fully connected layer.
7. An electronic device, characterized in that, It includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, which, when executed by the processor, perform the exhaust gas emission concentration prediction method based on the time series prediction model as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, Used to store computer instructions, which, when executed by a processor, complete the waste gas emission concentration prediction method based on a time series prediction model as described in any one of claims 1-5.