Method and apparatus for predicting sulfur content in refined wax oils

By constructing a full-feature and feature-selection model and combining it with the XGBOOST algorithm, features that are helpful in predicting the sulfur content of refined wax oil are selected, solving the problem of feature selection in causal relationship models and achieving higher prediction accuracy and efficiency.

CN123120113APending Publication Date: 2026-11-17CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510619426.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively construct causal relationship models for the hydrogenation process of wax oils through feature selection, resulting in insufficient accuracy and efficiency in predicting the sulfur content of refined wax oils.

Method used

A feature selection method based on complex causal relationship models is adopted. By constructing a full feature model and a feature selection model, new discriminant functions and thresholds are used to select features that are helpful for prediction performance. The model is then trained and tested using the XGBOOST algorithm.

Benefits of technology

It significantly improved the model's accuracy and the explanatory power of independent variables for dependent variables, thereby enhancing the accuracy and efficiency of predicting the sulfur content of refined wax oil.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123120113A_ABST
    Figure CN123120113A_ABST
Patent Text Reader

Abstract

This invention provides a method and apparatus for predicting the sulfur content of refined wax oil. The method includes: acquiring operating data of a wax oil hydrogenation unit; dividing the operating data into a training set and a test set; constructing a full-feature model, and training and testing the full-feature model using the training set and the test set to obtain the mean absolute error and adjusted coefficient of determination of the full-feature model; constructing multiple selective feature models, and training and testing each of the multiple selective feature models using the training set and the test set to obtain the mean absolute error and adjusted coefficient of determination of each of the multiple selective feature models; selecting features that satisfy the prediction error and fitting effect based on the full-feature model and the mean absolute error and adjusted coefficient of determination of each selective feature model; and constructing a sulfur content prediction model based on the selected features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the chemical industry, and more specifically to a method and apparatus for predicting the sulfur content of refined wax oil. Background Technology

[0002] In recent years, with the continuous improvement of computer storage and computing power, data models driven primarily by big data are playing an increasingly important role in the petrochemical industry. As the call for intelligent refinery development grows louder, establishing intelligent predictive models for wax and oil plants has become an important research direction.

[0003] Wax oil hydrotreating is a highly nonlinear and strongly correlated system, making mechanistic models inconvenient to apply. Therefore, a simple and flexible modeling approach is urgently needed. Data-driven models, which do not require extensive consideration of reaction mechanisms, offer greater flexibility and timeliness. They can simultaneously examine the impact of multi-dimensional and multi-factor data on the results, thereby providing refineries with more reasonable operating procedures and product performance control strategies for their wax oil hydrotreating units.

[0004] Establishing a data-driven model for wax oil hydrogenation essentially involves establishing a causal relationship between input variables X (raw material properties, operating conditions, catalyst properties) and output variables Y (product properties). Therefore, selecting appropriate features to represent various variables and constructing the functional relationship between input and output variables is crucial. Unlike feature selection methods based on pure correlation, the selection of features for causal relationships must consider both the interactions between independent variables and the interactions between independent and dependent variables. Therefore, developing new methods for selecting causal relationship features is of great significance. Summary of the Invention

[0005] The purpose of this invention is to provide a method and apparatus for predicting the sulfur content of refined wax oil. Specifically, this invention provides a new method for feature selection in complex causal relationship models. This method filters all features in the modeling process, compares the changes in evaluation indicators of the full-feature model and the selected-feature model on the test set data, and filters out features that are not conducive to the model's predictive performance through a new discriminant function and threshold.

