Method and system for predicting quality of any stream in petrochemical production at molecular level

By combining online spectral analysis and dynamic molecular libraries with genetic algorithms and neural network models, the problems of lag and low accuracy in stream quality prediction in petrochemical production have been solved, achieving real-time response and high-precision prediction of feed fluctuations.

CN121034458AActive Publication Date: 2025-11-28BEIJING PROFESSIONAL DIGITIZE& INTELLIGENTIZE TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511564256.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-30
Publication Date
2025-11-28
Estimated Expiration
2045-10-30

AI Technical Summary

Technical Problem

In petrochemical production, the prediction of feed stream quality is lagging and has low accuracy. It cannot adapt to feed fluctuations in real time and lacks real-time and in-depth understanding of key locations, resulting in inaccurate operation adjustments and poor product quality uniformity.

Method used

Data on carbon number distribution and hydrocarbon composition are obtained through online spectral analysis. A dynamic molecular library is established, and reaction kinetic parameters and neural network models are optimized by combining genetic algorithms to generate a molecular-level reaction network. Gas-liquid phase equilibrium calculations are performed, and the predicted stream mass is output.

Benefits of technology

It enables real-time capture of changes in feed composition, complete description of molecule types and reaction pathways, adaptive adjustment of kinetic parameters, and improves the prediction accuracy of nonlinear properties such as octane number, thus solving the problems of lag and insufficient accuracy of traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121034458A_ABST
    Figure CN121034458A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of petrochemical production, and discloses a molecular-level method and system for predicting the quality of any stream in petrochemical production. The method comprises the following steps: carrying out online spectral analysis on a feed stream to obtain carbon number distribution and hydrocarbon composition data, and establishing a dynamic molecular library through structural unit coding; establishing a reaction rule library according to a reaction mechanism, and matching with the molecular library to generate a reaction network; establishing a reaction kinetics equation set in which the feed composition correction factor is introduced, and optimizing parameters; and performing gas-liquid phase equilibrium calculation on the reaction product to obtain stream molecular composition, extracting a structure descriptor, inputting the structure descriptor into a neural network model, introducing a component interaction item, and outputting a stream quality prediction result. The problems that stream quality prediction lags behind, precision is low, and feeding fluctuation cannot be adapted in real time in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of petrochemical production, and in particular to a method and system for predicting the quality of any stream in petrochemical production at a molecular level. BACKGROUND

[0002] In the production process of oil refining and chemical industry, the traditional method of operating device is based on the corresponding adjustment of the off-line measurement results of the physical and chemical properties of the stream. The operator obtains the macroscopic property data such as density, distillation range, octane number, etc. of the key stream by periodic sampling analysis, and adjusts the operating parameters according to the measurement results to judge the running state of the device. This method relies on the lumped model to describe the reaction process, simplifies the complex hydrocarbon mixture into several hypothetical components, establishes a reaction kinetics model through the conversion relationship between the lumped components, and then predicts the product properties. Some technologies use a single molecular model to describe a specific reaction, but only establish a molecular level model for the main reaction path, and the treatment of secondary reactions and complex isomers still relies on the lumped method.

[0003] The traditional method has many shortcomings. On the one hand, there is obvious hysteresis in operating or optimizing the device. It usually takes several hours or even longer to obtain the results from sampling analysis, and during this period, the device has undergone several operation cycles, which cannot respond to feed fluctuations or changes in working conditions in a timely manner. On the other hand, this method only relies on the information of the stream concerned during the operation of the device to operate the device, and lacks real-time, in-depth and detailed understanding of the process variables at key positions in the process. The production status of the device is not accurately and clearly understood by the process personnel and management personnel. The operation adjustment is based on experience and macroscopic correlation rather than accurate understanding of the internal mechanism, which is difficult to achieve theoretical optimization, resulting in insufficient ability to diagnose and analyze the root cause of abnormal working conditions, low control precision, and poor product quality uniformity. SUMMARY

[0004] The present application provides a method and system for predicting the quality of any stream in petrochemical production at a molecular level, which solves the problems of lagging, low precision and inability to adapt to feed fluctuations in real time in the prior art by establishing a dynamically updated molecular library, introducing a feed composition correction factor, optimizing kinetic parameters using a genetic algorithm, correcting binary interaction parameters, and introducing component interaction terms using a neural network.

[0005] In a first aspect, the present application provides a method for predicting the quality of any stream in petrochemical production at a molecular level, which comprises: Step S1: performing online spectral analysis on the feed stream to obtain carbon number distribution data and hydrocarbon composition data; digitally characterizing the molecules by structural unit coding based on the carbon number distribution data and hydrocarbon composition data to obtain a dynamic molecular library; Step S2: establishing a reaction rule base containing multiple types of elementary reactions according to a reaction mechanism; matching the molecules in the dynamic molecular library with the reaction rule base to generate a molecular-level reaction network; Step S3: establishing a reaction kinetics equation set based on the molecular-level reaction network, wherein a correction factor calculated according to changes in feed composition is introduced into a rate equation; and performing optimization solving on kinetic parameters of the reaction kinetics equation set to obtain optimized kinetic parameters; Step S4: inputting reaction products into a separation simulation system to perform gas-liquid phase equilibrium calculation to obtain molecular compositions of each stream; extracting structural descriptors from the molecular compositions, introducing component interaction items through a neural network model to perform calculation, and outputting stream mass prediction results.

[0006] In a second aspect, the present application provides a system for molecular-level prediction of mass of any stream in petrochemical production, comprising: An acquisition module is configured to perform online spectrum analysis on a feed stream to obtain carbon number distribution data and hydrocarbon composition data; and perform digital characterization on molecules through a structural unit coding method based on the carbon number distribution data and the hydrocarbon composition data to obtain a dynamic molecular library. A matching module is configured to establish a reaction rule base containing multiple types of elementary reactions according to a reaction mechanism; and match molecules in the dynamic molecular library with the reaction rule base to generate a molecular-level reaction network. A solving module is configured to establish a reaction kinetics equation set based on the molecular-level reaction network, wherein a correction factor calculated according to changes in feed composition is introduced into a rate equation; and perform optimization solving on kinetic parameters of the reaction kinetics equation set to obtain optimized kinetic parameters. An extraction module is configured to input reaction products into a separation simulation system to perform gas-liquid phase equilibrium calculation to obtain molecular compositions of each stream; extract structural descriptors from the molecular compositions, introduce component interaction items through a neural network model to perform calculation, and output stream mass prediction results.

[0007] In a third aspect, a device for molecular-level prediction of mass of any stream in petrochemical production is provided, comprising: a memory and at least one processor, wherein the memory stores instructions; and the at least one processor invokes the instructions in the memory to enable the device for molecular-level prediction of mass of any stream in petrochemical production to perform the above-described method for molecular-level prediction of mass of any stream in petrochemical production.

[0008] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are run on a computer, the computer is enabled to perform the above-described method for molecular-level prediction of mass of any stream in petrochemical production.

