Light hydrocarbon cracking process prediction method based on recurrent neural network and particle swarm optimization

By applying prediction methods based on recurrent neural network and particle swarm optimization during the cracking process, combining simulation data and particle swarm optimization algorithm, the problem of time-consuming and difficult in traditional modeling methods is solved, and efficient and rapid cracking process prediction is achieved.

CN120164542APending Publication Date: 2025-06-17EAST CHINA UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510321566.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2025-06-17

AI Technical Summary

Technical Problem

The prior art has time-consuming and challenging free radical model development in modeling the cleavage process, and traditional mechanism modeling is difficult to quickly apply to actual production.

Method used

The light hydrocarbon cracking process prediction method based on recurrent neural network and particle swarm optimization is adopted, combining the advantages of mechanism modeling and empirical modeling, and simulated reactor models under different production conditions, generate simulation data, build training data sets, and optimize the model training process using particle swarm optimization algorithm.

Benefits of technology

It realizes efficient prediction of the cracking process, reduces modeling difficulty, improves calculation speed, and can be quickly applied to actual production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120164542A_ABST
    Figure CN120164542A_ABST
Patent Text Reader

Abstract

The invention discloses a light hydrocarbon cracking process prediction method based on a recurrent neural network and particle swarm optimization, and the method comprises the steps: firstly simulating reactor models under different production conditions, and generating simulation data under different production conditions; constructing a training data set of the recurrent neural network RNN based on the generated simulation data, wherein the training data set comprises an input data set of the recurrent neural network RNN and a corresponding output data set; and performing model training on the recurrent neural network (RNN) based on the constructed training data set in combination with a particle swarm optimization algorithm to obtain a light hydrocarbon cracking process prediction model based on the recurrent neural network (RNN). And finally, predicting production data under the current production condition through the trained light hydrocarbon cracking process prediction model to obtain the light hydrocarbon cracking process under the current production condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chemical engineering, and particularly to a prediction method for the light hydrocarbon cracking process based on a recurrent neural network and particle swarm optimization. Background Art

[0002] In the petrochemical industry, steam cracking is an important chemical production process for producing basic organic chemical raw materials such as ethylene, propylene, butene, and butadiene. Developing a model that can accurately predict the product yield is crucial for designing and optimizing the cracking process. Traditionally, there are mainly two methods for modeling the cracking process: mechanism modeling and empirical modeling. In mechanism modeling, radical models are preferentially adopted because they are based on accurate thermodynamic and kinetic parameters and can accurately reflect the mechanism of the cracking process. However, developing radical models is both time-consuming and challenging, requiring ensuring the integrity of the reaction network and the accuracy of kinetic and thermodynamic parameters.

[0003] In recent years, artificial intelligence, especially deep learning technology, has made remarkable progress in many fields, including image recognition, natural language processing, etc. As an important method of deep learning, the recurrent neural network (RNN) has been gradually applied to the modeling of the cracking process due to its excellent performance in dealing with time series dependence problems. Compared with traditional mechanism modeling, empirical modeling methods rely on a large amount of data and do not require in-depth understanding of the complex mechanism of cracking reactions, which can significantly reduce the modeling difficulty. In addition, empirical modeling methods have a faster calculation speed because most of the calculation work is completed during the model development process, enabling fast calculation when applying the model. Therefore, how to apply neural networks to the prediction of the highly non-linear cracking process has become a hot issue currently. Summary of the Invention

[0004] The following gives a brief overview of one or more aspects to provide a basic understanding of these aspects. This overview is not an exhaustive survey of all contemplated aspects, and is neither intended to identify key or decisive elements of all aspects nor to define the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description to follow.

[0005] The object of the present invention is to solve the above problems, and provides a prediction method for the light hydrocarbon cracking process based on a recurrent neural network and particle swarm optimization, which combines the advantages of mechanism modeling and empirical modeling, namely the fast application ability of the neural network model and the wide applicability of the mechanism model, and realizes the efficient prediction of the cracking process.

[0006] The technical solution of the present invention is as follows:

[0007] The present invention provides a prediction method for the light hydrocarbon cracking process based on a recurrent neural network and particle swarm optimization, comprising the following steps:

[0008] Step S1: Simulate the reactor model under different production conditions to generate simulation data under different production conditions;

