A method for identifying rock stratigraphic boundaries based on data association and topology preservation

CN122574471APending Publication Date: 2026-08-14CHINA CONSTR CIVIL ENG CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-27
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

1、数据来源异构与对齐困难:工程文档版式各异,现场照片拍摄角度、光照不一,如何将这些异构数据源自动、准确地关联起来,并生成具有一致视角的、可供模型训练的样本集,是自动化处理的首要障碍

Benefits of technology

1.本发明采用基于视位模板引导的数据关联与生成方法,能够自动、准确地将无序的原始现场照片与标准化的视位原型进行关联配对,实现了从非结构化异构数据到带有明确视位类别标签的高质量结构化样本集的转化,为自动化深度学习提供了可靠的数据基础。解决数据来源异构(工程文档与现场照片视角不一)导致的数据对齐困难与人工整理耗时问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122574471A_ABST
    Figure CN122574471A_ABST
Patent Text Reader

Abstract

This invention discloses a method for identifying rock strata boundaries based on data association and topology preservation. A standardized viewpoint template is created through human-computer interaction, and prototype images are extracted from engineering documents using this template. A local feature matching algorithm automatically associates and pairs the original field image with the prototype image, generating image samples with viewpoint category labels. Then, multi-category line annotations are applied to the rock strata boundaries. Morphological thickening and skeleton extraction are performed on the line annotation results to construct region supervision labels and single-pixel-width skeleton supervision labels for dual supervision. A deep learning semantic segmentation network is trained using a composite loss function consisting of region overlap loss and topology consistency loss. During the inference phase, the segmentation probability map output by the network is first thresholded to obtain raster segmentation results, followed by a series of topology correction operations such as skeletonization, breakpoint bridging, and noise filtering, and finally, a vectorized result is output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to data processing and intelligent analysis technology in the field of geological engineering, and in particular to a method for extracting extremely fine multi-category rock strata boundaries from complex raw data, which integrates automatic association of engineering data, sample generation and topology-preserving deep learning recognition. Background Technology

[0002] In fields such as geological engineering, tunnel construction, and mineral exploration, the accurate identification and depiction of strata boundaries are fundamental to understanding geological structures, assessing engineering risks, and guiding construction decisions. Traditionally, this work has relied heavily on geological engineers manually digitizing scanned engineering drawings or site photographs using computer-aided design (CAD) or geographic information system (GIS) software. This method is not only extremely time-consuming and labor-intensive, but the accuracy and consistency of the results also heavily depend on the professional experience and subjective judgment of the operators, making it difficult to meet the efficiency and standardization requirements of modern engineering.

[0003] With the development of artificial intelligence technology, image semantic segmentation methods based on deep learning have become an important driving force for interpreting geological information. From classic architectures like U-Net and DeepLab to more recent ones like Transformer, significant progress has been made in various visual scenarios. In seismic data interpretation, deep learning has also been used to automatically track stratigraphic boundaries (geological boundaries), demonstrating the feasibility and potential of this approach. In fact, deep learning, with its powerful feature representation and learning capabilities, is being regarded as one of the key technologies driving resource exploration and related geoscience fields toward a new data-driven paradigm.

[0004] However, directly applying existing general segmentation models to real-world, complex engineering scenarios to identify extremely fine, multi-category rock strata boundaries still faces a series of technical bottlenecks: Existing models struggle to guarantee the topological integrity of linear targets. General segmentation models typically use the Intersection over Union (IoU) ratio as the core optimization metric, which focuses on region overlap rather than geometric continuity, easily leading to breaks, holes, or adhesions in lines only a few pixels wide. To mitigate this issue, research has begun exploring topology-aware loss functions, penalizing breakpoints or erroneous loops through techniques such as continuous homology / Betti matching, thereby significantly improving the topological correctness of segmentation. Simultaneously, some works introduce geometric and relational constraints at the network structure level (such as explicit constraints on Euclidean geometric relationships and decoupled attention mechanisms) to directly improve the geometric fidelity and connectivity of thin targets. While these methods are effective, they often introduce additional computational and implementation complexity, and there is still room for improvement in complex scenarios involving multiple categories and intersecting lines.

