Borehole wall collapse azimuth identification method and device based on well logging image

By preprocessing and model recognition of well logging images, effective connected regions in the binary images of the collapse area are identified and expanded, solving the problems of low efficiency and low accuracy in well wall collapse location identification in existing technologies, and achieving more efficient and accurate well wall collapse location identification.

CN122156311APending Publication Date: 2026-06-05CHINA OILFIELD SERVICES LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA OILFIELD SERVICES LTD
Filing Date
2026-05-08
Publication Date
2026-06-05

Smart Images

  • Figure CN122156311A_ABST
    Figure CN122156311A_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a well wall collapse direction identification method and device based on a well logging image. The method comprises the following steps: obtaining a well logging image after image preprocessing; inputting the well logging image into a pre-trained collapse area identification model to obtain a collapse area binary image output by the collapse area identification model; performing horizontal extension on the collapse area binary image to obtain an extended binary image; identifying an effective collapse connected domain in the extended binary image; and calculating a well wall collapse direction according to the effective collapse connected domain. By using the scheme, the misjudgment rate of the well wall collapse direction can be reduced, the identification accuracy of the well wall collapse direction is improved, and the identification efficiency of the well wall collapse direction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, specifically to a method and apparatus for identifying the orientation of wellbore collapse based on well logging images. Background Technology

[0002] Wellbore collapse orientation refers to the geographical location corresponding to the direction of maximum wellbore diameter expansion caused by shear failure of the wellbore rock under in-situ stress differential. Identifying wellbore collapse orientation can provide a scientific and reliable basis for decision-making in key engineering aspects such as determining horizontal stress orientation, early warning of drilling imaging risks, and optimization of fracturing operation parameters.

[0003] However, during implementation, the inventors discovered the following drawbacks in the existing technology: the commonly used method for identifying the location of wellbore collapse is manual picking from logging images. However, this method is inefficient, has a high false positive rate, and low accuracy. Summary of the Invention

[0004] In view of the above problems, this application is made in order to provide a method and apparatus for wellbore collapse location identification based on well logging images that overcomes or at least partially solves the above problems.

[0005] According to a first aspect of this application, a method for identifying the orientation of wellbore collapse based on well logging images is provided, comprising: Acquire well logging images after image preprocessing; The well logging image is input into a pre-trained collapse area recognition model to obtain a binary image of the collapse area output by the collapse area recognition model. The binary image of the collapsed area is horizontally expanded to obtain an expanded binary image; Identify valid collapsed connected components in the extended binary image; The wellbore collapse azimuth is calculated based on the effective collapse connectivity domain.

[0006] In one optional implementation, acquiring the preprocessed logging images includes: Acquire raw well logging images; The original logging image is subjected to grayscale normalization processing to obtain a grayscale logging image; The grayscale logging images are subjected to column dimension unification processing to generate intermediate logging images; The intermediate logging image is symmetrically filled to obtain a pre-processed logging image.

[0007] In one optional implementation, the step of laterally expanding the binary image of the collapsed area to obtain an expanded binary image includes: Obtain the data matrix of the binary image of the collapse area; The two data matrices are concatenated horizontally along the column dimension to obtain an extended matrix; The extended binary image is generated based on the extended matrix.

[0008] In one optional implementation, identifying valid collapsed connected components in the extended binary image includes: Candidate collapsed connected components in the extended binary image are identified based on the eight-way connectivity rule and the unary lookup set union algorithm. For any candidate collapsed connected component, calculate the proportion of left and right edge pixels within the candidate collapsed connected component; If the percentage does not exceed the preset percentage, then the candidate collapsed connected component is determined as a valid collapsed connected component.

[0009] In one optional implementation, calculating the wellbore collapse azimuth based on the effective collapse connectivity includes: For any valid collapsed connected component, determine the depth range covered by the valid collapsed connected component; For any depth unit within this depth range, calculate the center position of the effective collapse connectivity within that depth unit, and determine the wellbore collapse azimuth of the effective collapse connectivity within that depth unit based on the center position.

[0010] In one optional implementation, the collapse area identification model is trained in the following manner: The acquired historical logging images are preprocessed to obtain preprocessed historical logging images. Generate labeled images corresponding to the historical logging images, and generate paired samples of historical logging images and labeled images; The paired samples are then subjected to sliding cropping to generate a sample set; The pre-built initial collapse area identification model is trained using the sample set to obtain the trained collapse area identification model.

[0011] According to a second aspect of this application, a wellbore collapse location identification device based on well logging images is provided, comprising: The acquisition module is used to acquire well logging images after image preprocessing; The model prediction module is used to input the well logging image into a pre-trained collapse area recognition model to obtain a binary image of the collapse area output by the collapse area recognition model. An extension module is used to horizontally extend the binary image of the collapsed area to obtain an extended binary image; The identification module is used to identify valid collapsed connected components in the extended binary image; The calculation module calculates the wellbore collapse orientation based on the effective collapse connectivity.