[0009] Step S2: Based on the generated simulation data, construct a training dataset for the recurrent neural network RNN, including the input dataset of the recurrent neural network RNN and the corresponding output dataset;

[0010] Step S3: Combine the particle swarm optimization algorithm and train the recurrent neural network RNN based on the constructed training dataset to obtain a prediction model for the light hydrocarbon cracking process based on the recurrent neural network RNN;

[0011] Step S4: Use the trained prediction model for the light hydrocarbon cracking process to predict the production data under the current production conditions, and obtain the light hydrocarbon cracking process under the current production conditions.

[0012] According to an embodiment of the prediction method for the light hydrocarbon cracking process based on a recurrent neural network and particle swarm optimization of the present invention, after obtaining the simulation data under different production conditions, the obtained simulation data is normalized to obtain multiple groups of training data; wherein each group of training data includes 20 input features and the corresponding 14 output features, and the prediction method for the light hydrocarbon cracking process based on a recurrent neural network and particle swarm optimization trains the recurrent neural network RNN based on the normalized training dataset to obtain a cracking process prediction model for predicting the cracking process.

[0013] According to an embodiment of the prediction method for the light hydrocarbon cracking process based on a recurrent neural network and particle swarm optimization of the present invention, the input features include steam mass flow rate, inlet pressure, inlet temperature, amplitude of the heat flux density curve, downward slope of the heat flux density curve, heat flux, outlet temperature, outlet pressure, and mass fractions of 12 key substances, and the output features include temperature profile, pressure profile, and time evolution of 12 key substances. The prediction method for the light hydrocarbon cracking process based on a recurrent neural network and particle swarm optimization constructs a multi-dimensional input dataset and the corresponding output dataset respectively based on the input features and the output features, and trains the recurrent neural network RNN through the constructed input dataset and the corresponding output dataset to obtain a cracking process prediction model based on the recurrent neural network RNN.

[0014] According to an embodiment of the light hydrocarbon cracking process prediction method based on a recurrent neural network and particle swarm optimization of the present invention, the cracking process prediction model based on the recurrent neural network RNN includes an input layer, one or more fully connected layers, a batch normalization layer, a GRU layer, a Repeat Vector layer, one or more Time Distributed layers, and an output layer; wherein,

[0015] The input layer is used to receive the normalized input data;

[0016] The fully connected layer is used to extract the feature vector of the input data and generate the initial state of the feature vector based on the time series;

[0017] The batch normalization layer performs batch normalization processing on the initial state of the extracted feature vector and transmits it to the GRU layer;

[0018] The GRU layer is used to process the dependency relationship of the feature vector based on the time series and store the feature vector information of the previous time step;

[0019] The Repeat Vector layer is used to repeat the input feature vector a certain number of times to form a new feature vector sequence with a specified number of time steps;

[0020] The Time Distributed layer is used to independently apply the ReLU activation function at each time step to extract non-linear features and generate the prediction value at each time step through a linear activation function;

[0021] The output layer is used to generate and output the prediction value at each time step.

[0022] 13. According to an embodiment of the light hydrocarbon cracking process prediction method based on a recurrent neural network and particle swarm optimization of the present invention, when training the model of the recurrent neural network RNN, a custom loss function is also established, and the model of the recurrent neural network RNN is trained in combination with the custom loss function; wherein, the custom loss function Loss is as follows:

[0023] Loss = MSE + P s + P m

[0024] Wherein, MSE represents the weighted overall mean square error,

[0025] P s represents the weighted smoothness penalty,

[0026] P m represents the total mass balance penalty.

[0027] In an embodiment of the light hydrocarbon cracking process prediction method based on a recurrent neural network and particle swarm optimization according to the present invention, the weighted overall mean square error MSE is as follows:

[0028]

[0029] where N represents the length of the sequence,

[0030] w feature represents the weight assigned to each feature vector in the output feature dimension,

[0031] w time represents the weight assigned to each time point in the output feature dimension,

[0032] y true,i represents the true value at the i-th time step,

[0033] y pred,i represents the predicted value at the i-th time step.

[0034] In an embodiment of the light hydrocarbon cracking process prediction method based on a recurrent neural network and particle swarm optimization according to the present invention, the weighted smoothness penalty P S is as follows:

[0035]

[0036] Δy i = y pred,i - y true,i , i = 1, 2, …, N