[0005] The performance of deep learning is highly dependent on massive amounts of precisely labeled data, a bottleneck widely considered to restrict its application in the geosciences. To address the scarcity of labels, the field has attempted to reduce reliance on large amounts of labels through "small label learning" approaches (such as semi-supervised / transfer and cross-domain transfer learning), achieving progress in tasks such as well-drilled lithology modeling. Furthermore, the data sources are extremely heterogeneous and unstructured: including PDF drawings from different design institutes and periods, field images under different lighting and angle conditions, and cross-domain integration with multimodal data such as seismic, well logging, and core photographs. How to automatically correlate and fuse these diverse and multimodal raw data to construct a large-scale training set that reflects the real engineering environment remains an open challenge. In recent years, the introduction of graph neural networks in mineral prospect prediction to explicitly model spatial adjacency relationships has proven helpful in integrating multi-source elements and improving prediction results, suggesting a feasible direction for engineering geoscience data fusion.

[0006] There remains a gap between the raw model output and the usable vector results. Deep model outputs are often rasterized probabilistic maps, which, even after binarization, frequently contain isolated pixels and spikes caused by noise and uncertainty. Transforming them into clean, smooth, and editable vector line features requires a robust post-processing workflow. Besides traditional morphological operations, cutting-edge methods are exploring end-to-end vectorization modeling approaches, directly outputting the vector parameters and topological relationships of line / polygon features to reduce error propagation from raster to vector. On the other hand, some studies employ graph theory-based boundary search and combinatorial optimization to replace pixel-level post-processing, thereby better preserving geometric priors (such as continuity and curvature smoothing) and suppressing breaks and false connections.

[0007] While utilizing artificial intelligence for geological image analysis has become a trend, current technologies lack a complete technological chain for transforming raw, unstructured engineering data (such as scanned PDF drawings and multi-angle field photographs) into precise, usable vectorized geological elements. Specifically, this presents four core challenges: 1. Heterogeneous data sources and alignment difficulties: Engineering documents have different formats, and on-site photos are taken at different angles and under different lighting conditions. How to automatically and accurately link these heterogeneous data sources and generate a sample set with a consistent perspective that can be used for model training is the primary obstacle to automated processing.

[0008] 2. The topological integrity of extremely fine targets is difficult to guarantee: the boundary lines of rock strata are usually only 1-3 pixels wide. When optimizing the overlap of regions, traditional semantic segmentation methods are prone to line breakage, adhesion or centerline drift, which will destroy the topological continuity that should be present in geological structures.

[0009] 3. Extreme class imbalance makes model training difficult: In typical geological images, the number of background pixels far exceeds the sum of all boundary line pixels. This extreme imbalance makes the model tend to predict all pixels as background, making it difficult to effectively learn rare but key linear features.

[0010] 4. Multi-class confusion and complex post-processing: Boundaries between various geological origins (such as J-class and R-class) may coexist or intersect, making the model prone to confusion. At the same time, the raw results of network inference are full of noise and breakpoints, requiring a robust post-processing method to repair and clean them up. Summary of the Invention

[0011] The purpose of this invention is to overcome the shortcomings of existing technologies and provide an intelligent identification method for extremely fine multi-category rock strata boundaries based on data association and topology preservation. This method ensures the geometric continuity of the boundaries through topology-aware segmentation and post-processing, and integrates an end-to-end link from raw data to usable vector results, making the digitization process of geological structures more efficient and accurate. Simultaneously, its standardized vector output provides crucial data support for effectively assessing engineering risks and analyzing geological stability, thereby facilitating geological engineers and decision-makers to quickly identify key structures, predict potential risks, and formulate targeted design and construction strategies, such as optimizing tunnel support schemes, accurately defining mining areas, and analyzing slope stability. This method is a crucial foundation for automatically extracting geological boundaries from multi-source heterogeneous data, generating topologically correct vector results, and interpreting multi-category geological bodies.

