A lithology identification method, system, computer device and storage medium

By applying the self-attention neural network algorithm and the CoreViT neural network model in oil and gas exploration, the drilling cores are identified, and the existing lithologic recognition methods are solved, efficient and accurate lithologic recognition is achieved, and the effect of oil and gas exploration is improved.

CN116935115BActive Publication Date: 2025-04-04CHENGDU UNIVERSITY OF TECHNOLOGY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310881970.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-18
Publication Date
2025-04-04
Estimated Expiration
2043-07-18

AI Technical Summary

Technical Problem

The existing lithologic identification methods have problems such as low efficiency, long time consumption, and require a large number of resources and equipment. The description results of different researchers vary greatly, which affects the accuracy of oil and gas exploration.

Method used

The self-attention neural network algorithm is used to collect drilling core image data, perform data classification, cleaning and normalization processing, and a lithology recognition model based on the CoreViT neural network model is established, and the model is optimized by the stochastic gradient descent method to achieve lithology recognition.

Benefits of technology

It realizes the accuracy, efficiency and universal use of lithology identification, with an identification accuracy of 97.5%, reducing calculation costs and improving the efficiency and accuracy of oil and gas exploration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116935115B_ABST
    Figure CN116935115B_ABST
Patent Text Reader

Abstract

The present application discloses a lithology identification method, system, computer equipment and storage medium. The lithology identification method comprises the following steps: collecting drilling cores and obtaining core image data, classifying the core image data, data cleaning and normalization processing, and obtaining standardized core image data; dividing the training set, validation set and test set according to a preset ratio based on the standardized core image data, and establishing a lithology identification model based on the CoreViT neural network model; using the random gradient descent method to continuously optimize and iterate the lithology identification model until the optimal lithology identification model is obtained; based on the optimal lithology identification model, the target test drilling core image is identified, and the output prediction results are compared and analyzed with the standard label to obtain the final lithology identification model; the present application can accurately identify the lithology of the target well, which is beneficial to the development of oil and gas exploration work, and the model structure parameters are small, the degree of automation is high, and the calculation cost is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of oil and gas exploration and development, and in particular to a lithology identification method, system, computer equipment and storage medium. Background Art

[0002] Lithology identification is a very important task in the field of oil and gas exploration. Lithology refers to different types of rocks and their combinations in the stratum, such as sandstone, mudstone, limestone, etc. Since different lithologies have different pore structures, permeability and reservoir space, the identification of lithology can better understand the underground geological conditions, find potential oil and gas reservoirs, and select the best drilling location and plan; in addition, by analyzing the physical properties and chemical characteristics of different lithologies, we can have a deeper understanding of the mechanism of oil and gas formation and migration, and study the source, evolution and prediction of oil and gas.

[0003] Usually, the observation and description of cores require researchers to describe in detail the lithology, mineral composition, structure, sedimentary structure, fossils, pores and fractures, various secondary changes, oil, gas and water seepage, and oil and gas characteristics. It is necessary to make a comprehensive observation while highlighting the key points, and it must be done in a timely manner to avoid data loss due to oil and gas escape and volatilization. At the same time, when the coring section is long, the sample size will be very large, and the core description with centimeter-level accuracy will bring a huge workload to the researchers. In addition, due to the differences in the professional familiarity of researchers, the description results of different researchers are often different. This difference has a huge impact on the selection of sweet spots and targets for shale oil and gas in later studies.

[0004] At present, hand specimen identification, thin section identification and experimental identification are commonly used methods for lithology identification. Hand specimen identification refers to on-site observation and judgment of the collected rock cores. Exploration personnel will use magnifying glasses, naked eyes and other methods to observe the color, texture, texture and other characteristics of the rock. Hand specimen identification can be used for preliminary classification and screening of rocks. However, this method can only detect local areas, and it is difficult to obtain continuous vertical profile information of rocks, so it may not fully reflect the true situation of the rocks. Thin section identification refers to the preparation of slices of collected rock samples and observation of the crystal structure, mineral composition, texture and other characteristics of the rock under a microscope. This method can provide high-resolution images and can observe and analyze the details of the rock in detail. However, thin section identification is often very time-consuming and requires professionals to have a strong knowledge reserve. Experimental identification refers to the use of chemical tests, physical tests and other experimental methods to determine the physical properties, chemical composition and other information of the rock. Although experimental identification can provide accurate data and parameters, which helps to more accurately determine the type and nature of the rock, this method requires a lot of time, resources and equipment, and there may be certain errors between different experimental methods. Summary of the invention