[0009] In the technical solutions provided in the present application, carbon number distribution data and hydrocarbon composition data are obtained by online spectral analysis of the feed stream, and dynamic molecular library is obtained by digital characterization of molecules using structural unit coding method. Compared with the existing technology which relies on offline sampling analysis and fixed molecular library, the technical solutions provided in the present application realize real-time capture of feed composition changes and dynamic update of molecular library, and solve the problem that the traditional method cannot respond to feed fluctuations in time due to sampling analysis lag. According to the reaction mechanism, a reaction rule library containing multiple types of elementary reactions is established, molecules in the dynamic molecular library are matched with the reaction rule library to generate a molecular-level reaction network, compared with the existing technology which uses lumped model or only establishes molecular model for main reactions, the technical solutions provided in the present application realize complete description of all molecular species and all reaction paths, and solve the problem that the traditional method cannot track specific molecular conversion paths and is inaccurate in processing complex isomers. Based on the molecular-level reaction network, a reaction kinetics equation set is established, a correction factor calculated according to the change of feed composition is introduced into the rate equation, and the kinetic parameters of the reaction kinetics equation set are optimized and solved to obtain optimized kinetic parameters, compared with the existing technology which uses fixed kinetic parameters or only considers the influence of temperature and pressure, the technical solutions provided in the present application realize adaptive adjustment of kinetic parameters with feed poison concentration and heavy component content, and solve the problem that the inaccuracy of kinetic parameters in the traditional method leads to large deviation between model prediction and actual value. The reaction products are input into a separation simulation system for gas-liquid equilibrium calculation to obtain the molecular composition of each stream, structural descriptors are extracted from the molecular composition, and the component interaction term is introduced through a neural network model for calculation and output of stream mass prediction results, compared with the existing technology which uses linear harmonic model or ignores component interaction, the technical solutions provided in the present application realize accurate prediction of non-linear properties such as octane number, and solve the problem of insufficient prediction accuracy of sensitive properties of molecular composition in the traditional method.

[0010] In the specific application field of petrochemical production stream quality prediction, the genetic algorithm and neural network model used in this application are designed specifically for the characteristics of this field, playing a key role. In the optimization of reaction kinetics parameters, the genetic algorithm encodes the rate constant and adsorption equilibrium constant as individual chromosomes, takes the deviation square sum of the measured composition at the reactor outlet and the model predicted composition as the fitness function, realizes the global optimization of multiple parameters, avoids the problem of local optimization easily trapped by traditional gradient optimization method, and is especially suitable for the case where there are a large number of parameters to be optimized in petrochemical reaction system and the parameters are coupled. In the prediction of stream quality, the neural network model takes the weighted average value of the structure descriptor as the basic input, introduces the component interaction strength as the additional feature, uses the nonlinear transformation ability of the hidden layer to capture the complex nonlinear mapping relationship between the molecular structure parameters and the macro quality index, and is especially suitable for the prediction of octane number which is highly sensitive to molecular composition and presents significant non-additive. Compared with the traditional linear regression or simple harmonic rule based method, the neural network can learn the synergistic effect and inhibition effect between different molecular types, thereby significantly improving the prediction accuracy. BRIEF DESCRIPTION OF DRAWINGS

[0011] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor based on these drawings.

[0012] Figure 1 An embodiment schematic diagram of the method for predicting the quality of any stream in petrochemical production at the molecular level in the embodiments of the present application; Figure 2 An embodiment schematic diagram of the method for predicting the quality of any stream in petrochemical production at the molecular level in the embodiments of the present application; Figure 3 An embodiment schematic diagram of the method for predicting the quality of any stream in petrochemical production at the molecular level in the embodiments of the present application; Figure 4 An embodiment schematic diagram of the method for predicting the quality of any stream in petrochemical production at the molecular level in the embodiments of the present application; DETAILED DESCRIPTION

[0013] The embodiments of the present application provide a method and system for predicting quality of any stream in petrochemical production at a molecular level. The terms "first", "second", "third", "fourth" and the like (if any) in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not have to be used to describe a particular order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the term "comprising" or "having" and any variation thereof is intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product or device.

[0014] For ease of understanding, the specific processes of the embodiments of the present application are described below, please refer to Figure 1 One embodiment of the method for predicting quality of any stream in petrochemical production at a molecular level in the embodiments of the present application includes: Step S1: performing online spectrum analysis on a feed stream to obtain carbon number distribution data and hydrocarbon composition data; performing digital characterization on molecules through a structural unit coding method according to the carbon number distribution data and the hydrocarbon composition data to obtain a dynamic molecular library; Step S2: establishing a reaction rule library containing multiple types of basic reactions according to a reaction mechanism; matching molecules in the dynamic molecular library with the reaction rule library to generate a molecular-level reaction network; Step S3: establishing a reaction kinetics equation set based on the molecular-level reaction network, wherein a correction factor calculated according to feed composition changes is introduced into a rate equation; performing optimization and solving on kinetic parameters of the reaction kinetics equation set to obtain optimized kinetic parameters; Step S4: inputting reaction products into a separation simulation system to perform gas-liquid phase equilibrium calculation to obtain molecular composition of each stream; extracting structural descriptors from the molecular composition, introducing a component interaction term through a neural network model to perform calculation, and outputting a stream quality prediction result.

[0015] It can be understood that the execution subject of the present application can be a system for predicting quality of any stream in petrochemical production at a molecular level, and can also be a terminal or a server, which is not limited here. The embodiments of the present application take a server as an execution subject for example.

[0016] Specifically, the feed data is obtained by online detection and a dynamic molecular library is established. Gas chromatography-hydrogen flame ionization detector separates and quantifies the components of the feed, obtaining the content distribution of compounds with different carbon numbers; Fourier transform ion cyclotron resonance mass spectrometer identifies the precise mass of molecules by the cyclotron frequency of ions in a magnetic field; near-infrared spectrometer distinguishes aromatic hydrocarbons, naphthenes and paraffins by characteristic absorption peaks. The detected molecules are coded by structure unit-bond matrix according to carbon skeleton structure, substituent position and bonding mode, the matrix elements include methyl unit, methylene unit, cyclic unit and aromatic ring unit, forming the coded molecular matrix. The distribution probability of each type of hydrocarbon under different carbon numbers is calculated using a three-parameter Gamma distribution function, and a structure constraint factor is introduced for correction. When the density of the raw material or the content of aromatic hydrocarbons changes by more than a threshold value, the parameters are recalculated, and finally a dynamic molecular library containing C5 to C12 isomers is generated.

[0017] According to the catalytic reforming mechanism, a reaction rule library containing dehydrogenation cyclization, isomerization, hydrocracking, aromatization and hydrogenolysis is established. The molecular structure in the dynamic molecular library is matched with the reaction rule by structure unit-bond matrix mode, and the molecular structure characteristics that meet the reaction conditions are identified by comparing the structure unit types and connection relationships in the matrix. When the concentration of paraffins changes by more than a set threshold value, the activity of the reaction path involving this type of molecule is re-evaluated. According to the matching results, the conversion relationship between molecular species is determined, and a reaction network is constructed using graph theory algorithm, each molecular species corresponds to a node, and each reaction path corresponds to a directed edge between nodes, and a stoichiometric coefficient matrix is generated to record the conversion proportion relationship between molecules.

