A method and system for molecular level prediction of quality of any stream in petrochemical production

By combining online spectral analysis and dynamic molecular libraries with genetic algorithms and neural network models, the molecular-level reaction network is updated in real time, solving the problems of lag and low accuracy in stream quality prediction in oil refining and chemical production, and realizing timely response and high-precision prediction of feed fluctuations.

CN121034458BActive Publication Date: 2026-03-03BEIJING PROFESSIONAL DIGITIZE& INTELLIGENTIZE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In oil refining and chemical production, the prediction of feed 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

Carbon number distribution data and hydrocarbon composition data 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. The molecular-level reaction network is updated in real time, gas-liquid phase equilibrium calculations are performed, and the flow stream quality is predicted.

Benefits of technology

It enables real-time capture of changes in feed composition, accurately describes all molecular types and reaction pathways, dynamically adjusts kinetic parameters, improves the prediction accuracy of nonlinear properties such as octane number, and solves the problems of lag and insufficient accuracy of traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121034458B_ABST
    Figure CN121034458B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of petrochemical production, and discloses a method and system for molecular-level prediction of the quality of any flow in petrochemical production. The method comprises the following steps: performing online spectrum analysis on a feed flow 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 the reaction rule library with the molecular library to generate a reaction network; establishing a reaction kinetics equation group with an introduced feed composition correction factor and optimizing parameters; performing gas-liquid phase equilibrium calculation on reaction products to obtain flow molecular composition, inputting structural descriptors into a neural network model to introduce component interaction terms, and outputting flow quality prediction results. The application solves the problems of lagging flow quality prediction, low precision and incapability of real-time adaptation to feed fluctuations in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of petrochemical production technology, and in particular to a method and system for predicting the quality of any stream in petrochemical production at the molecular level. Background Technology

[0002] In petroleum refining and chemical production processes, traditional operating methods rely on offline measurements of the physical and chemical properties of the streams for adjustments. Operators periodically sample and analyze macroscopic properties such as density, distillation range, and octane number of key streams, using these measurements to determine the unit's operating status and adjust operating parameters. This method depends on lumped models to describe the reaction process, simplifying complex hydrocarbon mixtures into several hypothetical components. A reaction kinetic model is established through the transformation relationships between these lumped components to predict product properties. Some technologies use single-molecule models to describe specific reactions, but these only establish molecular-level models for the main reaction pathways, still relying on lumped methods to handle secondary reactions and complex isomers.

[0003] Traditional methods have several shortcomings. On the one hand, there is a significant lag in operating or optimizing the equipment. It usually takes several hours or even longer from sampling and analysis to obtaining results, during which time the equipment has already undergone multiple operating cycles and cannot respond promptly to feed fluctuations or changes in operating conditions. On the other hand, this method relies solely on the flow information monitored during equipment operation, lacking a real-time, in-depth, and detailed understanding of process variables at key points in the process. Process engineers and managers do not have an accurate and clear understanding of the equipment's production status, and operational adjustments are based on experience and macroscopic correlations rather than a precise grasp of the underlying mechanisms, making it difficult to achieve theoretical optimization. This results in insufficient ability to diagnose and analyze abnormal operating conditions, low control precision, and poor product quality uniformity. Summary of the Invention

[0004] This application provides a method and system for molecular-level prediction of the quality of any stream in petrochemical production. By establishing a dynamically updated molecular library, introducing a feed composition correction factor, using a genetic algorithm to optimize kinetic parameters, correcting binary interaction parameters, and introducing component interaction terms through a neural network, this method solves the problems of lagging, low accuracy, and inability to adapt to feed fluctuations in the prediction of stream quality in the prior art.

[0005] In a first aspect, this application provides a method for predicting the quality of any stream in petrochemical production at the molecular level, the method comprising:

[0006] 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;

[0007] 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;

[0008] 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;

[0009] 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.

[0010] Secondly, this application provides a system for predicting the quality of any stream in petrochemical production at the molecular level, the system comprising:

[0011] 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;

[0012] 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.

[0013] 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.

[0014] 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.

[0015] Thirdly, an apparatus for predicting the quality of any stream in petrochemical production at the molecular level is provided, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the apparatus for predicting the quality of any stream in petrochemical production at the molecular level to perform the above-described method for predicting the quality of any stream in petrochemical production at the molecular level.

[0016] Fourthly, a computer-readable storage medium is provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the above-described method for molecular-level prediction of the quality of any stream in petrochemical production.