[0006] To achieve the above objectives, the present invention provides a method for predicting the sulfur content of refined wax oil. The method includes: a method for constructing a prediction model for the sulfur content of refined wax oil, comprising: acquiring operating data of a wax oil hydrogenation unit, the data including raw material data, operating parameters, and the sulfur content of refined wax oil; dividing the operating data into a training set and a test set; constructing a full-feature model, and training and testing the full-feature model using the training set and the test set to obtain the mean absolute error and adjustment coefficient of the full-feature model, wherein the full-feature model is used to predict the sulfur content of the refined wax oil based on all features in the raw material data and operating parameters, the mean absolute error represents the average absolute error between the model output and the true value, and the adjustment coefficient of determination represents the ratio of the model output to the true value. The degree of fit to real values; constructing multiple screening feature models, and training and testing each of the multiple screening feature models using the training set and test set to obtain the mean absolute error and adjusted coefficient of determination of each of the multiple screening feature models, wherein each screening feature model only uses the features remaining after removing some features from the raw material data and operating parameters to predict the sulfur content of the refined wax oil; selecting features that meet the prediction error and fitting effect based on the mean absolute error and adjusted coefficient of determination of the full feature model and the mean absolute error and adjusted coefficient of determination of each screening feature model; and constructing a sulfur content prediction model based on the selected features, and training and testing the sulfur content prediction model using the training set and test set.

[0007] The operating parameters may include feed rate, circulating hydrogen volume, reaction pressure, and average temperature of each bed.

[0008] The raw material data may include the density of the raw material wax oil, the distillation range of the raw material, the sulfur content of the raw material wax oil, and the nitrogen content of the raw material wax oil.

[0009] Specifically, based on the mean absolute error and adjusted coefficient of determination of the full feature model and the mean absolute error and adjusted coefficient of determination of each selected feature model, features that satisfy the prediction error and fitting effect are selected, including: for each selected feature model, performing one or more of the following operations: if the mean absolute error of the selected feature model is less than the mean absolute error of the full feature model and the adjusted coefficient of determination is greater than the adjusted coefficient of determination of the full feature model, discarding some features removed by the selected feature model; if the mean absolute error of the selected feature model is greater than the mean absolute error of the full feature model and the adjusted coefficient of determination is less than the adjusted coefficient of determination of the full feature model, retaining some features removed by the selected feature model as features that satisfy the prediction error and fitting effect; in the case of the selected feature model... If the mean absolute error of the feature model is greater than the mean absolute error of the full feature model, and the adjusted coefficient of determination is greater than the adjusted coefficient of determination of the full feature model, then if the degree of worsening of the prediction effect is greater than the degree of improvement of the fitting effect, the features removed by the selected feature model are retained as features that satisfy both the prediction error and the fitting effect; otherwise, the features removed by the selected feature model are discarded. Conversely, if the mean absolute error of the selected feature model is less than the mean absolute error of the full feature model, and the adjusted coefficient of determination is less than the adjusted coefficient of determination of the full feature model, then if the degree of improvement of the prediction effect is greater than the degree of worsening of the fitting effect, the features removed by the selected feature model are discarded; otherwise, the features removed by the selected feature model are retained as features that satisfy both the prediction error and the fitting effect.

[0010] The degree of change in the prediction effect is represented as:

[0011] The degree of variation in the fitting effect is expressed as: (R all,adjust 2 -R i,adjust 2 )

[0012] Among them, MAE (all) R is the mean absolute error of the full feature model. all,adjust 2 The adjusted coefficient of determination (MAE) for the full feature model is given. (i) R is the mean absolute error of the selected feature model. i,adjust 2 This is the adjusted determination coefficient of the screening feature model.

[0013] The number of the plurality of screening feature models is equal to the number of all features in the raw material data and operating parameters. Each screening feature model corresponds to the feature remaining after removing one feature from all features. In other words, each screening feature model is constructed by removing one feature from all features, and each screening feature model corresponds to the removal of one feature.

[0014] On the other hand, the present invention provides a method for predicting the sulfur content of refined wax oil, the method comprising: acquiring raw material data and operating parameters involved in the production of refined wax oil; and inputting the raw material data and the operating parameters into the sulfur content prediction model constructed above to obtain the sulfur content of refined wax oil.

[0015] On the other hand, the present invention provides an apparatus for predicting the sulfur content of refined wax oil, the apparatus comprising: a memory; and a processor configured to predict the sulfur content of refined wax oil using the method described above.

[0016] On the other hand, the present invention provides a machine-readable storage medium storing instructions that, when executed by a processor, configure the processor to perform the above-described method for predicting the sulfur content of refined wax oil.