[0012] In one optional implementation, the acquisition module is used to: acquire raw well logging images; The original logging image is subjected to grayscale normalization processing to obtain a grayscale logging image; The grayscale logging images are subjected to column dimension unification processing to generate intermediate logging images; The intermediate logging image is symmetrically filled to obtain a pre-processed logging image.

[0013] In one optional implementation, the extension module is used to: acquire a data matrix of the binary image of the collapse area; The two data matrices are concatenated horizontally along the column dimension to obtain an extended matrix; The extended binary image is generated based on the extended matrix.

[0014] In one alternative implementation, the identification module is used to: identify candidate collapsed connected components in the extended binary image based on eight-way connectivity rules and a disjoint-set union algorithm; For any candidate collapsed connected component, calculate the proportion of left and right edge pixels within the candidate collapsed connected component; If the percentage does not exceed the preset percentage, then the candidate collapsed connected component is determined as a valid collapsed connected component.

[0015] In one alternative implementation, the identification module is used to: determine the depth range covered by any valid collapsed connected domain; For any depth unit within this depth range, calculate the center position of the effective collapse connectivity within that depth unit, and determine the wellbore collapse azimuth of the effective collapse connectivity within that depth unit based on the center position.

[0016] In one optional embodiment, the device further includes: a training module for preprocessing the acquired historical logging images to obtain preprocessed historical logging images; Generate labeled images corresponding to the historical logging images, and generate paired samples of historical logging images and labeled images; The paired samples are then subjected to sliding cropping to generate a sample set; The pre-built initial collapse area identification model is trained using the sample set to obtain the trained collapse area identification model.

[0017] According to a third aspect of this application, a computing device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the above-described wellbore collapse orientation identification method based on logging images.

[0018] According to a fourth aspect of this application, a computer storage medium is provided, wherein at least one executable instruction is stored in the storage medium, the executable instruction causing a processor to perform the operation corresponding to the above-described wellbore collapse orientation identification method based on logging images.

[0019] According to a fifth aspect of this application, a computer program product is provided, comprising at least one executable instruction that causes a processor to perform operations corresponding to the above-described wellbore collapse orientation identification method based on logging images.

[0020] This application provides a method, apparatus, computing device, computer storage medium, and computer program product for wellbore collapse location identification based on logging images. It obtains a binary image of the collapse region through a collapse region identification model, and then horizontally expands this binary image to obtain an extended binary image. Furthermore, it identifies effective collapse connected components in the extended binary image and calculates the wellbore collapse location based on these components. Using this scheme can reduce the false positive rate of wellbore collapse location identification, improve the accuracy and efficiency of wellbore collapse location identification.

[0021] The above description is merely an overview of the technical solutions of the embodiments of this application. In order to better understand the technical means of the embodiments of this application and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of this application more obvious and understandable, specific implementation methods of the embodiments of this application are described below. Attached Figure Description

[0022] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the embodiments of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating a wellbore collapse orientation identification method based on well logging images provided in Embodiment 1 of this application is shown. Figure 2 A flowchart illustrating a well logging image acquisition method provided in Embodiment 1 of this application is shown. Figure 3This illustration shows a schematic diagram of a well logging image provided in Embodiment 1 of this application; Figure 4 This illustration shows a schematic diagram of a binary image of a collapse region provided in Embodiment 1 of this application; Figure 5 This illustration shows a lateral expansion schematic provided in Embodiment 1 of this application; Figure 6 This illustration shows a schematic diagram of invalid collapsed connected component removal provided in Embodiment 1 of this application; Figure 7 A flowchart illustrating a wellbore collapse azimuth calculation method provided in Embodiment 1 of this application is shown. Figure 8 This illustration shows a schematic diagram of an azimuth mapping provided in Embodiment 1 of this application; Figure 9 A flowchart illustrating a method for training a collapse region identification model according to Embodiment 2 of this application is shown. Figure 10 This illustration shows a structural schematic diagram of a wellbore collapse orientation identification device based on well logging images provided in Embodiment 3 of this application; Figure 11 A schematic diagram of the structure of a computing device provided in Embodiment Six of this application is shown. Detailed Implementation

[0023] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0024] Example 1 Figure 1 The diagram shows a flowchart of a wellbore collapse location identification method based on well logging images provided in Embodiment 1 of this application.

[0025] like Figure 1 As shown, the method specifically includes the following steps: Step S101: Obtain the well logging image after image preprocessing.

[0026] This application embodiment uses well logging images obtained by imaging logging techniques such as ultrasonic imaging logging as a basis to identify the location of wellbore collapse. Specifically, an initial well logging image generated from imaging logging data is acquired, and the initial well logging image is preprocessed to obtain the corresponding well logging image. Subsequent processing is based on the preprocessed well logging image.

[0027] In one alternative implementation, specifically, it can be adopted Figure 2 The steps shown illustrate how to obtain preprocessed well logging images: S1011, acquire the raw well logging image.

[0028] Acquire imaging logging data and generate raw logging images based on the imaging logging data. These raw logging images are unprocessed images.