[0012] The objective of this invention is achieved through the following technical solution: A method for identifying rock strata boundaries based on data association and topology preservation includes: Step S1: For an engineering document containing rock strata boundaries, define a region of interest as a view template, and extract a prototype image corresponding to the view template from the engineering document; Step S2: Calculate the similarity between the original image collected on site and the prototype image using a local feature matching algorithm. Pair the original image that meets the similarity requirement with the corresponding view template to generate image samples with view category labels. Perform multi-category line annotation on the rock strata boundary lines in the successfully paired image samples to obtain the line annotation results. Step S3: Perform two processing steps simultaneously on the line annotation results obtained in step S2: one is to perform morphological thickening on the line annotation results to generate region supervision labels; the other is to extract the skeleton of the line annotations to generate skeleton supervision labels with a single pixel width. Step S4: Construct a semantic segmentation network and train the semantic segmentation network using a composite loss function, which consists of a region loss supervised by the region supervision label and a topology loss supervised by the skeleton supervision label. Step S5: Input the image to be tested into the trained semantic segmentation network for inference, threshold the output segmentation probability map to obtain the raster segmentation result, and perform a topology correction operation on the raster segmentation result. The topology correction operation includes skeletonization, noise filtering based on connected component analysis, and breakpoint bridging based on geometric constraints to obtain the topology-corrected skeleton result; Step S6: Convert the topology-corrected skeleton result into vector line features with category attributes.

[0013] Furthermore, in step S1, the view template is stored as a structured file containing page indexes and normalized coordinates; the normalized coordinates are represented in the form of [x_min / W, y_min / H, x_max / W, y_max / H], where W and H are the width and height of the rendered page, respectively.

[0014] Furthermore, step S2 specifically includes: Calculate feature point pairs between the original image and the prototype image, and use the ratio test to select high-quality matching points; The confidence score of the pairing results is calculated based on the number of high-quality matching points or the average matching distance. The original images with confidence scores higher than or equal to a preset threshold are used as the original images that meet the similarity requirements for pairing.

[0015] Furthermore, in step S3, the expansion radius of the morphological thickening ranges from 1 to 5 pixels; the skeleton extraction of the line label is performed using an iterative thinning algorithm to generate the skeleton supervision label with a single pixel width, and the iterative thinning algorithm adopts the Zhang-Suen algorithm or the Guo-Hall algorithm.

[0016] Furthermore, in step S4, The semantic segmentation network adopts a model architecture with a Swing Transformer as the backbone network and a unified perception parser as the decoder. The composite loss function employs a weighting mechanism that combines static weighting based on class frequency and dynamic weighting based on pixel classification difficulty. The formula for calculating the composite loss function is: L_total = L_area + λ * L_topo; where L_total is the composite loss function, L_area is the region loss, L_topo is the topology loss, and λ is the balance coefficient, with a value ranging from 0.2 to 0.8.

[0017] Furthermore, in step S5, the noise filtering based on connected component analysis includes: removing connected components whose length is less than a preset minimum length threshold. The connected component is a set of skeleton pixels that are interconnected under a preset neighborhood connectivity rule. The preset minimum length threshold ranges from 8 to 30 pixels. The breakpoint bridging based on geometric constraints includes connecting endpoint pairs that meet the connection conditions, wherein the connection conditions are: the Euclidean distance between the endpoint pairs is less than the maximum distance threshold, and the angle between the local direction vectors of their respective line segments is less than the maximum angle threshold.

[0018] The present invention also provides a rock stratum boundary identification device based on data association and topology preservation, comprising: The prototype extraction module is used to define a region of interest as a view template for an engineering document containing rock strata boundaries, and extract a prototype image corresponding to the view template from the engineering document. The sample generation module is used to calculate the similarity between the original image collected on site and the prototype image using a local feature matching algorithm. The original image that meets the similarity requirement is paired with the corresponding view template to generate image samples with view category labels. The rock layer boundary lines in the successfully paired image samples are annotated with multiple categories to obtain the line annotation results. The dual-label construction module is used to perform two processes simultaneously on the obtained line annotation results: one is to perform morphological thickening on the line annotation results to generate region supervision labels; the other is to extract the skeleton of the line annotation to generate skeleton supervision labels with a single pixel width. The network training module is used to construct a semantic segmentation network and train the semantic segmentation network using a composite loss function, which consists of a region loss supervised by the region supervision label and a topology loss supervised by the skeleton supervision label. The inference and topology correction module is used to input the image to be tested into the trained semantic segmentation network for inference, threshold the output segmentation probability map to obtain a raster segmentation result, and perform a topology correction operation on the raster segmentation result. The topology correction operation includes skeletonization, noise filtering based on connected component analysis, and breakpoint bridging based on geometric constraints to obtain a topology-corrected skeleton result. The vectorization output module is used to convert the topology-corrected skeleton result into vector line features with category attributes.