[0037] where N represents the length of the sequence,

[0038] w s represents the smoothness penalty weight,

[0039] Δy j 、Δy j+1 and Δy j+2 respectively represent the differences between the predicted values and the true values at the j-th, j + 1-th, and j + 2-th time steps,

[0040] y pred,i represents the predicted value at the i-th time step,

[0041] y true,i represents the true value at the i-th time step.

[0042] In an embodiment of the light hydrocarbon cracking process prediction method based on a recurrent neural network and particle swarm optimization according to the present invention, the total mass balance penalty P m is as follows:

[0043]

[0044] wherein, N represents the length of the sequence,

[0045] w mp represents the loss weight of the total mass of the species,

[0046] m represents the total mass of all species involved in the reaction network,

[0047] m true,i represents the actual total mass of all species in the reaction network at the i-th time step

[0048] m pred,i represents the total mass of all species in the reaction network predicted by the model at the i-th time step.

[0049] According to an embodiment of the light hydrocarbon cracking process prediction method based on a recurrent neural network and particle swarm optimization of the present invention, when training the model of the recurrent neural network RNN based on a custom loss function, the particle swarm optimization algorithm is used to optimize the weight coefficients in the custom loss function; wherein, the objective function of the particle swarm optimization algorithm is the sum of the squared relative deviations between the predicted value and the real data.

[0050] According to an embodiment of the light hydrocarbon cracking process prediction method based on a recurrent neural network and particle swarm optimization of the present invention, the objective function of the particle swarm optimization algorithm is as follows:

[0051]

[0052] wherein, SRD represents the sum of the squared relative deviations between the predicted value and the real data,

[0053] N represents the length of the sequence,

[0054] y true,i represents the real value at the i-th time step,

[0055] y pred,i represents the predicted value at the i-th time step.

[0056] The present invention also provides a computer-readable medium storing computer program code, and the computer program code realizes the method as described above when executed by a processor.

[0057] The present invention also provides a light hydrocarbon cracking process prediction device based on a recurrent neural network and particle swarm optimization, including:

[0058] a memory for storing instructions executable by a processor; and

[0059] a processor for executing the instructions to realize the method as described above.

[0060] The present invention has the following beneficial effects compared with the prior art: The present invention is directed to BRIEF DESCRIPTION OF THE DRAWINGS

[0061] After reading the detailed description of the embodiments of the present disclosure in conjunction with the following drawings, the above features and advantages of the present invention can be better understood. In the drawings, the components are not necessarily drawn to scale, and components having similar relevant characteristics or features may have the same or similar reference numerals.

[0062] Figure 1 is a flowchart showing an embodiment of the light hydrocarbon cracking process prediction method based on a recurrent neural network and particle swarm optimization of the present invention.

[0063] Figure 2 is a model structure diagram showing an embodiment of the light hydrocarbon cracking process prediction model based on the recurrent neural network RNN of the present invention.

[0064] Figure 3 is a comparison graph showing the average prediction mean absolute error of each output feature and each time point before and after being optimized by the particle swarm optimization algorithm of the present invention.

[0065] Figure 4 is a comparison graph showing the prediction results and the true values of the species mass fraction, process gas temperature and pressure along the residence time of five randomly selected samples of the present invention under different operating conditions. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0066] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some examples or embodiments of the present application. For those of ordinary skill in the art, without creative efforts, the present application can also be applied to other similar scenarios based on these drawings. Unless obvious from the language context or otherwise stated, the same reference numerals in the drawings represent the same structure or operation.

[0067] As shown in the present application and the claims, unless the context clearly indicates an exception, words such as "a", "an", "one" and / or "the" are not specifically singular and may also include the plural. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.

[0068] Unless otherwise specifically stated, the relative arrangements of components and steps, numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present application. At the same time, it should be understood that for the convenience of description, the dimensions of the various parts shown in the drawings are not drawn according to actual proportional relationships. Technologies, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the said technologies, methods, and devices should be regarded as part of the authorization specification. In all the examples shown and discussed here, any specific value should be construed as merely exemplary and not as a limitation. Therefore, other examples of the exemplary embodiments may have different values. It should be noted that like reference numerals and letters denote like items in the following drawings, and thus, once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.