[0018] Based on the stoichiometric coefficient matrix, a set of reaction kinetics equations is established. The correction factor in the rate equation is calculated according to the sulfur content, nitrogen content and heavy component content in the feed. The higher the concentration of these poisons and heavy components, the smaller the correction factor, and the lower the reaction rate. The reaction kinetics equation set is input into the genetic algorithm, and the individual population containing rate constants and adsorption equilibrium constants is initialized. The model predicted composition of each individual at the reactor outlet is calculated, and the sum of the squared deviations between the predicted composition and the measured composition is taken as the fitness function value. According to the fitness value, the individual is selected, crossed and mutated to generate a new population. When the fitness function value is less than the convergence threshold, the parameters corresponding to the optimal individual are output. According to the optimized rate constants and adsorption equilibrium constants, a set of mass conservation differential equations for each component is established, and numerical algorithm is used to solve the concentration change data of each molecular component.

[0019] The reaction product is input into a separation simulation system, the gas-liquid phase equilibrium is calculated by using a state equation, the binary interaction parameters are calculated according to the boiling point difference and eccentric factor difference of components and are corrected according to the operating temperature and pressure of the separation column, and the molecular composition of each stream is obtained by solving a flash equation. Structural descriptors such as carbon number, branching degree, ring number and aromatic ring number are extracted from the molecular composition, and the mass fraction weighted average values of these structural descriptors are input into a three-layer feedforward neural network. The input layer of the neural network receives the structural descriptor data, the hidden layer performs nonlinear transformation through a neuron activation function, and the interaction strength between components is calculated at the same time. When the interaction strength exceeds a set threshold value, the interaction term is input into the network as an additional feature. The output layer outputs the prediction results of the stream mass of octane number, density and PONA composition.

[0020] In a specific embodiment, step S1 comprises: An online gas chromatograph-hydrogen flame ionization detector, Fourier transform ion cyclotron resonance mass spectrometer and near-infrared spectrometer are used to continuously detect the feed stream, and carbon number distribution data, aromatic content data, naphthene content data and paraffin content data are obtained; Molecules in the carbon number distribution data are encoded according to carbon skeleton structure, substituent position and bonding mode to obtain an encoded molecular matrix, wherein the matrix elements include methyl units, methylene units, cyclic units and aromatic ring units. Based on the aromatic content data, naphthene content data and paraffin content data, a three-parameter Gamma distribution function is used to calculate the distribution probability of each type of hydrocarbon at different carbon numbers, and a structure constraint factor is introduced to modify the distribution probability. When the detected change in feedstock density exceeds a set density threshold or the change in aromatic content exceeds a set composition threshold, the distribution probability is recalculated. According to the modified distribution probability and the encoded molecular matrix, a dynamic molecular library containing all isomers of carbon numbers C5 to C12 is generated.

[0021] Specifically, the online gas chromatography-hydrogen flame ionization detector separates the mixture in the feed stream by boiling point difference in the chromatographic column through the carrier gas, and different carbon number hydrocarbon compounds flow out of the chromatographic column at different times, and the components flowing out enter the hydrogen flame ionization detector, and the organic matter burns in the hydrogen-air flame to generate positive ions and electrons, and the detector collects these charged particles to form a current signal, and the current intensity is proportional to the mass of the organic matter entering the detector, and the type and content of each carbon number compound are determined according to the retention time and response signal intensity, and carbon number distribution data are formed. The Fourier transform ion cyclotron resonance mass spectrometer ionizes the feed sample and injects it into a superconducting magnetic field, and ions of different mass-to-charge ratios make cyclotron motion in the magnetic field at different frequencies, and the detector records the time domain signal of the ions, and the time domain signal is converted into a frequency domain signal by Fourier transform, and the frequency is inversely proportional to the mass-to-charge ratio, and the molecular formula is accurately calculated according to the frequency spectrum peak position, and the specific molecular formula is identified in combination with the carbon number distribution data. The near-infrared spectrometer irradiates the feed sample, and the benzene ring carbon-hydrogen bond in the aromatic hydrocarbon molecule produces an absorption peak at a specific wavelength, the cyclic carbon-hydrogen bond of the naphthene produces an absorption peak at another wavelength, and the straight-chain carbon-hydrogen bond of the paraffin absorbs at different wavelengths, the absorbance of each wavelength is measured, and the absorbance is converted into the concentration of each type of hydrocarbon according to the Lambert-Beer law to obtain the aromatic content data, the naphthene content data and the paraffin content data.

[0022] The carbon number distribution data show that various hydrocarbon molecules in the range of C5 to C12 exist in the feed, and the structure of each molecule is converted into a structural unit-key matrix form. Taking 2-methylpentane as an example, the molecular formula is C6H14, the carbon skeleton is a five-carbon main chain, and a methyl branch is connected to the second carbon. The first row of the matrix records the main chain information, from left to right, it is a methyl unit, a methylene unit, a methylene unit, a methylene unit, and a methyl unit, corresponding to the five carbon atoms of the main chain; the second row of the matrix records the branch information, and a methyl unit is marked at the second column position, indicating that the second carbon is connected to the branch methyl; and the third dimension of the matrix records the bonding mode, which marks which units are connected by a single bond. For cyclohexane, the carbon skeleton is a six-membered ring structure, the first row of the matrix records six ring units connected head to tail to form a closed ring, and each ring unit marks the connection of two adjacent units. For toluene, its structure includes a benzene ring and a methyl group, the first row of the matrix records six aromatic ring units to form a benzene ring, and the second row records a methyl unit connected to a certain aromatic ring unit. Through this coding method, all the molecules detected in the feed are converted into coded molecular matrices one by one, and each matrix uniquely corresponds to a molecular structure.

[0023] The three-parameter Gamma distribution function is used to describe the probability distribution of various types of hydrocarbons with different carbon numbers. This function includes a shape parameter that controls the peak shape of the distribution curve, a scale parameter that controls the width of the distribution, and a location parameter that controls the position of the distribution center. For paraffins, the Gamma distribution parameters are fitted based on the detected C5 to C12 paraffin content data, so that the theoretical distribution curve has the smallest residual with the measured data points. For aromatics and naphthenes, their respective Gamma distribution parameters are fitted. Due to the differences in chemical structure stability, a structure constraint factor is introduced to modify the distribution probability. The constraint factor for normal paraffins is set to 1.0, the constraint factor for single branched isoparaffins is set to 0.95 due to slight steric hindrance, the constraint factor for double branched isoparaffins is set to 0.88, and the constraint factor for highly branched isoparaffins is set to 0.75. Multiply the Gamma distribution probability value of each molecule by the corresponding structure constraint factor to obtain the modified distribution probability. The system detects the feed density at certain intervals, compares the current density value with the last cycle density value, calculates the density change, and triggers parameter recalculation when the absolute value of the change exceeds the set density threshold. At the same time, the aromatic content is detected, and the current aromatic mass percentage is compared with the last cycle value. When the change exceeds the set composition threshold, the parameter recalculation is also triggered. The parameter recalculation process is to re-collect spectral data, re-fit the three parameters of the Gamma distribution, and re-calculate the modified distribution probability of each molecule. According to the modified distribution probability and the coded molecular matrix, all possible paraffin, naphthene and aromatic isomers in the range of C5 to C12 are listed, including C5 isomers such as n-pentane, isopentane, neopentane, C6 isomers such as n-hexane, 2-methylpentane, 3-methylpentane, 2,2-dimethylbutane, and so on up to C12. Each molecule is labeled with its coding matrix and modified distribution probability to form a dynamic molecular library.