[0017] The technical solution provided in this application obtains carbon number distribution data and hydrocarbon composition data by performing online spectral analysis on the feed stream. A dynamic molecular library is obtained by digitally characterizing molecules using structural unit encoding. Compared to existing technologies that rely on offline sampling analysis and fixed molecular libraries, this approach achieves real-time capture of changes in feed composition and dynamic updates of the molecular library, solving the problem of traditional methods failing to respond promptly to feed fluctuations due to sampling analysis lag. A reaction rule library containing multiple elementary reactions is established based on reaction mechanisms. Molecules in the dynamic molecular library are matched with the reaction rule library to generate a molecular-level reaction network. Compared to existing technologies that use lumped models or only establish molecular models for major reactions, this approach achieves a complete description of all molecular types and reaction pathways, solving the problems of traditional methods being unable to track specific molecular transformation pathways and inaccurate handling of complex isomers. A reaction kinetic equation system is established based on a molecular-level reaction network. The rate equation incorporates a correction factor calculated based on changes in feed composition. The kinetic parameters of the reaction kinetic equation system are optimized by solving the problem. Compared to existing technologies that use fixed kinetic parameters or only consider the effects of temperature and pressure, this method achieves adaptive adjustment of kinetic parameters according to the concentration of poisons and the content of heavy components in the feed. This solves the problem of large deviations between model predictions and actual results caused by inaccurate kinetic parameters in traditional methods. The reaction products are input into a separation simulation system for gas-liquid phase equilibrium calculations to obtain the molecular composition of each stream. Structural descriptors are extracted from the molecular composition, and component interaction terms are introduced through a neural network model to calculate and output stream quality prediction results. Compared to existing technologies that use linear harmonic models or ignore component interactions, this method achieves accurate prediction of nonlinear properties such as octane number, solving the problem of insufficient prediction accuracy for molecular composition-sensitive properties in traditional methods.

[0018] In the specific application field of predicting the quality of petrochemical production streams, the genetic algorithm and neural network model employed in this application are specifically designed for the characteristics of this field and play a crucial role. When optimizing reaction kinetic parameters, the genetic algorithm encodes the rate constant and adsorption equilibrium constant as individual chromosomes and uses the sum of squared deviations between the measured composition at the reactor outlet and the model-predicted composition as the fitness function. This achieves global optimization of multiple parameters, avoiding the problem of traditional gradient optimization methods easily getting trapped in local optima. It is particularly suitable for petrochemical reaction systems with a large number of parameters to be optimized and coupling relationships between these parameters. When predicting stream quality, the neural network model uses the weighted average of the structural descriptors as the basic input and introduces the strength of component interactions as additional features. Utilizing the nonlinear transformation capability of the hidden layers, it captures the complex nonlinear mapping relationship between molecular structure parameters and macroscopic quality indicators. This is particularly suitable for predicting quality indicators such as octane number, which are highly sensitive to molecular composition and exhibit significant non-additiveness. Compared to traditional methods based on linear regression or simple harmonic rules, the neural network can learn the synergistic and inhibitory effects between different molecular types, thereby significantly improving prediction accuracy. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of an embodiment of the method for predicting the quality of any stream in petrochemical production at the molecular level in this application.

[0021] Figure 2 This is a schematic diagram comparing the errors of the flow quality index of different prediction methods in the embodiments of this application;

[0022] Figure 3 This is a schematic diagram of an embodiment of a system for predicting the quality of any stream in petrochemical production at the molecular level, as described in this application.

[0023] Figure 4 This is a schematic block diagram of the structure of a device for predicting the quality of any stream in petrochemical production at the molecular level, as described in an embodiment of the present invention. Detailed Implementation

[0024] This application provides a method and system for molecular-level prediction of the quality of any stream in petrochemical production. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0025] For ease of understanding, the specific process of the embodiments of this application is described below. Please refer to [link / reference]. Figure 1 One embodiment of the method for predicting the quality of any stream in petrochemical production at the molecular level in this application includes:

[0026] 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;

[0027] 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;

[0028] 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;

[0029] Step S4: Input the reaction products into the separation simulation system to perform gas-liquid phase equilibrium calculations and obtain the molecular composition of each stream; extract the structural descriptors from the molecular composition, introduce the component interaction terms through the neural network model for calculation, and output the stream quality prediction results.

[0030] It is understood that the executing entity of this application can be a system for predicting the quality of any stream in petrochemical production at the molecular level, or it can be a terminal or a server; the specific implementation is not limited here. This application's embodiments use a server as an example for illustration.

[0031] Specifically, feed data is acquired through online detection, and a dynamic molecular library is established. Gas chromatography-flame ionization detector (GC-FID) separates and quantifies feed components, obtaining the content distribution of compounds with different carbon numbers. Fourier transform ion cyclotron resonance mass spectrometry (FT-CMS) identifies the precise mass of molecules through the cyclotron frequency of ions in a magnetic field. Near-infrared spectroscopy (NIRS) uses characteristic absorption peaks to distinguish aromatics, cycloalkanes, and alkanes. The detected molecules are encoded into 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, forming an encoded molecular matrix. The distribution probability of various hydrocarbons with different carbon numbers is calculated using a three-parameter Gamma distribution function. A structural constraint factor is introduced for correction. When the feed density or aromatic content changes beyond a threshold, the parameters are recalculated, ultimately generating a dynamic molecular library containing C5 to C12 isomers.

[0032] A reaction rule library encompassing dehydrogenation cyclization, isomerization, hydrocracking, aromatization, and hydrogenolysis was established based on the catalytic reforming mechanism. Molecular structures in the dynamic molecular library were matched with the reaction rules using a structure-bond-electric matrix pattern. Molecular structural features satisfying the reaction conditions were identified by comparing the types of structural units and connections in the matrix. When the alkane concentration change exceeds a set threshold, the activity of the reaction pathway involving that type of molecule was reassessed. Based on the matching results, the transformation relationships between molecule types were determined. A graph theory algorithm was used to construct a reaction network, with each molecule type corresponding to a node and each reaction pathway corresponding to directed edges between nodes. A stoichiometric coefficient matrix was generated to record the transformation ratios between molecules.

