Surrounding rock image clustering method, device, equipment and medium

By transforming surrounding rock images into unified-dimensional feature vectors using semantic recognition models and feature encoding methods, and combining K-Means clustering algorithm with manual verification, the problem of low efficiency in surrounding rock type identification in large-scale geological surveys is solved, and efficient and accurate surrounding rock type identification is achieved.

CN121861318APending Publication Date: 2026-04-14CHINA THREE GORGES CORPORATION
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing methods for identifying surrounding rock types are insufficient to meet the efficiency requirements of rock mass image processing in large-scale geological surveys. They mainly rely on the professional experience of geological engineers, resulting in low efficiency for manual identification.

Method used

The standard text data of lithology categories is extracted by semantic recognition model. The surrounding rock images are transformed into a unified dimension feature vector by combining gray-level co-occurrence matrix, HSV histogram, RGB histogram and color statistical features. The K-Means clustering algorithm is used to group the rocks. The mapping relationship is established by semantic comparison and manual verification to realize the mutual verification of text knowledge and image visual features.

Benefits of technology

It improves the accuracy and efficiency of surrounding rock image recognition, meets the efficiency requirements for rock mass image processing in the current environment, and reduces the tedious work of manual screening and refining.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121861318A_ABST
    Figure CN121861318A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of surrounding rock image recognition, and discloses a surrounding rock image clustering method, device and equipment and a medium. In the surrounding rock image clustering method provided by the invention, lithology category standard text data is accurately extracted through a semantic recognition model based on geological text data of a target area and in combination with a lithology query intention of a user; meanwhile, aiming at surrounding rock images, the images are converted into image feature vectors with unified dimensions by adopting a feature coding method of a gray-level co-occurrence matrix, an HSV histogram, an RGB histogram and color statistical features, then a K-Means clustering algorithm is utilized to obtain a rock grouping result, and finally a mapping relation between the clustering result and lithology categories is established through semantic comparison and manual verification, so that the lithology classification is realized. Mutual identification of text knowledge and image visual features is realized, the accuracy and efficiency of surrounding rock image identification are improved, and the purpose of meeting the processing efficiency requirement of rock mass images in the current environment is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of surrounding rock image recognition technology, specifically to a method, apparatus, device, and medium for clustering surrounding rock images. Background Technology

[0002] In fields such as geological exploration, mineral resource development, and hydropower engineering construction, accurate identification of surrounding rock types is a core foundation for geological analysis, engineering design, and safety assessment. The lithological characteristics of surrounding rock (such as composition, structure, and texture) directly determine the mechanical properties, stability, and engineering adaptability of the rock mass. Therefore, rapid and accurate classification of surrounding rock types is of great significance for project efficiency and safety assurance.

[0003] The rock mass type identification methods disclosed in related technologies rely on the professional experience of geological engineers. Engineers determine the rock mass type by comprehensively analyzing field survey data, textual descriptions in geological survey reports, and images of the rock mass taken on-site. However, in the current environment, a single large-scale geological survey can collect thousands or even tens of thousands of rock mass images. The rock mass type identification methods disclosed in related technologies are no longer sufficient to meet the current efficiency requirements for processing rock mass images. Summary of the Invention

[0004] This invention provides a method, apparatus, device, and medium for clustering surrounding rock images to address the shortcomings of current methods for identifying surrounding rock types, which are unable to meet the efficiency requirements for processing rock mass images in the current environment.

[0005] In a first aspect, the present invention provides a method for clustering surrounding rock images, the method comprising: Based on geological text data of the target area and combined with the user's lithology query intent, semantic extraction is performed through a semantic recognition model to obtain standard text data of lithology categories; the geological text data includes: geological exploration reports, lithology description documents, or third-party knowledge materials. Based on multiple surrounding rock images extracted from the target region, a feature encoding method is used to perform vector transformation to obtain corresponding image feature vectors of a unified dimension; the feature encoding method includes: gray-level co-occurrence matrix, HSV histogram, RGB histogram and color statistical features; Based on the unified dimension image feature vector, the K-Means clustering algorithm is used to obtain multiple rock clustering results; Based on the standard text data of the lithology categories and the rock clustering results, a mapping relationship is established by using a semantic comparison method and combining it with manual verification to obtain the clustering results of surrounding rock images with lithology semantic labels.

[0006] Through the above implementation method, based on the geological text data of the target area and combined with the user's lithology query intent, the standard text data of lithology categories is accurately extracted through a semantic recognition model. At the same time, feature encoding methods such as gray-level co-occurrence matrix, HSV histogram, RGB histogram and color statistical features are used for the surrounding rock images to transform the images into image feature vectors of a unified dimension. Then, the K-Means clustering algorithm is used to obtain the rock grouping results. Finally, the mapping relationship between the clustering results and lithology categories is established through semantic comparison and manual verification, so as to realize the mutual verification of text knowledge and image visual features, improve the accuracy and efficiency of surrounding rock image recognition, and achieve the goal of meeting the processing efficiency requirements of rock mass images in the current environment.

