Oil source comparison method and system based on random forest model
Through the oil source comparison method based on the random forest model, the problem of cumbersome and inefficient oil source comparison analysis in the prior art is solved, and more efficient and accurate prediction of oil source layer systems is achieved, and exploration efficiency and drilling success rate are improved.
Patent Information
- Application Number
- CN202311036084.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-16
- Publication Date
- 2025-02-21
AI Technical Summary
Existing oil source comparison analysis and research relies on professionals, the methods are cumbersome and inefficient, and it is difficult to make full use of the massive information generated by the instrument, resulting in ambiguity and roughness of geological interpretation.
The oil source comparison method based on the random forest model is adopted, and the supervised learning data set is constructed by collecting and classifying the biomarker data of oil source rocks, and a random forest model is built for training and optimization to predict the oil source layer system results.
It improves the efficiency and accuracy of oil source comparison analysis, can make more efficient use of massive data, reduce human subjectivity, improve drilling success rate, and provide technical support for exploration well location selection and development.
Smart Images

Figure CN119494039A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of petroleum geological exploration and relates to an oil source comparison method and system based on a random forest model. Background Art
[0002] At present, oil source comparison is mainly analyzed by visual inspection of spectra or parameter plate method. The former makes judgments by manually observing the morphology of spectra, which can be directly observed or observed after abstraction and processing. It is usually used for the analysis of common spectra such as total ion current (TIC), terpanes (m / z=191) and steranes (m / z=217) in the mass chromatogram series. Its advantages are simplicity and intuitiveness, but its disadvantages are strong human subjectivity, poor analysis accuracy, and inability to cope with a large number of samples; the latter integrates and calculates the spectra through a unified and standardized processing flow to obtain the peak area of each chromatographic peak, thereby converting the chromatographic peaks of related compounds into the values of various compound parameters, and using scatter plots, line graphs and other methods to characterize and analyze the characteristics of the samples, but the final qualitative conclusion of this method still relies on a large amount of manual analysis and inference, and the process is cumbersome, and it is inefficient when facing a large number of samples and complex phenomena.
[0003] Carrying out oil source comparative analysis is a tedious and professional task, involving the intersection of multidisciplinary knowledge and technology such as petroleum, geology, chemistry, and biology. The related work relies on specially trained professionals, and there are many inconveniences and limitations in application practice. In addition, the visual inspection method and plate method used in conventional oil source comparison methods are not only cumbersome and inefficient, but also difficult to fully utilize the massive information generated by the instrument, resulting in the ambiguity and roughness of the geological interpretation obtained, which is far from the requirements of geochemical research for fine exploration in the information age. Summary of the invention
[0004] The purpose of the present invention is to solve the problem that the oil source comparison analysis research in the prior art relies on professionals, and the conventional oil source comparison method is cumbersome and inefficient, and it is difficult to fully utilize the massive information generated by the instrument, and to provide an oil source comparison method and system based on a random forest model.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] The oil source comparison method based on the random forest model proposed in the present invention includes:
[0007] Collect biomarker parameters of potential source rock extracts, sandstone extracts and crude oil in the target strata of the study area;
[0008] Based on the petroleum geological conditions and sample quantity of the study area, the biomarker data of source rock extracts were classified;
[0009] Based on the sample collection layer and the determined classification categories of biomarker data of source rock extracts, labels are assigned to the biomarker data of each potential source rock extract to construct a potential source rock biomarker dataset for supervised learning.
[0010] Build a random forest model;
[0011] The random forest model is trained and optimized based on the potential source rock biomarker data set to obtain the classification accuracy of different layers in the test set, and then the optimized random forest model is obtained;
[0012] The biomarker parameters of sandstone extracts and crude oil are predicted based on the optimized random forest model to obtain the oil source stratum results of crude oil and sandstone extract samples.
[0013] Preferably, the potential source rock extracts of the target strata in the study area are as follows: each set of potential source rocks is regarded as a type of oil source, and there are also multiple sets of source rocks with similar characteristics and genesis types as a type of oil source; each type of oil source must contain at least dozens of corresponding biomarker data of potential source rock extracts, and the biomarker data of the potential source rock extracts come from different strata of the potential source rocks.
[0014] Preferably, the construction of a potential source rock biomarker dataset for supervised learning is specifically: different types of rock groups are divided into different strata, and biomarker parameters of shale extract samples at different levels of potential source rocks in different strata are collected as a potential source rock biomarker dataset.
[0015] Preferably, after constructing the potential source rock biomarker data set for supervised learning, the method further includes normalizing the constructed potential source rock biomarker data set;
[0016]
[0017] Where x and x′ represent the original data and the normalized data, respectively, and min(x) and max(x) represent the minimum and maximum values in a set of elements to be normalized, respectively.
[0018] Preferably, the building of a random forest model is specifically as follows:
[0019] The random forest model includes an input layer, a decision tree layer, a voting layer and an output layer; the input layer is used to receive the input biomarker data and extract a training set from the normalized N sample data sets; in each round, n training samples are extracted from the sample set using a random sampling method with replacement. In the training set, some samples may be extracted multiple times, while some samples may not be extracted once; a total of k rounds of extraction are performed to obtain k training sets; the k training sets are independent of each other; in each training set, different sample numbers are expected to meet the following requirements:
[0020] E(x)=N(1-e -n / N )
[0021] Each time a training set is used to obtain a decision tree layer model, k training sets will obtain a total of k decision tree layer models;
[0022] The decision tree layer model construction uses decision tree ID3, decision tree C4.5 and decision tree CART algorithms; the decision tree ID3 algorithm uses information gain to measure attribute selection, and selects the biomarker attribute with the largest information gain after splitting for splitting; the C4.5 decision tree algorithm uses information gain rate as the splitting partitioning metric, and selects the biomarker attribute with the largest information gain rate as the current splitting attribute at each split; the decision tree CART algorithm uses the Gini index to select the best data segmentation attribute.
[0023] The voting layer obtains the final result according to the votes of all decision trees; the output layer outputs the data processed by the random forest model.
[0024] Preferably, the decision tree ID3 algorithm uses information gain to measure attribute selection, and selects the biomarker attribute with the largest information gain after splitting for splitting. Specifically, let D be the division of the training tuple by the output category, where pi represents the probability of the i-th category appearing in the entire training tuple, and the entropy of D is expressed as:
[0025]
[0026] The training tuple D is divided according to the attribute of biomarker A, and the expected information of A on D is:
[0027]
[0028] Therefore, the information gain is the difference between the two:
[0029] gain(A)=imfo(D)-infoA(D)
[0030] The ID3 decision tree algorithm "greedily" selects the biomarker attribute with the largest information gain as the attribute for this division at each split; the greater the information gain, the greater the "purity" of the biomarker attribute division; each split will make the tree grow one level higher.
[0031] Preferably, the C4.5 decision tree algorithm uses information gain rate as the splitting metric, and selects the biomarker attribute with the largest information gain rate as the current splitting attribute at each split, specifically:
[0032] The C4.5 algorithm defines split information, expressed as:
[0033]
[0034] Information gain rate:
[0035]
[0036] The C4.5 decision tree algorithm uses information gain rate as the splitting metric, and selects the biomarker attribute with the largest information gain rate as the splitting attribute each time.
[0037] Preferably, the decision tree CART algorithm uses the Gini index to select the best data segmentation attribute, specifically: if there are k training sets of samples, then the probability that a random sample point belongs to the kth class is p k , then the Gini index of the probability distribution is:
[0038]
[0039] The Gini index indicates the probability of a randomly selected sample in a sample set being misclassified; when selecting features in a decision tree, the attribute with the largest Gini index gain value is selected as the node splitting condition;
[0040] If the sample set D is divided into two parts D1 and D2 according to whether the biomarker attribute X takes a certain possible value a, as follows:
[0041] D={(x,y)∈D|X(x)=a},D2D-D1
[0042] Then, under the condition of biomarker attribute X, the GIni index of set D is:
[0043]
[0044] When constructing the decision tree, the remaining biomarker attributes are calculated separately according to the calculation method of the Gini index of the biomarker attribute, and the decision tree is constructed iteratively.
[0045] Preferably, the method of obtaining the classification accuracy of different strata in the test set and then obtaining the optimized random forest model is as follows: the potential source rock data set is divided into a training set and a test set according to a ratio of 70% and 30%; it is determined whether the number of cycles of the random forest model reaches the set maximum threshold, or whether the loss function exceeds the minimum threshold, if the number of cycles reaches the set maximum threshold, or the loss function does not exceed the minimum threshold, then the trained random forest model is obtained; the test set is input into the trained random forest model, and the classification accuracy of different strata in the test set is compared to obtain the optimized random forest model.
[0046] The oil source comparison system based on the random forest model proposed in the present invention includes:
[0047] A collection module, which collects biomarker parameters of potential source rock extracts, sandstone extracts and crude oil in target layers of the study area;
[0048] A classification module, wherein the classification module classifies the biomarker data of the source rock extract based on the petroleum geological conditions and the number of samples in the study area;
[0049] A construction module, wherein the construction module assigns labels to the biomarker data of each potential source rock extract based on the sample collection layer and the determined classification category of the biomarker data of the source rock extract, and constructs a potential source rock biomarker data set for supervised learning;
[0050] A building module, wherein the building module builds a random forest model;
[0051] A first acquisition module, which trains and optimizes the random forest model based on the potential source rock biomarker data set, obtains the classification accuracy of different layers in the test set, and then obtains the optimized random forest model;
[0052] The second acquisition module predicts the biomarker parameters of the sandstone extract and crude oil based on the optimized random forest model to obtain the oil source stratum results of the crude oil and sandstone extract samples.
[0053] Compared with the prior art, the present invention has the following beneficial effects:
[0054] The present invention classifies the biomarker data of source rock extracts based on the petroleum geological conditions and sample quantity of the study area; and constructs a supervised learning potential source rock biomarker data set; trains and optimizes the random forest model based on the potential source rock biomarker data set, obtains the classification accuracy of different strata in the test set, and then obtains the optimized random forest model; predicts the biomarker parameters of sandstone extracts and crude oil based on the optimized random forest model, and obtains the oil source stratum results of crude oil and sandstone extract samples. The present invention uses the random forest model to provide a new idea for oil source comparison research, which can provide support for oil and gas enriched blocks and low exploration degree blocks in old oil fields with a high degree of exploration; solves the problems of time-consuming and labor-intensive oil source comparison, difficult index optimization, and poor oil source comparison effect; and can improve the success rate of drilling, providing technical support for exploration well site optimization and subsequent development. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0056] Figure 1 It is a schematic flow chart of the oil source comparison method based on the random forest model of the present invention;
[0057] Figure 2 A schematic diagram of the structure of the random forest oil source classification model constructed by the present invention;
[0058] Figure 3 is the prediction graph of the source rock biomarker data classifier model; Figure 3 (a) is a schematic diagram showing the relationship between the false positive rate and the true positive rate; Figure 3 (b) is a schematic diagram of the decision tree model;
[0059] Figure 4 To build a random forest model through Python programming;
[0060] Figure 5 Box plot of the test accuracy of the trained random forest oil source classification model;
[0061] Figure 6 This is a schematic diagram of the geochemical identification plate of isoprenoids;
[0062] Figure 7 It is a schematic diagram of the structure of the oil source comparison system based on the random forest model of the present invention. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0064] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0065] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0066] In the description of the embodiments of the present invention, it should be noted that if the terms "upper", "lower", "horizontal", "inner", etc. indicate an orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of the invention is usually placed when in use, it is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0067] In addition, if the term "horizontal" appears, it does not mean that the component must be absolutely horizontal, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", which does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0068] In the description of the embodiments of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0069] The present invention is further described in detail below in conjunction with the accompanying drawings:
[0070] See also Figure 1 The present invention discloses an oil source comparison method based on a random forest model, comprising:
[0071] S101, collect biomarker parameters of potential source rock extracts, sandstone extracts and crude oil in the target strata of the study area.
[0072] Each set of potential source rocks is regarded as a type of oil source, and there are also multiple sets of source rocks with similar characteristics and genesis types as a type of oil source; each type of oil source must contain at least dozens of corresponding biomarker data of potential source rock extracts, and the biomarker data of potential source rock extracts come from different strata of potential source rocks.
[0073] S102, classify the biomarker data of source rock extracts based on the petroleum geological conditions and sample quantity in the study area;
[0074] S103, based on the sample collection layer and in combination with the determined classification category of the biomarker data of the source rock extract, label the biomarker data of each potential source rock extract to construct a potential source rock biomarker data set for supervised learning.
[0075] Different types of rock groups are divided into different strata, and the biomarker parameters of shale extract samples from different layers of potential source rocks in different strata are collected as potential source rock biomarker data sets.
[0076] After constructing the potential source rock biomarker data set for supervised learning, the method further includes normalizing the constructed potential source rock biomarker data set;
[0077]
[0078] Where x and x′ represent the original data and the normalized data, respectively, and min(x) and max(x) represent the minimum and maximum values in a set of elements to be normalized, respectively.
[0079] S104, build a random forest model.
[0080] The random forest model includes an input layer, a decision tree layer, a voting layer and an output layer; the input layer is used to receive the input biomarker data and extract a training set from the normalized N sample data sets; in each round, n training samples are extracted from the sample set using a random sampling method with replacement. In the training set, some samples may be extracted multiple times, while some samples may not be extracted once; a total of k rounds of extraction are performed to obtain k training sets; the k training sets are independent of each other; in each training set, different sample numbers are expected to meet the following requirements:
[0081] E(x)=N(1-en / N)
[0082] Each time a training set is used to obtain a decision tree layer model, k training sets will obtain a total of k decision tree layer models;
[0083] The decision tree layer model construction uses decision tree ID3, decision tree C4.5 and decision tree CART algorithms; the decision tree ID3 algorithm uses information gain to measure attribute selection, and selects the biomarker attribute with the largest information gain after splitting for splitting;
[0084] Let D be the division of the training tuples by the output categories, where pi represents the probability of the i-th category appearing in the entire training tuple, then the entropy of D is expressed as:
[0085]
[0086] The training tuple D is divided according to the attribute of biomarker A, and the expected information of A on D is:
[0087]
[0088] Therefore, the information gain is the difference between the two:
[0089] gain(A)=info(D)-infoA(D)
[0090] The ID3 decision tree algorithm "greedily" selects the biomarker attribute with the largest information gain as the attribute for this division at each split; the greater the information gain, the greater the "purity" of the biomarker attribute division; each split will make the tree grow one level higher.
[0091] The C4.5 decision tree algorithm uses the information gain rate as the splitting metric, and selects the biomarker attribute with the largest information gain rate as the current splitting attribute at each split;
[0092] The C4.5 algorithm defines split information, expressed as:
[0093]
[0094] Information gain rate:
[0095]
[0096] The C4.5 decision tree algorithm uses information gain rate as the splitting metric, and selects the biomarker attribute with the largest information gain rate as the splitting attribute each time.
[0097] The decision tree CART algorithm uses the Gini index to select the best data segmentation attribute.
[0098] There are k training sets of samples in total, so the probability that a random sample point belongs to the kth class is p k , then the Gini index of the probability distribution is:
[0099]
[0100] The Gini index indicates the probability of a randomly selected sample in a sample set being misclassified; when selecting features in a decision tree, the attribute with the largest Gini index gain value is selected as the node splitting condition;
[0101] If the sample set D is divided into two parts D1 and D2 according to whether the biomarker attribute X takes a certain possible value a, as follows:
[0102] D1={(x,y)∈DX(x)=a},D2=D-D1
[0103] Then, under the condition of biomarker attribute X, the GIni index of set D is:
[0104]
[0105] When constructing the decision tree, the remaining biomarker attributes are calculated separately according to the calculation method of the Gini index of the biomarker attribute, and the decision tree is constructed iteratively.
[0106] The voting layer obtains the final result based on the votes of all decision trees; the output layer outputs the data processed by the random forest model.
[0107] S105, training and optimizing the random forest model based on the potential source rock biomarker data set, obtaining the classification accuracy of different layers in the test set, and then obtaining the optimized random forest model.
[0108] The potential source rock data set is divided into a training set and a test set at a ratio of 70% and 30%; it is judged whether the number of cycles of the random forest model reaches the set maximum threshold, or whether the loss function exceeds the minimum threshold, if the number of cycles reaches the set maximum threshold, or the loss function does not exceed the minimum threshold, then the trained random forest model is obtained; the test set is input into the trained random forest model, the classification accuracy in different layers in the test set is compared, and the optimized random forest model is obtained.
[0109] S106, predicting the biomarker parameters of the sandstone extract and crude oil based on the optimized random forest model, and obtaining the oil source stratum results of the crude oil and sandstone extract samples.
[0110] Example: Take the source of crude oil in the A layer and oil sand in the B layer in a block on the western edge of the Ordos Basin as an example:
[0111] Step 1: Collect saturated hydrocarbon chromatography-mass spectrometry (biomarker parameters) data of potential source rock extracts, sandstone extracts and crude oil from the target strata (Yanghugou Formation and Ulalike Formation) in a block on the western edge of the Ordos Basin.
[0112] Step 2: Based on the petroleum geological conditions and sample quantity of a block in the western margin of the Ordos Basin, the potential oil sources are classified as shown in Table 1.
[0113] The Yanghugou Formation is a Carboniferous-Permian marine-continental transitional source rock, and the Uralik Formation is an Ordovician marine source rock. The source rocks (coal and mudstone) of the Yanghugou Formation and the mudstone of the Uralik Formation are classified. The source rocks of the Yanghugou Formation are regarded as the A stratum, and the source rocks of the Uralik Formation are regarded as the B stratum. The following is a distinction between the "oil source" of the A stratum and the "oil source" of the B stratum, and then analyzed. The 31 biomarker parameters of 42 relevant stratum shale extract samples were used as training data.
[0114] Table 1 Classification scheme of source rocks
[0115]
[0116] Step 3: Based on the sample collection layer and the determined oil source classification scheme, label the biomarker data of each potential source rock extract and construct a data set suitable for supervised learning; as shown in Tables 2 and 3.
[0117] Table 2 Constructed learning data set (part)
[0118]
[0119] Table 3 Constructed test data set
[0120]
[0121] Step 4: Build a random forest model based on Python programming and artificial intelligence libraries such as Keras and sklearn. Figure 2 As shown in the figure, the random forest model was constructed and trained by taking the biomarker parameters of the shale extract samples from the relevant layers as training data.
[0122] As a highly sensitive machine learning algorithm, random forest is a supervised learning method that integrates multiple decision trees through the bagging ensemble learning method and obtains the final result based on the votes of all decision trees. Figure 3 As shown in (a), Figure 3The false positive rate in (a) represents the ratio of the number of negative samples predicted as positive to the number of negative samples in the model; the true positive rate represents the ratio of the number of positive samples predicted as positive to the number of positive samples in the model. The random forest model has the characteristics of high precision / good generalization and strong robustness, and can effectively suppress overfitting, and has been widely used in classification and regression problems.
[0123] The model consists of four parts: input layer, decision tree layer, voting layer, and output layer. The input layer is used to receive the input biomarker data and extract the training set from the normalized N sample data sets. In each round, n training samples are extracted from the sample set using random sampling with replacement (in the training set, some samples may be extracted multiple times, while some samples may not be extracted once). A total of k rounds of extraction are performed to obtain k training sets (the k training sets are independent of each other). In each training set, the expectation of different sample numbers satisfies the following property:
[0124] E(x)=N(1-en / N)
[0125] like Figure 3 As shown in (b), a decision tree model is obtained by using one training set each time, and a total of k decision tree models are obtained by using k training sets. The decision tree layer model construction uses three decision tree analysis algorithms: ID3, C4.5 and CART algorithms.
[0126] The core idea of the decision tree ID3 algorithm is to use information gain to measure attribute selection and select the biomarker attribute with the largest information gain after splitting. Let D be the output category for the division of the training tuple, where pi represents the probability of the i-th category appearing in the entire training tuple, then the entropy of D is expressed as:
[0127]
[0128] The training tuple D is divided according to the attribute of biomarker A, and the expected information of A on D is:
[0129]
[0130] Therefore, the information gain is the difference between the two:
[0131] gain(A)=info(D)-infoA(D)
[0132] The ID3 decision tree algorithm uses the above information gain. At each split, it "greedily" selects the biomarker attribute with the largest information gain as the attribute for this split. The greater the information gain, the greater the "purity" of the split using the biomarker attribute. Each split will make the tree grow one level higher. In this way, a decision tree can be constructed step by step.
[0133] The core idea of the decision tree C4.5 algorithm is to use the information gain rate as a metric based on the ID3 algorithm.
[0134] The C4.5 algorithm defines split information, expressed as:
[0135]
[0136] Information gain rate:
[0137]
[0138] The C4.5 decision tree algorithm uses the above-mentioned information gain rate as the splitting metric, and selects the biomarker attribute with the largest information gain rate as the splitting attribute at each split.
[0139] The decision tree CART algorithm mainly uses the Gini index to select the best data segmentation attribute. There are k training sets of samples, and the probability that a random sample point belongs to the kth class is p k , then the Gini index of the probability distribution is:
[0140]
[0141] The Gini index indicates the probability of a randomly selected sample in a sample set being misclassified. The smaller the Gini index, the smaller the probability of the selected sample in the set being misclassified, that is, the higher the purity of the set, and vice versa. When selecting features in a decision tree, the attribute with the largest Gini index gain value should be selected as the node splitting condition.
[0142] If the sample set D is divided into two parts D1 and D2 according to whether the biomarker attribute X takes a certain possible value a, as follows:
[0143] D1={(x,y)∈D|X(x)=a}, D2=D-D1
[0144] Then, under the condition of biomarker attribute X, the GIni index of set D is:
[0145]
[0146] When constructing the decision tree, the remaining biomarker attributes are calculated separately according to the calculation method of the Gini index of the biomarker attribute, and the decision tree is constructed iteratively to generate regular and efficient classification rules for source rocks.
[0147] like Figure 4 As shown, the compiled model is:
[0148] model.compile(loss='mae',optimizer=tensorflow.keras.optimizers.Adagrad(learning_rate=LEARNING_RATE),metrics=[coeff_determination])
[0149] Step 5: The above random forest model is trained by constructing a potential source rock biomarker dataset with oil source classification labels, as shown in Table 2. The number of cycles is set to 10,000 and the learning rate is 0.001. The data in Table 3 is used as a test of the model accuracy.
[0150] Taking the A-layer "oil source" and the B-layer "oil source" as the distinction, 31 biomarker parameters of 42 relevant stratum shale extract samples were used as training data. As shown in Table 4, the deep neural network model constructed and trained has a classification accuracy of 76.5% and 72.7% for the A-layer "oil source" and the B-layer "oil source", respectively, and the total accuracy is 74.9%, which is relatively ideal. Figure 5 shown.
[0151] Table 4 Biomarker parameters as characteristic data variables
[0152]
[0153] The trained random forest model can be used to predict the oil source of crude oil and sandstone extract samples. From the prediction results of some samples, as shown in Table 5, the prediction results of the A-layer crude oil samples are all "A-layer oil source", reflecting its geochemical characteristics of "self-generation and self-storage"; while the oil source prediction results of the B-layer oil-bearing sandstone samples are partly "B-layer oil source" and partly "A-layer oil source", reflecting its geochemical characteristics of the possible mixture of hydrocarbon generation products of two sets of source rocks.
[0154] Table 5 Prediction results of the trained random forest oil source classification model for actual crude oil and sandstone extract samples
[0155]
[0156] Compared with the existing methods, the oil source comparison results obtained by the above implementation scheme have better certainty. For example, through the parameter plate method, it can be seen that different types of parameter plates reflect inconsistent oil source information, such as Figure 5 and Figure 6 As shown, for example Figure 5 The samples of the A and B layers show different characteristics. Figure 6The samples of the A and B layers show similar characteristics, so the oil source correlation results obtained are multi-solution and cannot meet the needs of exploration and production.
[0157] See also Figure 7 The present invention discloses an oil source comparison system based on a random forest model, comprising:
[0158] A collection module, which collects biomarker parameters of potential source rock extracts, sandstone extracts and crude oil in target layers of the study area;
[0159] A classification module, wherein the classification module classifies the biomarker data of the source rock extract based on the petroleum geological conditions and the number of samples in the study area;
[0160] A construction module, wherein the construction module assigns labels to the biomarker data of each potential source rock extract based on the sample collection layer and the determined classification category of the biomarker data of the source rock extract, and constructs a potential source rock biomarker data set for supervised learning;
[0161] A building module, wherein the building module builds a random forest model;
[0162] A first acquisition module, which trains and optimizes the random forest model based on the potential source rock biomarker data set, obtains the classification accuracy of different layers in the test set, and then obtains the optimized random forest model;
[0163] The second acquisition module predicts the biomarker parameters of the sandstone extract and crude oil based on the optimized random forest model to obtain the oil source stratum results of the crude oil and sandstone extract samples.
[0164] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. The oil source comparison method based on the random forest model is characterized by: include: Collect biomarker parameters of potential source rock extracts, sandstone extracts and crude oil in the target strata of the study area; Based on the petroleum geological conditions and sample quantity of the study area, the biomarker data of source rock extracts were classified; Based on the sample collection layer and the determined classification categories of biomarker data of source rock extracts, labels are assigned to the biomarker data of each potential source rock extract to construct a potential source rock biomarker dataset for supervised learning. Build a random forest model; The random forest model is trained and optimized based on the potential source rock biomarker data set to obtain the classification accuracy of different layers in the test set, and then the optimized random forest model is obtained; The biomarker parameters of sandstone extracts and crude oil are predicted based on the optimized random forest model to obtain the oil source stratum results of crude oil and sandstone extract samples.
2. The oil source comparison method based on the random forest model according to claim 1, characterized in that: The potential source rock extracts of the target strata in the study area are specifically as follows: each set of potential source rocks is regarded as a type of oil source, and there are also multiple sets of source rocks with similar characteristics and genesis types as a type of oil source; each type of oil source must contain at least dozens of corresponding biomarker data of potential source rock extracts, and the biomarker data of potential source rock extracts come from different strata of potential source rocks.
3. The oil source comparison method based on the random forest model according to claim 2, characterized in that: The construction of the potential source rock biomarker dataset for supervised learning is specifically: different types of rock groups are divided into different strata, and biomarker parameters of shale extract samples at different levels of potential source rocks in different strata are collected as the potential source rock biomarker dataset.
4. The oil source comparison method based on the random forest model according to claim 3, characterized in that: After constructing the potential source rock biomarker data set for supervised learning, the method further includes normalizing the constructed potential source rock biomarker data set; Among them, x and x ′ They represent the original data and the normalized data respectively, min() and max(x) represent the minimum and maximum values in a set of elements waiting for normalization.
5. The oil source comparison method based on the random forest model according to claim 4, characterized in that: The random forest model is constructed as follows: The random forest model includes an input layer, a decision tree layer, a voting layer and an output layer; the input layer is used to receive the input biomarker data and extract a training set from the normalized N sample data sets; in each round, n training samples are extracted from the sample set using a random sampling method with replacement. In the training set, some samples may be extracted multiple times, while some samples may not be extracted once; a total of k rounds of extraction are performed to obtain k training sets; the k training sets are independent of each other; in each training set, different sample numbers are expected to meet the following requirements: E(x)=(1-e -n / ) Each time a training set is used to obtain a decision tree layer model, k training sets will obtain a total of k decision tree layer models; The decision tree layer model construction uses decision tree ID3, decision tree C4.5 and decision tree CART algorithms; the decision tree ID3 algorithm uses information gain to measure attribute selection, and selects the biomarker attribute with the largest information gain after splitting for splitting; the C4.5 decision tree algorithm uses information gain rate as the splitting division metric, and selects the biomarker attribute with the largest information gain rate as the current splitting attribute at each split; The decision tree CART algorithm uses the Gini index to select the best data segmentation attribute; The voting layer obtains the final result by voting according to all decision trees; The output layer outputs the data processed by the random forest model.
6. The oil source comparison method based on the random forest model according to claim 5, characterized in that: The decision tree ID3 algorithm uses information gain to measure attribute selection, and selects the biomarker attribute with the largest information gain after splitting for splitting. Specifically, let D be the output category for the division of the training tuple, where pi represents the probability of the i-th category appearing in the entire training tuple, and the entropy of D is expressed as: The training tuple D is divided according to the attribute of biomarker A, and the expected information of A on D is: Therefore, the information gain is the difference between the two: gain()=info()-infoA(D) The ID3 decision tree algorithm "greedily" selects the biomarker attribute with the largest information gain as the attribute for this division at each split; The greater the information gain, the greater the improvement in the "purity" of the biomarker attribute classification; Each split makes the tree grow one level taller.
7. The oil source comparison method based on random forest model according to claim 6, characterized in that: The C4.5 decision tree algorithm uses the information gain rate as the splitting metric, and selects the biomarker attribute with the largest information gain rate as the current splitting attribute at each split, specifically: The C4.5 algorithm defines split information, expressed as: Information gain rate: The C4.5 decision tree algorithm uses information gain rate as the splitting metric, and selects the biomarker attribute with the largest information gain rate as the splitting attribute each time.
8. The oil source comparison method based on random forest model according to claim 7, characterized in that: The decision tree CART algorithm uses the Gini index to select the best data segmentation attribute. Specifically, if there are k training sets of samples, the probability that a random sample point belongs to the kth class is p k , then the Gini index of the probability distribution is: The Gini index indicates the probability of a randomly selected sample in a sample set being misclassified; when selecting features in a decision tree, the attribute with the largest Gini index gain value is selected as the node splitting condition; If the sample set D is divided into two parts D1 and D2 according to whether the biomarker attribute X takes a certain possible value a, as follows: D1={(x,y)∈D|X(x)=},2=-D1 Then, under the condition of biomarker attribute X, the GIni index of set D is: When constructing the decision tree, the remaining biomarker attributes are calculated separately according to the calculation method of the Gini index of the biomarker attribute, and the decision tree is constructed iteratively.
9. The oil source comparison method based on random forest model according to claim 8, characterized in that: The method of obtaining the classification accuracy of different layers in the test set and then obtaining the optimized random forest model is specifically as follows: the potential source rock data set is divided into a training set and a test set according to a ratio of 70% and 30%; it is determined whether the number of cycles of the random forest model reaches a set maximum threshold, or whether the loss function exceeds a minimum threshold, if the number of cycles reaches the set maximum threshold, or the loss function does not exceed the minimum threshold, then the trained random forest model is obtained; the test set is input into the trained random forest model, the classification accuracy of different layers in the test set is compared, and the optimized random forest model is obtained.
10. The oil source comparison system based on the random forest model is characterized by: include: A collection module, which collects biomarker parameters of potential source rock extracts, sandstone extracts and crude oil in the target layer of the study area; A classification module, wherein the classification module classifies the biomarker data of the source rock extract based on the petroleum geological conditions and the number of samples in the study area; A construction module, wherein the construction module assigns labels to the biomarker data of each potential source rock extract based on the sample collection layer and the determined classification category of the biomarker data of the source rock extract, and constructs a potential source rock biomarker data set for supervised learning; A building module, wherein the building module builds a random forest model; A first acquisition module, which trains and optimizes the random forest model based on the potential source rock biomarker data set, obtains the classification accuracy of different layers in the test set, and then obtains the optimized random forest model; The second acquisition module predicts the biomarker parameters of the sandstone extract and crude oil based on the optimized random forest model to obtain the oil source stratum results of the crude oil and sandstone extract samples.