[0019] Furthermore, the inference and topology correction module includes: The noise filtering unit is used to remove connected components whose length is less than a preset minimum length threshold. The connected component is a set of skeleton pixels that are connected to each other under a preset neighborhood connectivity rule. The preset minimum length threshold ranges from 8 to 30 pixels. The breakpoint bridging unit is used to connect endpoint pairs that meet the connection conditions, which are: the Euclidean distance between the endpoint pairs is less than the maximum distance threshold, and the angle between the local direction vectors of their respective line segments is less than the maximum angle threshold.

[0020] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the rock strata boundary identification method based on data association and topology preservation.

[0021] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the rock strata boundary identification method based on data association and topology preservation.

[0022] Compared with the prior art, the beneficial effects of the technical solution of the present invention are: 1. This invention employs a viewpoint template-guided data association and generation method, which can automatically and accurately associate and pair unordered raw field photographs with standardized viewpoint prototypes. This achieves the transformation from unstructured heterogeneous data to a high-quality structured sample set with clear viewpoint category labels, providing a reliable data foundation for automated deep learning. It solves the problems of data alignment difficulties and time-consuming manual processing caused by heterogeneous data sources (different perspectives between engineering documents and field photographs).

[0023] 2. This invention employs dual-label construction and a composite loss function. The region loss supervised by the areal labels effectively guides the network to learn the context and overcomes extreme class imbalance, while the topological loss supervised by the skeleton labels forces the network to focus on the connectivity of extremely fine lines themselves. This dual supervision forces the semantic segmentation network to achieve a balance between region coverage and skeleton detail, significantly reducing line breakage rate and improving recognition accuracy and robustness. It solves the problem of easily disrupted topological continuity caused by extremely fine geological boundaries, and the problem of extreme class imbalance caused by a significant disparity in the ratio of background pixels to line pixels.

[0024] 3. After inference, the output of the semantic segmentation network undergoes skeletonization, artifact removal, and intelligent bridging of breakpoints. This eliminates noise-induced misconnections and uncertainties, intelligently repairs fractured structures, and ultimately outputs clean, continuous, and topologically correct vector line elements. This ensures the continuity and structural integrity of geological boundaries, facilitating subsequent geological analysis and editable applications. It also addresses the problem of breakpoints caused by spikes, isolated pixels, and local blurring in the original network output probability map, making it difficult to use directly as vector results.

[0025] 4. This invention, for the first time, constructs an end-to-end automated system from heterogeneous data association and sample generation to topology-preserving recognition and vectorized output, eliminating the heavy reliance on purely manual digital sketching and greatly improving data processing efficiency and result standardization in engineering applications. It solves the problem of lacking a complete automated chain from raw data to final vectorized results, automating the large amount of time-consuming manual data processing and alignment work, significantly improving work efficiency. Furthermore, the method of this invention does not depend on a specific network model or hardware platform; it can be flexibly applied to different deep learning frameworks and segmentation models, exhibiting good portability and scalability. Attached Figure Description

[0026] Figure 1 This is a schematic diagram of the overall process of the method of the present invention.

[0027] Figure 2 Construct a graph for dual-labeling.

[0028] Figure 3 This is a multi-channel output diagram.

[0029] Figure 4 This is the output diagram for topology correction and vectorization.

[0030] Figure 5a The results show the skeleton endpoint detection before the breakpoint bridging.

[0031] Figure 5b This is a comparison image showing the effect of lines before and after bridging at the breakpoint.

[0032] Figure 5c Ablation comparison graphs under different training settings and topological constraint combinations.

[0033] Figure 6 This is a schematic diagram of the three-dimensional feature space distribution of the sample data association results. Detailed Implementation

[0034] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the present invention.