[0007] In one optional implementation, the geological text data based on the target area, combined with the user's lithology query intent, is semantically extracted using a semantic recognition model to obtain standard text data for lithology categories, including: Based on geological text data of the target area, a geological lithology knowledge base is constructed by encoding using a multilingual semantic embedding model. Based on the user's lithology query intent, the approximate nearest neighbor search algorithm is used to query the geological lithology knowledge base to obtain multiple text fragments; Based on multiple text fragments, semantic extraction is performed using a semantic recognition model to obtain standard text data for lithology categories.

[0008] Through the above implementation method, based on the geological text data of the target area, the text is encoded using a multilingual semantic embedding model to obtain a structured geological lithology knowledge base, which facilitates efficient retrieval and extraction of lithology knowledge in the subsequent process. Then, by combining the user's lithology query intent, a near nearest neighbor search algorithm is used to filter multiple relevant text fragments in the geological lithology knowledge base to ensure the targeting and accuracy of semantic extraction. Finally, based on the queried text fragments, a semantic recognition model is used to accurately extract and summarize lithology information, resulting in standard text data of lithology categories. This achieves automated and efficient extraction of lithology knowledge from unstructured geological text, avoiding the tedious work of manually screening text and refining lithology categories, and effectively improving the accuracy and efficiency of surrounding rock image recognition results.

[0009] In one optional implementation, the geological text data based on the target region is encoded using a multilingual semantic embedding model to construct a geological lithology knowledge base, including: Based on the geological text data of the target area, the content is structured and semantically segmented to obtain multiple segmented document fragments; For each segmented document fragment, a multilingual semantic embedding model is used to encode it, resulting in the encoding vector of the corresponding document fragment. Multiple encoded vectors are stored in a database to construct a geological lithology knowledge base.

[0010] Through the above implementation method, the geological text data of the target area is first subjected to structured parsing and semantic segmentation to obtain multiple segmented document fragments. Then, each document fragment is encoded using a multilingual semantic embedding model to generate a unified-dimensional encoding vector. Finally, all encoding vectors are stored in the database to construct a geological lithology knowledge base. This ensures that the lithological knowledge contained in the geological text data is fully preserved. Furthermore, the combination of semantic segmentation and vector encoding provides a high-quality data foundation for accurately obtaining the corresponding text fragments based on the user's lithology query intent.

[0011] In one optional implementation, the step of querying the geological lithology knowledge base based on the user's lithology query intent using an approximate nearest neighbor search algorithm yields multiple text fragments, including: Based on the received user's lithology query intent, a semantic vector is obtained by using a vector transformation method. Based on the semantic vector and combined with the geological lithology knowledge base, a query is performed using an approximate nearest neighbor search algorithm to obtain multiple text fragments corresponding to the semantic vector.

[0012] The above implementation method first transforms the user's lithology query intent into a semantic vector. Then, combined with a geological lithology knowledge base, an approximate nearest neighbor search algorithm is used to accurately match relevant text fragments, achieving semantic alignment between query requirements and text knowledge. This ensures the relevance of the search results and provides a reliable data foundation for subsequent lithology semantic extraction.

[0013] In one optional implementation, based on the image feature vector of the same dimension, the K-Means clustering algorithm is used to obtain multiple rock clustering results, including: Based on standard textual data of lithology categories, the number of lithology categories is determined and used as the initial number of clusters for the K-Means clustering algorithm; Based on the initial number of clusters, Euclidean distance is used as the metric. Clustering is performed by minimizing the distance between each image feature vector and its respective cluster center. The iteration stops when the cluster center converges or the preset maximum number of iterations is reached, and multiple rock clustering results are output.

[0014] Through the above implementation method, the number of lithological types determined by the standard text data of lithological categories is used as the initial number of clusters for K-Means clustering. By combining Euclidean distance metric and minimizing intra-cluster distance, the adaptability of each clustering result obtained in the end to the actual distribution of lithological categories is guaranteed. At the same time, the stability and compactness of each rock clustering result obtained in the end are ensured through an iterative convergence mechanism.

[0015] In one optional implementation, the step of establishing mapping relationships based on the standard text data of the lithology category and the rock clustering results, using a semantic comparison method and combined with manual verification, to obtain the surrounding rock image clustering results with lithology semantic labels includes: Based on the standard text data of the lithology categories and the rock clustering results, the semantic similarity between the cluster center of each rock clustering result and the text embedding vector of the corresponding lithology name in the standard text data of the lithology categories is calculated, and an initial mapping relationship is established. Based on the initial mapping relationship, and combined with manual verification, the final association result between each rock clustering result and the rock types in the rock type list is obtained; By combining the clustering results of each rock with the final association results of the rock types in the rock type list, the output is the clustering results of the surrounding rock images with lithological semantic labels.