[0024] In a specific embodiment, step S2 comprises: According to the catalytic reforming reaction mechanism, a reaction rule library is established, which includes dehydrogenation cyclization, isomerization, hydrocracking, aromatization and hydrogenolysis reactions; The molecular structure in the dynamic molecular library is matched with the structure unit-bond electric matrix mode in the reaction rule library, and the molecular structure characteristics that meet the reaction conditions are identified. When the paraffin concentration changes exceed the set concentration threshold, the reaction path activity involving the corresponding class of molecules is re-evaluated; According to the matching results, the conversion relationship between molecular species is established, the reaction network topology is constructed using graph theory algorithm, and the stoichiometric coefficient matrix is generated as the input data of the reaction kinetics equation group.

[0025] Specifically, the dehydrocyclization rule describes the process of removing six hydrogen atoms from a six-carbon chain and forming a six-membered ring, the rule requires the presence of at least six consecutive methylene or methyl units in the molecular structure, and a cyclic unit is generated and hydrogen molecules are released after the reaction. The isomerization rule describes the rearrangement process of the carbon skeleton, the rule requires the displacement of the methyl branch on a certain methylene unit in the molecule, or the main chain is broken and reconnected to form isomers with different degrees of branching. The hydrocracking rule describes the process of breaking carbon-carbon bonds, the rule requires that when the carbon number of the molecule is greater than six, it is broken into two small molecules in the presence of a catalyst and hydrogen. The aromatization rule describes the process of converting naphthenes to aromatics, the rule requires the presence of a six-membered ring unit in the molecule, and the six-membered ring unit is converted to an aromatic ring unit and dehydrogenated after the reaction. The hydrogenolysis rule describes the process of removing the terminal carbon atom, the rule requires the breaking of the bond between the terminal methyl unit and the adjacent unit, generating a smaller carbon number molecule and methane.

[0026] The encoding matrix of each molecule in the dynamic molecular library is compared with the rules in the reaction rule library one by one. Taking n-heptane as an example, its encoding matrix shows seven carbon atoms arranged in series. Comparing this matrix with the dehydrocyclization rule, the rule requires six consecutive carbon atoms, and n-heptane meets this condition, marking that n-heptane can undergo dehydrocyclization reaction to generate methylcyclohexane. Comparing the n-heptane encoding matrix with the isomerization rule, the rule requires that the carbon chain can be rearranged, and the straight-chain structure of n-heptane can be converted into branched isomers such as 2-methylhexane or 3-methylhexane, marking that n-heptane can undergo isomerization reaction. After comparing all molecules with all rules, record which reactions each molecule can participate in and which products are generated. The system continuously monitors the concentration of various types of molecules in the dynamic molecular library, calculates the total molar concentration of paraffins, compares the current concentration with the initial concentration or the concentration at the last time, and when the absolute value of the concentration change exceeds the set concentration threshold, re-evaluate all reaction pathways involving paraffins as reactants. During the re-evaluation process, adjust the activity weight of these reaction pathways according to the current concentration of paraffins, and increase the weight when the concentration increases, and decrease the weight when the concentration decreases.

[0027] According to the structural matching results, the intermolecular conversion relationship is established. A graph theory structure is created, and each molecule in the dynamic molecular library is taken as a node, and the node label contains the molecular name and the encoding matrix. When the matching results show that molecule A generates molecule B through a reaction, a directed edge is drawn between node A and node B, the direction of the edge points from the reactant A to the product B, and the reaction type is marked on the edge. All possible conversion paths are drawn by traversing all matching results to form the reaction network topology. The dynamic molecular library contains all isomers of C5 to C12, a total of 154 molecules, and the reaction network contains 260 reaction paths, and each node in the network is connected to several incoming and outgoing edges. A stoichiometric coefficient matrix is created, the number of rows of the matrix is 154 corresponding to the total number of molecular species, the number of columns of the matrix is 260 corresponding to the total number of reaction paths, and the matrix elements record the stoichiometric coefficients of each molecule in each reaction. For a certain reaction path, the matrix elements corresponding to the reactants are filled with negative values, the matrix elements corresponding to the products are filled with positive values, the numerical value is the stoichiometric number, and the elements corresponding to the molecules not participating in the reaction are filled with zero.

[0028] In a specific embodiment, according to the matching results, the conversion relationship between molecular species is established, the graph theory algorithm is used to construct the reaction network topology structure, and the stoichiometric coefficient matrix is generated as the input data of the reaction kinetics equation group, including: According to the matching results of the molecular structure characteristics, the conversion relationship of each molecular species as a reactant and a product is determined, wherein each molecular species corresponds to a node in the graph theory algorithm, and each reaction path corresponds to a directed edge between nodes; The reaction path importance score is calculated for the reaction path, and the reaction path importance score is calculated according to the reaction rate constant initial value, the reactant concentration participating in the reaction and the reactant structure sensitivity coefficient; when the reaction path importance score changes more than the set score threshold, it is marked as a key fluctuation path; According to the nodes and directed edges, the reaction network topology structure is constructed, and the stoichiometric coefficient matrix recording the conversion relationship between each molecular species is generated, and the dimension of the stoichiometric coefficient matrix is the product of the total number of molecular species and the total number of reaction paths.

[0029] Specifically, the structure matching result records each molecule's ability to participate in reactions and their products. Taking n-hexane as an example, the matching result shows that n-hexane participates in the dehydrocyclization reaction to generate cyclohexane, participates in the isomerization reaction to generate 2-methylpentane or 3-methylpentane, and participates in the hydrocracking reaction to generate propane and propylene. In the graph theory structure, n-hexane node, cyclohexane node, 2-methylpentane node, 3-methylpentane node, propane node and propylene node are created. A directed edge is drawn from the n-hexane node to the cyclohexane node, and the edge is labeled with the dehydrocyclization reaction; a directed edge is drawn from the n-hexane node to the 2-methylpentane node and the 3-methylpentane node, respectively, and the edge is labeled with the isomerization reaction; a directed edge is drawn from the n-hexane node to the propane node and the propylene node, and the edge is labeled with the hydrocracking reaction. By traversing the matching results of all 154 molecules, the nodes and directed edges are sequentially established, and the graph theory representation of all 260 reaction paths is completed.