[0029] S1012, perform grayscale normalization on the original logging image to obtain a grayscale logging image.

[0030] The data type of the original well logging image is usually floating-point or integer. Therefore, grayscale normalization is used to convert the data values ​​of the original well logging image into integer grayscale values ​​of 0-255.

[0031] Furthermore, a fixed color mark mapping rule is used to convert grayscale values ​​into color brightness, resulting in a grayscale value matrix. For example, in the color mark mapping process, grayscale value 0 corresponds to the lowest pixel brightness (pure black), grayscale value 255 corresponds to the highest pixel brightness (pure white), and grayscale values ​​1-254 correspond to gradient brightness between pure black and pure white.

[0032] Further, a grayscale logging image is generated based on the grayscale value matrix. Specifically, according to the row and column distribution of the grayscale value matrix, and following the mapping relationship between rows corresponding to well depth and columns corresponding to well perimeter, each grayscale value is converted into the color value of the corresponding pixel, thereby rendering a two-dimensional grayscale image, which is the grayscale logging image. In this grayscale logging image, the wellbore collapse area will be presented as a pixel area with a specific brightness because the logging value response is different from that of the surrounding rock, which is beneficial for subsequent image segmentation and recognition.

[0033] S1013 performs column dimension unification processing on grayscale logging images to generate intermediate logging images.

[0034] Given the inconsistent specifications of acoustic imaging logging image data from different logging service providers (e.g., some logging instruments have 180 columns, while others have 250 columns), grayscale logging images undergo column dimension unification processing to ensure data consistency. The logging image obtained after column dimension unification processing is called an intermediate logging image.

[0035] Specifically, bilinear interpolation is used to scale the image column dimension to 360 columns, with a scaling ratio of 360 / N, where N is the original number of columns before scaling. Each column of the scaled well logging image corresponds one-to-one with the azimuth angle from 0° to 359° around the well, i.e., the first column corresponds to 0°, the second column corresponds to 1°, and so on, with the 360th column corresponding to 359°, while the row dimension remains unchanged.

[0036] S1014, perform symmetrical filling processing on the intermediate logging image to obtain the preprocessed logging image.

[0037] To adapt to subsequent model recognition, this step further performs symmetrical filling processing on the intermediate logging images to obtain the final logging images after image preprocessing.

[0038] For example, if the collapse region identification model in this application embodiment adopts a 4-layer pooled U-Net model, it typically requires the input image width or number of columns to be 2. 4 =A multiple of 16, therefore, in this step, 4 columns are symmetrically filled on each side of the middle logging image of 360 columns. That is, the pixel values ​​of the edge columns are copied and filled to obtain a logging image with a width of 368 columns. This ensures that the logging image meets the requirements of subsequent model processing and also ensures that the collapse features of the left and right edges of the image are not lost during the model downsampling process.

[0039] Step S102: Input the well logging image into the pre-trained collapse area recognition model to obtain the binary image of the collapse area output by the collapse area recognition model.

[0040] A collapse region identification model is pre-built and trained based on machine learning algorithms (deep learning algorithms). This model can analyze well logging images to obtain binary images of collapse regions. The binary images of collapse regions are the same size as the well logging images input to the model. Each pixel in the binary image of the collapse region has only two possible values, used to distinguish between collapse regions and non-collapse regions. For example, a pixel value of "1" represents a collapse region, and a pixel value of "0" represents a non-collapse region. In other words, the binary image of the collapse region is a visual representation of the collapse region identification results from the well logging image.

[0041] For example, Figure 3 The well logging image shown is input into the collapse area recognition model, and the result is as follows: Figure 4 The image shown is a binary image of the collapsed area. Figure 4 Black pixels represent pixels in the collapsed area, while white pixels represent pixels in the non-collapsed area.

[0042] Step S103: Horizontally expand the binary image of the collapsed area to obtain an expanded binary image.

[0043] To address the issue of fragmented left and right edges and inconsistencies with the actual annular physical structure of the wellbore caused by the planarization of the cylindrical structure, this step restores the physical continuity of the image edges and improves the accuracy of collapse area identification. This step involves horizontally expanding the binary image of the collapse area to obtain an expanded binary image.

[0044] In the specific implementation process, the data matrix of the binary image of the collapse area is obtained, the two data matrices are horizontally concatenated along the column dimension to obtain the extended matrix, and the extended binary image is generated based on the extended matrix.

[0045] For example, the data matrix of the binary image of the collapse area is H represents the row dimension, W represents the column dimension, and the column coordinates range from [1, 360]. The two data matrices M are horizontally concatenated along the column dimensions to form an extended matrix. The column coordinates of the spliced ​​extended matrix range from [1, 720], thus forming an extended matrix with doubled column dimensions and unchanged row dimensions. That is, the left edge (column 1) of the binary image of the collapsed region and the right edge (column 720) of the copy of the binary image of the collapsed region are continuously connected in the extended matrix.

[0046] like Figure 5 As shown, a 360-column binary image copy of the collapsed region is horizontally stitched (i.e. horizontally expanded) with the 360-column binary image of the collapsed region to generate a 720-column expanded binary image.