[0016] Through the above implementation method, an initial mapping is established by using the semantic similarity calculation results of the cluster center of each rock clustering result and the lithology name text embedding vector, so as to achieve the accuracy of semantic alignment between the clustering results and the lithology category. Then, combined with manual verification of the initial mapping, the final association result is obtained, ensuring the reliability of the output final association result and improving the accuracy of identifying each surrounding rock image category using the final association result.

[0017] In one alternative implementation, it further includes: Based on the clustering results of the surrounding rock images with lithological semantic tags, the image clustering visualization results are obtained using an image clustering visualization method.

[0018] Through the above implementation methods, the clustering results with lithological semantic tags are visualized, and the corresponding surrounding rock image clustering visualization results are output. This intuitively presents the correspondence between the distribution of each rock cluster and the lithological name, improving the efficiency and accuracy of subsequent geological exploration and verification.

[0019] Secondly, the present invention provides a rock mass image clustering device, the device comprising: The text data extraction module is used to extract semantic data based on geological text data of the target area, combined with the user's lithology query intent, and to obtain standard text data of lithology categories through a semantic recognition model; the geological text data includes: geological exploration reports, lithology description documents, or third-party knowledge materials. The image feature transformation module is used to transform multiple surrounding rock images extracted from the target region into vectors using feature encoding methods to obtain corresponding image feature vectors of the same dimension. The feature encoding methods include: gray-level co-occurrence matrix, HSV histogram, RGB histogram and color statistical features. The image feature clustering module is used to obtain multiple rock clustering results based on the unified dimension image feature vector using the K-Means clustering algorithm; The mapping result output module is used to establish mapping relationships based on the standard text data of the lithology category and the rock clustering results, using semantic comparison methods and combined with manual verification, to obtain the surrounding rock image clustering results with lithology semantic labels.

[0020] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the rock mass image clustering method of the first aspect or any corresponding embodiment described above.

[0021] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the rock mass image clustering method of the first aspect or any corresponding embodiment described above. Attached Figure Description

[0022] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0023] Figure 1 This is a schematic diagram of the first process of the surrounding rock image clustering method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the second process of the surrounding rock image clustering method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the third process of the surrounding rock image clustering method according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the third process of the surrounding rock image clustering method according to an embodiment of the present invention; Figure 5 This is a structural block diagram of a surrounding rock image clustering device according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0025] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.

[0026] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0027] The methods for identifying surrounding rock types disclosed in related technologies mainly rely on the professional experience of geological engineers. The judgment is made by comprehensively analyzing field survey data, textual descriptions in geological survey reports, and images of surrounding rock taken on site. However, with the increasing demand for large-scale and refined geological surveys, the number of surrounding rock images taken in a single large-scale geological survey often involves thousands or even tens of thousands of images. The method of manually identifying surrounding rock types in related technologies can no longer meet the efficiency requirements.

[0028] To overcome the shortcomings of the rock mass image clustering methods disclosed in the aforementioned related technologies, the rock mass image clustering method provided by this invention, based on the geological text data of the target area and combined with the user's lithology query intent, accurately extracts standard text data of lithology categories through a semantic recognition model. Simultaneously, for the rock mass image, feature encoding methods such as gray-level co-occurrence matrix, HSV histogram, RGB histogram, and color statistical features are used to transform the image into a unified-dimensional image feature vector. Then, the K-Means clustering algorithm is used to obtain the rock grouping results. Finally, the mapping relationship between the clustering results and lithology categories is established through semantic comparison and manual verification, realizing mutual verification between textual knowledge and image visual features, improving the accuracy and efficiency of rock mass image recognition, and achieving the goal of meeting the current requirements for processing efficiency of rock mass images.

[0029] According to an embodiment of the present invention, a method for clustering surrounding rock images is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0030] This embodiment provides a rock mass image clustering method that can be used on a server terminal for geological exploration. Figure 1 This is a flowchart of a rock mass image clustering method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps: S101, based on the geological text data of the target area and combined with the user's lithology query intent, semantic extraction is performed through a semantic recognition model to obtain standard text data of lithology categories; the geological text data includes: geological exploration reports, lithology description documents or third-party knowledge materials.

[0031] Geological text data represents unstructured textual materials used to extract lithological knowledge, including geological exploration reports (professional documents that record the results of geological surveys in the target area), lithological description documents (texts that specifically describe rock types and characteristics), and third-party knowledge materials (public or authorized geological and lithological related literature, data manuals, etc.), including various formats such as Word, PDF, and TXT.

[0032] The lithology query intent is a search request related to rock type proposed by the user, which is used to guide the semantic recognition model to accurately extract target information, such as "extract the types of rocks mentioned in the text".

[0033] Semantic recognition models are AI models with text understanding and information extraction capabilities. They can extract and summarize standardized lithological category information from geological texts by combining user query intent. These include multilingual semantic embedding models, such as Sentence Transformer (paraphrase-multilingual-MiniLM-L12-v2) or local large language models (deepseek-r1:14b-qwen-distill-q4_K_M).