[0030] The reaction rate constant initial value of the reaction path of n-hexane dehydrocyclization to generate cyclohexane is obtained according to literature or experimental data, the reactant participating in the reaction is n-hexane, the current molar concentration of n-hexane is read from the dynamic molecular library, and the structure sensitivity coefficient of the reactant is determined according to the molecular type, and the sensitivity coefficient of the normal alkane is set to a specific value. Multiply the reaction rate constant initial value, n-hexane concentration and structure sensitivity coefficient to obtain the importance score of the reaction path. The scores of all 260 reaction paths are calculated one by one and the initial score values are recorded. The system continuously monitors the concentration changes of each molecule, and when the concentration of a molecule changes, the scores of all reaction paths involving the molecule as a reactant are recalculated. The recalculated score value is compared with the initial score value or the score value at the last moment, the score change is calculated, and when the absolute value of the change exceeds the set score threshold, the reaction path is marked as a key fluctuation path, indicating that the path has a significant impact on the overall reaction system.

[0031] The number of rows of the matrix is 154, representing 154 kinds of molecules, and the number of columns of the matrix is 260, representing 260 reaction paths. For the reaction path of n-hexane dehydrocyclization to generate cyclohexane, the path corresponds to a column in the matrix, the element value of n-hexane in the column is filled with negative 1 indicating that 1 mole of n-hexane is consumed, the element value of cyclohexane in the column is filled with positive 1 indicating that 1 mole of cyclohexane is generated, and the element values of the remaining 152 molecules in the column are all filled with 0 indicating that they do not participate in the reaction. For the reaction path of n-hexane hydrocracking to generate propane and propylene, the corresponding element of n-hexane is filled with negative 1, the corresponding element of propane is filled with positive 1, the corresponding element of propylene is filled with positive 1, and the corresponding element of the remaining molecules is filled with 0. All 260 reaction paths are processed in turn, and a 154-row and 260-column matrix is filled. The matrix records the conversion relationship and stoichiometric ratio between each molecule species.

[0032] In a specific embodiment, step S3 comprises: The reaction kinetics equation set is established based on the stoichiometric coefficient matrix, wherein a correction factor of the rate equation is calculated according to the concentration of the poison in the feed and the content of the heavy component; The reaction kinetics equation set is input into the genetic algorithm for optimization of the kinetic parameters, and iterative calculation is performed by taking the deviation between the measured composition at the outlet of the reactor and the predicted composition of the model as the objective function; the optimization is terminated when the value of the objective function is less than a preset convergence threshold, and the optimized rate constant and adsorption equilibrium constant are obtained; According to the optimized rate constant and adsorption equilibrium constant, the mass conservation differential equation set of each component is established, and the differential equation set is solved by using a numerical solution algorithm to obtain the concentration change data of each molecular component as the reaction product.

[0033] Specifically, the reaction kinetics equation set is established by using the stoichiometric coefficient matrix, and each reaction path corresponds to a rate equation. The rate equation describes the relationship between the reaction rate and the concentrations of reactants, temperature, and catalyst activity, wherein a correction factor is introduced to describe the inhibitory effect of the poisons in the feed and the heavy components on the reaction activity. The sulfides and nitrides in the feed act as catalyst poisons and are adsorbed on the active sites of the catalyst, reducing the adsorption capacity of the catalyst for hydrocarbon molecules and the reaction activity of the catalyst. The mass percentage of sulfur content and the mass percentage of nitrogen content are read from the feed detection data, the current sulfur content is divided by the reference sulfur content to obtain the sulfur content ratio, and the current nitrogen content is divided by the reference nitrogen content to obtain the nitrogen content ratio. The heavy component refers to high molecular weight hydrocarbons with a carbon number greater than twelve. These molecules have a large molecular weight and a slow diffusion rate, and are prone to carbon deposition in the pores of the catalyst, thereby blocking the pores. The sum of the mass percentages of all molecules with a carbon number greater than twelve is calculated from the feed detection data as the heavy component content, and the current heavy component content is divided by the reference heavy component content to obtain the heavy component content ratio. The correction factor is equal to 1 minus the sulfur content ratio multiplied by the sulfur inhibition coefficient, minus the nitrogen content ratio multiplied by the nitrogen inhibition coefficient, minus the heavy component content ratio multiplied by the heavy component inhibition coefficient, and the inhibition coefficients are calibrated according to experimental data. The correction factor is multiplied by the rate equation of each reaction path to obtain the actual reaction rate considering the influence of the poisons in the feed and the heavy components.

[0034] The genetic algorithm finds the optimal parameter combination by simulating the biological evolution process. First, an initial population containing multiple sets of parameters is randomly generated, with each set of parameters referred to as an individual. The individual is represented by a chromosome code, and each gene position of the chromosome corresponds to the value of a parameter to be optimized. The population size is set to determine the number of individuals, the maximum iteration number is set to limit the optimization time, the crossover probability is set to control the frequency of gene exchange between individuals, and the mutation probability is set to control the frequency of random mutation of genes. For each individual in the population, substitute the parameters into the reaction kinetics equation set, solve the equation set to obtain the model predicted concentration of each molecular component at the reactor outlet, collect the measured concentration of each component at the reactor outlet from the actual device, and calculate the difference between the predicted concentration and the measured concentration of each component one by one. The sum of the squares of the concentration deviations of all components is the fitness function value of the individual, and the smaller the fitness function value, the better the individual parameters. According to the fitness function value, all individuals are sorted, and the individuals with better fitness are selected as parents. According to the crossover probability, the chromosomes of the parent individuals are crossed, that is, two parent individuals are randomly selected, a crossover position on the chromosome is randomly selected, and the gene fragments after the crossover position of the two parents are exchanged to generate two offspring individuals. According to the mutation probability, the offspring individuals are mutated, that is, a certain gene position on the chromosome is randomly selected, and the value of the gene position is randomly changed to other values within the allowed range. Combine the parents and offspring to form a new generation population, and repeat the selection, crossover, and mutation operations. After each iteration, record the function value of the individual with the best fitness in the current population. Determine whether the current optimal fitness function value is less than the preset convergence threshold, or whether the improvement amplitude of the optimal fitness is less than the set improvement threshold for multiple generations. When any of the termination conditions is met, stop the iteration, and output the parameters of the current optimal individual as the optimized rate constants and adsorption equilibrium constants.

[0035] According to the optimized rate constants and adsorption equilibrium constants, substitute these parameters into the reaction kinetics equation set to obtain the actual reaction rate of each reaction path. According to the stoichiometric coefficient matrix, determine which reactions the molecule participates in as a reactant and which reactions the molecule participates in as a product. Multiply all reaction rates of the molecule as a reactant by the corresponding stoichiometric coefficient and sum them up to obtain the total consumption rate of the molecule. Multiply all reaction rates of the molecule as a product by the corresponding stoichiometric coefficient and sum them up to obtain the total generation rate of the molecule. The rate of change of the concentration of the molecule with respect to time is equal to the total generation rate minus the total consumption rate. Thus, the mass conservation differential equation of the molecule is established. Use a numerical solution algorithm to perform time integration on the differential equation set. Starting from the reactor inlet time, given the initial concentration of each molecule as the feed concentration, calculate the rate of change of the concentration of each molecule according to the current concentration of each molecule and the differential equation, multiply the rate of change by the time step to obtain the concentration increment, and add the concentration increment to the current concentration to obtain the concentration at the next time. Gradually advance the time until the reactor outlet time, and obtain the concentration data of each molecular component at the reactor outlet as the reaction products.