[0017] On the other hand, the present invention provides a computer program product, including a computer program that, when executed by a processor, causes the processor to be configured as described above for the method of predicting the sulfur content of refined wax oil.

[0018] The above technical solution establishes two types of models: a full-feature model and a feature-selective model. Based on the full-feature model, one feature is extracted and discarded at a time, with the remaining features and data used to build the feature-selective model. The prediction performance of the full-feature model and the feature-selective model is compared on the same test set. A new discriminant function and threshold are used as the criteria for feature selection. By comprehensively considering the changes in the model's mean absolute error and adjusted coefficient of determination before and after feature selection, the purpose of feature selection is achieved, solving the problem of feature selection in causal relationship models and significantly improving the model's accuracy and the explanatory power of the independent variables for the dependent variable.

[0019] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description

[0020] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings:

[0021] Figure 1 This is a flowchart of the method for constructing a prediction model for the sulfur content of refined wax oil provided by the present invention;

[0022] Figure 2 This is a flowchart of a method for predicting the sulfur content of refined wax oil provided by the present invention; and

[0023] Figure 3A and 3B The results show the predictive performance of the full feature model on the sulfur content of refined wax oil in the test set, and the predictive performance of the sulfur content prediction model constructed in this invention on the sulfur content of refined wax oil in the test set. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for illustration and explanation of the embodiments of this application and are not intended to limit the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0025] It should be noted that if the embodiments of this application involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of the components in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.

[0026] Furthermore, if the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0027] Figure 1 This is a flowchart of the method provided by the invention for constructing a predictive model for the sulfur content of refined wax oil. For example... Figure 1 As shown in one embodiment of this application, a method for constructing a prediction model for the sulfur content of refined wax oil is provided, the method comprising the following steps:

[0028] Step S110: Obtain operating data for the wax oil hydrotreating unit. This data includes feedstock data, operating parameters, and the sulfur content of the refined wax oil. For example, three years of operating data for a refinery's wax oil hydrotreating unit can be collected. The feedstock data and sulfur content analysis data in the refined wax oil product can be obtained from the LIMS system, while the operating data can be obtained from the DCS system.

[0029] Step S120: Divide the running data into a training set and a test set. This may also include a validation set. Generally, the evaluation data can be divided into a training set, a validation set, and a test set. The training and validation sets are used to build the model, and the test set is used to test the model's prediction performance. However, sometimes the data varies significantly, and it may be sufficient to divide all the data into two datasets: a training set and a test set.

[0030] Specifically, the collected data can be cleaned to remove missing, abnormal, erroneous, and incomplete data points, while ensuring a one-to-one correspondence in the time sequence. All data is divided into input data and output data, and entered into Excel separately. Input data includes: raw material data (density, distillation range, sulfur content, nitrogen content, etc.) and operating parameters (raw material feed rate, circulating hydrogen volume, reaction pressure, average temperature of each bed, etc.); output data is the sulfur content in the refined wax product.

[0031] Step S130: Construct a full feature model, and train and test the full feature model using the training set and test set to obtain the mean absolute error and adjusted coefficient of determination of the full feature model. The full feature model is used to predict the sulfur content of the refined wax oil based on all features in the raw material data and operating parameters. The input of the full feature model is all features in the raw material data and operating parameters, and the output is the sulfur content of the refined wax oil. The mean absolute error represents the average absolute error between the model output and the true value, and the adjusted coefficient of determination represents the degree of fit between the model output and the true value.

[0032] Step S140: Construct multiple screening feature models, and train and test each of the multiple screening feature models using the training set and test set to obtain the mean absolute error and adjusted coefficient of determination of each of the multiple screening feature models. Each screening feature model uses only the features remaining after removing some features (here, some features can be one or more features) from the raw material data and operating parameters to predict the sulfur content of the refined wax oil. The input of the screening feature model is the features remaining after removing some features from the raw material data and operating parameters, and the output is the sulfur content of the refined wax oil.

[0033] Step S150: Based on the mean absolute error and adjusted coefficient of determination of the full feature model and the mean absolute error and adjusted coefficient of determination of each selected feature model, select features that satisfy the prediction error and fitting effect; and

