A key indicator modeling method for catalytic cracking units integrating time series feature extraction

By integrating the method of time series feature extraction and multi-layer coding modules, the accuracy and practicality issues of yield prediction of catalytic cracking units under different operating modes are solved, and more accurate and stable product yield prediction is achieved.

CN115188429BActive Publication Date: 2025-10-03EAST CHINA UNIV OF SCI & TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202210890593.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-27
Publication Date
2025-10-03
Estimated Expiration
2042-07-27

AI Technical Summary

Technical Problem

In the prior art, the data model of the catalytic cracking unit has poor accuracy and practicality in yield prediction under different operating modes, making it difficult to effectively apply it to industrial-scale FCC riser reactor modeling.

Method used

A method of fusion time series feature extraction was adopted to screen key feature variables through random forest and principal component analysis. A multi-layer encoding module was constructed and the attention mechanism and feedforward neural network were used to predict product yield. The model hyperparameters were adjusted to improve the prediction accuracy.

Benefits of technology

The prediction accuracy and stability of the product yield of the catalytic cracking unit have been improved to meet the industrial application needs under different operating modes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115188429B_ABST
    Figure CN115188429B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of key parameter prediction in petrochemical production processes, and more specifically, to a method for modeling key indicators of catalytic cracking units that integrates time series feature extraction. The method comprises: step S1, obtaining catalytic unit production data for preprocessing; step S2, screening input feature variables using a random forest method to generate sample data; step S3, dividing the sample data into different operating modes based on a principal component analysis method to form a plurality of corresponding sub-mode samples; step S4, integrating relative position encoding to obtain encoded input information under each sub-mode; step S5, constructing a multi-layer encoding module based on an attention mechanism and a feedforward neural network, and transforming the output of the multi-layer encoding module into product yield data; step S6, adjusting some model structure hyperparameters to generate a prediction model, predict the product yield, and process the output data. The catalytic unit data model generated by the present invention can improve the prediction accuracy and stability of product yield.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of key parameter prediction in petrochemical production processes, and more specifically to a method and device for modeling key indicators and predicting product yields of a catalytic cracking unit by integrating multi-mode production data time series feature extraction. Background Art

[0002] Fluid catalytic cracking (FCC) for producing gasoline, liquefied petroleum gas (LPG) and intermediate distillates is one of the key technologies of many oil refining companies today and accounts for a considerable proportion of profits.

[0003] The catalytic cracking products obtained through the catalytic cracking process (FCC) are the main transportation fuel. Therefore, the catalytic cracking process is one of the important means to lighten heavy oil in petroleum refining. Its process generally includes hydrocarbon oil as feed, entering the riser reactor, and after being preheated at the bottom, it comes into contact with the high-temperature catalyst flow in the regenerator, and flows upward together through the riser flow. The feed absorbs the heat provided by the high-temperature catalyst and turns into hydrocarbon vapor and decomposes into smaller molecules. The cracked hydrocarbon vapor enters the distillation tower for further separation, and the spent catalyst is steam stripped to remove the remaining hydrocarbons and then sent to the regenerator for regeneration through air combustion. The heated and regenerated catalyst refluxes into the riser reactor and acts as a heat carrier, starting a new cracking cycle.

[0004] The FCC process, accompanied by complex chemical reactions and phase transitions, is a very large and complex industrial system characterized by multiple variables, strong interference, large hysteresis, and strong coupling. It is influenced not only by feed flow rate, feed structure, and catalyst properties, but also by environmental factors and operating conditions. Detailed modeling of the FCC riser reactor is a challenging task. Currently, the mainstream modeling approach for FCC riser reactors is the lumped kinetics method. However, studying the reaction mechanism requires significant manpower and material resources, requires a high level of chemical engineering knowledge, and the model's kinetic parameters must account for the influence of unit factors when applied to industrial units, resulting in poor model extrapolation. Mechanistic models composed of algebraic equations, differential equations, and partial differential equations are complex, requiring extensive computation and analysis for optimization and control applications. These models are difficult to apply to industrial-scale FCC riser reactor modeling and pose challenges in solving practical problems. Summary of the Invention

[0005] The purpose of the present invention is to provide a method and device for modeling key indicators of a catalytic cracking unit by integrating time series feature extraction, so as to solve the problem that the existing FCC unit data model has poor accuracy and practicality in predicting yields under different operating modes.

[0006] To achieve the above object, the present invention provides a method for modeling key indicators of a catalytic cracking unit by integrating time series feature extraction, comprising the following steps:

[0007] Step S1, obtaining production data of the catalytic device, and preprocessing the obtained data to obtain input characteristic variables;

[0008] Step S2: Based on the data characteristics of the catalytic cracking unit, the input feature variables are screened by the random forest method to obtain feature variables significantly correlated with the product yield, and generate sample data;

[0009] Step S3: Divide the sample data into different operation modes based on the principal component analysis method, and perform mode classification on the samples when building the model to form multiple corresponding sub-mode samples;

[0010] Step S4: Divide each sub-mode sample into a training sample subset, a verification sample subset, and a test sample subset, and fuse the relative position coding to obtain the coding input information under each sub-mode;

[0011] Step S5: constructing a multi-layer encoding module based on the attention mechanism and the feedforward neural network, and transforming the output of the multi-layer encoding module into product yield data using a linear network layer;

[0012] Step S6: In each sub-mode, feature fusion is performed on the input and output relationship, with the goal of minimizing the mean square error of the prediction result, and some model structure hyperparameters are adjusted to generate a prediction model, predict the product yield and process the output data.

[0013] In one embodiment, in step S1, the production data of the catalytic device includes operating variables, raw material and catalyst properties, and product output;

[0014] The preprocessing method includes outlier data deletion, mean filling and normalization.

[0015] In one embodiment, the pre-processing step of step S1 further includes:

[0016] Step S11: determine whether there is missing data in a sample. If so, the sample will be removed from the data set.

[0017] Step S12: Calculate the product yield as follows:

[0018]

[0019] Step S13, removing variable data irrelevant to the predicted product yield from the data set;

[0020] Step S14: using the 3Sigma criterion to remove data with severe measurement errors;

[0021] Step S15: Use a sliding average method with a time window of 24 hours to filter out measurement noise.

[0022] In one embodiment, step S2 further includes:

[0023] Step S21: performing random sampling with replacement from the catalytic cracking unit data set to form a sample subset;

[0024] Step S22: Randomly extract a subset of feature variables from the sampled samples as input for training a decision tree to construct a decision tree;

[0025] Step S23: repeatedly construct multiple decision trees under the double random sampling condition to form a random forest;

[0026] Step S24: Calculate the average of the absolute values ​​of the SHAP values ​​of the individual feature variables as the importance score of the feature, and obtain the top R feature variables ranked by importance score as the variable combination after feature screening.

[0027] In one embodiment, step S3 further includes:

[0028] Step S31: Projecting the sample data in the dataset onto the principal components through principal component analysis, and analyzing the different operation modes represented by the samples based on their distribution on the principal component score projection graph;