[0069] When detailing the embodiments of the present invention, for the convenience of explanation, the cross-sectional views showing the device structure will be enlarged locally in a non-general proportion, and the said schematic diagrams are only examples and should not limit the scope of protection of the present invention here. In addition, in actual production, three-dimensional spatial dimensions of length, width, and depth should be included.

[0070] In the description of the present application, it should be understood that the orientation or positional relationships indicated by orientation words such as "front, rear, upper, lower, left, right", "lateral, vertical, perpendicular, horizontal", and "top, bottom" are generally based on the orientation or positional relationships shown in the drawings, and are only for the convenience of describing the present application and simplifying the description. Without contrary description, these orientation words do not indicate and imply that the devices or elements referred to must have a specific orientation or be constructed and operated in a specific orientation, and thus should not be construed as limiting the scope of protection of the present application; the orientation words "inner, outer" refer to the inside and outside relative to the contours of the respective components.

[0071] Disclosed herein is an embodiment of a method for predicting the light hydrocarbon cracking process based on a recurrent neural network and particle swarm optimization. Figure 1 is a flowchart showing an embodiment of the method for predicting the light hydrocarbon cracking process based on a recurrent neural network and particle swarm optimization of the present invention. Please refer to Figure 1 , and the following is a detailed description of each step of the method for predicting the light hydrocarbon cracking process based on a recurrent neural network and particle swarm optimization.

[0072] Step S1: Simulate the reactor model under different production conditions to generate simulation data under different production conditions.

[0073] Step S2: Construct a training data set for the recurrent neural network RNN based on the generated simulation data, including the input data set and the corresponding output data set of the recurrent neural network RNN.

[0074] In this embodiment, in order to obtain simulation data under different production conditions, the Coilsim1D software is used to simulate the reactor model under different production conditions, generating a large amount of simulation data. The reactor model adopts a U-shaped tube design, with a total length of 21.2 meters, an inner diameter of 0.069 meters, an outer diameter of 0.0866 meters, and a bending radius of 0.65 meters. After obtaining the simulation data under different production conditions, the obtained simulation data is normalized to obtain multiple sets of training data. Among them, each set of training data includes 20 input features and corresponding 14 output features (including C4H10, C6H6, C3H8, iC4H10, C2H4, C2H6, C3H6, CH4, H2, C4H8, C2H2, C4H6, P(Pa), T(K)). After normalizing it, the recurrent neural network RNN is trained based on the normalized training data set to obtain a pyrolysis process prediction model for pyrolysis process prediction.

[0075] Specifically, in this embodiment, when generating simulation data, the reactor model is divided into 50 micro-segments (i.e., 50 time points) to record the distribution of each characteristic parameter during the reaction process, including temperature, pressure, heat flux, steam flow rate, hydrocarbon mass flow rate, and mass fractions of 12 key substances. Through multiple simulations, 5000 sets of simulation data under different operating conditions are obtained.

[0076] Among them, the generated input data set contains 20 input features, including steam mass flow rate, inlet pressure, inlet temperature, amplitude of the heat flux density curve, descending slope of the heat flux density curve, heat flux, outlet temperature, outlet pressure, and mass fractions of 12 key substances. Then, based on the 20 input features, an input data set with a dimension of 50×20 is generated for each simulation. Each row is used as a set of input data for training, and finally a data set with a dimension of 5000×50×20 is obtained as the total input data set of the RNN model.

[0077] At the same time, in this embodiment, the goal of the pyrolysis process prediction model of light hydrocarbons based on the recurrent neural network RNN to be developed is to accurately predict the temperature distribution, pressure distribution, and time evolution of 12 key species in the PFR (plug flow reactor). Therefore, a data set with a dimension of 5000×50×14 containing these 14 input feature values at 50 time points is used as the output data set of the RNN model, so as to train the pyrolysis process prediction model by combining the input data set and the corresponding output data set. In addition, in this embodiment, before model training, in order to ensure data consistency, the MinMaxScaler class is also used to normalize the training data set.

[0078] Step S3: Combine the particle swarm optimization algorithm and train the recurrent neural network (RNN) based on the constructed training dataset to obtain a prediction model for the light hydrocarbon cracking process based on the RNN.