[0047] Step S104: Identify valid collapsed connected components in the extended binary image.

[0048] This step expands the discrete collapse pixels in the binary image, aggregates them into meaningful independent collapse regions according to spatial adjacency, i.e. collapse connected regions, and identifies effective collapse connected regions that can truly reflect collapse characteristics from the collapse connected regions, thus providing an accurate data foundation for the subsequent calculation of well wall collapse orientation.

[0049] In one alternative implementation, valid collapsed connected components can be identified in the following way: First, candidate collapsed connected components in extended binary images are identified based on the eight-way connectivity rule and the disjoint-set union algorithm. Specifically, the pixel connectivity standard is set as eight-way connectivity, meaning that for any pixel, its eight neighboring pixels (top, bottom, left, right, top-left, top-right, bottom-left, bottom-right) are considered connected to that pixel. Eight-way connectivity can more accurately reflect the continuous shape of regions in a two-dimensional image, especially for irregularly shaped collapsed regions, it can better maintain the integrity of the region. In the initial screening of candidate collapsed connected components, the disjoint-set union algorithm can be used for fast identification. For example, initially, each collapsed pixel (e.g., pixel value corresponding to "1") is assigned an independent set. Further connectivity checks are performed based on the eight-way connectivity rule. If the sets are connected, the disjoint-set union merge operation is called to merge the sets. This process is repeated iteratively to obtain the final sets, with each nearest set corresponding to a candidate collapsed connected component. Optionally, a minimum number of pixels can be set for the connected component. If the number of pixels contained in a candidate collapsed connected component is less than this minimum number of pixels, the connected component is discarded, i.e., it is not considered a candidate collapsed connected component, thus avoiding the influence of noise and improving recognition accuracy. This approach can effectively handle complex scenarios such as irregular collapsed shapes or those close to image edges, avoiding the shortcomings of traditional methods such as missed or incorrect selections, and improving the scenario adaptability and universality of this solution.

[0050] Further, valid collapsed connected components are identified from the candidate collapsed connected components. Specifically, for any candidate collapsed connected component, the proportion of pixels at the left and right edges within the component is calculated. If the proportion does not exceed a preset proportion, the candidate collapsed connected component is determined to be a valid collapsed connected component. For example, for any candidate collapsed connected component, the number of pixels located at the left and right edges (e.g., column 1 or column 720) of the extended binary image within the component is counted. The proportion of pixels at the left and right edges within the component is obtained by comparing the number of pixels to the total number of pixels in the component. This proportion is compared with a preset proportion (e.g., 5%). If the proportion exceeds the preset proportion, the component is determined to be an invalid collapsed connected component and discarded; if the proportion does not exceed the preset proportion, the component is determined to be a valid collapsed connected component.

[0051] like Figure 6 As shown, although there are candidate collapsed connected components at the boundary in the extended binary image, the boundary pixel ratio of the collapsed connected components at the boundary exceeds the corresponding threshold. Therefore, the candidate collapsed connected components at the boundary are identified as invalid collapsed connected components. After removing the invalid collapsed connected components at the boundary, the binary image after removing the invalid collapsed connected components is obtained.

[0052] Step S105: Calculate the wellbore collapse orientation based on the effective collapse connectivity domain.

[0053] For each effective collapse connectivity region, calculate the wellbore collapse orientation corresponding to that effective collapse connectivity region.

[0054] In one alternative implementation, specifically, it can be adopted Figure 7 The steps shown calculate the wellbore collapse azimuth corresponding to any effective collapse connected region. In other words, the wellbore collapse azimuth corresponding to each effective collapse connected region can be calculated using the following steps: S1051, determine the depth range covered by the effective collapse connectivity domain.

[0055] For any valid collapsed connected component, determine the depth range covered by the valid collapsed connected component. Specifically, obtain the pixel coordinates of each pixel in the valid collapsed connected component, and determine the depth range covered by the valid collapsed connected component based on the pixel row coordinates (corresponding to the depth dimension), that is, obtain the row coordinate range covered by the valid collapsed connected component.

[0056] S1052, For any depth cell within this depth range, calculate the center position of the effective collapse connectivity within that depth cell.

[0057] A depth cell can correspond to a row coordinate. By traversing each depth cell of the effective collapsed connected region, the center position of the effective collapsed connected region within the depth cell is calculated based on the pixel coordinates that are located within the effective collapsed connected region and belong to the currently traversed depth cell.

[0058] For example, the extended binary image is set with column dimension x (corresponding to the wellbore azimuth direction) and row dimension y (corresponding to the well depth direction). For any valid collapsed connected component, the coordinate set of all pixels in the valid collapsed connected component is extracted. The column coordinates of all collapsed pixels in the row are counted by grouping by row coordinate y. The arithmetic mean of the column coordinates of each row is taken as the center column coordinate of the row, i.e., the center position.