[0036] In a specific embodiment, the reaction kinetics equation set is input into a genetic algorithm for optimization of kinetic parameters, and iterative calculation is performed by minimizing the deviation between the measured composition at the reactor outlet and the predicted composition of the model as the objective function, including: The population size, maximum iteration number, crossover probability and mutation probability of the genetic algorithm are set as algorithm control parameters, and the individual population containing rate constants and adsorption equilibrium constants is initialized; The model predicted composition of each component at the reactor outlet is calculated, the deviation between the model predicted composition and the measured composition is squared and summed as the fitness function value; the individual is selected, crossed and mutated according to the fitness function value, and a new generation population is generated; It is judged whether the fitness function value is less than the preset convergence threshold or the continuous improvement amplitude is less than the set improvement threshold; when the termination condition is met, the rate constant and adsorption equilibrium constant corresponding to the optimal individual in the current population are output as the optimized kinetic parameters.

[0037] Specifically, the optimization process is regulated by setting control parameters. The population size determines the number of individuals contained in each generation, the larger the size, the wider the search space but the larger the calculation amount. The maximum iteration number limits the number of algorithm runs to prevent infinite loops. The crossover probability controls the possibility of exchanging genes between two parent individuals, and the higher the crossover probability, the stronger the population diversity. The mutation probability controls the possibility of random change of individual genes, and too high mutation probability will destroy the existing good genes, and too low mutation probability will easily fall into local optimum. When initializing the population, a number of individuals are created, each individual is represented by a set of numerical values, and the coding contains all the rate constants and adsorption equilibrium constants to be optimized. The rate constant describes the speed of reaction, and the numerical range is set according to the reaction type. The adsorption equilibrium constant describes the adsorption strength of the reactant on the catalyst surface, and the numerical range is set according to the molecular type. Randomly extract initial values within the allowed range for each parameter, combine all parameter values to form an individual, and repeat this process to generate the entire initial population.

[0038] For each individual in the population, the encoded parameters are substituted into the reaction kinetics equations. The reaction kinetics equations describe the variation of the concentration of each molecule in the reactor with time and space, and solving the equations gives the model predicted concentration of each molecule at the outlet of the reactor. The actual concentration of each molecule is obtained from sampling and analysis of the outlet of the actual device. For each molecule species, the difference between the model predicted concentration and the actual concentration is calculated, and the difference is squared and summed over all molecule species to give the fitness function value for the individual. The fitness function value reflects the quality of the set of parameters, with a smaller value indicating a closer match between the model prediction and the actual. Selection is performed on the basis of the fitness function value of all individuals, with individuals of higher fitness being more likely to be selected. The selected individuals are used as parents to generate offspring. The selected parents are paired up, and a crossover probability is used to determine whether to perform crossover. If crossover is performed, a crossover point is randomly selected on the chromosome, and the gene segments on either side of the crossover point are swapped between the two parents to generate two offspring. A mutation probability is used to determine whether to perform mutation on the offspring. If mutation is performed, a gene position is randomly selected on the chromosome, and the parameter value at that position is replaced by a random value within the allowed range. The parents and offspring form a new generation, and a generation iteration is complete.

[0039] After each generation iteration is complete, the individual with the smallest fitness function value in the current population is found, and the optimal individual and its fitness function value are recorded. It is determined whether the current optimal fitness function value is smaller than a pre-set convergence threshold. If it is smaller than the threshold, it is considered that the model prediction accuracy has met the requirements, and the iteration is terminated. The optimal fitness function values of consecutive generations are recorded, and the difference between the optimal values of adjacent generations is calculated as the improvement amplitude. It is determined whether the improvement amplitudes of consecutive generations are all smaller than a set improvement threshold. If they are all smaller than the threshold, it is considered that the optimization process has converged and cannot continue to improve, and the iteration is terminated. When any of the termination conditions is met, the parameter encoding of the individual with the optimal fitness in the current population is output. The rate constants and adsorption equilibrium constants contained in the encoding are the optimized kinetic parameters, which make the deviation between the predicted composition of the reaction kinetics model and the measured composition the smallest.

[0040] In a specific embodiment, step S4 comprises: The reaction products are input into a separation simulation system to perform gas-liquid phase equilibrium calculation, in which the binary interaction parameters are calculated according to the boiling point difference and the eccentric factor difference of the components and are corrected according to the operating conditions to obtain the molecular composition of each stream; The structural descriptors including the carbon number, the branching degree, the ring number and the aromatic ring number are extracted from the molecular composition; The weighted average of the structural descriptors is input into a neural network to calculate the component interaction strength, and when the interaction strength exceeds a set threshold value, it is input as an additional feature; and the output includes the predicted results of the stream quality, including the octane number, the density and the composition.

[0041] Specifically, the reaction product contains a gas-liquid mixture, which is input into a separation simulation system for gas-liquid separation calculation. The gas-liquid equilibrium describes the distribution relationship of the concentration of each component in the gas phase and the liquid phase at a specific temperature and pressure. The binary interaction parameter describes the interaction strength between two different molecules, which affects their distribution behavior in the gas-liquid two phases. For any two components, read the respective boiling point values, calculate the absolute value of the difference between the boiling points of the two as the boiling point difference; read the respective eccentric factor values, which reflect the degree of deviation of the molecule from the spherical shape, and calculate the absolute value of the difference between the two eccentric factors as the eccentric factor difference. Multiply the boiling point difference and the eccentric factor difference by the corresponding coefficients respectively and add them to obtain the initial value of the interaction parameter of the binary component pair. According to the current operating temperature and operating pressure of the separation column, calculate the difference between the temperature and the reference temperature, the difference between the pressure and the reference pressure, multiply the two differences by the correction coefficients respectively and add them to the initial value of the interaction parameter to obtain the corrected binary interaction parameter. The gas-liquid equilibrium is calculated by using the state equation combined with the corrected interaction parameter, and the gas phase stream and the liquid phase stream are obtained by iteration of the flash equation. The molecular composition of each stream is recorded, and the molar fraction of each molecular species is recorded.

[0042] The structural information is extracted from the molecular composition data of each stream. For each molecular species, read the total number of carbon atoms from its encoding matrix as the carbon number, and calculate the ratio of the number of carbon atoms outside the main chain to the total carbon number as the branching degree, which indicates the more branched the molecule. Calculate the number of cyclic units in the molecule as the ring number, which is zero for chain molecules and greater than zero for molecules containing ring structures. Calculate the number of aromatic ring units in the molecule as the aromatic ring number, which is zero for non-aromatic hydrocarbons and greater than zero for aromatic hydrocarbons. After extracting the four types of structural descriptors for each molecular species in the stream, calculate the weighted contribution according to the molar fraction of the molecule in the stream, and accumulate the weighted contributions of all molecules to obtain the carbon number weighted average value, the branching degree weighted average value, the ring number weighted average value and the aromatic ring number weighted average value of the whole stream.