[0079] In this embodiment, an RNN is used to construct a prediction model for the light hydrocarbon cracking process. By training the RNN, a prediction model for the light hydrocarbon cracking process for predicting the light hydrocarbon cracking process is obtained. Figure 2 FIG. is a model structure diagram showing an embodiment of the prediction model for the light hydrocarbon cracking process based on the RNN of the present invention. The following will be further described in detail with reference to Figure 2 , this embodiment will be further described in detail.

[0080] In this embodiment, the cracking process prediction model based on the RNN includes an input layer Input, one or more fully connected layers Dense, a batch normalization layer Batch Normalization, a GRU layer (gated recurrent unit layer), a Repeat Vector layer (repeated vector layer), one or more Time Distributed layers (time distribution layers), and an output layer Output. Among them, the input layer is used to receive the normalized input data. The fully connected layer is used to extract the feature vector of the input data and generate the initial state of the feature vector based on the time series. The batch normalization layer performs batch normalization processing on the initial state of the extracted feature vector and transmits it to the GRU layer. The GRU layer is used to process the dependency relationship of the feature vector based on the time series and store the feature vector information of the previous time step. The Repeat Vector layer is used to repeat the input feature vector a certain number of times to form a new feature vector sequence with a specified number of time steps. The Time Distributed layer is used to independently apply the ReLU activation function at each time step to extract non-linear features and generate the predicted value at each time step through a linear activation function.. The output layer is used to generate and output the predicted value at each time step.

[0081] Specifically, in this embodiment, when constructing a prediction model for the light hydrocarbon cracking process based on the recurrent neural network (RNN), a fully connected layer (Dense) is first added. This layer uses the ReLU activation function to generate the initial state of the GRU layer. This can provide a meaningful initial memory state for the GRU layer, helping the prediction model for the light hydrocarbon cracking process to effectively capture the early features of the sequence, thereby improving the prediction accuracy at the beginning of the sequence. Subsequently, a batch normalization layer is added to the fully connected layer to optimize the initial state through normalization, accelerating training and enhancing the stability of the model. This part can be regarded as the input layer, and its output serves as the initial state of the GRU layer. After the input layer, one or two fully connected layers are added, also using the ReLU activation function for feature extraction. This can enhance the model's ability to understand and process input data. Introducing multiple fully connected layers allows the model to learn more complex data, but adding additional fully connected layers may lead to overfitting, longer training time, and increased memory requirements. Therefore, this model uses at most two fully connected layers. Next, a Repeat Vector layer is introduced to repeat the input data a certain number of times (equal to the number of sequence time steps in the RNN model) to ensure that each time step receives the same input data, enabling the initial concentration data to predict future time steps. After the GRU layer and before the output layer, one or two time distribution layers are added, and these layers use the ReLU activation function. This model introduces a non-linear transformation before the output layer and applies the fully connected layer independently to each time step. Such a layer is more suitable for processing time series data. The final output layer also applies the time distribution layer and uses the linear activation function to generate the specific prediction value for each time step. To prevent overfitting, a Dropout layer may be added between the fully connected layer and the time distribution layer to improve the generalization ability of the model.

[0082] In addition, in this embodiment, when training the model of the recurrent neural network (RNN), a custom loss function is also established, and the model of the recurrent neural network (RNN) is trained in combination with the custom loss function; among them, the custom loss function Loss is as follows:

[0083] Loss = MSE + P s + P m

[0084] Among them, MSE represents the weighted overall mean square error, and P s represents the weighted smoothness penalty, and P m represents the total mass balance penalty. Among them, when setting the weighted overall mean square error MSE, by assigning specific weight coefficients to each feature and each time point, the weight of the data with a larger prediction error is increased, thereby improving the prediction accuracy of the model for this data. The weighted overall mean square error MSE is as follows:

[0085]

[0086] Among them, N represents the length of the sequence, and w feature represents the weight assigned to each feature vector (14×1 dimension), and w time represents the weight assigned to each time point (50×1 dimension), and y true,i represents the true value at the i-th time step, and y pred,i represents the predicted value at the i-th time step.

[0087] In this embodiment, for the training of the recurrent neural network RNN, the sum of squares of the second-order differences between the predicted value and the true value is introduced as a smoothness penalty to quantify the smoothness of the sequence, so as to ensure a smooth transition of the prediction result. Among them, the weighted smoothness penalty P S is calculated as follows:

[0088] Δy i = y pred,i - y true,i , i = 1, 2, …, N