[0029] Step S32: Different operation modes are divided according to the Euclidean distance between samples in the score graph. By setting appropriate thresholds, samples representing different operation modes are classified during the model construction and training process to form corresponding multiple sub-modes.

[0030] In one embodiment, the step S4 further includes:

[0031] Step S41: Divide the samples of each sub-mode into training samples, verification samples and test samples, which are used for training the model, monitoring the training process and testing the model performance process respectively;

[0032] Step S42: Calculate the relative position vector encoding with the same dimension as the feature variable by using the frequency-variable sine and cosine functions. The feature variable dimension is recorded as model_dim;

[0033] Step S43: Encode the relative position It is fused and added with the feature variables in each dimension as the encoded input information.

[0034] In one embodiment, the relative position vector encoding in step S42 is The corresponding calculation formula is:

[0035]

[0036] in, is the current input position vector;

[0037] t represents the position of the current input in the sequence;

[0038] i represents the dimension number and

[0039] In one embodiment, the step S5 further includes:

[0040] Step S51: The encoded input information after the relative position encoding is integrated is used as the input of the self-attention layer, and step S52 is performed to calculate the self-attention score;

[0041] Step S52: Perform matrix operations on the encoded input information and the self-attention layer weight matrix to obtain the query vector matrix, the key vector matrix, and the value vector matrix. Calculate the similarity by multiplying the query vector matrix by the transpose of the key vector matrix, scale the calculation results, convert each score vector into a probability distribution matrix, and perform matrix multiplication of the probability distribution matrix of the score with the value vector matrix to obtain the output of the self-attention layer.

[0042] Step S53: The calculation result Z of the self-attention layer is sent to the normalization layer for residual connection and normalization operation;

[0043] Step S54: the output result N of the normalization layer is sent to the feedforward neural network layer;

[0044] Step S55: The output result F of the feedforward neural network layer enters the normalization layer again, completing the residual connection and normalization of the input result N and the output result F of the feedforward neural network layer, and randomly discarding some neurons as the output M of the single-layer encoding module;

[0045] Step S56: Set a multi-layer encoding module that integrates an attention layer, a normalization layer, and a feedforward neural network layer. Use the output M of the single-layer encoding module in step S55 as the input information of the top-layer encoding module, the output of the previous layer encoding module as the input information of the next layer encoding module, and the output of the last single-layer encoding module is sent to the linear network layer.

[0046] Step S57: Use a linear network layer to transform the output data of the multi-layer encoding module that integrates the attention mechanism and the feedforward neural network into product yield data.

[0047] In one embodiment, the step S52 further includes:

[0048] For input information, when calculating in the self-attention layer, the encoded input information is equally divided according to the set number of parallel attention heads;

[0049] Use multiple sets of attention weight matrices to obtain multiple sets of query vector matrices, key vector matrices, and value vector matrices;

[0050] Each set of query vector matrix, key vector matrix and value vector matrix is ​​calculated separately to obtain a single-head output matrix z;

[0051] All the single-head output matrices z are concatenated to obtain the output matrix Z of the multi-head self-attention.

[0052] In one embodiment, the model structure hyperparameters of step S6 further include:

[0053] Number of encoding module layers, number of multi-head attention heads, model width, number of hidden neurons in the feedforward network, number of iterations, output dimension, random dropout parameters, and learning rate.

[0054] In one embodiment, in step S6, adjusting some model structure hyperparameters by a continuous halving method further includes:

[0055] Select some model structure hyperparameters;

[0056] For the hyperparameter combinations consisting of different values ​​of the selected hyperparameters, a preset number of samples are used for training. The relatively better hyperparameter combinations in the training results are selected and a larger number of samples are allocated for the next round of training.

[0057] Repeat the above training process until the last set of hyperparameter combinations remains or the remaining samples are insufficient for the next training iteration;

[0058] The best performing parameter combination is selected as the actual model parameters.

[0059] In order to achieve the above object, the present invention provides a device for predicting the yield of catalytic cracking products, comprising:

[0060] a memory for storing instructions executable by the processor;

[0061] A processor is configured to execute the instructions to implement any of the methods described above.

[0062] In order to achieve the above object, the present invention provides a computer-readable medium having computer instructions stored thereon, wherein when the computer instructions are executed by a processor, any of the above methods is executed.

[0063] The present invention provides a method and device for modeling key indicators of a catalytic cracking unit that integrates time series feature extraction. Different operating modes are divided according to the sample distribution in the PCA principal component score diagram, and sub-models under different operating modes are constructed. At the same time, different information in the input is paid attention to. The final generated catalytic unit data model improves the prediction accuracy and stability of product yield. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] The above and other features, properties and advantages of the present invention will become more apparent through the following description in conjunction with the accompanying drawings and embodiments, in which like reference numerals represent like features throughout, wherein:

[0065] Figure 1 A flow chart of a method for modeling key indicators of a catalytic cracking unit by integrating time series feature extraction according to an embodiment of the present invention is disclosed.

[0066] Figure 2 A schematic diagram of the top 25 characteristic variables that have a greater impact on product yield, screened according to one embodiment of the present invention, is disclosed;

[0067] Figure 3 A PCA score plot of input variables according to an embodiment of the present invention is disclosed;

[0068] Figure 4 A PCA score plot of input and output variables according to an embodiment of the present invention is disclosed;

[0069] Figure 5 A schematic diagram of the structure of the self-attention mechanism / multi-head self-attention of the encoding module according to one embodiment of the present invention is disclosed;

[0070] Figure 6 A framework diagram of a random forest-PCA-self-attention-feedforward neural network model according to an embodiment of the present invention is disclosed;

[0071] Figure 7 A schematic diagram of the distribution of training sample points and actual value points of three products according to an embodiment of the present invention is disclosed;

[0072] Figure 8 A schematic diagram of the error distribution between training sample points and actual value points of three products according to an embodiment of the present invention is disclosed;

[0073] Figure 9 A schematic diagram of the distribution of predicted sample points and actual value points of three products by a model according to an embodiment of the present invention is disclosed;

[0074] Figure 10 A schematic diagram of the error distribution between the predicted sample points and the actual value points of three products by a model according to an embodiment of the present invention is disclosed;

[0075] Figure 11 A principle block diagram of a key indicator modeling device for a catalytic cracking unit integrating time series feature extraction according to an embodiment of the present invention is disclosed. DETAILED DESCRIPTION

[0076] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the invention and are not intended to limit the invention.

[0077] Data-driven models can solve the dilemma of mechanism models to a certain extent. They do not need to explain the internal mechanisms of the system from a mechanism perspective, but instead choose to identify a selected type of model and system parameters through historical data, thereby simplifying the modeling process.

[0078] However, industrial-grade FCC process data is generally complex, redundant, and high-dimensional, and production data is greatly affected by the product market, which causes FCC units to produce a variety of different operating modes, and their actual operating conditions are even more complex.