[0005] In view of the problems existing in the prior art, the present invention provides a lithology identification method, system, computer equipment and storage medium, which adopts a self-attention neural network algorithm to identify the lithology of drilling cores, and can accurately, efficiently and universally identify the lithology.

[0006] In a first aspect, an embodiment of the present invention provides a lithology identification method, comprising the following steps:

[0007] S1: Collect drilling cores and obtain core image data, classify the core image data, clean and normalize the data, and obtain standardized core image data;

[0008] S2: Based on the standardized core image data, the training set, validation set and test set are divided according to the preset ratio, and a lithology recognition model based on the CoreViT neural network model is established;

[0009] S3: Use the stochastic gradient descent method to continuously optimize and iterate the lithology identification model until the optimal lithology identification model is obtained;

[0010] S4: Identify the target test well core image based on the optimal lithology identification model, compare and analyze the output prediction results with the standard labels, and obtain the final lithology identification model.

[0011] Furthermore, the drilling core in step S1 includes limestone, mudstone and / or algal limestone.

[0012] Furthermore, the process of classifying the core image data in step S1 includes: marking the core column, matching the lithology with the well depth one by one, and classifying the lithology images of the same lithology;

[0013] The data cleaning process is to remove damaged core column images and blurred images;

[0014] The normalization process is as follows:

[0015]

[0016] In the formula, norm is the value after standardization, x i is the image pixel value, max(x) is the maximum value of the image pixel, and min(x) is the minimum value of the image pixel.

[0017] Furthermore, in step S2, the total amount of data of the training set, validation set and test set is divided according to a preset ratio of 7:2:1.

[0018] Furthermore, the CoreViT neural network model in step S2 includes: an image segmentation module, a parallel self-attention module, a classification module and a multi-layer perceptron module;

[0019] The image segmentation module is used to decompose the image into local areas and convert each local area into a vector form; the parallel self-attention module is used to process these vectors using a parallel multi-head attention mechanism and a feedforward neural network to extract useful feature information; the multi-layer perceptron module is used to improve the nonlinear fitting ability of the model and map the feature vector to the probability distribution of the predicted category; the classification module is used to summarize the learning information of the parallel self-attention module, introduce a "class token" to summarize the information of all image blocks, and generate the final prediction result.

[0020] Furthermore, the process of establishing the lithology identification model based on the CoreViT neural network model in step S2 is:

[0021] The standardized core image data is input and divided into N equal-sized and non-overlapping image blocks, and the size of each image block is P. Expand the image patch into a one-dimensional vector and add the positional encoding:

[0022] X' e =Concat([x p1 ;x p2 ;…;x pN ])*E;

[0023] X e =X′ e +x pos ;

[0024] Where x∈R H×W×C is the normalized core image data, x pi is the i-th image block; the Concat function is used to concatenate all image blocks together according to the specified dimension; E represents the learning matrix, which is used for continuous iteration of the model; x pos Encode for position;

[0025] The image block is input into the parallel self-attention module. The parallel self-attention module includes two multi-head attention mechanisms and two multi-layer perceptrons. The parallel self-attention module parallelizes the multi-head attention mechanism and the multi-layer perceptron, and simultaneously puts the input image block into the two multi-head attention mechanism modules and the two multi-layer perceptron modules.

[0026] The multi-head attention mechanism repeatedly learns through the Q, K and V matrices to enable each image block to obtain global information. After each image block obtains the global information, residual link processing is performed:

[0027] Q,K,V=X e (W q ,W k ,W v );

[0028] X e =LN(X e );

[0029]