[0033] A set of reaction kinetic equations is established based on the stoichiometric coefficient matrix. The correction factor in the rate equation is calculated based on the sulfur, nitrogen, and heavy component contents of the feed. Higher concentrations of these poisons and heavy components result in smaller correction factors and a lower reaction rate. The reaction kinetic equations are input into a genetic algorithm to initialize a population of individuals containing rate constants and adsorption equilibrium constants. For each individual, the model-predicted composition of each component at the reactor outlet is calculated. The sum of squared deviations between the predicted and measured compositions is used as the fitness function value. Individuals are selected, crossovered, and mutated based on the fitness value 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. A set of mass conservation differential equations for each component is established based on the optimized rate constant and adsorption equilibrium constant. Numerical algorithms are used to solve for the concentration changes of each molecular component.

[0034] The reaction products are input into a separation simulation system, and the gas-liquid phase equilibrium is calculated using an equation of state. Binary interaction parameters are calculated based on the difference in boiling points and eccentricity factors of the components, and corrected for the operating temperature and pressure of the separation tower. The molecular composition of each stream is obtained by solving the flash evaporation equation. Structural descriptors such as carbon number, degree of branching, number of rings, and number of aromatic rings are extracted from the molecular composition. The mass fraction weighted average of these structural descriptors is input into a three-layer feedforward neural network. The input layer of the neural network receives the structural descriptor data, while the hidden layer performs nonlinear transformations through neuron activation functions and simultaneously calculates the interaction strength between components. When the interaction strength exceeds a set threshold, the interaction term is input as an additional feature into the network. The output layer outputs the predicted stream mass based on octane number, density, and PONA.

[0035] In one specific embodiment, step S1 includes:

[0036] 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.

[0037] 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 molecular matrix.

[0038] Based on 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. 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.

[0039] Specifically, in online gas chromatography-flame ionization detectors (GC-FIDD), the mixture in the feed stream is separated within the column based on boiling point differences using a carrier gas. Hydrocarbons with different carbon numbers elute from the column at different times. The eluent components enter the FIDD, where the organic matter burns in a hydrogen-air flame, generating positive ions and electrons. The detector collects these charged particles, forming a current signal. The current intensity is proportional to the mass of the organic matter entering the detector. Based on the retention time and response signal intensity, the type and content of compounds with different carbon numbers are determined, generating carbon number distribution data. In Fourier transform ion cyclotron resonance mass spectrometry (FT-IMS), the feed sample is ionized and injected into a superconducting magnetic field. Ions with different mass-to-charge ratios cyclotronically rotate at different frequencies in the magnetic field. The detector records the time-domain signal of the ions, and the Fourier transform converts the time-domain signal into a frequency-domain signal. Since frequency is inversely proportional to mass-to-charge ratio, the molecular mass is accurately calculated based on the spectral peak position, and the specific molecular formula is identified by combining the carbon number distribution data. The feed sample is irradiated with a near-infrared spectrometer. The carbon-hydrogen bonds of the benzene ring in the aromatic molecule produce absorption peaks at specific wavelengths, the cyclic carbon-hydrogen bonds of cycloalkanes produce absorption peaks at another wavelength, and the straight-chain carbon-hydrogen bonds of alkanes absorb at different wavelengths. The absorbance at each wavelength is measured, and the absorbance is converted into the concentration of various hydrocarbons according to the Lambert-Beer law to obtain the aromatic content data, cycloalkane content data, and alkane content data.

[0040] Carbon number distribution data shows the presence of various hydrocarbon molecules in the feed ranging from C5 to C12, converting the structure of each molecule into a structural unit-bond-electric matrix. Taking 2-methylpentane as an example, its molecular formula is C6H14, with a five-carbon backbone and a methyl branch attached to the second carbon atom. The first row of the matrix records the backbone information, from left to right: methyl unit, methylene unit, methylene unit, methylene unit, methyl unit, corresponding to the five carbon atoms of the backbone. The second row records the branch information, with a methyl unit marked in the second column, indicating that the second carbon atom is connected to a methyl branch. The third dimension of the matrix records the bonding pattern, marking which units are connected by single bonds. For cyclohexane, its carbon backbone is a six-membered ring structure. The first row of the matrix records six cyclic units connected end-to-end to form a closed ring, with each cyclic unit marked as connecting two adjacent units. For toluene, its structure contains a benzene ring and a methyl group. The first row of the matrix records six aromatic ring units forming a benzene ring, and the second row records a methyl unit attached to an aromatic ring unit. This encoding method converts all molecules detected in the feed into coded molecular matrices one by one, with each matrix uniquely corresponding to a molecular structure.