[0089]

[0090] Among them, w s represents the smoothness penalty weight, N represents the length of the sequence, and Δy j , Δy j+1 and Δy j+2 respectively represent the differences between the predicted value and the true value at the j-th, j+1-th, and j+2-th time steps, y pred,i represents the predicted value at the i-th time step, and y true,i represents the true value at the i-th time step. At the same time, in this embodiment, when calculating the weighted smoothness penalty P S , the following total mass balance penalty P m is also introduced to ensure that the reaction process conforms to mass conservation:

[0091]

[0092] Among them, N represents the length of the sequence, and w mp represents the loss weight of the total mass of the species, m represents the total mass of all species involved in the reaction network, and m true,i represents the actual total mass of all species in the reaction network at the i-th time step. And m pred,i represents the total mass of all species in the reaction network predicted by the model at the i-th time step.

[0093] In addition, in this embodiment, the PSO algorithm (Particle Swarm Optimization algorithm) can also be used to optimize the weight coefficients in the custom loss function, so as to optimize the recurrent neural network RNN. Among them, the objective function to be optimized is the sum of the squared relative deviations (SRD) between the predicted value and the real data, which is defined as follows:

[0094]

[0095] SRD represents the sum of the squared relative deviations between the predicted value and the real data, N represents the length of the sequence, y true,i represents the real value at the i-th time step, y pred,i represents the predicted value at the i-th time step.

[0096] Specifically, in this implementation, when optimizing the weight coefficients in the custom loss function, 66 weight coefficients are set, including 14 feature weights, 50 time-point weights, 1 smoothness penalty weight, and 1 total mass balance penalty weight. The SRD of the training data and the validation data are respectively multiplied by the weight coefficients to reflect the differences in the data scales of the two. The ratio of the training data set to the validation data set is 0.7:0.15. The PSO algorithm optimizes the 66 weight coefficients in the custom loss function, including the feature weights and the time-point weights. The variation range of the feature weights is set to 0.8 to 10, and for some features (such as C3H8 and H2), it is 0.8 to 20. The time-point weight range is set to 1 to 10, and the ranges of the last two weights are 0 to 10. The algorithm uses 20 particles for 8 optimization iterations to obtain the optimal weight values through the optimization process. Among them, the model architecture constructed by the optimal hyperparameter values is shown in the following table:

[0097]

[0098] In this embodiment, after using the Hyperband algorithm to select the best hyperparameters, the model is trained with a batch size of 32, a training period of 100, and the best learning rate of 0.00001, and then the accuracy of the model is verified. Among them, the test data set contains 750 cases, accounting for 15% of the total data. 100 cases are randomly selected, and the data dimension is 100×51×21. According to the previously defined input and output parts, the data with a dimension of 100×1×20 is used as the input for the initial training of the RNN model. The remaining part of the test data, including the temperature profile, pressure profile, heat flux profile, and species mass flow rate distribution, is obtained by solving the stiff ODEs related to the detailed radical kinetics model through Coilsim1D software. These data are used to compare the prediction accuracy and calculation time of the model. The prediction accuracy of the initial training model is verified by comparing the prediction results with the real data of the test data. The test data includes 750 cases, accounting for 15% of the total data. The R2 value of the model is greater than 0.99, and the overall MAE (Mean Absolute Error) and MSE (Mean Square Error) are both lower than 0.01, indicating excellent prediction performance. In order to enhance the prediction performance of the model, the PSO algorithm needs to be used to further optimize the initial training model.

[0099] In one embodiment, 100 samples are randomly selected from the test set to compare the prediction performance of the RNN model after PSO optimization. The comparison results are as Figure 3 shown. Among them, after comparing the average prediction MAE of each feature and each time point before and after PSO optimization, it is found that the prediction performance of the optimized model is significantly better than that before optimization for all features and time points, and the MAE is generally lower than 0.0015. The optimization process significantly improves the performance of the model when predicting the later time points. The maximum difference in MAE between the model before optimization at the early and later time points is about 0.003, while this difference is reduced to about 0.0005 after optimization. The MAE of the optimized model is significantly reduced throughout the reaction time, and the maximum reduction in MAE at the later time points is about 0.003. To more specifically show the prediction of the model for the key species mass fraction, process gas temperature, and pressure along the residence time distribution, five samples are randomly selected from the test set, and their predicted values are compared with the real values. The comparison results are shown in Figure 4 . These five randomly selected samples have different feedstock compositions and operating conditions (temperatures and pressures at the inlet and outlet). For each production condition, the RNN model can accurately predict the species mass fraction, process gas temperature, and pressure at each time point during the cracking process.