[0043] The weighted average of the extracted structural descriptors is used as the basic input feature of the neural network. The neural network consists of an input layer, hidden layers, and an output layer. The number of neurons in the input layer corresponds to the number of structural descriptor types, the hidden layers contain several neurons performing nonlinear transformations, and the number of neurons in the output layer corresponds to the number of quality indicators to be predicted. Simultaneously, the interaction strength between different molecular types in the stream is calculated. For any two molecules, their mole fractions are multiplied, then multiplied by the absolute value of their octane number difference, and then multiplied by an exponential function. The exponent of the exponential function is the negative carbon number difference divided by a specific constant to obtain the interaction strength of that molecular pair. All molecular pairs are iterated, and the interaction strength is compared with a set threshold. When the interaction strength is greater than the threshold, the interaction term is added as an additional feature to the neural network input. The neural network calculates based on the input features using a weight matrix and activation function. The output layer generates three values ​​corresponding to the predicted octane number, density, and PONA composition, respectively. These prediction results constitute the stream quality prediction results.

[0044] Figure 2 This diagram illustrates a comparison of the errors in the flow quality indicators of different prediction methods in the embodiments of this application. It compares the error performance of the traditional lumped method, the single-molecule model, and the method of this invention in predicting the quality indicators of the liquid phase flow in the bottom of the depentanizer tower. The traditional lumped method, because it can only describe the macroscopic lumped components and cannot track specific molecular transformations, results in an octane number prediction error of 2.8% and a density prediction error of 0.045 g / cm³. 3 The PONA composition prediction error reached 4.2%; although the single-molecule model can describe some molecular information, it lacks a dynamic update mechanism and feed composition correction, with an octane number error of 1.5% and a density error of 0.028 g / cm³. 3 The original PONA composition error was 2.6%; however, the method of this invention, by establishing a dynamic molecular library containing all C5 to C12 isomers, introducing a feed composition change correction factor, using a genetic algorithm to optimize kinetic parameters, and introducing component interaction terms through a neural network, reduces the octane number prediction error to 0.6% and the density prediction error to 0.015 g / cm³. 3 The prediction error of PONA composition was reduced to 1.2%, which verifies that the method of the present invention has a significant advantage over the existing technology in terms of the accuracy of stream quality prediction, and solves the technical problems of traditional methods such as operation lag, low control accuracy and poor product quality uniformity.

[0045] The method for predicting the quality of any stream in petrochemical production at the molecular level in the embodiments of this application has been described above. The system for predicting the quality of any stream in petrochemical production at the molecular level in the embodiments of this application is described below. Please refer to [link to relevant documentation]. Figure 3 One embodiment of the system for molecular-level prediction of the quality of any stream in petrochemical production, as described in this application, includes: The acquisition module is used to perform online spectral analysis on the feed stream to obtain carbon number distribution data and hydrocarbon composition data; based on the carbon number distribution data and hydrocarbon composition data, the molecules are digitally characterized through structural unit encoding to obtain a dynamic molecular library; The matching module is used to establish a reaction rule library containing multiple types of elementary reactions based on the reaction mechanism; and to match molecules in the dynamic molecular library with the reaction rule library to generate a molecular-level reaction network. The solution module is used to establish a set of reaction kinetic equations based on the molecular-level reaction network, wherein the rate equations incorporate correction factors calculated based on changes in feed composition; and to optimize the kinetic parameters of the set of reaction kinetic equations to obtain optimized kinetic parameters. The extraction module is used to input the reaction products into the separation simulation system for gas-liquid phase equilibrium calculation to obtain the molecular composition of each stream; extract the structural descriptor from the molecular composition, introduce the component interaction term through the neural network model for calculation, and output the stream quality prediction result.

[0046] above Figure 3 The system for predicting the quality of any stream in petrochemical production at the molecular level, as described in this embodiment of the invention, is described in detail from the perspective of modular functional entities. The device for predicting the quality of any stream in petrochemical production at the molecular level, as described in this embodiment of the invention, is described in detail from the perspective of hardware processing.

[0047] Reference Figure 4 This invention also provides a device for molecular-level prediction of the mass of any stream in petrochemical production. This device can be a server, and its internal structure can be as follows: Figure 4 As shown, the device for predicting the mass of any stream in petrochemical production at the molecular level includes a processor, memory, display screen, input device, network interface, and database connected via a system bus. The processor in this computer design provides computational and control capabilities. The memory of the device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the device stores the data corresponding to this embodiment. The network interface of the device is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements the above-described method.

[0048] Those skilled in the art will understand that Figure 4The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the device for molecular-level prediction of the quality of any stream in petrochemical production to which the present invention is applied.

[0049] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the method for predicting the quality of arbitrary streams in petrochemical production at the molecular level.

[0050] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0051] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a device (which can be a personal computer, server, or network device, etc.) that predicts the mass of any stream in petrochemical production at the molecular level to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0052] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting the quality of any stream in petrochemical production at the molecular level, characterized in that, The method includes: Step S1: Perform online spectral analysis on the feed stream to obtain carbon number distribution data and hydrocarbon composition data; based on the carbon number distribution data and hydrocarbon composition data, digitally characterize the molecules using structural unit encoding to obtain a dynamic molecular library; Step S2: Establish a reaction rule library containing multiple types of elementary reactions based on the reaction mechanism; match the molecules in the dynamic molecular library with the reaction rule library to generate a molecular-level reaction network; Step S3: Establish a set of reaction kinetic equations based on the molecular-level reaction network, wherein the rate equations incorporate correction factors calculated based on changes in feed composition; optimize the kinetic parameters of the set of reaction kinetic equations to obtain optimized kinetic parameters; Step S4: Input the reaction products into the separation simulation system to perform gas-liquid phase equilibrium calculations to obtain the molecular composition of each stream; extract the structural descriptor from the molecular composition, introduce the component interaction term through the neural network model for calculation, and output the stream quality prediction results.

2. The method for predicting the quality of any stream in petrochemical production at the molecular level according to claim 1, characterized in that, Step S1 includes: The feed stream was continuously monitored using an online gas chromatography-flame ionization detector, Fourier transform ion cyclotron resonance mass spectrometry, and near-infrared spectroscopy to obtain carbon number distribution data, aromatic hydrocarbon content data, cycloalkanes content data, and alkanes content data. The molecules in the carbon number distribution data are encoded using a structural unit-bond-electric matrix according to their carbon skeleton structure, substituent positions, and bonding modes. The matrix elements include methyl units, methylene units, cyclic units, and aromatic ring units, resulting in an encoded molecule matrix. Based on the aromatic hydrocarbon content data, cycloalkanes content data, and alkanes content data, the distribution probability of each type of hydrocarbon under different carbon numbers is calculated using a three-parameter Gamma distribution function, and a structural constraint factor is introduced to correct the distribution probability. When the change in raw material density exceeds a set density threshold or the change in aromatic hydrocarbon content exceeds a set composition threshold, the distribution probability is recalculated. Based on the corrected distribution probability and the encoded molecular matrix, a dynamic molecular library containing all isomers from C5 to C12 carbon numbers is generated.