[0034] The standard text data of lithology categories is a standardized list of rock types extracted by a semantic recognition model, which provides a unified basis for subsequent clustering label mapping.

[0035] S102, based on multiple surrounding rock images extracted from the target area, a feature encoding method is used to perform vector transformation to obtain corresponding image feature vectors of the same dimension; the feature encoding method includes: gray-level co-occurrence matrix, HSV histogram, RGB histogram and color statistical features.

[0036] Surrounding rock images are image data taken in the field in the target area that reflect the appearance characteristics (color, texture, cracks, etc.) of the rocks.

[0037] Feature encoding is a technique for converting surrounding rock images into computable vectors. Among them, the gray-level co-occurrence matrix extracts the spatial common information of local gray-level changes in the surrounding rock image, reflecting the texture structure; the HSV histogram is used to describe the distribution of image hue, saturation and brightness in the surrounding rock image; and the RGB histogram and color statistical features are used to obtain the overall color distribution features of the image.

[0038] A uniform-dimensional image feature vector is a fixed-length numerical vector obtained by converting multi-dimensional features of an image, such as texture and color, through feature encoding methods.

[0039] S103, based on the unified dimension image feature vector, the K-Means clustering algorithm is used to obtain multiple rock clustering results.

[0040] K-Means clustering algorithm is a classic partitioning clustering algorithm based on Euclidean distance. Its core idea is to divide the data into k clusters such that the distance between each data point and the center of its own cluster is minimized, which ensures that the clusters are compact and that the clusters are separated.

[0041] Specifically, assuming the image feature set is The objective function of the K-Means clustering algorithm satisfies: , in, , indicating the first Embedding vectors of surrounding rock images; Represents the number of clusters; Represented as the first One cluster; Represents clusters The center of the cluster is defined as the mean of all samples within that cluster. This represents the Euclidean distance.

[0042] The rock clustering result is a group of images obtained after the K-Means algorithm processes the image feature vectors. These groups represent sets of rocks with similar visual features and may include cluster numbers, such as "Cluster-1" or "Cluster-2".

[0043] S104. Based on the standard text data of the lithology category and the rock clustering results, a mapping relationship is established using a semantic comparison method and combined with manual verification to obtain the clustering results of the surrounding rock images with lithology semantic labels.

[0044] Semantic comparison methods establish the association between clustering results and lithology categories by calculating the semantic similarity between cluster centers and the text embedding vectors of lithology names. For example, "Cluster-1" corresponds to "sandstone", "Cluster-2" corresponds to "slate", etc.

[0045] The clustering result of surrounding rock images with lithological semantic labels is the final clustering result containing labels with clear geological significance, formed by establishing a mapping between rock clustering results and lithological categories through semantic comparison and manual verification.

[0046] The rock mass image clustering method provided by this invention, based on the geological text data of the target area and combined with the user's lithology query intent, accurately extracts standard text data of lithology categories through a semantic recognition model. At the same time, for the rock mass image, feature encoding methods such as gray-level co-occurrence matrix, HSV histogram, RGB histogram and color statistical features are used to transform the image into a unified-dimensional image feature vector. Then, the K-Means clustering algorithm is used to obtain the rock grouping results. Finally, the mapping relationship between the clustering results and lithology categories is established through semantic comparison and manual verification, realizing mutual verification between text knowledge and image visual features, improving the accuracy and efficiency of rock mass image recognition, and achieving the goal of meeting the processing efficiency requirements of rock mass images in the current environment.

[0047] This embodiment provides a rock mass image clustering method that can be used on a server terminal for geological exploration. Figure 2 This is a flowchart of a rock mass image clustering method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: S201, Based on the geological text data of the target area and combined with the user's lithology query intent, semantic extraction is performed through a semantic recognition model to obtain standard text data of lithology categories; the geological text data includes: geological exploration reports, lithology description documents or third-party knowledge materials.

[0048] Specifically, S201 above includes: S2011, based on geological text data of the target area, is encoded using a multilingual semantic embedding model to construct a geological lithology knowledge base; Specifically, S2011 above includes: a1, based on the geological text data of the target area, performs structured parsing and semantic segmentation on the content to obtain multiple segmented document fragments; a2, for each segmented document fragment, encode it using a multilingual semantic embedding model to obtain the encoding vector of the corresponding document fragment; a3 stores multiple encoded vectors in a database to build a geological lithology knowledge base.

[0049] For example, the above S2011 is implemented as follows: The geological text data of the target area is subjected to structural analysis and content slicing to extract the main text information. It is then segmented according to semantic units (such as paragraphs and sentence groups) to ensure the density of geological terminology and paragraph integrity. Each segmented document fragment is approximately 100 to 200 words long.