[0035] Example 1 See Figure 1 This embodiment discloses an intelligent identification method for extremely fine multi-category rock strata boundaries based on data association and topology preservation. Its core lies in the organic combination of two innovative solutions: a view-position template-guided data association and generation method, and a dual-supervised topology-preserving segmentation method. The view-position module solves the problem of automatically generating high-quality training samples from raw data, while the dual-supervised topology-preserving segmentation method focuses on solving the problem of accurate segmentation and connectivity preservation of extremely fine, multi-category lines. Specifically, it includes: S1. Viewpoint Template Definition and Prototype Extraction: Through a simple graphical interface, users can select key observation views, such as "Left," "Face," "Right," and "Crown," on representative engineering document (PDF) pages. The position and size of these selected regions (ROIs) are saved as a reusable viewpoint template along with the page information, using resolution-independent normalized relative coordinates.

[0036] Prototype extraction and feature matching: Based on the view position template, the standard prototype image of each view position template is automatically cropped from the PDF.

[0037] In this embodiment, on page 3 of a typical engineering PDF document, the "working face" area is selected via an interactive interface. The system records the normalized coordinates of this area [0.1, 0.2, 0.8, 0.7] and page index 3, saving them as a template.json file as a viewpoint template. Subsequently, based on this viewpoint template, _proto_face.jpg is cropped from the image rendered on page 3 of the PDF as a prototype image.

[0038] S2. Data Association and Sample Generation: For a massive amount of unprocessed original photos from the scene, this embodiment uses fast and robust local feature descriptors such as ORB to calculate the feature similarity between each original photo and all prototype images.

[0039] By comparing similarity scores, an optimal viewpoint is automatically matched for each original photograph (e.g., determining it to be a "palm face" image), and a quantified confidence score is generated. The confidence score can be determined based on at least one of the following: the number of high-quality matching points, the average matching distance, and the proportion of inliers. The confidence threshold can be set based on the statistical distribution of the development samples or the results of pre-experimentation. Samples below the threshold enter a manual review or rejection process and are not used as negative samples in training. Samples confirmed by manual review and their correction results can be used to update the viewpoint template or adjust the threshold parameters. This process realizes the transformation from unordered photographs to a structured sample set with clear viewpoint labels, providing a large-scale, high-quality data foundation for subsequent model training.

[0040] Specifically, this embodiment iterates through a folder containing 10,000 on-site photos. For each photo, feature points are extracted using cv2.ORB_create(nfeatures=1500), and then matched with the feature points of _proto_face.jpg using BFMatcher.knn Match. Lowe's ratio test (ratio < 0.75) is used to filter for high-quality matches.

[0041] Suppose a photo named IMG_6972.jpg receives the highest matching score (e.g., the number of high-quality matching points reaches a preset threshold), which is much higher than the preset confidence threshold of 50. Then the photo is successfully associated with the "face" view and is copied or linked to the training sample set as an image sample.

[0042] See Figure 6 After the sample construction is completed, the feature representation of the sample can be further mapped to a three-dimensional feature space for visualization. Figure 6 The distribution of sample features in three-dimensional space is shown to visually illustrate the overall distribution characteristics and dispersion of sample representation.

[0043] For successfully paired image samples, the strata boundaries are further annotated manually or semi-automatically using multi-category linear labels to obtain the linear annotation results used for subsequent dual-label construction. The linear annotation results differ from the view category labels; the former describes the category of the strata boundary, while the latter describes the view to which the image belongs.

[0044] S3. Double label construction, see... Figure 2 To address the limitations of traditional single labels, this embodiment generates two types of supervisory labels for each line annotation: one is a region supervisory label with a certain width obtained through morphological dilation, used to guide the network to learn the region context; the other is a single-pixel-width skeleton supervisory label obtained through skeleton extraction, which preserves the original topology and is used to precisely constrain the center position and connectivity of the line.

[0045] In this embodiment, for an associated image sample and its corresponding expert annotations (six types of single-pixel-width lines), a region supervision label is first generated using a dilation kernel with a radius of 2 pixels, while the single-pixel-width annotations obtained after thinning are retained as skeleton supervision labels.