[0041] The three-parameter Gamma distribution function describes the probability distribution of various hydrocarbons with different carbon numbers. This function includes a shape parameter controlling the peak shape of the distribution curve, a scale parameter controlling the width of the distribution, and a position parameter controlling the location of the distribution center. For alkanes, the Gamma distribution parameters are fitted based on the detected C5 to C12 alkanes content data to minimize the residual between the theoretical distribution curve and the measured data points. For aromatics and cycloalkanes, their respective Gamma distribution parameters are fitted. Due to differences in chemical structural stability, a structural constraint factor is introduced to correct the distribution probability. The constraint factor for stable n-alkanes is set to 1.0, for monobranched isoalkanes (due to slightly greater steric hindrance) it is set to 0.95, for dibranched isoalkanes it is set to 0.88, and for highly branched isoalkanes it is set to 0.75. The corrected distribution probability is obtained by multiplying the Gamma distribution probability value of each molecule by the corresponding structural constraint factor. The system detects the feed density at regular intervals, compares the current density value with the density value of the previous period, calculates the density change, and triggers parameter recalculation when the absolute value of the change exceeds a set density threshold. Simultaneously, the aromatic hydrocarbon content is detected, and the current aromatic hydrocarbon mass percentage is compared with the value of the previous period. When the change exceeds the set composition threshold, parameter recalculation is triggered. The parameter recalculation process involves reacquiring spectral data, refitting the three parameters of the Gamma distribution, and recalculating the corrected distribution probability of each molecule. Based on the corrected distribution probability and the encoded molecule matrix, all possible alkane, cycloalkanes, and aromatic isomers in the C5 to C12 range are listed, including C5 isomers such as n-pentane, isopentane, and neopentane, and C6 isomers such as n-hexane, 2-methylpentane, 3-methylpentane, and 2,2-dimethylbutane, and so on up to C12. Each molecule is labeled with its encoded matrix and corrected distribution probability, forming a dynamic molecular library.

[0042] In one specific embodiment, step S2 includes:

[0043] A reaction rule library including dehydrogenation cyclization, isomerization, hydrocracking, aromatization and hydrogenolysis reactions was established based on the catalytic reforming reaction mechanism.

[0044] The molecular structures in the dynamic molecular library are matched with the basic 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 concentration of alkane exceeds a set concentration threshold, the activity of the reaction pathway involving the corresponding molecule class is re-evaluated.

[0045] 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.

[0046] Specifically, the dehydrogenation cyclization reaction rules describe the process in which six consecutive carbon atoms in an alkane molecule lose hydrogen atoms under the action of a catalyst to form a six-membered ring. These rules require the presence of at least six consecutive methylene units or a carbon chain composed of methyl units in the molecule. After the reaction, a cyclic unit is generated and hydrogen molecules are released. The isomerization reaction rules describe the carbon skeleton rearrangement process. These rules require the displacement of a methyl branch on a methylene unit in the molecule, or the main chain breaking and then reconnecting to form isomers with different degrees of branching. The hydrocracking reaction rules describe the carbon-carbon bond breaking process. These rules require that when the molecule has more than six carbon atoms, it breaks into two smaller molecules in the presence of a catalyst and hydrogen. The aromatization reaction rules describe the conversion of cycloalkanes into aromatics. These rules require the presence of a six-membered ring unit in the molecule. After the reaction, the six-membered ring unit is converted into an aromatic ring unit and dehydrogenates. The hydrogenolysis reaction rules describe the process of the terminal carbon atom being released. These rules require the bond between the terminal methyl unit and its adjacent unit to break, generating a molecule with a smaller number of carbon atoms and methane.

[0047] The coding matrix of each molecule in the dynamic molecular library is compared one by one with the rules in the reaction rule library. Taking n-heptane as an example, its coding matrix shows seven consecutive carbon atoms. Comparing this matrix with the dehydrogenation cyclization rule, which requires six consecutive carbon atoms, n-heptane meets this condition, thus marking n-heptane as capable of undergoing a dehydrogenation cyclization reaction to produce methylcyclohexane. The n-heptane coding matrix is ​​then compared with the isomerization rule, which requires carbon chain rearrangement. The straight-chain structure of n-heptane can be transformed into branched isomers such as 2-methylhexane or 3-methylhexane, thus marking n-heptane as capable of undergoing an isomerization reaction. After comparing all molecules with all rules, the system records which reactions each molecule can participate in and which products are generated. The system continuously monitors the concentration of various molecules in the dynamic molecular library, calculates the total molar concentration of alkanes, and compares the current concentration with the initial concentration or the concentration at the previous moment. When the absolute value of the concentration change exceeds a set concentration threshold, all reaction pathways involving alkanes as reactants are re-evaluated. During the reassessment, the activity weights of these reaction pathways are adjusted based on the current alkane concentration; the weight increases as the concentration increases and decreases as the concentration decreases.

[0048] Intermolecular transformation relationships are established based on structure matching results. A graph theory structure is created, treating each molecule in the dynamic molecular library as a node. Node labels include the molecule name and encoding matrix. When the matching result shows that molecule A generates molecule B through a certain reaction, a directed edge is drawn between node A and node B, with the edge pointing from reactant A to product B, and the reaction type is marked on the edge. All matching results are traversed, and all possible transformation paths are drawn, forming a reaction network topology. The dynamic molecular library contains 154 molecules, including all isomers from C5 to C12. The reaction network contains 260 reaction paths, with each node connected to several incoming and outgoing edges. A stoichiometric coefficient matrix is ​​created, with 154 rows corresponding to the total number of molecule types and 260 columns corresponding to the total number of reaction paths. Matrix elements record the stoichiometric coefficients of each molecule in each reaction. For a given reaction path, the matrix elements corresponding to reactants are filled with negative values, and the matrix elements corresponding to products are filled with positive values, with the values ​​being the stoichiometric coefficients. Elements corresponding to molecules not involved in the reaction are filled with zero.