[0050] For the segmented document fragments, a multilingual semantic embedding model is used to encode each segmented document fragment into a 384-dimensional vector, which is then stored in a vector database. The vector database uses FAISS to achieve fast vector indexing and retrieval, forming a geological lithology knowledge base that supports semantic queries.

[0051] First, the geological text data of the target area is structured and semantically segmented to obtain multiple segmented document fragments. Then, each document fragment is encoded using a multilingual semantic embedding model to generate a unified-dimensional encoding vector. Finally, all encoding vectors are stored in the database to construct a geological lithology knowledge base. This ensures that the lithological knowledge contained in the geological text data is fully preserved. Furthermore, the combination of semantic segmentation and vector encoding provides a high-quality data foundation for accurately retrieving corresponding text fragments based on the user's lithology query intent.

[0052] S2012, based on the user's lithology query intent, the approximate nearest neighbor search algorithm is used to query the geological lithology knowledge base to obtain multiple text fragments.

[0053] Specifically, S2012 above includes: b1, based on the lithology query intent of the received user, is transformed using a vector transformation method to obtain a semantic vector; b2. Based on the semantic vector and combined with the geological lithology knowledge base, a query is performed using an approximate nearest neighbor search algorithm to obtain multiple text fragments corresponding to the semantic vector.

[0054] First, the user's lithology query intent is transformed into a semantic vector. Then, combined with a geological lithology knowledge base, an approximate nearest neighbor search algorithm is used to accurately match relevant text fragments, achieving semantic alignment between query requirements and text knowledge. This ensures the relevance of search results and provides a reliable data foundation for subsequent lithology semantic extraction.

[0055] S2013, based on multiple text fragments, uses a semantic recognition model to extract semantics and obtain standard text data for lithology categories.

[0056] Based on geological text data of the target region, a multilingual semantic embedding model is used to encode the text, resulting in a structured geological lithology knowledge base. This facilitates efficient retrieval and extraction of lithology knowledge. Then, by combining the user's lithology query intent, an approximate nearest neighbor search algorithm is used to filter multiple relevant text fragments from the geological lithology knowledge base, ensuring the targeted and accurate semantic extraction. Finally, based on the queried text fragments, a semantic recognition model is used to accurately extract and summarize lithology information, obtaining standard text data for lithology categories. This achieves automated and efficient extraction of lithology knowledge from unstructured geological text, avoiding the tedious work of manually filtering text and extracting lithology categories, and effectively improving the accuracy and efficiency of surrounding rock image recognition results.

[0057] S202: Based on multiple surrounding rock images extracted from the target area, a feature encoding method is used for vector transformation to obtain corresponding image feature vectors of a unified dimension. The feature encoding method includes: gray-level co-occurrence matrix, HSV histogram, RGB histogram, and color statistical features. For details, please refer to [link to details]. Figure 1 S102 of the illustrated embodiment will not be described again here.

[0058] S203, based on the unified-dimensional image feature vector, the K-Means clustering algorithm is used to obtain multiple rock clustering results. For details, please refer to [link to relevant documentation]. Figure 1 S103 of the illustrated embodiment will not be described again here.

[0059] S204, based on the standard textual data of the lithology categories and the rock clustering results, a semantic comparison method is used, combined with manual verification, to establish mapping relationships and obtain the clustering results of surrounding rock images with lithology semantic labels. For details, please refer to [link to relevant documentation]. Figure 1 S104 of the illustrated embodiment will not be described again here.

[0060] The rock mass image clustering method provided by this invention, based on the geological text data of the target area and combined with the user's lithology query intent, accurately extracts standard text data of lithology categories through a semantic recognition model. At the same time, for the rock mass image, feature encoding methods such as gray-level co-occurrence matrix, HSV histogram, RGB histogram and color statistical features are used to transform the image into a unified-dimensional image feature vector. Then, the K-Means clustering algorithm is used to obtain the rock grouping results. Finally, the mapping relationship between the clustering results and lithology categories is established through semantic comparison and manual verification, realizing mutual verification between text knowledge and image visual features, improving the accuracy and efficiency of rock mass image recognition, and achieving the goal of meeting the processing efficiency requirements of rock mass images in the current environment.

[0061] This embodiment provides a rock mass image clustering method that can be used on a server terminal for geological exploration. Figure 3This is a flowchart of a rock mass image clustering method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps: S301, based on the geological text data of the target area and combined with the user's lithology query intent, semantic extraction is performed through a semantic recognition model to obtain standard text data of lithology categories; the geological text data includes: geological exploration reports, lithology description documents, or third-party knowledge materials. For details, please refer to... Figure 1 S101 of the illustrated embodiment will not be described again here.

[0062] S302: Based on multiple surrounding rock images extracted from the target area, a feature encoding method is used for vector transformation to obtain corresponding image feature vectors of a unified dimension. The feature encoding method includes: gray-level co-occurrence matrix, HSV histogram, RGB histogram, and color statistical features. For details, please refer to [link to details]. Figure 1 S102 of the illustrated embodiment will not be described again here.