[0046] S4. Topology-Preserving Network Training: A semantic segmentation network is constructed and trained using a composite loss function consisting of region loss and topology loss. The region loss (e.g., weighted cross-entropy, Dice loss) is supervised by region-supervised labels, focusing on addressing the problem of extreme class imbalance; the topology loss (e.g., focus loss) is supervised by skeleton-supervised labels, forcing the network to focus on the structure of the lines themselves. This dual-supervision strategy forces the network to strike a balance between "smearing" the covered areas and "depicting" the skeleton.

[0047] Specifically, this embodiment constructs a semantic segmentation model with Swing Transformer as the backbone and Uper Head as the decoding head.

[0048] The composite loss function is designed as: L_total = L_area + 0.4 * L_topo. L_area is calculated using region-supervised labels and is a weighted cross-entropy loss, where the background class has a weight of 1.0 and the six line classes each have a weight of 5000.0 to combat class imbalance.

[0049] L_topo uses skeleton-supervised label calculation and is the focal loss, with parameters set to gamma=2.0 and alpha=0.25. Here, gamma is used to enhance attention to hard-to-classify skeleton pixels, and alpha is used to balance the loss weights of different pixels under class imbalance conditions. Both of these parameters are reflected in the focal loss calculation process of L_topo.

[0050] The AdamW optimizer was used to perform 80,000 iterations of training within the PyTorch framework.

[0051] Step S5, Inference and Topology Correction: The image to be tested is input into the trained semantic segmentation network model for inference. After inference, the segmentation probability map output by the semantic segmentation network model is first thresholded to obtain the raster segmentation result. Then, a structured correction process is implemented on the raster segmentation result. This process includes: ① Skeletonization to ensure that the output is a single-pixel line; ② Noise filtering based on connected component analysis to remove meaningless short artifacts; ③ Breakpoint bridging to intelligently repair breaks caused by local feature blurring based on distance and orientation priors.

[0052] Specifically: Input a new image to be tested into the trained model to obtain a segmentation map with 7 channels, see... Figure 3 .

[0053] For each foreground category channel, binarization is first performed with a threshold of 0.5 to obtain the raster segmentation result, and then the Zhang-Suen algorithm is applied to extract the skeleton.

[0054] Remove all skeleton connected components with a length less than 15 pixels.

[0055] Detect the endpoints of all remaining skeleton segments. If the distance between two endpoints is less than 8 pixels and the directional angle is less than 25 degrees, connect them with a straight line to obtain the topology-corrected skeleton image.

[0056] in, Figure 5a The results of skeleton endpoint detection before breakpoint bridging are shown. Circles and short line segments in the figure are used to represent the detected candidate endpoints and their local directions. Figure 5b The left side shows the broken line segment before bridging, and the right side shows the continuous line segment after bridging, which is used to visually demonstrate the comparison of the line effect before and after the breakpoint bridging; Figure 5c The results of ablation comparison under different training settings are shown to illustrate the impact of different training settings and topological constraints on the recognition performance. Figures 5a to 5c Overall, this method can detect skeleton breakpoints, repair local fractures, and improve the continuity, completeness, and usability of the results to a certain extent.

[0057] Step S6, Vectorization output, see Figure 4 : Convert the topology-corrected skeleton result into vector line features with category attributes, i.e., output vectorized rock strata boundaries.

[0058] Specifically, the processed skeleton image is converted into Shapefile format using a GIS library (such as GDAL / OGR). Each vectorized rock stratum boundary feature contains a CLASS field, the value of which is the name of its category (such as "J1", "R2", etc.).

[0059] Example 2 Based on the same inventive concept, this application also provides a rock stratum boundary identification device based on data association and topology preservation, which can be used to implement the method described in the above embodiments, specifically including the following: The prototype extraction module is used to define a region of interest as a view template for an engineering document containing rock strata boundaries, and extract a prototype image corresponding to the view template from the engineering document. The sample generation module is used to calculate the similarity between the original image collected on site and the prototype image using a local feature matching algorithm. The original image that meets the similarity requirement is paired with the corresponding view template to generate image samples with view category labels. The rock layer boundary lines in the successfully paired image samples are annotated with multiple categories to obtain the line annotation results. The dual-label construction module is used to perform two processes simultaneously on the obtained line annotation results: one is to perform morphological thickening on the line annotation results to generate region supervision labels; the other is to extract the skeleton of the line annotation to generate skeleton supervision labels with a single pixel width. The network training module is used to construct a semantic segmentation network and train the semantic segmentation network using a composite loss function, which consists of a region loss supervised by the region supervision label and a topology loss supervised by the skeleton supervision label. The inference and topology correction module is used to input the image to be tested into the trained semantic segmentation network for inference, threshold the output segmentation probability map to obtain a raster segmentation result, and perform a topology correction operation on the raster segmentation result. The topology correction operation includes skeletonization, noise filtering based on connected component analysis, and breakpoint bridging based on geometric constraints to obtain a topology-corrected skeleton result. The vectorization output module is used to convert the topology-corrected skeleton result into vector line features with category attributes.

