Method and apparatus for predicting sulfur and nitrogen content of refined wax oil
Patent Information
- Application Number
- CN202410975333.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2044-07-19
AI Technical Summary
但对蜡油加氢中精制蜡油的硫含量和氮含量进行同时预测时,需要考虑两者之间的相互作用,所列函数表达式较为复杂,动力学模型参数求解困难,实际应用时并不方便
[0020] The above technical solution divides the total loss function into two parts: a principal term and a penalty term. The principal term is the sum of the root mean square errors between the predicted and actual values of the sulfur and nitrogen content of the refined wax oil in the model prediction task, divided by the square of the order-of-magnitude difference between the sulfur and nitrogen content of the raw material wax oil. The penalty term is the sum and average of the absolute values of the errors between the predicted and actual values of the sulfur and nitrogen content of the refined wax oil in the prediction task. This term further reduces the impact of the difference in sulfur and nitrogen content of the raw material on the model training process, and finally solves the problem of large prediction errors when the model simultaneously predicts the sulfur and nitrogen content of refined wax oil.
Smart Images

Figure CN121366651B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the chemical industry, and more specifically to a method and apparatus for predicting the sulfur and nitrogen content of refined wax oil. Background Technology
[0002] The experimental evaluation process of catalysts is of great reference value for their scale-up to industrial applications. Pilot-scale evaluation data of catalysts are mainly used to explore catalyst performance, especially certain key indicators in the product. For wax oil hydrogenation catalysts, process developers are particularly concerned about the sulfur and nitrogen content of the refined wax oil.
[0003] Current models for predicting the sulfur and nitrogen content of hydrorefined wax oil are mainly mechanistic models. Mechanistic models are highly interpretable, with clear processes, and are beneficial for establishing catalyst evaluation models. However, when simultaneously predicting the sulfur and nitrogen content of refined wax oil during hydrorefining, the interaction between the two needs to be considered. The resulting functional expressions are quite complex, and solving the kinetic model parameters is difficult, making them inconvenient for practical applications. Summary of the Invention
[0004] The purpose of this invention is to provide a method and apparatus for predicting the sulfur and nitrogen content of refined wax oil. Based on pilot-scale evaluation data of wax oil hydrogenation catalysts, a model is built using the Keras deep learning framework, which can simultaneously predict the sulfur and nitrogen content of refined wax oil.
[0005] However, during implementation, the inventors discovered that because the model's inherent loss function is the sum of the variances of the predicted and true values for each task, when the data distributions of sulfur and nitrogen content differ by orders of magnitude, the model may exhibit a situation where the error of one task dominates during training, ultimately leading to poor prediction performance. To address this issue, the inventors reconstructed a total loss function and applied it to the model, shifting the focus from one task's error to a mutual dominance between the two tasks, thus significantly reducing the model's prediction error. Overall, based on a thorough understanding of the reasons for the large total error in simultaneously predicting two tasks, the inventors divided the total loss function into a principal term and a penalty term, ultimately significantly reducing the model's error on the test set.
[0006] To achieve the above objectives, the present invention provides a method for predicting the sulfur and nitrogen content of refined wax oil. The method includes: acquiring the properties of the raw materials and operating parameters used in the process of producing refined wax oil; and inputting the raw material properties and operating parameters into a pre-established data-driven model for predicting the sulfur and nitrogen content of refined wax oil to obtain the sulfur and nitrogen content of the refined wax oil. The loss function in the data-driven model includes a principal term and a penalty term. The principal term is the sum of the root mean square errors of the predicted and actual values of the sulfur and nitrogen content of the refined wax oil divided by the square of the order of magnitude difference between the sulfur and nitrogen content of the raw material wax oil. The penalty term is used to shift the prediction error of the sulfur content and the prediction error of the nitrogen content of the refined wax oil towards the median value of the prediction error of the sulfur content and the prediction error of the nitrogen content.
[0007] On the other hand, the present invention provides a method for constructing a data-driven model for predicting the sulfur and nitrogen content of refined wax oil. The method includes: acquiring evaluation data of pilot-scale catalysts for wax oil hydrogenation, the data including feedstock properties, operating parameters, and the sulfur and nitrogen content of refined wax oil; dividing the evaluation data into a training set and a test set; and using the training set and the test set to train and test the data-driven model for predicting the sulfur and nitrogen content of refined wax oil. The loss function in the data-driven model includes a principal term and a penalty term. The principal term is the sum of the root mean square errors of the predicted and actual values of the sulfur and nitrogen content of the refined wax oil divided by the square of the order of magnitude difference between the sulfur and nitrogen content of the feedstock wax oil. The penalty term is used to shift the prediction error of the sulfur content and the prediction error of the nitrogen content of the refined wax oil towards the median value of the prediction error of the sulfur content and the prediction error of the nitrogen content.
[0008] The properties of the raw materials include their density, distillation range, refractive index, sulfur content, and nitrogen content.
[0009] The operating parameters include reaction pressure, reaction temperature, space velocity, and hydrogen-to-oil ratio.
[0010] The expression for the main item is:
[0011] in, 11 , 12 ... 1j y represents the predicted value for each sample in the refined wax oil sulfur content dataset. 11 y 12 ...y 1j This represents the true values of each sample in the refined wax oil sulfur content dataset; 21 , 22 ... 2j y represents the predicted value for each sample in the refined wax oil nitrogen content dataset. 21 y 22 ...y 2j This represents the true value of each sample in the refined wax oil nitrogen content dataset, where n represents the number of samples.
[0012] The expression for the penalty term is:
[0013] in, 11 , 12 ... 1j y represents the predicted value for each sample in the refined wax oil sulfur content dataset. 11 y 12 ...y 1j This represents the true values of each sample in the refined wax oil sulfur content dataset; 21 , 22 ... 2j y represents the predicted value for each sample in the refined wax oil nitrogen content dataset. 21 y 22 ...y 2j This represents the true value of each sample in the refined wax oil nitrogen content dataset, where n represents the number of samples.
[0014] The loss function is as follows:
[0015] in, 11 , 12 ... 1j y represents the predicted value for each sample in the refined wax oil sulfur content dataset. 11 y 12 ...y 1j This represents the true values of each sample in the refined wax oil sulfur content dataset; 21 , 22 ... 2j y represents the predicted value for each sample in the refined wax oil nitrogen content dataset. 21 y 22 ...y 2j This represents the true value of each sample in the refined wax oil nitrogen content dataset, where n represents the number of samples.
[0016] The data-driven model is built using the deep learning framework Keras.
[0017] On the other hand, the present invention provides an apparatus for predicting the sulfur and nitrogen content of refined wax oil, the apparatus comprising: a memory; and a processor configured to predict the sulfur and nitrogen content of refined wax oil using the method described above.
[0018] 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 and nitrogen content of refined wax oil.
[0019] 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 and nitrogen content of refined wax oil.
[0020] The above technical solution divides the total loss function into two parts: a principal term and a penalty term. The principal term is the sum of the root mean square errors between the predicted and actual values of the sulfur and nitrogen content of the refined wax oil in the model prediction task, divided by the square of the order-of-magnitude difference between the sulfur and nitrogen content of the raw material wax oil. The penalty term is the sum and average of the absolute values of the errors between the predicted and actual values of the sulfur and nitrogen content of the refined wax oil in the prediction task. This term further reduces the impact of the difference in sulfur and nitrogen content of the raw material on the model training process, and finally solves the problem of large prediction errors when the model simultaneously predicts the sulfur and nitrogen content of refined wax oil.
[0021] 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
[0022] 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: Figure 1 This is a flowchart of a method for constructing a data-driven model for predicting the sulfur and nitrogen content of refined wax oil, provided by the present invention. Figure 2 This is a flowchart of a method for predicting the sulfur and nitrogen content of refined wax oil provided by the present invention; Figure 3 This refers to the prediction performance of a deep learning framework model built using the old loss function on a test set, specifically the prediction of sulfur and nitrogen content in refined wax oils. Figure 4This describes the prediction performance of a deep learning framework model built using a new loss function on a test set for the sulfur and nitrogen content in refined wax oil. Detailed Implementation
[0023] 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.
[0024] 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 each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.
[0025] 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.
[0026] It should be noted that the terms "model", "deep learning framework model", "data-driven model" and "loss function model" appear multiple times in this case. These terms refer to the same model and can be used interchangeably.
[0027] Figure 1 This is a flowchart of the method provided by the invention for constructing a data-driven model for predicting the sulfur and nitrogen content of refined wax oils. (Example) Figure 1 As shown in one embodiment of this application, a method for constructing a data-driven model for predicting the sulfur and nitrogen content of refined wax oil is provided. The method includes the following steps: Step S110: Obtain pilot-scale catalyst evaluation data for wax oil hydrogenation, including feedstock properties, operating parameters, and sulfur and nitrogen content of refined wax oil; Step S120: Divide the evaluation 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.
[0028] Step S130: Using the training set and test set, train and test the data-driven model for predicting the sulfur and nitrogen content of refined wax oil. The loss function in the data-driven model includes a principal term and a penalty term. The principal term is the sum of the mean square errors of the predicted and actual values of the sulfur and nitrogen content of refined wax oil divided by the square of the order of magnitude difference between the sulfur and nitrogen content of the raw material wax oil. The penalty term is used to shift the prediction error of the sulfur content and the prediction error of the nitrogen content of refined wax oil towards the median value of the prediction error of the sulfur content and the prediction error of the nitrogen content.
[0029] This invention provides a novel method for reconstructing the loss function of a multi-task learning model in neural networks. Specifically, the loss function of the model is reconstructed, and the reconstructed loss function consists of a principal term and a penalty term. The principal term is the sum of the root mean square errors between the predicted and actual values of the sulfur and nitrogen content of the refined wax oil in the predicted task, divided by the square of the order-of-magnitude difference between the sulfur and nitrogen content of the raw wax oil in the task. The penalty term is the sum of the absolute values of the errors between the predicted and actual values of the sulfur and nitrogen content of the refined wax oil in the predicted task, and then averaged. This method significantly improves the generalization ability of the model.
[0030] During training, the model aims to stop training by minimizing the total loss function. The main term of the loss function reduces the bias of the model training towards large-scale targets and narrows the difference between large-scale and small-scale targets. The penalty term further reduces the impact of the difference in sulfur and nitrogen content of raw materials on the model training process, making the model training process tend to take both into account.
[0031] Keras is a deep learning framework for building models and a high-level neural network application programming interface written in Python. It consists of a series of independent, fully configurable modules that can be assembled according to specific needs. In particular, neural network layers, loss functions, optimizers, initialization methods, activation functions, and regularization methods can all be combined to build new models.
[0032] The model was written in Python and built using the Keras deep learning framework. Training the model required accessing the input and output features and data from Excel. The input features were mainly divided into two parts: raw material properties and operating parameters. Raw material properties included characteristics such as raw material density, sulfur content, nitrogen content, and distillation range (IBP, 10%, 30%, ..., FBP). Operating parameters included reaction temperature, reaction pressure, space velocity, and hydrogen-to-oil ratio. The output features were the sulfur and nitrogen content of the hydrotreated wax oil.
[0033] The features and data corresponding to the input and output are cleaned, ensuring a one-to-one correspondence between them. These are then organized into separate Excel spreadsheets for easy reading by the algorithm. All data is randomly divided into training, validation, and test sets in a 6:2:2 ratio. The training set is used for model training, the validation set for hyperparameter optimization, and the test set for evaluating the model's prediction performance. The evaluation metrics for the model are Mean Absolute Error (MAE), Mean Relative Error (MRE), and Coefficient of Determination (R²). 2 The relevant statistical parameters required to build the model are as follows, where, ; ; ; In the above formula, n is the number of samples in the test set. For the sample true value, For the sample predicted value, R0 represents the sample mean true value. MAE reflects the degree to which all sample predicted values deviate from the true value, while MRE reflects the reliability of all sample predicted results. 2 It reflects how well the model's predicted values fit the actual values.
[0034] Figure 2 A flowchart illustrating the method for predicting the sulfur and nitrogen 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 and nitrogen content of refined wax oil is provided, the method comprising the following steps: Step S110: Obtain the properties of the raw materials and operating parameters used in the refining process of wax oil; and Step S120: Input the raw material properties and operating parameters into a pre-established data-driven model for predicting the sulfur and nitrogen content of refined wax oil, and obtain the sulfur and nitrogen content of the refined wax oil. The loss function within the data-driven model comprises a principal term and a penalty term. The principal term is the sum of the root mean square errors between the predicted and actual sulfur and nitrogen contents of the refined wax oil, divided by the square of the order-of-magnitude difference between the sulfur and nitrogen contents of the raw wax oil. The penalty term is used to shift the prediction errors for sulfur and nitrogen contents of the refined wax oil towards the median of these prediction errors. This mainly utilizes Figure 1 The method shown constructs a data-driven model for predicting the sulfur and nitrogen content of refined wax oils.
[0035] The present invention will be further described in detail below with examples, but the present invention is not limited thereto.
[0036] (1) Collect the pilot-scale catalyst evaluation data for wax oil hydrogenation, and use the data on the properties of the raw materials and operating conditions (or operating parameters) as the input data for the model, and organize them into Excel Table 1. Use the data corresponding to the sulfur content and nitrogen content of the refined wax oil as the output data, and organize them into Excel Table 2.
[0037] (2) All possible input features (raw material properties, operating conditions) are matched one-to-one with output features (sulfur content and nitrogen content of refined wax oil), and all data are randomly divided into training set, validation set and test set in a ratio of 6:2:2. The test set is set aside separately to examine the generalization ability of the model.
[0038] (3) Establish the old loss function model M1. Using Python, a deep learning framework is built, and Excel spreadsheets 1 and 2 are called to establish a prediction model for the sulfur and nitrogen content of refined wax oil. At this point, the loss function expression used by the model is: The training set is used for model training, and the validation set is used to tune the model's hyperparameters. When the evaluation metrics of the training and validation sets change with the number of iterations and the trends and values remain basically consistent, the model can be considered to be well trained.
[0039] (4) Input the input parameters and data of the test set into model M1 to obtain the prediction results of the test set, such as... Figure 3 As shown. The mean absolute error (MAE), mean relative error (MRE), and coefficient of determination R are used to calculate the mean absolute error (MAE), mean relative error (MRE), and coefficient of determination R. 2 The statistical indicators and their predictive effects are shown in Table 1.
[0040] (5) Establish a new loss function model M2. Similar to step (3), the difference is that model M2 redefines the loss function, and the reconstructed total loss function is:
[0041] in, 11 , 12 ... 1j y represents the predicted value for each sample in the refined wax oil sulfur content dataset. 11 y 12 ...y 1j This represents the true values of each sample in the refined wax oil sulfur content dataset; 21 , 22 ... 2j y represents the predicted value for each sample in the refined wax oil nitrogen content dataset. 21 y 22 ...y 2j This represents the true value of each sample in the refined wax oil nitrogen content dataset, where n represents the number of samples.
[0042] (6) The overall loss function of the model consists of two parts: the principal term and the penalty term. The principal term is the sum of the root mean square errors between the predicted and actual values of the sulfur and nitrogen content of the refined wax oil in the model prediction task, divided by the square of the order of magnitude difference between the sulfur and nitrogen content of the raw wax oil in the task. Its expression is:
[0043] 11 , 12 ... 1j y represents the predicted value for each sample in the refined wax oil sulfur content dataset. 11 y 12 ...y 1j This represents the true values of each sample in the refined wax oil sulfur content dataset; 21 , 22 ... 2j y represents the predicted value for each sample in the refined wax oil nitrogen content dataset. 21 y 22 ...y 2j This represents the true value of each sample in the refined wax oil nitrogen content dataset, where n represents the number of samples.
[0044] The penalty term is the sum and average of the absolute values of the errors between the predicted and actual values of the sulfur and nitrogen content of refined wax oil in the type prediction task. Its expression is:
[0045] in, 11, 12 ... 1j y represents the predicted value for each sample in the refined wax oil sulfur content dataset. 11 y 12 ...y 1j This represents the true values of each sample in the refined wax oil sulfur content dataset; 21 , 22 ... 2j y represents the predicted value for each sample in the refined wax oil nitrogen content dataset. 21 y 22 ...y 2j This represents the true value of each sample in the refined wax oil nitrogen content dataset, where n represents the number of samples.
[0046] (7) Input the input parameters and data of the test set into model M2 to obtain the prediction results of the test set as follows: Figure 4 As shown. The mean absolute error (MAE), mean relative error (MRE), and coefficient of determination R are used to calculate the mean absolute error (MAE), mean relative error (MRE), and coefficient of determination R. 2 The statistical indicators and their predictive effects are shown in Table 1.
[0047] (8) Compare the prediction performance of models M1 and M2 on the test set data. Figure 3 The predicted and actual values for sulfur and nitrogen content in refined wax oils generally deviated significantly from the actual values. Figure 4 The predicted and actual values of sulfur and nitrogen content in refined wax oil showed relatively small overall deviations, indicating that the prediction performance of sulfur and nitrogen content in refined wax oil on the test set was significantly improved after using the new loss function.
[0048] (9) Compare the evaluation indicators in Table 1, including the total mean absolute error (MAE) of sulfur content and nitrogen content in refined wax oil, the total mean relative error (MRE), and the total coefficient of determination (R). 2 For reference. Compared to model M1, model M2 shows a 54.4 ppm reduction in MAE, with little change in MRE, and R... 2 Increase by 0.15.
[0049] Judging from the changes in the evaluation indicators before and after the design of the loss function in step (9), the newly designed total loss function significantly improves the prediction effect on the test set data, which fully demonstrates the effectiveness of redesigning the total loss function.
[0050] Table 1. Prediction performance of the old and new loss functions on the test set data.
[0051] Figure 3This describes the prediction performance of a deep learning framework model built using the old loss function on a test set, specifically the prediction of sulfur and nitrogen content in refined wax oil. Figure 4 This describes the prediction performance of a deep learning framework model built using a new loss function on a test set, specifically focusing on the sulfur and nitrogen content predictions in refined wax oils. Figure 3 and Figure 4 It can be seen that the deep learning framework model built with the new loss function performs better than the deep learning framework model built with the old loss function in predicting the sulfur and nitrogen content in refined wax oil on the test set, and the predicted values are closer to the true values.
[0052] 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.
[0053] 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.
[0054] 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 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0055] 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 1One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0056] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0057] 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.
[0058] 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.
[0059] 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.
[0060] 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 predicting the sulfur and nitrogen content of refined wax oil, the method comprising: To obtain the properties of the raw materials and operating parameters used in the production of refined wax oil; as well as The raw material properties and operating parameters are input into a pre-established data-driven model for predicting the sulfur and nitrogen content of refined wax oil, thereby obtaining the sulfur and nitrogen content of the refined wax oil. The loss function within the data-driven model comprises a principal term and a penalty term. The principal term is the sum of the root mean square errors between the predicted and actual sulfur and nitrogen contents of the refined wax oil, divided by the square of the order-of-magnitude difference between the sulfur and nitrogen contents of the raw wax oil. The penalty term is used to shift the prediction errors for sulfur and nitrogen contents of the refined wax oil towards the median of these prediction errors. The loss function is as follows: in, 11 , 12 ... 1j y represents the predicted value for each sample in the refined wax oil sulfur content dataset. 11 y 12 ...y 1j This represents the true values of each sample in the refined wax oil sulfur content dataset; 21 , 22 ... 2j y represents the predicted value for each sample in the refined wax oil nitrogen content dataset. 21 y 22 ...y 2j This represents the true value of each sample in the refined wax oil nitrogen content dataset, where n represents the number of samples.
2. A method for constructing a data-driven model for predicting the sulfur and nitrogen content of refined wax oil, the method comprising: Obtain pilot-scale catalyst evaluation data for wax oil hydrogenation, including feedstock properties, operating parameters, and sulfur and nitrogen content of refined wax oil; The evaluation data is divided into a training set and a test set; as well as Using the aforementioned training and test sets, a data-driven model for predicting the sulfur and nitrogen content of refined wax oils was trained and tested. The loss function within the data-driven model includes a principal term and a penalty term. The principal term is the sum of the root mean square errors between the predicted and actual sulfur and nitrogen contents of the refined wax oil, divided by the square of the order-of-magnitude difference between the sulfur and nitrogen contents of the raw wax oil. The penalty term is used to shift the prediction errors of the sulfur and nitrogen contents of the refined wax oil towards the median value of these two prediction errors. The loss function is as follows: in, 11 , 12 ... 1j y represents the predicted value for each sample in the refined wax oil sulfur content dataset. 11 y 12 ...y 1j This represents the true values of each sample in the refined wax oil sulfur content dataset; 21 , 22 ... 2j y represents the predicted value for each sample in the refined wax oil nitrogen content dataset. 21 y 22 ...y 2j This represents the true value of each sample in the refined wax oil nitrogen content dataset, where n represents the number of samples.
3. The method according to claim 1 or 2, characterized in that, The properties of the raw materials include their density, distillation range, refractive index, sulfur content, and nitrogen content.
4. The method according to claim 1 or 2, characterized in that, The operating parameters include reaction pressure, reaction temperature, space velocity, and hydrogen-to-oil ratio.
5. The method according to claim 1 or 2, characterized in that, The data-driven model was built using the deep learning framework Keras.
6. An apparatus for predicting the sulfur and nitrogen content of refined wax oil, characterized in that, The device includes: Memory; and A processor configured to predict the sulfur and nitrogen content of refined wax oil using the method for predicting the sulfur and nitrogen content of refined wax oil according to any one of claims 1, 3-5.
7. 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 and nitrogen content of refined wax oil according to any one of claims 1, 3-5.
8. 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 and nitrogen content of refined wax oil according to any one of claims 1, 3-5.