[0063] S303, Based on the unified dimension image feature vector, the K-Means clustering algorithm is used to obtain multiple rock clustering results.

[0064] Specifically, S303 includes: S3031, based on standard textual data of lithology categories, determines the number of lithology categories and uses it as the initial number of clusters for the K-Means clustering algorithm; S3032, based on the initial number of clusters, using Euclidean distance as the metric, clustering is performed by minimizing the distance between each image feature vector and its respective cluster center. The iteration continues until the cluster centers converge or the preset maximum number of iterations is reached, and multiple rock clustering results are output.

[0065] Specifically, assuming the image feature set is The objective function of the K-Means clustering algorithm satisfies: , in, , indicating the first Embedding vectors of surrounding rock images; Represents the number of clusters; Represented as the first One cluster; Represents clusters The center of the cluster is defined as the mean of all samples within that cluster. This represents the Euclidean distance.

[0066] The number of lithological types determined by the standard text data of lithological categories is used as the initial number of clusters for K-Means clustering. By combining Euclidean distance metric and minimizing intra-cluster distance, the adaptability of each clustering result obtained in the end to the actual distribution of lithological categories is guaranteed. At the same time, the stability and compactness of each rock clustering result obtained in the end are ensured through an iterative convergence mechanism.

[0067] S304, based on the standard textual data of the lithology categories and the rock clustering results, a semantic comparison method is used, combined with manual verification, to establish mapping relationships and obtain the clustering results of surrounding rock images with lithology semantic labels. For details, please refer to [link to relevant documentation]. Figure 1 S104 of the illustrated embodiment will not be described again here.

[0068] The rock mass image clustering method provided by this invention, based on the geological text data of the target area and combined with the user's lithology query intent, accurately extracts standard text data of lithology categories through a semantic recognition model. At the same time, for the rock mass image, feature encoding methods such as gray-level co-occurrence matrix, HSV histogram, RGB histogram and color statistical features are used to transform the image into a unified-dimensional image feature vector. Then, the K-Means clustering algorithm is used to obtain the rock grouping results. Finally, the mapping relationship between the clustering results and lithology categories is established through semantic comparison and manual verification, realizing mutual verification between text knowledge and image visual features, improving the accuracy and efficiency of rock mass image recognition, and achieving the goal of meeting the processing efficiency requirements of rock mass images in the current environment.

[0069] This embodiment provides a rock mass image clustering method that can be used on a server terminal for geological exploration. Figure 4 This is a flowchart of a rock mass image clustering method according to an embodiment of the present invention, such as... Figure 4 As shown, the process includes the following steps: S401, based on the geological text data of the target area and combined with the user's lithology query intent, semantic extraction is performed through a semantic recognition model to obtain standard text data of lithology categories; the geological text data includes: geological exploration reports, lithology description documents, or third-party knowledge materials. For details, please refer to... Figure 1 S101 of the illustrated embodiment will not be described again here.

[0070] S402: Based on multiple surrounding rock images extracted from the target region, a feature encoding method is used for vector transformation to obtain corresponding image feature vectors of a unified dimension. The feature encoding method includes: gray-level co-occurrence matrix, HSV histogram, RGB histogram, and color statistical features. For details, please refer to [link to details]. Figure 1 S102 of the illustrated embodiment will not be described again here.

[0071] S403, based on the unified-dimensional image feature vector, the K-Means clustering algorithm is used to obtain multiple rock clustering results. For details, please refer to [link to relevant documentation]. Figure 1 S103 of the illustrated embodiment will not be described again here.

[0072] S404. Based on the standard text data of the lithology category and the rock clustering results, a mapping relationship is established by using a semantic comparison method and combining manual verification to obtain the clustering results of the surrounding rock images with lithology semantic labels.

[0073] Specifically, S404 includes: S4041, Based on the standard text data of the lithology category and the rock clustering results, calculate the semantic similarity between the cluster center of each rock clustering result and the text embedding vector of the corresponding lithology name in the standard text data of the lithology category, and establish an initial mapping relationship; S4042, Based on the initial mapping relationship and combined with manual verification, the final association result between each rock clustering result and the rock types in the rock type list is obtained; S4043 combines the clustering results of each rock with the final association results of the rock types in the rock type list, and outputs the clustering results of the surrounding rock images with lithological semantic labels.

[0074] By utilizing the semantic similarity calculation results between the cluster centers of each rock clustering result and the lithology name text embedding vector, an initial mapping is established to achieve the accuracy of semantic alignment between the clustering results and the lithology category. Then, by combining the initial mapping with manual verification, the final association result is obtained, ensuring the reliability of the output final association result and improving the accuracy of identifying each surrounding rock image category using the final association result.

[0075] Furthermore, the rock mass image clustering method provided in this embodiment of the invention also includes: Based on the clustering results of the surrounding rock images with lithological semantic tags, the image clustering visualization results are obtained using an image clustering visualization method.