[0100] Step S4: Predict the production data under the current production conditions through the trained light hydrocarbon cracking process prediction model to obtain the light hydrocarbon cracking process under the current production conditions.

[0101] In this embodiment, the trained prediction model for the light hydrocarbon cracking process is obtained through the above steps. The trained prediction model for the light hydrocarbon cracking process can be used to predict the production data under the current production conditions, so as to obtain the light hydrocarbon cracking process under the current production conditions. R & D personnel can design and optimize the cracking process according to the light hydrocarbon cracking process under the current production conditions.

[0102] This specification also provides a computer-readable medium storing computer program code, and the computer program code, when executed by a processor, implements the above-described method for predicting the light hydrocarbon cracking process based on a recurrent neural network and particle swarm optimization.

[0103] This specification also provides a method for predicting the light hydrocarbon cracking process based on a recurrent neural network and particle swarm optimization, including a memory storing instructions executable by a processor, and a processor for executing the instructions in the memory to implement the above-described method for predicting the light hydrocarbon cracking process based on a recurrent neural network and particle swarm optimization.

[0104] The foregoing description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0105] Those skilled in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, the various illustrative components, blocks, modules, circuits, and steps are described above in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

[0106] The various illustrative logical blocks, modules, and circuits described in connection with the embodiments disclosed herein can be implemented or performed with 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. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.

[0107] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A 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 such that the processor can read from, and write to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.

[0108] In one or more exemplary embodiments, the described functionality may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software as a computer program product, the functions may be stored on or transmitted via a computer-readable medium as one or more instructions or code. The computer-readable medium includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. The storage media may be any available media that can be accessed by a computer. By way of example and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a web site, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. As used herein, the disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray disc, where the disk generally reproduces data magnetically, while the disc reproduces data optically with a laser. Combinations of the above should also be included within the scope of computer-readable media.

Claims

1. A method for predicting light hydrocarbon cracking process based on recurrent neural network and particle swarm optimization, characterized in that: The following steps are involved: Step S1: simulating a reactor model under different production conditions to generate simulation data under different production conditions; Step S2: constructing a training data set of the recurrent neural network RNN ​​based on the generated simulation data, including an input data set of the recurrent neural network RNN ​​and a corresponding output data set; Step S3: combining the particle swarm optimization algorithm, performing model training on the recurrent neural network RNN ​​based on the constructed training data set, and obtaining a light hydrocarbon cracking process prediction model based on the recurrent neural network RNN; Step S4: predicting the production data under the current production conditions through the trained light hydrocarbon cracking process prediction model to obtain the light hydrocarbon cracking process under the current production conditions.

2. The method for predicting light hydrocarbon cracking process based on recurrent neural network and particle swarm optimization according to claim 1, characterized in that: After obtaining simulation data under different production conditions, the light hydrocarbon cracking process prediction method based on recurrent neural network and particle swarm optimization normalizes the obtained simulation data to obtain multiple groups of training data; wherein each group of training data includes 20 input features and corresponding 14 output features, and the light hydrocarbon cracking process prediction method based on recurrent neural network and particle swarm optimization performs model training on the recurrent neural network RNN ​​based on the normalized training data set to obtain a cracking process prediction model for cracking process prediction.

3. The method for predicting light hydrocarbon cracking process based on recurrent neural network and particle swarm optimization according to claim 2, characterized in that: Input features include steam mass flow, inlet pressure, inlet temperature, heat flux curve amplitude, heat flux curve descending slope, heat flux, outlet temperature, outlet pressure and mass fractions of 12 key substances; output features include temperature profile, pressure profile and time evolution of 12 key substances; the light hydrocarbon cracking process prediction method based on recurrent neural network and particle swarm optimization constructs multi-dimensional input data sets and corresponding output data sets based on input features and output features, respectively; the recurrent neural network RNN ​​is trained by the constructed input data sets and corresponding output data sets, thereby obtaining a cracking process prediction model based on the recurrent neural network RNN.