[0060] The inference and topology correction module includes: The noise filtering unit is used to remove connected components whose length is less than a preset minimum length threshold. The connected component is a set of skeleton pixels that are connected to each other under a preset neighborhood connectivity rule. The preset minimum length threshold ranges from 8 to 30 pixels. The breakpoint bridging unit is used to connect endpoint pairs that meet the connection conditions, which are: the Euclidean distance between the endpoint pairs is less than the maximum distance threshold, and the angle between the local direction vectors of their respective line segments is less than the maximum angle threshold.

[0061] Preferably, embodiments of this application also provide a specific implementation of an electronic device capable of implementing all steps in the rock stratum boundary identification method based on data association and topology preservation described in the above embodiments. The electronic device specifically includes the following: Processor, memory, communications interface, and bus; The processor, memory, and communication interface communicate with each other via a bus; the communication interface is used to realize information transmission between server-side devices, metering devices, and user-side devices.

[0062] The processor is used to call the computer program in memory. When the processor executes the computer program, it implements all the steps in the rock stratum boundary identification method based on data association and topology preservation in the above embodiments.

[0063] Embodiments of this application also provide a computer-readable storage medium capable of implementing all steps of the rock stratum boundary identification method based on data association and topology preservation in the above embodiments. The computer-readable storage medium stores a computer program that, when executed by a processor, implements all steps of the rock stratum boundary identification method based on data association and topology preservation in the above embodiments.

[0064] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0065] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0066] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0067] This invention is not limited to the embodiments described above. The above description of specific embodiments is intended to illustrate and explain the technical solutions of this invention. The specific embodiments described above are merely illustrative and not restrictive. Without departing from the spirit and scope of the claims, those skilled in the art can make many specific modifications based on the teachings of this invention, and these modifications all fall within the scope of protection of this invention.

Claims

1. A method for identifying rock strata boundaries based on data association and topology preservation, characterized in that, include: Step S1: For an engineering document containing rock strata boundaries, define a region of interest as a view template, and extract a prototype image corresponding to the view template from the engineering document; Step S2: Calculate the similarity between the original image collected on site and the prototype image using a local feature matching algorithm. Pair the original image that meets the similarity requirement with the corresponding view template to generate image samples with view category labels. Perform multi-category line annotation on the rock strata boundary lines in the successfully paired image samples to obtain the line annotation results. Step S3: Perform two processing steps simultaneously on the line annotation results obtained in step S2: one is to perform morphological thickening on the line annotation results to generate region supervision labels; the other is to extract the skeleton of the line annotations to generate skeleton supervision labels with a single pixel width. Step S4: Construct a semantic segmentation network and train the semantic segmentation network using a composite loss function, which consists of a region loss supervised by the region supervision label and a topology loss supervised by the skeleton supervision label. Step S5: Input the image to be tested into the trained semantic segmentation network for inference, threshold the output segmentation probability map to obtain the raster segmentation result, and perform a topology correction operation on the raster segmentation result. The topology correction operation includes skeletonization, noise filtering based on connected component analysis, and breakpoint bridging based on geometric constraints to obtain the topology-corrected skeleton result; Step S6: Convert the topology-corrected skeleton result into vector line features with category attributes.

2. The method for identifying rock strata boundaries according to claim 1, characterized in that, In step S1, the view template is stored in a structured file containing page index and normalized coordinates; the normalized coordinates are represented in the form of [x_min / W, y_min / H, x_max / W, y_max / H], where W and H are the width and height of the rendered page, respectively.