[0030] X e+1 =LN(MHSA(Q,K,V));

[0031] The processing process of the parallel self-attention module is:

[0032] X′ e+1 =MHSA1(X e )+MHSA2(X e )+X e ;

[0033] X e+1 =MLP1(LN(X′ e+1 ))+MLP2(LN(X′ e+1 ))+X′ e+1 ;

[0034] In the formula, LN represents the layer normalization function, MHSA represents the multi-head attention function, MLP is the multi-layer perceptron module, and W q ,W k ,W v Represent three different learnable matrices. e Represents the vector of all image blocks concatenated according to the specified dimension, X' e+1 represents the calculation result after a parallel attention module learning, X e+1 Represents the calculation results after being processed by two multi-layer perceptron modules;

[0035] The classification module introduces "class tokens" into the image blocks and learns them together with the image blocks learned by the parallel self-attention module. The process is as follows: it consists of a multi-head attention mechanism module and a multi-layer perceptron module, and "layer normalization" is performed before each multi-head attention mechanism module and multi-layer perceptron module. A residual connection is added after each multi-head attention mechanism module and multi-layer perceptron module. The "class token" learns the information of all image blocks, makes a comprehensive judgment and finally obtains the classification result.

[0036] Furthermore, the optimal lithology identification model in step S3 includes six parallel self-attention modules and two multi-layer perceptron modules; the Adam optimizer is used in the process of optimizing and iterating the lithology identification model, and the loss function adopts the cross entropy loss function.

[0037] In an embodiment of the present invention, in a second aspect, the embodiment of the present invention provides a lithology identification system, including:

[0038] The acquisition and processing module is used to acquire drilling cores and obtain core image data, classify the core image data, clean the data and normalize the data to obtain standardized core image data;

[0039] The model building module is used to divide the training set, validation set and test set according to the preset ratio based on the standardized core image data, and to establish a lithology recognition model based on the CoreViT neural network model;

[0040] Iteration module, used to continuously optimize and iterate the lithology identification model using the stochastic gradient descent method until the optimal lithology identification model is obtained;

[0041] The output module is used to identify the target test drilling core image based on the optimal lithology identification model, compare and analyze the output prediction results with the standard labels, and obtain the final lithology identification model.

[0042] In a third aspect, an embodiment of the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned lithology identification method when executing the computer program.

[0043] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned lithology identification method are implemented.

[0044] Other optional features and technical effects of the embodiments of the present invention are partially described below, and partially can be understood by reading this document.

[0045] Compared with the prior art, the present invention has the following beneficial technical effects:

[0046] The present invention provides a lithology identification method, system, computer equipment and storage medium, comprising the following steps: collecting drilling cores and obtaining core image data, classifying the core image data, data cleaning and normalization processing, and obtaining standardized core image data; dividing a training set, a validation set and a test set according to a preset ratio based on the standardized core image data, and establishing a lithology identification model based on a CoreViT neural network model; continuously optimizing and iterating the lithology identification model by a random gradient descent method until an optimal lithology identification model is obtained; identifying a target test drilling core image based on the optimal lithology identification model, comparing and analyzing the output prediction result with a standard label, and obtaining a final lithology identification model; the present application can not only well identify the lithology of the target well, but also can improve the identification accuracy to 97.5% by a maximum after verification, which is far superior to the existing technical solutions and more conducive to the development of oil and gas exploration; and the model structure parameters are small, the degree of automation is high, the calculation cost is effectively reduced, the requirements of fast and efficient actual oil and gas exploration are better met, and the calculation waiting time in the actual exploration process is reduced.