4. The method for predicting light hydrocarbon cracking process based on recurrent neural network and particle swarm optimization according to claim 2, characterized in that: The cracking process prediction model based on recurrent neural network RNN ​​includes an input layer, one or more fully connected layers, a batch normalization layer, a GRU layer, a Repeat Vector layer, one or more Time Distributed layers and an output layer; wherein, The input layer is used to receive normalized input data; The fully connected layer is used to extract the feature vector of the input data and generate the initial state of the feature vector based on the time series; The batch normalization layer performs batch normalization on the initial state of the extracted feature vector and transmits it to the GRU layer; The GRU layer is used to process the dependency of feature vectors based on time series and store the feature vector information of the previous time step; The Repeat Vector layer is used to repeat the input feature vector a certain number of times to form a new feature vector sequence with a specified number of time steps; The Time Distributed layer is used to apply the ReLU activation function independently at each time step to extract nonlinear features and generate the predicted value of each time step through the linear activation function; The output layer is used to generate and output the predicted value for each time step.

5. The method for predicting light hydrocarbon cracking process based on recurrent neural network and particle swarm optimization according to claim 1, characterized in that: The light hydrocarbon cracking process prediction method based on recurrent neural network and particle swarm optimization also establishes a custom loss function when training the recurrent neural network RNN ​​model, and combines the custom loss function to train the recurrent neural network RNN ​​model; wherein the custom loss function Loss is as follows: Loss=MSE+P s +P m Among them, MSE represents the weighted overall mean square error, P s represents the weighted smoothness penalty, P m represents the total mass balance penalty.

6. The method for predicting light hydrocarbon cracking process based on recurrent neural network and particle swarm optimization according to claim 5, characterized in that: The weighted overall mean square error MSE is as follows: Where N represents the length of the sequence, w feature represents the weight assigned to each feature vector in the output feature dimension, w time represents the weight assigned to each time point in the output feature dimension, y true,i represents the true value of the ith time step, y pred,i represents the predicted value at the i-th time step.

7. The method for predicting light hydrocarbon cracking process based on recurrent neural network and particle swarm optimization according to claim 5, characterized in that: Weighted smoothness penalty P S As shown below: Δy i =y pred,i -y true,i ,i=1,2,…,N Where N represents the length of the sequence, w s represents the smoothness penalty weight, Δy j , Δy j+1 and Δy j+2 Represents the difference between the predicted value and the true value at the jth, j+1th, and j+2th time steps, respectively. y pred,i represents the predicted value at the i-th time step, y true,i represents the true value of the i-th time step.

8. The method for predicting light hydrocarbon cracking process based on recurrent neural network and particle swarm optimization according to claim 5, characterized in that: Total mass balance penalty P m As shown below: Where N represents the length of the sequence, w mp represents the loss weight of the total mass of the species, m represents the total mass of all species involved in the reaction network, m true,i represents the actual total mass of all species in the reaction network at the i-th time step m pred,i represents the total mass of all species in the reaction network predicted by the model at the i-th time step.

9. The method for predicting light hydrocarbon cracking process based on recurrent neural network and particle swarm optimization according to claim 5, characterized in that: The light hydrocarbon cracking process prediction method based on recurrent neural network and particle swarm optimization adopts a particle swarm optimization algorithm to optimize the weight coefficient in the custom loss function when training the recurrent neural network RNN ​​model based on a custom loss function; wherein the objective function of the particle swarm optimization algorithm is the sum of the square relative deviations between the predicted value and the real data.

10. The method for predicting light hydrocarbon cracking process based on recurrent neural network and particle swarm optimization according to claim 5, characterized in that: The objective function of the particle swarm optimization algorithm is as follows: Among them, SRD represents the sum of the square relative deviations between the predicted value and the true data. N represents the length of the sequence, y true,i represents the true value of the i-th time step, y pred,i represents the predicted value at the i-th time step.

11. A computer readable medium storing computer program code, characterized in that: The computer program code implements the method according to any one of claims 1 to 10 when executed by a processor.

12. A light hydrocarbon cracking process prediction device based on recurrent neural network and particle swarm optimization, characterized in that: include: a memory for storing instructions executable by a processor; as well as A processor, configured to execute the instructions to implement the method according to any one of claims 1 to 10.