[0049] In one specific embodiment, the transformation relationships between molecular species are established based on the matching results, and a graph theory algorithm is used to construct the reaction network topology to generate a stoichiometric coefficient matrix as input data for the reaction kinetic equations, including:

[0050] Based on the matching results of 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.

[0051] The importance score of a 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 a reaction pathway exceeds a set score threshold, it is marked as a critical fluctuation pathway.

[0052] The reaction network topology is constructed based on nodes and directed edges, 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.

[0053] Specifically, the structure matching results record the reactions and products that each molecule can participate in. Taking n-hexane as an example, the matching results show that n-hexane, as a reactant, participates in dehydrogenation cyclization to generate cyclohexane, participates in isomerization to generate 2-methylpentane or 3-methylpentane, and participates in hydrocracking to generate propane and propylene. In the graph theory structure, nodes for n-hexane, cyclohexane, 2-methylpentane, 3-methylpentane, propane, and propylene are created. Directed edges are drawn from the n-hexane node to the cyclohexane node, with dehydrogenation cyclization reactions labeled on the edges; directed edges are drawn from the n-hexane node to the 2-methylpentane and 3-methylpentane nodes respectively, with isomerization reactions labeled on the edges; directed edges are drawn from the n-hexane node to the propane and propylene nodes, with hydrocracking reactions labeled on the edges. By traversing the matching results of all 154 molecules, nodes and directed edges are established sequentially to complete the graph theory representation of all 260 reaction paths.

[0054] The initial rate constant for the reaction pathway of hexane dehydrogenation cyclization to cyclohexane was obtained from literature or experimental data. The reactant was hexane, and its current molar concentration was retrieved from a dynamic molecular library. The reactant structure sensitivity coefficient was determined based on the molecule type, with the sensitivity coefficient for n-alkanes set to a specific value. The importance score of the reaction pathway was obtained by multiplying the initial rate constant, hexane concentration, and structure sensitivity coefficient. Scores were calculated for all 260 reaction pathways, and the initial score was recorded. The system continuously monitored changes in molecule concentration. When the concentration of a molecule changed, the scores for all reaction pathways involving that molecule as a reactant were recalculated. The recalculated score was compared with the initial score or the score at the previous moment to calculate the change in score. When the absolute value of the change exceeded a set score threshold, the reaction pathway was marked as a critical fluctuation pathway, indicating that the pathway had a significant impact on the overall reaction system.

[0055] The matrix has 154 rows, representing 154 molecules, and 260 columns, representing 260 reaction pathways. For the reaction pathway of hexane dehydrogenation and cyclization to cyclohexane, this pathway corresponds to a column in the matrix. A negative 1 value for hexane in this column indicates the consumption of 1 mole of hexane, a positive 1 value for cyclohexane indicates the formation of 1 mole of cyclohexane, and the remaining 152 molecules have a value of 0 in this column, indicating they do not participate in the reaction. For the reaction pathway of hexane hydrocracking to propane and propylene, a negative 1 value is assigned to hexane, a positive 1 value to propane, a positive 1 value to propylene, and 0 values ​​to the remaining molecules. All 260 reaction pathways are processed sequentially, filling a 154-row, 260-column matrix. This matrix records the transformation relationships and stoichiometric ratios between the various molecule types.

[0056] In one specific embodiment, step S3 includes:

[0057] A set of reaction kinetic equations was established based on the stoichiometric coefficient matrix, wherein the correction factor of the rate equation was calculated based on the concentration of poison and the content of heavy components in the feed.

[0058] 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.

[0059] Based on the optimized rate constant and adsorption equilibrium constant, a set of differential equations for mass conservation of each component was established. The numerical solution algorithm was used to solve the differential equations, and the concentration change data of each molecular component was obtained as the reaction product.

[0060] Specifically, a set of reaction kinetic equations is established using a stoichiometric coefficient matrix, with each reaction path corresponding to a rate equation. The rate equations describe the relationship between reaction rate and reactant concentration, temperature, and catalyst activity, with correction factors introduced to describe the inhibitory effects of feed poisons and heavy components on reaction activity. Sulfides and nitrides in the feed act as catalyst poisons, adsorbing onto the active sites of the catalyst, reducing the catalyst's adsorption capacity for hydrocarbon molecules and its reactivity. The mass percentages of sulfur and nitrogen content are obtained from feed monitoring data. The sulfur content ratio is obtained by dividing the current sulfur content by a reference sulfur content, and the nitrogen content ratio is obtained by dividing the current nitrogen content by a reference nitrogen content. Heavy components refer to high molecular weight hydrocarbons with more than twelve carbon atoms. These molecules have large molecular weights and slow diffusion rates, easily leading to carbon deposition and pore blockage in the catalyst channels. The sum of the mass percentages of all molecules with more than twelve carbon atoms in the feed monitoring data is used as the heavy component content. The heavy component content ratio is obtained by dividing the current heavy component content by a reference heavy component content. The correction factor is equal to 1 minus the sulfur content ratio multiplied by the sulfur inhibition coefficient, then minus the nitrogen content ratio multiplied by the nitrogen inhibition coefficient, and then minus the heavy component content ratio multiplied by the heavy component inhibition coefficient. The inhibition coefficients are calibrated based on experimental data. Multiplying the correction factor by the rate equations for each reaction pathway yields the actual reaction rate considering the effects of feed poisons and heavy components.