[0047] Furthermore, the CoreViT neural network model in step S2 includes: an image segmentation module, a parallel self-attention module, a classification module and a multi-layer perceptron module; the image segmentation module is used to decompose the image into local areas and convert each local area into a vector form; the parallel self-attention module is used to process these vectors using a parallel multi-head attention mechanism and a feedforward neural network to extract useful feature information; the multi-layer perceptron module is used to improve the nonlinear fitting ability of the model and map the feature vectors to the probability distribution of the prediction category; the classification module is used to summarize the learning information of the parallel self-attention module, introduce a "class token" to summarize the information of all image blocks, and generate a final prediction result; the parallel self-attention module introduced in this application can enhance the global information collection ability of the image and simulate the characteristics of human eye observation to the greatest extent. The classification module focuses on the final recognition process, so that the recognition effect is optimized, and the multi-layer perceptron is used to integrate the previous calculation results, and the integrated learned information is finally used for intelligent identification of lithology. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. The elements shown are not limited to the proportions shown in the accompanying drawings. The same or similar reference numerals in the accompanying drawings represent the same or similar elements, wherein:

[0049] Figure 1 is a flow chart of the lithology identification method according to the present invention;

[0050] Figure 2 The CoreViT model and its module diagram used in the embodiment of the present invention are shown in FIG. Figure 2(a) is the overall architecture diagram of CoreViT. Figure 2 (b) is the composition diagram of the classification module. Figure 2 (c) is the diagram of the parallel self-attention module. Figure 2 (d) is a diagram of the multi-layer perceptron structure;

[0051] Figure 3 A curve diagram of the number of iterations and accuracy of the lithology identification model based on the CoreViT neural network model in the training set in an embodiment of the present invention;

[0052] Figure 4 The composition of various types of rocks in the training set in the embodiment of the present invention;

[0053] Figure 5 A curve diagram of the number of iterations and accuracy of the lithology identification model based on the CoreViT neural network model in the validation set in an embodiment of the present invention;

[0054] Figure 6 To verify the composition of various types of rocks in the embodiments of the present invention;

[0055] Figure 7 A curve diagram showing the number of iterations and accuracy of the optimal lithology identification model in the test set in an embodiment of the present invention;

[0056] Figure 8 The composition of various types of rocks tested in the embodiment of the present invention;

[0057] Fig. 9 This is a lithology identification device according to the present invention.

[0058] In the figure: 1000, electronic device; 1001, processor; 1002, read-only memory; 1003, memory; 1004, bus; 1005, I / O interface; 1006, input part; 1007, output part; 1008, storage part; 1009, communication part; 1010, drive; 1011, removable medium. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific implementation methods and drawings. Here, the exemplary implementation methods of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0060] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0061] In an embodiment of the present invention, a lithology identification method is provided, such as Figure 1 As shown, the following steps are included:

[0062] S1: Collect drilling cores and obtain core image data, classify the core image data, clean and normalize the data, and obtain standardized core image data;

[0063] S2: Based on the standardized core image data, the training set, validation set and test set are divided according to the preset ratio, and a lithology recognition model based on the CoreViT neural network model is established;

[0064] S3: Use the stochastic gradient descent method to continuously optimize and iterate the lithology identification model until the optimal lithology identification model is obtained;

[0065] S4: Identify the target test well core image based on the optimal lithology identification model, compare and analyze the output prediction results with the standard labels, and obtain the final lithology identification model.

[0066] Preferably, the drilling core in step S1 includes limestone, mudstone and / or algal limestone.

[0067] Preferably, the process of classifying the core image data in step S1 includes: marking the core column, matching the lithology with the well depth one by one, and classifying the lithology images of the same lithology;

[0068] The data cleaning process is to remove damaged core column images and blurred images;

[0069] The normalization process is as follows:

[0070]

[0071] In the formula, norm is the value after standardization, x i is the image pixel value, max(x) is the maximum value of the image pixel, and min(x) is the minimum value of the image pixel.

[0072] Preferably, the total amount of data of the training set, validation set and test set in step S2 is divided according to a preset ratio of 7:2:1, wherein the training set is used to train the model and determine the weight and bias parameters of the model, the validation set does not participate in the determination of the learning parameters and the gradient descent process, and is used to select hyperparameters, such as the number of iterations and the learning rate, and the test set is used to evaluate after the training is completed.

[0073] Preferably, Figure 2 As shown in (a), the CoreViT neural network model in step S2 includes: an image segmentation module, a parallel self-attention module, a classification module and a multi-layer perceptron module;