[0034] Step S160: Based on the selected features, construct a sulfur content prediction model, and use the training set and test set to train and test the sulfur content prediction model.

[0035] XGBOOST (eXtreme Gradient Boosting) is an ensemble machine learning algorithm based on decision trees. It uses gradient boosting as its framework and is derived from GBDT (Gradient Boosting Decision Tree). It also optimizes the learning process using an additive model and a forward distribution algorithm. When constructing the full-feature model and the feature-selection model, Python can be used to write the model and call the open-source XGBOOST algorithm to build it. Model training requires calling the input and output features stored in Excel. The input features are mainly divided into two parts: raw material data and operating parameters. The raw material data (or raw material properties) includes: raw material density, raw material sulfur content, raw material nitrogen content, raw material carbon residue content, and raw material wax oil distillation range (IBP, T10, T30, ..., FBP), etc. The operating parameters include: vacuum wax oil feed rate, coking wax oil feed rate, tank farm wax oil feed rate, circulating hydrogen quantity, fresh hydrogen quantity, reactor pressure, and average temperature of each bed, etc. The output feature is the sulfur content in the refined wax product.

[0036] The features and data corresponding to the input and output are cleaned, ensuring a one-to-one correspondence between the features and data in time sequence as much as possible. These are then organized into Excel spreadsheets for easy reading by the algorithm. All data is randomly divided into training and test sets. The training set is used for hyperparameter optimization and model training. The test set is used to evaluate the model's prediction performance. The evaluation metrics for the model are Mean Absolute Error (MAE) and Adjusted Coefficient of Determination (R²). adjust 2 The relevant statistical parameters required to build the model are as follows. Among them,

[0037]

[0038] In the above formula, a is the number of samples in the test set, n is the total number of samples in the training set and the test set, m is the number of independent variable features (i.e., the features of the model input, such as the features involved in the above raw material data and operating parameters, such as raw material density, raw material sulfur content, raw material nitrogen content, raw material carbon residue content, raw material wax oil distillation range, vacuum wax oil feed rate, coking wax oil feed rate, tank farm wax oil feed rate, circulating hydrogen quantity, fresh hydrogen quantity, reactor pressure, average temperature of each bed, etc.), and y i,actual For the true value of the sample, y i,predicted For the sample predicted value, RA represents the sample mean true value. Here, MAE reflects the degree to which the predicted values ​​of all samples deviate from the true values, and RA represents the true value. 2 It can reflect how well the model output fits the true value. However, this invention involves changes in the number of independent variable features. In fact, as the number of independent variable features increases, R... 2 Generally, the coefficient of determination increases regardless of whether the feature itself is actually effective. Considering that the coefficient of determination gradually increases with the number of independent variables in the model, we need to introduce a penalty term into the formula. This penalty term ensures that the coefficient of determination only increases when variables that truly contribute to the analysis are introduced. We call this coefficient of determination with the added penalty term the adjusted coefficient of determination R0. adjust 2 .

[0039] For example, when building a full-feature model, all input features (e.g., 20) and data can be mapped one-to-one with the output feature (sulfur content of refined wax oil), and randomly divided into training and testing sets. A Python program can then be used to access the training and testing set data from an Excel spreadsheet. The training set is used to train the model, and the XGBoost hyperparameter is adjusted to obtain the mean absolute error (MAE) of the full-feature model. (all) and the adjusted coefficient of determination R all,adjust 2 .

[0040] For example, when building multiple feature selection models, the training and test sets can be kept unchanged. One feature is removed each time, resulting in 20 feature selection models with 19 input features (taking the aforementioned 20 full features as an example) and unchanged output features. The mean absolute error (MAE) of these 20 feature selection models can then be calculated. (1) MAE (2) MAE (20) The adjusted coefficients of determination are R0 and R1 respectively. 1,adjust 2 R 2,adjust 2 R 20,adjust 2 .