[0059] Specifically, the wellbore collapse azimuth angle can be calculated using the following formula 1: (Formula 1) in, This represents the center column coordinates of the i-th row or the i-th depth cell, and can also be called the center position of the i-th row or the i-th depth cell. This represents the number of collapsed pixels in the i-th row or i-th depth unit within the currently analyzed valid collapsed connected region; It represents the column coordinate (or well azimuth) of the j-th cell in the i-th row or i-th depth cell within the effective collapse connectivity domain currently being analyzed.

[0060] S1053, based on the center location, determine the wellbore collapse azimuth of the effective collapse connectivity domain in the depth unit.

[0061] For each depth cell of the effective collapse connectivity domain, the wellbore collapse azimuth of the depth cell is determined based on the center position of the depth cell.

[0062] Specifically, since the center position corresponds to the column center coordinates, the center position is converted into an azimuth angle, which is then the wellbore collapse azimuth angle for that depth unit. Specifically, the 720-column-dimensional center coordinates can be mapped to the 360-column-dimensional azimuth angle using the modulo operation of Formula 2 as follows: (Formula 2) in, Indicates the wellbore collapse azimuth of the i-th row or i-th depth cell; This indicates the center position of the i-th row or the i-th depth cell; mod represents the modulo operation.

[0063] like Figure 8 As shown, by calculating the center position, the center position of each effective collapse connected region at different depths in the 720-column extended binary image can be obtained. By mapping the center position of the 720-column extended binary image to the azimuth angle of the 360-column collapse region binary image, the 360-column collapse region binary image with the mapped azimuth angle can be obtained.

[0064] This step yields a set of wellbore collapse azimuth angles for the effective collapse connectivity region. This set includes the wellbore collapse azimuth angles corresponding to each depth unit within the coverage area of ​​the effective collapse connectivity region. This method enables precise quantification of the azimuth angles of the collapse area, overcoming the errors caused by the subjectivity of traditional manual selection and the approximation of polygon fitting, thus ensuring that the azimuth angle calculation accuracy meets engineering requirements such as accurate evaluation of ground stress.

[0065] Therefore, the wellbore collapse orientation identification method based on logging images provided in this application obtains a binary image of the collapse region through a collapse region identification model, and then horizontally expands the binary image of the collapse region to obtain an extended binary image. Further, it identifies the effective collapse connected components in the extended binary image and calculates the wellbore collapse orientation based on these effective collapse connected components. Using this scheme can reduce the misjudgment rate of wellbore collapse orientation, improve the accuracy of wellbore collapse orientation identification, and enhance the efficiency of wellbore collapse orientation identification.

[0066] Example 2 Figure 9 The diagram shows a flowchart of a method for training a collapse area identification model according to Embodiment 2 of this application.

[0067] like Figure 9 As shown, the method specifically includes the following steps: Step S901: Construct an initial collapse area identification model.

[0068] Specifically, an initial collapse region identification model is constructed based on the U-Net segmentation model. For example, the collapse region identification model can be constructed as a 4-layer U-Net segmentation model, which can adopt an encoder-decoder symmetric structure and may include the following core components: Encoder: The encoder extracts image features by downsampling through successive convolutional and pooling layers. Each layer contains two 3×3 convolutional layers, followed by batch normalization and ReLU activation. After each layer, 2×2 max pooling is used for downsampling, thereby halving the feature map size and doubling the number of channels.

[0069] Decoder: The decoder upsamples the feature maps through deconvolutional layers and concatenates them with the feature maps of the corresponding layers in the encoder, ultimately outputting a segmentation result that matches the input size. Each layer contains a 2×2 deconvolutional layer for upsampling, thus doubling the feature map size and halving the number of channels. After upsampling, it is concatenated with the feature maps of the corresponding layers in the encoder (e.g., skip connections) to fuse low-level detail information with high-level semantic information. After concatenation, two 3×3 convolutional layers can be added, each followed by batch normalization and ReLU activation functions. A total of 4 upsampling layers are included, gradually restoring the input size.

[0070] Feature stitching module: directly stitches the feature maps of each layer of the encoder before downsampling (preserving rich spatial details) onto the feature maps of the corresponding layers of the decoder after upsampling.

[0071] Output layer: Finally, a 1×1 convolutional layer maps the feature map to a single-channel output; the output tensor size is the same as the input image, and each pixel value represents the probability that the location belongs to the collapse region. A probability threshold is then used to determine whether the pixel value is "1" or "0".

[0072] Step S902: Perform image preprocessing on the acquired historical logging images to obtain preprocessed historical logging images.

[0073] Historical well logging images are acquired as initial data, and preprocessed images are obtained. These preprocessing methods include: grayscale normalization, column dimension unification, and symmetry padding.

[0074] The grayscale normalization process specifically involves: converting grayscale values ​​into color brightness using a fixed color mark mapping rule to obtain a grayscale value matrix; and generating grayscale historical logging images based on the grayscale value matrix.

[0075] The column dimension unification process specifically involves using bilinear interpolation to scale the image column dimension to 360 columns to unify different data specifications.