[0074] The image segmentation module is used to decompose the image into local regions and convert each local region into a vector form; Figure 2 As shown in (c), the parallel self-attention module is used to process these vectors using a parallel multi-head attention mechanism and a feedforward neural network to extract useful feature information; Figure 2 As shown in (d), the multi-layer perceptron module is used to improve the nonlinear fitting ability of the model and map the feature vector to the probability distribution of the predicted category; Figure 2 As shown in (b), the classification module is used to summarize the learning information of the parallel self-attention module, introduce the “class token” to summarize the information of all image blocks, and generate the final prediction result.

[0075] Preferably, the process of establishing the lithology identification model based on the CoreViT neural network model in step S2 is:

[0076] The standardized core image data is input and divided into N equal-sized and non-overlapping image blocks, and the size of each image block is P. Expand the image patch into a one-dimensional vector and add the positional encoding:

[0077] X' e =Concat([x p1 ;x p2 ;…;x pN ])*E;

[0078] X e =X′ e +x pos ;

[0079] Where x∈R H×W×C is the standardized core image data, x pi is the i-th image block; the Concat function is used to concatenate all image blocks together according to the specified dimension; E represents the learning matrix, which is used for continuous iteration of the model; x posIt is a position encoding that can embed the position information into the feature vector of the sequence and adaptively learn the embedding parameters of the position through the training process. This encoding method enables the model to better capture the local details and global structure in the image and achieve better performance.

[0080] The image block is input into the parallel self-attention module. The parallel self-attention module includes two multi-head attention mechanisms and two multi-layer perceptrons. The parallel self-attention module parallelizes the multi-head attention mechanism and the multi-layer perceptron, and simultaneously puts the input image block into the two multi-head attention mechanism modules and the two multi-layer perceptron modules.

[0081] The multi-head attention mechanism repeatedly learns through the Q, K and V matrices to enable each image block to obtain global information. The Q matrix is ​​used to query the relationship between the current image block and other image blocks, and at the same time indicates which information the current image block needs to pay attention to. The K matrix is ​​used to calculate the similarity between the query image block to determine which information needs to be paid attention to. The V matrix calculates the specific information of Q and K and is used to calculate the final self-attention output. The Q, K, and V matrices are connected through the image block and the learnable W q ,W k ,W v The final attention result operation is to multiply the Q matrix by the transposed matrix of K and divide by the constant Finally, it is multiplied with the V matrix and softmax normalized, and then the result of the multi-head attention mechanism module is placed in a multi-layer perceptron. The multi-layer perceptron is usually composed of two fully connected feedforward neural networks, with a nonlinear activation function (such as ReLU, GeLU) inserted between the two fully connected layers.

[0082] Before passing through the multi-head attention mechanism module and the multi-layer perceptron module, "layer normalization" is required. After each image block obtains global information, residual link processing is performed:

[0083] Q,K,V=X e (W q ,W k ,W v );

[0084] X e =LN(X e );

[0085]

[0086] X e+1 =LN(MHSA(Q,K,V));

[0087] The parallel self-attention module parallelizes the multi-head attention mechanism and the multi-layer perceptron, and puts the input image block into two multi-head attention mechanism modules and two multi-layer perceptron modules at the same time. Due to different initialization parameters, different modules will learn different features, which can enhance the learning ability of the model and improve the generalization ability of the model. The processing process of the parallel self-attention module is:

[0088] X′ e+1 =MHSA1(X e )+MHSA2(X e )+X e ;

[0089] X e+1 =MLP1(LN(X′ e+1 ))+MLP2(LN(X′ e+1 ))+X′ e+1 ;

[0090] In the formula, LN represents the layer normalization function, MHSA represents the multi-head attention function, MLP is the multi-layer perceptron module, and W q ,W k ,W v Represent three different learnable matrices. e Represents the vector of all image blocks concatenated according to the specified dimension, X' e+1 represents the calculation result after a parallel attention module learning, X e+1 Represents the calculation results after being processed by two multi-layer perceptron modules.