[0041] Subsequently, the difference between the mean absolute error and the adjusted coefficient of determination of the full feature model and the selected feature model is calculated, i.e., ΔR. i,adjust 2 Let △R i,adjust 2 =R all,adjust 2 -R i,adjust 2 We obtain △R 1,adjust 2 R 2,adjust 2 ,,,,,,,,△R k,adjust 2 Let △MAE (i) =MAE (all) -MAE (i) We obtain △MAE (1) , △MAE (2) ,,,,,,,△MAE (20) .

[0042] Taking into account the impact of the difference between the mean absolute error and the adjusted coefficient of determination on the model, a new discriminant function is designed. The new discriminant function is: f = ΔMAE (i) *△R i,adjust 2 The detailed criteria for feature retention and removal are shown in the following formula.

[0043]

[0044] Specifically, this means that for each feature selection model, one or more of the following operations are performed:

[0045] If the mean absolute error of the screening feature model is less than the mean absolute error of the full feature model, and the adjustment determination coefficient is greater than the adjustment determination coefficient of the full feature model, then some features removed by the screening feature model are eliminated, i.e., the situation represented by the above formula (1).

[0046] If the mean absolute error of the selected feature model is greater than the mean absolute error of the full feature model, and the adjustment coefficient of determination is less than the adjustment coefficient of determination of the full feature model, the features removed by the selected feature model are retained as features that satisfy the prediction error and fitting effect, i.e., the situation represented by the above formula (2).

[0047] If the mean absolute error of the selected feature model is greater than the mean absolute error of the full feature model, and the adjusted coefficient of determination is greater than the adjusted coefficient of determination of the full feature model, then if the degree of worsening of the prediction effect is greater than the degree of improvement of the fitting effect, the features removed by the selected feature model are retained as features that satisfy both the prediction error and the fitting effect, i.e., the situation represented by equation (6) above; otherwise, the features removed by the selected feature model are eliminated, i.e., the situation represented by equation (5) above; and

[0048] If the mean absolute error of the selected feature model is less than the mean absolute error of the full feature model, and the adjustment coefficient of determination is less than the adjustment coefficient of the full feature model, then if the degree of improvement in the prediction effect is greater than the degree of deterioration in the fitting effect, the features removed by the selected feature model are eliminated, i.e., the situation represented by equation (3) above; otherwise, the features removed by the selected feature model are retained as features that satisfy the prediction error and fitting effect, i.e., the situation represented by equation (4) above.

[0049] The degree of change in the prediction effect is represented as:

[0050] The degree of variation in the fitting effect is expressed as: (R all,adjust 2 -R i,adjust 2 )

[0051] Among them, MAE (all) R is the mean absolute error of the full feature model. all,adjust 2 The adjusted coefficient of determination (MAE) for the full feature model is given. (i) R is the mean absolute error of the selected feature model. i,adjust 2 This is the adjusted determination coefficient of the screening feature model.

[0052] The number of the multiple screening feature models is equal to the number of features in the raw material data and operating parameters. Each screening feature model corresponds to the feature remaining after removing one feature from all features. In other words, each screening feature model is constructed by removing one feature from all features, and each screening feature model corresponds to the removal of one feature. Thus, the same number of screening feature models as the total number of features can be established, since each feature is removed once. Alternatively, each screening feature model can also be constructed by removing multiple features (e.g., 2 or 3 features) from all features, and each screening feature model corresponds to the removal of multiple features (e.g., 2 or 3 features), meaning multiple features can be removed at once.

[0053] It should be noted that although the above uses raw material data, operating parameters, and refined wax oil sulfur content as examples for illustration, the present invention can actually be applied to various scenarios that require feature screening in order to obtain better prediction results.

[0054] Figure 2 A flowchart illustrating the method for predicting the sulfur content of refined wax oil provided by the present invention is shown. Figure 2 As shown in one embodiment of this application, a method for predicting the sulfur content of refined wax oil is provided, the method comprising the following steps:

[0055] Step S210: Obtain raw material data and operating parameters involved in the process of generating refined wax oil; and

[0056] Step S220: Input the raw material data and operating parameters into the sulfur content prediction model constructed above to obtain the sulfur content of refined wax oil.

[0057] This mainly utilizes Figure 1 The method shown is used to construct a sulfur content prediction model to predict the sulfur content of refined wax oil.