[0076] The symmetric padding process involves symmetrically padding four columns on each side of the 360-column well logging image, essentially copying the pixel values ​​of the edge columns to obtain a 368-column wide well logging image. Specifically, the subsequent input to the collapse region recognition model in this application is the training set processed with symmetric padding. Since collapse regions exhibit symmetrical distribution in the horizontal direction, and narrow-band collapse features often exist at the wellbore edges, symmetrical padding in the column dimension (well perimeter direction) prevents the loss of edge collapse regions during convolution and pooling, ensuring the integrity and symmetry of edge features during learning. Furthermore, the collapse region recognition model in this application employs a four-layer U-Net model, and the input column dimension must satisfy 2... 4 The requirement is a multiple of 16. Therefore, this solution symmetrically fills the original 360-column image to 368 columns (23 times 16) during the preprocessing process to ensure that the feature maps are size-matched and stitched without deviation during upsampling and downsampling.

[0077] The specific preprocessing steps can be found in step S101, and will not be repeated here.

[0078] Step S903: Generate labeled images corresponding to historical logging images, and generate paired samples of historical logging images and labeled images.

[0079] By annotating the collapse areas of historical well logging images, a corresponding labeled image is obtained. The labeled image is a binarized long image, stored in a single-channel 8-bit grayscale format. Each pixel value in the labeled image contains only two values, corresponding to collapsed and non-collapsed pixels respectively. For example, the pixel value of a collapsed pixel in the labeled image is "1", and the pixel value of a non-collapsed pixel is "0".

[0080] In one alternative implementation, historical well logging images can be manually annotated to mark the collapse areas and generate annotated images.

[0081] In another optional implementation, a combination of automatic recommendation and manual verification can be used to annotate collapse areas in historical well logging images to generate labeled images. Specifically, a region selection algorithm based on color similarity initially selects and recommends candidate collapse areas. Based on these recommended candidate collapse areas, fine-tuning operations (such as selecting boundaries) by the operator are then performed to obtain the final labeled image. During the initial selection of candidate collapse areas using the color similarity-based region selection algorithm, a grayscale similarity threshold is set. If the grayscale value of a pixel is lower than this threshold, that pixel is included in the candidate collapse area. This grayscale similarity threshold can be determined based on the average pixel value of the entire image; for example, a preset percentage of the average pixel value can be used as the grayscale similarity threshold.

[0082] After obtaining the labeled images, historical logging images are aligned and associated with the labeled images to obtain paired samples of historical logging images and labeled images. Specifically, for any historical logging image, a labeled sample based on that historical logging image is obtained, and the association between the two is established. The spatial location association between the associated historical logging images and labeled images is established to ensure that the coordinates of the two in the dimensions of well depth and wellbore azimuth are completely matched, thus obtaining paired samples of historical logging images and labeled images, thereby maintaining the integrity and correspondence of single-well data.

[0083] Step S904: Perform sliding cropping on the paired samples to generate a sample set.

[0084] The generated paired samples are added to the sample set. Additionally, to further increase the sample size and improve the model's generalization ability, this step performs synchronous sliding pruning on the paired samples to obtain pruned sample pairs, which are then added to the sample set.

[0085] In the specific implementation process, the row dimension of the cropped image is set to n (e.g., n=512), the sliding window step size is n / 2, and adjacent cropped images overlap by 50%. Paired samples are then synchronously slid-cropped. This expands the sample size while preserving the continuity of features along the well depth direction, ultimately forming a labeled sample set for wellbore collapse feature recognition. Corresponding sample pairs in the sample set are named consistently, ensuring that original images and labeled images at the same spatial location can be directly matched via filenames, avoiding sample misalignment.

[0086] In addition, since the thickness of the collapse area varies in the long plot of a single well, the sample pairs after the paired samples are cropped can be further provided to professional technicians for review and appropriate retention as needed. This ensures that during the subsequent model training process, the model can learn both effective samples containing collapse areas and invalid samples without collapse areas, ensuring that the ratio of effective samples to invalid samples in the sample library is controlled between 1:1 and 1:2, thus guaranteeing the model's generalization ability.

[0087] Step S905: Use the sample set to train the pre-built initial collapse area identification model to obtain the trained collapse area identification model.

[0088] The sample set is divided into training set, validation set and test set according to a preset ratio (e.g., 7:2:1).

[0089] During training, the input to the collapse region recognition model is a preprocessed single-channel sample image with a tensor dimension of [B, 1, H, W] (B is the batch size, 1 is the single channel, and H and W are the image height and width). The output is a binary segmentation mask tensor, where a pixel value of "0" represents a non-collapse region and a pixel value of "1" represents a collapse region. Training parameters can be: batch size of 8, initial learning rate of 1×10⁻⁶. -5The parameters are optimized by combining BCEWithLogitsLoss with Dice loss. The total loss tends to converge as the number of iterations increases. The learning rate is dynamically adjusted through the validation set until the model converges, thus obtaining a trained collapse region recognition model.