3. The method for predicting the quality of any stream in petrochemical production at the molecular level according to claim 1, characterized in that, Step S2 includes: A reaction rule library including dehydrogenation cyclization, isomerization, hydrocracking, aromatization and hydrogenolysis reactions was established based on the catalytic reforming reaction mechanism. The molecular structures in the dynamic molecular library are matched with the elementary reaction rules in the reaction rule library using structural unit-bond-electric matrix pattern matching to identify molecular structural features that meet the reaction conditions; when the alkane concentration changes beyond a set concentration threshold, the activity of the reaction pathway involving the corresponding molecule class is re-evaluated. Based on the matching results, the transformation relationships between molecular species are established. A graph theory algorithm is used to construct the reaction network topology and generate a stoichiometric coefficient matrix as input data for the reaction kinetic equations.

4. The method for predicting the quality of any stream in petrochemical production at the molecular level according to claim 3, characterized in that, The process involves establishing transformation relationships between molecular species based on matching results, constructing a reaction network topology using graph theory algorithms, and generating a stoichiometric coefficient matrix as input data for the reaction kinetic equations, including: Based on the matching results of the molecular structure features, the transformation relationship between each molecular type as reactant and product is determined, where each molecular type corresponds to a node in the graph theory algorithm, and each reaction path corresponds to a directed edge between nodes. The importance score of the reaction pathway is calculated based on the initial value of the reaction rate constant, the concentration of reactants involved in the reaction, and the reactant structure sensitivity coefficient. When the change in the importance score of the reaction pathway exceeds a set score threshold, it is marked as a critical fluctuation path. Based on the nodes and directed edges, a reaction network topology is constructed, and a stoichiometric coefficient matrix is ​​generated to record the transformation relationships between various molecular types. The dimension of the stoichiometric coefficient matrix is ​​the product of the total number of molecular types and the total number of reaction paths.

5. The method for predicting the quality of any stream in petrochemical production at the molecular level according to claim 4, characterized in that, Step S3 includes: A set of reaction kinetic equations is established based on the stoichiometric coefficient matrix, wherein the correction factor of the rate equation is calculated based on the concentration of poison and the content of heavy components in the feed. The reaction kinetic equations are input into a genetic algorithm to optimize the kinetic parameters. The objective function is to minimize the deviation between the measured composition at the reactor outlet and the model-predicted composition. The optimization is terminated when the objective function value is less than a preset convergence threshold, and the optimized rate constant and adsorption equilibrium constant are obtained. Based on the optimized rate constant and adsorption equilibrium constant, a set of differential equations for mass conservation of each component is established. The set of differential equations is solved using a numerical solution algorithm to obtain the concentration change data of each molecular component as the reaction product.

6. The method for predicting the quality of any stream in petrochemical production at the molecular level according to claim 5, characterized in that, The step of inputting the reaction kinetic equations into a genetic algorithm for kinetic parameter optimization, and using the minimization of the deviation between the measured composition at the reactor outlet and the model-predicted composition as the objective function for iterative calculation, includes: Set the population size, maximum number of iterations, crossover probability, and mutation probability of the genetic algorithm as algorithm control parameters, and initialize the individual population including the rate constant and the adsorption equilibrium constant. For each individual, the model-predicted composition of each component at the reactor outlet is calculated, and the sum of squared deviations between the model-predicted composition and the measured composition is used as the fitness function value. Based on the fitness function value, selection, crossover, and mutation operations are performed on the individuals to generate a new generation population. Determine whether the fitness function value is less than a preset convergence threshold or whether the improvement range over multiple generations is less than a set improvement threshold; when the termination condition is met, output the rate constant and adsorption equilibrium constant corresponding to the individual with the best fitness in the current population as optimization kinetic parameters.

7. The method for predicting the quality of any stream in petrochemical production at the molecular level according to claim 6, characterized in that, Step S4 includes: The reaction products are input into a separation simulation system for gas-liquid phase equilibrium calculation. The binary interaction parameters are calculated based on the difference in boiling points of the components and the difference in eccentricity factor, and are corrected according to the operating conditions to obtain the molecular composition of each stream. Structural descriptors, including carbon number, degree of branching, number of rings, and number of aromatic rings, were extracted from the molecular composition. The weighted average of the structure descriptors is input into the neural network to calculate the strength of component interactions. When the interaction strength exceeds a set threshold, it is used as an additional feature input. The output includes the predicted quality of the stream containing octane number, density, and composition.

8. A system for molecular-level prediction of the quality of any stream in petrochemical production, characterized in that, A method for implementing molecular-level prediction of the quality of any stream in petrochemical production as described in any one of claims 1-7, wherein the system for molecular-level prediction of the quality of any stream in petrochemical production comprises: The acquisition module is used to perform online spectral analysis on the feed stream to obtain carbon number distribution data and hydrocarbon composition data; based on the carbon number distribution data and hydrocarbon composition data, the molecules are digitally characterized through structural unit encoding to obtain a dynamic molecular library; The matching module is used to establish a reaction rule library containing multiple types of elementary reactions based on the reaction mechanism; and to match molecules in the dynamic molecular library with the reaction rule library to generate a molecular-level reaction network. The solution module is used to establish a set of reaction kinetic equations based on the molecular-level reaction network, wherein the rate equations incorporate correction factors calculated based on changes in feed composition; and to optimize the kinetic parameters of the set of reaction kinetic equations to obtain optimized kinetic parameters. The extraction module is used to input the reaction products into the separation simulation system for gas-liquid phase equilibrium calculation to obtain the molecular composition of each stream; extract the structural descriptor from the molecular composition, introduce the component interaction term through the neural network model for calculation, and output the stream quality prediction result.

9. A device for molecular-level prediction of the quality of any stream in petrochemical production, characterized in that, The method includes a memory and a processor, the memory storing a computer program that can run on the processor, the processor executing the computer program to implement the method for molecular-level prediction of the quality of any stream in petrochemical production as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is run by a processor, the processor performs a method for molecular-level prediction of the quality of any stream in petrochemical production as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Molecular-grade wax oil fixed bed hydrogenation model construction and prediction method and device

    CN117727380A

  • Food additive formula optimization method, medium and system

    CN120089245A

  • Method for constructing and optimizing full-fraction oil catalytic cracking reaction kinetic model

    CN120493729A

  • Method, apparatus and system for real-time optimization of molecular-level device, and storage medium

    WO2021249329A1

  • Catalytic cracking unit simulation and prediction method based on molecular-level mechanism model and big data technology

    WO2023040512A1