[0058] The present invention will be further described in detail below with examples, but the present invention is not limited thereto.

[0059] (1) In this specific embodiment, three years of operating data from a refinery's wax oil hydrogenation unit were used to verify the method of the present invention. After cleaning and deleting erroneous data, the dataset contained 149 measurement data points, with a sampling interval of once a day, and included 20 independent variable features and 1 dependent variable feature.

[0060] (2) For a sample set of 149 measurement data points and 20 independent variable features, define the sample line as a, a = 1, 2, 3, ..., 149; the feature column as b, b = 1, 2, ..., 20; and the input independent variable as X. ab The matrix. Similarly, define the sample columns as a, a = 1, 2, 3, ..., 149; and the dependent variable Y as b, b = 1. ab The matrix, X ab With Y ab One-to-one correspondence; the ratio of training set to test set samples is 8:2.

[0061] (3) Establish a full feature model and use the XGBOOST algorithm to build a data-driven model. Optimize the hyperparameters of the XGBOOST algorithm as follows: learning rate = 0.25, n_estimators = 100, max_depth = 3, min_child_weight = 1, colsample_bytree = 0.4, colsample_bylevel = 0.4, reg_lambda = 1, reg_alpha = 0. Predict the model's MAE on the test set data. (all) and R all,adjust 2 Among them, MAE (all) =179.58ppm, R all,adjust 2 =0.48.

[0062] (4) Ensure that the dependent variable characteristic column remains unchanged in step (2), and remove one independent variable characteristic column at a time. The characteristic columns to be removed are x. a1、 x a2 ,…,x a20 With the rows and columns of other independent variables remaining unchanged, we obtain a matrix of 20 samples with 149 rows and 19 feature columns, along with the dependent variable Y. ab One-to-one correspondence, using the XGBOOST algorithm, a data-driven model is established, and the hyperparameters of the XGBOOST algorithm are optimized. The hyperparameters are consistent with those in step (3). The mean absolute errors (MAE) of the 20 models are obtained as follows: (1) MAE (2) MAE (20) and the adjusted coefficient of determination R 1,adjust 2 R 2,adjust 2 R 20,adjust 2 .

[0063] (5) Let △R i,adjust 2 =R all,adjust 2 -R i,adjust 2 We obtain △R 1,adjust 2 R 2,adjust 2 ,,,,,,,,△R 20,adjust 2 Let △MAE (i) =MAE (all) -MAE (i) We obtain △MAE (1) , △MAE(2) ,,,,,,,△MAE (20) The results after sorting are shown in Table 1.

[0064] Table 1. Mean Absolute Error (MAE) and Adjusted Coefficient of Determination (R) for the Full Feature Model and the Selected Feature Model adjust 2 Compare

[0065]

[0066] In the table, VGO: vacuum gas oil; TWO: tank farm gas oil; CWO: coking gas oil; SI: feedstock sulfur content; NI: feedstock nitrogen content; IBP: feedstock initial boiling point; 10%: feedstock 10% distillation temperature; 30%: feedstock 30% distillation temperature; 50%: feedstock 50% distillation temperature; 70%: feedstock 70% distillation temperature; 90%: feedstock 90% distillation temperature; 95%: feedstock 95% distillation temperature; FBP: feedstock final boiling point; Cresidue: residual carbon content; PI: reactor inlet temperature; Circle H: circulating hydrogen flow rate; ΔP: total pressure drop of the reactor bed; T1pin: average temperature of the first bed; T2pin: average temperature of the second bed; T3pin: average temperature of the third bed.

[0067] (6) Design a new discriminant function. The new discriminant function is shown in the table below.

[0068]

[0069] As can be seen from the table above, f = △MAE (i) *△R i,adjust 2 The discussion was divided into categories, mainly f>0 and f<0.

[0070] First, let's discuss f<0, when △MAE (i) >0, △R i,adjust 2 A value less than 0 indicates that removing this feature reduces the model's prediction error and improves the fitting effect; therefore, the feature should be eliminated. When ΔMAE... (i) <0, △R i,adjust 2 A value >0 indicates that removing this feature increases the model's prediction error and worsens the fit; therefore, the removed feature should be retained.

