Method, device, medium and equipment for determining wax oil sulfur content prediction model
By training wax oil sample data and using GBDT or XGBOOST models to remove candidate parameter features, the target sulfur content prediction model is determined, which solves the problem of insufficient accuracy of existing wax oil sulfur content prediction models and achieves higher prediction accuracy and model simplification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-26
- Publication Date
- 2026-04-14
AI Technical Summary
Existing models for predicting sulfur content in wax oil lack accuracy and are complex to solve, making it difficult to obtain the optimal solution.
By acquiring wax oil sample data, training is performed using GBDT, Random Forest, or XGBOOST models, candidate parameter features are removed, and a sulfur content prediction sub-model is obtained. The target sulfur content prediction model is then determined by comparing the prediction results.
This improved the accuracy and interpretability of the sulfur content prediction model in wax oil, reduced the complexity of model solution, and enhanced the reliability and generalization of prediction results.
Smart Images

Figure CN115732042B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more specifically, to a method, apparatus, medium, and equipment for determining a prediction model for sulfur content in 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. In related technologies, refined wax oil can be obtained by processing wax oil through a refinery's wax oil hydrogenation unit. The sulfur content of the refined wax oil is often used to evaluate its quality.
[0003] In related technologies, when predicting the sulfur content in refined wax oil, the most commonly used modeling method is to make assumptions and simplifications about the product based on a specific catalyst and within a certain range of raw material properties and reaction conditions. The solution and parameter evaluation process of such models is very complex, and the large number of parameters may even make it difficult for the model to obtain the optimal solution, resulting in insufficient accuracy in predicting sulfur content. Summary of the Invention
[0004] The purpose of this disclosure is to provide a method, apparatus, medium, and equipment for determining a highly accurate and reliable prediction model for sulfur content in wax oil.
[0005] According to a first aspect of the present disclosure, a method for determining a prediction model for sulfur content in wax oil is provided, comprising:
[0006] Obtain wax oil sample data, wherein the wax oil sample data includes feature data corresponding to multiple parameter features of wax oil generation, and the sulfur content corresponding to the wax oil, wherein the parameter features include raw material parameter features and / or operation parameter features;
[0007] Using multiple parameter features in the wax oil sample data as input and the sulfur content in the wax oil sample data as the target output, the preset model is trained to obtain the trained sulfur content prediction model.
[0008] For each candidate parameter feature, the candidate parameter feature is deleted from the wax oil sample data to obtain wax oil sub-sample data corresponding to the candidate parameter feature, wherein the candidate parameter feature is at least one of the plurality of parameter features;
[0009] For each candidate parameter feature, the pre-set model is trained using the parameter features contained in the wax oil sub-sample data as input and the sulfur content in the wax oil sub-sample data as the target output, to obtain a sulfur content prediction sub-model corresponding to the candidate parameter feature.
[0010] The target sulfur content prediction model is determined based on the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each candidate parameter feature.
[0011] Optionally, determining the target sulfur content prediction model based on the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each candidate parameter feature includes:
[0012] Based on the test sample data, the error values corresponding to the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each of the candidate parameter features are determined respectively.
[0013] For each sulfur content prediction sub-model, if the error value corresponding to the sulfur content prediction model is less than the error value corresponding to the sulfur content prediction sub-model, then the candidate parameter feature corresponding to the sulfur content prediction sub-model is determined as the target parameter feature.
[0014] Based on the target parameter characteristics and the wax oil sample data, the target sulfur content prediction model is determined.
[0015] Optionally, determining the target sulfur content prediction model based on the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each candidate parameter feature includes:
[0016] Based on the test sample data, the feature fitting parameters corresponding to the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each of the candidate parameter features are determined respectively, wherein the feature fitting parameters are used to represent the degree of fit of each parameter feature in the model corresponding to the feature fitting parameter to the sulfur content prediction.
[0017] For each sulfur content prediction sub-model, if the feature fitting parameter corresponding to the sulfur content prediction model is greater than the feature fitting parameter corresponding to the sulfur content prediction sub-model, then the candidate parameter feature corresponding to the sulfur content prediction sub-model is determined as the target parameter feature.
[0018] Based on the target parameter characteristics and the wax oil sample data, the target sulfur content prediction model is determined.
[0019] Optionally, determining the target sulfur content prediction model based on the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each candidate parameter feature includes:
[0020] Based on the test sample data, the feature fitting parameters and error values corresponding to the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each candidate parameter feature are determined respectively. The feature fitting parameters are used to represent the degree of fit of each parameter feature in the model corresponding to the feature fitting parameter to the sulfur content prediction.
[0021] For each sulfur content prediction sub-model, if the feature fitting parameter corresponding to the sulfur content prediction model is greater than the feature fitting parameter corresponding to the sulfur content prediction sub-model, and the error value corresponding to the sulfur content prediction model is less than the error value corresponding to the sulfur content prediction sub-model, then the candidate parameter feature corresponding to the sulfur content prediction sub-model is determined as the target parameter feature.
[0022] Based on the target parameter characteristics and the wax oil sample data, the target sulfur content prediction model is determined.
[0023] Optionally, the feature fitting parameters are determined as follows:
[0024]
[0025]
[0026] in, Used to represent the feature fitting parameters;
[0027] 'a' is used to represent the number of test sample data;
[0028] n represents the sum of the test sample data and the sample data used for model training;
[0029] m is used to represent the number of parametric features in the model;
[0030] y i,actual Used to represent the sulfur content in the i-th test sample data;
[0031] y i,predicted Used to represent the predicted sulfur content corresponding to the i-th test sample data;
[0032] The average value used to represent the sulfur content of the test sample data.
[0033] Optionally, determining the target sulfur content prediction model based on the target parameter features and the wax oil sample data includes:
[0034] Extract the data corresponding to the target parameter features from the wax oil sample data as target feature data, and take the sulfur content corresponding to the wax oil sample data as target sulfur content to obtain target sample data;
[0035] For each target sample data, the target feature data of the target sample data is used as input, and the target sulfur content of the target sample data is used as the target output to train the preset model and obtain the trained target sulfur content prediction model.
[0036] Optionally, the preset model is any one of the GBDT model, random forest model, and XGBOOST model.
[0037] According to a second aspect of the present disclosure, an apparatus for determining a prediction model for sulfur content in wax oil is provided, the apparatus comprising:
[0038] The first acquisition module is used to acquire wax oil sample data, wherein the wax oil sample data includes feature data corresponding to multiple parameter features of wax oil generation, and the sulfur content corresponding to the wax oil, wherein the parameter features include raw material parameter features and / or operation parameter features;
[0039] The first training module is used to train a preset model by taking multiple parameter features in the wax oil sample data as input and the sulfur content in the wax oil sample data as the target output, so as to obtain a trained sulfur content prediction model.
[0040] The second acquisition module is used to delete the candidate parameter feature from the wax oil sample data for each candidate parameter feature, and obtain wax oil sub-sample data corresponding to the candidate parameter feature, wherein the candidate parameter feature is at least one of the plurality of parameter features;
[0041] The second training module is used to train the preset model for each candidate parameter feature, taking the parameter features contained in the wax oil sub-sample data as input and the sulfur content in the wax oil sub-sample data as the target output, to obtain a sulfur content prediction sub-model corresponding to the candidate parameter feature.
[0042] The determination module is used to determine the target sulfur content prediction model based on the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each of the candidate parameter features.
[0043] According to a third aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the method for determining the sulfur content prediction model in wax oil provided in the first aspect of the present disclosure.
[0044] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising:
[0045] A memory on which computer programs are stored;
[0046] A processor is configured to execute the computer program in the memory to implement the steps of the method for determining the sulfur content prediction model in wax oil provided in the first aspect of this disclosure.
[0047] In the above scheme, the model is trained based on wax oil sample data containing all parameter features to obtain a sulfur content prediction model. Then, for each candidate parameter feature, the model is trained based on data from the wax oil sample data excluding that candidate parameter feature, obtaining a sulfur content prediction sub-model corresponding to each candidate parameter feature. The prediction performance of each sulfur content prediction sub-model and the sulfur content prediction model can be compared to determine the target sulfur content prediction model. Therefore, by using the above scheme to determine the target sulfur content prediction model, the candidate parameter feature can be used as the only variable parameter. By comparing the impact of deleting the candidate parameter feature on sulfur content prediction, it can be determined whether the candidate parameter feature is an effective feature for predicting sulfur content. This provides accurate and effective data support for determining the target sulfur content prediction model, and also provides data support for simplifying the parameters in the target sulfur content prediction model, ensuring the efficiency of solving and optimizing the target sulfur content prediction model, while also ensuring the accuracy of the output results of the target sulfur content prediction model. Furthermore, by using the above scheme and performing individual verification on each candidate parameter feature, the correlation between the candidate parameter feature and the sulfur content can be clarified, making the prediction process of the target sulfur content prediction model more interpretable and generalizable, and further improving the credibility and accuracy of the output results of the target sulfur content prediction model.
[0048] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0049] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the following detailed description to explain the present disclosure, but do not constitute a limitation thereof. In the drawings:
[0050] Figure 1 This is a flowchart illustrating a method for determining a prediction model for sulfur content in wax oil according to an exemplary embodiment.
[0051] Figure 2a and Figure 2b This is a table showing the feature fitting parameters and error values corresponding to a candidate parameter feature according to an exemplary embodiment.
[0052] Figure 3a It is a line graph comparing the prediction results and the actual results of the sulfur content prediction model that includes all parameter features.
[0053] Figure 3b This is a line graph comparing the prediction results and the actual results of a target sulfur content prediction model based on target parameter features.
[0054] Figure 4This is a block diagram illustrating a device for determining a prediction model of sulfur content in wax oil according to an exemplary embodiment.
[0055] Figure 5 This is a block diagram illustrating an electronic device according to an exemplary embodiment.
[0056] Figure 6 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0057] The specific embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit this disclosure.
[0058] Figure 1 This is a flowchart illustrating a method for determining the sulfur content in wax oil based on a prediction model, such as... Figure 1 As shown, the method may include the following steps:
[0059] In step 11, wax oil sample data is obtained, wherein the wax oil sample data includes feature data corresponding to multiple parameter features of wax oil generation, as well as the sulfur content of wax oil. The parameter features include raw material parameter features and / or operation parameter features.
[0060] The parameter characteristics include raw material parameter characteristics and / or operating parameter characteristics. Raw material parameter characteristics may be one or more of the following: raw material density, raw material sulfur content, raw material nitrogen content, raw material residual carbon content, and raw material distillation. Operating parameter characteristics may be one or more of the following: vacuum gas oil feed rate, coking gas oil feed rate, tank farm gas oil feed rate, circulating hydrogen rate, fresh hydrogen rate, reactor pressure, and average bed temperature.
[0061] For example, with user authorization, it is possible to obtain historical operating data of a refinery's wax oil hydrotreating unit. This data can then be cleaned, such as deleting data records that do not have corresponding parameter characteristics or deleting data whose parameter data exceeds the standard range. Based on the valid data in the operating data, wax oil sample data can be obtained. For instance, the data of raw material parameter characteristics and operating parameter characteristics corresponding to the same processing flow can be used as the feature data corresponding to the parameter characteristics. That is, the sulfur content in the refined wax oil obtained by the processing flow is determined as its corresponding sulfur content, thus obtaining a set of wax oil sample data.
[0062] In step 12, multiple parameter features in the wax oil sample data are used as inputs, and the sulfur content in the wax oil sample data is used as the target output to train the preset model and obtain the trained sulfur content prediction model.
[0063] The preset model can be any of the following: GBDT (Gradient Boosting Decision Tree), Random Forest, or XGBOOST (eXtreme Gradient Boosting). The XGBOOST model can implement an approximate algorithm that improves efficiency by considering the case where the training sample data is sparse and specifying the default direction of the branch for missing or specified values.
[0064] The training method for the above model can be carried out using methods commonly used in this field, and will not be elaborated here. Taking the XGBOOST algorithm as an example, the XGBOOST model is trained based on the above wax sample data to optimize hyperparameters. For example, the determined hyperparameters of the model can be: learningrate = 0.11, n_estimators = 140, max_depth = 2, min_child_weight = 3, colsample_bytree = 0.6, colsample_bylevel = 0.2, reg_lambda = 0.8, subsample = 1.
[0065] In step 13, for each candidate parameter feature, the candidate parameter feature in the wax oil sample data is deleted to obtain wax oil sub-sample data corresponding to the candidate parameter feature. The candidate parameter feature is at least one of multiple parameter features.
[0066] As an example, all features from multiple parameter features can be used as candidate parameter features for comparison, thereby determining whether a parameter feature is effective for sulfur content prediction. As another example, some features from multiple parameter features can be used as candidate parameter features. For instance, features whose effectiveness for sulfur content prediction is uncertain can be used as candidate parameter features. If the staff can clearly determine a parameter feature as effective based on experience, further judgment is unnecessary. For example, if the staff can clearly determine that the raw material sulfur content is an effective feature, then it is unnecessary to use the raw material sulfur content as a candidate parameter feature for judgment, thus reducing the amount of data processing.
[0067] In this step, for each identified candidate parameter feature, the feature data corresponding to that candidate parameter feature is deleted from the wax oil sample data to obtain wax oil sub-sample data. That is, the wax oil sub-sample data consists of all the remaining parameter features and the sulfur content of the wax oil after removing the candidate parameter feature.
[0068] For example, if multiple parameter features are used as candidate parameter features, such as 20 parameter features represented as {A1, A2, ..., A20}, then for candidate parameter feature A1, the feature data corresponding to A1 in the wax oil sample data is deleted, while the remaining data in the wax oil sample data remain unchanged, resulting in wax oil sub-sample data containing 19 parameter features (A2-A20) and their corresponding sulfur contents. Similarly, for candidate parameter features A2-A20, their corresponding wax oil sub-sample data can be obtained in the same way, i.e., the wax oil sub-sample data corresponding to A1-A20 are obtained respectively.
[0069] In step 14, for each candidate parameter feature corresponding to the wax oil sub-sample data, the parameter features contained in the wax oil sub-sample data are used as input, and the sulfur content in the wax oil sub-sample data is used as the target output to train the preset model and obtain the sulfur content prediction sub-model corresponding to the candidate parameter feature.
[0070] Specifically, based on the wax oil sub-sample data corresponding to each candidate parameter feature, a sulfur content prediction sub-model corresponding to each candidate parameter feature can be trained in the same way as described above. For example, each sulfur content prediction sub-model is an XGBOOST model.
[0071] In step 15, the target sulfur content prediction model is determined based on the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each candidate parameter feature.
[0072] If the candidate parameter feature is identified above and corresponds to the wax oil sub-sample data, then the sulfur content prediction sub-model predicts the sulfur content using other parameter features besides the candidate parameter feature. The sulfur content prediction model, on the other hand, predicts the sulfur content using these multiple parameter features. By comparing the prediction quality of these two models, the impact of the candidate parameter feature on sulfur content prediction can be determined, thereby identifying the target sulfur content prediction model.
[0073] In the above scheme, the model is trained based on wax oil sample data containing all parameter features to obtain a sulfur content prediction model. Then, for each candidate parameter feature, the model is trained based on data from the wax oil sample data excluding that candidate parameter feature, obtaining a sulfur content prediction sub-model corresponding to each candidate parameter feature. The prediction performance of each sulfur content prediction sub-model and the sulfur content prediction model can be compared to determine the target sulfur content prediction model. Therefore, by using the above scheme to determine the target sulfur content prediction model, the candidate parameter feature can be used as the only variable parameter. By comparing the impact of deleting the candidate parameter feature on sulfur content prediction, it can be determined whether the candidate parameter feature is an effective feature for predicting sulfur content. This provides accurate and effective data support for determining the target sulfur content prediction model, and also provides data support for simplifying the parameters in the target sulfur content prediction model, ensuring the efficiency of solving and optimizing the target sulfur content prediction model, while also ensuring the accuracy of the output results of the target sulfur content prediction model. Furthermore, by using the above scheme and performing individual verification on each candidate parameter feature, the correlation between the candidate parameter feature and the sulfur content can be clarified, making the prediction process of the target sulfur content prediction model more interpretable and generalizable, and further improving the credibility and accuracy of the output results of the target sulfur content prediction model.
[0074] In one possible embodiment, in step 15, based on the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each candidate parameter feature, an exemplary implementation of the target sulfur content prediction model is determined as follows, which may include:
[0075] Based on the test sample data, the error values corresponding to the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each candidate parameter feature are determined, wherein the error value can be the mean absolute error (MAE).
[0076] The test sample data can be obtained using the method described above for acquiring wax oil sample data. For example, a portion of the sample data determined based on historical operating data of a refinery's wax oil hydrotreating unit can be used as the wax oil sample data, while the other portion can be used as the test sample data. This improves the efficiency of sample data acquisition and ensures consistency in the distribution between the test sample data and the wax oil sample data, thereby guaranteeing the accuracy of the verification results.
[0077] As an example, the mean absolute error (MAE) can be determined in the following way:
[0078]
[0079] Where 'a' represents the number of test sample data;
[0080] y i,actual Used to represent the sulfur content in the i-th test sample data;
[0081] y i,predicted Used to represent the predicted sulfur content corresponding to the i-th test sample data.
[0082] For example, the mean absolute error (MAE) of the sulfur content prediction model is denoted as MAE, and the mean absolute error of the 20 identified sulfur content prediction sub-models is denoted as MAE. i , where i = 1, 2, ..., 20, thus we can determine whether the candidate parameter features are effective features based on the above multiple average absolute errors.
[0083] Subsequently, for each sulfur content prediction sub-model, if the error value corresponding to the sulfur content prediction model is less than the error value corresponding to the sulfur content prediction sub-model, then the candidate parameter feature corresponding to the sulfur content prediction sub-model is determined as the target parameter feature.
[0084] As an example, let's take the first sulfur content prediction sub-model as an example. The sulfur content prediction model is based on 20 parameter features, while the first sulfur content prediction sub-model is based on the remaining 19 parameter features excluding the first one. Therefore, if the error value corresponding to the sulfur content prediction model is less than the error value corresponding to this sulfur content prediction sub-model, it means that when the prediction model includes the first parameter feature to predict sulfur content, the prediction error is smaller, i.e., the prediction result is better. This indicates that the first parameter feature (i.e., the candidate parameter feature corresponding to the sulfur content prediction sub-model) is an effective feature for predicting sulfur content, and at this time, the candidate parameter feature can be determined as the target parameter feature. The judgment method for other sulfur content prediction sub-models is the same as above. Therefore, the candidate parameter features corresponding to other sulfur content prediction sub-models can be judged based on the above method to determine each target parameter feature. The specific method will not be elaborated here.
[0085] Subsequently, based on the target parameter characteristics and the wax oil sample data, the target sulfur content prediction model is determined.
[0086] Therefore, through the above technical solution, the error values corresponding to each sulfur content prediction sub-model and the sulfur content prediction model can be compared to determine the effective features used for sulfur content prediction, i.e., the target parameter features. Furthermore, parameter features with less impact on sulfur content prediction can be ignored. By training the model based on the effective features for sulfur content prediction and wax oil sample data, the target sulfur content prediction model is determined. This reduces the number of features in the target sulfur content prediction model, improving training efficiency and optimization accuracy. Simultaneously, it ensures the prediction accuracy and reliability of the determined target sulfur content prediction model, thus enhancing the user experience.
[0087] In one possible embodiment, an exemplary implementation of determining the target sulfur content prediction model based on the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each candidate parameter feature is as follows: This step may include:
[0088] Based on the test sample data, the feature fitting parameters corresponding to the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each of the candidate parameter features are determined respectively, wherein the feature fitting parameters are used to represent the degree of fit of each parameter feature in the model corresponding to the feature fitting parameter to the sulfur content prediction.
[0089] In one possible embodiment, the feature fitting parameters can be determined in the following manner:
[0090]
[0091]
[0092] in, Used to represent the feature fitting parameters;
[0093] 'a' is used to represent the number of test sample data;
[0094] n represents the sum of the test sample data and the sample data used for model training;
[0095] m is used to represent the number of parametric features in the model;
[0096] y i,actual Used to represent the sulfur content in the i-th test sample data;
[0097] y i,predicted Used to represent the predicted sulfur content corresponding to the i-th test sample data;
[0098] The average value used to represent the sulfur content of the test sample data.
[0099] Among them, R 2 This can reflect the degree of fit between the predicted sulfur content output by the corresponding prediction model and the actual sulfur content. In this disclosure, when comparing the sulfur content prediction model and the sulfur content prediction sub-model, since the sulfur content prediction model has more parameter features than the sulfur content prediction sub-model, regardless of whether these additional parameter features are effective features for predicting sulfur content, as the number of parameter features increases, R0 increases. 2 Generally, the number of parameters increases. Therefore, in this disclosure, to ensure the accuracy of the target parameter feature judgment, the number of parameter features in the prediction model can be used to adjust R. 2 Corrective measures can be taken. For example, penalties can be added. For R 2 Corrections are made to account for the R-value caused by the number of parameter features. 2 The changes are eliminated to obtain feature fitting parameters that can be used for accurate judgment.
[0100] For example, the characteristic fitting parameters of the sulfur content prediction model are denoted as . The characteristic fitting parameters of the 20 sulfur content prediction sub-models are denoted as follows: Where i = 1, 2, ..., 20, the candidate parameter features can be determined as effective features based on the above multiple feature fitting parameters.
[0101] Subsequently, for each sulfur content prediction sub-model, if the feature fitting parameter corresponding to the sulfur content prediction model is greater than the feature fitting parameter corresponding to the sulfur content prediction sub-model, then the candidate parameter feature corresponding to the sulfur content prediction sub-model is determined as the target parameter feature.
[0102] As an example, let's take the first sulfur content prediction sub-model as an illustration. The sulfur content prediction model is based on 20 parameter features, while the first sulfur content prediction sub-model is based on the remaining 19 parameter features besides the first one. Furthermore, as mentioned above, the feature fitting parameters of the 19 parameter features in the sulfur content prediction sub-model, as well as the feature fitting parameters of the 20 parameter features in the sulfur content prediction model, can be corrected based on a penalty term to eliminate the influence of the number of parameter features on the feature fitting parameters.
[0103] Therefore, if the feature fitting parameter corresponding to the sulfur content prediction model is greater than the feature fitting parameter corresponding to the sulfur content prediction sub-model, it indicates that when the prediction model includes the first parameter feature to predict sulfur content, the parameter feature in the model has a greater fit to the sulfur content prediction. This signifies that the first parameter feature (i.e., the candidate parameter feature corresponding to the sulfur content prediction sub-model) is an effective feature for sulfur content prediction, and in this case, the candidate parameter feature can be determined as the target parameter feature. The judgment method for other sulfur content prediction sub-models is the same as above. Therefore, the candidate parameter features corresponding to other sulfur content prediction sub-models can be judged based on the above method to determine each target parameter feature. The specific method will not be elaborated here.
[0104] Based on the target parameter characteristics and the wax oil sample data, the target sulfur content prediction model is determined.
[0105] Therefore, through the above technical solution, the feature fitting parameters corresponding to each sulfur content prediction sub-model and the sulfur content prediction model can be compared to determine the effective features used for predicting sulfur content, i.e., the target parameter features. Furthermore, the parameter features with less impact on sulfur content prediction among multiple parameter features can be ignored. In this embodiment, it can be clearly characterized that the target parameter features can improve the fitting degree of the predicted sulfur content. Therefore, the interpretability of the target parameter features for the output sulfur content prediction results can be further improved, ensuring the prediction accuracy of the determined target sulfur content prediction model and improving the reliability of the prediction results.
[0106] In one possible embodiment, an exemplary implementation of determining the target sulfur content prediction model based on the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each candidate parameter feature is as follows: This step may include:
[0107] Based on the test sample data, the feature fitting parameters and error values corresponding to the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each candidate parameter feature are determined respectively. The feature fitting parameters are used to represent the degree of fit of each parameter feature in the model corresponding to the feature fitting parameter to the sulfur content prediction.
[0108] The methods for determining feature fitting parameters and error values have been detailed above and will not be repeated here.
[0109] For each sulfur content prediction sub-model, if the feature fitting parameter corresponding to the sulfur content prediction model is greater than the feature fitting parameter corresponding to the sulfur content prediction sub-model, and the error value corresponding to the sulfur content prediction model is less than the error value corresponding to the sulfur content prediction sub-model, then the candidate parameter feature corresponding to the sulfur content prediction sub-model is determined as the target parameter feature.
[0110] Therefore, in this embodiment, when considering the candidate parameter features corresponding to the sulfur content prediction sub-model, if the error value of the sulfur content prediction model is smaller than that of the sulfur content prediction sub-model, it indicates that the sulfur content prediction model containing the candidate parameter features has higher prediction accuracy. If the feature fitting parameter of the sulfur content prediction model is larger than that of the sulfur content prediction sub-model, it indicates that the sulfur content prediction model containing the candidate parameter features has a higher degree of fitting, thus indicating that the candidate parameter features can have higher interpretability for sulfur content prediction and improve the overall prediction accuracy. In this case, determining the candidate parameter features corresponding to the sulfur content prediction sub-model as the target parameter features can ensure the effectiveness of the determined target parameter features for sulfur content prediction.
[0111] Subsequently, based on the target parameter characteristics and the wax oil sample data, the target sulfur content prediction model is determined.
[0112] Therefore, through the above technical solution, the feature fitting parameters and error values corresponding to each sulfur content prediction sub-model and the sulfur content prediction model can be compared to determine the effective features used for sulfur content prediction, i.e., the target parameter features. Furthermore, parameter features with less impact on sulfur content prediction can be ignored. Thus, the interpretability of sulfur content prediction and the direction of error loss in the prediction model can be verified from the candidate parameter features, further improving prediction accuracy and the interpretability of the target parameter features in the output sulfur content prediction results, thereby enhancing the reliability of the prediction results.
[0113] In one feasible embodiment, an exemplary implementation of determining the target sulfur content prediction model based on the target parameter features and the wax oil sample data is as follows, which may include:
[0114] Extract the data corresponding to the target parameter features from the wax oil sample data as target feature data, and use the sulfur content corresponding to the wax oil sample data as the target sulfur content to obtain target sample data.
[0115] Continuing with the example above, if the target parameter features are {A1,A2,…,A16,A17,A20}, meaning that parameter features A18 and A19 are not considered as target parameter features, then in this step, the data corresponding to parameter features {A1,A2,…,A16,A17,A20} in the wax oil sample data can be extracted as target feature data. The sulfur content corresponding to each sample record in the wax oil sample data is then taken as the target sulfur content corresponding to that target feature data. In other words, the target sample data contains the data corresponding to {A1,A2,…,A16,A17,A20} and their corresponding target sulfur contents.
[0116] For each target sample data, the target feature data of the target sample data is used as input, and the target sulfur content of the target sample data is used as the target output to train a preset model, thereby obtaining a trained target sulfur content prediction model. The training can be performed using model training methods commonly used in the art, and this disclosure does not limit the scope of the method.
[0117] Therefore, through the above technical solution, after determining the target parameter features, target sample data for training the target sulfur content prediction model can be extracted from the wax oil sample data based on these target parameter features. Model training based on this target sample data—that is, training the model based on data corresponding to effective features for sulfur content prediction—can, on the one hand, reduce the number of features in the target sulfur content prediction model, improving the training efficiency and optimization accuracy of the target sulfur content prediction model; on the other hand, it can also ensure the prediction accuracy of the determined target sulfur content prediction model and the reliability of the prediction results, thus improving the user experience.
[0118] For example, the prediction performance of a sulfur content prediction model containing all parameter features and a determined target sulfur content prediction model can be validated based on the same test sample data. As an example, the parameter features are {VGO,TWO,CWO,SI,NI,IBP,10%,30%,50%,70%,90%,95%,FBP,Cresidue,PI,Circle H,△P,T1pin,T2pin,T3pin}, as shown below. Figure 2a and Figure 2b As shown, the sample data can be represented by a matrix. For example, a row of data in the matrix can be defined as a sample record, and the column data in the matrix can be defined as the 20 parameter features mentioned above. That is, the sample data can be represented by a 149*20 matrix A, and the sulfur content corresponding to each sample record can be represented by a 149*1 matrix B. The same row in matrices A and B are the data of the parameter features and the sulfur content corresponding to the same sample record.
[0119] Next, the aforementioned parameter features can be identified as candidate parameter features, and the sulfur content prediction sub-model corresponding to each candidate parameter feature can be determined. Furthermore, the error value and feature fitting parameters corresponding to each sulfur content prediction sub-model and the sulfur content prediction model can be determined. For example, Figure 2a As shown, △MAE (i) =MAE-MAE i , △R 2 i,adjust =R 2 u,adjust -R 2i,adjust Therefore, based on Figure 2a and Figure 2b As shown, among the candidate parameter features, the ΔMAE corresponding to IBP is positive, and ΔR... 2 adjust If it is negative, then the corresponding △MAE of Cresidue is positive, and △R 2 adjust If the value is negative, it means that the candidate parameter features IBP and Cresidue are not the target parameter features, and all other candidate parameter features can be determined as the target parameter features.
[0120] Furthermore, based on 18 target parameter features such as {VGO,TWO,CWO,SI,NI,10%,30%,50%,70%,90%,95%,FBP,PI,Circle H,△P,T1pin,T2pin,T3pin} and matrix A, target sample data A' is obtained. A' is a 149*18 matrix. Combining matrix B and A', the target sulfur content prediction model is obtained.
[0121] like Figure 3a As shown, this is a line graph comparing the prediction results and actual results of the sulfur content prediction model based on all parameter features. Figure 3b The image shows a line graph comparing the predicted and actual results of a target sulfur content prediction model based on target parameter features. Here, SO represents the actual result, and pre_SO represents the predicted result. Figure 3a and Figure 3b As shown, it can be determined that the prediction results of the target sulfur content prediction model determined based on the scheme disclosed in this disclosure are closer to the actual results, that is, the prediction accuracy of the target sulfur content prediction model is higher, so as to improve the user experience.
[0122] This disclosure also provides a device for determining a prediction model for sulfur content in wax oil, such as... Figure 4 As shown, the device 10 includes:
[0123] The first acquisition module 100 is used to acquire wax oil sample data, wherein the wax oil sample data includes feature data corresponding to multiple parameter features of wax oil generation, and the sulfur content corresponding to the wax oil, and the parameter features include raw material parameter features and / or operation parameter features.
[0124] The first training module 200 is used to train a preset model by taking multiple parameter features in the wax oil sample data as input and the sulfur content in the wax oil sample data as the target output, so as to obtain a trained sulfur content prediction model.
[0125] The second acquisition module 300 is used to delete the candidate parameter feature from the wax oil sample data for each candidate parameter feature, and obtain wax oil sub-sample data corresponding to the candidate parameter feature, wherein the candidate parameter feature is at least one of the plurality of parameter features;
[0126] The second training module 400 is used to train the preset model for each candidate parameter feature, taking the parameter features contained in the wax oil sub-sample data as input and the sulfur content in the wax oil sub-sample data as the target output, to obtain a sulfur content prediction sub-model corresponding to the candidate parameter feature.
[0127] The determination module 500 is used to determine the target sulfur content prediction model based on the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each of the candidate parameter features.
[0128] Optionally, the determining module includes:
[0129] The first determining submodule is used to determine the error value corresponding to the sulfur content prediction model and the sulfur content prediction submodel corresponding to each candidate parameter feature based on the test sample data.
[0130] The first judgment submodule is used to determine the candidate parameter feature corresponding to the sulfur content prediction submodel as the target parameter feature if the error value corresponding to the sulfur content prediction submodel is less than the error value corresponding to the sulfur content prediction submodel for each sulfur content prediction submodel.
[0131] The second determining submodule is used to determine the target sulfur content prediction model based on the target parameter characteristics and the wax oil sample data.
[0132] Optionally, the determining module includes:
[0133] The third determining submodule is used to determine the feature fitting parameters corresponding to the sulfur content prediction model and the sulfur content prediction submodel corresponding to each candidate parameter feature based on the test sample data. The feature fitting parameters are used to represent the degree of fit of each parameter feature in the model corresponding to the feature fitting parameter to the sulfur content prediction.
[0134] The second judgment submodule is used to determine the candidate parameter feature corresponding to the sulfur content prediction submodel as the target parameter feature if the feature fitting parameter corresponding to the sulfur content prediction submodel is greater than the feature fitting parameter corresponding to the sulfur content prediction submodel for each sulfur content prediction submodel.
[0135] The second determining submodule is used to determine the target sulfur content prediction model based on the target parameter characteristics and the wax oil sample data.
[0136] Optionally, the determining module includes:
[0137] The fourth determination submodule is used to determine the feature fitting parameters and error values corresponding to the sulfur content prediction model and the sulfur content prediction submodel corresponding to each candidate parameter feature based on the test sample data. The feature fitting parameters are used to represent the degree of fit of each parameter feature in the model corresponding to the feature fitting parameter to the sulfur content prediction.
[0138] The third judgment submodule is used to determine the candidate parameter features corresponding to the sulfur content prediction submodel as the target parameter features if, for each sulfur content prediction submodel, the feature fitting parameter corresponding to the sulfur content prediction model is greater than the feature fitting parameter corresponding to the sulfur content prediction submodel, and the error value corresponding to the sulfur content prediction model is less than the error value corresponding to the sulfur content prediction submodel.
[0139] The second determining submodule is used to determine the target sulfur content prediction model based on the target parameter characteristics and the wax oil sample data.
[0140] Optionally, the feature fitting parameters are determined as follows:
[0141]
[0142]
[0143] in, Used to represent the feature fitting parameters;
[0144] 'a' is used to represent the number of test sample data;
[0145] n represents the sum of the test sample data and the sample data used for model training;
[0146] m is used to represent the number of parametric features in the model;
[0147] y i,actual Used to represent the sulfur content in the i-th test sample data;
[0148] y i,predicted Used to represent the predicted sulfur content corresponding to the i-th test sample data;
[0149] The average value used to represent the sulfur content of the test sample data.
[0150] Optionally, the second determining submodule includes:
[0151] The processing submodule is used to extract the data corresponding to the target parameter features from the wax oil sample data as target feature data, and to use the sulfur content corresponding to the wax oil sample data as the target sulfur content, so as to obtain the target sample data.
[0152] The training submodule is used to train a preset model for each target sample data, taking the target feature data of the target sample data as input and the target sulfur content of the target sample data as the target output, to obtain a trained target sulfur content prediction model.
[0153] Optionally, the preset model is any one of the GBDT model, random forest model, and XGBOOST model.
[0154] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0155] Figure 5 This is a block diagram illustrating an electronic device 700 according to an exemplary embodiment. Figure 5 As shown, the electronic device 700 may include a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input / output (I / O) interface 704, and a communication component 705.
[0156] The processor 701 controls the overall operation of the electronic device 700 to complete all or part of the steps in the method for determining the sulfur content prediction model in wax oil. The memory 702 stores various types of data to support the operation of the electronic device 700. This data may include, for example, instructions for any application or method operating on the electronic device 700, and application-related data such as contact data, sent and received messages, pictures, audio, video, etc. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. Multimedia component 703 may include a screen and an audio component. The screen may be, for example, a touchscreen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in memory 702 or transmitted via communication component 705. The audio component also includes at least one speaker for outputting audio signals. I / O interface 704 provides an interface between processor 701 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual or physical buttons. Communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IoT, eMTC, or other 5G technologies, or combinations thereof, is not limited here. Therefore, the corresponding communication component 705 may include: a Wi-Fi module, a Bluetooth module, an NFC module, etc.
[0157] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the method for determining the sulfur content prediction model in wax oil described above.
[0158] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the method for determining the sulfur content prediction model in wax oil described above. For example, the computer-readable storage medium may be the memory 702 including the program instructions described above, which may be executed by the processor 701 of the electronic device 700 to complete the method for determining the sulfur content prediction model in wax oil described above.
[0159] Figure 6 This is a block diagram illustrating an electronic device 1900 according to an exemplary embodiment. For example, the electronic device 1900 may be provided as a server. (Refer to...) Figure 6 The electronic device 1900 includes a processor 1922, which may be one or more, and a memory 1932 for storing computer programs executable by the processor 1922. The computer program stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processor 1922 may be configured to execute the computer program to perform the method described above for determining the sulfur content prediction model in wax oil.
[0160] Additionally, the electronic device 1900 may also include a power supply component 1926 and a communication component 1950. The power supply component 1926 can be configured to perform power management of the electronic device 1900, and the communication component 1950 can be configured to enable communication of the electronic device 1900, such as wired or wireless communication. Furthermore, the electronic device 1900 may also include an input / output (I / O) interface 1958. The electronic device 1900 can operate on an operating system, such as Windows Server, stored in memory 1932. TM Mac OS X TM Unix TMLinux TM etc.
[0161] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the method for determining the sulfur content prediction model in wax oil described above. For example, the non-transitory computer-readable storage medium may be the memory 1932 including the program instructions described above, which may be executed by the processor 1922 of the electronic device 1900 to complete the method for determining the sulfur content prediction model in wax oil described above.
[0162] In another exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program executable by a programmable device, the computer program having a code portion for performing the determination method of the sulfur content prediction model in wax oil described above when executed by the programmable device.
[0163] The preferred embodiments of this disclosure have been described in detail above with reference to the accompanying drawings. However, this disclosure is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this disclosure, various simple modifications can be made to the technical solutions of this disclosure, and these simple modifications all fall within the protection scope of this disclosure.
[0164] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, this disclosure will not describe the various possible combinations separately.
[0165] Furthermore, various different embodiments of this disclosure can be combined in any way, as long as they do not violate the spirit of this disclosure, they should also be regarded as the content disclosed in this disclosure.
Claims
1. A method for determining a prediction model for sulfur content in wax oil, characterized in that, The method includes: Obtain wax oil sample data, wherein the wax oil sample data includes feature data corresponding to multiple parameter features of wax oil generation, and the sulfur content corresponding to the wax oil, wherein the parameter features include raw material parameter features and / or operation parameter features; Using multiple parameter features in the wax oil sample data as input and the sulfur content in the wax oil sample data as the target output, the preset model is trained to obtain the trained sulfur content prediction model. For each candidate parameter feature, the candidate parameter feature is deleted from the wax oil sample data to obtain wax oil sub-sample data corresponding to the candidate parameter feature, wherein the candidate parameter feature is at least one of the plurality of parameter features; For each candidate parameter feature, the pre-set model is trained using the parameter features contained in the wax oil sub-sample data as input and the sulfur content in the wax oil sub-sample data as the target output, to obtain a sulfur content prediction sub-model corresponding to the candidate parameter feature. Based on the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each candidate parameter feature, the target sulfur content prediction model is determined. The step of determining the target sulfur content prediction model based on the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each candidate parameter feature includes: Based on the test sample data, the error values corresponding to the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each of the candidate parameter features are determined respectively. For each sulfur content prediction sub-model, if the error value corresponding to the sulfur content prediction model is less than the error value corresponding to the sulfur content prediction sub-model, then the candidate parameter feature corresponding to the sulfur content prediction sub-model is determined as the target parameter feature. Based on the target parameter characteristics and the wax oil sample data, the target sulfur content prediction model is determined; Alternatively, determining the target sulfur content prediction model based on the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each candidate parameter feature includes: Based on the test sample data, the feature fitting parameters corresponding to the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each of the candidate parameter features are determined respectively, wherein the feature fitting parameters are used to represent the degree of fit of each parameter feature in the model corresponding to the feature fitting parameter to the sulfur content prediction. For each sulfur content prediction sub-model, if the feature fitting parameter corresponding to the sulfur content prediction model is greater than the feature fitting parameter corresponding to the sulfur content prediction sub-model, then the candidate parameter feature corresponding to the sulfur content prediction sub-model is determined as the target parameter feature. Based on the target parameter characteristics and the wax oil sample data, the target sulfur content prediction model is determined; Alternatively, determining the target sulfur content prediction model based on the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each candidate parameter feature includes: Based on the test sample data, the feature fitting parameters and error values corresponding to the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each candidate parameter feature are determined respectively. The feature fitting parameters are used to represent the degree of fit of each parameter feature in the model corresponding to the feature fitting parameter to the sulfur content prediction. For each sulfur content prediction sub-model, if the feature fitting parameter corresponding to the sulfur content prediction model is greater than the feature fitting parameter corresponding to the sulfur content prediction sub-model, and the error value corresponding to the sulfur content prediction model is less than the error value corresponding to the sulfur content prediction sub-model, then the candidate parameter feature corresponding to the sulfur content prediction sub-model is determined as the target parameter feature. Based on the target parameter characteristics and the wax oil sample data, the target sulfur content prediction model is determined.
2. The method according to claim 1, characterized in that, The feature fitting parameters are determined in the following manner: in, Used to represent the feature fitting parameters; 'a' is used to represent the number of test sample data; n represents the sum of the test sample data and the sample data used for model training; m is used to represent the number of parametric features in the model; Used to represent the sulfur content in the i-th test sample data; Used to represent the predicted sulfur content corresponding to the i-th test sample data; The average value used to represent the sulfur content of the test sample data.
3. The method according to claim 1, characterized in that, The step of determining the target sulfur content prediction model based on the target parameter characteristics and the wax oil sample data includes: Extract the data corresponding to the target parameter features from the wax oil sample data as target feature data, and take the sulfur content corresponding to the wax oil sample data as target sulfur content to obtain target sample data; For each target sample data, the target feature data of the target sample data is used as input, and the target sulfur content of the target sample data is used as the target output to train the preset model and obtain the trained target sulfur content prediction model.
4. The method according to claim 1, characterized in that, The preset model is any one of the GBDT model, random forest model, and XGBOOST model.
5. A device for determining a predictive model for sulfur content in wax oil, characterized in that, The device includes: The first acquisition module is used to acquire wax oil sample data, wherein the wax oil sample data includes feature data corresponding to multiple parameter features of wax oil generation, and the sulfur content corresponding to the wax oil, wherein the parameter features include raw material parameter features and / or operation parameter features; The first training module is used to train a preset model by taking multiple parameter features in the wax oil sample data as input and the sulfur content in the wax oil sample data as the target output, so as to obtain a trained sulfur content prediction model. The second acquisition module is used to delete the candidate parameter feature from the wax oil sample data for each candidate parameter feature, and obtain wax oil sub-sample data corresponding to the candidate parameter feature, wherein the candidate parameter feature is at least one of the plurality of parameter features; The second training module is used to train the preset model for each candidate parameter feature, taking the parameter features contained in the wax oil sub-sample data as input and the sulfur content in the wax oil sub-sample data as the target output, to obtain a sulfur content prediction sub-model corresponding to the candidate parameter feature. The determination module is used to determine the error values corresponding to the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each candidate parameter feature based on the test sample data. For each sulfur content prediction sub-model, if the error value corresponding to the sulfur content prediction model is less than the error value corresponding to the sulfur content prediction sub-model, then the candidate parameter feature corresponding to the sulfur content prediction sub-model is determined as the target parameter feature. Based on the target parameter characteristics and the wax oil sample data, the target sulfur content prediction model is determined; Alternatively, it can be used to determine the feature fitting parameters corresponding to the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each of the candidate parameter features based on test sample data, wherein the feature fitting parameters are used to represent the degree of fit of each parameter feature in the model corresponding to the feature fitting parameter to the sulfur content prediction. For each sulfur content prediction sub-model, if the feature fitting parameter corresponding to the sulfur content prediction model is greater than the feature fitting parameter corresponding to the sulfur content prediction sub-model, then the candidate parameter feature corresponding to the sulfur content prediction sub-model is determined as the target parameter feature. Based on the target parameter characteristics and the wax oil sample data, the target sulfur content prediction model is determined; Alternatively, it can be used to determine the feature fitting parameters and error values corresponding to the sulfur content prediction model and the sulfur content prediction sub-model corresponding to each of the candidate parameter features based on test sample data, wherein the feature fitting parameters are used to represent the degree of fit of each parameter feature in the model corresponding to the feature fitting parameter to the sulfur content prediction. For each sulfur content prediction sub-model, if the feature fitting parameter corresponding to the sulfur content prediction model is greater than the feature fitting parameter corresponding to the sulfur content prediction sub-model, and the error value corresponding to the sulfur content prediction model is less than the error value corresponding to the sulfur content prediction sub-model, then the candidate parameter feature corresponding to the sulfur content prediction sub-model is determined as the target parameter feature. Based on the target parameter characteristics and the wax oil sample data, the target sulfur content prediction model is determined.
6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method described in any one of claims 1-4.
7. An electronic device, characterized in that, include: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of the method according to any one of claims 1-4.
Citation Information
Patent Citations
Nonlinear temperature observation system and method for rectification tower
CN101890246A
Oil metering method and system of oil pumping unit based on data driving
CN110363337A