Crude oil property prediction method based on distillate oil depth characteristic modeling
By training a deep learning model based on distillate oil spectral data and constructing a convolutional-attention dual-branch network, the problem of complex and time-consuming traditional crude oil detection is solved, enabling rapid and accurate prediction of crude oil properties and improving the model's generalization ability and stability.
Patent Information
- Application Number
- CN202511742447.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2026-02-27
AI Technical Summary
Traditional crude oil testing methods are complex, time-consuming, and costly, making it difficult to meet the needs of deep learning models for large-scale training data, and the number of crude oil property label samples is limited.
By training a deep learning model based on distillate oil spectral data, extracting features and applying them to crude oil spectra, a convolutional-attention dual-branch fusion neural network is constructed. Combined with a supervision mechanism of cross-entropy loss and multi-center loss, feature representation and property prediction are performed. The high-dimensional features of distillate oil are used to infer the properties of crude oil.
The model's generalization ability and stability are significantly improved under limited sample conditions, providing a rapid and accurate method for detecting crude oil properties and reducing detection costs.
Smart Images

Figure CN121583376A_ABST
Abstract
Description
Technical Field
[0002] This invention belongs to the field of distillate oil property detection in refining and chemical enterprises, specifically a crude oil property prediction method based on distillate oil depth feature modeling. Background Technology
[0004] In the crude oil testing and blending processes of refining and chemical enterprises, the physicochemical properties of crude oil (such as API level, acid value, nitrogen content, etc.) directly affect the processing conditions and product distribution of the unit. Traditional testing processes are complex, time-consuming, and costly, which is not conducive to large-scale rapid testing. In recent years, methods combining near-infrared spectroscopy and deep learning have gradually become an important means of intelligent prediction of crude oil properties due to their advantages such as being non-destructive, rapid, and requiring no chemical reagents.
[0005] Crude oil is a complex and variable natural mixture. The composition and physicochemical properties of crude oil vary significantly across different regions, with large ranges in indicators such as API value, acid value, and nitrogen content. Crude oil property testing is costly, and the number of samples with physicochemical property labels is very limited. Currently, there are approximately one thousand known types of crude oil globally, which is insufficient to meet the large-scale training data requirements of deep learning models. In contrast, distillate oils, as components obtained from the physical distillation of crude oil, offer abundant and stable spectral data. The distillation process involves only phase transitions without chemical reactions, and can reflect the compositional characteristics of crude oil to a certain extent. This provides a new possibility for inferring crude oil properties using the deep characteristics of distillate oils.
[0006] Building upon previous research on intelligent classification and property prediction of distillate oils, this invention proposes a crude oil property prediction method based on deep feature modeling of distillate oils. This method first trains a deep feature extraction model using a large amount of distillate oil spectral data, and then applies this model to crude oil spectral feature modeling and property prediction. This enables the inference of crude oil properties under limited sample conditions, effectively improving the model's generalization ability and interpretability, and providing a new means of crude oil property detection in the refining process. Summary of the Invention
[0008] This invention addresses the problems existing in the background technology by proposing a crude oil property prediction method based on distillate oil depth feature modeling. The method first trains a deep learning model using distillate oil spectral data to obtain feature representation capabilities, and then applies this model to crude oil spectra to achieve deep feature extraction and property prediction of crude oil. The specific steps are as follows:
[0009] Step 1: Read the raw data from the distillate oil spectral database and perform spectral cleaning and data preprocessing: The cleaning stage uses an absorbance threshold-based method to remove outlier data; the preprocessing stage includes baseline correction, band truncation, vector normalization, and SG smoothing to generate a dataset. And in accordance with The proportion of the training set is used to divide the training set. and test set .
[0010] Step 2: Construct a neural network structure that integrates convolutional and attention branches. Generate high-dimensional feature representations of distillate oil through a feature concatenation module. Train the network using a joint supervision mechanism of cross-entropy loss and multi-center loss. The composite loss function used for network training... :
[0011]
[0012] Among them, the central loss It represents the minimum Euclidean distance between a high-dimensional feature and the centers of multiple high-dimensional features belonging to its category. Indicates the first The high-dimensional features output by the neural network after processing the sample belong to the first... Class, d is the feature dimension, Represents the first in the feature space The class of One central vector, For category The central set, with a batch size of M. For loss weights; Let cross-entropy be the loss function. It is a parameter matrix The List, It is the first Class deviation terms, It is a deviation term. The number of classes is used. The central loss during network training employs a mini-batch update strategy, and hyperparameters are set accordingly. The learning rate is used to adjust the center update.
[0013] Step 3, train the set The loss function is minimized in the input network using the AdamW algorithm. The model's weight parameters are adjusted to learn the nonlinear mapping relationship between spectral absorbance and distillate oil category.
[0014] Step 4, using the test set To evaluate the generalization ability of the network weight parameter model, determine whether the model's classification accuracy on the test set is greater than [missing value]. If the condition is met, proceed to step 5; otherwise, modify the hyperparameters and proceed to step 3.
[0015] Step 5: Read the raw data from the crude oil spectral database, perform the same cleaning and data preprocessing as in Step 1), and generate a crude oil spectral dataset. .
[0016] Step 6, extract the crude oil spectral dataset. Input the trained distillate oil feature extraction model to extract the high-dimensional feature vector for each crude oil sample.
[0017] Step 7: For the crude oil sample to be tested, select the top 50 samples with the highest cosine similarity between its high-dimensional feature vector and the feature vectors of each sample in the crude oil database to form a calibration sample set. The cosine similarity calculation formula is:
[0018]
[0019] Where Z and V are the high-dimensional feature vectors of the sample to be tested and the samples in the database, respectively. The Euclidean norm of a vector. This represents the dot product operation of vectors.
[0020] Step 8: Standardize the spectral data and property labels of the calibration set, including mean centering and unit variance scaling for both the spectral data and property labels.
[0021]
[0022] in, For the spectral matrix, The property matrix, For the sample size, Let be the dimension. For the quantity of properties. , Let represent the mean and standard deviation of the column vectors of the spectral matrix, respectively. , These represent the mean and standard deviation of the column vectors of the property matrix, respectively.
[0023] Step 9: Apply partial least squares regression to the standardized calibration set to extract latent variables and maximize spectral features. With property data The covariance between them is used to establish a property prediction model. The PLS iterative process is as follows: in the first... In the next iteration
[0024] 1) Calculate the spectral projection direction and property projection direction :
[0025]
[0026] in, , These are the spectral residual matrix and the property residual matrix, respectively. When equal to 1, , .
[0027] 2) Calculate the spectral score vector Score vector of properties :
[0028]
[0029] 3) Calculate the spectral load vector and property load vector :
[0030]
[0031] 4) Update the spectral residual matrix and properties of residual matrix :
[0032]
[0033] Based on extraction Establish a linear relationship between spectral characteristics and oil properties using 10 potential variables:
[0034]
[0035] in, For the score matrix, , For the load matrix, This is the residual matrix. The regression coefficient matrix. It can be calculated using the following formula:
[0036]
[0037] in, This is the spectral weighting matrix.
[0038] Step 10: Input the high-dimensional feature vector of the crude oil to be tested into the learned property prediction model, and output the property prediction result of the crude oil.
[0039] Beneficial effects:
[0040] This invention discloses a crude oil property prediction method based on deep feature modeling of distillate oils. This method utilizes a large amount of distillate oil spectral data to train a deep feature extraction model, learns the high-dimensional spectral feature distributions of different distillate oils, and applies the trained model to crude oil spectral analysis, achieving deep feature modeling and property prediction of crude oil. By introducing prior feature representations of distillate oils, this invention effectively alleviates the training insufficiency problem caused by the scarcity of crude oil samples, significantly improves the model's generalization ability and stability, and provides refining enterprises with a new intelligent means of crude oil property detection. Attached Figure Description
[0042] Figure 1 This is a flowchart of the crude oil property prediction method based on distillate oil depth feature modeling of the present invention.
[0043] Figure 2 This is a structural diagram of the one-dimensional convolutional self-attention network Conformer1D.
[0044] Figure 3 This is a schematic diagram of multicenter loss.
[0045] Figure 4 This is a graph showing the loss versus accuracy during model training.
[0046] Figure 5 This is a framework diagram for predicting the properties of crude oil. Detailed Implementation
[0048] The embodiments of the present invention are described in detail below. These embodiments are implemented based on the technical solution of the present invention, and provide detailed implementation methods and specific operation processes. However, the scope of protection of the present invention is not limited to the following embodiments.
[0049] By implementing near-infrared spectroscopy rapid analysis technology in multiple refining and chemical plants in China, the company has collected a large amount of distillate oil spectral data. Using the data in the company's database, the effectiveness of the crude oil property prediction method based on distillate oil depth characteristic modeling proposed in this invention is verified.
[0050] The overall system flowchart of the present invention is as follows: Figure 1 As shown, the specific steps include:
[0051] 1) Read the raw data from the distillate oil spectral database. Table 1 shows some of the spectral data and labels.
[0052] Table 1. Spectral absorbance measurement data
[0053]
[0054] The raw labeled spectral data is cleaned and preprocessed to generate a dataset. Data cleaning involved threshold-based cleaning of spectral outliers; data preprocessing included baseline correction, wavenumber band truncation, vector normalization, and SG smoothing. Table 2 shows some of the outlier spectral data, with absorbance far exceeding the threshold of 2.5. Table 3 shows the preprocessed spectral data. The cleaned and preprocessed datasets were then compared. The training set was divided into two parts at an 8:2 ratio. and test set .
[0055] Table 2. Abnormal spectral data
[0056]
[0057] Table 3. Raw spectral data and preprocessed spectral data
[0058]
[0059] 2) The architecture of the one-dimensional convolutional self-attention network Conformer1D is as follows: Figure 2 As shown, a high-dimensional feature representation of distillate oil is generated through a feature concatenation module, and the network is trained using a joint supervision mechanism of cross-entropy loss and multi-center loss. A schematic diagram of the multi-center loss is shown below. Figure 3 As shown. The composite loss function used for network training. :
[0060]
[0061] Among them, the central loss It represents the minimum Euclidean distance between a high-dimensional feature and the centers of multiple high-dimensional features belonging to its category. Indicates the first The high-dimensional features output by the neural network after processing the sample belong to the first... Class, d is the feature dimension, Represents the first in the feature space The class of One central vector, For category The central set, with a batch size of M. For loss weights; Let cross-entropy be the loss function. It is a parameter matrix The List, It is the first Class deviation terms, It is a deviation term. The number of classes is denoted by α. The center loss during network training employs a mini-batch update strategy, and a hyperparameter α is set to adjust the learning rate for center updates.
[0062] 3) The training set The input is used for training the network, where the initial learning rate of the network is set. The learning rate decay rate is Batch size is 256, regularization coefficient is... The discard rate was 0.5%. , The training rounds are 100. Based on the defined loss function, the AdamW algorithm is used to minimize the loss function. . Figure 4 The graph shows the loss versus accuracy during model training, with a classification accuracy of 99.51%.
[0063] 4) such as Figure 5 As shown, crude oil property prediction involves several key physicochemical properties, such as API (excess API), sulfur content, and acid value. The near-infrared spectrum of the oil sample to be tested is input into a trained convolutional-attention dual-branch network to extract a high-dimensional feature vector. Based on this feature vector and using a cosine similarity metric, the top 50 samples most similar to the oil sample to be tested are selected to construct a calibration set, providing data support for subsequent partial least squares regression modeling.
[0064] 5) Standardize the spectral data and property labels of the calibration set, including mean centering and unit variance scaling of the spectral data and property labels respectively.
[0065] 6) Partial least squares regression is applied to the standardized calibration set to extract latent variables in order to maximize spectral features. With property data Based on the covariance between them, a property prediction model is established.
[0066] 7) Input the high-dimensional feature vector of the oil sample to be tested into the trained PLS regression model to obtain the property prediction results of the oil sample. Table 4 shows the root mean square error (RMSE), relative root mean square error (rRMSE), and coefficient of determination for the property prediction. Evaluation indicators such as )
[0067] Table 4 Evaluation Indicators for Crude Oil Property Prediction Results
[0068]
[0069] As shown in Table 4, the accuracy of crude oil property prediction fully meets the analytical requirements. Therefore, the crude oil property prediction method based on distillate oil depth characteristic modeling is effective.
Claims
1. A method for predicting crude oil properties based on distillate oil depth characteristic modeling, characterized in that, This method first trains a deep learning model using distillate oil spectral data to obtain feature representation capabilities, and then uses the trained model for crude oil spectral feature extraction and property prediction. Specifically, it includes the following steps: 1) Read the raw data from the distillate oil spectral database, clean and preprocess the spectra, and generate a dataset. Divide the training set and test set ; 2) In the distillate oil feature extraction model with convolution-attention dual-branch fusion, a joint supervision mechanism of cross-entropy loss and multi-center loss is used for training; 3) The training set The loss function is minimized in the input network using the AdamW algorithm. Adjust the model's weight parameters to learn the nonlinear mapping relationship between spectral absorbance and distillate oil categories; 4) Through the test set To evaluate the generalization ability of the trained model, determine whether the model's classification accuracy on the test set is greater than [previous value]. If the conditions are met, training is complete and proceed to step 5); otherwise, modify the hyperparameters and proceed to step 3. 5) Read the raw data from the crude oil spectral database, perform the same cleaning and data preprocessing as in step 1), and generate a crude oil spectral dataset. ; 6) Analyze the crude oil spectral dataset Input the trained distillate oil feature extraction model to extract the high-dimensional feature vector for each crude oil sample; 7) For the crude oil sample to be tested, select the top 50 samples with the highest cosine similarity between its high-dimensional feature vector and the feature vector of each sample in the crude oil database to form a calibration sample set; 8) Standardize the spectral features and property labels of the calibration set, including mean centering and unit variance scaling of the spectral data and property labels respectively; 9) Partial least squares (PLS) regression is applied to the standardized calibration set to extract latent variables and maximize spectral characteristics. With property data Based on the covariance between them, a property prediction model is established; 10) Input the high-dimensional feature vector of the crude oil to be tested into the learned property prediction model, and output the property prediction result of the crude oil.
2. The crude oil property prediction method based on distillate oil depth characteristic modeling according to claim 1, characterized in that, The cleaning stage uses an absorbance threshold-based method to remove outlier data; the preprocessing stage includes baseline correction, band clipping, vector normalization, and SG smoothing.
3. The crude oil property prediction method based on distillate oil depth characteristic modeling according to claim 1, characterized in that, A composite loss function, constructed by combining multi-center loss and cross-entropy loss, is used during network training. : Among them, the central loss It represents the minimum Euclidean distance between a high-dimensional feature and the centers of multiple high-dimensional features belonging to its category. Indicates the first The high-dimensional features output by the neural network after processing the sample belong to the first... Class, d is the feature dimension, Represents the first in the feature space The class of One central vector, For category The central set, with a batch size of M. To lose weight, The Euclidean norm of a vector; Let cross-entropy be the loss function. Represents the relationship between the weight matrix and the first... The column vector corresponding to the class It is a parameter matrix The The superscript T indicates the transpose operation of a matrix or vector; It is the first Class deviation terms, It is a deviation term. This represents the number of categories.
4. The crude oil property prediction method based on distillate oil depth characteristic modeling according to claim 1, characterized in that, The central loss during network training employs a mini-batch update strategy, and hyperparameters are set accordingly. The learning rate is used to adjust the center update.
5. The crude oil property prediction method based on distillate oil depth characteristic modeling according to claim 1, characterized in that, The cosine similarity calculation method is as follows: Where Z and V are the high-dimensional feature vectors of the sample to be tested and the samples in the database, respectively. The Euclidean norm of a vector. This represents the dot product operation of vectors.
Citation Information
Patent Citations
Spectral linear expression-based oil property prediction method
CN107958267A
Distillate oil near infrared spectrum on-line property detection method for working condition switching
CN116756582A
Method for improving intelligent classification precision of distillate oil
CN120408270A
Prediction method and device for crude oil cutting distillate oil yield, medium and product
CN120741401A