[0071] Let's further discuss f>0, when △MAE (i) >0, △R i,adjust 2When the value is greater than 0, it indicates that removing this feature will worsen the model's prediction performance but improve its fit. In this case, a new discrimination method needs to be designed to balance the worsening prediction performance and the improving fit. If the degree of worsening prediction performance is greater than the degree of improving fit, the removed feature should be discarded; if the degree of worsening prediction performance is less than the degree of improving fit, the removed feature should be retained. Similarly, when ΔMAE... (i) <0, △R i,adjust 2 When <0, the method for selecting features is the same.

[0072] (7) Substitute the result calculated in step (5) into step (6) and eliminate the features that do not meet the threshold: raw material wax oil distillation range T10 and raw material wax oil distillation range T90. The remaining features can be selected as the features that meet the prediction error and fitting effect.

[0073] (8) Based on the selected features, construct a sulfur content prediction model, and use the training set and test set to train and test the sulfur content prediction model.

[0074] (9) Under the premise of the same dataset, compare the mean absolute error (MAE) and adjusted coefficient of determination (R) of the full feature model and the sulfur content prediction model. adjust 2 The results of the comparison are shown in Table 2. Table 2 shows that, compared to the full-feature model, the sulfur content prediction model has a significantly smaller prediction error and a larger adjusted coefficient of determination.

[0075] Table 2 Comparison of prediction performance of the full-feature model and the sulfur content prediction model on the test set.

[0076] Modeling methods MAE <![CDATA[R adjust 2 ]]> Percentage of data with prediction error <2% Full feature model 179.58 0.48 29% Sulfur content prediction model 174.1 0.52 32%

[0077] The results in Tables 1 and 2 fully demonstrate that the method of the present invention can effectively screen the characteristic variables of the causal relationship model, significantly improve the accuracy of the model and the explanatory power of the independent variables on the dependent variable.

[0078] in addition, Figure 3A and 3B The prediction results of the full-feature model and the sulfur content prediction model constructed in this invention on the sulfur content of refined wax oil in the test set are shown respectively. Figure 3A and 3B It can also be seen that the sulfur content prediction model constructed in this case has a better overall prediction effect on the sulfur content of refined wax oil in the test set.

[0079] Overall, this invention provides a novel method for feature selection in complex causal relationship models. The steps include: (1) mapping all input features K and output features (sulfur content of refined wax oil products) of the model one-to-one, dividing them into training and testing sets. The training set is used to train the model, and the testing set is used to test the prediction effect. (2) Establishing two types of models: a full-feature model and a feature-selected model. (3) Compared to the full-feature model, one feature is selected each time, and the model established by the remaining features is the feature-selected model. (4) Calculating the mean absolute error (MAE) and adjusted coefficient of determination (R) for the full-feature model and the feature-selected model, respectively. i,adjust 2 (5) Design a new discriminant function, expressed as the difference between the mean absolute error ΔMAE and the difference between the adjusted coefficient of determination ΔR of the full feature model and the selected feature model. i,adjust 2 (6) Select the corresponding features based on the threshold of the discriminant function. Practice shows that the model built by the features selected by the new method has better generalization ability and prediction effect than the full feature model, which illustrates the effectiveness of the method.

[0080] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0081] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0082] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0083] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0084] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0085] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0086] Computer-readable media include both permanent and non-permanent, removable and non-removable media, which can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0087] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0088] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for constructing a predictive model for the sulfur content of refined wax oil, the method comprising: Obtain operational data from the wax oil hydrogenation unit, including feed data, operating parameters, and sulfur content of the refined wax oil; The runtime data is divided into a training set and a test set; A full-feature model is constructed, and the full-feature model is trained and tested using the training set and the test set to obtain the mean absolute error and the adjusted coefficient of determination of the full-feature model. The full-feature model is used to predict the sulfur content of the refined wax oil based on all features in the raw material data and operating parameters. The mean absolute error represents the average absolute error between the model output and the true value, and the adjusted coefficient of determination represents the degree of fit between the model output and the true value. Multiple screening feature models are constructed, and each screening feature model is trained and tested using the training set and the test set to obtain the mean absolute error and adjusted coefficient of determination of each screening feature model. Each screening feature model uses only the features remaining after removing some features from the raw material data and operating parameters to predict the sulfur content of the refined wax oil. Based on the mean absolute error and adjusted coefficient of determination of the full feature model and the mean absolute error and adjusted coefficient of determination of each selected feature model, features that satisfy the prediction error and fitting effect are selected. as well as Based on the selected features, a sulfur content prediction model is constructed, and the model is trained and tested using the training set and the test set.