[0076] The rock mass image clustering method provided by this invention, based on the geological text data of the target area and combined with the user's lithology query intent, accurately extracts standard text data of lithology categories through a semantic recognition model. At the same time, for the rock mass image, feature encoding methods such as gray-level co-occurrence matrix, HSV histogram, RGB histogram and color statistical features are used to transform the image into a unified-dimensional image feature vector. Then, the K-Means clustering algorithm is used to obtain the rock grouping results. Finally, the mapping relationship between the clustering results and lithology categories is established through semantic comparison and manual verification, realizing mutual verification between text knowledge and image visual features, improving the accuracy and efficiency of rock mass image recognition, and achieving the goal of meeting the processing efficiency requirements of rock mass images in the current environment.

[0077] This embodiment also provides a rock mass image clustering device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0078] This embodiment provides a surrounding rock image clustering device, such as... Figure 5 As shown, it includes: The text data extraction module 510 is used to extract semantic data based on geological text data of the target area and the user's lithology query intent through a semantic recognition model to obtain standard text data of lithology categories; the geological text data includes: geological exploration reports, lithology description documents or third-party knowledge materials. The image feature transformation module 520 is used to transform multiple surrounding rock images extracted from the target area into vectors using feature encoding methods to obtain corresponding image feature vectors of the same dimension; the feature encoding methods include: gray-level co-occurrence matrix, HSV histogram, RGB histogram and color statistical features; The image feature clustering module 530 is used to obtain multiple rock clustering results based on the unified dimension image feature vector using the K-Means clustering algorithm; The mapping result output module 540 is used to establish mapping relationships based on the standard text data of the lithology category and the rock clustering results, using semantic comparison methods and combined with manual verification, to obtain the surrounding rock image clustering results with lithology semantic labels.

[0079] In some alternative implementations, the text data extraction module 510 includes: The database construction unit is used to encode geological text data based on the target area using a multilingual semantic embedding model to build a geological lithology knowledge base. The data query unit is used to query the geological lithology knowledge base based on the user's lithology query intent using an approximate nearest neighbor search algorithm to obtain multiple text fragments. The data generation unit is used to extract semantics from multiple text fragments using a semantic recognition model to obtain standard text data of lithology categories.

[0080] In some alternative implementations, the database construction unit includes: Document segmentation units are used to perform structured parsing and semantic segmentation of content based on geological text data of a target region, resulting in multiple segmented document fragments; The text encoding subunit is used to encode each segmented document fragment using a multilingual semantic embedding model to obtain the encoding vector of the corresponding document fragment. The database construction subunit is used to store multiple encoded vectors into the database to build a geological lithology knowledge base.

[0081] In some optional implementations, the data query unit includes: The semantic transformation subunit is used to transform the received lithology query intent of the user using a vector transformation method to obtain a semantic vector. The data query subunit is used to perform a query based on the semantic vector and in conjunction with the geological lithology knowledge base, using an approximate nearest neighbor search algorithm, to obtain multiple text fragments corresponding to the semantic vector.

[0082] In some optional implementations, the image feature clustering module 530 includes: The initial clustering unit is used to determine the number of lithology types based on standard textual data of lithology categories, and serves as the initial cluster number for the K-Means clustering algorithm; The clustering optimization unit is used to perform clustering based on the initial number of clusters, using Euclidean distance as the metric, by minimizing the distance between each image feature vector and its respective cluster center, and iterates until the cluster centers converge or the preset maximum number of iterations is reached, and then stops, outputting multiple rock clustering results.

[0083] In some alternative implementations, the mapping result output module 540 includes: The first association unit is used to calculate the semantic similarity between the cluster center of each rock clustering result and the text embedding vector of the corresponding lithology name in the lithology category standard text data based on the lithology category standard text data and the rock clustering results, and to establish an initial mapping relationship. The second association unit is used to obtain the final association result between each rock clustering result and the rock types in the rock type list based on the initial mapping relationship and combined with manual verification; The result output unit is used to integrate the final association results of each rock clustering result with the rock types in the rock type list, and output the surrounding rock image clustering results with lithological semantic labels.

[0084] In some alternative implementations, it also includes: The results display module is used to obtain the clustering visualization results of the surrounding rock images based on the clustering results of the surrounding rock images with lithological semantic labels, using the image clustering visualization method.

[0085] The surrounding rock image clustering device provided in this embodiment of the invention can execute the surrounding rock image clustering method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the method. Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0086] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.

[0087] The following is a detailed reference. Figure 6 This diagram illustrates a suitable structural design for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 601, which can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) 602 or a program loaded from memory 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of the electronic device. The processor 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0088] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0089] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a memory 608, or installed from a ROM 602. When the computer program is executed by the processor 601, it performs the functions defined in the rock mass image clustering method of the embodiments of the present invention.

