A deposit knowledge graph construction method, device, equipment and medium
By generating a mineral deposit knowledge graph through a multi-agent framework and a vector-based initial screening and verification mechanism, the existing technologies address the issues of professionalism and flexibility in the field of mineral deposits. This enables efficient and low-cost knowledge graph construction, supporting intelligent mineral exploration and resource evaluation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA UNIV OF GEOSCIENCES (BEIJING)
- Filing Date
- 2026-05-06
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies are ill-suited to the characteristics of the mineral deposit field, and cannot balance professionalism, flexibility, and accuracy, thus failing to meet practical engineering needs.
By acquiring heterogeneous text from multiple sources, segmenting it into semantic blocks, and using a target information extraction framework composed of multiple agents for multi-dimensional extraction, and combining vector initial screening and large model verification mechanism for entity alignment, a mineral deposit knowledge graph is generated.
It enables the efficient and low-cost generation of high-quality mineral deposit knowledge graphs, improves the accuracy and flexibility of knowledge extraction, adapts to the needs of mineral deposit knowledge iteration, and supports intelligent mineral exploration and resource evaluation.
Smart Images

Figure CN122154882A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of mineral deposit geology, computer natural language processing, and knowledge graph technology. Specifically, it relates to a method, apparatus, equipment, and medium for constructing a mineral deposit knowledge graph. Background Technology
[0002] Mineral deposit knowledge graphs are core knowledge infrastructures in the field of geology and mineral resources. Using mineral deposits and ore bodies as core entities and semantic relationships between entities as links, they structure multi-source geological data, providing knowledge support for intelligent mineral exploration and resource evaluation, demonstrating significant application value. Current mainstream technical solutions typically employ supervised learning-based deep learning models or instruction-based fine-tuning strategies for large models. The former primarily utilizes classic architectures such as BERT-BiLSTM-CRF and CNN to extract entities and relationships, training the model to identify specific sequence features in text. The latter constructs a unified instruction dataset, such as InstructUIE or UniversalNER, to fine-tune a general-purpose large model, enabling it to extract information for specific tasks. Both approaches attempt to adapt complex domain knowledge structures through model training.
[0003] While the aforementioned technologies have achieved knowledge extraction to some extent, they have encountered insurmountable technical bottlenecks in practical applications. First, both methods are inherently highly dependent on high-quality manually labeled data. However, labeling in vertical domains often requires the participation of senior experts, making data acquisition extremely difficult and modeling costs high. Second, the models lack versatility and flexibility. Once the domain's ontology definition (schema) changes, data re-labeling and model retraining are often necessary, severely lagging behind the speed of knowledge iteration. Furthermore, when processing long scientific documents, existing technologies often suffer from model attention distraction due to the length of the text, and their pipeline-style cascaded extraction mode lacks intermediate verification mechanisms, easily leading to error accumulation. Finally, in the entity alignment stage, traditional methods rely solely on character similarity or shallow vector distance, making it difficult to accurately handle complex situations such as "literally different but semantically identical" or "contextually related polysemous words" in technical terms, resulting in low-quality mineral deposit knowledge graphs.
[0004] In summary, existing technologies are ill-suited to the characteristics of the mineral deposit field, failing to balance professionalism, flexibility, and accuracy, and thus unable to meet practical engineering needs. There is an urgent need for a knowledge graph construction technology adapted to the mineral deposit field to address these bottlenecks. Summary of the Invention
[0005] In view of this, the purpose of this application is to provide a method, apparatus, equipment and medium for constructing a mineral deposit knowledge graph, which effectively solves the problems that the existing technology is difficult to adapt to the characteristics of the mineral deposit field, cannot take into account professionalism, flexibility and accuracy, and cannot meet the actual engineering needs.
[0006] In a first aspect, embodiments of this application provide a method for constructing a mineral deposit knowledge graph, the method comprising: Obtain multi-source heterogeneous text related to the ore deposit to be constructed, segment the multi-source heterogeneous text into multiple semantic blocks, and dynamically define the graph pattern of the ore deposit to be constructed; The multiple semantic blocks are input into a target information extraction framework pre-constructed based on multiple intelligent agents, so that the target information extraction framework extracts the multiple semantic blocks in multiple dimensions based on the graph pattern to obtain a set of triples; The entity alignment table is obtained by aligning multiple entities included in the triplet set through vector initial screening and large model verification mechanism. The target triple set is obtained by processing the triple set according to the entity alignment table, and then imported into the preset knowledge graph construction software to generate a mineral deposit knowledge graph.
[0007] In conjunction with the first aspect, this application provides a first possible implementation of the first aspect, wherein the target information extraction framework extracts a set of triples from the plurality of semantic blocks based on the graph pattern in multiple dimensions, including: Based on the characteristics of multiple semantic blocks, different types of intelligent agents are set up, and each intelligent agent is equipped with corresponding functional modules; Each functional module of each intelligent agent is controlled to process the multiple semantic blocks accordingly in order to obtain the set of triples.
[0008] In conjunction with the first aspect, this application provides a second possible implementation of the first aspect, wherein the intelligent agent includes at least a named entity recognition intelligent agent; Controlling each functional module of each intelligent agent to perform corresponding processing on the multiple semantic blocks, including: Based on the types of multiple sub-intelligent agents in the named entity recognition agent, the semantic block is dynamically concatenated to obtain task prompts; The task prompt is parsed using LLM and a structured response is generated. The response is then verified. The answer result is iteratively optimized based on the verification result generated by the verification to obtain the first entity set.
[0009] In conjunction with the first aspect, this application provides a third possible implementation of the first aspect, wherein the intelligent agent includes at least an entity classification intelligent agent; After iteratively optimizing the response based on the verification results to obtain the first entity set, the following steps are included: By integrating entities, graph patterns, and pre-defined annotation examples from the first entity set, a structured classification suggestion is obtained; The LLM function is invoked to parse the structured classification hints, obtain the classification results, and verify the classification results. The classification results are iteratively optimized based on the verification results to obtain a second category set.
[0010] In conjunction with the first aspect, this application provides a fourth possible implementation of the first aspect, wherein the intelligent agent includes at least a relation extraction intelligent agent; After iteratively optimizing the answer results based on the verification results to obtain the second category set, the following steps are included: Based on multiple entities in the second category set, multiple context fragments are extracted from the corresponding multi-source heterogeneous text; The candidate set of relationships obtained by splicing together the multiple entities, context fragments, and constraints based on the graph pattern is a structured hint, and the best reasonable relationship is parsed based on LLM; Verify the optimal reasonable relation, and iteratively optimize the optimal reasonable relation based on the verification results until a set of triples is obtained.
[0011] In conjunction with the first aspect, this application provides a fifth possible implementation of the first aspect, wherein the entity alignment of the multiple entities included in the triplet set through vector initial screening and large model verification mechanism includes: The entity is encoded as a high-dimensional vector, and multiple candidate entities corresponding to the high-dimensional vector are retrieved; A pre-defined splicing-generation-verification and feedback mechanism is executed to align the entity and multiple candidate entities to obtain the alignment result.
[0012] In conjunction with the first aspect, this application provides a sixth possible implementation of the first aspect, wherein the execution of the preset splicing-generation-verification and feedback mechanism to align the entity and multiple candidate entities includes: The entity, multiple candidate entities, and the aligned task description are combined into a complete prompt, and a first candidate entity is selected from multiple candidate entities based on the complete prompt; Verify the alignment result generated by the first candidate entity, and provide feedback based on the verification result until the iteration ends.
[0013] Secondly, embodiments of this application provide a mineral deposit knowledge graph construction apparatus, the apparatus comprising: The acquisition module is used to acquire multi-source heterogeneous text related to the ore deposit to be constructed, segment the multi-source heterogeneous text into multiple semantic blocks, and dynamically define the graph pattern of the ore deposit to be constructed. The input module is used to input the multiple semantic blocks into a target information extraction framework pre-constructed based on multiple intelligent agents, so that the target information extraction framework extracts the multiple semantic blocks in multiple dimensions based on the graph pattern to obtain a set of triples. The alignment module is used to align multiple entities included in the triple set through vector initial screening and large model verification mechanism to obtain an entity alignment table; The import module is used to process the triple set according to the entity alignment table to obtain the target triple set, and import the target triple set into the preset knowledge graph construction software to generate a mineral deposit knowledge graph.
[0014] Thirdly, embodiments of this application provide an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of any of the mineral deposit knowledge graph construction methods described in the present application are performed.
[0015] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of any of the mineral deposit knowledge graph construction methods described in the present application.
[0016] This application provides a method for constructing a mineral deposit knowledge graph. The method first acquires multi-source heterogeneous text related to the mineral deposit to be constructed, segments the multi-source heterogeneous text into multiple semantic blocks, and dynamically defines the graph pattern of the mineral deposit to be constructed. Next, it inputs the multiple semantic blocks into a pre-defined target information extraction framework based on multiple intelligent agents, so that the target information extraction framework extracts a set of triples from the multiple semantic blocks in multiple dimensions based on the graph pattern. Then, it performs entity alignment on the multiple entities included in the triple set through vector initial screening and large model verification mechanisms to obtain an entity alignment table. Finally, it processes the triple set according to the entity alignment table to obtain a target triple set, and imports the target triple set into a pre-set knowledge graph construction software to generate a mineral deposit knowledge graph.
[0017] This application addresses the challenges of reducing modeling costs and obtaining labeled data by converting multi-source heterogeneous text into semantic blocks and combining this with a multi-agent target information extraction framework. It eliminates the heavy reliance on manual annotation in existing technologies, significantly reduces the involvement costs of senior geological experts, shortens data processing cycles, and enables efficient extraction of mineral deposit knowledge, overcoming limitations in large-scale applications. By dynamically defining the graph pattern of the mineral deposit to be constructed, it enhances the flexibility of ontology adaptation and keeps pace with knowledge iteration, solving the problem of lagging ontology change adaptation in existing technologies. This enables dynamic updates of the knowledge graph, meeting the needs of mineral deposit knowledge iteration. The multi-agent target information extraction framework can mine knowledge from semantic blocks from multiple dimensions. Combined with vector initial screening and large model verification mechanisms, it reduces error accumulation and improves the accuracy of long text processing and knowledge extraction. The vector initial screening and large model verification mechanisms align entities in triples, improving entity alignment accuracy, enhancing graph fusion quality, generating accurate entity alignment tables, improving the fusion effect of knowledge from different sources, and ensuring the consistency and integrity of the mineral deposit knowledge graph. Based on the above methods, this approach balances the professionalism, flexibility, low cost, and high accuracy of mineral deposit knowledge extraction, effectively addresses the core bottlenecks of existing technologies, efficiently generates high-quality mineral deposit knowledge graphs, provides reliable knowledge support for intelligent mineral exploration and resource evaluation, significantly improves the efficiency and quality of mineral deposit knowledge graph construction, and meets the needs of practical engineering applications. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This illustration shows a flowchart of a mineral deposit knowledge graph construction method provided in an embodiment of this application; Figure 2 This illustration shows another flowchart of a mineral deposit knowledge graph construction method provided in an embodiment of this application; Figure 3 A schematic diagram of the target information extraction framework provided in an embodiment of this application is shown; Figure 4 A schematic diagram of the vector initial screening and large model verification mechanism provided in the embodiments of this application is shown; Figure 5 This paper shows a structural block diagram of a mineral deposit knowledge graph construction device provided in an embodiment of this application; Figure 6 A structural block diagram of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0021] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0022] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0023] Existing technologies are ill-suited to the characteristics of the mineral deposit field, failing to balance professionalism, flexibility, and accuracy, and thus unable to meet practical engineering needs. There is an urgent need for a knowledge graph construction technology adapted to the mineral deposit field to address these bottlenecks.
[0024] Based on this, embodiments of this application provide a method, apparatus, equipment, and medium for constructing a mineral deposit knowledge graph, which are described below through embodiments.
[0025] Example 1 To facilitate understanding of this embodiment, a method for constructing a mineral deposit knowledge graph disclosed in this application will first be described in detail. For example... Figure 1 The diagram shown illustrates a flowchart of a method for constructing a mineral deposit knowledge graph. Figure 2 The diagram illustrates another flowchart of a method for constructing a mineral deposit knowledge graph. This application provides a method for constructing a mineral deposit knowledge graph, the method comprising: S101. Obtain multi-source heterogeneous text related to the ore deposit to be constructed, segment the multi-source heterogeneous text into multiple semantic blocks, and dynamically define the graph pattern of the ore deposit to be constructed. S102. Input the multiple semantic blocks into a target information extraction framework pre-constructed based on multiple intelligent agents, so that the target information extraction framework extracts the multiple semantic blocks in multiple dimensions based on the graph pattern to obtain a set of triples. S103. The entities included in the triple set are aligned by the vector initial screening and large model verification mechanism to obtain the entity alignment table. S104. Process the triple set according to the entity alignment table to obtain the target triple set, and import the target triple set into the preset knowledge graph construction software to generate a mineral deposit knowledge graph.
[0026] In step S101, this application first obtains multi-source heterogeneous text related to the mineral deposit to be constructed. This multi-source heterogeneous text includes multi-source heterogeneous geoscientific documents in formats such as PDF, XML, and TXT. The multi-source heterogeneous geoscientific documents are then converted to plain text format, and the multi-source heterogeneous text is segmented into multiple semantic blocks according to a preset segmentation method. This preset segmentation method is set based on the target information extraction framework and the Large Language Model (LLM) in the vector initial screening and large model verification mechanism of this application. Specifically, considering the token window limitation of the LLM, an overlapping sliding window technique is used to segment the plain text format multi-source heterogeneous text into text blocks of approximately 200 tokens, balancing the context length limitation of a single LLM reading session with processing efficiency. This approach ensures that the semantics of long sentences or cross-sentences do not lose their relevance due to segmentation, and also guarantees the accuracy of the mineral deposit knowledge graph constructed by this application. In the construction and analysis of knowledge graphs, the graph schema (also known as ontology or schema) plays a crucial role. Essentially, it is the logical blueprint of the entire knowledge system, defining the allowed entity types, relation types, and various attributes (such as metallogenic epoch, mineralization elements, and rock chemical characteristics) and their constraints. This application pre-defines the graph schema of the ore deposit to be constructed based on a top-down schema approach. Specifically, the graph schema is determined according to the ore deposit's focus or multiple attribute information. Different ore deposits correspond to different graph schemas. Furthermore, by using the schema as input prompts, the model can be quickly adapted from different domains, such as "gold mine" to "copper mine," without retraining. This significantly improves the versatility, flexibility, and deployment efficiency of the constructed ore deposit knowledge graph.
[0027] In step S102, this application pre-constructs a target information extraction framework composed of multiple agents, including a Named Entity Recognition Agent (NER Agent), an Entity Classification Agent (NC Agent), and a Relation Extraction Agent (RE Agent). Each agent contains three basic modules executed sequentially: "splicing-generating-verifying and feedback". The multiple semantic blocks are input into the target information extraction framework pre-constructed based on multiple agents, so that the target information extraction framework extracts the multiple semantic blocks in multiple dimensions based on the graph pattern to obtain a set of triples. That is, each agent performs multi-dimensional extraction of multiple semantic blocks according to the three basic modules executed sequentially, specifically: (1) Splicing module: dynamically splices the text to be processed in each semantic block with the task description, output format constraints, answer examples, and error information and modification suggestions (initially empty) into a complete prompt; (2) Generating module: calls LLM to parse the complete prompt and generate structured output, and then extracts the required information according to the preset format ("START" "END" content), where LLM can be Qwen Series; (3) Verification and Feedback Module: Another LLM simulates a human expert to verify the complete prompts and answers. If an error is found, error information and modification suggestions are generated and returned to the splicing module to trigger a new round of generation iteration until the output meets the quality requirements, such as Figure 3 As shown.
[0028] The LLM is not limited to the Qwen series and can be replaced by any open-source or closed-source LLM that supports context learning, such as DeepSeek, Llama-3, and GLM. It can also introduce Retrieval Enhancement Generation (RAG) to use offline geological dictionaries as input prompts to external knowledge bases to make up for the lack of expertise in small models.
[0029] In a specific implementation of step S102, one embodiment is as follows: the target information extraction framework extracts a set of triples from multiple semantic blocks based on the graph pattern in multiple dimensions, including: S1021. Based on the characteristics of multiple semantic blocks, set up different types of intelligent agents and configure each intelligent agent to be equipped with corresponding functional modules; S1022. Control each functional module of each intelligent agent to process the multiple semantic blocks accordingly to obtain the set of triples.
[0030] In steps S1021-S1022, based on the characteristics of semantic blocks—namely, explicit entities, diverse entity types, and clear semantic relationships—this application sets up different types of intelligent agents, including Named Entity Recognition Agent (NER Agent), Entity Classification Agent (NC Agent), and Relation Extraction Agent (RE Agent). The NER Agent specifically identifies core entities such as "ore body" and "chalcopyrite" in semantic blocks containing phrases like "ore body thickness 5-10 meters, associated mineral is chalcopyrite." The Entity Classification Agent categorizes entities that may simultaneously contain phrases like "ore deposit," "tectonic zone," and "geochemical anomaly" within the same semantic block into categories such as "ore deposit," "mineral," and "tectonic structure." The RE Agent extracts the "ore-forming structure-controlling-ore deposit" relationship from semantic blocks such as "ore-forming structures control ore deposit distribution," directly supporting the generation of triples. Each agent is equipped with corresponding functional modules, thus each agent possesses the capabilities of splicing, generation, verification, and feedback. Three sequentially executed basic modules control each functional module of each agent to process the multiple semantic blocks to obtain the set of triples. This application sets up three types of agents to cooperate and replace the traditional single-model "one-size-fits-all" extraction mode. It can accurately match the information extraction needs of different semantic blocks (such as different semantic blocks after splitting a long text, which may focus on entities and relationships respectively), improve extraction accuracy, reduce error accumulation, and get rid of dependence on large-scale expert-annotated data, thereby achieving the core advantages of "reducing costs and improving extraction accuracy".
[0031] In a specific implementation of step S1022, one embodiment is as follows: the intelligent agent includes at least a named entity recognition intelligent agent; Controlling each functional module of each intelligent agent to perform corresponding processing on the multiple semantic blocks, including: A1. Based on the types of multiple sub-intelligent agents in the named entity recognition agent, dynamically concatenate the semantic block to obtain task prompts; A2. Call LLM to parse the task prompts and generate structured answer results, and verify the answer results; A3. Based on the verification results generated by the verification, iteratively optimize the answer results to obtain the first entity set.
[0032] In steps A1-A3, to address the challenges of ambiguous entity boundaries, severe nesting, and complex numerical representations in geoscientific texts, this application establishes a named entity recognition (NAME) agent. This NAME agent is built upon a basic agent framework and further subdivided into three specialized sub-agents: an instance agent, a concept agent, and a phenomenon agent. Each sub-agent independently runs a "assembly-generation-verification and feedback" process. In the assembly module, task prompts are dynamically assembled based on the type of the sub-agent. For example, the instance agent's prompts include the definition of a geological instance, typical examples, and output format, such as the Pacific Plate; the phenomenon agent's prompts explicitly extract geological movements and phenomena, such as the subduction of the Pacific Plate. This application solves problems such as the separation of numerical values from units and entity overlap through differentiated prompts. In the generation module, an LLM is invoked to parse the task prompts and generate structured responses regarding the extracted data. Subsequently, the verification and feedback module compares the original text to be processed with the generated result using LLM. If nested entities are found to be missing or types are misjudged, specific modification suggestions are generated, such as "Please treat 'pyrite' as an ore mineral entity". This suggestion is then used as supplementary background information to fill in the next round of splicing prompts, triggering iterative optimization until all sub-agent outputs pass LLM verification. Finally, the first entity set is obtained, which consists of the entities corresponding to the semantic blocks of the text to be processed that contain the ore deposit to be constructed.
[0033] In the specific implementation of step A3, another embodiment exists in which the intelligent agent includes at least an entity classification intelligent agent; After iteratively optimizing the response based on the verification results to obtain the first entity set, the following steps are included: B1. Integrate the entities, graph patterns, and preset annotation examples in the first entity set to obtain structured classification suggestions; B2. Call LLM to parse the structured classification hints, obtain the classification results, and verify the classification results; B3. Based on the verification results generated by the verification, iteratively optimize the classification results to obtain the second category set.
[0034] In steps B1-B3, after obtaining the first entity set generated by the named entity recognition agent, this application outputs the first entity set to the entity classification agent. The entity classification agent is responsible for performing fine-grained ontology classification on the entities output by the named entity recognition agent to ensure their semantic accuracy in the geoscientific knowledge graph. In the splicing module, the entity classification agent integrates the entities to be classified, the graph pattern, and a small number of labeled examples, such as "pyrite → ore and minerals," to form a structured classification prompt. The generation module calls LLM to determine the most likely category based on the context, which is the classification result. The classification results are output in the prescribed format, and the verification and feedback module is then activated: LLM checks whether the classification results conform to common geological knowledge. For example, "granite" should not be classified as "ores and minerals". If logical conflicts or ambiguities are found, explanatory feedback is generated (such as "granite is an intrusive rock and belongs to the intrusive rock category"). This information is then injected into the supplementary background of the next round of prompts, guiding LLM to correct errors and repeat the cycle until the classification results are qualified. Finally, the classification results corresponding to all entities are obtained, that is, the entity category to which all entities belong is determined. Then, based on all entities and the entity categories to which all entities belong, a second category set is integrated.
[0035] In the specific implementation of step B3, there is another embodiment in which the intelligent agent includes at least a relation extraction intelligent agent; After iteratively optimizing the answer results based on the verification results to obtain the second category set, the following steps are included: C1. Extract multiple context fragments from the corresponding multi-source heterogeneous text based on multiple entities in the second category set; C2. The candidate set of relationships obtained by splicing the multiple entities, context fragments and constraints based on the graph pattern is a structured hint, and the best reasonable relationship is parsed based on LLM; C3. Verify the optimal reasonable relation, and iteratively optimize the optimal reasonable relation based on the verification results until a set of triples is obtained.
[0036] In steps C1-C3, after the entity classification agent outputs the second category set, this application inputs the second category set along with the original corresponding multi-source text data to be processed into the relation extraction agent. The relation extraction agent first uses the position index information of each entity in the second category set in the original multi-source text data to locate and extract the semantic context containing the entity from the original multi-source text data, generating multiple context fragments; then, under the constraints of the schema, the relation extraction agent combines the extracted entities, the corresponding context fragments, and the predefined relation candidate set into a structured prompt, driving the generation module to call the Large Language Model (LLM) for reasoning and select the best reasonable relation.
[0037] Next, the verification and feedback module checks the correctness of the relation triples corresponding to the best reasonable relation output. If an error is detected (such as logical conflict or format mismatch), LLM will reject the result and generate a targeted correction instruction, such as "causal relations only apply to process or event entities." This rule is dynamically added to the subsequent prompt context, driving the relation extraction agent to regenerate the best reasonable relation based on the original text and the correction instruction. This process continues to iterate until the output relation triples simultaneously satisfy the format specification, domain logic, and context consistency, ultimately obtaining a high-quality set of entity relation triples, i.e., the final triple set.
[0038] This application can also merge NER and RE into a single Prompt generation (generating a JSON block). Although the accuracy is reduced, the calculation speed can be increased by more than double. In highly descriptive text, relational terms can be extracted first, and then entity boundaries can be located. The specific settings can be customized according to the actual situation.
[0039] In step S103, after obtaining the set of triples, this application needs to construct a mineral deposit knowledge graph based on the set of triples. However, there are semantic blocks in the set of triples that correspond to different entities. The same entity may be described differently in different semantic blocks. Errors may also occur during the extraction of the same entity from the large language model, resulting in different names for the same entity. For example, pyrite may have similar terms such as "large pyrite" and "small pyrite". To address the widespread problem of synonymy in the field of geoscience, such as "Zhongchuan pluton" and "Zhongchuan granite", this application pre-constructs... An entity alignment agent was built that integrates vector similarity and semantic consistency for initial vector screening and large-scale model verification. Its overall process also follows the basic framework of "concatenation-generation-verification and feedback". Therefore, the vector initial screening and large-scale model verification mechanism are performed based on the entity alignment agent, and the multiple entities included in the triple set are aligned through the vector initial screening and large-scale model verification mechanism to obtain an entity alignment table. In this application, the triple extraction is already based on the graph pattern, so there is no need to verify the relationship, only to align the entities, which is convenient for subsequent management and use.
[0040] In a specific implementation of step S103, one embodiment is as follows: the entity alignment of the multiple entities included in the triplet set through vector initial screening and large model verification mechanism includes: S1031. Encode the entity into a high-dimensional vector and retrieve multiple candidate entities corresponding to the high-dimensional vector; S1032. Execute a preset splicing-generation-verification and feedback mechanism to align the entity and multiple candidate entities to obtain the alignment result.
[0041] In steps S1031-S1032, the vector initial screening and large model verification mechanism described in this application is divided into two stages. Stage one involves retrieving multiple candidate entities corresponding to the high-dimensional vector. First, the text_embedding_v4 model is used to encode the entities to be aligned into high-dimensional vectors and store them in the ChromaDB vector database. Then, cosine similarity retrieval is used to obtain a candidate entity list in descending order of similarity, and the Top-N semantically similar candidate entities are returned to form a preliminary matching list. Then, Stage two begins, where the entity alignment agent generates alignment results based on the "splicing-generation-verification and feedback" framework. Figure 4 As shown, this application abandons the traditional alignment method that relies solely on character similarity and shallow vector distance. Through a closed-loop mechanism of "concatenation-generation-verification and feedback," it can accurately handle complex scenarios in the field of mineral deposits, such as "different words but the same meaning" and "context-related polysemous words." This effectively solves the problem of insufficient accuracy of traditional alignment methods. This mechanism can automatically adapt to the professionalism and complexity of terminology in the field of mineral deposits, eliminating the need for manual correction of a large number of alignment results and reducing the involvement of senior geological experts. It not only solves the problem of high cost of manual annotation and correction in the background technology, but also improves the efficiency of entity alignment, meeting the needs of large-scale construction of mineral deposit knowledge graphs.
[0042] In a specific implementation of step S1032, one embodiment is as follows: the execution of a preset splicing-generation-verification and feedback mechanism to align the entity and multiple candidate entities includes: S10321. Combine the entity, multiple candidate entities, and the aligned task description into a complete prompt, and select the first candidate entity from multiple candidate entities based on the complete prompt; S10322. Verify the alignment result generated by the first candidate entity, and provide feedback based on the verification result until the iteration ends.
[0043] In steps S10321-S10322, the entity alignment agent of this application, in the stitching module, stitches entity A, multiple candidate entities (A1...An), and the alignment task description into a complete prompt. The generation module parses the complete prompt based on LLM, and selects the most consistent and representative first candidate entity Ax from multiple candidate entities based on the complete prompt and geoscientific common sense, and outputs the structured alignment result and decision basis. After obtaining the alignment result, the entity alignment agent's verification and feedback module is immediately activated. LLM checks the consistency between the entities in the triplet set, the candidate set, and the LLM output. If a misjudgment is found, such as incorrectly merging different rock masses due to local word similarity, a correction suggestion is generated, and this feedback is used as supplementary background information to fill in the next round of stitching prompts, triggering re-alignment, until the alignment result simultaneously satisfies vector proximity, semantic equivalence, and geoscientific rationality. At this time, the iteration ends, that is, the alignment process of vector initial screening and large model verification mechanism is completed.
[0044] The LLM-assisted alignment method in the vector initial screening and large model verification mechanism of this application improves the Relaxed Hit@1 index by more than 13.23% compared with the pure vector method. More importantly, this application can output logical interpretations such as "both refer to the same intrusive rock mass during the Indosinian period", making the alignment process consistent with relevant geological facts.
[0045] In step S104, this application processes the triple set according to the entity alignment table to obtain a standardized and consistent target triple set. Specifically, synonyms of the same entity in the triple set are replaced one by one, and erroneous triples discovered during entity alignment (such as invalid triples where entities do not match after alignment) are simultaneously removed. Missing valid triples are added. Through the standardization process of the entity alignment table, the standardization and consistency of the target triple set are ensured, avoiding graph chaos caused by entity synonyms. The target triple set is then imported into a pre-set knowledge graph construction software. Knowledge graph construction software, such as Neo4j and Protege, is adapted to professional software in the geological field. This software associates head entities, relationships, and tail entities in the target triple to construct a structured semantic network. It organically links entities related to mineral deposits, such as deposits, minerals, and structures, with relationships such as genesis, association, and control, ultimately generating a complete mineral deposit knowledge graph. This enables the visualization of the knowledge graph, supports subsequent practical applications such as intelligent mineral exploration and resource evaluation, and achieves a closed loop from data to graph, ensuring the professionalism, completeness, and usability of the mineral deposit knowledge graph.
[0046] This solution enables automated extraction via API calls without any pre-training. In empirical research in the West Qinling Mountains, it processed over 100 research papers in just 80 hours, significantly reducing the time cost of geoscientific big data projects. Furthermore, by simply modifying the map schema, the map's focus can be changed, and it can be applied to the construction of maps for other mineral deposits.
[0047] Example 2 This application also provides a device for constructing a mineral deposit knowledge graph, such as... Figure 5 The diagram shows a block diagram of a mineral deposit knowledge graph construction device. The functions implemented by this device correspond to the steps described above in executing a mineral deposit knowledge graph construction method on a terminal device. This device can be understood as a server component including a processor. The mineral deposit knowledge graph construction device described in this application includes: The acquisition module 501 is used to acquire multi-source heterogeneous text related to the ore deposit to be constructed, segment the multi-source heterogeneous text into multiple semantic blocks, and dynamically define the graph pattern of the ore deposit to be constructed. Input module 502 is used to input the plurality of semantic blocks into a target information extraction framework pre-constructed based on a plurality of intelligent agents, so that the target information extraction framework extracts the plurality of semantic blocks in multiple dimensions based on the graph pattern to obtain a set of triples; Alignment module 503 is used to align multiple entities included in the triple set through vector initial screening and large model verification mechanism to obtain an entity alignment table; Import module 504 is used to process the triple set according to the entity alignment table to obtain the target triple set, and import the target triple set into the preset knowledge graph construction software to generate a mineral deposit knowledge graph.
[0048] In one feasible implementation, the input module includes: Based on the characteristics of multiple semantic blocks, different types of intelligent agents are set up, and each intelligent agent is equipped with corresponding functional modules; Each functional module of each intelligent agent is controlled to process the multiple semantic blocks accordingly in order to obtain the set of triples.
[0049] In one feasible implementation, the input module further includes: Based on the types of multiple sub-intelligent agents in the named entity recognition agent, the semantic block is dynamically concatenated to obtain task prompts; The task prompt is parsed using LLM and a structured response is generated. The response is then verified. The answer result is iteratively optimized based on the verification result generated by the verification to obtain the first entity set.
[0050] In one feasible implementation, the input module also includes: By integrating entities, graph patterns, and pre-defined annotation examples from the first entity set, a structured classification suggestion is obtained; The LLM function is invoked to parse the structured classification hints, obtain the classification results, and verify the classification results. The classification results are iteratively optimized based on the verification results to obtain a second category set.
[0051] In one feasible implementation, the input module further includes: Based on multiple entities in the second category set, multiple context fragments are extracted from the corresponding multi-source heterogeneous text; The candidate set of relationships obtained by splicing together the multiple entities, context fragments, and constraints based on the graph pattern is a structured hint, and the best reasonable relationship is parsed based on LLM; Verify the optimal reasonable relation, and iteratively optimize the optimal reasonable relation based on the verification results until a set of triples is obtained.
[0052] In one feasible implementation, the alignment module includes: The entity is encoded as a high-dimensional vector, and multiple candidate entities corresponding to the high-dimensional vector are retrieved; A pre-defined splicing-generation-verification and feedback mechanism is executed to align the entity and multiple candidate entities to obtain the alignment result.
[0053] In one possible implementation, the alignment module further includes: The entity, multiple candidate entities, and the aligned task description are combined into a complete prompt, and a first candidate entity is selected from multiple candidate entities based on the complete prompt; Verify the alignment result generated by the first candidate entity, and provide feedback based on the verification result until the iteration ends.
[0054] Example 3 This application also provides an electronic device, such as Figure 6 As shown, it includes: a processor 601, a memory 602, and a bus 603. The memory 602 stores machine-readable instructions that can be executed by the processor 601. When the electronic device is running, the processor 601 and the memory 602 communicate through the bus 603. When the machine-readable instructions are executed by the processor 601, the steps of any one of the mineral deposit knowledge graph construction methods described above are executed.
[0055] Example 4 This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of any one of the mineral deposit knowledge graph construction methods described above.
[0056] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces; the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.
[0057] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0058] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0059] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a platform server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0060] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for constructing a mineral deposit knowledge graph, characterized in that, The method includes: Obtain multi-source heterogeneous text related to the ore deposit to be constructed, segment the multi-source heterogeneous text into multiple semantic blocks, and dynamically define the graph pattern of the ore deposit to be constructed; The multiple semantic blocks are input into a target information extraction framework pre-constructed based on multiple intelligent agents, so that the target information extraction framework extracts the multiple semantic blocks in multiple dimensions based on the graph pattern to obtain a set of triples; The entity alignment table is obtained by aligning multiple entities included in the triplet set through vector initial screening and large model verification mechanism. The target triple set is obtained by processing the triple set according to the entity alignment table, and then imported into the preset knowledge graph construction software to generate a mineral deposit knowledge graph.
2. The method according to claim 1, characterized in that, The target information extraction framework extracts a set of triples from multiple semantic blocks based on the graph pattern in multiple dimensions, including: Based on the characteristics of multiple semantic blocks, different types of intelligent agents are set up, and each intelligent agent is equipped with corresponding functional modules; Each functional module of each intelligent agent is controlled to process the multiple semantic blocks accordingly in order to obtain the set of triples.
3. The method according to claim 2, characterized in that, The intelligent agent includes at least a named entity recognition intelligent agent; Controlling each functional module of each intelligent agent to perform corresponding processing on the multiple semantic blocks, including: Based on the types of multiple sub-intelligent agents in the named entity recognition agent, the semantic block is dynamically concatenated to obtain task prompts; The task prompt is parsed using LLM and a structured response is generated. The response is then verified. The answer result is iteratively optimized based on the verification result generated by the verification to obtain the first entity set.
4. The method according to claim 3, characterized in that, The intelligent agent includes at least an entity classification intelligent agent; After iteratively optimizing the response based on the verification results to obtain the first entity set, the following steps are included: By integrating entities, graph patterns, and pre-defined annotation examples from the first entity set, a structured classification suggestion is obtained; The LLM function is invoked to parse the structured classification hints, obtain the classification results, and verify the classification results. The classification results are iteratively optimized based on the verification results to obtain a second category set.
5. The method according to claim 4, characterized in that, The intelligent agent includes at least a relation extraction intelligent agent; After iteratively optimizing the answer results based on the verification results to obtain the second category set, the following steps are included: Based on multiple entities in the second category set, multiple context fragments are extracted from the corresponding multi-source heterogeneous text; The candidate set of relationships obtained by splicing together the multiple entities, context fragments, and constraints based on the graph pattern is a structured hint, and the best reasonable relationship is parsed based on LLM; Verify the optimal reasonable relation, and iteratively optimize the optimal reasonable relation based on the verification results until a set of triples is obtained.
6. The method according to claim 1, characterized in that, The entity alignment of the multiple entities included in the triplet set through vector initial screening and large model verification mechanism includes: The entity is encoded as a high-dimensional vector, and multiple candidate entities corresponding to the high-dimensional vector are retrieved; A pre-defined splicing-generation-verification and feedback mechanism is executed to align the entity and multiple candidate entities to obtain the alignment result.
7. The method according to claim 6, characterized in that, The pre-defined splicing-generation-verification and feedback mechanism is used to align the entity and multiple candidate entities, including: The entity, multiple candidate entities, and the aligned task description are combined into a complete prompt, and a first candidate entity is selected from multiple candidate entities based on the complete prompt; Verify the alignment result generated by the first candidate entity, and provide feedback based on the verification result until the iteration ends.
8. A device for constructing a mineral deposit knowledge graph, characterized in that, The device includes: The acquisition module is used to acquire multi-source heterogeneous text related to the ore deposit to be constructed, segment the multi-source heterogeneous text into multiple semantic blocks, and dynamically define the graph pattern of the ore deposit to be constructed. The input module is used to input the multiple semantic blocks into a target information extraction framework pre-constructed based on multiple intelligent agents, so that the target information extraction framework extracts the multiple semantic blocks in multiple dimensions based on the graph pattern to obtain a set of triples. The alignment module is used to align multiple entities included in the triple set through vector initial screening and large model verification mechanism to obtain an entity alignment table; The import module is used to process the triple set according to the entity alignment table to obtain the target triple set, and import the target triple set into the preset knowledge graph construction software to generate a mineral deposit knowledge graph.
9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of a mineral deposit knowledge graph construction method as described in any one of claims 1 to 7 are performed.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of a mineral deposit knowledge graph construction method as described in any one of claims 1 to 7.