2. The method according to claim 1, characterized in that, The operating parameters include feed rate, circulating hydrogen volume, reaction pressure, and average temperature of each bed.

3. The method according to claim 1, characterized in that, The raw material data includes the density of the raw material wax oil, the distillation range of the raw material, the sulfur content of the raw material wax oil, and the nitrogen content of the raw material wax oil.

4. The method according to claim 1, characterized in that, Based on the mean absolute error and adjusted coefficient of determination of the full feature model and the mean absolute error and adjusted coefficient of determination of each selected feature model, features that satisfy the prediction error and fitting effect are selected, including: for each selected feature model, one or more of the following operations are performed: If the mean absolute error of the screening feature model is less than the mean absolute error of the full feature model, and the adjustment coefficient of determination is greater than the adjustment coefficient of determination of the full feature model, then some features removed by the screening feature model are eliminated. If the mean absolute error of the selected feature model is greater than the mean absolute error of the full feature model, and the adjustment coefficient of determination is less than the adjustment coefficient of determination of the full feature model, then the features removed by the selected feature model are retained as features that satisfy the prediction error and fitting effect. If the mean absolute error of the selected feature model is greater than the mean absolute error of the full feature model, and the adjusted coefficient of determination is greater than the adjusted coefficient of determination of the full feature model, then if the degree of worsening of the prediction effect is greater than the degree of improvement of the fitting effect, the features removed by the selected feature model are retained as features that satisfy both the prediction error and the fitting effect; otherwise, the features removed by the selected feature model are discarded. If the mean absolute error of the selected feature model is less than the mean absolute error of the full feature model, and the adjustment coefficient of determination is less than the adjustment coefficient of the full feature model, then if the degree of improvement in prediction effect is greater than the degree of deterioration in fitting effect, the features removed by the selected feature model are eliminated; otherwise, the features removed by the selected feature model are retained as features that satisfy both prediction error and fitting effect.

5. The method according to claim 4, characterized in that, The degree of change in the predicted effect is expressed as: The degree of change in the fit effect is expressed as: (R all,adjust 2 -R i,adjust 2 ) Among them, MAE (all) R is the mean absolute error of the full feature model. all,adjust 2 The adjusted coefficient of determination (MAE) for the full feature model is given. (i) R is the mean absolute error of the selected feature model. i,adjust 2 This is the adjusted determination coefficient of the screening feature model.

6. The method according to claim 1, characterized in that, The number of the multiple screening feature models is equal to the number of all features in the raw material data and operating parameters, and each screening feature model corresponds to the feature remaining after removing one feature from all features.

7. A method for predicting the sulfur content of refined wax oil, the method comprising: Obtain raw material data and operating parameters involved in the production of refined wax oil; as well as The raw material data and operating parameters are input into the sulfur content prediction model constructed according to any one of claims 1-6 to obtain the sulfur content of refined wax oil.

8. An apparatus for predicting the sulfur content of refined wax oil, characterized in that, The device includes: Memory; and A processor configured to predict the sulfur content of refined wax oil using the method for predicting the sulfur content of refined wax oil according to claim 7.

9. A machine-readable storage medium storing instructions thereon, characterized in that, When executed by a processor, this instruction causes the processor to be configured to perform the method for predicting the sulfur content of refined wax oil according to claim 7.

10. A computer program product comprising a computer program that, when executed by a processor, causes the processor to perform the method for predicting the sulfur content of refined wax oil according to claim 7.