[0061] Genetic algorithms find optimal parameter combinations by simulating biological evolution. First, an initial population containing multiple sets of parameters is randomly generated. Each set of parameters is called an individual, and individuals are represented by chromosome codes. Each gene locus on the chromosome corresponds to a parameter value to be optimized. The population size determines the number of individuals, the maximum number of iterations limits the optimization time, the crossover probability controls the frequency of gene exchange between individuals, and the mutation probability controls the frequency of random gene mutations. For each individual in the population, its parameters are substituted into a system of reaction kinetic equations. Solving the equations yields the model-predicted concentrations of each molecular component at the reactor outlet. Measured concentrations of each component at the reactor outlet are collected from the actual device. The difference between the predicted and measured concentrations of each component is calculated, and the sum of the squares of all component concentration deviations yields the fitness function value for that individual. A smaller fitness function value indicates better parameters for that individual. All individuals are sorted according to their fitness function values. Individuals with the best fitness are selected as parents. Crossover is performed on the chromosomes of the parents according to the crossover probability; that is, two parents are randomly selected, and crossover positions are randomly chosen on their chromosomes. Genes after the crossover position are exchanged, generating two offspring individuals. The offspring individuals are then mutated according to the mutation probability; that is, a gene locus on the chromosome is randomly selected, and its value is randomly changed to another value within an allowed range. The parents and offspring are merged to form a new generation population. The selection, crossover, and mutation operations are repeated. After each iteration, the fitness function value of the individual with the best fitness in the current population is recorded. Iteration is stopped when either the current optimal fitness function value is less than a preset convergence threshold, or when the improvement in optimal fitness over multiple generations is less than a set improvement threshold. The parameters of the current optimal individual are output as the optimized rate constant and adsorption equilibrium constant.

[0062] Based on the optimized rate constant and adsorption equilibrium constant, these parameters are substituted into the reaction kinetic equations to obtain the actual reaction rates of each reaction path. The stoichiometric coefficient matrix is ​​used to determine which reactions the molecule participates in as a reactant and which as a product. The total consumption rate of the molecule is obtained by multiplying the reaction rates of all reactants by their corresponding stoichiometric coefficients and summing the results. Similarly, the total formation rate of the molecule is obtained by multiplying the reaction rates of all products by their corresponding stoichiometric coefficients. The rate of change of the molecule's concentration with respect to time is equal to the total formation rate minus the total consumption rate, thus establishing the mass conservation differential equation for the molecule. A numerical solution algorithm is used to integrate the differential equations over time. Starting from the reactor inlet time, the initial concentration of each molecule is known as the feed concentration. Based on the current molecular concentration and the differential equations, the rate of change of each molecular concentration is calculated. The rate of change is multiplied by the time step to obtain the concentration increment. This concentration increment is added to the current concentration to obtain the concentration at the next time step. This process is repeated until the reactor outlet time, obtaining the concentration data of each molecular component at the reactor outlet as the reaction products.

[0063] In one specific embodiment, the reaction kinetic equations are input into a genetic algorithm for kinetic parameter optimization. The objective function is to minimize the deviation between the measured composition at the reactor outlet and the model-predicted composition, and the process is iteratively calculated, including:

[0064] 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.

[0065] 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.

[0066] Determine whether the fitness function value is less than the preset convergence threshold or whether the improvement range over multiple generations is less than the 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.

[0067] Specifically, the optimization process is standardized by setting control parameters. Population size determines the number of individuals in each generation; a larger population provides a wider search space but also increases computational complexity. The maximum number of iterations limits the number of generations the algorithm can run, preventing infinite loops. Crossover probability controls the likelihood of gene exchange between two parent individuals; a higher crossover probability results in stronger population diversity. Mutation probability controls the likelihood of random gene changes in individuals; an excessively high mutation probability can destroy existing superior genes, while an excessively low probability can lead to local optima. During population initialization, several individuals are created, each represented by a set of numerical codes containing all the rate constants and adsorption equilibrium constants to be optimized. The rate constant describes the speed of the reaction, with a numerical range set according to the reaction type. The adsorption equilibrium constant describes the strength of reactant adsorption on the catalyst surface, with a numerical range set according to the molecule type. Initial values ​​are randomly selected for each parameter within its allowable range, and all parameter values ​​are combined to form an individual; this process is repeated to generate the entire initial population.