[0091] The classification module introduces "class tokens" into the image blocks and learns them together with the image blocks learned by the parallel self-attention module. The process is as follows: it consists of a multi-head attention mechanism module and a multi-layer perceptron module, and "layer normalization" is performed before each multi-head attention mechanism module and multi-layer perceptron module. A residual connection is added after each multi-head attention mechanism module and multi-layer perceptron module. The "class token" learns the information of all image blocks, makes a comprehensive judgment and finally obtains the classification result.

[0092] Preferably, the optimal lithology identification model in step S3 includes six parallel self-attention modules and two multi-layer perceptron modules; the Adam optimizer is used in the process of optimizing and iterating the lithology identification model, and the loss function adopts the cross entropy loss function.

[0093] The present application provides an embodiment as follows:

[0094] The drill cores in Fengxi area of ​​Qaidam Basin were described, recorded and photographed manually. The lithology of the cores drilled in the target wells is mainly limestone, mudstone and algal limestone.

[0095] After taking photos of the drilling cores, the image data is classified, cleaned and normalized in turn to achieve data standardization and obtain standardized core image data. The data cleaning process includes calibration of core lithology and core depth, and deletion of damaged or blurred images of the cores.

[0096] After obtaining the standardized core image data, it was divided into training set, validation set and test set. The total amount of data was divided according to 7:2:1. The CoreViT neural network model was built, which was written in the Pytorch framework.

[0097] The core image is put into the CoreViT model for 50 iterations, and the cross entropy loss function is used to optimize the loss each time, so that the loss value is constantly close to the true value. When the final accuracy and loss tend to be stable, an efficient and accurate optimal lithology identification model is obtained through continuous iteration;

[0098] The test core photos are placed in the trained optimal lithology recognition model for testing, and the model recognition results are compared with the label results to determine the accuracy of the model and obtain the final lithology recognition model.

[0099] This embodiment uses the training set to train in the built CoreViT neural network model, such as Figure 3 and Figure 4 As shown in Figure 2, the accuracy and loss of the lithology recognition model based on the CoreViT neural network model are regionally stable after 12-15 rounds of iterations. In the training set, the accuracy can reach 97.5% and the loss can be reduced to 0.07. Figure 5 , Figure 6 , Figure 7 and Figure 8 As shown, the accuracy can reach 96% and the loss can reach 0.08 in the test set and validation set. At the same time, the confusion matrix also confirms the high recognition accuracy.

[0100] The present invention provides a lithology identification system, comprising:

[0101] The acquisition and processing module is used to acquire drilling cores and obtain core image data, classify the core image data, clean the data and normalize the data to obtain standardized core image data;

[0102] The model building module is used to divide the training set, validation set and test set according to the preset ratio based on the standardized core image data, and to establish a lithology recognition model based on the CoreViT neural network model;

[0103] Iteration module, used to continuously optimize and iterate the lithology identification model using the stochastic gradient descent method until the optimal lithology identification model is obtained;

[0104] The output module is used to identify the target test drilling core image based on the optimal lithology identification model, compare and analyze the output prediction results with the standard labels, and obtain the final lithology identification model.

[0105] In an embodiment of the present invention, an electronic device is provided, comprising: a processor and a memory storing a computer program, wherein the processor is configured to execute any lithology identification method of the embodiment of the present invention when running the computer program.

[0106] Fig. 9 A schematic diagram of an electronic device 1000 that can implement a method or implement an embodiment of the present invention is shown, and in some embodiments, more or fewer electronic devices than shown may be included. In some embodiments, it can be implemented using a single or multiple electronic devices. In some embodiments, it can be implemented using cloud or distributed electronic devices.

[0107] like Fig. 9 As shown, the electronic device 1000 includes a processor 1001, which can perform various appropriate operations and processes according to the programs and / or data stored in the read-only memory (ROM) 1002 or the programs and / or data loaded from the storage part 1008 to the random access memory (RAM) 1003. Processor 1001 can be a multi-core processor, or it can include multiple processors. In some embodiments, processor 1001 can include a general main processor and one or more special coprocessors, such as a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), a digital signal processor (DSP), etc. In RAM 1003, various programs and data required for the operation of electronic device 1000 are also stored. Processor 1001, ROM 1002 and RAM 1003 are connected to each other via bus 1004. Input / output (I / O) interface 1005 is also connected to bus 1004.