3. The method for identifying rock strata boundaries according to claim 1, characterized in that, Step S2 specifically includes: Calculate feature point pairs between the original image and the prototype image, and use the ratio test to select high-quality matching points; The confidence score of the pairing results is calculated based on the number of high-quality matching points or the average matching distance. The original images with confidence scores higher than or equal to a preset threshold are used as the original images that meet the similarity requirements for pairing.

4. The method for identifying rock strata boundaries according to claim 1, characterized in that, In step S3, the expansion radius of the morphological thickening ranges from 1 to 5 pixels; the skeleton extraction of the line annotation is performed using an iterative thinning algorithm to generate the skeleton supervision label with a single pixel width, and the iterative thinning algorithm adopts the Zhang-Suen algorithm or the Guo-Hall algorithm.

5. The method for identifying rock strata boundaries according to claim 1, characterized in that, In step S4, The semantic segmentation network adopts a model architecture with a Swing Transformer as the backbone network and a unified perception parser as the decoder. The composite loss function employs a weighting mechanism that combines static weighting based on class frequency and dynamic weighting based on pixel classification difficulty. The formula for calculating the composite loss function is: L_total = L_area + λ * L_topo; where L_total is the composite loss function, L_area is the region loss, L_topo is the topology loss, and λ is the balance coefficient, with a value ranging from 0.2 to 0.

8.

6. The method for identifying rock strata boundaries according to claim 1, characterized in that, In step S5, the noise filtering based on connected component analysis includes: removing connected components whose length is less than a preset minimum length threshold. The connected component is a set of skeleton pixels that are interconnected under a preset neighborhood connectivity rule. The preset minimum length threshold ranges from 8 to 30 pixels. The breakpoint bridging based on geometric constraints includes connecting endpoint pairs that meet the connection conditions, wherein the connection conditions are: the Euclidean distance between the endpoint pairs is less than the maximum distance threshold, and the angle between the local direction vectors of their respective line segments is less than the maximum angle threshold.

7. A rock strata boundary identification device based on data association and topology preservation, characterized in that, include: The prototype extraction module is used to define a region of interest as a view template for an engineering document containing rock strata boundaries, and extract a prototype image corresponding to the view template from the engineering document. The sample generation module is used to calculate the similarity between the original image collected on site and the prototype image using a local feature matching algorithm. The original image that meets the similarity requirement is paired with the corresponding view template to generate image samples with view category labels. The rock layer boundary lines in the successfully paired image samples are annotated with multiple categories to obtain the line annotation results. The dual-label construction module is used to perform two processes simultaneously on the obtained line annotation results: one is to perform morphological thickening on the line annotation results to generate region supervision labels; Another approach is to extract the skeleton from the line annotations to generate skeleton supervision labels with a single pixel width. The network training module is used to construct a semantic segmentation network and train the semantic segmentation network using a composite loss function, which consists of a region loss supervised by the region supervision label and a topology loss supervised by the skeleton supervision label. The inference and topology correction module is used to input the image to be tested into the trained semantic segmentation network for inference, threshold the output segmentation probability map to obtain a raster segmentation result, and perform a topology correction operation on the raster segmentation result. The topology correction operation includes skeletonization, noise filtering based on connected component analysis, and breakpoint bridging based on geometric constraints to obtain a topology-corrected skeleton result. The vectorization output module is used to convert the topology-corrected skeleton result into vector line features with category attributes.

8. The strata boundary identification device based on data association and topology preservation according to claim 7, characterized in that, The inference and topology correction module includes: The noise filtering unit is used to remove connected components whose length is less than a preset minimum length threshold. The connected component is a set of skeleton pixels that are connected to each other under a preset neighborhood connectivity rule. The preset minimum length threshold ranges from 8 to 30 pixels. The breakpoint bridging unit is used to connect endpoint pairs that meet the connection conditions, which are: the Euclidean distance between the endpoint pairs is less than the maximum distance threshold, and the angle between the local direction vectors of their respective line segments is less than the maximum angle threshold.

9. An electronic 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, it implements the steps of the rock strata boundary identification method based on data association and topology preservation as described in any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the strata boundary identification method based on data association and topology preservation as described in any one of claims 1 to 6.