[0090] To further evaluate the training performance of the trained collapse region identification model, the test set is input into the model. Performance evaluation can be achieved through a combination of quantitative metrics and visual comparisons. Quantitative metrics include the Dice Similarity Coefficient (DSC), Intersection over Union (IoU), Precision, and Recall, with a requirement of DSC ≥ 0.85 and IoU ≥ 0.75 for the test set. Visual comparisons are performed by overlaying the model's segmentation results with manually labeled results to verify the matching degree of collapse region boundaries and the accuracy of identifying non-collapse regions.

[0091] Therefore, the collapse area recognition model training method provided in this application can improve the quality of sample data by performing grayscale normalization, column dimension unification, and symmetric filling on the original image preprocessing, thereby improving the training effect of the collapse area recognition model. Moreover, sliding cropping of paired samples of historical logging images and labeled images is beneficial to expanding the sample size and improving the generalization ability of the collapse area recognition model.

[0092] Example 3 Figure 10 This paper shows a schematic diagram of a wellbore collapse location identification device based on well logging images, provided in Embodiment 3 of this application.

[0093] like Figure 10 As shown, the device 1000 includes: an acquisition module 1010, a model prediction module 1020, an expansion module 1030, an identification module 1040, and a calculation module 1050.

[0094] The acquisition module 1010 is used to acquire the well logging image after image preprocessing; The model prediction module 1020 is used to input the well logging image into a pre-trained collapse area recognition model to obtain a binary image of the collapse area output by the collapse area recognition model. The extension module 1030 is used to horizontally expand the binary image of the collapsed area to obtain an extended binary image; The identification module 1040 is used to identify valid collapsed connected components in the extended binary image; The calculation module 1050 calculates the wellbore collapse orientation based on the effective collapse connectivity domain.

[0095] In one optional implementation, the acquisition module 1010 is used to: acquire raw well logging images; The original logging image is subjected to grayscale normalization processing to obtain a grayscale logging image; The grayscale logging images are subjected to column dimension unification processing to generate intermediate logging images; The intermediate logging image is symmetrically filled to obtain a pre-processed logging image.

[0096] In one optional implementation, the extension module 1030 is used to: acquire a data matrix of the binary image of the collapse area; The two data matrices are concatenated horizontally along the column dimension to obtain an extended matrix; The extended binary image is generated based on the extended matrix.

[0097] In one optional implementation, the identification module 1040 is used to: identify candidate collapsed connected components in the extended binary image based on the eight-way connectivity rule and the disjoint-set union algorithm; For any candidate collapsed connected component, calculate the proportion of left and right edge pixels within the candidate collapsed connected component; If the percentage does not exceed the preset percentage, then the candidate collapsed connected component is determined as a valid collapsed connected component.

[0098] In one optional implementation, the identification module 1040 is used to: determine the depth range covered by any valid collapsed connected domain; For any depth unit within this depth range, calculate the center position of the effective collapse connectivity within that depth unit, and determine the wellbore collapse azimuth of the effective collapse connectivity within that depth unit based on the center position.

[0099] In one optional embodiment, the device further includes: a training module (not shown in the figure) for preprocessing the acquired historical logging images to obtain preprocessed historical logging images; Generate labeled images corresponding to the historical logging images, and generate paired samples of historical logging images and labeled images; The paired samples are then subjected to sliding cropping to generate a sample set; The pre-built initial collapse area identification model is trained using the sample set to obtain the trained collapse area identification model.

[0100] Therefore, the wellbore collapse orientation identification device based on logging images provided in this application obtains a binary image of the collapse area through a collapse area identification model, and then horizontally expands the binary image of the collapse area to obtain an extended binary image. It further identifies the effective collapse connected components in the extended binary image and calculates the wellbore collapse orientation based on these effective collapse connected components. Using this scheme, the misjudgment rate of wellbore collapse orientation can be reduced, the accuracy of wellbore collapse orientation identification can be improved, and the efficiency of wellbore collapse orientation identification can be increased.

[0101] Example 4 Embodiment 4 of this application provides a non-volatile computer storage medium storing at least one executable instruction or computer program that enables a processor to perform the operation corresponding to the wellbore collapse orientation identification method based on logging images in any of the above method embodiments.

[0102] Example 5 Embodiment 5 of this application provides a computer program product, which includes at least one executable instruction or computer program that enables a processor to perform the operation corresponding to the wellbore collapse location identification method based on logging images in any of the above method embodiments.

[0103] Example 6 Figure 11 The diagram shows a structural schematic of a computing device provided in Embodiment Six of this application. The specific embodiments of this application do not limit the specific implementation of the computing device.

[0104] like Figure 11 As shown, the computing device may include: a processor 1102, a communication interface 1104, a memory 1106, and a communication bus 1108.

[0105] The processor 1102, communication interface 1104, and memory 1106 communicate with each other via communication bus 1108. Communication interface 1104 is used to communicate with other network elements such as clients or other servers. The processor 1102 executes program 1110, specifically performing the relevant steps in the above-described embodiment of the wellbore collapse location identification method based on logging images for computing devices.