[0108] The processor and the memory are used together to execute the program stored in the memory. When the program is executed by the computer, the methods, steps or functions described in the above embodiments can be implemented.

[0109] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, a touch screen, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed. Fig. 9 Only some components are schematically shown in the figure, which does not mean that the computer system 1000 only includes Fig. 9 Components shown.

[0110] The systems, devices, modules or units described in the above embodiments may be implemented by a computer or its associated components. The computer may be, for example, a mobile terminal, a smart phone, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a personal digital assistant, a media player, a navigation device, a game console, a tablet computer, a wearable device, a smart TV, an Internet of Things system, a smart home, an industrial computer, a server or a combination thereof.

[0111] Although not shown, in an embodiment of the present invention, a storage medium is provided, the storage medium storing a computer program, the computer program being configured to execute any file difference-based compilation method of the embodiments of the present invention when executed.

[0112] Storage media in embodiments of the present invention include permanent and non-permanent, removable and non-removable items that can be used to store information by any method or technology. Examples of storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0113] The methods, programs, systems, devices, etc. of the embodiments of the present invention may be executed or implemented in a single or multiple networked computers, or may be practiced in a distributed computing environment. In the embodiments of this specification, in these distributed computing environments, tasks may be performed by remote processing devices connected via a communication network.

[0114] Those skilled in the art should understand that the embodiments of the present specification may be provided as methods, systems or computer program products. Therefore, those skilled in the art may imagine that the functional modules / units or controllers and related method steps described in the above embodiments may be implemented in software, hardware or a combination of software / hardware.

[0115] Unless explicitly stated, the actions or steps of the methods, programs, and embodiments of the present invention do not have to be performed in a specific order and can still achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.

[0116] In this article, multiple embodiments of the present invention are described, but for the sake of brevity, the description of each embodiment is not exhaustive, and the same or similar features or parts between the embodiments may be omitted. In this article, "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" are meant to be applicable to at least one embodiment or example according to the present invention, but not all embodiments. The above terms do not necessarily mean to refer to the same embodiment or example. In the absence of contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples.

[0117] The exemplary systems and methods of the present invention have been specifically shown and described with reference to the above embodiments, which are merely examples of the best modes for implementing the present systems and methods. It will be appreciated by those skilled in the art that various changes may be made to the embodiments of the systems and methods described herein when implementing the present systems and / or methods without departing from the spirit and scope of the present invention as defined in the appended claims.

Claims