[0068] For each individual in the population, its encoded parameters are substituted into the reaction kinetic equations. These equations describe the temporal and spatial variations in the concentration of each molecule within the reactor. Solving the equations yields the model-predicted concentration of each molecule at the reactor outlet. Samples are taken from the reactor outlet of the actual device to obtain the measured concentration of each molecule. For each molecule species, the difference between the model-predicted concentration and the measured concentration is calculated. The squared difference is then summed over all molecule species to obtain the fitness function value for that individual. The fitness function value reflects the quality of the set of parameters; a smaller value indicates a closer approximation between the model prediction and reality. A selection process is performed based on the fitness function values ​​of all individuals. Individuals with higher fitness are more likely to be selected, and these selected individuals serve as parents for reproduction. Selected parents are paired, and crossover is determined based on the crossover probability. If crossover occurs, a crossover point is randomly selected on the chromosome, and gene segments from the two parents on either side of the crossover point are exchanged to generate two offspring individuals. For offspring individuals, the decision to mutate is made based on the mutation probability. If mutation is performed, a gene locus on the chromosome is randomly selected, and the parameter value at that location is replaced with a random value within an allowed range. The parent and offspring are then combined to form a new generation population, completing one generation of iteration.

[0069] After each iteration, the individual with the smallest fitness function value in the current population is identified, and its optimal individual and fitness function value are recorded. It is then determined whether the current optimal fitness function value is less than a preset convergence threshold. If it is less than the threshold, the model's prediction accuracy is considered satisfactory, and the iteration terminates. Simultaneously, the optimal fitness function values ​​for several consecutive generations are recorded, and the difference between the optimal values ​​of adjacent generations is calculated as the improvement margin. It is then determined whether the improvement margins for multiple consecutive generations are all less than a set improvement threshold. If they are all less than the threshold, the optimization process is considered converged and cannot be further improved, and the iteration terminates. When any termination condition is met, the parameter code of the individual with the best fitness in the current population is output. This code includes the rate constant and adsorption equilibrium constant, which are the optimized kinetic parameters. These parameters minimize the deviation between the predicted composition and the measured composition of the reaction kinetic model.

[0070] In one specific embodiment, step S4 includes:

[0071] The reaction products are input into the 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.

[0072] Extract structural descriptors, including carbon number, degree of branching, number of rings, and number of aromatic rings, from the molecular composition;

[0073] The weighted average of the structural 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.

[0074] Specifically, the reaction products consist of a gas-liquid mixture, which is input into the separation simulation system for gas-liquid phase separation calculations. Gas-liquid phase equilibrium describes the concentration distribution of each component in the gas and liquid phases at specific temperatures and pressures. Binary interaction parameters describe the strength of the interaction between two different molecules, influencing their distribution behavior in the gas and liquid phases. For any two components, their boiling points are read, and the absolute value of the difference between their boiling points is calculated as the boiling point difference. Their eccentricity factors are also read; the eccentricity factor reflects the degree to which molecules deviate from a spherical shape, and the absolute value of the difference between their eccentricity factors is calculated as the eccentricity factor difference. The boiling point difference and eccentricity factor difference are multiplied by their respective coefficients and then summed to obtain the initial values ​​of the interaction parameters for that binary component pair. Based on the current operating temperature and pressure of the separation tower, the differences between the temperature and reference temperature, and the differences between the pressure and reference pressure are calculated. These two differences are multiplied by correction coefficients and then added to the initial values ​​of the interaction parameters to obtain the corrected binary interaction parameters. The gas-liquid phase equilibrium was calculated using the equation of state combined with the corrected interaction parameters. The molecular composition of the gas and liquid streams was obtained by iteratively solving the flash equation, and the mole fraction of each molecular type was recorded for each stream.

[0075] Structural information is extracted from the molecular composition data of each stream. For each molecule type, the total number of carbon atoms is read from its coding matrix as the carbon number. The ratio of the number of carbon atoms outside the main chain to the total carbon number is calculated as the branching degree; a higher branching degree indicates more branched molecules. The number of cyclic units in the molecule is counted as the ring number; a ring number of zero indicates a chain molecule, while a ring number greater than zero indicates the presence of a cyclic structure. The number of aromatic ring units in the molecule is counted as the aromatic ring number; an aromatic ring number of zero indicates a non-aromatic hydrocarbon, while an aromatic ring number greater than zero indicates an aromatic hydrocarbon. After extracting these four structural descriptors for each molecule type in the stream, a weighted contribution is calculated based on the mole fraction of that molecule in the stream. The weighted contributions of all molecules are summed to obtain the overall weighted average of carbon number, branching degree, ring number, and aromatic ring number for the stream.

[0076] 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.

[0077] 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.

[0078] 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:

[0079] 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;

[0080] 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.

[0081] 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.

[0082] 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.

[0083] 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.

[0084] 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.

[0085] Those skilled in the art will understand that Figure 4 The 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.

[0086] 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.

[0087] 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.

[0088] 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.