[0106] Specifically, program 1110 may include program code that includes computer operation instructions.

[0107] The processor 1102 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The computing device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0108] Memory 1106 is used to store program 1110. Memory 1106 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage.

[0109] Specifically, program 1110 can be used to cause processor 1102 to execute the wellbore collapse location identification method based on logging images in any of the above method embodiments. The specific implementation of each step in program 1110 can be found in the corresponding descriptions of the steps and units in the above embodiments of the wellbore collapse location identification method based on logging images, and will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be repeated here.

[0110] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of this application are not directed to any particular programming language. It should be understood that the contents of the embodiments of this application described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best implementation of the embodiments of this application.

[0111] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of this application may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0112] Similarly, it should be understood that, in order to streamline this disclosure and aid in understanding one or more of the various inventive aspects, features of the embodiments of this application are sometimes grouped together in a single embodiment, figure, or description thereof in the foregoing description of exemplary embodiments of the present application. However, this approach to disclosure should not be construed as reflecting an intention that the claimed embodiments of the present application require more features than expressly recited in each claim. Rather, as reflected in the claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the present application.

[0113] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0114] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the embodiments of this application and form different embodiments. For example, in the claims, any one of the claimed embodiments can be used in any combination.

[0115] The various component embodiments of this application can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components according to the embodiments of this application. The embodiments of this application can also be implemented as device or apparatus programs (e.g., computer programs and computer program products) for performing part or all of the methods described herein. Such programs implementing the embodiments of this application can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

[0116] It should be noted that the above embodiments are illustrative of the embodiments of this application and not limiting of the embodiments of this application, and those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. Embodiments of this application can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.

Claims

1. A method for identifying the location of wellbore collapse based on well logging images, characterized in that, include: Acquire well logging images after image preprocessing; The well logging image is input into a pre-trained collapse area recognition model to obtain a binary image of the collapse area output by the collapse area recognition model. The binary image of the collapsed area is horizontally expanded to obtain an expanded binary image; Identify valid collapsed connected components in the extended binary image; The wellbore collapse azimuth is calculated based on the effective collapse connectivity.

2. The method according to claim 1, characterized in that, The acquired preprocessed logging images include: Acquire raw well logging images; The original logging image is subjected to grayscale normalization processing to obtain a grayscale logging image; The grayscale logging images are subjected to column dimension unification processing to generate intermediate logging images; The intermediate logging image is symmetrically filled to obtain a pre-processed logging image.

3. The method according to claim 1, characterized in that, The process of horizontally expanding the binary image of the collapsed area to obtain the expanded binary image includes: Obtain the data matrix of the binary image of the collapse area; The two data matrices are concatenated horizontally along the column dimension to obtain an extended matrix; The extended binary image is generated based on the extended matrix.

4. The method according to any one of claims 1-3, characterized in that, The identification of effective collapsed connected components in the extended binary image includes: Candidate collapsed connected components in the extended binary image are identified based on the eight-way connectivity rule and the unary lookup set union algorithm. For any candidate collapsed connected component, calculate the proportion of left and right edge pixels within the candidate collapsed connected component; If the percentage does not exceed the preset percentage, then the candidate collapsed connected component is determined as a valid collapsed connected component.

5. The method according to any one of claims 1-3, characterized in that, The step of calculating the wellbore collapse azimuth based on the effective collapse connectivity includes: For any valid collapsed connected component, determine the depth range covered by the valid collapsed connected component; For any depth unit within this depth range, calculate the center position of the effective collapse connectivity within that depth unit, and determine the wellbore collapse azimuth of the effective collapse connectivity within that depth unit based on the center position.

6. The method according to any one of claims 1-3, characterized in that, The collapse area identification model was trained in the following manner: The acquired historical logging images are preprocessed to obtain preprocessed historical logging images. Generate labeled images corresponding to the historical logging images, and generate paired samples of historical logging images and labeled images; The paired samples are then subjected to sliding cropping to generate a sample set; The pre-built initial collapse area identification model is trained using the sample set to obtain the trained collapse area identification model.

7. A device for identifying the location of wellbore collapse based on well logging images, characterized in that, include: The acquisition module is used to acquire well logging images after image preprocessing; The model prediction module is used to input the well logging image into a pre-trained collapse area recognition model to obtain a binary image of the collapse area output by the collapse area recognition model. An extension module is used to horizontally extend the binary image of the collapsed area to obtain an extended binary image; The identification module is used to identify valid collapsed connected components in the extended binary image; The calculation module calculates the wellbore collapse orientation based on the effective collapse connectivity.

8. A computing device, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the wellbore collapse orientation identification method based on logging images as described in any one of claims 1-6.

9. A computer storage medium, characterized in that, The storage medium stores at least one executable instruction, which causes the processor to perform the operation corresponding to the wellbore collapse orientation identification method based on logging images as described in any one of claims 1-6.

10. A computer program product, characterized in that, It includes at least one executable instruction that causes the processor to perform the operation corresponding to the wellbore collapse orientation identification method based on logging images as described in any one of claims 1-6.