1. A lithology identification method, characterized in that: The following steps are involved: S1: Collect drilling cores and obtain core image data, classify the core image data, clean and normalize the data, and obtain standardized core image data; S2: Based on the standardized core image data, the training set, validation set and test set are divided according to the preset ratio, and a lithology recognition model based on the CoreViT neural network model is established, where: The CoreViT neural network model includes: an image segmentation module, a parallel self-attention module, a classification module and a multi-layer perceptron module. The image segmentation module is used to decompose the image into local areas and convert each local area into a vector form; the parallel self-attention module is used to process these vectors using a parallel multi-head attention mechanism and a feedforward neural network to extract useful feature information; the multi-layer perceptron module is used to improve the nonlinear fitting ability of the model and map the feature vectors to the probability distribution of the predicted category; the classification module is used to summarize the learning information of the parallel self-attention module, introduce a "class token" to summarize the information of all image blocks, and generate the final prediction result. The process of establishing the lithology identification model based on the CoreViT neural network model is as follows: The standardized core image data is input and divided into N equal-sized and non-overlapping image blocks, and the size of each image block is P. Expand the image patch into a one-dimensional vector and add the positional encoding: X′ e =Concat([x p1 ;x p2 ;…;x pN ])*E; X e =X′ e +x pos ; Where x∈R H×W×C is the normalized core image data, x pi is the i-th image block; the Concat function is used to concatenate all image blocks together according to the specified dimension; E represents the learning matrix, which is used for continuous iteration of the model; x pos is the position code, The image block is input into the parallel self-attention module. The parallel self-attention module includes two multi-head attention mechanisms and two multi-layer perceptrons. The parallel self-attention module parallelizes the multi-head attention mechanism and the multi-layer perceptron, and puts the input image block into the two multi-head attention mechanism modules and the two multi-layer perceptron modules at the same time. The multi-head attention mechanism repeatedly learns through the Q, K and V matrices to enable each image block to obtain global information. After each image block obtains the global information, residual link processing is performed: Q,K,V=X e (W q ,W k ,W v ); X e =LN(X e ); X e+1 =LN(MHSA(Q,K,V)); The processing process of the parallel self-attention module is: X′ e+1 =MHSA1(X e )+MHSA2(X e )+X e ; X e+1 =MLP1(LN(X′ e+1 ))+MLP2(LN(X ′ e+1 ))+X′ e+1 ; In the formula, LNN represents the layer normalization function, MHSA represents the multi-head attention function, MLP is the multi-layer perceptron module, and W q ,W k ,W v Represent three different learnable matrices, X e Represents the vector of all image blocks concatenated together according to the specified dimension, X′ e+1 represents the calculation result after a parallel attention module learning, X e+1 It represents the calculation result after being processed by two multi-layer perceptron modules. The classification module introduces "class tokens" into the image blocks and learns them together with the image blocks learned by the parallel self-attention module. The process is as follows: it consists of a multi-head attention mechanism module and a multi-layer perceptron module, "layer normalization" is performed before each multi-head attention mechanism module and multi-layer perceptron module, and a residual connection is added after each multi-head attention mechanism module and multi-layer perceptron module. The "class token" learns the information of all image blocks, makes a comprehensive judgment, and finally obtains the classification result; S3: Use the stochastic gradient descent method to continuously optimize and iterate the lithology identification model until the optimal lithology identification model is obtained; S4: Identify the target test well core image based on the optimal lithology identification model, compare and analyze the output prediction results with the standard labels, and obtain the final lithology identification model.

2. The lithology identification method according to claim 1, characterized in that: The drilling core in step S1 includes limestone, mudstone and / or algal limestone.

3. The lithology identification method according to claim 1, characterized in that: The process of classifying the core image data in step S1 includes: marking the core column, matching the lithology with the well depth one by one, and classifying the lithology images of the same lithology; The data cleaning process is to remove damaged core column images and blurred images; The normalization process is as follows: In the formula, norm is the value after standardization, x i is the image pixel value, max(x) is the maximum value of the image pixel, and min(x) is the minimum value of the image pixel.

4. The lithology identification method according to claim 1, characterized in that: In step S2, the total amount of data of the training set, the validation set and the test set is divided according to a preset ratio of 7:2:

1.

5. The lithology identification method according to claim 1, characterized in that: The optimal lithology identification model in step S3 includes six parallel self-attention modules and two multi-layer perceptron modules; the Adam optimizer is used in the process of optimizing and iterating the lithology identification model, and the loss function adopts the cross entropy loss function.

6. A lithology identification system, characterized in that: The lithology identification method according to any one of claims 1 to 5 comprises: The acquisition and processing module is used to acquire drilling cores and obtain core image data, classify the core image data, clean the data and normalize the data to obtain standardized core image data; The model building module is used to divide the training set, validation set and test set according to the preset ratio based on the standardized core image data, and to establish a lithology recognition model based on the CoreViT neural network model; Iteration module, used to continuously optimize and iterate the lithology identification model using the stochastic gradient descent method until the optimal lithology identification model is obtained; The output module is used to identify the target test drilling core image based on the optimal lithology identification model, compare and analyze the output prediction results with the standard labels, and obtain the final lithology identification model.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the lithology identification method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the lithology identification method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Lithology identification method and system, computer equipment and storage medium

    CN116935115A