Gasoline hydrogen content prediction model training, hydrogen content prediction method and device
By constructing a linear model and a GBDT model based on gasoline density and final boiling point, the problem of poor timeliness in predicting gasoline hydrogen content was solved, achieving rapid and accurate hydrogen content prediction and improving prediction efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA PETROLEUM & CHEMICAL CORP
- Filing Date
- 2022-01-10
- Publication Date
- 2026-07-03
AI Technical Summary
Existing technologies for predicting the hydrogen content of gasoline have poor timeliness. Most oil refining companies lack the equipment to measure the hydrogen content in liquid oil products and need to send them to professional institutions for testing, which results in poor timeliness.
By identifying key parameters from the data warehouse, such as the feedstock properties of gasoline and the operating parameters of the catalytic cracking unit, a linear model is constructed based on gasoline density and final boiling point. The gasoline hydrogen content prediction model is then trained, and the GBDT model is used for model optimization and supplementary parameter selection to achieve rapid and accurate hydrogen content prediction.
Without the need for high-precision analytical instruments, it enables rapid and accurate prediction of the hydrogen content in gasoline, improving prediction efficiency and avoiding the problems of long cycles and high costs associated with chemical analysis.
Smart Images

Figure CN116453612B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a gasoline hydrogen content prediction model training, hydrogen content prediction method and apparatus. Background Technology
[0002] Petroleum processing mainly involves the rebalancing of elements such as carbon and hydrogen in crude oil, including both decarbonization and hydrogenation. The corresponding technical routes are decarbonization and hydrogenation. Catalytic cracking is one of the important crude oil decarbonization technologies. Through cracking, hydrogen transfer, and isomerization, feedstock oil yields products such as dry gas, liquefied petroleum gas (LPG), gasoline, light cycle oil, slurry oil, and coke.
[0003] Hydrogen balance calculations and analyses can evaluate the rationality of product distribution and hydrogen utilization efficiency in catalytic cracking units. In actual production, full composition analysis of gaseous hydrocarbons is often performed using instruments and equipment, allowing for the calculation of hydrogen content. The hydrogen content of coke can be calculated from the flue gas composition, which can also be analyzed using conventional equipment. However, most refineries lack equipment for determining the hydrogen content in liquid oil products, requiring them to send samples to specialized institutions for testing, which is time-consuming. Summary of the Invention
[0004] This invention provides a gasoline hydrogen content prediction model training, hydrogen content prediction method and apparatus to solve the defect of poor timeliness in gasoline hydrogen content prediction in the prior art.
[0005] This invention provides a method for training a gasoline hydrogen content prediction model, comprising:
[0006] Key parameters affecting the hydrogen content of gasoline were identified from the data warehouse; these key parameters included the feedstock properties of gasoline and the operating parameters of the catalytic cracking unit.
[0007] Based on the gasoline density and final boiling point corresponding to the key parameters, determine the gasoline hydrogen content corresponding to the key parameters;
[0008] Based on the key parameters and the corresponding gasoline hydrogen content, the initial model is trained to obtain a gasoline hydrogen content prediction model.
[0009] According to the gasoline hydrogen content prediction model training method provided by the present invention, the gasoline hydrogen content corresponding to the key parameters is determined based on a linear model, wherein the linear model is:
[0010] y=27.726-0.001923a-0.06412b;
[0011] Where y represents the gasoline hydrogen content corresponding to the key parameter, a represents the gasoline density corresponding to the key parameter, and b represents the gasoline final boiling point corresponding to the key parameter.
[0012] According to the gasoline hydrogen content prediction model training method provided by the present invention, the linear model is constructed based on the following steps:
[0013] Obtain historical gasoline density, historical gasoline final boiling point, and corresponding historical gasoline hydrogen content;
[0014] The historical gasoline density, the historical gasoline final boiling point, and the historical gasoline hydrogen content are linearly fitted to obtain the linear model.
[0015] According to the gasoline hydrogen content prediction model training method provided by the present invention, the data warehouse is established based on the following steps:
[0016] Obtain historical feedstock properties of gasoline and historical operating parameters of the catalytic cracking unit;
[0017] The historical raw material property parameters and historical operation parameters are cleaned, and the cleaned historical raw material property parameters and historical operation parameters are added to the data warehouse.
[0018] According to the gasoline hydrogen content prediction model training method provided by the present invention, after obtaining the gasoline hydrogen content prediction model, it further includes:
[0019] When the accuracy of the gasoline hydrogen content prediction model is less than the accuracy threshold, supplementary parameters are determined from the data warehouse. The correlation between the supplementary parameters and the gasoline hydrogen content is greater than the correlation threshold. The correlation between the supplementary parameters and the gasoline hydrogen content is determined based on mRMR.
[0020] The gasoline density and final boiling point corresponding to the supplementary parameters are used to determine the gasoline hydrogen content corresponding to the supplementary parameters.
[0021] The gasoline hydrogen content prediction model is updated based on the supplementary parameters and the corresponding gasoline hydrogen content.
[0022] According to the gasoline hydrogen content prediction model training method provided by the present invention, the accuracy of the gasoline hydrogen content prediction model is determined based on the following steps:
[0023] The raw material property parameters and operating parameters are randomly obtained from the data warehouse as verification parameters, and the hydrogen content corresponding to the verification parameters is obtained.
[0024] The verification parameters are input into the gasoline hydrogen content prediction model to obtain the predicted hydrogen content output by the gasoline hydrogen content prediction model.
[0025] Based on the predicted hydrogen content and the hydrogen content corresponding to the verification parameters, the accuracy of the gasoline hydrogen content prediction model is determined; the accuracy of the gasoline hydrogen content prediction model includes at least one of root mean square error, mean absolute error, and coefficient of determination.
[0026] According to the present invention, a method for training a gasoline hydrogen content prediction model is provided, wherein the initial model is constructed based on the GBDT model.
[0027] This invention also provides a method for predicting the hydrogen content of gasoline, comprising:
[0028] Determine the raw material properties and operating parameters corresponding to the gasoline to be predicted;
[0029] The raw material property parameters and operating parameters corresponding to the gasoline to be predicted are input into the gasoline hydrogen content prediction model to obtain the hydrogen content prediction result output by the gasoline hydrogen content prediction model.
[0030] The gasoline hydrogen content prediction model is trained based on the gasoline hydrogen content prediction model training method described above.
[0031] The present invention also provides a training device for a gasoline hydrogen content prediction model, comprising:
[0032] The parameter selection unit is used to determine the key parameters affecting the hydrogen content of gasoline from the data warehouse; the key parameters include the feedstock properties of gasoline and the operating parameters of the catalytic cracking unit.
[0033] The label determination unit is used to determine the gasoline hydrogen content corresponding to the key parameter based on the gasoline density and gasoline final boiling point corresponding to the key parameter;
[0034] The model training unit is used to train the initial model based on the key parameters and the corresponding gasoline hydrogen content to obtain a gasoline hydrogen content prediction model.
[0035] The present invention also provides a gasoline hydrogen content prediction device, comprising:
[0036] The parameter determination unit is used to determine the raw material property parameters and operating parameters corresponding to the gasoline to be predicted;
[0037] The hydrogen content prediction unit is used to input the raw material property parameters and operating parameters corresponding to the gasoline to be predicted into the gasoline hydrogen content prediction model, and obtain the hydrogen content prediction result output by the gasoline hydrogen content prediction model.
[0038] The gasoline hydrogen content prediction model is trained based on the gasoline hydrogen content prediction model training method described above.
[0039] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the gasoline hydrogen content prediction model training method and / or gasoline hydrogen content prediction method as described above.
[0040] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the gasoline hydrogen content prediction model training method and / or gasoline hydrogen content prediction method as described above.
[0041] The present invention also provides a computer program product, comprising a computer program that, when executed by a processor, implements the steps of the gasoline hydrogen content prediction model training method and / or gasoline hydrogen content prediction method as described above.
[0042] The gasoline hydrogen content prediction model training, hydrogen content prediction method, and apparatus provided by this invention train an initial model based on key parameters and the corresponding gasoline hydrogen content to obtain a gasoline hydrogen content prediction model. This enables the rapid and accurate prediction of hydrogen content even without high-precision analytical instruments. Furthermore, embodiments of this invention can determine the hydrogen content prediction result through raw material property parameters and operating parameters, eliminating the need to collect gasoline samples for hydrogen content detection, thus achieving high efficiency. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0044] Figure 1 This is a flowchart illustrating the training method for the gasoline hydrogen content prediction model provided by the present invention.
[0045] Figure 2 This is a flowchart illustrating the gasoline hydrogen content prediction method provided by the present invention;
[0046] Figure 3 This is a schematic diagram of the gasoline hydrogen content prediction system provided by the present invention;
[0047] Figure 4This is a schematic diagram of the structure of the gasoline hydrogen content prediction model training device provided by the present invention;
[0048] Figure 5 This is a schematic diagram of the gasoline hydrogen content prediction device provided by the present invention;
[0049] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0051] Current methods for predicting the hydrogen content of gasoline primarily rely on instrumental analysis of the complete composition of gaseous hydrocarbons, allowing for the calculation of hydrogen content based on this analysis. Similarly, the hydrogen content of coke can be calculated from the composition of flue gas, which can also be analyzed using conventional equipment. However, most oil refineries lack the equipment to determine the hydrogen content in liquid oil products, requiring them to send samples to specialized institutions for testing, resulting in poor timeliness.
[0052] To address this, the present invention provides a method for training a gasoline hydrogen content prediction model. Figure 1 This is a flowchart illustrating the training method for the gasoline hydrogen content prediction model provided by the present invention, as shown below. Figure 1 As shown, the method includes the following steps:
[0053] Step 110: Identify the key parameters affecting the hydrogen content of gasoline from the data warehouse; key parameters include the feedstock properties of gasoline and the operating parameters of the catalytic cracking unit.
[0054] Specifically, key parameters refer to parameters that affect the hydrogen content of gasoline. These parameters can be determined by analyzing chemical reaction mechanisms, studying operation manuals, visiting on-site operators, compiling monthly technical reports, and communicating with experts from relevant research institutes. Alternatively, they can be determined by selecting features from various parameters in a data warehouse.
[0055] Feedstock property parameters include the flow rate of the mixed feedstock oil for the catalytic cracking unit, the flow rate of the cold residue oil into the mixer pipe, the flow rate of the residue oil into the mixer pipe, the feedstock oil density, the feedstock oil distillation profile (initial boiling point, 10% evaporation temperature, 50% evaporation temperature, 90% evaporation temperature, final boiling point), the distillate yield at 500℃, and the feedstock section temperature. Operating parameters include the temperature of the catalytic cracking unit settler outlet pipe, the oil outlet pipe, the stabilizer bottom temperature, the tower top vapor phase temperature, the oil / gas inlet pipe temperature, the secondary reflux temperature, the fractionation tower top outlet pipe temperature, the secondary reactor outlet temperature, the cooling water inlet riser pipe, the secondary reflux pipe flow rate, the light diesel oil inlet riser pipe, the top circulation inlet riser pipe, the stabilizer reflux pipe temperature, the stabilizer reflux pipe flow rate, the fractionation tower top reflux flow rate, the supplementary absorbent pipe flow rate, and the crude gasoline pump outlet flow rate.
[0056] Step 120: Based on the gasoline density and final boiling point corresponding to the key parameters, determine the gasoline hydrogen content corresponding to the key parameters.
[0057] It should be noted that the embodiments of the present invention verify the relationship between various gasoline property parameters and gasoline hydrogen content by collecting a large number of gasoline property parameters. The collected gasoline property parameters include catalytic gasoline density, catalytic gasoline distillation curves (initial boiling point, 10% evaporation temperature, 50% evaporation temperature, 90% evaporation temperature, final boiling point), gasoline sulfur content, olefin content, RON value, MON value, total yield, residue, loss, benzene content, vapor pressure, etc. Then, a scatter plot is drawn with each gasoline property parameter as the x-axis and hydrogen content as the y-axis. Based on the scatter plot, it can be seen that hydrogen content exhibits a good linear relationship with gasoline density and gasoline final boiling point.
[0058] Furthermore, the heatmap obtained based on the Pearson correlation coefficient can quantitatively demonstrate the correlation between various gasoline property parameters and gasoline hydrogen content. Specifically, the correlation coefficient between gasoline density and hydrogen content is 0.91, and the correlation coefficient between gasoline final boiling point and hydrogen content is 0.98, both exhibiting very good linear relationships.
[0059] Therefore, embodiments of the present invention can determine the gasoline hydrogen content corresponding to key parameters based on the linear relationship between hydrogen content, gasoline density, and gasoline final boiling point.
[0060] Step 130: Based on the key parameters and the corresponding gasoline hydrogen content, train the initial model to obtain the gasoline hydrogen content prediction model.
[0061] Specifically, after determining the key parameters and the corresponding gasoline hydrogen content, the initial model can be trained using the key parameters as samples and the corresponding gasoline hydrogen content as sample labels to obtain a gasoline hydrogen content prediction model. The initial model can be built based on a Gradient Boosting Decision Tree (GDBT) model or other models; this embodiment of the invention does not impose specific limitations on this.
[0062] After obtaining the gasoline hydrogen content prediction model, the raw material property parameters and operating parameters corresponding to the gasoline to be predicted can be input into the gasoline hydrogen content prediction model, thereby obtaining the hydrogen content prediction result quickly and accurately. Therefore, the gasoline hydrogen content prediction model trained in this embodiment can predict the hydrogen content in gasoline, thus avoiding the problems of long cycles and high costs associated with traditional methods that rely on instrument-based chemical analysis. Moreover, this embodiment can accurately obtain hydrogen content prediction results even without high-precision instruments; that is, this embodiment does not rely on analytical instruments for prediction. Furthermore, if anomalies are found in the hydrogen content prediction results, the corresponding raw material property parameters and operating parameters can be directly queried, facilitating the determination of the cause of the anomaly based on these parameters.
[0063] The gasoline hydrogen content prediction model training method provided in this invention trains an initial model based on key parameters and the corresponding gasoline hydrogen content to obtain a gasoline hydrogen content prediction model. This enables the rapid and accurate prediction of hydrogen content even without high-precision analytical instruments. Furthermore, this invention can determine the hydrogen content prediction result through raw material property parameters and operating parameters, eliminating the need to collect gasoline samples for hydrogen content detection, thus achieving high efficiency.
[0064] Based on the above embodiments, the gasoline hydrogen content corresponding to the key parameters is determined based on a linear model, which is:
[0065] y = 27.726 - 0.001923a - 0.06412b
[0066] Where y represents the gasoline hydrogen content corresponding to the key parameter, a represents the gasoline density corresponding to the key parameter, and b represents the gasoline final boiling point corresponding to the key parameter.
[0067] Specifically, the data warehouse can also store gasoline property parameters. The collected gasoline property parameters include catalytic gasoline density, catalytic gasoline distillation curves (initial boiling point, 10% evaporation temperature, 50% evaporation temperature, 90% evaporation temperature, final boiling point), gasoline sulfur content, olefin content, RON value, MON value, total yield, residue, loss, benzene content, vapor pressure, etc. Then, a scatter plot is drawn with each gasoline property parameter as the x-axis and hydrogen content as the y-axis. According to the scatter plot, the hydrogen content shows a good linear relationship with gasoline density and gasoline final boiling point.
[0068] In this embodiment of the invention, a regression model is established by approximating discrete data using a binary linear analytical formula to obtain a linear model of the relationship between hydrogen content and density and final boiling point. Specifically, assuming that the modeling data has m sets of sample data points, a continuous curve is used to approximate the functional relationship between the coordinates represented by the discrete point sets based on the discrete distribution of the training data, and an analytical expression is used to approximate the discrete data. The mean square error is used as an indicator to measure the goodness of fit of the model, reflecting the degree of fit. The smaller the mean square error, the better the accuracy of the model prediction results.
[0069] Based on the above method, this invention provides a linear model y = 27.726 - 0.001923a - 0.06412b, which characterizes the relationship between gasoline hydrogen content, gasoline density, and gasoline final boiling point. This allows for the rapid acquisition of the gasoline hydrogen content corresponding to key parameters. The linear model has a root mean square error of 0.00956, indicating a good curve fit.
[0070] Based on any of the above embodiments, the linear model is constructed using the following steps:
[0071] Obtain historical gasoline density, historical gasoline final boiling point, and corresponding historical gasoline hydrogen content;
[0072] A linear model was obtained by linearly fitting the historical gasoline density, historical gasoline final boiling point, and historical gasoline hydrogen content.
[0073] Specifically, the data warehouse can store historical gasoline density, historical gasoline final boiling point, and their corresponding historical gasoline hydrogen content. Then, a regression model is established by approximating the discrete data using a binary linear analytical expression to obtain a linear model of the relationship between hydrogen content and density and final boiling point. Specifically, assuming the modeling data has m sets of sample data points, based on the discrete distribution of the training data, a continuous curve is used to approximate the functional relationship between the coordinates represented by the discrete point sets. An analytical expression is used to approximate the discrete data, thus obtaining a linear model. The mean squared error is used as an indicator to measure the goodness of fit of the model, reflecting the degree of fit. The smaller the mean squared error, the better the accuracy of the model's prediction results.
[0074] Based on any of the above embodiments, the data warehouse is established based on the following steps:
[0075] Obtain historical feedstock properties of gasoline and historical operating parameters of the catalytic cracking unit;
[0076] The historical raw material property parameters and historical operating parameters are cleaned, and the cleaned historical raw material property parameters and historical operating parameters are added to the data warehouse.
[0077] Specifically, historical raw material property parameters and historical operation parameters can be obtained from the demand list. The corresponding documents in the demand list are extracted, processed, and then concatenated into a data frame to obtain the historical raw material property parameters and historical operation parameters.
[0078] Since the acquired historical raw material property parameters and historical operation parameters may contain invalid values or outliers, this embodiment of the invention performs data cleaning on these parameters and adds the cleaned parameters to the data warehouse. For example, invalid feature screening and time regularization can be performed on the parameters in the data warehouse. However, time regularization can put significant pressure on memory. Therefore, a production unit-based approach can be used to establish corresponding MySQL databases and tables, and a time index (B+ tree) can be built on the time column of the corresponding table for each production unit. This reduces the response time of the data warehouse for a single query request from 3.7 seconds to 0.03 seconds.
[0079] Due to the massive data volume, data slicing can be performed to avoid frequent memory page faults (such as high system disk usage but unused disks, resulting in frequent data loading and unloading from memory). Testing in this embodiment of the invention, using a method of writing data to the database in five separate steps based on the function tree sampling in the data warehouse data persistence Python script, to control the data size at each step to no more than 100,000 records, successfully and completely stored the data in the MySQL database.
[0080] In addition, data warehouses can implement a simplified caching mechanism based on CSV (Comma-Separated Values), which means that data retrieval does not always require accessing the data warehouse, thus improving query efficiency.
[0081] Therefore, the data warehouse provided in this embodiment of the invention can achieve redundancy removal based on data cleaning scripts designed in Python, and can identify empty sites (failure sites), a large number of abnormal sites with single values, and flow sites with zero-point drift, etc., and delete or correct them. Then, it is stored in a database designed based on MySQL according to the division of production units, and each production unit can maintain a time stamp bit. The production units can be divided according to the reaction process. For example, catalytic cracking can be divided into three production units: reaction regeneration, fractionation, and absorption stabilization.
[0082] Based on any of the above, after obtaining the gasoline hydrogen content prediction model, the following is also included:
[0083] When the accuracy of the gasoline hydrogen content prediction model is less than the accuracy threshold, supplementary parameters are determined from the data warehouse. The correlation between the supplementary parameters and the gasoline hydrogen content is greater than the correlation threshold. The correlation between the supplementary parameters and the gasoline hydrogen content is determined based on mRMR.
[0084] Obtain the gasoline density and final boiling point corresponding to the supplementary parameters, and determine the gasoline hydrogen content corresponding to the supplementary parameters based on the gasoline density and final boiling point corresponding to the supplementary parameters.
[0085] The gasoline hydrogen content prediction model is updated based on the supplementary parameters and the corresponding gasoline hydrogen content.
[0086] Specifically, the accuracy of the gasoline hydrogen content prediction model is used to characterize the training effect of the model; higher accuracy indicates better training effect, while lower accuracy indicates worse training effect. When the accuracy of the gasoline hydrogen content prediction model is less than the accuracy threshold, it indicates that the training effect of the model is poor, which may be due to the low correlation between the selected key parameters and the gasoline hydrogen content, causing the model to be unable to accurately learn the relationship between the parameters affecting hydrogen content and the hydrogen content itself.
[0087] To address this, this embodiment of the invention selects supplementary parameters from a data warehouse. The correlation between these supplementary parameters and the hydrogen content of gasoline is greater than a correlation threshold, and the correlation between these supplementary parameters and the hydrogen content of gasoline is also greater than the correlation between the key parameters and the hydrogen content of gasoline. Simultaneously, the gasoline density and final boiling point corresponding to the supplementary parameters are obtained, enabling analysis of the content of each chemical component to obtain the hydrogen volume content corresponding to the supplementary parameters. Then, based on an ideal equation of state, the hydrogen volume content is converted into the gasoline hydrogen content corresponding to the supplementary parameters.
[0088] After determining the supplementary parameters and the corresponding gasoline hydrogen content, the gasoline hydrogen content prediction model is trained based on the supplementary parameters and the corresponding gasoline hydrogen content. This allows the gasoline hydrogen content prediction model to be updated, enabling the updated gasoline hydrogen content model to accurately predict the hydrogen content.
[0089] When determining supplementary parameters, this embodiment of the invention uses the mRMR (Max-Relevance and Min-Redundancy) method to select from the data warehouse. That is, based on Lasso, the correlation between each parameter in the data warehouse and the hydrogen content of gasoline is determined, and when the correlation between any parameter and the hydrogen content of gasoline is greater than the correlation threshold, the corresponding parameter is used as a supplementary parameter.
[0090] The specific process for determining the correlation between each parameter and the hydrogen content of gasoline is as follows:
[0091] Maximum Relevance Minimum Redundancy (mRMR) is a feature selection method based on mutual information. It selects features according to the maximum statistical dependence criterion, and seeks the set of features in the feature space that are most relevant to the target result and have the least redundancy among each other.
[0092] Mutual information can measure the correlation between two variables x and y:
[0093]
[0094] Assume S is the feature set, |S| is the number of features, y is the target variable, and I(f i ;y) represents feature f i Mutual information between the target variable y and the target variable y, I(f i ;f j ) represents feature f i with f j Mutual information between them. mRMR pursues:
[0095] Maximum correlation:
[0096] Minimum redundancy:
[0097] The mRMR algorithm is expressed as follows:
[0098]
[0099] The mRMR feature selection algorithm takes into account the balance between relevance and redundancy, and the selected feature subset can effectively improve the prediction accuracy of the prediction model.
[0100] Based on any of the above embodiments, the accuracy of the gasoline hydrogen content prediction model is determined based on the following steps:
[0101] Raw material property parameters and operating parameters are randomly obtained from the data warehouse as verification parameters, and the hydrogen content corresponding to the verification parameters is obtained.
[0102] Input the verification parameters into the gasoline hydrogen content prediction model to obtain the predicted hydrogen content output by the gasoline hydrogen content prediction model;
[0103] Based on the predicted hydrogen content and the hydrogen content corresponding to the validation parameters, the accuracy of the gasoline hydrogen content prediction model is determined; the accuracy of the gasoline hydrogen content prediction model includes at least one of the root mean square error, mean absolute error, and coefficient of determination.
[0104] Specifically, after obtaining the trained gasoline hydrogen content prediction model, it is necessary to evaluate the model's performance and determine its accuracy. Higher accuracy indicates better model performance, while lower accuracy indicates worse model performance.
[0105] To address this, after obtaining the gasoline hydrogen content prediction model, principle property parameters and operational parameters were randomly selected from the data warehouse as validation parameters. The gasoline density and final boiling point corresponding to these validation parameters were then obtained. The content of each chemical component was analyzed based on the gasoline density and final boiling point to obtain the hydrogen volume content. This hydrogen volume content was then converted to a hydrogen content percentage based on the ideal equation of state, yielding the hydrogen content corresponding to the validation parameters. Next, the validation parameters were input into the gasoline hydrogen content prediction model, which then predicted the hydrogen content.
[0106] Since the hydrogen content corresponding to the validation parameters obtained earlier serves as the label for the validation parameters, based on the hydrogen content corresponding to the validation parameters and the predicted hydrogen content, the deviation of the predicted hydrogen content output by the model from the hydrogen content corresponding to the validation parameters can be determined, thus obtaining the model's accuracy. If the model accuracy is low, supplementary parameters need to be obtained to further train the model and improve its performance.
[0107] The accuracy of the gasoline hydrogen content prediction model includes the root mean square error (RMSE), the mean absolute error (MSE), and the coefficient of determination (R²). 2 At least one of the following. In embodiments of the present invention, the root mean square error (RMSE), mean absolute error (MSE), and coefficient of determination (R²) can be set respectively. 2 The corresponding thresholds can be set, for example, the root mean square error (RMSE) threshold can be set to 0.6, meaning that when RMSE ≤ 0.6, it indicates that the accuracy of the gasoline hydrogen content prediction model meets the requirements and can accurately predict hydrogen content; another example is setting the coefficient of determination R... 2 The corresponding threshold is 0.65, which is in R. 2 A value of ≥0.65 indicates that the accuracy of the gasoline hydrogen content prediction model meets the requirements and can accurately predict hydrogen content.
[0108] Based on any of the above embodiments, the initial model is constructed based on the GBDT model.
[0109] A gasoline hydrogen content prediction model was constructed using GBDT. The grid search method was adopted, and each parameter to be adjusted was adjusted within a certain range based on the principle of minimizing the objective function Obj. The optimal model parameters were determined by first coarse adjustment and then fine adjustment.
[0110] The Python-based cross-validation script can directly separate 20% of the original data into a test set. Model selection and parameter tuning are then performed using k-fold cross-validation on the training set to divide the training and validation sets. The Python-based model evaluation script can assess the model's performance on the validation set, and the main evaluation metrics used include, but are not limited to:
[0111] Root mean square error:
[0112] Mean absolute error:
[0113] Coefficient of determination:
[0114] The final gasoline hydrogen content prediction model can only be output once the model evaluation indicators meet the requirements; otherwise, the hyperparameters of the GBDT model will be updated and iterated again until the evaluation indicators meet the requirements.
[0115] The key parameters of the GBDT model can be initialized as follows: n_estimators = 30, learning_rate = 0.1, subsample = 0.6, loss = 'ls', max_depth = 5, min_samples_split = 100, min_samples_leaf = 10, max_leaf_nodes = None. In this embodiment, the hyperparameters of GBDT can be adjusted using cross-validation results. This example uses five-fold cross-validation, employing grid search to combine and train the parameters near their initial values. Based on the actual calculation results, some parameters were modified. The adjusted key parameters are as follows: n_estimators = 38, learning_rate = 0.03, subsample = 0.7, max_depth = 8, min_samples_split = 80, min_samples_leaf = 15.
[0116] Therefore, this invention demonstrates that the embodiments of the present invention can achieve accurate calculation of hydrogen content using conventional physicochemical parameter analysis data from oil refineries, avoiding the drawbacks of long feedback cycles and high costs associated with chemical analysis. Furthermore, the rapid hydrogen content calculation model proposed in this invention can generate a sufficiently large sample size of gasoline hydrogen content at a very low cost to support the training of data-driven machine learning models. This enables the creation of a mapping model that links gasoline hydrogen content to feedstock properties and key production parameters, providing inspiration and guidance for production.
[0117] Based on any of the above embodiments, the present invention also provides a method for predicting the hydrogen content of gasoline, such as... Figure 2 As shown, the method includes:
[0118] Step 210: Determine the raw material property parameters and operating parameters corresponding to the gasoline to be predicted;
[0119] Step 220: Input the raw material property parameters and operating parameters corresponding to the gasoline to be predicted into the gasoline hydrogen content prediction model to obtain the hydrogen content prediction results output by the gasoline hydrogen content prediction model;
[0120] The gasoline hydrogen content prediction model is trained based on the gasoline hydrogen content prediction model training method described in any of the above embodiments.
[0121] Specifically, in this embodiment of the invention, an initial model is trained based on key parameters and the corresponding gasoline hydrogen content to obtain a gasoline hydrogen content prediction model. This enables the rapid and accurate prediction of hydrogen content even without high-precision analytical instruments. Furthermore, this embodiment of the invention can determine the hydrogen content prediction result through raw material property parameters and operating parameters, eliminating the need to collect gasoline samples for hydrogen content detection, thus achieving high efficiency.
[0122] Based on any of the above embodiments, the present invention also provides a gasoline hydrogen content prediction system, such as... Figure 3 As shown, the system includes: a data warehouse module, a data extraction module, a feature selection module, a model training module, and a prediction module.
[0123] The data warehouse module is used to build a data warehouse. This involves extracting historical raw material properties and operational parameters from the plant's chemical analysis and engineering DCS monitoring data, cleaning the data, and then establishing corresponding MySQL databases and tables for each production unit, implementing a CSV caching mechanism. Next, the feature selection module performs feature selection on the parameters in the data warehouse, identifying key parameters affecting hydrogen content. The data extraction module then calculates the corresponding gasoline hydrogen content based on the linear relationship between gasoline density and final boiling point. The model training module can then train a gasoline hydrogen content prediction model based on these key parameters and their corresponding hydrogen content. Finally, the prediction module uses this model to predict hydrogen content.
[0124] The gasoline hydrogen content prediction model device provided by the present invention is described below. The gasoline hydrogen content prediction model device described below can be referred to in correspondence with the gasoline hydrogen content prediction model method described above.
[0125] Based on any of the above embodiments, the present invention also provides a training device for a gasoline hydrogen content prediction model, such as... Figure 4 As shown, the device includes:
[0126] The parameter selection unit 410 is used to determine key parameters affecting the hydrogen content of gasoline from the data warehouse; the key parameters include the feedstock properties of gasoline and the operating parameters of the catalytic cracking unit.
[0127] The label determination unit 420 is used to determine the gasoline hydrogen content corresponding to the key parameter based on the gasoline density and gasoline final boiling point corresponding to the key parameter.
[0128] The model training unit 430 is used to train the initial model based on the key parameters and the corresponding gasoline hydrogen content to obtain a gasoline hydrogen content prediction model.
[0129] Based on any of the above embodiments, the gasoline hydrogen content corresponding to the key parameter is determined based on a linear model, which is:
[0130] y=27.726-0.001923a-0.06412b;
[0131] Where y represents the gasoline hydrogen content corresponding to the key parameter, a represents the gasoline density corresponding to the key parameter, and b represents the gasoline final boiling point corresponding to the key parameter.
[0132] Based on any of the above embodiments, the device further includes:
[0133] The first acquisition unit is used to acquire historical gasoline density, historical gasoline final boiling point and corresponding historical gasoline hydrogen content;
[0134] The model building unit is used to perform linear fitting on the historical gasoline density, the historical gasoline final boiling point, and the historical gasoline hydrogen content to obtain the linear model.
[0135] Based on any of the above embodiments, the device further includes:
[0136] The second acquisition unit is used to acquire historical feedstock property parameters of gasoline and historical operating parameters of the catalytic cracking unit.
[0137] The data cleaning unit is used to clean the historical raw material property parameters and the historical operation parameters, and add the cleaned historical raw material property parameters and historical operation parameters to the data warehouse.
[0138] Based on any of the above embodiments, the device further includes:
[0139] An analysis unit is used to determine supplementary parameters from the data warehouse after obtaining a gasoline hydrogen content prediction model, when the accuracy of the gasoline hydrogen content prediction model is less than an accuracy threshold. The correlation between the supplementary parameters and the gasoline hydrogen content is greater than a correlation threshold, and the correlation between the supplementary parameters and the gasoline hydrogen content is determined based on mRMR.
[0140] A hydrogen content determination unit is used to obtain the gasoline density and gasoline final boiling point corresponding to the supplementary parameter, and to determine the gasoline hydrogen content corresponding to the supplementary parameter based on the gasoline density and gasoline final boiling point corresponding to the supplementary parameter.
[0141] An update unit is used to update the gasoline hydrogen content prediction model based on the supplementary parameters and the gasoline hydrogen content corresponding to the supplementary parameters.
[0142] Based on any of the above embodiments, the device further includes:
[0143] The verification parameter acquisition unit is used to randomly acquire raw material property parameters and operation parameters from the data warehouse as verification parameters, and acquire the hydrogen content corresponding to the verification parameters;
[0144] A verification unit is used to input the verification parameters into the gasoline hydrogen content prediction model to obtain the predicted hydrogen content output by the gasoline hydrogen content prediction model.
[0145] An accuracy determination unit is used to determine the accuracy of the gasoline hydrogen content prediction model based on the predicted hydrogen content and the hydrogen content corresponding to the verification parameters; the accuracy of the gasoline hydrogen content prediction model includes at least one of root mean square error, mean absolute error, and coefficient of determination.
[0146] Based on any of the above embodiments, the initial model is constructed based on the GBDT model.
[0147] Based on any of the above embodiments, the present invention also provides a gasoline hydrogen content prediction device, such as... Figure 5 As shown, the device includes:
[0148] The parameter determination unit 510 is used to determine the raw material property parameters and operating parameters corresponding to the gasoline to be predicted.
[0149] The content prediction unit 520 is used to input the raw material property parameters and operating parameters corresponding to the gasoline to be predicted into the gasoline hydrogen content prediction model, and obtain the hydrogen content prediction result output by the gasoline hydrogen content prediction model.
[0150] The gasoline hydrogen content prediction model is trained based on the gasoline hydrogen content prediction model training method described in any of the above embodiments.
[0151] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 6 As shown, the electronic device may include a processor 610, a memory 620, a communication interface 630, and a communication bus 640, wherein the processor 610, memory 620, and communication interface 630 communicate with each other through the communication bus 640. The processor 610 can call logical instructions in the memory 620 to execute a gasoline hydrogen content prediction model training method. This method includes: determining key parameters affecting gasoline hydrogen content from a data warehouse; the key parameters include gasoline feedstock properties and catalytic cracking unit operating parameters; determining the gasoline hydrogen content corresponding to the key parameters based on the gasoline density and gasoline final boiling point; and training an initial model based on the key parameters and the corresponding gasoline hydrogen content to obtain a gasoline hydrogen content prediction model.
[0152] And / or, to perform a gasoline hydrogen content prediction method, the method comprising: determining the feedstock property parameters and operating parameters corresponding to the gasoline to be predicted; inputting the feedstock property parameters and operating parameters corresponding to the gasoline to be predicted into a gasoline hydrogen content prediction model, and obtaining the hydrogen content prediction result output by the gasoline hydrogen content prediction model; wherein, the gasoline hydrogen content prediction model is trained based on the gasoline hydrogen content prediction model training method described above.
[0153] Furthermore, the logical instructions in the aforementioned memory 620 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a 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 computer device (which may be a personal computer, server, or network device, etc.) 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.
[0154] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, which, when executed by a computer, enable the computer to execute the gasoline hydrogen content prediction model training method provided by the above methods. This method includes: determining key parameters affecting gasoline hydrogen content from a data warehouse; the key parameters include gasoline feedstock properties and catalytic cracking unit operating parameters; determining the gasoline hydrogen content corresponding to the key parameters based on the gasoline density and gasoline final boiling point; and training an initial model based on the key parameters and the gasoline hydrogen content corresponding to the key parameters to obtain a gasoline hydrogen content prediction model.
[0155] And / or, to perform a gasoline hydrogen content prediction method, the method comprising: determining the feedstock property parameters and operating parameters corresponding to the gasoline to be predicted; inputting the feedstock property parameters and operating parameters corresponding to the gasoline to be predicted into a gasoline hydrogen content prediction model, and obtaining the hydrogen content prediction result output by the gasoline hydrogen content prediction model; wherein, the gasoline hydrogen content prediction model is trained based on the gasoline hydrogen content prediction model training method described above.
[0156] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described gasoline hydrogen content prediction model training method. The method includes: determining key parameters affecting gasoline hydrogen content from a data warehouse; the key parameters including gasoline feedstock properties and operating parameters of a catalytic cracking unit; determining the gasoline hydrogen content corresponding to the key parameters based on the gasoline density and final boiling point of the key parameters; and training an initial model based on the key parameters and the gasoline hydrogen content corresponding to the key parameters to obtain a gasoline hydrogen content prediction model.
[0157] And / or, to perform a gasoline hydrogen content prediction method, the method comprising: determining the feedstock property parameters and operating parameters corresponding to the gasoline to be predicted; inputting the feedstock property parameters and operating parameters corresponding to the gasoline to be predicted into a gasoline hydrogen content prediction model, and obtaining the hydrogen content prediction result output by the gasoline hydrogen content prediction model; wherein, the gasoline hydrogen content prediction model is trained based on the gasoline hydrogen content prediction model training method described above.
[0158] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0159] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0160] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; 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; and these 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 training a gasoline hydrogen content prediction model, characterized in that, include: Key parameters affecting the hydrogen content of gasoline were identified from the data warehouse; these key parameters included the feedstock properties of gasoline and the operating parameters of the catalytic cracking unit. Based on the gasoline density and final boiling point corresponding to the key parameters, determine the gasoline hydrogen content corresponding to the key parameters; Based on the key parameters and the corresponding gasoline hydrogen content, the initial model is trained to obtain a gasoline hydrogen content prediction model. The gasoline hydrogen content corresponding to the key parameters is determined based on a linear model, which is: y=27.726-0.001923a-0.06412b; Where y represents the gasoline hydrogen content corresponding to the key parameter, a represents the gasoline density corresponding to the key parameter, and b represents the gasoline final boiling point corresponding to the key parameter. The linear model is used to characterize the linear relationship between hydrogen content and gasoline density and gasoline final boiling point.
2. The method for training a gasoline hydrogen content prediction model according to claim 1, characterized in that, The linear model was constructed based on the following steps: Obtain historical gasoline density, historical gasoline final boiling point, and corresponding historical gasoline hydrogen content; The historical gasoline density, the historical gasoline final boiling point, and the historical gasoline hydrogen content are linearly fitted to obtain the linear model.
3. The method for training a gasoline hydrogen content prediction model according to any one of claims 1 to 2, characterized in that, The data warehouse was established based on the following steps: Obtain historical feedstock properties of gasoline and historical operating parameters of the catalytic cracking unit; The historical raw material property parameters and historical operation parameters are cleaned, and the cleaned historical raw material property parameters and historical operation parameters are added to the data warehouse.
4. The method for training a gasoline hydrogen content prediction model according to any one of claims 1 to 2, characterized in that, After obtaining the gasoline hydrogen content prediction model, the following is also included: When the accuracy of the gasoline hydrogen content prediction model is less than the accuracy threshold, supplementary parameters are determined from the data warehouse. The correlation between the supplementary parameters and the gasoline hydrogen content is greater than the correlation threshold. The correlation between the supplementary parameters and the gasoline hydrogen content is determined based on mRMR. The gasoline density and final boiling point corresponding to the supplementary parameters are used to determine the gasoline hydrogen content corresponding to the supplementary parameters. The gasoline hydrogen content prediction model is updated based on the supplementary parameters and the corresponding gasoline hydrogen content.
5. The method for training a gasoline hydrogen content prediction model according to claim 4, characterized in that, The accuracy of the gasoline hydrogen content prediction model is determined based on the following steps: The raw material property parameters and operating parameters are randomly obtained from the data warehouse as verification parameters, and the hydrogen content corresponding to the verification parameters is obtained. The verification parameters are input into the gasoline hydrogen content prediction model to obtain the predicted hydrogen content output by the gasoline hydrogen content prediction model. Based on the predicted hydrogen content and the hydrogen content corresponding to the verification parameters, the accuracy of the gasoline hydrogen content prediction model is determined; the accuracy of the gasoline hydrogen content prediction model includes at least one of root mean square error, mean absolute error, and coefficient of determination.
6. The method for training a gasoline hydrogen content prediction model according to any one of claims 1 to 2, characterized in that, The initial model was constructed based on the GBDT model.
7. A method for predicting the hydrogen content of gasoline, characterized in that, include: Determine the raw material properties and operating parameters corresponding to the gasoline to be predicted; The raw material property parameters and operating parameters corresponding to the gasoline to be predicted are input into the gasoline hydrogen content prediction model to obtain the hydrogen content prediction result output by the gasoline hydrogen content prediction model. The gasoline hydrogen content prediction model is obtained by training based on the gasoline hydrogen content prediction model training method as described in any one of claims 1 to 6.
8. A training device for a gasoline hydrogen content prediction model, characterized in that, include: The parameter selection unit is used to determine the key parameters affecting the hydrogen content of gasoline from the data warehouse; The key parameters include the feedstock properties of gasoline and the operating parameters of the catalytic cracking unit; The label determination unit is used to determine the gasoline hydrogen content corresponding to the key parameter based on the gasoline density and gasoline final boiling point corresponding to the key parameter; The model training unit is used to train the initial model based on the key parameters and the corresponding gasoline hydrogen content to obtain a gasoline hydrogen content prediction model. The gasoline hydrogen content corresponding to the key parameters is determined based on a linear model, which is: y=27.726-0.001923a-0.06412b; Where y represents the gasoline hydrogen content corresponding to the key parameter, a represents the gasoline density corresponding to the key parameter, and b represents the gasoline final boiling point corresponding to the key parameter. The linear model is used to characterize the linear relationship between hydrogen content and gasoline density and gasoline final boiling point.
9. A gasoline hydrogen content prediction device, characterized in that, include: The parameter determination unit is used to determine the raw material property parameters and operating parameters corresponding to the gasoline to be predicted; The hydrogen content prediction unit is used to input the raw material property parameters and operating parameters corresponding to the gasoline to be predicted into the gasoline hydrogen content prediction model, and obtain the hydrogen content prediction result output by the gasoline hydrogen content prediction model. The gasoline hydrogen content prediction model is obtained by training based on the gasoline hydrogen content prediction model training method as described in any one of claims 1 to 6.