Fluid production profile dynamic interpretation method based on microorganism DNA sequencing diagnosis
By sequencing the rock chips and liquid production samples, establishing the formation baseline and liquid production traceability map, the problem of the need to stop production, take time and cost in the existing technology, and achieving high efficiency for the reservoir. Continuous dynamic monitoring.
Patent Information
- Application Number
- CN202411234121.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2025-02-11
AI Technical Summary
The existing liquid production profile testing technology has the problem that production needs to be stopped during testing, the operation steps are complicated, time-consuming, high cost, and cannot be continuously monitored for a long time.
The dynamic interpretation method of liquid production profile based on microbial DNA sequencing diagnosis is adopted. By sequencing the rock cutting samples and liquid production samples, the formation baseline map and liquid production traceability map are established to achieve long-term dynamic monitoring of the reservoir.
Dynamic monitoring without stopping production is realized, operating steps are simplified, costs are reduced, and continuous monitoring can be achieved for a long time, improving the efficiency of dynamic reservoir management.
Smart Images

Figure CN119418769A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of petroleum exploration and production, and in particular to a method for dynamic interpretation of a liquid production profile based on microbial DNA sequencing diagnosis. Background Art
[0002] Liquid production profile logging technology is one of the most important and key technical means in the current oil drilling industry, which will directly affect the quality and efficiency of oil production.
[0003] The production fluid profile logging technology is an important technology in the production logging process. At present, the more mature production fluid profile testing technologies at home and abroad are as follows:
[0004] The production profile test is carried out using instrument testing tools such as MAPS array logging instruments and crawlers, but there are problems such as difficulty in entering the well, the need to stop production, and high testing costs.
[0005] The fiber optic temperature and pressure testing method is used, but this method has the problems of difficulty in long-term monitoring, high cost, great difficulty in construction and difficulty in data interpretation.
[0006] The method of using trace material tracers to test the fluid production profile selects elements with extremely small content in the formation fluid as markers to study and analyze the fluid production of each layer. This method is simple, convenient and practical, but the optimization of tracers, testing technology and data interpretation are still imperfect and need further research.
[0007] The preset production profile test technology is adopted. This technology uses a crawler to transport the downhole instrument to the measuring well section, and combines the test instrument to achieve the purpose of production profile testing. The preset type has no requirements for well inclination and can accurately reflect the reservoir production situation, but the operation time is long and the production investment is large.
[0008] In summary, the existing production profile testing technology has problems such as the need to stop production during the test, complicated operation steps, long time consumption, high cost, and inability to conduct long-term continuous monitoring. Summary of the invention
[0009] The purpose of the present invention is to provide a method for dynamic interpretation of liquid production profiles based on microbial DNA sequencing diagnosis, so as to solve the problems that the existing liquid production profile testing technology needs to stop production during testing, the operation steps are complicated, time-consuming, costly, and cannot be continuously monitored for a long time.
[0010] In order to solve the above technical problems, the present invention specifically provides a method for dynamic interpretation of liquid production profile based on microbial DNA sequencing diagnosis, comprising the following steps:
[0011] Collect rock cuttings samples;
[0012] Processing the rock cuttings sample to obtain the DNA sequence of the rock cuttings sample;
[0013] Based on the DNA sequences of rock cuttings samples, a stratigraphic baseline map is obtained that can show the bacterial species and their abundance in the strata at different depths;
[0014] Collecting production liquid samples, and performing DNA sequencing on the industrial samples to obtain the bacterial species and bacterial species abundance contained in the production liquid;
[0015] Based on the DNA sequencing results of the production fluid, the production fluid is traced through the clustering method to trace the probability that the production fluid comes from each stratum;
[0016] By sampling, DNA sequencing and tracing the produced fluids at different stages, effective long-term dynamic monitoring of the reservoir can be achieved.
[0017] As a preferred embodiment of the present invention, the method for tracing the source of the produced fluid is a naive Bayes classification method, a random forest classification method or a Bp neural network classification method.
[0018] As a preferred embodiment of the present invention, the naive Bayes classification method is used to trace the source of the produced fluid, comprising the following steps:
[0019] Using different bacterial species and their abundance as variables, a naive Bayes classifier capable of distinguishing different strata was generated;
[0020] The sequencing result data of each rock chip sample of the naive Bayes classifier is represented by an N-dimensional feature vector X = {x 1 , x 2 , ..., x n}, thus describing the characteristic bacterial species attributes of n samples, and each category is labeled C = {c 1 , c 2 , ..., c m};
[0021] Select a set of rock cuttings sample data X, use the naive Bayes classification method to classify the rock cuttings sample X with the maximum posterior probability, and assign the unknown samples to category c;
[0022] If and only if i≠j, P(c i |X)>P(c j |X), we only need to calculate the maximum P(C i ∣X), the calculation process is as follows:
[0023]
[0024] In the formula, P(c i |X) represents the sample characteristic strain attribute C under the condition that the N-dimensional feature vector X of the sample sequencing result occurs. iThe probability of occurrence; P(X|c i ) represents the probability of the N-dimensional feature vector X of the sample sequencing result occurring under the condition that the sample characteristic strain attribute Ci occurs; P(c i ) represents the prior probability of the characteristic bacterial species attribute of each sample; P(X) represents the prior probability of the occurrence of the sequencing result of each sample;
[0025] Assuming that there is no interdependence between the strains, maximize P(X|c i )P(c i ),but:
[0026]
[0027] Among them, p(x k ∣c i ) indicates that the characteristic bacterial species attribute C i Under the condition that the occurrence of k represents the probability of the kth event occurring;
[0028] The maximum likelihood estimation is calculated as follows:
[0029]
[0030] Among them, |T(c i )| represents class C i The number of training samples in, |T| represents the total number of training samples, |T(x k , c i )| means in attribute A k has value x k Class C i The number of training samples.
[0031] As a preferred solution of the present invention, the source of the produced liquid is traced using the random forest classification method, comprising the following steps:
[0032] The training set was extracted from the original rock fragment sequencing result sample set. In each round, n training samples were extracted from the sample set. The Bootstraping sampling method was used for sampling. A total of k samples were collected, thus obtaining k independent training sets.
[0033] Each time a training set is used to obtain a model, k training sets are used to obtain a total of k models;
[0034] The k models obtained in the previous step are voted to obtain the classification result.
[0035] As a preferred solution of the present invention, the method of tracing the source of the produced liquid using the Bp neural network method is as follows:
[0036] The input layer is the sequencing data of the formation baseline, the hidden layer is the new clustering result, and the output layer is the probability that the produced fluid comes from each formation;
[0037] The output of the hidden layer is set to F j , the output of the output layer is set to O k , the system's activation function is set to G, and the learning rate is set to β, then the three layers have the following mathematical relationship:
[0038] T k represents the expected output of the system, and E represents the error of the system, which is expressed by the variance between the actual output value and the expected target value. The relationship expression is as follows:
[0039]
[0040] Wherein, i=1, 2, ..., m; k=1, 2, ..., n;
[0041] F j represents the net output of the Bp neural network at the jth neuron, ω ij Represents the connection weight coefficient between hidden layers, x i represents the input from neuron i, O k is the output of the defined output layer, ω jk represents the connection weight coefficient between the hidden layer and the output layer, a j and b k is the threshold, E is the error of the defined learning sample, T k is the expected value of the defined system, e k represents the error of the kth sample;
[0042] The formula for obtaining system weights and biases using the gradient descent principle is as follows:
[0043]
[0044] e k =T k -O k .
[0045] As a preferred solution of the present invention, by comparing the accuracy, precision, recall rate, F-measure, ROC curve, and AUC value of each algorithm, the algorithm with the highest tracing accuracy is selected from the naive Bayesian classification method, the random forest classification method, and the Bp neural network classification method;
[0046] The accuracy rate indicates the proportion of the total number of samples where the actual source of liquid production is the same as the predicted source of liquid production to the predicted source of liquid production. The expression is as follows:
[0047]
[0048] Among them, TP represents a true positive example, TN represents a true negative example, FP represents a false positive example, and FN represents a false negative example;
[0049] Precision represents the ratio of the number of samples that are actually 1 to the number of samples that are predicted to be 1. The expression is as follows:
[0050]
[0051] The recall rate indicates the proportion of the total number of samples whose actual source of production fluid is the same as the predicted source of production fluid to the actual source of production fluid. The expression is as follows:
[0052]
[0053] F-measure represents the balance between precision and recall, and its expression is as follows:
[0054]
[0055] The ROC curve describes the receiver operating characteristic curve by measuring the changing trend of the true positive rate on the ordinate over the false positive rate on the abscissa. The area under the ROC curve can be used to describe the prediction accuracy, which is called AUC. The larger the area under the ROC curve, the larger the AUC value, indicating a higher prediction accuracy. At the same time, the smaller the horizontal axis of the ROC curve and the larger the vertical axis, the higher the prediction accuracy.
[0056] As a preferred solution of the present invention, after comparing the accuracy, precision, recall rate, F-measure, ROC curve, and AUC value of each algorithm, the random forest classification method has the highest tracing accuracy;
[0057] The random tree is improved by weighting the leaf nodes through the PSO algorithm, thereby improving the classification performance of the random tree to solve the problem of overfitting of the decision tree when selecting samples and feature values.
[0058] As a preferred solution of the present invention, the PSO algorithm is optimized so that the weight values of the leaf nodes of each decision tree in the random forest are different, and the particle speed and position are set to perform adaptive optimization, thereby achieving the purpose of improving the classification ability.
[0059] As a preferred solution of the present invention, when using the random forest algorithm to trace the source stratum of the liquid-producing strain, the importance of the features is calculated, and the factors with the lowest importance are deleted;
[0060] The above process is repeated in each iteration until the importance of the factor features is greater than the threshold of the feature weight coefficient;
[0061] The feature selection process can reduce the impact of irrelevant features in the data, significantly reduce running time, prevent model overfitting, enhance the classification ability of the random forest algorithm, improve accuracy, and improve the problem of poor classification results caused by too many features.
[0062] As a preferred solution of the present invention, after sequencing the rock cuttings sample, the rock cuttings sample sequencing result data is standardized and calculated to eliminate the influence of the dimension on the variable data. The calculation formula is as follows:
[0063]
[0064] Where n is the number of samples and m is the number of variables;
[0065] The purpose of the normalization formula is to transform the original data x i f is converted to a value between 0 and 1 This transformation is done by subtracting the minimum value of the feature from the original value and then dividing by the data range R of the feature. j to achieve.
[0066] Represents the standardized value, which is the original data point x if The result is converted by a specific standardization method.
[0067] i: represents the index of the sample or observation, which can be considered as the row index in the data set, representing the i-th sample.
[0068] j: represents the index of the feature or variable, which can be considered as the column index in the data set, representing the jth feature.
[0069] Specifically:
[0070] x if : Represents the original value of the i-th sample on the j-th feature.
[0071] Represents the minimum value of all samples on the jth feature.
[0072] Compared with the prior art, the present invention has the following beneficial effects:
[0073] The method for dynamic monitoring and interpretation of production profiles based on microbial DNA sequencing diagnosis provided by the present invention obtains microbial formation baselines of high-resolution characteristics of different formations by sampling and DNA sequencing of rock cuttings of different well types, and then achieves long-term and effective dynamic monitoring of oil reservoirs by sampling, DNA sequencing and clustering of production fluids at different stages. In addition, production does not need to be stopped during the sampling process, the operation steps are simple, time-consuming and cost-effective. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0075] Figure 1 This is a flow chart of the origin of the liquid-producing strains in the embodiment of the present invention;
[0076] Figure 2 This is a detailed decomposition diagram of the steps for tracing the origin of the liquid-producing strains in the embodiment of the present invention;
[0077] Figure 3 It is the sample data interpretation and clustering model in the embodiment of the present invention;
[0078] Figure 4 is a network diagram of a naive Bayes classifier in an embodiment of the present invention;
[0079] Figure 5 A network diagram of a random forest classifier in an embodiment of the present invention;
[0080] Figure 6 A network diagram of a neural network classifier in an embodiment of the present invention;
[0081] Figure 7 This is a heat map of bacterial species correlation in the embodiment of the present invention;
[0082] Figure 8 A bar chart showing the importance of each bacterial species in the embodiments of the present invention;
[0083] Fig. 9 A sensitivity comparison diagram of three tracing algorithm parameters in an embodiment of the present invention;
[0084] Fig.10 This is a ROC comparison chart of three tracing algorithms in an embodiment of the present invention;
[0085] Fig.11 A comparison diagram of the tracing accuracy of three tracing algorithms in vertical wells and horizontal wells in an embodiment of the present invention;
[0086] Fig.12 A comparison diagram of the tracing time of three tracing algorithms in vertical wells and horizontal wells in an embodiment of the present invention;
[0087] Fig.13 This is a cross-sectional view of the liquid production for 5 months in the embodiment of the present invention;
[0088] Fig.14 It is the stratigraphic baseline map in the embodiment of the present invention. DETAILED DESCRIPTION
[0089] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. 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.
[0090] like Figure 1 As shown, the present invention specifically provides a method for dynamic interpretation of liquid production profiles based on microbial DNA sequencing diagnosis. By sampling and DNA sequencing of liquid production and cuttings of different well types, microbial stratigraphic baselines of high-resolution characteristics of different strata are obtained. By comparing the accuracy, precision, recall rate, F1-score, and calculation time of three clustering methods, namely, naive Bayes, random forest, and bp neural network, the random forest algorithm is optimized and improved, and a liquid production profile interpretation model based on the PSO-random forest algorithm of the formation and liquid production strain characteristics is constructed, which can accurately describe the liquid production profile of each stratum. The liquid production profile interpretation method has high calculation accuracy, short time consumption, and the test process does not need to stop production, is simple to operate, and does not pollute the stratum. At the same time, by sampling the liquid production at different stages, the purpose of long-term and effective dynamic monitoring of the reservoir can be achieved.
[0091] The following steps are involved:
[0092] Collect rock cuttings samples;
[0093] Processing the rock cuttings sample to obtain the DNA sequence of the rock cuttings sample;
[0094] Based on the DNA sequences of the rock cuttings samples, a stratigraphic baseline map was obtained that can show the species and abundance of bacteria in different depths. The results of establishing the stratigraphic baseline are shown in the figure below. Fig.14 As shown;
[0095] Collect the produced liquid samples and perform DNA sequencing on them to obtain the bacterial species and abundance contained in the produced liquid;
[0096] Based on the DNA sequencing results of the produced liquid samples, the bacterial species contained in the produced liquid were traced to trace the probability that the produced liquid originated from each stratum;
[0097] By sampling, DNA sequencing and clustering the produced fluid at different stages, long-term and effective dynamic monitoring of the reservoir can be achieved. Specifically, the produced fluid is sampled once every 15 days and twice a month.
[0098] By sampling and DNA sequencing the cuttings of different well types, we can obtain the microbial stratigraphic baselines with high-resolution characteristics of different formations. Then, by sampling, DNA sequencing and clustering the produced fluids at different stages, we can achieve long-term and effective dynamic monitoring of the reservoir. In addition, there is no need to stop production during the sampling process, and the operation steps are simple, time-saving and cost-effective.
[0099] Specifically, the method for collecting rock cuttings samples is as follows:
[0100] Collecting cuttings from shaker screens at the wellhead;
[0101] Samples were collected every 3 meters in vertical wells and every 7 meters in horizontal wells, with approximately 7 samples collected in each layer;
[0102] Rock cuttings samples are collected in sterile bags, which are marked with the corresponding sampling well name, sampling time, and formation depth;
[0103] Each sterile bag contains 50-200 grams of rock chips.
[0104] There is no need to deploy downhole tools during the sampling process, and sample collection will not cause the drilling rig to stop working, and there is no pollution or damage to the background concentration of the formation.
[0105] Specifically, the method for processing rock cuttings is:
[0106] The cuttings were sized and those with a diameter of 1 to 3 cm were retained;
[0107] The retained rock cuttings were cleaned and ground into fine powder and collected in a conical flask;
[0108] Filter the sample twice, cut the filter paper into pieces, centrifuge it 4 times, and take the supernatant;
[0109] Filter the supernatant with a filter membrane to concentrate the bacterial solution;
[0110] The mixed solution was centrifuged at 12000 rpm / min for 15 min. The bacterial precipitate after centrifugation was refrigerated until extraction.
[0111] Cell disruption: Cell disruption or tissue lysis to destroy the cell membrane and cell wall and release DNA. The methods include mechanical methods (such as mortar grinding), chemical methods (such as lysis solution) and enzymatic methods (such as protease, proteinase K);
[0112] DNA elution: Elute the magnetic beads with elution buffer to dissociate the DNA from the magnetic beads;
[0113] DNA precipitation: The eluted DNA solution is subjected to ethanol precipitation to precipitate the DNA precipitate.
[0114] DNA dissolution: dissolve the DNA precipitate in an appropriate buffer to obtain a pure cuttings DNA solution;
[0115] Quality testing: The quality and concentration of the extracted DNA are tested by UV spectrophotometer or gel electrophoresis;
[0116] PCR amplification: V4 variable region, the template DNA is heated to about 95°C, the double-stranded DNA dissociates into single strands, at about 55°C, the primers and the template DNA single strands complement each other, and when heated to 72°C, this is the optimal temperature for DNA polymerase activity, and the hybridized primers at this temperature are extended;
[0117] DNA sequencing: High-throughput sequencing technology is used to sequence the samples to obtain DNA sequences.
[0118] Specifically, the sampling method of the produced liquid is:
[0119] Collect the produced fluid from the wellhead and store the collected liquid samples in sterile conical bottles;
[0120] The volume of liquid contained in each bottle is 23 to 45 ml, and no more than 70 ml is collected from each sample;
[0121] The produced liquid is cooled immediately after sampling to reduce microbial complexity, and the cooling temperature is close to -80℃.
[0122] Furthermore, the sample data interpretation and clustering model are as follows Figure 3 As shown in the figure, before clustering the liquid, the DNA sequencing results of the samples must first be converted into a matrix. The column vectors of each matrix represent each layer, and the row vectors represent the characteristics of the bacterial species contained in each layer. By clustering the sample data using three methods, random forest, Bp neural network, and naive Bayes, a new level is obtained. Then, clustering is performed based on the bacterial species contained in the liquid sequencing results, and the probability of tracing back to each layer is used.
[0123] The method for clustering the bacterial species and abundance contained in the production liquid is the naive Bayes classification method, the random forest classification method or the Bp neural network classification method;
[0124] Naive Bayesian classification: A simple probabilistic classifier based on Bayesian theorem. The necessary condition is that the features are independent of each other. Using different bacterial species and their abundance as variables, a naive Bayesian classifier that can distinguish different strata is generated. The network diagram is as follows: Figure 4 shown.
[0125] The sequencing result data of each rock chip sample of the naive Bayes classifier is represented by an N-dimensional feature vector X = {x 1 , x 2 , ..., x n}, thus describing the characteristic bacterial species attributes of n samples, and each category is labeled C = {c 1 , c 2 , ..., c m};
[0126] Select a set of rock cuttings sample data X, use the naive Bayes classification method to classify the rock cuttings sample X with the maximum posterior probability (under condition X), and assign the unknown samples to category c;
[0127] If and only if i≠j, P(c i |X)>P(c j |X), so we only need to calculate the maximum P(C i The calculation process of |X) is as follows:
[0128] According to Bayes' theorem:
[0129]
[0130] In the formula, P(c i |X) represents the sample characteristic strain attribute C under the condition that the N-dimensional feature vector X of the sample sequencing result occurs. i The probability of occurrence; P(X|c i ) represents the probability of the N-dimensional feature vector X of the sample sequencing result occurring under the condition that the sample characteristic strain attribute Ci occurs; P(c i ) represents the prior probability of the characteristic bacterial species attribute of each sample; P(X) represents the prior probability of the occurrence of the sequencing result of each sample;
[0131] Assuming that there is no interdependence between the strains, that is, the strains are conditionally independent of each other, maximize P(X|c i )P(c i ),so:
[0132]
[0133] Among them, p(x k ∣c i ) indicates that the characteristic bacterial species attribute C i Under the condition that the occurrence of k represents the probability of the kth event occurring;
[0134] Based on the maximum likelihood estimation, it is calculated as follows:
[0135]
[0136] Among them, |T(c i )| represents class C i The number of training samples in, |T| represents the total number of training samples, |T(xk , c i )| means in attribute A k has value x k Class C i The number of training samples.
[0137] Random forest classification: A classification method based on decision trees. First, the samples are randomly sampled and the results are used to generate a decision tree. Each tree will produce unique attributes, thus forming a random forest.
[0138] The random forest classification method can integrate the rules and classification results of all decision trees to achieve the classification of the random forest algorithm. The network diagram of the random forest classification method is as follows: Figure 5 As shown:
[0139] The training set is extracted from the original rock fragment sequencing result sample set. In each round, n training samples are extracted from the sample set, and the Bootstraping sampling method is used for sampling. A total of k samples are collected, thus obtaining k independent training sets;
[0140] Each time a training set is used to obtain a model, k training sets are used to obtain a total of k models;
[0141] For classification problems: the k models obtained in the previous step are voted to obtain the classification result; for regression problems, the mean of the above models is calculated as the final result;
[0142] Bp neural network, namely the error back propagation algorithm, trains multi-layer feedforward networks and is one of the most widely used neural network models. Bp neural network uses the steepest descent method to back propagate, constantly adjusting the network weight value and threshold value to achieve the effect of minimizing the classification error rate. The model includes an input layer, an output layer, and a hidden layer. The Bp neural network diagram is shown in the figure below. Figure 6 shown.
[0143] The method of clustering the bacterial species and abundance contained in the production liquid using the Bp neural network method is as follows:
[0144] The input layer is the sequencing data of the formation baseline, the hidden layer is the new clustering result, and the output layer is the probability that the produced fluid comes from each formation, that is, the contribution rate of each formation. The output of the hidden layer is set as F j , the output of the output layer is set to O k , the system's activation function is set to G, and the learning rate is set to β, then the three layers have the following mathematical relationship:
[0145] T k represents the expected output of the system, and E represents the error of the system, which is expressed by the variance between the actual output value and the expected target value. The specific relationship expression is as follows:
[0146]
[0147] Wherein, i=1, 2, ..., m; k=1, 2, ..., n;
[0148] F j represents the net output of the Bp neural network at the jth neuron, ω ij Represents the connection weight coefficient between hidden layers, x i represents the input from neuron i, O k is the output of the defined output layer, ω jk represents the connection weight coefficient between the hidden layer and the output layer, a j and b k is the threshold, E is the error of the defined learning sample, T k is the expected value of the defined system, e k represents the error of the kth sample;
[0149] The formula for obtaining system weights and biases using the gradient descent principle is as follows:
[0150]
[0151] e k =T k -O k ;
[0152] Furthermore, by comparing the accuracy, precision, recall, F-measure, ROC curve, and AUC value of each algorithm, the most suitable clustering method was selected among the naive Bayesian classification method, the random forest classification method, and the Bp neural network classification method, and the algorithm with the highest accuracy was selected as the preferred algorithm;
[0153] The model performance of three classification algorithms, namely, Bp neural network, naive Bayes and random forest, was studied. The input data were the bacterial species contained in each stratum and their abundance, and the prediction data were the probability that the liquid-producing bacterial species originated from each stratum.
[0154] Accuracy: The ratio of the number of correctly classified samples to the total number of samples. The larger the value, the higher the accuracy. For this data set, the ratio of the total number of samples whose actual source of production is the same as the predicted source of production is the same as the predicted source of production. The formula is:
[0155]
[0156] Among them, TP represents a true positive example, TN represents a true negative example, FP represents a false positive example, and FN represents a false negative example.
[0157] Precision: It indicates the ratio of the number of samples with actual value 1 to the number of samples with predicted value 1. The formula is:
[0158]
[0159] Recall: It indicates the ratio of the number of samples that the classifier accurately predicts to the number of samples that are actually 1. The higher the recall, the more the minority class is screened out, and the lower the recall, the less the minority class is screened out. For this data set, its meaning is the ratio of the total number of samples where the actual source of the produced fluid is the same as the predicted source of the produced fluid to the actual source of the produced fluid. The formula is:
[0160]
[0161] F-measure: represents the balance between precision and recall, that is, the harmonic mean of precision and recall. The distribution interval of F-measure is [0, 1]. The harmonic mean is close to the smaller of precision and recall. Here we hope to obtain a higher F-measure, thereby ensuring that both precision and recall are in a higher range. For this data set, its significance lies in that when the proportion of the total number of samples whose actual and predicted sources of production are both from the formation is high, it will inevitably lead to a decrease in the proportion of the total number of samples whose actual and predicted formations are both from the formation to the actual samples from the formation. The ideal F-measure indicator is that the difference between precision and recall is not large, and both are improved. The formula is:
[0162]
[0163] ROC curve (receiver operating characteristic curve): The receiver operating characteristic curve is described by the change trend of the true positive rate (sensitivity) on the ordinate with the false positive rate (1-specificity) on the abscissa. The area under the ROC curve can be used to describe the prediction accuracy, which is called AUC (Area Under Curve). The larger the area under the ROC curve, the larger the AUC value, indicating a higher prediction accuracy. At the same time, the smaller the horizontal axis of the ROC curve and the larger the vertical axis, the higher the prediction accuracy.
[0164] Depend on Fig.10 It can be seen that the random forest classifier has the highest prediction accuracy, followed by the Bp neural network classifier, and the naive Bayes classifier has the lowest prediction accuracy. Therefore, the random forest algorithm is determined to be the primary algorithm for this model.
[0165] The sequencing data of vertical wells and horizontal wells were applied to the production profile interpretation model, and the accuracy evaluation indicators of each algorithm were compared. By comparing the results of each algorithm under vertical well and horizontal well data, it can be seen that the random forest algorithm obtained the highest accuracy result. The accuracy comparison results of the three methods under vertical well and horizontal well data are shown in the table below.
[0166] Comparison table of the accuracy of three methods under vertical well data
[0167]
[0168] Comparison of the accuracy of the three methods under horizontal well data
[0169]
[0170] Depend on Fig.11 It can be seen that by comparing the accuracy, recall, precision, F-measure, and AUC of the three methods, it can be concluded that the accuracy of random forest is greater than that of the naive Bayes method, and the accuracy of Bp neural network classification is the lowest. Therefore, the random forest method is the preferred algorithm for constructing the liquid production profile tracing algorithm in this paper.
[0171] Depend on Fig.12 It can be seen that, comparing the calculation time for vertical well and horizontal well samples, the naive Bayes calculation time is the longest, about 7 to 15 seconds, the BP neural network takes about 4 to 12 seconds, and the random forest can achieve the calculation results of fluid tracing within 2 seconds. Considering the calculation time, the random forest algorithm is the most preferred algorithm.
[0172] Since the Naive Bayes algorithm is based on the premise that there is no correlation between attributes, and the posterior probability is calculated through prior data to determine the classification. When the attributes are not independent, the prediction effect is not good. However, the correlation between some features in the data set of this article is relatively high, such as the correlation coefficient of cofactor bacteria, prosthetic group, electron carrier and vitamin biosynthesis and aromatic compound degradation is 0.71, and the correlation coefficient of cell structure biosynthesis and C1 compound utilization and assimilation is 0.674, which makes the classification effect of the Naive Bayes algorithm unsatisfactory. The learning rate of the BP neural network is low and the training time is long. The advantages of random forest in selecting features for this data set are as follows: first, the decision trees it constructs are parallel, and each tree will not affect each other; second, the final result is obtained by voting by multiple trees, which makes the impact of outliers on the result smaller; third, the generalization error uses unbiased estimation and has strong generalization ability; fourth, features are randomly selected, which can avoid overfitting and increase classification accuracy. Based on the above analysis, the optimal algorithm is the random forest algorithm.
[0173] The calculation of parameter sensitivity includes the following steps:
[0174] Data standardization: The purpose is to eliminate the impact of dimension on variable data and achieve a normal transformation from 0 to 1 so that the minimum value is 0 and the maximum is 1. The remaining data are all within the range of 0 to 1 and are dimensionless data with a difference of 1. The calculation formula for data standardization of sequencing results of each rock cutting sample is as follows:
[0175]
[0176] Where n is the number of samples and m is the number of variables.
[0177] The purpose of the normalization formula is to transform the original data x if Convert to a value between 0 and 1 This transformation is done by subtracting the minimum value of the feature from the original value and then dividing by the data range R of the feature. j to achieve.
[0178] Represents the standardized value, which is the original data point x if The result is converted by a specific standardization method.
[0179] i: represents the index of the sample or observation, which can be considered as the row index in the data set, representing the i-th sample.
[0180] j: represents the index of the feature or variable, which can be considered as the column index in the data set, representing the jth feature.
[0181] Specifically:
[0182] x if : Represents the original value of the i-th sample on the j-th feature.
[0183] Represents the minimum value of all samples on the jth feature.
[0184] Correlation analysis:
[0185] Correlation analysis is used to measure the correlation between data attributes. This paper uses the Pearson coefficient to determine the degree of correlation between different strains. The calculation method is shown in the following formula:
[0186]
[0187] In the formula, ρ j is the Pearson coefficient of the jth bacterial species, j is one of the bacterial species; i represents the abundance of 28 bacterial species; a is the actual result.
[0188] According to Pearson correlation analysis, the following correlation heat map can be obtained: Figure 7 As shown. It can be seen that the correlation coefficient between cofactor bacteria, prosthetic group, electron carrier and vitamin biosynthesis and aromatic compound degradation is 0.71, and the correlation coefficient between cell structure biosynthesis and C1 compound utilization and assimilation is 0.674.
[0189] Sensitivity evaluation of each characteristic parameter:
[0190] The purpose of characteristic parameter sensitivity evaluation is to quantitatively judge the classification sensitivity of different bacterial species characteristics in dimensionless conditions, and use this as a criterion to evaluate the clustering and prediction efficiency of each algorithm. The specific steps are as follows:
[0191] 1) The average distance calculation method between samples of the jth feature category in the kth category is as follows:
[0192]
[0193] j=1,2,…,m,k=1,2,…,l;
[0194] Among them: α represents the number of samples, r jk (p) and r jk (q) represent the p-th and q-th standardized values of the j-th feature under the k-th category, respectively.
[0195] 2) The average value of the central feature of the jth kth class of α samples in the kth class is as follows:
[0196]
[0197] 3) Calculate the average distance from each sample to the center of the kth class. The calculation method is as follows:
[0198]
[0199] 4) It is known that the distribution of bacterial species in rock cuttings samples from different strata is quite different, so the clustering effect of each feature is different. Now define "compactness" to reflect the clustering effectiveness of the bacterial species in the rock cuttings samples in the kth category as:
[0200] v jk =d jk +f jk ;
[0201] The closeness between samples of the same type is mainly considered from two distances. The first distance is the distance between samples, and the second distance is the distance between samples and the class center. Therefore, the average "closeness" function of the j-th feature for samples within class l is:
[0202]
[0203] 5) The calculation method of the average class distance of class l under the jth feature is as follows:
[0204]
[0205] s,z=1,2,…,l;s≠z;
[0206] Among them: J js and J jz are the average values of the j-th feature of α samples for the s-th and z-th categories, respectively.
[0207] 6) The center calculation method of all classes is as follows:
[0208]
[0209] 7) Calculate the center J of each class jk To J jl The average value of the distance is calculated as follows:
[0210]
[0211] 8) The "separation" function reflects the dissimilarity of each category, mainly considering the relationship between different categories and the relationship between the individual and the overall category. Using a vivid metaphor, the two categories can be regarded as the intersection, tangency, and separation of two circles. If the separation of the two categories is good, the relationship between the two circles is separation, and if it is poor, they are intersection. When the separation relationship is the worst, the relationship between the two circles is tangent.
[0212] When separated:
[0213] δ j (s,z)=|J js -J jz |-d js -d jz >0;
[0214] When intersecting:
[0215] δ j (s,z)=|J js -J jz |-d js -d jz <0;
[0216] When tangent, since all values are obtained by standardization:
[0217] δ j (s,z)=|J js -J jz |-d js -d jz =0;
[0218] -1≤δ≤1
[0219] 9) The “tightness” between classes can reflect the classification ability of the target information abundance of bacterial species contained in the stratum category, which can be used to express the classification sensitivity, and the weight is:
[0220]
[0221] 10) The formula for calculating the average inter-class separation of the j-th feature pair l is as follows:
[0222]
[0223] 11) Evaluate the sensitivity factor of the jth feature:
[0224]
[0225] The sensitivity comparison of the three algorithm model parameters is as follows: Fig. 9 As shown in the figure, the parameter sensitivity of the random forest model is represented by green bars, the Bp neural model is represented by orange bars, and the naive Bayes model is represented by blue bars. As shown in the figure, the parameter sensitivity of the random forest algorithm is most similar to the weight of each parameter calculated by the entropy weight method. Therefore, the random forest algorithm is more optimized.
[0226] The mainstream microbial traceability methods in the prior art include Source Tracker based on the Bayesian algorithm and FEAST based on the expectation maximization algorithm. However, the traceability accuracy of these methods is low, and the method of increasing the accuracy by the number of iterations obviously leads to an increase in calculation time.
[0227] Furthermore, the random forest algorithm is optimized by combining the PSO algorithm as follows:
[0228] The random forest algorithm is a machine learning method that combines new decisions for classification and is suitable for most sample data sets. The PSO algorithm adds an inertia weighting factor to the particle swarm to achieve the synchronous adjustment of the motion trajectory of the particle swarm in the particle swarm and the motion trajectory, thereby achieving the motion trajectory of the particle swarm in the particle swarm and the optimal value of the motion trajectory. The PSO algorithm has a large search range and a fast convergence speed. The PSO algorithm improves the random tree by weighting the leaf nodes, thereby achieving the goal of improving the classification performance of the random tree. Combining the particle swarm algorithm with the random forest can effectively solve problems such as overfitting of the decision tree that are prone to occur when selecting samples and feature values.
[0229] However, there are large differences in classification accuracy between different decision trees or different leaf nodes on the same decision tree, which is mainly caused by the two randomization processes of the decision tree generation algorithm. Since the weights of each decision tree are the same before the random forest model is optimized, the votes of the decision tree or leaf node with poor classification performance will have a great impact on the final classification result of the entire random forest classifier. Therefore, this paper proposes a random forest algorithm based on PSO optimization. The core idea is to make the weight values of each leaf node of each decision tree in the random forest different, set the number of particles and the number of iterations, and perform adaptive optimization to achieve the purpose of improving the classification ability.
[0230] When the PSO algorithm is used as the optimization algorithm, it is easy to converge when the population is small, but it is easy to fall into the local optimal solution. The convergence time is long when the population is large, so the initial number of particles is set to 50; the maximum number of iterations is set to 150 times; the inertia weight is used to describe the influence of the velocity of the previous generation of particles on the velocity of the modern example, reflecting the integration ability of the modern particle velocity. When the inertia weight value increases, it means that the global optimization ability is enhanced and the local optimization ability is reduced. The model sets the inertia weight value to 0.9, and the individual learning factor and the sociology factor are both 2.
[0231] Table of boundary and external conditions of PSO algorithm
[0232]
[0233] When using the random forest algorithm to trace the source strata of liquid-producing bacteria, the importance of the features is calculated and the factors with the lowest importance are deleted;
[0234] The above process is repeated in each iteration until the importance of the factor features is greater than the threshold of the feature weight coefficient;
[0235] The feature selection process can effectively reduce the impact of irrelevant features in the data, thereby significantly reducing the running time, preventing model overfitting, improving the classification ability of the random forest algorithm, improving accuracy, and effectively improving the problem of poor classification results caused by too many features.
[0236] Specifically, the source strata of the liquid-producing strains are traced through the random forest algorithm, and the feature importance is sorted from small to large, and the factors are eliminated according to the threshold of the feature weight coefficient. In this way, the least important features are eliminated in each iteration. The feature selection process can effectively reduce the impact of irrelevant features in the data, thereby greatly reducing the running time, preventing model overfitting, improving the model classification ability, improving accuracy, and effectively improving the problem of poor classification results caused by too many features.
[0237] In view of the problem of high feature dimension and infinite amplification of noise points in this algorithm, this paper proposes two optimization methods. The improved algorithm flow is as follows:
[0238] (1) Preprocess the data. The main steps include: (a) filling missing values by mean imputation method; (b) normalizing the data.
[0239] (2) The 28 bacterial species that affect classification are brought into the random forest algorithm to calculate the importance of features, and the factors with the lowest importance are deleted. The factors with the lowest importance are deleted again, and the process is repeated until the importance of the factors is greater than the set threshold. This phase is terminated and the optimal feature subset is obtained. Figure 8shown.
[0240] According to the above evaluation indicators, i.e. the test process, the classification effect of the traditional random forest classification model before improvement was tested respectively. The total number of test samples of the improved random forest classifier based on the PSO algorithm was 182 samples. The classification results of the algorithm are finally shown in the following table:
[0241] Comparison of accuracy before and after algorithm improvement for horizontal well data
[0242]
[0243] It can be seen from the table above that all indicators in the improved algorithm are significantly better than the original random forest algorithm. Through the analysis of the above evaluation indicators, it can be seen that the prediction performance of the improved classification algorithm in this paper is much higher than that of the traditional classifier, and it has a relatively ideal effect on the prediction of the source stratum of the liquid-producing strains. It has solved the problem that the traditional classification effect is not ideal due to the high dimension of the data set and the large number of noise points that cannot be eliminated. The improved algorithm has dealt with the shortcomings of the traditional algorithm weight update, that is, it effectively avoids the defect that the noise points are infinitely magnified, which reduces the accuracy of the model.
[0244] The formation baselines were clustered by random forest method, and the five-month production was predicted to achieve the source of the production. The contribution rate of each formation was calculated, and the production profile was constructed to achieve the production profile monitoring technology at different stages. The five-month production profile obtained by random forest clustering and prediction method is shown in the figure below. Fig.13 As shown, the ordinate represents each stratum, and the abscissa represents the contribution rate of each stratum to the production. The target stratum is stratum 5, which is represented by yellow. The contribution rate threshold of each stratum 0.1 is represented by a red dotted line.
[0245] It is known that the target layer is layer 5, and the fracturing operation started on the 15th day. The contribution rate of the target layer increased significantly from the 15th day in the figure, which matches the actual production data. The dotted line in the figure shows the average contribution rate of all layers. It can be clearly seen from the figure that the contribution rates of layers 2, 3, 4, 5, and 6 exceed the average value, so it can be concluded that the fracture height extends upward to layer 2 and downward to layer 6.
[0246] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.
Claims
1. A method for dynamic interpretation of liquid production profile based on microbial DNA sequencing diagnosis, characterized in that: The following steps are involved: Collect rock cuttings samples; Processing the rock cuttings sample to obtain the DNA sequence of the rock cuttings sample; Based on the DNA sequences of rock cuttings samples, a stratigraphic baseline map is obtained that can show the bacterial species and their abundance in the strata at different depths; Collecting production liquid samples, and performing DNA sequencing on the industrial samples to obtain the bacterial species and bacterial species abundance contained in the production liquid; Based on the DNA sequencing results of the production fluid, the production fluid is traced through the clustering method to trace the probability that the production fluid comes from each stratum; By sampling, DNA sequencing and tracing the produced fluids at different stages, effective long-term dynamic monitoring of the reservoir can be achieved.
2. A method for dynamic interpretation of liquid production profile based on microbial DNA sequencing diagnosis according to claim 1, characterized in that: The method for tracing the source of the produced fluid is naive Bayes classification, random forest classification or Bp neural network classification.
3. A method for dynamic interpretation of liquid production profile based on microbial DNA sequencing diagnosis according to claim 2, characterized in that: The naive Bayes classification method is used to trace the source of the produced fluid, including the following steps: Using different bacterial species and their abundance as variables, a naive Bayes classifier capable of distinguishing different strata was generated; The sequencing result data of each rock chip sample of the naive Bayes classifier is represented by an N-dimensional feature vector X={x1, x2, …, x n }, thus describing the characteristic bacterial species attributes of n samples, and each category is labeled as C={c1, c2, ..., c m }; Select a set of rock cuttings sample data X, use the naive Bayesian classification method to classify the rock cuttings sample X with the maximum posterior probability, and assign the unknown sample to the c category; if and only if i≠j, , we only need to calculate the maximum , the calculation process is as follows: ; In the formula, Indicates that under the condition that the N-dimensional feature vector X of the sample sequencing result occurs, the sample characteristic strain attribute C i Probability of occurrence; Indicates the characteristic strain attribute C of the sample i The probability of the N-dimensional feature vector X of the sample sequencing result occurring under the condition of occurrence; Represents the prior probability of the characteristic bacterial species attribute of each sample; Represents the prior probability of each sample sequencing result occurring; Assuming that there is no interdependence between the strains, maximize P(X|c i )P(c i ),but: ; in, Indicates the characteristic strain attribute C of the sample i Under the condition that the occurrence of k represents the probability of the kth event occurring; it is calculated based on the maximum likelihood estimation as follows: ;in, Represents class C i The number of training samples in represents the total number of training samples, Indicates that in attribute A k has value x k Class C i The number of training samples.
4. A method for dynamic interpretation of liquid production profile based on microbial DNA sequencing diagnosis according to claim 2, characterized in that: The random forest classification method is used to trace the source of the produced fluid, including the following steps: The training set was extracted from the original rock fragment sequencing result sample set. In each round, n training samples were extracted from the sample set. The Bootstraping sampling method was used for sampling. A total of k samples were collected, thus obtaining k independent training sets. Each time a training set is used to obtain a model, k training sets are used to obtain a total of k models; The k models obtained in the previous step are voted to obtain the classification result.
5. The method for dynamic interpretation of liquid production profile based on microbial DNA sequencing diagnosis according to claim 2, characterized in that: The method of tracing the source of produced fluid using the Bp neural network method is as follows: The input layer is the sequencing data of the formation baseline, the hidden layer is the new clustering result, and the output layer is the probability that the produced fluid comes from each formation; The output of the hidden layer is set to F j , the output of the output layer is set to O k , the system's activation function is set to G, and the learning rate is set to β, then the three layers have the following mathematical relationship: T k represents the expected output of the system, and E represents the error of the system, which is expressed by the variance between the actual output value and the expected target value. The relationship expression is as follows: ; ; ; where i=1, 2, ...m; k=1, 2, ...n; F j represents the net output of the Bp neural network at the jth neuron, represents the connection weight coefficient between hidden layers, represents the input from neuron i, is the output of the defined output layer, represents the connection weight coefficient between the hidden layer and the output layer, and is the threshold value, is the error of the defined learning sample, is the expected value of the defined system, Represents the error of the kth sample; the formula for the system weight and bias is obtained using the gradient descent principle as follows: ; .
6. A method for dynamic interpretation of liquid production profile based on microbial DNA sequencing diagnosis according to claim 2, characterized in that: By comparing the accuracy, precision, recall, F-measure, ROC curve, and AUC value of each algorithm, the algorithm with the highest tracing accuracy is selected from the naive Bayesian classification method, the random forest classification method, and the Bp neural network classification method; The accuracy rate indicates the proportion of the total number of samples where the actual source of liquid production is the same as the predicted source of liquid production to the predicted source of liquid production. The expression is as follows: ; TP represents a true positive example, TN represents a true negative example, FP represents a false positive example, and FN represents a false negative example; precision represents the ratio of the number of samples that are actually 1 to the number of samples that are predicted to be 1, and the expression is as follows: The recall rate indicates the proportion of the total number of samples whose actual source of production fluid is the same as the predicted source of production fluid to the actual source of production fluid. The expression is as follows: ; It represents the balance between precision and recall, and the expression is as follows: ; The ROC curve describes the receiver operating characteristic curve by the changing trend of the true positive rate on the vertical axis and the false positive rate on the horizontal axis; the area under the ROC curve can be used to describe the prediction accuracy, called AUC; the larger the area under the ROC curve, the larger the AUC value, indicating a higher prediction accuracy; at the same time, the smaller the horizontal axis of the ROC curve and the larger the vertical axis, the higher the prediction accuracy.
7. A method for dynamic interpretation of liquid production profile based on microbial DNA sequencing diagnosis according to claim 6, characterized in that: After comparing the accuracy, precision, recall, F-measure, ROC curve, and AUC value of each algorithm, the random forest classification method has the highest traceability accuracy; The random tree is improved by weighting the leaf nodes through the PSO algorithm, thereby improving the classification performance of the random tree to solve the problem of overfitting of the decision tree when selecting samples and feature values.
8. A method for dynamic interpretation of liquid production profile based on microbial DNA sequencing diagnosis according to claim 7, characterized in that: The PSO algorithm is optimized so that the weight values of the leaf nodes of each decision tree in the random forest are different. Adaptive optimization is performed according to the set number of particles and the maximum number of iterations, thereby achieving the purpose of improving the classification ability.
9. A method for dynamic interpretation of liquid production profile based on microbial DNA sequencing diagnosis according to claim 8, characterized in that: When using the random forest algorithm to trace the source strata of liquid-producing bacteria, the importance of the features is calculated and the factors with the lowest importance are deleted; The above process is repeated in each iteration until the importance of the factor features is greater than the threshold of the feature weight coefficient; The feature selection process can reduce the impact of irrelevant features in the data, significantly reduce running time, prevent model overfitting, enhance the classification ability of the random forest algorithm, improve accuracy, and improve the problem of poor classification results caused by too many features.
10. The method for dynamic interpretation of liquid production profile based on microbial DNA sequencing diagnosis according to claim 1, characterized in that: After the rock cuttings samples were sequenced, the data of the rock cuttings sequencing results were standardized to eliminate the impact of the dimension on the variable data. The calculation formula is as follows: ;in, is the number of samples, is the number of variables, Represents the value after normalization. Represents the original value of the i-th sample on the j-th feature.
Citation Information
Cited By
Microorganism DNA sequencing analysis method and application thereof in stratigraphic division
CN121737323A
Method for analyzing microbial DNA sequencing and its application in formation division
CN121737323B