[0089] 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 of molecular level prediction of quality of any stream in petrochemical production, characterized in that, The method comprises: Step S1: performing online spectral analysis on the feed stream to obtain carbon number distribution data and hydrocarbon composition data; digitally characterizing molecules by a structure 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 elementary 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, including: establishing a reaction rule library containing dehydrogenation cyclization, isomerization, hydrocracking, aromatization and hydrogenolysis reactions according to the catalytic reforming reaction mechanism; performing structure unit-bonding electric moment matrix pattern matching between the molecular structure in the dynamic molecular library and the elementary reaction rules in the reaction rule library to identify molecular structure characteristics that meet the reaction conditions; re-evaluating the reaction path activity involving corresponding molecular species when the concentration of paraffin changes by more than a set concentration threshold; establishing conversion relationships between molecular species according to the matching results, constructing a reaction network topology structure using a graph theory algorithm, and generating a stoichiometric coefficient matrix as input data for a reaction kinetics equation set, including: determining the conversion relationships of each molecular species as reactants and products according to the matching results of the molecular structure characteristics, wherein each molecular species corresponds to a node in the graph theory algorithm, and each reaction path corresponds to a directed edge between nodes; calculating a reaction path importance score for the reaction path, which is calculated according to a reaction rate constant initial value, a reactant concentration involved in the reaction, and a reactant structure sensitivity coefficient; when the reaction path importance score changes by more than a set score threshold, it is marked as a critical fluctuation path; constructing a reaction network topology structure according to the nodes and directed edges, and generating a stoichiometric coefficient matrix recording the conversion relationships between molecular species, the dimension of the stoichiometric coefficient matrix being the product of the total number of molecular species and the total number of reaction paths; Step S3: establishing a reaction kinetics equation set based on the molecular-level reaction network, wherein the rate equation introduces a correction factor calculated according to the change in feed composition; optimizing and solving the kinetic parameters of the reaction kinetics equation set to obtain optimized kinetic parameters; Step S4: inputting the reaction products into a separation simulation system for gas-liquid phase equilibrium calculation to obtain the molecular composition of each stream; extracting structure descriptors from the molecular composition and calculating by introducing a component interaction term through a neural network model to output stream mass prediction results.

2. The method of claim 1, wherein, The step S1 comprises: using online gas chromatography-hydrogen flame ionization detector, Fourier transform ion cyclotron resonance mass spectrometry and near-infrared spectrometer to continuously detect the feed stream to obtain carbon number distribution data, aromatic content data, naphthene content data and paraffin content data; encoding the molecules in the carbon number distribution data 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, naphthenic content data and paraffin 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 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; and a dynamic molecular library containing all isomers of carbon numbers C5 to C12 is generated according to the modified distribution probability and the coded molecular matrix.

3. The method of predicting the quality of any stream in a petrochemical production at a molecular level as claimed in claim 1, wherein, The step S3 comprises: Based on the stoichiometric coefficient matrix, a reaction kinetics equation set is established, wherein the correction factor of the rate equation is calculated according to the concentration of the poison in the feedstock and the heavy component content; The reaction kinetics equation set is input into a genetic algorithm for kinetic parameter optimization, 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; when the objective function value is less than a preset convergence threshold, the optimization is terminated, and the optimized rate constant and adsorption equilibrium constant are obtained; According to the optimized rate constant and adsorption equilibrium constant, a set of component mass conservation differential equations is established, and a numerical solution algorithm is used to solve the differential equation set to obtain the concentration change data of each molecular component as the reaction product.

4. The method of predicting the quality of any stream in a petrochemical production at a molecular level as claimed in claim 3, wherein, The reaction kinetics equation set is input into a genetic algorithm for kinetic parameter optimization, 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, comprising: Setting the population size, maximum iteration number, crossover probability and mutation probability of the genetic algorithm as algorithm control parameters, and initializing the individual population containing the rate constant and adsorption equilibrium constant; For each individual, calculate the model predicted composition of each component at the reactor outlet, and take the sum of the squares of the deviations between the model predicted composition and the measured composition as the fitness function value; according to the fitness function value, the individuals are selected, crossed and mutated to generate a new generation of population; Determine whether the fitness function value is less than a preset convergence threshold or the continuous improvement amplitude 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 optimal fitness in the current population as the optimized kinetic parameters.

5. The method of predicting the quality of any stream in a petrochemical production at a molecular level as claimed in claim 4, wherein, The step S4 comprises: The reaction product is input into a separation simulation system for gas-liquid phase equilibrium calculation, wherein the binary interaction parameter is calculated according to the difference in boiling point and eccentric factor of the components and corrected according to the operating conditions to obtain the molecular composition of each stream; Extracting structural descriptors including carbon number, branching degree, ring number and aromatic ring number 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, it is input as an additional feature; and outputting the predicted results of the stream quality including octane number, density and composition.

6. A system for molecular level prediction of quality of any stream in petrochemical production, characterized in that, The system for realizing the method of molecular-level prediction of the quality of any stream in petrochemical production according to any one of claims 1 to 5 comprises: The acquisition module is configured to perform online spectrum analysis on the feed stream to obtain carbon number distribution data and hydrocarbon composition data, and to digitally characterize molecules in a structure unit coding manner based on the carbon number distribution data and the hydrocarbon composition data to obtain a dynamic molecule library. The matching module is configured to establish a reaction rule library containing multiple types of elementary reactions according to a reaction mechanism, and to match molecules in the dynamic molecule library with the reaction rule library to generate a molecular-level reaction network. The 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 to optimize and solve kinetic parameters of the reaction kinetics equation set to obtain optimized kinetic parameters. The 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, and to extract structure descriptors from the molecular compositions and calculate component interaction items through a neural network model to output stream mass prediction results.

7. An apparatus for molecular level prediction of quality of any stream in petrochemical production, characterized by, The computer program, when executed by the processor, causes the processor to perform the method for predicting mass of any stream in petrochemical production at a molecular level according to any one of claims 1 to 5.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by the processor, causes the processor to perform the method for predicting mass of any stream in petrochemical production at a molecular level according to any one of claims 1 to 5.

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