[0079] How to reasonably and effectively screen characteristic variables with significant importance from historical production data, analyze the different operating modes of FCC units based on process data, and fully explore the correlation relationships in actual production time series data is a hot topic in current data-driven modeling research. The identification and tuning process of data model parameters also has a great impact on the accuracy and practicality of the model.

[0080] Figure 1 A flow chart of a method for modeling key indicators of a catalytic cracking unit by integrating time series feature extraction according to an embodiment of the present invention is disclosed. Figure 1 As shown, the method for modeling key indicators of a catalytic cracking unit by integrating time series feature extraction proposed in the present invention includes the following steps:

[0081] Step S1, obtaining production data of the catalytic device, and preprocessing the obtained data to obtain input characteristic variables;

[0082] Step S2: Based on the data characteristics of the catalytic cracking unit, the input feature variables are screened by the random forest method to obtain feature variables significantly correlated with the product yield, and generate sample data;

[0083] Step S3: Divide the sample data into different operation modes based on the principal component analysis method, and perform mode classification on the samples when building the model to form multiple corresponding sub-mode samples;

[0084] Step S4: Divide each sub-mode sample into a training sample subset, a verification sample subset, and a test sample subset, and fuse the relative position coding to obtain the coding input information under each sub-mode;

[0085] Step S5: constructing a multi-layer encoding module based on the attention mechanism and the feedforward neural network, and transforming the output of the multi-layer encoding module into product yield data using a linear network layer;

[0086] Step S6: In each sub-mode, feature fusion is performed on the input and output relationship, with the goal of minimizing the mean square error of the prediction result, and some model structure hyperparameters are adjusted to generate a prediction model, predict the product yield and process the output data.

[0087] The following combination Figure 1 , the above steps of the present invention will be described in detail. It should be understood that within the scope of the present invention, the above-mentioned technical features of the present invention and the technical features specifically described below (such as in the embodiments) can be combined with each other and interrelated to form a preferred technical solution.

[0088] Step S1: Acquire production data of a catalytic device, and preprocess the acquired data to obtain input characteristic variables.

[0089] The data collected by this method almost covers a complete operating cycle of the catalytic cracking unit, so the collected data can well represent the operating characteristics of the catalytic cracking unit.

[0090] Specifically, the data information of the catalytic cracking process includes input variables and output yields.

[0091] Furthermore, catalytic unit production data includes operating variables, feedstock and catalyst properties, product output, etc.

[0092] The preprocessing methods of the data information include noise, gap filling, outlier removal and standardization preprocessing;

[0093] Furthermore, preprocessing includes removing outlier data, filling the mean, and normalizing.

[0094] Since these variables have different physical meanings and orders of magnitude, they need to be normalized before being used directly for model training.

[0095] In this embodiment, all variables in the training sample are normalized to the interval [0, 1] according to the normalization formula:

[0096]

[0097] Among them, x min is the minimum value, x maxis the maximum value, x is the variable before normalization, and X is the variable after normalization.

[0098] During the model testing phase, the input variables in the test sample are normalized, and the output variables given by the model are denormalized according to the denormalization formula:

[0099] x=X×(x max -x min )+x min .

[0100] Specifically, the preprocessing step of step S1 further includes:

[0101] Step S11: Determine whether there is missing data in a sample. If there is missing data in a sample, the sample will be removed from the data set to eliminate the impact of abnormal data caused by device shutdown or network technology failure in the catalytic cracking process on the training results;

[0102] Step S12: Calculate the product yield as follows:

[0103]

[0104] Step S13: After calculating the product yield, remove variable data irrelevant to the predicted product yield, such as the relative density of the gas product and the product flow rate, from the data set to improve the training efficiency of the model;

[0105] Step S14: using the 3Sigma criterion to remove data with severe measurement errors (outliers);

[0106] Step S15: Use a sliding average method with a time window of 24 hours to filter out measurement noise.

[0107] It should be noted that the above data preprocessing steps are the entire process of data preprocessing, and from step S11 to step S15, the operations of data cleaning, product yield calculation, screening out redundant variables, and filtering out noise signals are completed in sequence.

[0108] Step S2: Based on the data characteristics of the catalytic cracking unit, the input feature variables are screened by the random forest method to obtain feature variables significantly correlated with the product yield, and generate sample data;

[0109] It can be understood that random forest is an ensemble learning method, which refers to an algorithm that integrates multiple decision trees through the idea of ​​ensemble learning. It can process input samples with high-dimensional features and can evaluate the importance of each feature in classification problems.

[0110] The basic building unit of a random forest is a decision tree, and each basic unit is independent of the others. A decision tree is a tree structure where each internal node represents a test on an attribute, each branch represents a test output, and each leaf node represents a class.

[0111] Suppose the size of the training set is N. For each tree, randomly and with replacement, n (n < N) training samples are drawn from the training set as the training set for that tree.

[0112] For the drawn samples, randomly select m (m < M, where M is the total number of features) features to form a feature subset as the input for training the decision tree, and construct the decision tree. Each time the tree is split, select the best one from these m features; each tree grows to the maximum extent and there is no pruning process.

[0113] Under the double random sampling, repeat the construction of multiple decision trees to form a random forest.

[0114] Feature screening through a random forest can enable the model to more effectively screen out redundant high-dimensional features for catalytic cracking data, extract robust feature variables that have a significant impact on product yield, and improve the generalization ability of the model.

[0115] Furthermore, step S2 further includes the following steps:

[0116] Step S21: Randomly sample with replacement from the catalytic cracking unit dataset to form a sample subset.

[0117] Step S22: For the sampled samples, randomly select a subset of feature variables as the input for training the decision tree and construct the decision tree.

[0118] Step S23: Under the condition of double random sampling, repeat the construction of multiple decision trees to form a random forest.

[0119] Based on the preprocessed dataset, randomly divide the training set and test set for feature screening. Under the conditions of sample random sampling and feature random sampling, set the number of decision trees, the minimum number of samples for tree splitting, the minimum gain, the maximum depth of the tree, and the sizes of the sampled sample subset and feature subset, train the decision tree, and construct a random forest.

[0120] Step S24: Calculate the average value of the absolute values of the SHAP values of individual feature variables as the importance score of the feature, and obtain the top 20 feature variables with higher importance scores as the variable combination X after feature screening.

[0121] Construct a model interpreter and interpret the model through SHAP value calculation.

[0122] SHAP (Shapley Additive explanations) is a method for measuring feature importance based on game theory. It is similar to the summation method of linear models. It assumes that the model benchmark score (usually the mean of the target variable of all samples) is y base , the i-th sample is x i , the jth feature of the i-th sample is x i,j , the SHAP value of this feature is f(x i,1 ), the model's predicted value for the sample is:

[0123] y i =y base +f(x i,1 )+f(x i,1 )+···+f(x i,k ).