[0090] Figure 6The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0091] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the rock mass image clustering method shown in the above embodiments is implemented.

[0092] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0093] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for clustering surrounding rock images, characterized in that, The method includes: Based on geological text data of the target area and combined with the user's lithology query intent, semantic extraction is performed through a semantic recognition model to obtain standard text data of lithology categories; the geological text data includes: geological exploration reports, lithology description documents, or third-party knowledge materials. Based on multiple surrounding rock images extracted from the target region, a feature encoding method is used to perform vector transformation to obtain corresponding image feature vectors of a unified dimension; the feature encoding method includes: gray-level co-occurrence matrix, HSV histogram, RGB histogram and color statistical features; Based on the unified dimension image feature vector, the K-Means clustering algorithm is used to obtain multiple rock clustering results; Based on the standard text data of the lithology categories and the rock clustering results, a mapping relationship is established by using a semantic comparison method and combining it with manual verification to obtain the clustering results of surrounding rock images with lithology semantic labels.

2. The method according to claim 1, characterized in that, The geological text data based on the target area, combined with the user's lithology query intent, is semantically extracted using a semantic recognition model to obtain standard text data for lithology categories, including: Based on geological text data of the target area, a geological lithology knowledge base is constructed by encoding using a multilingual semantic embedding model. Based on the user's lithology query intent, the approximate nearest neighbor search algorithm is used to query the geological lithology knowledge base to obtain multiple text fragments; Based on multiple text fragments, semantic extraction is performed using a semantic recognition model to obtain standard text data for lithology categories.

3. The method according to claim 2, characterized in that, The geological text data based on the target region is encoded using a multilingual semantic embedding model to construct a geological lithology knowledge base, including: Based on the geological text data of the target area, the content is structured and semantically segmented to obtain multiple segmented document fragments; For each segmented document fragment, a multilingual semantic embedding model is used to encode it, resulting in the encoding vector of the corresponding document fragment. Multiple encoded vectors are stored in a database to construct a geological lithology knowledge base.

4. The method according to claim 2, characterized in that, Based on the user's lithology query intent, an approximate nearest neighbor search algorithm is used to query the geological lithology knowledge base, resulting in multiple text fragments, including: Based on the received user's lithology query intent, a semantic vector is obtained by using a vector transformation method. Based on the semantic vector and combined with the geological lithology knowledge base, a query is performed using an approximate nearest neighbor search algorithm to obtain multiple text fragments corresponding to the semantic vector.

5. The method according to claim 1, characterized in that, Based on the unified-dimensional image feature vector, the K-Means clustering algorithm is used to obtain multiple rock clustering results, including: Based on standard textual data of lithology categories, the number of lithology categories is determined and used as the initial number of clusters for the K-Means clustering algorithm; Based on the initial number of clusters, Euclidean distance is used as the metric. Clustering is performed by minimizing the distance between each image feature vector and its respective cluster center. The iteration stops when the cluster center converges or the preset maximum number of iterations is reached, and multiple rock clustering results are output.

6. The method according to claim 1, characterized in that, Based on the standard text data of the lithology category and the rock clustering results, a mapping relationship is established using a semantic comparison method combined with manual verification to obtain the surrounding rock image clustering results with lithology semantic labels, including: Based on the standard text data of the lithology categories and the rock clustering results, the semantic similarity between the cluster center of each rock clustering result and the text embedding vector of the corresponding lithology name in the standard text data of the lithology categories is calculated, and an initial mapping relationship is established. Based on the initial mapping relationship, and combined with manual verification, the final association result between each rock clustering result and the rock types in the rock type list is obtained; By combining the clustering results of each rock with the final association results of the rock types in the rock type list, the output is the clustering results of the surrounding rock images with lithological semantic labels.

7. The method according to claim 1, characterized in that, Also includes: Based on the clustering results of the surrounding rock images with lithological semantic tags, the image clustering visualization results are obtained using an image clustering visualization method.

8. A rock mass image clustering device, characterized in that, The device includes: The text data extraction module is used to extract semantic data based on geological text data of the target area, combined with the user's lithology query intent, and to obtain standard text data of lithology categories through a semantic recognition model; the geological text data includes: geological exploration reports, lithology description documents, or third-party knowledge materials. The image feature transformation module is used to transform multiple surrounding rock images extracted from the target region into vectors using feature encoding methods to obtain corresponding image feature vectors of the same dimension. The feature encoding methods include: gray-level co-occurrence matrix, HSV histogram, RGB histogram and color statistical features. The image feature clustering module is used to obtain multiple rock clustering results based on the unified dimension image feature vector using the K-Means clustering algorithm; The mapping result output module is used to establish mapping relationships based on the standard text data of the lithology category and the rock clustering results, using semantic comparison methods and combined with manual verification, to obtain the surrounding rock image clustering results with lithology semantic labels.

9. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the rock mass image clustering method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the rock mass image clustering method according to any one of claims 1 to 7.