[0124] The SHAP value not only gives the size of the feature influence, but also reflects the positive and negative influence of the feature in each sample. Here, the impact on the final model is judged based on the average value of the absolute value of the SHAP value of each feature variable (mean(|SHAP Value|)), and robust feature variables with significant impact on product yield are screened out.

[0125] The first R feature variables ranked by importance score are taken as the variable combination after feature screening. In this embodiment, R=20.

[0126] Step S3: Divide the sample data into different operation modes based on the principal component analysis method, and perform mode classification on the samples when building the model to form multiple corresponding sub-mode samples;

[0127] The model accuracy can be improved by dividing different operation modes according to the sample distribution in the principal component score diagram of principal component analysis (PCA) and constructing sub-models under different operation modes.

[0128] Furthermore, the step S3 further includes the following steps:

[0129] Step S31: Project the sample data in the data set onto the PCA principal components using the PCA dimensionality reduction method, and analyze the different operation modes represented by the samples based on their distribution on the principal component score (projection) graph;

[0130] Generally, the closer the distance between two samples in the score graph, the more similar the operation modes they represent, while two samples that are far apart may represent different operation modes;

[0131] Step S32: Different operation modes are divided according to the Euclidean distance between samples in the score graph. By setting appropriate thresholds, samples representing different operation modes are classified during the model construction and training process to form corresponding multiple sub-modes.

[0132] Step S4: Divide each sub-mode sample into a training sample subset, a verification sample subset and a test sample subset, fuse the relative position coding, and obtain the coding input information under each sub-mode.

[0133] Fusion position encoding can help the model acquire the ability to learn sequence information and enhance encoding input. Furthermore, step S4 further includes the following steps:

[0134] Step S41: Divide the samples of each sub-mode into training samples, verification samples and test samples, which are used for training the model, monitoring the training process and testing the model performance process respectively;

[0135] Step S42: Calculate the relative position vector encoding with the same dimension as the feature variable (denoted as model_dim) by the frequency-variable sine and cosine function.

[0136] Relative position vector encoding The corresponding calculation formula is:

[0137]

[0138] in, is the current input position vector;

[0139] t represents the position of the current input in the sequence;

[0140] i represents the dimension number and

[0141] In the position vector, odd bits are encoded using the cosine function (cos) and even bits are encoded using the sine function (sin);

[0142] Due to the linear transformation relationship between the sine and cosine functions, calculating the relative position encoding can more conveniently help the model discover the relative position information between two positions, and enhance the encoding input by fusing sequence information learning before entering the attention layer calculation.

[0143] Step S43: Encode the relative position obtained The fusion and addition of the feature variables in each dimension are used as the encoding input information, that is, the encoding input information is:

[0144] It should be noted that the relative position encoding has the same dimension as the filtered feature variable and is fed into the model at the same time after being added and fused with the feature variable, thus enabling efficient parallel calculation.

[0145] When the two are merged, they are not spliced ​​together, avoiding the increase in computational complexity caused by the expansion of dimensions. Instead, they are directly added in each dimension, which can be more efficient in subsequent attention layer calculations. In addition, due to the existence of residual connections, the position encoding information does not disappear.

[0146] Step S5: construct a multi-layer encoding module based on the attention mechanism and the feedforward neural network, and use a linear network layer to transform the output of the multi-layer encoding module into product yield data.

[0147] Constructing an encoding module that integrates a multi-head self-attention mechanism and a feedforward neural network enhances the parallelism of model calculations, while paying attention to different information in the input and improving prediction accuracy.

[0148] It is understandable that the self-attention mechanism is a type of attention mechanism. The attention mechanism imitates the human visual mechanism and proposes that when processing data, the model should also focus on specific parts as needed, just like the human brain, without having to pay attention to the overall idea.

[0149] Self-attention is a type of internal attention that does not require additional information. It can explore the associations between information at different positions in a single sequence, thereby calculating the mutual information of the sequence. That is, by utilizing the relationships between input items, it can independently decide the weights of the input items.

[0150] Self-attention is widely used in processing long sequence data. It can represent serialized data as vectors, integrate position information into elements, and obtain a representation vector that comprehensively considers the overall situation. Self-attention calculation is often implemented through the QKV (Query-Key-Value) model, that is, QKV comes from the same input.

[0151] Given the high-dimensional and complex characteristics of catalytic cracking data, the use of the self-attention mechanism can more appropriately extract the correlation information between feature variables and improve computational parallelism.

[0152] In this embodiment, step S5 further includes the following steps:

[0153] Step S51: The encoded input information after the relative position encoding is integrated is used as the input of the self-attention layer, and step S52 is performed to calculate the self-attention score Attention;

[0154] Step S52: Perform matrix operations on the encoded input information and the self-attention layer weight matrix to obtain the query vector matrix, key vector matrix and value vector matrix. Calculate the similarity by multiplying the query vector matrix by the transpose of the key vector matrix, scale the calculation results, convert each score vector into a probability distribution matrix, and perform matrix multiplication of the score probability distribution matrix with the value vector matrix to obtain the output of the self-attention layer.

[0155] The self-attention layer performs self-attention calculation and combines the encoded input information X' with the self-attention layer weight matrix W q 、W k 、W v After matrix operations, we get the query vector matrix Query(Q), key vector matrix Key(K), and value vector matrix Value(V) required to calculate the Attention(A) value, that is, Q=X'·W q ; K = X'·W k ; V = X'·W v .

[0156] The similarity is calculated by multiplying the transpose of the query vector matrix Query and the key vector matrix Key, and the calculation result is scaled. Each score vector is converted into a probability distribution matrix A between [0, 1] through the softmax function. The corresponding expression is:

[0157]

[0158] The output of the self-attention layer is obtained by matrix multiplying the probability distribution matrix A of the score with the value vector matrix V:

[0159]

[0160] Among them, model_dim is the dimension of encoding input information, that is, the model width;

[0161] W q 、W k 、W v Can be learned through training.

[0162] Furthermore, the calculation in the self-attention layer is performed by multi-head parallel calculation, and the step S52 further includes:

[0163] For the model input information X', when calculating in the self-attention layer, the encoded input information is first divided equally according to the set number of parallel attention heads (num_heads);

[0164] Use multiple sets of attention weight matrices W q 、W k 、Wv Obtain multiple sets of query vector matrices Query, key vector matrices Key, and value vector matrices Value, that is, perform self-attention calculations based on separate Query, Key, and Value in different attention heads;

[0165] Each set of Query, Key, and Value can be calculated separately to obtain a single-head output matrix z;

[0166] All the single-head output matrices z are concatenated to obtain the output Z of the multi-head self-attention, that is, Z = cat(z1,z2,...,z num_heads ) and serves as the input to the normalization layer (Norm).

[0167] It is worth noting that the output Z of the multi-head attention calculation has the same dimension as the encoded input information X'.

[0168] Step S53: The calculation result Z of the attention layer is sent to the normalization layer (Norm) for residual connection and normalization operation;

[0169] The normalization layer (Norm) performs residual connection and normalization operations, including:

[0170] Step S531: The input X′ of the attention layer is used as a residual block and added to the output of the layer as the output of the residual connection: Z+X′;

[0171] Step S532: normalize the result after residual connection (layer normalization), that is, normalize different neurons in the same sample and randomly discard some neurons in the normalized result. The output of the normalization layer is:

[0172] N = layerNorm(Z+X');

[0173] The residual connection and normalization of the normalization layer in the encoding module can speed up training, ensure stable training gradients, and improve the stability of the model.

[0174] Step S54: The output N of the normalization layer is fed into the feed-forward neural network layer (FFN).

[0175] The Feed Forward Neural Network (FFN) layer first maps the output N of the normalization layer to a high-dimensional space through a two-layer fully connected network, and then filters it using the nonlinear activation function Relu(). After filtering, it is mapped to the original dimensional space. The output result is:

[0176] F=FFN(N)=max(0,NW1+b1)W2+b2,

[0177] Among them, W1, b1 and W2, b2 are the weight parameters of the two-layer fully connected network respectively;

[0178] In step S55, the output F of the feedforward neural network layer enters a normalization layer (Norm) again to complete the residual connection and normalization of the input N and the output F. After randomly discarding some neurons, it is used as the output M of the single-layer encoding module, that is:

[0179] M = layerNorm(N+F).

[0180] It is worth noting that the output result M of the single-layer encoding module has the same dimension as the encoded input information.

[0181] It should be noted that the role of residual connection is to solve the problem of network degradation in deep learning networks. It means that when the model is not overfitting, the performance of the network model may gradually tend to saturation and then decline rapidly with the increase of depth. The method of using residual connection is to add the input of the self-attention layer and the feedforward network layer as residual blocks to the output of the layer respectively, so that the next layer of the network does not only use the output of the previous layer as input, which is conducive to reducing information loss in the process of increasing the number of network layers and preventing network degradation.

[0182] Common methods for layer normalization include BatchNorm and LayerNorm. LayerNorm is used here to normalize different neurons in the same sample, that is, to normalize in the feature dimension.

[0183] BatchNorm normalizes the dimensions of batch samples, which means normalizing each feature within a batch of samples. It is affected by the batch size of the samples and the amount of computation needs to be considered. BatchNorm does not consider the size relationship between different features, but retains the size relationship between different samples.

[0184] LayerNorm normalizes the feature dimension, which means normalizing all features of each sample. That is, it normalizes according to the number of features of the sample, without considering the size relationship between different samples, and retains the size relationship between different features within a sample; it does not depend on the batch size.

[0185] A mean and variance are generated for each batch. For the catalytic cracking data used for training, layerNrom is performed on each batch. There is no need to track the mean and variance of each batch, and the effect is better than BatchNorm.

[0186] Dropout is a regularization method in which the outputs of certain neurons in a network are randomly discarded during training; however, during testing, the outputs of all neurons are included in the network. Applying dropout prevents the network from becoming overly dependent on certain neurons. This method uses dropout in both normalization layers in each encoding module.

[0187] Step S56: Set a multi-layer encoding module that integrates an attention layer, a normalization layer, and a feedforward neural network layer. Use the output M of the single-layer encoding module in step S55 as the input information of the top-layer encoding module, and the output of the previous-layer encoding module as the input information of the next-layer encoding module. Stacking multiple layers of modules can strengthen the contextual relationship between input features and improve the compression efficiency of encoding. The output of the last single-layer encoding module is sent to the linear network layer and converted into product yield data.

[0188] The structure of the single-layer encoding module is: Attention-Norm-FFN-Norm. The output of the last layer of the encoding module is fed into a linear network layer and transformed into product yield data.

[0189] Each layer of encoding module consists of a self-attention layer, a normalization layer, and a feedforward neural network layer. The output of the encoding module of the previous layer serves as the input information of the encoding module of the next layer, and the output of the encoding module of the last layer serves as the input of the linear network layer.

[0190] Step S57: Use a linear network layer to transform the output data of the multi-layer encoding module that integrates the attention mechanism and the feedforward neural network into product yield data.

[0191] Furthermore, the step of converting the output of the encoding module into product yield data using a linear network layer includes:

[0192] Train a fully connected linear network layer to process the output information of the last single-layer encoding module and transform the output information M of the encoding module into product yield data Y. The calculation formula is:

[0193] Y=M·W+b;

[0194] Among them, W and b are weight parameters.

[0195] Step S6: In each sub-mode, feature fusion is performed on the input and output relationship, with the goal of minimizing the mean square error of the prediction result, adjusting some hyperparameters of the model, predicting the product yield and processing the output data.

[0196] Adjust the hyperparameters that may affect the model structure, including the number of encoding module layers (n_layers), the number of multi-head attention heads (num_heads), the model width (model_dim), the number of hidden layer neurons in the feedforward network (forward_dim), the number of iterations, the output dimension (output_dim), the random dropout parameter (dropout), and the learning rate (lrate).

[0197] Based on the existing structure of the model, with the goal of minimizing the mean square error (MSE) of the prediction results, some model structure hyperparameters are adjusted according to the continuous halving method.

[0198] The process of adjusting and optimizing the model parameters according to the continuous halving method further includes:

[0199] Select some model structure hyperparameters, use a small number of samples to train the hyperparameter combinations consisting of different values ​​of the selected hyperparameters, and use more samples (double) to train some parameter combinations that perform well in the training results;

[0200] The above process is repeated until only one set of parameter combinations remains or the remaining samples are insufficient for the next iteration. The best performing set of parameter combinations is taken as the model parameters to generate the final prediction model.

[0201] It can be understood that the continuous halving method is a hyperparameter optimization method that dynamically allocates resources. That is, for all candidate hyperparameter combinations, a small amount of resources are first used for training, and the hyperparameter combinations that perform well in this round of training are retained. In the next round of training, more resources are allocated for training, and this process is repeated; training ends when the last set of hyperparameter combinations remains or the resource allocation is insufficient to start a new round of training, and the parameter combination with the best performance is selected as the actual parameters.

[0202] Although the above methods are illustrated and described as a series of acts for simplicity of explanation, it is to be understood and appreciated that these methods are not limited by the order of the acts, as some acts may occur in a different order and / or concurrently with other acts from those illustrated and described herein or not illustrated and described herein but understandable to those skilled in the art according to one or more embodiments.

[0203] The following is a specific example to illustrate the method for modeling key indicators of a catalytic cracking unit by integrating time series feature extraction proposed by the present invention.

[0204] Step S1: Acquire production data of a catalytic device, and preprocess the acquired data to obtain input characteristic variables.

[0205] In this embodiment, the data source is an actual catalytic cracking unit in oil refining production, and the collection period is 2 years.

[0206] According to the actual operating characteristics of the device, the sampling time interval is set to six hours.

[0207] Each input variable has a corresponding upper and lower limit, which is determined by the device operator.

[0208] If an input variable exceeds the corresponding upper or lower limit, it is set to the corresponding upper or lower limit value.

[0209] In order to demonstrate the online modeling solution, in this embodiment, a catalytic cracking unit of another refinery (denoted as Refinery B) is used as a data source.

[0210] The process data were collected from August 2017 to November 2019 with a time interval of 6 hours.

[0211] In order to model the catalytic cracking process, in this example, a total of 57 original characteristic variables were collected, including feed flow and properties, properties of the regenerated catalyst, reactor operating conditions, stabilizer tower operating conditions, desorption tower operating conditions and product flow.

[0212] Before using this data directly, it needs to be preprocessed to deal with erroneous data, noise, outliers and perform some necessary transformations.

[0213] After the above data preprocessing, 2858 samples were finally obtained as a data set, including 50 input variables and 3 output variables (3 product yields), as shown in Table 1.

[0214] Table 1

[0215]

[0216]

[0217] Step S2: Based on the data characteristics of the catalytic cracking unit, the input feature variables are screened by the random forest method to obtain feature variables that are significantly correlated with the product yield, and generate sample data.

[0218] The screening results show that the preprocessed data contains 50 feature variables and a total of 2858 valid samples. After random forest screening, the importance of each feature variable is measured according to the average of the absolute value of the SHAP value.

[0219] Figure 2 A schematic diagram of the top 25 characteristic variables that have a greater impact on product yield, as screened according to an embodiment of the present invention, is disclosed. Figure 2As shown in the figure, the top 25 variables that have a greater impact on the prediction results include:

[0220] Recycled oil temperature, T304 bottom reboiler gas phase tower temperature, fractionation tower top pressure, crude gasoline to T301 flow, reactor pressure, quench oil temperature, T201 middle section reflux oil temperature, atomizing steam pressure, main air volume into the coke drum, pre-lift steam flow, 1.0MPa steam to the second reactor superheater flow, regenerator pressure, main air outlet temperature, slide valve pressure drop to be regenerated, T202 bottom stripping steam flow, recycled oil to reaction flow, T201 top circulation reflux flow, stable tower top cold reflux flow, atomizing steam temperature, raw material preheating temperature, reaction fresh feed flow, main fan outlet pressure, overflow hopper fluidized steam flow, second reactor upper temperature, second dense phase temperature.

[0221] The first 20 characteristic variables were selected as robust characteristic variables that have a significant impact on the results and were used in subsequent analysis and modeling.

[0222] Step S3: Divide the sample data into different operation modes based on the principal component analysis method, and perform mode classification on the samples when building the model to form a plurality of corresponding sub-mode samples.

[0223] Figure 3 The PCA score diagram of the input variables according to one embodiment of the present invention is disclosed, as shown in FIG. Figure 3 As shown, the samples in the data set contain at least two different operation mode information. There is a clear difference between the samples of sub-mode 1 and sub-mode 2, which can represent two types of operation mode information with great difference.

[0224] Step S4: Divide each sub-mode sample into a training sample subset, a verification sample subset and a test sample subset, fuse the relative position coding, and obtain the coding input information under each sub-mode.

[0225] Figure 4 The PCA score diagram of the input and output variables according to one embodiment of the present invention is disclosed, such as Figure 4 As shown, the samples of sub-mode 1 are divided into training samples and test samples.

[0226] Among them, in chronological order, the first 70% of the samples are used as training samples, and the last 30% of the samples are used as test samples. 10% of the samples in the training samples are randomly selected as validation samples to monitor the training process (validation samples are not directly used for model training, training samples + validation samples + test samples = total samples).

[0227] In this embodiment, the dimension model_dim of the relative position encoding is 20.

[0228] Step S5: construct a multi-layer encoding module based on the attention mechanism and the feedforward neural network, and use a linear network layer to transform the output of the multi-layer encoding module into product yield data.

[0229] Figure 5 The schematic diagram of the structure of the self-attention mechanism / multi-head self-attention of the encoding module according to one embodiment of the present invention is disclosed. Figure 5 As shown, in the multi-head self-attention calculation, the encoded input information is divided equally according to the number of parallel self-attention heads set, and multiple groups of W are used. q 、W k 、W v Get multiple groups of query vector matrices Query, key vector matrices Key and value vector matrices Value. Perform self-attention calculations based on separate Query, Key, and Value matrices in different attention heads. Each group of separate calculations can obtain a single-head output z. All single-head outputs z are spliced ​​together to obtain the output Z of the multi-head self-attention layer, which is used as the input of the normalization layer (Norm).

[0230] In this embodiment, the mean square error (MSE) is used as the loss function for model training.

[0231] The sample batch size is 80, the number of encoding module layers (n_layers) is 11, the model width (model_dim) is 20, the number of multi-head attention heads (num_heads) is 2, and the weight matrix of each attention layer (W q 、W k 、W v ) size is 10×10, the sizes of the parameter matrices of each feedforward network layer (W1, W2) are 20×2048 and 2048×20, the size of the parameter matrix of the linear network layer (w) is 20×3, the number of training generations is 100, and the random dropout parameter (dropout) is 0.1; the parameter optimizer is Adam, and the initial learning rate is 0.001.

[0232] When the predetermined number of training generations is reached, the training process stops, and the parameters that perform best on the validation sample at a certain generation are used as the final model parameters to evaluate its performance on the test sample.

[0233] Step S6: In each sub-mode, feature fusion is performed on the input and output relationship, with the goal of minimizing the mean square error of the prediction result, adjusting some hyperparameters of the model, predicting the product yield and processing the output data.

[0234] Model structure hyperparameters that may affect the model structure include:

[0235] Number of encoding module layers (n_layers): 11;

[0236] Number of multi-head attention heads (num_heads): 2;

[0237] Model width (model_dim): 20;

[0238] Number of hidden neurons in the feedforward network (forward_dim): 2048;

[0239] Iterations: 100

[0240] Output dimension (output_dim): 3;

[0241] Dropout parameter: 0.1

[0242] Learning rate (lrate): 0.002.

[0243] In this embodiment, the random dropout parameter dropout and the learning rate lrate are adjusted, wherein the random dropout parameter is set to a value range of [0, 1], and the learning rate is set to a value range of [0.001, 1].

[0244] The process of model parameter optimization includes: first, a small number of samples are used to train the hyperparameter combinations (a total of 60 groups) consisting of different values ​​of the above hyperparameters (dropout and lrate), and some parameter combinations with better performance in the training results are selected (retaining the top 2 / 3) and trained with more samples (double); this process is repeated until the remaining samples are insufficient for the next iteration, and the set of parameter combinations with the best performance in this round is taken as the model parameters to generate the final prediction model.

[0245] In the parameter selection process, the number of samples and parameter combinations used are shown in Table 2:

[0246] Table 2

[0247] Sample size Number of parameter combinations 1 80 60 2 160 40 3 320 26 4 640 17 5 1280 11 6 2284 7

[0248] In this embodiment, the hyperparameter values ​​obtained by screening are: dropout = 0.2; lrate = 0.001;

[0249] The final prediction model results are as follows: Figure 6 shown.

[0250] The above method is used to predict the diesel yield, gasoline yield and slurry yield respectively. The training results and test results of the three product yields after model training are as follows: Figure 7 and Figure 9 As shown, the horizontal axis represents the index of the sample in the test dataset (sorted by date), and this result comes from the run result that is closest to the average MSE of the 10 runs.

[0251] The training result errors and test result errors of the three product yields after model training are as follows: Figure 8 and Figure 10 Table 3 gives the statistics of the model error.

[0252] The prediction errors of diesel yield, gasoline yield and slurry yield using the above method are shown in Table 3.

[0253] Table 3

[0254] Product yield MSE (%) MRE (%) RMSE (%) Diesel yield 0.150% 0.176% 3.876% Gasoline yield 0.719% 0.175% 8.485% Slurry oil yield 0.025% 0.176% 1.612%

[0255] In another embodiment of the present invention, a catalytic cracking unit key indicator modeling system integrating time series feature extraction is provided, which is used to implement the above-mentioned catalytic cracking unit key indicator modeling method integrating time series feature extraction, including:

[0256] A preprocessing module is used to obtain data information of the catalytic cracking process, preprocess the data information, and eliminate abnormal points;

[0257] Feature screening module, which uses the random forest method to screen input feature variables and selects feature variables that have a significant impact on product yield based on SHAP values;

[0258] The pattern classification module analyzes the different operation modes represented by the samples through the principal component analysis method, divides different modes according to the distance between samples in the principal component score graph, and forms multiple sub-modes when building the model;

[0259] The position coding fusion module divides the sample subsets under each sub-mode into training sets, validation sets, and test sets, and fuses the filtered feature variables and their relative position coding to obtain the coding input information under each sub-mode;

[0260] Encoding module, which builds a multi-layer fusion encoding module of multi-head self-attention, layer normalization and feedforward neural network to fuse input and output relationship features;

[0261] The output module uses a linear network layer to transform the output of the encoding module into product yield data as the final output value of the integrated model;

[0262] The parameter correction module adjusts some hyperparameters that affect the model structure through a continuous halving method to obtain the final prediction model parameters.

[0263] Figure 11A block diagram of a catalytic cracking unit key indicator modeling device integrating time series feature extraction according to one embodiment of the present invention is shown. The catalytic cracking product yield prediction device may include an internal communication bus 701, a processor 702, a read-only memory (ROM) 703, a random access memory (RAM) 704, a communication port 705, and a hard disk 707. The internal communication bus 701 enables data communication between components of the catalytic cracking product yield prediction device. The processor 702 can make judgments and issue prompts. In some embodiments, the processor 702 may be composed of one or more processors.

[0264] Communication port 705 enables data transmission and communication between the catalytic cracking product yield prediction device and external input / output devices. In some embodiments, the catalytic cracking product yield prediction device can send and receive information and data from a network via communication port 705. In some embodiments, the catalytic cracking product yield prediction device can transmit and communicate data with external input / output devices via a wired connection via input / output port 706.

[0265] The catalytic cracking product yield prediction device may also include various forms of program storage units and data storage units, such as a hard disk 707, a read-only memory (ROM) 703, and a random access memory (RAM) 704, capable of storing various data files used for computer processing and / or communication, as well as possible program instructions executed by the processor 702. The processor 702 executes these instructions to implement the main part of the method. The results processed by the processor 702 are transmitted to an external output device via a communication port 705 and displayed on a user interface of the output device.

[0266] For example, the implementation process file of the above-mentioned catalytic cracking product yield prediction device can be a computer program, which is stored in the hard disk 707 and can be recorded in the processor 702 for execution to implement the method of the present invention.

[0267] When the implementation process file of the catalytic cracking unit key indicator modeling method integrating time series feature extraction is a computer program, it can also be stored in a computer-readable storage medium as a product. For example, a computer-readable storage medium may include, but is not limited to, a magnetic storage device (e.g., a hard disk, a floppy disk, a magnetic strip), an optical disk (e.g., a compact disk (CD), a digital versatile disk (DVD)), a smart card, and a flash memory device (e.g., an electrically erasable programmable read-only memory (EPROM), a card, a stick, a key drive). In addition, the various storage media described herein can represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media (and / or storage media) that can store, contain, and / or carry code and / or instructions and / or data.

[0268] The present invention provides a method and device for modeling key indicators of a catalytic cracking unit that integrates time series feature extraction. Different operating modes are divided according to the sample distribution in the PCA principal component score diagram, and sub-models under different operating modes are constructed. At the same time, different information in the input is paid attention to. The final generated catalytic unit data model improves the prediction accuracy and stability of product yield.

[0269] Those skilled in the art will appreciate that information, signals, and data may be represented using any of a variety of different technologies and techniques. For example, data, instructions, commands, information, signals, bits, symbols, and chips cited throughout the foregoing description may be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.

[0270] Those skilled in the art will further appreciate that the various illustrative logic blocks, modules, circuits, and algorithmic steps described in conjunction with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or a combination of the two. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps are generally described above in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. A skilled person may implement the described functionality in different ways for each specific application, but such implementation decisions should not be interpreted as resulting in a departure from the scope of the present invention.

[0271] The various illustrative logic modules and circuits described in conjunction with the embodiments disclosed herein may be implemented or executed using a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.

[0272] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read and write information from / to the storage medium. In an alternative, the storage medium may be integrated into the processor. The processor and storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In an alternative, the processor and storage medium may reside in a user terminal as discrete components.

[0273] As used in this application and the claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" are not intended to refer to the singular but may include the plural. Generally speaking, the terms "comprises" and "include" only indicate the inclusion of the steps and elements specifically identified, and these steps and elements do not constitute an exclusive list. A method or apparatus may also include other steps or elements.

[0274] The above embodiments are provided to persons familiar with the art for implementing or using the present invention. Personnel familiar with the art may make various modifications or changes to the above embodiments without departing from the inventive concept of the present invention. Therefore, the scope of protection of the present invention is not limited to the above embodiments, but should be the maximum scope of the innovative features mentioned in the claims.

Claims

1. A method for modeling key indicators of a catalytic cracking unit by integrating time series feature extraction, characterized in that: The following steps are involved: Step S1, obtaining production data of a catalytic cracking unit, and preprocessing the obtained data to obtain input characteristic variables; Step S2: Based on the data characteristics of the catalytic cracking unit, the input feature variables are screened by the random forest method to obtain feature variables significantly correlated with the product yield, and generate sample data; Step S3: Divide the sample data into different operation modes based on the principal component analysis method, and perform mode classification on the samples when building the model to form multiple corresponding sub-mode samples; Step S4: Divide each sub-mode sample into a training sample subset, a verification sample subset, and a test sample subset, and fuse the relative position coding to obtain the coding input information under each sub-mode; Step S5: constructing a multi-layer encoding module based on the attention mechanism and the feedforward neural network, and transforming the output of the multi-layer encoding module into product yield data using a linear network layer; Step S6: perform feature fusion on the input and output relationship in each sub-mode, with the goal of minimizing the mean square error of the prediction result, adjust some model structure hyperparameters to generate a prediction model, predict the product yield and process the output data; Wherein, the step S3 further includes: Step S31: Projecting the sample data in the dataset onto the principal components through principal component analysis, and analyzing the different operation modes represented by the samples based on their distribution on the principal component score projection graph; Step S32: Different operation modes are divided according to the Euclidean distance between samples in the score projection graph. By setting an appropriate threshold, the samples representing different operation modes are classified in the model construction to form corresponding multiple sub-modes.

2. The method for modeling key indicators of a catalytic cracking unit by integrating temporal feature extraction according to claim 1, characterized in that: In step S1, the production data of the catalytic device includes operating variables, raw material and catalyst properties, and product output; The preprocessing method includes outlier data deletion, mean filling and normalization.

3. The method for modeling key indicators of a catalytic cracking unit by integrating temporal feature extraction according to claim 1, characterized in that: The pre-processing step of step S1 further includes: Step S11: determine whether there is missing data in a sample. If so, the sample will be removed from the data set. Step S12: Calculate the product yield as follows: Step S13, removing variable data irrelevant to the predicted product yield from the data set; Step S14: using the 3Sigma criterion to remove data with severe measurement errors; Step S15: Use a sliding average method with a time window of 24 hours to filter out measurement noise.

4. The method for modeling key indicators of a catalytic cracking unit by integrating temporal feature extraction according to claim 1, characterized in that: The step S2 further comprises: Step S21: performing random sampling with replacement from the catalytic cracking unit data set to form a sample subset; Step S22: Randomly extract a subset of feature variables from the sampled samples as input for training a decision tree to construct a decision tree; Step S23: repeatedly construct multiple decision trees under the double random sampling condition to form a random forest; Step S24: Calculate the average of the absolute values ​​of the SHAP values ​​of the individual feature variables as the importance score of the feature, and obtain the top R feature variables ranked by importance score as the variable combination after feature screening.

5. The method for modeling key indicators of a catalytic cracking unit by integrating temporal feature extraction according to claim 1, characterized in that: The step S4 further comprises: Step S41: Divide the samples of each sub-mode into training samples, verification samples and test samples, which are used for training the model, monitoring the training process and testing the model performance process respectively; Step S42: Calculate the relative position vector encoding with the same dimension as the feature variable by using the frequency-variable sine and cosine functions. The feature variable dimension is recorded as model_dim; Step S43: Encode the relative position It is fused and added with the feature variables in each dimension as the encoded input information.

6. The method for modeling key indicators of a catalytic cracking unit by integrating temporal feature extraction according to claim 5, characterized in that: The relative position vector encoding in step S42 The corresponding calculation formula is: in, is the current input position vector; t represents the position of the current input in the sequence; i represents the dimension number and 7. The method for modeling key indicators of a catalytic cracking unit by integrating time series feature extraction according to claim 1 is characterized in that: The step S5 further comprises: Step S51: The encoded input information after the relative position encoding is integrated is used as the input of the self-attention layer, and step S52 is performed to calculate the self-attention score; Step S52: Perform matrix operations on the encoded input information and the self-attention layer weight matrix to obtain the query vector matrix, the key vector matrix, and the value vector matrix. Calculate the similarity by multiplying the query vector matrix by the transpose of the key vector matrix, scale the calculation results, convert each score vector into a probability distribution matrix, and perform matrix multiplication of the probability distribution matrix of the score with the value vector matrix to obtain the output of the self-attention layer. Step S53: The calculation result Z of the self-attention layer is sent to the normalization layer for residual connection and normalization operation; Step S54: the output result N of the normalization layer is sent to the feedforward neural network layer; Step S55: The output result F of the feedforward neural network layer enters the normalization layer again, completing the residual connection and normalization of the input result N and the output result F of the feedforward neural network layer, and randomly discarding some neurons as the output M of the single-layer encoding module; Step S56: Set a multi-layer encoding module that integrates an attention layer, a normalization layer, and a feedforward neural network layer. Use the output M of the single-layer encoding module in step S55 as the input information of the top-layer encoding module, the output of the previous layer encoding module as the input information of the next layer encoding module, and the output of the last single-layer encoding module is sent to the linear network layer. Step S57: Use a linear network layer to transform the output data of the multi-layer encoding module that integrates the attention mechanism and the feedforward neural network into product yield data.

8. The method for modeling key indicators of a catalytic cracking unit by integrating time series feature extraction according to claim 7 is characterized in that: The step S52 further includes: For input information, when calculating in the self-attention layer, the encoded input information is equally divided according to the set number of parallel attention heads; Use multiple sets of attention weight matrices to obtain multiple sets of query vector matrices, key vector matrices, and value vector matrices; Each set of query vector matrix, key vector matrix and value vector matrix is ​​calculated separately to obtain a single-head output matrix z; All the single-head output matrices z are concatenated to obtain the output matrix Z of the multi-head self-attention.

9. The method for modeling key indicators of a catalytic cracking unit by integrating temporal feature extraction according to claim 1, characterized in that: The model structure hyperparameters of step S6 further include: Number of encoding module layers, number of multi-head attention heads, model width, number of hidden neurons in the feedforward network, number of iterations, output dimension, random dropout parameters, and learning rate.

10. The method for modeling key indicators of a catalytic cracking unit by integrating time series feature extraction according to claim 1, characterized in that: In step S6, adjusting some model structure hyperparameters by a continuous halving method further includes: Select some model structure hyperparameters; For the hyperparameter combinations consisting of different values ​​of the selected hyperparameters, a preset number of samples are used for training. The relatively better hyperparameter combinations in the training results are selected and a preset number of samples are allocated for the next round of training. Repeat the above training process until the last set of hyperparameter combinations remains or the remaining samples are insufficient for the next training iteration; The best performing parameter combination is selected as the actual model parameters.

11. A catalytic cracking unit key indicator modeling device integrating time series feature extraction, comprising: a memory for storing instructions executable by the processor; A processor, configured to execute the instructions to implement the method according to any one of claims 1 to 10.

12. A computer-readable medium having computer instructions stored thereon, wherein when the computer instructions are executed by a processor, the method according to any one of claims 1 to 10 is performed.

Citation Information

Patent Citations

  • Sequence recommendation method based on self-attention auto-encoder

    CN111127165A

  • Prediction method for time series data based on empirical mode decomposition and feedforward neural network

    CN111428201A

  • Deep learning algorithm hyper-parameter optimization method based on agent model

    CN111738406A

  • Visualization method and device of random forest model and storage medium

    CN111783840A

  • Method and system for predicting catalytic cracking product yield and readable storage medium

    CN114783541A